3

Okay, I'm rather new to vim. I couldn't figure out how to change background colors. I'm editing my vimrc file to set these colors, but I couldn't find anything for background colors.

I'm using a color scheme and I just need to know how I could override it or what is to look for so I can change it in my colors/theme.vim file. I need to change two background colors. I point to them in the image attached.

I need to change these two colors

DavidVII
  • 2,133
  • 2
  • 21
  • 28
  • if you're using a vim colorscheme, you should have that colorscheme in your .vim folder, open the colorscheme file in vim and enjoy your changes. sorry I couldn't give you the specific field names, but at least you have a starting point – ermagana Aug 07 '13 at 04:09
  • Is this related to [this](http://stackoverflow.com/questions/1117526/specifying-the-vim-background-colour)? – abiessu Aug 07 '13 at 04:10
  • Perhaps, but I don't really know how to change those colors. I'm getting all sorts of results when I make changes – DavidVII Aug 07 '13 at 04:22
  • you can use `colorscheme` and `set background` in vimrc – How Chen Aug 07 '13 at 04:59
  • You may find [vivify](http://bytefluent.com/vivify) useful. – Tassos Aug 07 '13 at 07:29
  • possible duplicate of [How do I change the unused background color in vim?](http://stackoverflow.com/questions/17818652/how-do-i-change-the-unused-background-color-in-vim) – glts Aug 07 '13 at 09:13
  • Yep, looks like it was. Wish search had brought that up. The answer is `highlight NonText` – DavidVII Aug 07 '13 at 22:18

2 Answers2

3

As it turns out the big blue section is controlled by highlight NonText

I added my .vimrc file to this:

highlight NonText ctermfg=59 ctermbg=0 cterm=NONE guifg=#414e58 guibg=#232c31 gui=NONE

and that gave me exactly what I wanted.

DavidVII
  • 2,133
  • 2
  • 21
  • 28
0

VIM has some color scheme, which store under /usr/share/vim/vimcurrent/colors, and it named as desert.vim for example.

you can simply add one line in your vimrc file, which should be locate in your $HOME, if there is NOT, you can create one, and add:

colorscheme desert

also some command you can use to set the background color like:

set background=light

or

set background=dark

I think for SSH, light is better:) If you use X windows, I suggest to use bensday.vim, it can be download from web

How Chen
  • 1,340
  • 2
  • 17
  • 37