Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In ~/.vim/syntax/c.vim

I added:

syn keyword cStructure final override

because I didn't know what keyword type to use.

Any recommendations for the correct type for these function modifiers?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

First of all, you should not modify the default syntax script itself; you'll run into problems when updating Vim. Rather, put your additions into ~/.vim/after/syntax/c.vim; this is sourced automatically after the default syntax.

Unless you plan to publish your extension or submit it as an enhancement to the original syntax's author, you can choose whatever pleases you. I would assign it to the Keyword group, which by default links to Statement.

:syn keyword cKeywords final override
:hi def link cKeywords Keyword
share|improve this answer
    
+1 tyvm - I didn't know about the after directory –  kfmfe04 Feb 20 '13 at 8:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.