[SVN] r2299

Allan Odgaard throw-away-1 at macromates.com
Sun Nov 27 16:29:26 UTC 2005


This is an input manager which is supposed to replace the Edit in TextMate service (when it's had a bit more polish and has been tested).

It has a few advantages:
 o doesn't block the calling application
 o does html -> text and text -> html conversion for Mail (which edits text via an WebHTMLView, which is a little messy)
 o gives as filename the window title + calling application as extension (so one can bind languages based on application name)
 o can be called without having to first make a selection
 o even works from within TextMate (e.g. bundle editor), although not before next build (save/close will deadlock in current public build)
 o the activation key doesn't need to be command + something

It is of course a hack. It adds an editInTextMate: action method to NSTextView and WebKit. To install build the target, then:

   mkdir -p ~/Library/InputManagers/Edit\ in\ TextMate
   cd ~/Library/InputManagers/Edit\ in\ TextMate
   ln -s "/path/to/Edit in TextMate.bundle" "Edit in TextMate.bundle"
   ln -s "/path/to/source/Info" Info

In addition you'll need to add an entry in your key bindings file (~/Library/KeyBindings/DefaultKeyBinding.dict), I have this:

   "^E" = "editInTextMate:";

If all this sounds complicated, just hold off using it till it gets bundled with TM.

Currently it doesn't correctly “escape” tab characters when sending back text to Mail. The way it retains the calling view, and checks [view window] is also a little dirty, but it seems to work (and so it ought to).

Changed:
A   trunk/Tools/Edit in TextMate/
A   trunk/Tools/Edit in TextMate/Edit in TextMate.xcodeproj/
A   trunk/Tools/Edit in TextMate/Edit in TextMate.xcodeproj/duff.pbxuser
A   trunk/Tools/Edit in TextMate/Edit in TextMate.xcodeproj/project.pbxproj
A   trunk/Tools/Edit in TextMate/Edit in TextMate_Prefix.pch
A   trunk/Tools/Edit in TextMate/English.lproj/
A   trunk/Tools/Edit in TextMate/English.lproj/InfoPlist.strings
A   trunk/Tools/Edit in TextMate/Info
A   trunk/Tools/Edit in TextMate/Info.plist
A   trunk/Tools/Edit in TextMate/src/
A   trunk/Tools/Edit in TextMate/src/Edit in TextMate.h
A   trunk/Tools/Edit in TextMate/src/Edit in TextMate.mm
A   trunk/Tools/Edit in TextMate/src/NSTextView: Edit in TextMate.mm
A   trunk/Tools/Edit in TextMate/src/WebView: Edit in TextMate.mm



More information about the textmate-dev mailing list