Vim: vim-fugitive
vim-fugitive
is a plugin to enable working directly with git from within Vim.
Another Tim Pope classic.
<leader>gs
Opens fugitive in a split below.
What is displayed is akin to the git status
command except you can navigate
the results and issue commands.
Some commands that I find useful:
g?
get help<cr>
open file in other windows
to stage/add a file or chunku
unstage-
toggle stage/unstageU
unstage everythingcc
create commitcw
reword last commit=
toggle inline diff (life changing)
And then the :Git
command, or just :G
for short, provides a number of
wrappers for the underlying git commands and also allows you to call any git
command.
:Git push
:Git pull
:Git blame
opens split to the left with commit and who made the commit for each line in the file:Git <args>
run any git command:Git -p <args>
run any git command and capture the output in a temp file
Resources
:help fugitive