mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Set correct background on existing GitGutter* highlight groups
Previously if the user or the colourscheme had already defined GitGutter* highlight groups, the plugin would leave their backgrounds alone. This pushed the responsibility for figuring out and specifying the correct backgrounds onto the user or colourscheme maintainer. With this change the plugin now sets the correct background on existing GitGutter* highlight groups. Also, the documentation was simplified so it is clearer how to set your own colours for the signs.
This commit is contained in:
@@ -529,20 +529,14 @@ of the current window instead of the global quickfix list.
|
||||
===============================================================================
|
||||
HIGHLIGHTS *gitgutter-highlights*
|
||||
|
||||
To change the signs' colours, set up the following highlight groups in your
|
||||
colorscheme or |vimrc|:
|
||||
To change the signs' colours, specify these highlight groups in your |vimrc|:
|
||||
>
|
||||
GitGutterAdd " an added line
|
||||
GitGutterChange " a changed line
|
||||
GitGutterDelete " at least one removed line
|
||||
GitGutterChangeDelete " a changed line followed by at least one removed line
|
||||
highlight GitGutterAdd guifg=#009900 ctermfg=2
|
||||
highlight GitGutterChange guifg=#bbbb00 ctermfg=3
|
||||
highlight GitGutterDelete guifg=#ff2222 ctermfg=1
|
||||
<
|
||||
|
||||
You can either set these with `highlight GitGutterAdd {key}={arg}...` or link
|
||||
them to existing highlight groups with, say:
|
||||
>
|
||||
highlight link GitGutterAdd MyDiffAdd
|
||||
<
|
||||
See |highlight-guifg| and |highlight-ctermfg| for the values you can use.
|
||||
|
||||
To change the line highlights, set up the following highlight groups in your
|
||||
colorscheme or |vimrc|:
|
||||
|
||||
Reference in New Issue
Block a user