Syntax highlighting for JavaScript

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.

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.

1 Like

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

1 Like
A free service run by Zed A. Shaw for