【发布时间】:2015-01-24 22:00:33
【问题描述】:
我正在使用 git difftool 比较 VIM 中的 2 个大文件。我只想导航到不同的行。
如何使用 GIT difftool 在不同的行之间快速导航?
我正在寻找类似 winmerge 快捷键的东西:
Alt+down - 下一个更改
Alt+Up - 上一个更改
【问题讨论】:
-
抱歉,我对 VIM 很陌生
我正在使用 git difftool 比较 VIM 中的 2 个大文件。我只想导航到不同的行。
如何使用 GIT difftool 在不同的行之间快速导航?
我正在寻找类似 winmerge 快捷键的东西:
Alt+down - 下一个更改
Alt+Up - 上一个更改
【问题讨论】:
vim 有一个广泛而非常好的帮助文件。尝试熟悉它会帮自己一个忙。
来自:h diff
3. Jumping to diffs *jumpto-diffs*
Two commands can be used to jump to diffs:
*[c*
[c Jump backwards to the previous start of a change.
When a count is used, do it that many times.
*]c*
]c Jump forwards to the next start of a change.
When a count is used, do it that many times.
【讨论】:
.vimrc : noremap <F5> [c 和 noremap <F6> ]c
] 和 [ 很难接触到,但它在很多地方都使用过 (tmux, vim, ctags),所以我决定加入他们,试图打败他们。