我如何使用vim作为'git show'编辑器? [英] How do I use vim as 'git show' editor?

查看:175
本文介绍了我如何使用vim作为'git show'编辑器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

完全如中所述,如何将vim用作' 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减
31762 pts / 8 00:00:00 ps

更新我找到了解决方案:

  git config --global pager.color false 
git config --global pager .show'vim -R - '

'



  PAGER ='vim  - ' git -c color.ui = false显示


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 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

Update I found the solution :

git config --global pager.color false
git config --global pager.show 'vim -R -'

'

解决方案

You can use the following command:

PAGER='vim -' git -c color.ui=false show

这篇关于我如何使用vim作为'git show'编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆