[#Script #Coding] Open VS Code from Finder in macOS

Spread the love

Open VS Code from Finder in macOS

By codeSTACKr
Published: Mar 17, 2023

codeSTACKr Become A VS Code SuperHero Today: https://vsCodeHero.com

Join my Discord developer community: https://discord.gg/A9CnsVzzkZ

Want to quickly open a file or folder in VS Code from Finder in MacOS?

Add a quick action:
– Open the Shortcuts App
– Select “Quick Actions”
– Add a new action
– Change “Receive Any” to “Receive Files and Folders”
– From the right menu under Categories, choose Scripting and add “Run Shell Script”

Permissions may need to be added.
– Enter this script: open -n -b “com.microsoft.VSCode” –args “$*”
– For the Input choose Folder as the Type and Get the File Path
– Pass input: as arguments
– Name the Quick Action “Open with Code”

Now, when you right-click any folder or file in Finder, you’ll get this quick action to open it in VS Code.

Spread the love
Proudly powered by WordPress
Creative Commons License
EricBrooks.Com® is licensed under a Creative Commons License.

Disclaimer: The views expressed herein are solely those of Eric Brooks. They do not necessarily reflect those of his employers, friends, contacts, family, or even his pets (though my cat, Puddy, seems to agree with me on many key issues.). In accordance to my terms of use, you hereby acknowledge my right to psychoanalyze you, practice accupuncture, and mock you incessantly with every visit. As the user, you also acknowledge that the author has been legally declared a "Problem Adult" by the Commonwealth of Pennsylvania, and is therefore not responsible for any of his actions. ALSO, the political views and products advertised on this site may/may not reflect the views of Puddy or myself, so please don't take them as an endorsement. We just need to eat.