vdegenne
vdegenne

Reputation: 13270

Change background of selected block

When I place my cursor on the extremity of a block (represented by the white drawn cursor on the picture below) VSC highlight both the ending and the starting symbol of that block.

enter image description here

The red line on the picture represent the starting and the ending of that block. Where can I set the option for VSC to automatically use a background color to highlight the current selected block ? (I am really more of a visual guy and I like to feel where's my current locations when I am coding.)

Upvotes: 0

Views: 579

Answers (1)

Mark
Mark

Reputation: 181639

You are going to need an extension to do that, it isn't built-in. Try:

Indented Block Highlighting

I am not sure it supports all languages but see if it works in your case.

Bracket-pair-colorizer does something similar but more subtle. See "bracket-pair-colorizer-2.showHorizontalScopeLine".

bracket-pair colorizer scope indicators.

And see How to change indent guide line color between brackets in VSCODE? - perhaps highlighting the active indent guide will be enough for you?

indent guide highlights

Using (in your settings.json):

"workbench.colorCustomizations": {

  "editorIndentGuide.background": "#bbb",
  "editorIndentGuide.activeBackground": "#f00e0e",\
}

Upvotes: 1

Related Questions