Update example maps to use g-based maps

This commit is contained in:
Andy Stewart
2019-09-05 18:36:39 +01:00
parent 7be1f83092
commit c5d2519cd5

View File

@@ -209,17 +209,17 @@ See the FAQ if you want to unstage staged changes.
The `.` command will work with both these if you install [repeat.vim](https://github.com/tpope/vim-repeat). The `.` command will work with both these if you install [repeat.vim](https://github.com/tpope/vim-repeat).
To set your own mappings for these, for example if you prefer the mnemonics hunk-add and hunk-revert: To set your own mappings for these, for example if you prefer `g`-based maps:
```viml ```viml
nmap <Leader>ha <Plug>(GitGutterStageHunk) nmap ghs <Plug>(GitGutterStageHunk)
nmap <Leader>hr <Plug>(GitGutterUndoHunk) nmap ghu <Plug>(GitGutterUndoHunk)
``` ```
And you can preview a hunk's changes with `<Leader>hp`. The location of the preview window is configured with `g:gitgutter_preview_win_location` (default `'bo'`). You can of course change this mapping, e.g: And you can preview a hunk's changes with `<Leader>hp`. The location of the preview window is configured with `g:gitgutter_preview_win_location` (default `'bo'`). You can of course change this mapping, e.g:
```viml ```viml
nmap <Leader>hv <Plug>(GitGutterPreviewHunk) nmap ghp <Plug>(GitGutterPreviewHunk)
``` ```
A hunk text object is provided which works in visual and operator-pending modes. A hunk text object is provided which works in visual and operator-pending modes.