mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-08 11:33:48 -05:00
Update example maps to use g-based maps
This commit is contained in:
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user