- 下载highlight-words插件
- 在settings.json文件中添加以下代码
路径:(文件>首选项>设置>打开设置(json) 图标在右上角)
"highlightwords.colors": [
{ "light": "#b3d9ff", "dark": "cyan" },
{ "light": "#e6ffb3", "dark": "pink" },
{ "light": "#b3b3ff", "dark": "lightgreen" },
{ "light": "#ffd9b3", "dark": "magenta" },
{ "light": "#ffb3ff", "dark": "cornflowerblue" },
{ "light": "#b3ffb3", "dark": "orange" },
{ "light": "#ffff80", "dark": "green" },
{ "light": "#d1e0e0", "dark": "red" }
],
"highlightwords.box": {
"light": false,
"dark": true
},
"highlightwords.defaultMode": {
"default": 0
},
"highlightwords.showSidebar": {
"default": true
}
- ctrl+shift+p打开命令窗口,搜索Highlight Toggle Current命令,此命令可高亮选中的单词。其他命令见插件简介usage部分。
- 设置高亮快捷键,点击命令窗口Highlight Toggle Current右侧齿轮,添加快捷键如 ctrl+F8,点击回车保存之后可以使用此快捷键高亮显示或取消高亮