How do I use vim as 'git show' editor?
Here is a Twitter post to solve that problem.
https://twitter.com/oliviergay/status/179692941063888896
Using
git show
withvim
and syntax highlighting:vimgitshow() { git show "$1" | vim - "+set filetype=${1##*.}"; }
You can use the following command:
PAGER='vim -' git -c color.ui=false show
This worked for me:
git config --global pager.show "vim -c '%sm/\\e.\\{-}m//g' -c 'set ft=diff' +1 -"
Crazy vim args found here: https://stackoverflow.com/a/17015531/610634