Skip to content

Instantly share code, notes, and snippets.

@heyAyushh
Created October 24, 2019 14:43
Show Gist options
  • Save heyAyushh/384d1c1270ef3dc5a7c4df9414ffb449 to your computer and use it in GitHub Desktop.
Save heyAyushh/384d1c1270ef3dc5a7c4df9414ffb449 to your computer and use it in GitHub Desktop.
Open in VSCode Insiders from Finder application macOS
(*
Open in VS Code
To use:
* Drag Open In VS Code to the toolbar of any finder
window to add it to the toolbar
*)
on run
tell application "Finder"
if selection is {} then
set finderSelection to folder of the front window as string
else
set finderSelection to selection as alias list
end if
end tell
subl(finderSelection)
end run
-- script was drag-and-dropped onto
on open (theList)
subl(theList)
end open
-- open in VSCode
on subl(listOfAliases)
tell application "Visual Studio Code - Insiders"
activate
open listOfAliases
end tell
end subl
@heyAyushh
Copy link
Author

open Apple Script Writer.
export as application.
In finder window hold command+option and drag the exported application.

click to launch

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