Created
December 21, 2015 03:46
-
-
Save ctran/e9b7b7990c8f6ea9a089 to your computer and use it in GitHub Desktop.
Open selected folder in Sublime Text (Finder)
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
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 Sublime Text | |
on subl(listOfAliases) | |
tell application "Sublime Text" | |
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