我如何使用vim作为'git show'编辑器?

Sér*_*gio 9 git vim

所有内容如何使用vim作为'git log'编辑器?不适用于git show.我经常使用

git show HEAD

ctrl+z 

ps 

  PID TTY          TIME CMD
 7083 pts/8    00:00:06 bash
31758 pts/8    00:00:00 git
31759 pts/8    00:00:00 less
31762 pts/8    00:00:00 ps
Run Code Online (Sandbox Code Playgroud)

更新我找到了解决方案:

git config --global pager.color false
git config --global pager.show 'vim -R -'
Run Code Online (Sandbox Code Playgroud)

"

小智 10

您可以使用以下命令:

PAGER='vim -' git -c color.ui=false show
Run Code Online (Sandbox Code Playgroud)