【问题标题】:How to alter context ("unified") on `git difftool`?如何更改`git difftool`上的上下文(“统一”)?
【发布时间】:2018-07-20 18:08:52
【问题描述】:

我尝试了-U9("--unified") 和git config --global diff.context - 它只影响git diff,但既不影响git difftool(我更喜欢vimdiff)也不影响git commit -p(由帅哥提交)。

【问题讨论】:

    标签: git git-diff vimdiff git-difftool


    【解决方案1】:

    将其添加到 .vimrc 中: :set diffopt=filler,context:9

    http://vimdoc.sourceforge.net/htmldoc/options.html#'diffopt' 上查看更多信息

    你也可以切换折叠:

    命令 zc 将关闭折叠(如果光标处于打开折叠中), zo 将打开折叠。使用 za 会更容易,它会切换当前折叠(如果它打开则关闭它,如果它关闭则打开它)。 来源:https://vim.wikia.com/wiki/Folding

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-24
      • 1970-01-01
      • 2019-07-05
      • 1970-01-01
      • 1970-01-01
      • 2020-12-27
      • 1970-01-01
      • 2022-11-12
      相关资源
      最近更新 更多