ruby-on-rails - 有没有好的macvim git diff?

标签 ruby-on-rails git textmate macvim

我已经使用 textmate 很多年了,我刚刚切换到 macvim,我一直使用 textmate 的一件事是命令 git df,在我的 .gitconfig 中它只是一个

的别名
[alias]
    df = !git diff | mate 

然后就是给了我一个这样的屏幕

enter image description here

mvim 中是否有替代品,我可以在某个地方添加它以获得类似的行为

最佳答案

我描述一下我用的是什么here .

基本上,将以下行添加到“~/.gitconfig”:

[diff]
    tool = default-difftool

[difftool "default-difftool"]
    cmd = default-difftool.sh $LOCAL $REMOTE

使用以下包装器脚本:

#! /bin/bash

if [[ -f /Applications/MacVim.app/Contents/MacOS/Vim ]]
then
    # bypass mvim for speed
    VIMPATH='/Applications/MacVim.app/Contents/MacOS/Vim -g -dO -f'
elif [[ -f /usr/local/bin/mvim ]]
then
    # fall back to mvim
    VIMPATH='mvim -d -f'
else
    # fall back to original vim
    VIMPATH='vimdiff'
fi

$VIMPATH $@

关于ruby-on-rails - 有没有好的macvim git diff?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10487703/

相关文章:

ruby-on-rails - 如何在 Postman 中使用 SendGrid 的 Inbound Parse Webhook 示例?

ruby - 如何更改 Textmate 使用的 Ruby 版本?

ruby-on-rails - Haml管道分隔的多行语句语法突出显示

ruby - 使用 Vim Rails,您可以创建一个新的迁移文件并一次性打开它吗?

ruby-on-rails - 使用 Ruby fastercsv,想将我的文件分成 1000 行

mysql - 如何在 Rails 中定义自定义 mysql 函数

ruby-on-rails - 给定 Rails 5 has_and_belongs_to_many,如何创建连接记录?

git - 如果依赖项尝试从 Internet 下载,如何配置代理?

git - git 的版本库根路径的语法是什么?

由于放弃的提交,Git merge 挂起