如何突出顯示以sql_
開頭且位於引號內的字符串?在Vim中自定義語法高亮
我的日誌文件:
MGPostgreSQLConnection.OpenQuery; "sql_p_factory_history"-ExecTime: 47ms
2010-11-12T17:28:18+01:00;custom; MGPostgreSQLConnection.OpenQuery; "sql_p_factory_history"-ExecTime+FetchTime: 47ms
2010-11-12T17:28:18+01:00;custom; MGPostgreSQLConnection.OpenQuery; "sql_factory"-ExecTime: 47ms
2010-11-12T17:28:18+01:00;custom; MGPostgreSQLConnection.OpenQuery; "sql_factory_contactperson"-ExecTime+FetchTime: 62ms
我的vimrc(這不工作,當然):
au BufRead,BufNewFile *.log syn match "sql_*"
au BufRead,BufNewFile *.log hi sql guifg=white guibg=red
謝謝,但我需要一個特殊的 「SYN匹配」。 – JAVH 2010-11-12 17:45:19