Customisable signs' symbols.

This commit is contained in:
Andy Stewart
2013-03-20 09:29:00 +01:00
parent 2a5ae179fc
commit e04d719159
3 changed files with 44 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ You can customise:
* The sign column's colours
* Whether or not the sign column is shown when there aren't any signs (defaults to no)
* The signs' colours
* The signs' colours and symbols
* Line highlights
* Whether or not vim-gitgutter is on initially (defaults to on)
* Whether or not line highlighting is on initially (defaults to off)
@@ -101,9 +101,9 @@ To change your sign column's appearance, update your colorscheme or `~/.vimrc` l
By default the sign column will appear when there are signs to show and disappear when there aren't. If you would always like the sign column to be there, add `let g:gitgutter_sign_column_always = 1` to your `~/.vimrc`.
#### Signs' colours
#### Signs' colours and symbols
To customise these, set up the following highlight groups in your colorscheme or `~/.vimrc`:
To customise the colours, set up the following highlight groups in your colorscheme or `~/.vimrc`:
```viml
GitGutterAdd " an added line
@@ -114,6 +114,15 @@ GitGutterChangeDelete " a changed line followed by at least one removed line
You can either set these with `highlight GitGutterAdd {key}={arg}...` or link them to existing highlight groups with, say, `highlight link GitGutterAdd DiffAdd`.
To customise the symbols, add the following to your `~/.vimrc`:
```viml
let g:gitgutter_sign_added = 'xx'
let g:gitgutter_sign_modified = 'yy'
let g:gitgutter_sign_removed = 'zz'
let g:gitgutter_sign_modified_removed = 'ww'
```
#### Line highlights
Similarly to the signs' colours, set up the following highlight groups in your colorscheme or `~/.vimrc`: