Visual studio code 有没有办法改变文本的颜色?否则,当与配色方案中的每种颜色搭配时,您必须找到一种保持可读性的背景色。不幸的是,这是阻止我使用VS代码的两个问题之一…@brunobey如果打开“workbench.colorcomizations”:{}然后开始键入“编辑。选
Visual studio code 有没有办法改变文本的颜色?否则,当与配色方案中的每种颜色搭配时,您必须找到一种保持可读性的背景色。不幸的是,这是阻止我使用VS代码的两个问题之一…@brunobey如果打开“workbench.colorcomizations”:{}然后开始键入“编辑。选,visual-studio-code,Visual Studio Code,有没有办法改变文本的颜色?否则,当与配色方案中的每种颜色搭配时,您必须找到一种保持可读性的背景色。不幸的是,这是阻止我使用VS代码的两个问题之一…@brunobey如果打开“workbench.colorcomizations”:{}然后开始键入“编辑。选择,自动完成菜单将建议所有可能的键及其说明,包括选择前景。@Tobia感谢您的提示!我找到了,但我可能做错了什么。我将背景和前景都设置为红色,但是(我使用的是VS代码1.18.0)对于终端:“terminal.selectionBackgrou
有没有办法改变文本的颜色?否则,当与配色方案中的每种颜色搭配时,您必须找到一种保持可读性的背景色。不幸的是,这是阻止我使用VS代码的两个问题之一…@brunobey如果打开
“workbench.colorcomizations”:{}
然后开始键入“编辑。选择
,自动完成菜单将建议所有可能的键及其说明,包括选择前景。@Tobia感谢您的提示!我找到了,但我可能做错了什么。我将背景和前景都设置为红色,但是(我使用的是VS代码1.18.0)对于终端:“terminal.selectionBackground”:“#f1eeb3a9”
这似乎不适用于Python,设置selectionHighlightBackground
似乎不会影响vscode在突出显示变量或函数使用时使用的颜色(例如)不能将红色
或白色
作为值。giovannipds,它只是一个名称,表示您可以添加任何颜色名称,它不是值那是代码,所以它是错误的。红色
和白色
是网页颜色,因此可能会让人混淆..VS code-->文件-->首选项-->设置,然后搜索“workbench.colorCustomizations"…复制、粘贴、完成!这应该是答案。这些是VSCode版本1.3+编辑器中使用的设置。lineHighlightBackground似乎不再存在了,我想他们说它是故意删除的:很可能是。谢谢,几天来一直试图找到它,没有人提到过wordHighlightBackground!这应该是d标记为答案。10秒修复!我发现这些选项与此答案结合使用也很有用,可以一眼找到匹配项。请注意对RGBA的支持(在我的使用中,颜色值末尾的75 alpha设置:“editor.wordHighlightBorder”:“#00ff0075”,“editor.findMatchHighlightBorder”:“#00ff0075”谢谢你的提示,尼尔。我会试试。有人知道终端搜索中的匹配是如何实现的吗?谢谢你。我没有使用编辑器。findMatchBackground
,而是使用了编辑器。findMatchBorder
,我将其设置为\ff0000
(红色).Hi cssyphus.我很感激你想在这里鼓励向上投票,但大多数读者甚至都没有登录或拥有帐户,因此这实际上是一个针对相当少观众的建议。由于这是与技术内容无关的元建议,作为一名编辑,我的建议是删除它。我认为我们可以假设,已登录的读者将知道如何注册投票(如果我们发现一些不知道的人,我们可以在评论中建议他们)。你好,欢迎来到这里!请阅读,请考虑添加一个代码片段来说明如何使用这个扩展并详细说明它是如何解决问题的。
"workbench.colorCustomizations": {
"editor.selectionBackground": "#135564",
"editor.selectionHighlightBackground": "#135564"
},
"workbench.colorCustomizations": {
"editor.selectionBackground": "#f00", // red color hexadecimal code
"editor.selectionHighlightBackground": "#fff" // white hex code
},
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#<color1>",
"editor.selectionBackground": "#<color2>",
"editor.selectionHighlightBackground": "#<color3>",
"editor.wordHighlightBackground": "#<color4>",
"editorCursor.foreground": "#<color5>"
},
{
// Is git enabled
"git.enabled": true,
// Path to the git executable
"git.path": "C:\\Users\\t606964\\AppData\\Local\\Programs\\Git\\mingw64\\bin\\git.exe",
"workbench.startupEditor": "newUntitledFile",
// other settings
//
"editor.fontSize": 12,
"editor.tabSize": 2,
"git.confirmSync": false,
"workbench.colorTheme": "Monokai",
"editor.fontWeight": "bold",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"workbench.iconTheme": "vscode-icons",
"explorer.confirmDelete": false,
"files.autoSave": "off",
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#f00",
"editor.selectionBackground": "#0f0",
"editor.wordHighlightBackground": "#00f",
"editorCursor.foreground": "#ff0"
}
}
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#f00",
"editor.selectionBackground": "#0f0",
"editor.wordHighlightBackground": "#00f",
"editorCursor.foreground": "#ff0"
}
"workbench.colorCustomizations": {
"editor.findMatchBackground": "#00cc44a8", //Current SEARCH MATCH
"editor.findMatchHighlightBackground": "#ff7b00a1" //Other SEARCH MATCHES
}
"numberedBookmarks.lineBackground": "#007700"
{
"git.enableSmartCommit": true,
"git.autofetch": true,
"breadcrumbs.enabled": true,
"git.confirmSync": false,
"explorer.confirmDelete": false,
"code-runner.saveFileBeforeRun": true,
"code-runner.saveAllFilesBeforeRun": true,
"workbench.activityBar.visible": true,
"files.trimTrailingWhitespace": true,
"telemetry.enableTelemetry": false,
"scm.providers.visible": 0, //0 allows manual resize of the Source Control panels
"editor.renameOnType": true, //Added Aug 2020: renames matching HTML tags
"workbench.colorCustomizations": {
"editor.selectionBackground": "#e788ff7c", //Currently SELECTED text
"editor.selectionHighlightBackground": "#ff00005b", //Same content as selection
"editor.findMatchBackground": "#00cc44a8", //Current SEARCH MATCH
"editor.findMatchHighlightBackground": "#ff7b00a1", //Other SEARCH MATCHES
"numberedBookmarks.lineBackground": "#007700"
//Henry's tip goes here... (don't forget to add comma to line above)
}
}
Depending on your platform, the user settings file is located here:
Windows %APPDATA%\Code\User\settings.json
macOS $HOME/Library/Application Support/Code/User/settings.json
Linux $HOME/.config/Code/User/settings.json
"workbench.colorCustomizations": {
"editor.selectionHighlightBorder": "#FFFA",
},