Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing vim 'gutter' color

Tags:

vim

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

like image 268
ale Avatar asked Mar 07 '13 17:03

ale


3 Answers

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
like image 200
Prince Goulash Avatar answered Nov 17 '22 13:11

Prince Goulash


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

enter image description here

The git-gutter docs have some other helpful suggestions.

like image 31
Peter Ajtai Avatar answered Nov 17 '22 15:11

Peter Ajtai


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

signs in number column

(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).

like image 16
apostl3pol Avatar answered Nov 17 '22 13:11

apostl3pol