[TxMt] Hard-coding a search string into a Macro
Jon Ippolito
jippolito at maine.edu
Mon Jul 20 16:30:38 UTC 2009
I'm confused about how to record a macro using a pre-defined text
string *without* defaulting to whatever was last in my Find dialogue.
For example, for use after invoking Edit-in-TextMate for an email
reply, I recorded a trivial macro that searches for
"On dateblah Jane Rodriguez wrote:"
then captures the first name using something like this
^.+? (\w+) \w+ wrote:$
and finally plops this at the top of my reply:
"Hi Jane,"
(What can I say, I'm a lazy correspondent.)
I've tried setting the macro both to local and global clipboards, and
also editing the macro syntax (with which I'm not terribly familiar)
to something like this:
<plist version="1.0">
<dict>
<key>commands</key>
<array>
<dict>
<key>argument</key>
<string>wrote:</string>
<key>command</key>
<string>findNext:</string>
</dict>
...
Seems like this should be easy, but I'm stuck--any help appreciated.
jon
PS: thanks to Jay Soffian for solving my JavaScript-as-TextMate script
question!
More information about the textmate
mailing list