VSCode selects variable highlight color and comment color change

Article source: Vscode selects variable highlight color and comment color change

foreword

The default variable of vscode selects the global highlight, and it is impossible to see where the next variable is highlighted. . . . . .
As shown below.

insert image description here
The color of the frame is really unsatisfactory.
Process
Added a new method, no need to install plug-ins.

Old method:

(1) Install the plug-in: highlight-icemode
(2) Configure the plug-in: Open the user settings, find the highlight-icemode configuration item, and set the background color according to your preferences.
insert image description here
(3) Yellow is set here, check the results, and see if there are any.
insert image description here

new method:

Vscode actually comes with change items.

1. Just add the following fields in setting.json, the color can be customized and modified, just choose the color you like.

"workbench.colorCustomizations": {
    
    
	"editor.selectionBackground": "#d1d1c6",
	"editor.selectionHighlightBackground": "#c5293e"
}

The results are as follows, more nice.
insert image description here

2. Modify the comment color, also add in setting.json: you can choose the color you need

"editor.tokenColorCustomizations": {
    
    
	"comments": "#82e0aa" // 注释
}

insert image description here
that's all.

Guess you like

Origin blog.csdn.net/weixin_43921423/article/details/127383108