A- A+

Vs Code modify the color after selecting the same text or code

November 4, 2018 code No comments Read 7902 times

Visual studio code (vs Code) editor mouse cursor in the code, whether the same code is not very easy to see, less code is relatively easy, but more code is not easy to see at a glance. Fortunately, in addition to changing the theme of vs code, there is a better choice, that is, directly modify 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" //Changes the color of the selected text   
  3. }  

Copy the above code, then open the file - preferences - settings (shortcut key Ctrl +,) - and then open settings. JSON, as shown in the following figure. After pasting, it will take effect immediately without restarting.

My profile settings code

All selected after the save 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" , //The color of the editor active indent guide   
  14.          "editorBracketMatch.background" : "#515a6b94" , //Matches the background color of brackets   
  15.          "tab.activeBackground" "#454b58" , //Current tab background color   
  16.     }  
  17. }  

Leave me a message

All rights reserved

User login

Share with: