infinite-soup
infinite-soup

Reputation: 21

Is there a way to highlight the file I'm currently working on in the vscode explorer sidebar?

I have a lot of files in my root folder, and I'd like to be able to easily pinpoint where the current file is located in the VScode Explorer sidebar.

The "File: Reveal Active File in Side Bar" command is almost what I need: it opens the Explorer sidebar and highlights the current root folder with a blue box. However, the entire root folder is highlighted, not the specific file, so I still have to hunt for it amid all the other subdirectories and files in that tree.

Is there a command or set of commands I could use to achieve this? Alternately, is there a setting I could change that keeps the active file highlighted in the sidebar all the time? I'd just like some sort of indicator to see exactly where in the tree my active file is located.

Upvotes: 2

Views: 3556

Answers (3)

add in settings.json

"workbench.colorCustomizations": {
    "list.inactiveSelectionBackground": "#fffb17",
}

reference: https://code.visualstudio.com/api/references/theme-color

Upvotes: 9

sansae
sansae

Reputation: 342

is there a setting I could change that keeps the active file highlighted in the sidebar all the time? I'd just like some sort of indicator to see exactly where in the tree my active file is located.

Was searching for this myself when I discovered the solution.

It sounds like what OP is looking for is Auto Reveal. Open your Settings: File > Preferences > Settings (or for a pc shortcut hold ctrl and press ,) and search for "explorer". Then under Explorer: Auto Reveal, select True or focusNoScroll.

With this option on, when you have multiple files open, each from different folders or projects, clicking on each tab (thereby making it the "active" file, which is what OP wanted) will automatically highlight the file in the Explorer column to the left of the editor.

Upvotes: 0

1y0una
1y0una

Reputation: 129

A small tip: in this picture:

enter image description here

please click "1" once, and then click "2" twice.

ctrl+shift+E

try it!

Upvotes: -1

Related Questions