全部如How do I use vim as 'git log' editor?所述不适用于 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
更新我找到了解决方案:
git config --global pager.color false
git config --global pager.show 'vim -R -'
更好 (2021-02-05)
git config --global core.pager 'vim -R -'
最佳答案
您可以使用以下命令:
PAGER='vim -' git -c color.ui=false show
关于git - 如何使用 vim 作为 'git show' 编辑器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28048270/