如何突出显示以sql_
开头并在引号内的字符串?
我的日志文件:
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
\zs
和\ze
是很好的选择。但我认为[^"]*
有点过于宽松了。 - Benoit