3 ms·
Regarding the last git command you listed, I actually find it better to do :r !git status -v And at the to of the result, type my formatted git commit mes
by u801e 10y ago
Regarding the last git command you listed, I actually find it better to do
:r !git status -v
And at the to of the result, type my formatted git commit message, visually highlight the message I just typed, and then use the following vim command
:r !git commit -F -
Which reads the commit message from standard input.
- fragmede 10y agoThat's interesting, why not just do `git commit` at the command line?
- u801e 10y agoIt's more of a way to be able to commit without having to exit or suspend vim. I typically type the commit message while checking the diff. If I find an error in the diff, I'll switch to the vim window with the file, correct the issue and run :!git add %, delete the original output of the git status -v command I ran earlier and I re-run that command (which I can pull up by using q: to bring up the vim command history window).
- branchless 10y agoVim users are breaking out to the shell to use git? Try emacs with magit. It's really great.
- hueving 10y agoIt's easier to embrace the Unix philosophy when your text editor doesn't take a half hour to start.
- branchless 10y agoIt has a daemon mode, so now you know. And from a flat start emacs takes less than 5 seconds on my pc which isn't that beefy.
- hueving 10y agoI was replying with a glib remark because the suggestion to use emacs instead was stupid to begin with.
- branchless 10y agoVim users should check it out, even if only for inspiration for a clone.
- lenkite 10y agoWith tpope's fugitive.vim this is just :Gstatus and :Gcommit