4 ms·
This functionality is built-in to vim-fugitive and VS Code. In Fugitive, open it with :Git , select the unstaged file then press = . Select the desired ra
by tomodachi94 4y ago
This functionality is built-in to vim-fugitive and VS Code.
In Fugitive, open it with
:Git
, select the unstaged file then press
=
. Select the desired range with visual mode, then press
s
and commit as normal.
In VS Code, select a hunk, press Ctrl+P, then type "Stage Selected Range." Repeat this process and commit as normal.
Edit: formatting and typo.
- Hasnep 4y agoI commit small chunks so often that I have a keyboard shortcut set up for that "stage selected range" command in VSCode, definitely recommend it to get a more useful commit history.