I'm trying to get a command set up in Textmate to open the current file in FTPeel in order to invoke the Magic Mirror command (uploads the file to the appropriate directory on the appropriate server automatically). I found this script to do it in VIM:
" FTPeel fun! MagicMirrorIt() let path = substitute(expand("%:p"), '/', ":", "g") let nice_path = substitute(path, "^:", "", "") execute('!osascript -e "tell application "FTPeel" to open "' . nice_path . '""') endfun
map :call MagicMirrorIt()
Basically, it's as easy as calling an Applescript with the command
'tell application "FTPeel" open $TM_FILEPATH'
except FTPeel has a bug with converting the unix filepath to a "mac" filepath (users:toby:home:sites:file) because it leaves the initial / in the mac path...i guess what the VIM command above does is remove the first / (i think)...how would I go about doing this as a Textmate command?
Thanks for your help!
Toby