What are the following two components that I need to target with syntax highlighting/rules?
The first one is the
int
(or more generall, any storage class) that I want to colorize. If currently have the following 'rule' in myc.vim
file, but it doesn't seem to do anything:hi StorageClass ctermfg=21 ctermbg=NONE cterm=bold guifg=#0000ff guibg=NONE gui=bold
Why aren't the closing braces recognized (it works with
(...)
but not{...}
)? How can I modify this rule to fix it?
int
toStorageClass
usingsyn keyword StorageClass int
. That adds the wordint
to the keyword groupStorageClass
. You can then define the highlighting parameters for that group like you have done. As for your second question, I'm not sure. – Vee Jan 19 at 19:22syn keyword StorageClass int
located above the highlight statement inc.vim
? – Vee Jan 19 at 20:07after/syntax
instead ofsyntax
. Thanks for the help! – David542 Jan 19 at 20:40