Allow staging part of an additions-only hunk.

See #279.
This commit is contained in:
Andy Stewart
2019-08-12 17:19:05 +01:00
parent fef14f1d49
commit bc1d28db46
6 changed files with 109 additions and 6 deletions

View File

@@ -187,6 +187,11 @@ You can stage or undo an individual hunk when your cursor is in it:
* stage the hunk with `<Leader>hs` or
* undo it with `<Leader>hu`.
You can stage part of an additions-only hunk by:
* either visually selecting the part you want and staging with your mapping, e.g. `<Leader>hs`;
* or using a range with the `GitGutterStageHunk` command, e.g. `:42,45GitGutterStageHunk`.
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).