Skip to main content
added 260 characters in body
Source Link

git supports the following command

:w !git diff --no-index -- % -

map it to a command by adding the following to your ~/.vimrc

command GitDiff execute "w !git diff --no-index -- % -"

Now executing :GitDiff becomes a handy little command to quickly show the diff before each save.

git supports the following command

:w !git diff --no-index -- % -

git supports the following command

:w !git diff --no-index -- % -

map it to a command by adding the following to your ~/.vimrc

command GitDiff execute "w !git diff --no-index -- % -"

Now executing :GitDiff becomes a handy little command to quickly show the diff before each save.

Source Link

git supports the following command

:w !git diff --no-index -- % -