在差异查看器中更好地突出显示当前选择

编程入门 行业动态 更新时间:2024-10-25 20:26:55
本文介绍了在差异查看器中更好地突出显示当前选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

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

I'm used to check all my changes before committing anything. Therefore I mainly use the keyboard this way:

打开文件差异查看器使用命令 workbench.actionpareEditor.nextChange 的快捷方式来浏览所有更改(在我的情况下为 Alt+Down) Open the files diff-viewer Use shortcut for command workbench.actionpareEditor.nextChange to navigate through all changes (Alt+Down in my case)

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

Unfortunately the currently "selected" change is very hard to distinguish from all others, which makes this workflow a little cumbersome:

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

I just realized that I could customize this by changing editor.lineHighlightBackground or editor.lineHighlightBorder but this would change the highlighting of the currently active line in all views which is not what I want.

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

Can I somehow customize editor.lineHighlightBorder only for the diff view?

类似于:

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

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

推荐答案

在您的 colorCustomizations 中只需键入diff"(不带引号),您将看到各种选项,例如:

In your colorCustomizations just type "diff" (without the quotes) and you will see various options like:

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

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

So no I don't think you can change the currently selected line only in the diffEditor. There is no such option. Also, the colorCustomizations do not support the language-specific settings like the other settings do. But maybe playing with the four options above will help?

这篇关于在差异查看器中更好地突出显示当前选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-27 04:41:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1148585.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:器中   差异   更好地

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!