Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 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

Your Answer


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.