VS Code: disable linking between open files and explorer

Visual Studio-Code

Visual Studio-Code Problem Overview


Can I disable the function link with editor in Visual Studio Code?

My project has a lot of files, so the explorer tree is long, but when I open an editor tab, this file will be auto focused on explorer panel. How can I disable that feature?

The same feature in eclipse:

This function in eclipse

Visual Studio-Code Solutions


Solution 1 - Visual Studio-Code

> Can I disable the function link with editor in visual code?

Yep, just add "explorer.autoReveal": false to your VS Code configuration.

Solution 2 - Visual Studio-Code

  1. CTRL+SHIFT+P , and open User Settings

enter image description here

  1. Type Auto Reveal in the search box

  2. Uncheck the auto reveal property as highlighted below

enter image description here

Solution 3 - Visual Studio-Code

Using VSCode in 2021

A solution similar as a Toggle Button is disabling the Auto Reveal, and choosing to Reveal when you desire, actually, it's better than a Toggle Button

Step 1:

Type: CTRL+, , and open User Settings
Or go to the menu File -> Preferences -> Settings

enter image description here

Type Auto Reveal in the search box

enter image description here

Step 2:

Click on file's tab with the right button and choose Reveal in Side Bar
And the file will be synchronized in the Explorer Side Bar

enter image description here

enter image description here



Adicional Step:

You can add a keyboard shortcut to use the keyboard to synchronize the editor window with file explorer:

enter image description here

Solution 4 - Visual Studio-Code

I found the combination of setting the "explorer.autoReveal" to false and installing the locate this document extension very productive.

locate this document extension vscode

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionQuan VoView Question on Stackoverflow
Solution 1 - Visual Studio-CodeFabian LauerView Answer on Stackoverflow
Solution 2 - Visual Studio-Codeuser4987870View Answer on Stackoverflow
Solution 3 - Visual Studio-CodedaniloView Answer on Stackoverflow
Solution 4 - Visual Studio-CodeIman MahmoudinasabView Answer on Stackoverflow