[TxMt] Re: Guaranteeing Wrap in a "Find" Macro?

Steve King sking at arbor.net
Fri Oct 15 18:13:06 UTC 2010


  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>



-- 
Steve King
Sr. Software Engineer
Arbor Networks
+1 734 821 1461
www.arbornetworks.com <http://www.arbornetworks.com/>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3874 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.macromates.com/textmate/attachments/20101015/dd3d4db9/attachment.p7s>


More information about the textmate mailing list