本文介绍了VS Code 中滚动条中的彩色像素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近开始使用 VS Code,我注意到滚动条中显示的彩色像素很少,如下所示:
I've recently started using VS Code, and I've noticed that there are little colored pixels that show up in the scroll bar like this:
它们似乎表明了有关源代码的某些内容,但我无法找到相关文档.所以我的问题如下:
They seem to indicate something about the source code, but I haven't been able to find the documentation for this. So my questions are as follows:
- 此功能的名称是什么?
- 记录在哪里?
- 可以禁用此功能吗?如果可以,如何禁用?
- 阅读@idleberg 的回答后,我将
scm.diffDecorations
设置为"none"
并重新启动 VS Code、重新打开文件等,但装饰仍然存在. - 我点击了 @Moffen 的回答中的链接,并将
"editor.hideCursorInOverviewRuler"
设置为true
,但事实证明控制不同的功能.此外,我已经将"editor.minimap.enabled"
设置为false
,但小地图与滚动条装饰的功能不同. - 我在 Ubuntu 18.04 上运行 VS Code 1.23.1 版.
- After reading @idleberg's answer, I set
scm.diffDecorations
to"none"
and restarted VS Code, reopened files, etc, but the decorations still persist. - I followed the link in @Moffen's answer and I set
"editor.hideCursorInOverviewRuler"
totrue
, but it turns out that controls a different feature. Also, I already had"editor.minimap.enabled"
set tofalse
, but the minimap is a different feature from the scrollbar decorations. - I'm running Version 1.23.1 of VS Code on Ubuntu 18.04.
推荐答案
该功能称为概览标尺.除了一些稀疏注释之外,我一直无法找到特定的文档:
The feature is called Overview Ruler. I've been unable to find specific documentation except some sparse notes:
如果您打开一个有错误或警告的文件,它们将与文本和概览标尺一起呈现.
相关设置包括:
// Controls if the cursor should be hidden in the overview ruler.
"editor.hideCursorInOverviewRuler": false,
// Controls if a border should be drawn around the overview ruler.
"editor.overviewRulerBorder": true,
// Controls the number of decorations that can show up at the same position in the overview ruler
"editor.overviewRulerLanes": 3
…还有一些可配置的颜色,这是最彻底的我找到的解释:
… but also some configurable colours, which is the most thorough explanation I've found:
此标尺位于右侧滚动条下方编辑器并概述编辑器中的装饰.
editorOverviewRuler.border
:概览标尺边框的颜色.editorOverviewRuler.findMatchForeground
:查找匹配的概览标尺标记颜色.颜色不能不透明以免隐藏底层装饰.editorOverviewRuler.rangeHighlightForeground
:突出显示范围的概览标尺标记颜色,如快速打开,符号文件和查找功能.颜色不能不透明以免隐藏底层装饰.editorOverviewRuler.selectionHighlightForeground
:选择亮点的概览标尺标记颜色.颜色不能不透明不要隐藏底层装饰.editorOverviewRuler.wordHighlightForeground
:符号高亮的概览标尺标记颜色.颜色不能不透明以免隐藏底层装饰.editorOverviewRuler.wordHighlightStrongForeground
:写访问符号突出显示的概览标尺标记颜色.颜色一定不能不透明以不隐藏底层装饰.editorOverviewRuler.modifiedForeground
:修改内容的概览标尺标记颜色.editorOverviewRuler. addedForeground
:添加内容的概览标尺标记颜色.editorOverviewRuler.deletedForeground
:已删除内容的概览标尺标记颜色.editorOverviewRuler.errorForeground
:错误的概览标尺标记颜色.editorOverviewRuler.warningForeground
:警告的概览标尺标记颜色.editorOverviewRuler.infoForeground
:信息的概览标尺标记颜色.editorOverviewRuler.bracketMatchForeground
:匹配括号的概览标尺标记颜色.
editorOverviewRuler.border
: Color of the overview ruler border.editorOverviewRuler.findMatchForeground
: Overview ruler marker color for find matches. The color must not be opaque to not hide underlying decorations.editorOverviewRuler.rangeHighlightForeground
: Overview ruler marker color for highlighted ranges, like by the Quick Open, Symbol in File and Find features. The color must not be opaque to not hide underlying decorations.editorOverviewRuler.selectionHighlightForeground
: Overview ruler marker color for selection highlights. The color must not be opaque to not hide underlying decorations.editorOverviewRuler.wordHighlightForeground
: Overview ruler marker color for symbol highlights. The color must not be opaque to not hide underlying decorations.editorOverviewRuler.wordHighlightStrongForeground
: Overview ruler marker color for write-access symbol highlights. The color must not be opaque to not hide underlying decorations.editorOverviewRuler.modifiedForeground
: Overview ruler marker color for modified content.editorOverviewRuler.addedForeground
: Overview ruler marker color for added content.editorOverviewRuler.deletedForeground
: Overview ruler marker color for deleted content.editorOverviewRuler.errorForeground
: Overview ruler marker color for errors.editorOverviewRuler.warningForeground
: Overview ruler marker color for warnings.editorOverviewRuler.infoForeground
: Overview ruler marker color for infos.editorOverviewRuler.bracketMatchForeground
: Overview ruler marker color for matching brackets.
这篇关于VS Code 中滚动条中的彩色像素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!