-
-
Save tonysneed/f9f09bfa28bcf98e8d8306f9b21f99e2 to your computer and use it in GitHub Desktop.
- 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" |
Everybody, you can just go to applications and cmd+click VS Code's application onto the top bar, which will allow you to drag folders onto it to open them into VSCode. No automator necessary. This also works for iTerm2.
Feel like this one got overlooked, but is by far the best approach IMO. Thanks @mattwaler
Oh you are hero! Simple and powerful
This is great, thanks for your help!
Thanks for this!
Here's an update for Catalina, since Automator has changed a bit over time...
- Open Automator
- File -> New -> Quick Action
- Change "Workflow Receives current" 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"
After saving, it should be available on any folder in Finder under the menu Services
updated for Big Sur (doesn't run a script, picks the app's icon) https://gist.github.com/aamnah/9b66ab2462e1b50358455dbd3c9c2f0f
Thank you so much
it dosen't work
i had the same problem try this:
https://brianli.com/how-to-fix-automator-operation-not-permitted-error-in-macos-catalina/
wow...thanks man, still works with Mojave.
This is great, thanks!
Brilliant! Thanks
Still works in MacOS Sonoma Mar 2024. Thank you! The "Quick Action" tip from above still applies.
Feel like this one got overlooked, but is by far the best approach IMO. Thanks @mattwaler