Fixing vim editor for dark backgrounds so comments are not dark blue

<img src="/img/2016/03/vim_logo.png" alt="vim_logo"> Here is a simple command that can fix your vim editor for dark backgrounds so that your comments are not showing up in dark blue (unreadable).

Example screenshot:

<img src="/img/2016/03/vim-example.png" alt="vim-example">

The temporary fix is to run the following command in the vim editor:


:set background=dark

instead of


:set background=light

The permanent fix for this is to add the command inside $HOME/.vimrc file

 set background=dark 

Please note that when you’re adding the property into the .vimrc file, you do not need to prefix it with “:”

Cheers