Add hunk previewing.

This commit is contained in:
Andy Stewart
2014-03-17 15:46:30 +01:00
parent 9c66906d56
commit 0ca3f7e3cd
5 changed files with 58 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ Features:
* Shows signs for added, modified, and removed lines.
* Ensures signs are always as up to date as possible (but without running more than necessary).
* Quick jumping between blocks of changed lines ("hunks").
* Stage/revert individual hunks.
* Stage/revert/preview individual hunks.
* Optional line highlighting.
* Fully customisable (signs, sign column, line highlights, mappings, extra git-diff arguments, etc).
* Can be toggled on/off.
@@ -103,6 +103,12 @@ nmap <Leader>ha <Plug>GitGutterStageHunk
nmap <Leader>hu <Plug>GitGutterRevertHunk
```
And you can preview a hunk's changes with `<Leader>hp`. You can of course change this mapping, e.g:
```viml
nmap <Leader>hv <Plug>GitGutterPreviewHunk
```
If you don't want vim-gitgutter to set up any mappings at all, use this:
```viml