3 votes

How can I extend syntax highlighting with my own keywords?

The correct filetype for JavaScript is javascript, so your file, which corresponds to a non-existing js filetpe, will never be sourced automatically. It should be: ~/.vim/syntax/javascript.vim Vim ...
romainl's user avatar
  • 39.2k
1 vote
Accepted

How to replace the default python syntax in Neovim without a plugin manager?

"plugins" subdirectory is meant for the scripts sourced upon Vim startup. You should not put all that random stuff there. Instead, buffer-specific scripts must be put under appropriately ...
Matt's user avatar
  • 20.4k
1 vote
Accepted

syntax coloring does not work for flex file

Out of the box, Vim doesn't know anything about "flex": it doesn't detect it and doesn't provide specific syntax highlighting for it. As a quick workaround, you can set the syntax to lex for ...
romainl's user avatar
  • 39.2k
1 vote

How can I extend syntax highlighting with my own keywords?

Your solution is already pretty close. However, there are three minor issues with it: The filetype for JavaScript is called "javascript", not "js". That's what your file is ...
Friedrich's user avatar
  • 1,199

Only top scored, non community-wiki answers of a minimum length are eligible