VIM:配置vimrc使C++函数高亮

在syntax/c.vim文件末尾中添加如下代码:

"highlight Functions
syn match cFunctions "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2
syn match cFunctions "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1
hi cFunctions guifg=#7fd02e cterm=bold ctermfg=yellow
syn match cClass "\<[a-zA-Z_][a-zA-Z_0-9]*\>::"me=e-2
hi cClass guifg=#7fd02e cterm=bold ctermfg=yellow

 

posted @ 2012-12-19 11:32  绿色冰点  Views(4688)  Comments(0Edit  收藏  举报