How do I use vim as 'git show' editor?

前端 未结 5 1649
深忆病人
深忆病人 2021-02-08 12:50

all as described in How do I use vim as 'git log' editor? doesn\'t work for git show . I use often

git show HEAD

ctrl+z 

ps 

  PID TTY          TIME CM         


        
5条回答
  •  故里飘歌
    2021-02-08 13:30

    Here is a Twitter post to solve that problem.

    https://twitter.com/oliviergay/status/179692941063888896

    Using git show with vim and syntax highlighting: vimgitshow() { git show "$1" | vim - "+set filetype=${1##*.}"; }

提交回复
热议问题