Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a quick way to stage change hunks shown by vim-signify without entering a diff mode?

I'm using vim-signify to see what changes exist in sources managed by git. I'd like to be able to easily stage those hunks, without having to open a separate diff view between the working copy and the index (as provided by fugitive's :Gdiff)…after all, I'm already looking at a diff in a sense!

(The same question would apply to anyone using a git/svn/hg/whatever gutter plugin, including vim-gitgutter and similar.)

Concretely, I guess I'm looking for the equivalent of fugitive's :Gwrite, if :Gwrite could take a range.

like image 590
cemerick Avatar asked Sep 03 '25 13:09

cemerick


1 Answers

vim-gitgutter now lets you stage/undo individual hunks with <Leader>hs and <Leader>hu (those mappings are configurable).

like image 120
Andy Stewart Avatar answered Sep 05 '25 04:09

Andy Stewart