Skip to content

A Finder toolbar icon to open current selected file/folder with Sublime

Notifications You must be signed in to change notification settings

hamxiaoz/open-folder-with-sublime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

open-folder-with-sublime

A Finder toolbar icon to open current selected file/folder with Sublime.

How to use?

How to create the app manually?

Open AppleScript Editor, copy the following source and export as Application.

(*
 Open in Sublime Text
 To use:
  * Drag Open In Sublime Text 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 Sublime Text
on subl(listOfAliases)
	tell application "Sublime Text"
		activate
		open listOfAliases
	end tell
end subl

Credits:

Looking the same thing for VS Code?

Please see this repo open-folder-with-vs-code

About

A Finder toolbar icon to open current selected file/folder with Sublime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published