A- A+

VS Code modifies the color after selecting the same text or code.

04 November 2018 Code No comment Read 3698 times

Visual Studio Code (VS Code) editor mouse cursor in the code, the same code is not very easy to see, less code is still relatively easy, but a lot of code is not easy to see at a glance. Fortunately, VS Code has a better choice besides changing the theme, that is, directly modifying the color after selecting the same code.

How to modify it?

To customize the software theme color, the official gives a very detailed code, detailed reference. Https://code.visualstudio.com/docs/getstarted/theme-color-reference

Here's how to use it.

  1. "Workbench.colorCustomizations" {
  2.      "Editor.selectionBackground" : "#aa0000" / / modify the color of the selected text.  
  3. }

Copy the above code, then open the file - preferences - settings (shortcut key Ctrl+,) - then open settings.json, as shown in the following figure. Ctrl+s is saved after pasting, and it will take effect immediately without restart.

My configuration file setup code

Save after the selected coverage can be used for reference only.

  1. {
  2.      "Git.ignoreMissingGitWarning" : True ,
  3.      "Breadcrumbs.enabled" : True ,
  4.      "Workbench.colorTheme" : "One Dark Pro" ,
  5.      "Editor.fontFamily" : "Mononoki, Consolas,'Courier New', monospace" ,
  6.      "Editor.renderLineHighlight" : "None" ,
  7.      "Editor.lineHeight" 18.
  8.      "Editor.roundedSelection" : False ,
  9.      "Editor.fontSize" 14.
  10.      "Workbench.colorCustomizations" {
  11.          "Editor.selectionHighlightBorder" : "#8e7f8200" , / / select the border color of the content.  
  12.          "Editor.selectionHighlightBackground" : "#4c4a4b98" , / / select the background color of the content.  
  13.          "EditorIndentGuide.activeBackground" : "#81868d" , / / editor activity indent the color of the reference line.  
  14.          "EditorBracketMatch.background" : "#515a6b94" , / / match the background color of brackets.  
  15.          "Tab.activeBackground" : "#454b58" , / / the background color of the current tab  
  16. }
  17. }

Leave a message for me.

Copyright, old madman reserves all rights.

User login

Share to: