Created
October 24, 2019 14:43
-
-
Save heyAyushh/384d1c1270ef3dc5a7c4df9414ffb449 to your computer and use it in GitHub Desktop.
Open in VSCode Insiders from Finder application macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
open Apple Script Writer.
export as application.
In finder window hold command+option and drag the exported application.
click to launch