How to reveal current file in Explorer?

Visual Studio-CodeKeyboard ShortcutsMicrosoft File-Explorer

Visual Studio-Code Problem Overview


When I have a file opened, I'd like to have a shortcut to navigate to this file inside the EXPLORER, so that I can see where it is located.

How can I do this?

Visual Studio-Code Solutions


Solution 1 - Visual Studio-Code

In the command palette (F1), there is a Files: Reveal Active File in Side Bar command. You can assign a shortcut to it via the keyboard shortcuts editor:

Alternatively, you could try the Reveal extension which adds this button to editors:

It might make sense to disable auto-reveal when using this shortcut as a "manual reveal":

"explorer.autoReveal": false

Solution 2 - Visual Studio-Code

To show the active file in the Windows-Explorer or sidebar:

  • right-click on the file tab and choose 'reveal in explorer'/'reveal in side bar'

enter image description here

The keyboard shortcut for reveal in windows explorer is is ctrl K R

To show the file in the sidebar you can assign a custom code in the keybindings window:

enter image description here

Solution 3 - Visual Studio-Code

Just press Cmd + Shift + E and the explorer will show the file you are viewing.

Solution 4 - Visual Studio-Code

Wanted to add that the first answer still works, but that the text was slightly changed to "Reveal in Explorer View" from "Reveal file in sidebar"

enter image description here

and

right clicking on the tab

enter image description here

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
QuestionJim AhoView Question on Stackoverflow
Solution 1 - Visual Studio-CodeGama11View Answer on Stackoverflow
Solution 2 - Visual Studio-CodejpsView Answer on Stackoverflow
Solution 3 - Visual Studio-CodeKhaled AnnajarView Answer on Stackoverflow
Solution 4 - Visual Studio-CodeGauntView Answer on Stackoverflow