Vim colour schema Jul 15 2017

When you see colours displayed on vim, they are defined by highlight rules, and they are applied to groups (in the example below the group is Normal, you can view all of them running: :so $VIMRUNTIME/syntax/hitest.vim) for example:

" Set the background colour to white 
:highlight Normal ctermbg=White
" Set the background colour to yellow
:highlight Normal ctermbg=Yellow
" Set the background colour to none(back to normal)
:highlight Normal ctermbg=0

Where are colours defined? you can check the value of each colour for x-term256 here

So for example, if we were to change the normal colour to 70 (or Chartreuse3), like this:

highlight Normal ctermfg=70

the colour 70 has this definition:

hi x070_Chartreuse3 ctermfg=70 guifg=#5faf00 "rgb=95,175,0

which would look like this: #5faf00

See what we did there?

Hope that this gives you insight into how vim highlight works. Here are a few links you might find useful:

** If you want to check what else I'm currently doing be sure to follow me on twitter @rderik or subscribe to the newsletter. If you want to send me a direct message you can send it to