如何使用 textmate 查看 git diff
我的编辑器设置为 textmate,但是当我执行 git diff 时,它使用 vi 向我显示 diff 输出,有什么方法可以将其设置为在 textmate 中显示 diff 吗?
I have my editor setup to be textmate but when I do a git diff it uses vi to show me the diff output, is there any way to set it to show the diff in textmate?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我通常通过管道将内容进行匹配,如下所示:
I normally pipe the contents to mate like this:
使用
GIT_PAGER
环境变量指定使用哪个程序来显示多页输出。 您应该能够将其设置为指向文本伙伴。The
GIT_PAGER
environment variable is used to specify which program to use to show multi-page output. You should be able to set this to point to textmate.如果您安装了终端链接,那就很简单:
我个人有一个别名设置,将“diffmate”映射到该命令。
If you have the Terminal link installed it's simple:
I personally have an alias setup that maps 'diffmate' to that command.
另外,需要指出的是,在TextMate中,可以使用Bundles>>Diff来进行TextMate中的比较。
Also, it should be pointed out that, within TextMate, one can use Bundles>>Diff to perform the comparison within TextMate.