【问题标题】:Better highlighting for current selection in diff viewer更好地突出显示差异查看器中的当前选择
【发布时间】:2018-05-25 05:43:12
【问题描述】:

我习惯于在提交任何内容之前检查我的所有更改。所以我主要是这样使用键盘的:

  • 打开文件差异查看器
  • 使用命令workbench.action.compareEditor.nextChange 的快捷方式浏览所有更改(在我的例子中是Alt+Down

不幸的是,当前“选定”的更改很难与所有其他更改区分开来,这使得这个工作流程有点麻烦:

我刚刚意识到我可以通过更改 editor.lineHighlightBackgroundeditor.lineHighlightBorder 来自定义它,但这会改变当前活动行在所有视图中的突出显示,这不是我想要的。

我可以以某种方式为差异视图自定义editor.lineHighlightBorder 吗?

类似:

"workbench.colorCustomizations": {
    "editorCursor.foreground": "#f9ae58",

    "[diff]": {
        "editor.lineHighlightBorder": "#fff",
    }
},

【问题讨论】:

    标签: visual-studio-code diff git-diff git-difftool


    【解决方案1】:

    在您的 colorCustomizations 中,只需输入“diff”(不带引号),您就会看到各种选项,例如:

    "diffEditor.removedTextBorder": "#ff0000",
    "diffEditor.removedTextBackground": "#ff0000",
    "diffEditor.insertedTextBackground": "#ff0000",
    "diffEditor.insertedTextBorder": "#ff0000",
    

    所以不,我认为您不能在 diffEditor 中更改当前选定的行。没有这样的选择。此外,colorCustomizations 不像其他设置那样支持特定于语言的设置。但也许使用上述四个选项会有所帮助?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-10-06
      • 1970-01-01
      • 1970-01-01
      • 2014-03-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多