News for hackers. Stuff that matters.
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

    :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.
Re:Mastering Bash and Terminal by lenkite on Sunday January 15, 2017 @04:40AM (#13403255)
With tpope's fugitive.vim this is just :Gstatus and :Gcommit
Re:Mastering Bash and Terminal by fragmede on Saturday January 14, 2017 @07:52PM (#13401632)
That's interesting, why not just do `git commit` at the command line?
Re:Mastering Bash and Terminal by u801e on Saturday January 14, 2017 @08:55PM (#13401889)
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.

Re:Mastering Bash and Terminal by hueving on Sunday January 15, 2017 @10:19AM (#13404348)
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.
Re:Mastering Bash and Terminal by hueving on Monday January 16, 2017 @05:55PM (#13413767)
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.