Changing vim 'gutter' color
VimVim Problem Overview
See the screenshot of how I have vim configured below. The 'gutter' i.e. where the '+' and '~' symbols appear show my git status using this amazing sublime text port for vim: https://github.com/airblade/vim-gitgutter
How do I change the color of the gutter where there are no '+'/'~' symbols? I.e. the grey part? This is how you change the number column: https://stackoverflow.com/questions/250652/vim-initial-settings-change-backgound-color-for-line-number-on-the-left-side but I can't find how to change the 'gutter' color.
Any ideas?
Many thanks.
Vim Solutions
Solution 1 - Vim
This "gutter" is called the signs column. (See :help signs
for more information.) The highlight group associated with this column is called SignColumn
, and can be set like this (using the example from the help section):
:highlight SignColumn guibg=darkgrey
Solution 2 - Vim
To change the color in your ~/.vimrc
so that your gutter is the same color as where your line numbers show up is the following:
highlight clear SignColumn
The git-gutter docs have some other helpful suggestions.
Solution 3 - Vim
Another option that hasn't been mentioned is to eliminate the sign column entirely and put the signs into the number column.
Adding this to your ~/.vimrc
set signcolumn=number
produces
(this is using custom symbols with the Ale plugin in iterm Vim).
This is available in "full" Vim versions 7.4.2201 or newer that include the +signs
feature (I use the version installed by Homebrew on MacOS).
Solution 4 - Vim
From the screenshot, I think you're using https://github.com/altercation/vim-colors-solarized/ as your colorscheme, as I was. Another solution for this particular case is to switch to https://github.com/ericbn/vim-solarized, as @altercation's version has a bunch of open PRs fixing that very issue and no changes in the last decade.