VSCode Setup for macOS
- Download Visual Studio Code from the official website
- Drag the application into your Applications folder
- Launch VSCode
To enable running VSCode from the Terminal
- Open VSCode Command Palette (⇧⌘P / Shift+Cmd+P)
- Type “Shell”
- Select “Shell Command: Install ‘code’ command in PATH”
After setup, you can use commands like:
code . # Open current directory in VSCode
code file.txt # Open a specific file in VSCode
code -r . # Open current directory in the existing VSCode window
To add “Open in VSCode” to Finder Context Menu
- Open Automator (from Applications or using Spotlight)
- Create a new Quick Action workflow
- Configure the workflow settings:
- Workflow receives: files and folders
- In: Finder
- Add a Run Shell Script action (search in the library)
- Set the shell to /bin/bash
- Use the following script:
for f in "$@" do open -a "Visual Studio Code" "$f" done
- Save the workflow as “Open in Visual Studio Code”
Now you can right-click on files or folders in Finder and select “Open in Visual Studio Code” from the Quick Actions menu.
Settings Sync (Built-in)
VSCode has a built-in settings sync feature that allows you to synchronize your settings, extensions, and keybindings across different machines. To enable it:
- Click on the account icon in the bottom-left corner
- Select “Turn on Settings Sync”
- Choose which settings to sync (extensions, themes, keybindings, etc.)
macOS Keyboard Shortcuts
- ⌘P - Quick Open, Go to File
- ⇧⌘P - Command Palette
- ⌥⌘F - Replace in files
- ⌘B - Toggle sidebar
- ⌃` - Toggle integrated terminal