现在,它是一个模糊的灰色覆盖,这是很难看到。有办法改变默认颜色吗?
当前回答
你试过使用/添加扩展文本标记(高光)由Ryuichi Inagaki ??
你可以选择/高亮一个选择块,右键单击Toggle highlight来给它一个独特的颜色,然后继续和重复其他选择块,给它们每个不同的颜色,这是我发现最有用的!
其他回答
你可以用你喜欢的颜色来改变它:
步骤
开放可视代码 转到文件菜单 参数设置—>设置
打开Settings后,您将在右侧栏中更新您的设置,将此代码复制并粘贴到主括号{…}
"workbench.colorCustomizations": {
"editor.selectionBackground": "#f00", // red hexadecimal code
"editor.selectionHighlightBackground": "#fff" // white hex code
},
正如我测试过的那样,设置边框颜色比设置背景颜色更容易阅读,这正是Sublime Text所做的。
例如,在settings.json中添加这些行:
"workbench.colorCustomizations": {
"editor.selectionHighlightBorder": "#FFFA",
},
选中的单词将会像这样显示:
如果有人发现这一点,像我一样,无法得到上述配置工作尝试这样做。
去>文件首选>设置 在搜索编辑器中输入令牌颜色自定义 在编辑器令牌颜色自定义标题下 单击settings.json中的edit 在右边的列中选择user Settings 将其粘贴到json对象中
确保用你想看到的颜色替换#。
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#<color1>",
"editor.selectionBackground": "#<color2>",
"editor.selectionHighlightBackground": "#<color3>",
"editor.wordHighlightBackground": "#<color4>",
"editorCursor.foreground": "#<color5>"
},
我对上述配置的理解。
编辑器。lineHighlightBackground -当你点击一条线时,这是线背景的颜色。
“编辑器。selectionBackground" -你用光标选择的单词的背景。
“编辑器。selectionHighlightBackground" -这是文件中其他地方选择的背景,与您用光标选择的单词相匹配。想想一个名为foo的变量,它在整个文件中都被使用。然后用光标选择一个“foo”,页面上所有其他的“foo”将是这个变量中指定的颜色。
“编辑器。wordHighlightBackground" -如果点击默认的高亮单词不生效,这是所选文本的颜色。我只看到当你点击一个没有自动选择的单词时,这个值才会有所不同。
editorCursor。前景色——这是你光标的颜色。
你也可以改变选择/搜索的边界,看看下面的配置,其中包含了在这个线程中已经找到的其他值:
"workbench.colorCustomizations": {
"editor.selectionBackground": "#e788ff7c",
"editor.selectionHighlightBackground": "#ff00005b",
"editor.selectionHighlightBorder": "#fbf300e0", ##border when you select
"editor.findMatchBackground": "#f352fe8f",
"editor.findMatchHighlightBackground": "#8e52fe9e",
"editor.findMatchHighlightBorder": "#fbf300e0" ##border when you search for something
}
在“编辑器:令牌颜色自定义”设置中添加以下行。json文件。
"workbench.colorCustomizations": {
"editor.selectionBackground": "#135564",
"editor.selectionHighlightBackground": "#135564"
},
有关更多选项,请参阅主题颜色参考
推荐文章
- 打开同一目录两次
- 如何从终端/命令行调用VS代码编辑器
- 如何在Visual Studio代码中重置设置?
- 如何将制表符转换为空格,反之亦然,在现有的文件
- 错误:'types'只能在.ts文件中使用- Visual Studio Code使用@ts-check
- Visual Studio Code: .git文件夹/文件隐藏
- Visual Studio Code:如何调试Python脚本的参数
- 如何在Visual Studio代码中触发参数提示?
- 在VS Code中禁用“Comments are not allowed In JSON”错误
- 使用正则表达式搜索和替换Visual Studio代码
- 如何缩进/格式选择的代码在Visual Studio代码?
- 如何禁用预览文件与点击在vs代码?
- Visual Studio代码更改文件资源管理器托盘的字体大小?
- 如何防止Visual Studio Code总是重新打开以前的文件或文件夹?
- VSCode单引号到双引号自动替换