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

vim_logoHere 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:

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