Reveal current file in Explorer in Visual Studio Code

Jim Aho picture Jim Aho · Jun 30, 2017 · Viewed 15.2k times · Source

When I have a file open, 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?

Answer

Gama11 picture Gama11 · Jun 30, 2017

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