概述
在 syntax/c.vim文件中加入以下内容
"highlight Functions
syn match cFunctions display "<[a-zA-Z_][a-zA-Z_0-9]*>[^()]*)("me=e-2syn match cFunctions display "<[a-zA-Z_][a-zA-Z_0-9]*>s*("me=e-1
hi cFunctions ctermfg=3 guifg=goldenrod
"hi cFunctions gui=NONE cterm=bold ctermfg=blue
"syn match cFunctions display "[a-zA-Z_]{-1,}s{-0,}({1}"ms=s,me=e-1
"hi def link cFunctions Title
"========================================================
" Highlight All Math Operator
"========================================================
" C math operators
syn match cMathOperator display "[-+*%=<>(){};|.[],&!^~:]"
"" C pointer operators
syn match cPointerOperator display "->/|/."
"" C logical operators - boolean results
syn match cLogicalOperator display "[!<>]=/="
syn match cLogicalOperator display "==/|/<=/|/>=/|/!="
"" C bit operators
"syn match cBinaryOperator display"/(&/||/|/^/|<</|>>/)=/="
""syn match cBinaryOperator display "/~"
""syn match cBinaryOperatorError display "/~="
"" More C logical operators - highlight in preference to binary
"syn match cLogicalOperator display "&&/|||"
"syn match cLogicalOperatorError display "/(&&/|||/)="
" Math Operator
hi cMathOperator guifg=#3EFFE2
hi cPointerOperator guifg=#3EFFE2
hi cLogicalOperator guifg=#3EFFE2
"hi cBinaryOperator guifg=#3EFFE2
"hi cBinaryOperatorError guifg=#3EFFE2
"hi cLogicalOperator guifg=#3EFFE2
"hi cLogicalOperatorError guifg=#3EFFE2
最后
以上就是唠叨大门为你收集整理的vim中 C函数高亮和运算符高亮的全部内容,希望文章能够帮你解决vim中 C函数高亮和运算符高亮所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复