1
yangg 2011-12-02 21:02:44 +08:00
同问,我的macvim也一样,
|
2
Rice 2011-12-02 21:16:54 +08:00
好像要在vimrc里加一段代码
|
4
Rice 2011-12-02 21:22:58 +08:00
@coderoar 我是直接copy网上的。不知道代码是干什么的。
set diffexpr=MyDiff() function MyDiff() let opt = '-a --binary ' if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif let arg1 = v:fname_in if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif let arg2 = v:fname_new if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif let arg3 = v:fname_out if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif let eq = '' if $VIMRUNTIME =~ ' ' if &sh =~ '\<cmd' let cmd = '""' . $VIMRUNTIME . '\diff"' let eq = '"' else let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' endif else let cmd = $VIMRUNTIME . '\diff' endif silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq endfunction |
5
yangg 2011-12-02 21:24:23 +08:00
ls代码是设置diff的,比较文件用的,跟这个没关系,
|
6
xell 2011-12-02 23:21:55 +08:00
也许帮助中的 :h digraph 有相关的说明?
|