Re:Mastering Bash and Terminal
by u801e on Saturday January 14, 2017 @05:04PM
(#13400833)
Regarding the last git command you listed, I actually find it better to do
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
Which reads the commit message from standard input.
[ Parent
| on HN ]
With tpope's fugitive.vim this is just :Gstatus and :Gcommit
That's interesting, why not just do `git commit` at the command line?
It'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).
Re:Mastering Bash and Terminal
by branchless on Saturday January 14, 2017 @09:18PM
(#13401960)
Vim users are breaking out to the shell to use git?
Try emacs with magit. It's really great.
It's easier to embrace the Unix philosophy when your text editor doesn't take a half hour to start.
Re:Mastering Bash and Terminal
by branchless on Sunday January 15, 2017 @10:38AM
(#13404447)
It 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.
I was replying with a glib remark because the suggestion to use emacs instead was stupid to begin with.
Re:Mastering Bash and Terminal
by branchless on Monday January 16, 2017 @08:22PM
(#13414478)
Vim users should check it out, even if only for inspiration for a clone.