Skip to content

Instantly share code, notes, and snippets.

@tonysneed
Last active June 14, 2024 04:16
Show Gist options
  • Save tonysneed/f9f09bfa28bcf98e8d8306f9b21f99e2 to your computer and use it in GitHub Desktop.
Save tonysneed/f9f09bfa28bcf98e8d8306f9b21f99e2 to your computer and use it in GitHub Desktop.
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@aamnah
Copy link

aamnah commented Feb 26, 2021

updated for Big Sur (doesn't run a script, picks the app's icon) https://gist.github.com/aamnah/9b66ab2462e1b50358455dbd3c9c2f0f

@cybersasi
Copy link

Thank you so much

@TugbaK0619
Copy link

Screen Shot 2021-10-27 at 8 45 19 PM

it dosen't work

@TugbaK0619
Copy link

Screen Shot 2021-10-27 at 8 46 47 PM

it dosen't work

@halataa
Copy link

halataa commented Nov 7, 2021

@adeguntoro
Copy link

wow...thanks man, still works with Mojave.

@posburn
Copy link

posburn commented Jun 28, 2023

This is great, thanks!

Copy link

ghost commented Nov 2, 2023

Brilliant! Thanks

@Tiisetso
Copy link

Still works in MacOS Sonoma Mar 2024. Thank you! The "Quick Action" tip from above still applies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment