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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
syntax-highlighting × 744vimrc × 67
highlight × 60
colorscheme × 56
vimscript × 48
neovim × 45
regular-expression × 42
filetype × 25
filetype-tex × 23
filetype-markdown × 23
conceal × 21
folding × 20
color × 19
gvim × 18
terminal × 15
spell-checking × 15
filetype-python × 15
filetype-c × 13
filetype-html × 9
filetype-javascript × 9
indentation × 8
microsoft-windows × 8
plugin-system × 8
bash × 8
filetype-c++ × 8