3

I am trying to emulate the Atom JavaScript syntax highlighting in vim, but there are a few things missing.

Namely, I'd like to highlight objects and their chains in red. It'd be dandy if I could also highlight classes in yellow.

Here's what I'm seeing.

Vim

enter image description here

Atom

enter image description here

I am using this enhanced highlighting plugin https://github.com/pangloss/vim-javascript

  • 2
    you probably have to create your own syntax rules, you could start from the mentioned plugin. Note however, that is a magic of its own, and not to be recommended if you not really know Vim (and especially its regular expressions) very well – Christian Brabandt Feb 16 '18 at 21:22
0

Try plugin https://github.com/jaxbot/semantic-highlight.vim (see also the article).

To install (with Plug plugin manager), set in .vimrc

Plug 'jaxbot/semantic-highlight.vim'

Default colors fight with colorscheme I use (tender), so I set in vimrc colors to:

let g:semanticTermColors = [3,124,30,32,33,64,66,67,69,99,101,102,103,104,132,133,135,136,137,164,165,166,167,168,169,170,198,200]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.