Saturday, February 13, 2016

Vim: Change search syntax highlighter colour


When you search in Vim the results are highlighted
if the highlighting colour is wrong you cannot read the text.
There are two sets of default colour maps: One for a light and another one for a dark background.

If you have a black background, use the following command to get a better colour map for syntax highlighting:

:set background=dark

Likewise if you have a light background you would want to use the following command to get  a better colour scheme for the highlighter.

:set background=light

These commands can either be run inside of vim by going into command mode and entering them.
or you can add them to your .vimrc file

No comments: