Add configuration option to disable key maps.

And add a little documentation.
This commit is contained in:
Andy Stewart
2014-01-13 11:01:14 +01:00
parent c680694b06
commit ae81dccb67
3 changed files with 51 additions and 8 deletions

View File

@@ -93,6 +93,12 @@ nmap <Leader>ha <Plug>GitGutterStageHunk
nmap <Leader>hu <Plug>GitGutterRevertHunk
```
If you don't want vim-gitgutter to set up any mappings at all, use this:
```viml
let g:gitgutter_map_keys = 0
```
Finally, you can force vim-gitgutter to update its signs across all visible buffers with `:GitGutterAll`.
See the customisation section below for how to change the defaults.
@@ -121,6 +127,7 @@ You can customise:
* The signs' colours and symbols
* Line highlights
* Extra arguments for `git diff`
* Key mappings
* Whether or not to escape `grep` (default to no)
* Whether or not vim-gitgutter is on initially (defaults to on)
* Whether or not signs are shown (defaults to yes)
@@ -197,6 +204,17 @@ If you want to pass extra arguments to `git diff`, for example to ignore whitesp
let g:gitgutter_diff_args = '-w'
```
#### Key mappings
To disable all key mappings:
```viml
let g:gitgutter_map_keys = 0`
```
See above for configuring maps for hunk-jumping and staging/reverting.
#### Whether or not to escape `grep`
If you have `grep` aliased to something which changes its output, for example `grep --color=auto -H`, you will need to tell vim-gitgutter to use raw grep: