[TxMt] setting options on document open/close

Eric Peden eric at ericpeden.com
Tue Sep 20 08:57:33 UTC 2005


I've started using tm_wait as my mutt editor, and have been working on
an email bundle to make editing mail easier in TextMate. I've finally
got automatic hard-wrapping working (I have a macro bound to <return>
that hands off the current paragraph to the 'par' wrapping utility; this
handles wrapping better than TM's "Reformat Paragraph" command). The
last thing I'd like to do to polish off the text-wrap is to set "Soft
wrap" on and adjust the wrap column whenever an email is opened.

Is there any way to do this? The soft wrap setting at least appears
to be stored on a per-window basis. I was thinking they would be
stashed in the file's metadata, but using the xattr tool (mentioned at
http://arstechnica.com/reviews/os/macosx-10.4.ars/7) shows that only
the caret location is saved. (Hmmm... I could use this to place the
cursor below the mail headers... but I digress.) I haven't seen mention
of "hooks" in TextMate for calling commands/macros, but maybe I just
haven't looked hard enough.

Suggestions are appreciated.

-- 
eric
  So I'm lying here, just staring at the ceiling tiles.
  And I'm thinking about what to think about



More information about the textmate mailing list