Ubuntu: I want to add background color to vimrc but it's not working


I am forced to run this in my vim editor everytime I work.

highlight Normal ctermfg=grey ctermbg=black  

What I want is for this to be automatic, I already have background set to dark but nothing is happening in vimrc. What should I do? Vimrc contents (first few lines)

syntax on  set background=dark  set ruler                     " show the line number on the bar  set more                      " use more prompt  set autoread                  " watch for file changes  set number                    " line numbers  



In .vimrc, replace

set background=dark  


highlight Normal ctermfg=grey ctermbg=black  


If you make the changes permanently that you did in Vim then you have to write the code in .vimrc then open the .vimrc file and then place this line

set background=dark  

and then save & close . then open the Vim and you will see the changes.


Notice that you can right-click on the terminal window - "Profiles" - "Profiles Preferences" - "Colors".

You can add it from .vimrc with set background=dark

Good luck

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »