如何跳转到GIT difftool中的下一个/ prev diff?

Fac*_*alm 6 git vim difftool

我使用git difftool来比较VIM中的2个大文件.我只想导航到不同的行.

如何使用GIT difftool在不同的行之间快速导航?

我正在寻找类似winmerge快捷键的东西:
Alt + down - 下一步更改
Alt + Up - Prev Change

Lie*_*ers 14

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.
Run Code Online (Sandbox Code Playgroud)

  • 我决定使用 F5 和 F6,将这些行添加到 `.vimrc` 中: `noremap <F5> [c` 和 `noremap <F6> ]c` (2认同)