Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VIM initial settings: change background color for line number on the left side?

Tags:

vim

I use _vimrc to configure my vim 7.2 (windows) default settings. One setting "set number" will display line numbers on the left side. My vim background color is white (I cannot find setting for this. Maybe the default is white. Anyway I accept this setting).

I would like the background color for line numbers to be Grey or dimmed color. What is the command I can put in my _vimrc to configure this default setting?

like image 625
David.Chu.ca Avatar asked Oct 30 '08 15:10

David.Chu.ca


People also ask

How do I highlight line numbers in vim?

How do I highlight line numbers in vim? Simply putting :set cursorline in your vimrc will highlight the current line in every window and update the highlight as the cursor moves. With the default backslash leader key, typing \c will toggle highlighting on and off.

How do I change the background color in vim?

The ctermfg=white is used to set the foreground color to white in a terminal text editor. Finally, the ctermbg=black is used to set the background color to black in a terminal text editor.

How do I change the highlight color in vim?

You can change color schemes at anytime in vi by typing colorscheme followed by a space and the name of the color scheme. For more color schemes, you can browse this library on the vim website. You can enable or disable colors by simply typing "syntax on" or "syntax off" in vi.

How do I make my vim background darker?

In Vim, if your color scheme supports both a light and dark mode, you switch between by using the command: set background=dark or set background=light .


1 Answers

highlight LineNr ctermfg=grey ctermbg=white 
like image 118
robert Avatar answered Nov 02 '22 01:11

robert