class & function names highlighting in Vim

前端 未结 11 784
名媛妹妹
名媛妹妹 2020-11-29 15:23

I just recently set up my Vim environment from Textmate, after becoming addicted to its modal input.

However, syntax highlighting seems to be not so beautiful in Vim

11条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 16:09

    this is my first post here and i didn't know how to make an observation, the answer of Eduardo makes "(" and "{" look unmached and bugs syntax foldind, I changed it a little to fix this.

    syn match    cCustomParen    "?=(" contains=cParen,cCppParen
    syn match    cCustomFunc     "\w\+\s*(\@=" contains=cCustomParen
    syn match    cCustomScope    "::"
    syn match    cCustomClass    "\w\+\s*::" contains=cCustomScope
    hi def cCustomFunc  gui=bold guifg=yellowgreen
    hi def link cCustomClass Function
    

提交回复
热议问题