After I’ve shown you Vim and explained the most essential commands, there is is another tip I’ll give to you. As described in the above linked article, Vim brings a really nice syntaxhightlighting implementation with it. Unfortunately, this is by default, depending on the file type and your monitor, difficult to read. So today I want to show you, how you can modify the Vim syntax highlighting scheme.
Change Vim syntaxhightlighting color scheme
Once you’ve opened Vim, you can change the color scheme with the “colo”-command.
As you can see, the color scheme is set off from the command mode. In this case, the command is “colo” followed by a space and the name of the color scheme you want to use. (If you like, you can use “colorscheme” instead of “colo”. “colo” is just a shortcut to “colorscheme”.)
If you want to get a list of the installed color schemes, then just type “colo ” and press Ctrl d – so you should get a list of all available schemes.
Change Vim default color scheme
To change the pre-selected default color scheme in Vim, it must be set up in the Vim config. This config file is called “.vimrc” and can be located in your home directory (~/). You can definde the color scheme in .vimrc as you would do it directly in Vim, with just one differece: leave the “:” at the beginning of the command away. To change the default color scheme to “murphy”, the following steps would be necessary.
In .vimrc you must add the following line or overwrite it (if it already exists).
To save your changes and close the config, type in :wq. Next time you start Vim now, your self-selected color scheme is used.