How to Open a Folder in VSCode from Command Line Interface (CLI)
Nov 27, 2023
Did you know that you can navigate to within your folder with Terminal (what the CLI is called for Mac users), and type code .
to open that folder in VSCode?
Every time I want to do this again, I struggle to find the right search terms for it. So I’ve decided to add the link to the instructions here:
Summary:
- Cmd+Shift+P: “Shell command: Install ‘code’ command…”
2. Close VSCode
3. Open Terminal, ls
and cd
into the folder you want to open
3. code .
to open the entire folder in VSCode and voila!
Note: Can also type code nameOfFolder
from parent directory.