Hi all-
I'm writing a macro:
selectBlock: copySelectionToFindPboard: findWithOptions:
All I'm doing is getting some text between square brackets, pasting it into the find dialog, and hoping to search with "wrap" enabled.
Trouble is, the findWithOptions: wants to hardwire my find selection:
{ action = findNext; findInProjectIgnoreCase = 0; findInProjectRegularExpression = 0; findString = "[^f100914110843]"; ignoreCase = 0; regularExpression = 0; replaceAllScope = document; wrapAround = 1; }
I tried removing the findString property, but then I lose the wrapAround for some reason. That is, the property is in the macro text, but wrap doesn't work when the macro is executed.
Any idea what I'm doing wrong here?
Thanks!
Charles
Bump.
On Sep 14, 2010, at 11:27 AM, Charles Turner wrote:
Hi all-
I'm writing a macro:
selectBlock: copySelectionToFindPboard: findWithOptions:
All I'm doing is getting some text between square brackets, pasting it into the find dialog, and hoping to search with "wrap" enabled.
Trouble is, the findWithOptions: wants to hardwire my find selection:
{ action = findNext; findInProjectIgnoreCase = 0; findInProjectRegularExpression = 0; findString = "[^f100914110843]"; ignoreCase = 0; regularExpression = 0; replaceAllScope = document; wrapAround = 1; }
I tried removing the findString property, but then I lose the wrapAround for some reason. That is, the property is in the macro text, but wrap doesn't work when the macro is executed.
Any idea what I'm doing wrong here?
Thanks!
Charles
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
On 2010-10-15 11:36, Charles Turner wrote:
I tried removing the findString property, but then I lose the wrapAround for some reason. That is, the property is in the macro text, but wrap doesn't work when the macro is executed.
Any idea what I'm doing wrong here?
I'm not sure. It works for me. How did you remove the findString property? I simply quit TextMate and edited the .tmMacro file in vi to remove "<key>findString</key>" and the following "<string>...</string>" line. It works, including wrap. ⌘G doesn't work, but that's probably because I have "Use local clipboard while executing macro" checked in the bundle editor.
Here's the resulting macro file:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>commands</key> <array> <dict> <key>command</key> <string>selectBlock:</string> </dict> <dict> <key>command</key> <string>copySelectionToFindPboard:</string> </dict> <dict> <key>argument</key> <dict> <key>action</key> <string>findNext</string> <key>findInProjectIgnoreCase</key> <true/> <key>findInProjectRegularExpression</key> <false/> <key>ignoreCase</key> <true/> <key>regularExpression</key> <false/> <key>replaceAllScope</key> <string>selection</string> <key>replaceString</key> <string> $1</string> <key>wrapAround</key> <true/> </dict> <key>command</key> <string>findWithOptions:</string> </dict> </array> <key>keyEquivalent</key> <string>^~@m</string> <key>name</key> <string>untitled</string> <key>uuid</key> <string>1B084898-516B-4861-A38F-3C7FC6E18D5F</string> </dict> </plist>