Works fo me, thanks Brett!
TextMate in Path Finder
Note: This post is over a year and a half old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
I claimed in my last post that Path Finder had great integration with TextMate, and it does to an extent. However, I had forgotten that it takes quite a bit of fiddling to get any kind of decent project management out of the context menus (and some more third party applications). So to try to avoid that I put together this applescript (see below). Paste it into Script Editor and save it as an application in ~/Library/Scripts/Applications/Path Finder. If you want a pretty icon for it, find the TextMate application in your Applications folder and open an info window and highlight the small icon at the top left and hit ⌘-C. Then open the info window for your new script application and highlight the script icon and press ⌘-V. Now just drag it into the menu bar at the top of a Path Finder window.
The script allows you to select a single directory and open it as a project, or open a single file. If you select multiple files or folders it will create a project from those files. Just highlight your selection and click the icon.
-
tell application “Path Finder”
-
set selection_list to selection
-
set ThePath to ””
-
if the (count of selection_list) = 1 then
-
set theItem to the first item of selection_list
-
set ThePath to quoted form of (POSIX path of the theItem as string)
-
else
-
set file_list to ””
-
repeat with one_item in selection_list
-
set file_list to file_list & (POSIX path of one_item as string) & ” “
-
end repeat
-
set ThePath to file_list
-
end if
-
set TheCommand to “open -a TextMate “ & ThePath
-
do shell script TheCommand
-
end tell
If you just want to download the file and not deal with all of the above… go ahead: Open_in_TM.app.zip 
-
01.19.07 / 3am
-
01.28.08 / 12pm
Any way to modify this to just open the current folder if nothing is selected? I have been trying with out luck to code this.
-
01.28.08 / 1pm
Actually, it did that already, but AppleScript in Path Finder has been broken for some time now. I’m waiting for a fix, which will probably change the terminology in the script but should make this work again.
Have your say
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]