# Open a file/folder in VSCode from the Terminal

> A Note on the Series:

> Fast Fridays 🏎   is a series where you will find fast, short and sweet tips/hacks that you may or may not be aware of. I will try to provide these (fairly) regularly on Fridays.


Have you ever been traversing through the terminal and want to open up a particular file or folder in VSCode? The long way to do this is to open up the editor, find the folder where the file is located, and then open the file. Well, there's actually a quicker way to do this with just a few configuration steps.

### Configure via the Command Palette
1. Open up Visual Studio Code
2. Press <kbd>CMD</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Mac) or <kbd>CTRL</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> (Windows) to open up the command palette
   - Alternatively, you can do **View --> Command Palette** from the toolbar.
3. Type **shell command** in the input and you should see the following options:

![shell-command.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1598548861939/PRiS4k6wX.png)

4 . Select "**Install 'code' command in PATH**"

 5 . Restart your terminal

After these steps you should now be able to run the following commands in the terminal:
1.  `code <file_name>` --> Opens VSCode with the specified file. 
2. `code .` --> Opens VSCode with the current directory you are in.

![Image.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1598572249608/kD9WqzCMf.gif)


### Resources
- https://code.visualstudio.com/docs/setup/mac
