Skip to content

Instantly share code, notes, and snippets.

View dsiguero's full-sized avatar

Daniel Siguero dsiguero

View GitHub Profile

Applescript script to open current folder or selected items in Visual Studio Code

  1. Run Automator, File -> New and choose Application.
  2. Click Library -> Utilities and double click Run AppleScript.
  3. Paste the script from AppleScript section below.
  4. Save; if Automator tries to save to iCloud drive, better to save locally - save as VSCodeOpenerHelper.app to the Desktop and then move it to ~/Library/Services.
  5. Drag and drop VSCodeOpenerHelper.app onto the Finder toolbar while holding down the command key to place a toolbar launch icon. Note that the first time you launch there may be a security popup saying VSCodeOpenerHelper.app wants access... Click OK to all.
  6. To replace the generic Automator app icon with the Visual Studio Code icon, command+i (Get info) on the original Visual Studio Code application, select the application icon in the top left corner of the window and copy it (command+c). Then comm