首页 > 技术文章 > vscode设置终端主题,设置终端选中颜色

qungmu 2021-04-20 10:17 原文

vscode定义主题色官网:
https://code.visualstudio.com/api/references/theme-color#integrated-terminal-colors

问题:
  终端选中颜色和终端背景颜色一致时,不能显示出光标选中的内容,并且网上搜索了各种主题设置,没有提到终端选中属性的颜色

解决:
  通过查找vscode官方资料,找到terminal.selectionBackground属性,可以通过调整terminal.selectionBackground属性,设置终端选中内容的颜色

完整终端属性:
  terminal.background: The background of the Integrated Terminal's viewport.
  terminal.border: The color of the border that separates split panes within the terminal. This defaults to panel.border.
  terminal.foreground: The default foreground color of the Integrated Terminal.
  terminal.ansiBlack: 'Black' ANSI color in the terminal.
  terminal.ansiBlue: 'Blue' ANSI color in the terminal.
  terminal.ansiBrightBlack: 'BrightBlack' ANSI color in the terminal.
  terminal.ansiBrightBlue: 'BrightBlue' ANSI color in the terminal.
  terminal.ansiBrightCyan: 'BrightCyan' ANSI color in the terminal.
  terminal.ansiBrightGreen: 'BrightGreen' ANSI color in the terminal.
  terminal.ansiBrightMagenta: 'BrightMagenta' ANSI color in the terminal.
  terminal.ansiBrightRed: 'BrightRed' ANSI color in the terminal.
  terminal.ansiBrightWhite: 'BrightWhite' ANSI color in the terminal.
  terminal.ansiBrightYellow: 'BrightYellow' ANSI color in the terminal.
  terminal.ansiCyan: 'Cyan' ANSI color in the terminal.
  terminal.ansiGreen: 'Green' ANSI color in the terminal.
  terminal.ansiMagenta: 'Magenta' ANSI color in the terminal.
  terminal.ansiRed: 'Red' ANSI color in the terminal.
  terminal.ansiWhite: 'White' ANSI color in the terminal.
  terminal.ansiYellow: 'Yellow' ANSI color in the terminal.
  terminal.selectionBackground: The selection background color of the terminal.

推荐阅读