On Monday, November 2, 2015 at 11:11:45 AM UTC+1, Jérôme Reybert wrote: > > Did you try the "D" command on the "Changes to be committed:" line in > > a fugitive :Gstatus window? That shows a unified diff of _all_ staged > > changes in _all_ files. > > I did know the 'D' command on files, but I did not know it was possible to > perform "D" (or even "p") command on "Changes not staged for commit:" or > "Changes to be committed:" lines. That is a nice feature indeed. > > > vimagit looks like a nice effort. But after watching the video, I > > don't see what's very different from using the `D` command on the > > "Changes to be committed:" line in a fugitive :Gstatus window. Are you > > sure you explored all of fugitive's functionality (some of which is a > > bit subtle)? > > D command on "Changes not staged for commit:" line seems to be a read only > feature (which is not not the case on file lines BTW). Then you can visualize > your whole repository changes to be staged, but you must go to another view > to stage them. You have at least choices: > 1- navigate through your modified/new/deleted files with Gstatus, type D, go > to diff window, choose your changes with dp/do, switch again to Gstatus > window to select another file. > 2- use 'git add --patch' with fugitive, by file or for all files (typing 'p' > on "Changes not staged for commit:" line). > > I feel that both method are not very efficient: > 1- You must switch among windows a lot, and you don't see the overall changes. > 2- I see two downsides with 'git add --patch' > - this is a one way process, I you forgot to stage something, or if you you > staged something you don't want, you must restart git add --patch. > - you are limited to stage by hunk. > > About the video, I made it intentionally short with a simple use case. Maybe > it does not highlight well the vimagit features. What vimagit brings new is: > > * it is more user friendly than git add --patch, because you see what you are > staging immediately, and it is more interactive. > * you can stage part of hunks (by visual selecting lines and stage selection > with 'S', marking lines with 'M' and stage with 'S', or adding single lines > with 'L'). > > You may argue that it is only two points. But it makes a fresh new workflow > to work with git. Then, maybe you won't like it, but give vimagit a try, and > let me know how you feel with this workflow.
It's always good to hear other people talk about the tools I use every day. Another titbit here: After seeing the episode about fugitive.vim's :Gdiff on Vimcasts.org I have altogether stopped using git add --patch. Open a diff with :Gdiff or D in the status window, then stage or unstage individual lines of your work copy/index copy with :diffget and :diffput. It's like git add --patch but interactive and as precise as you like. That episode is at http://vimcasts.org/e/33. I've never looked back. -- David -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
