Syntax highlighting for JavaScript


#1

Hi!
My vim has preconfigured javascript syntax highlighting, but it’s not very good compared to the syntax highlighting on GitLab. How can I get GitLab-style javascript highlighting on my vim? Here’s a screenshot for comparison. GitLab is on the left, my terminal is on the right.

BTW I tried to follow the node.vim setup instructions, but it hasn’t changed the highlighting… maybe I did it wrong.


#2

Ok never mind. I found a syntax file and I figured out that vim keeps the file in /usr/share/vim/vim80/syntax. I just renamed the old syntax file and copied in the new one. It’s still not as good as the python highlighting, but it’s a slight improvement over the preconfigured javascript highlighting.


#3

I’ve switched to this pangloss syntax file. It’s more actively maintained.