How to open a folder using a terminal shortcut in VS Code

ProgrammingCouple
2 min readJan 17, 2024

--

Today I’m sharing with you a really useful shortcut for everyday use. I mean by that code command.

To make this command available in your terminal, just open a View => Command Palette => type code in the search bar => click on the option install ‘code’ command in PATH => and hit enter.

If you are on Mac, I suggest to open a Command Palette directly using the following shortcut:

Command + Shift + P

I have prepared a short tutorial on how to enable this shortcut in the code editor:

How to enable the ‘code’ command in the VS Code code editor
How to enable the ‘code’ command in the VS Code code editor

And here you have two examples of usage. First presents that you can put command code <folder_name> whenever you are in the target location of the folder you want to open via terminal.

Example of the shortcut usage: code <folder_name>
Example of the shortcut usage: code <folder_name>

The second one shows that you can type in the terminal the following command “code .”. The most important thing here is to be directly inside your target folder location like it is present in the GIF below.

Example of the shortcut usage: code <dot>
Example of the shortcut usage: code <dot>

I invite you to read my other articles.

Thank you for reading (and watching), let’s get applause 👏 and see you next time!

--

--