I want to create a very simple vim syntax file that only highlights specific keywords
I saved a file called coffee.vim
in ~/.vim/syntax/
the file has syn keyword basicLanguageKeywords if then for in of do
in it
Am I on the right track?
Where do I go from here to actually use that simple vim syntax file?
You're nearly there. You need to specify the colouring of the basicLanguageKeywords type with a line such as:
(this tells the current colourscheme what to do with the keywords). Then, you can tell Vim to use this syntax by setting the filetype:
That should be all that's needed. If you want all files ending in .coffee to use this syntax file you can add something like
to your .vimrc.
Hope this helps.