class & function names highlighting in Vim

前端 未结 11 769
名媛妹妹
名媛妹妹 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:12

    Interestingly, the syntax highlighters in VIM don't support applying a syntax to identifiers or function names - at least not the syntax highlighters for C and C++. So, even if you do:

    :hi Function guifg=red
    

    or

    :hi Identifier guifg=red
    

    it doesn't give these a color. I just seems to be not much more than keywords and constants for these languages.

    Here, someone has started extending the cpp syntax file to support method names. It's a start I guess. http://vim.wikia.com/wiki/Highlighting_of_method_names_in_the_definition

提交回复
热议问题