Last updated: Apr 6, 2024
Reading time·2 min

You can use a keyboard shortcut to reveal the current File in Explorer in VS Code:
Ctrl + Shift + E.Cmd + Shift + E.
You can view the Show Explorer / Toggle Focus keyboard shortcut for your operating system in this section of the docs.
Alternatively, you can use the Command Palette:
Ctrl + Shift + P (or Command + Shift + P on macOS).F1 to open the Command Palette.
You can also right-click on the name of the file at the top and select Reveal in Explorer View.

You can also right-click on the file in source control and select Reveal in Explorer View.

If you need to open the folder that contains the file, right-click on it and select Open Containing Folder.

The command might be Open in Finder, or something similar, on macOS.
If you need to set a keyboard shortcut for the Reveal file in Explorer command:
Ctrl + Shift + P on Windows and Linux.Command + Shift + P on macOS.F1 to open the Command Palette.

Enter.You can also click on the row and then click on the plus icon to set a keyboard shortcut.
For example, you can use a keyboard shortcut like Ctrl + F4 (or Cmd + F4
on macOS).

I've also written an article on how to collapse all folders in Explorer in VS Code.
You can learn more about the related topics by checking out the following tutorials: