[TxMt] Re: Move the caret to start of line within a TM snippet? (Charilaos Skiadas)

Cliff Joyce cliffjoyce at pureblend.com
Mon Apr 2 04:39:16 UTC 2007


> Just have a macro that moves you to the beginning of the line and  
> then executes the snippet. Wouldn't that do it? We already do this  
> trick in the Sweave bundle. Then you can have the macro have  
> whatever trigger your snippet was going to have.

Thanks, Charilaos (cool idea).  Unfortunately, this won't work well  
in my situation because the point of the snippet is to assign some  
HTML text to a PHP variable, like this:

		$myVar = <<<EOQ
			<table cellspacing="0" cellpadding="0" border="0">
				<tr align="left" valign="middle">
					<td>
						Data
					</td>
				</tr>
			</table>
EOQ;

The macro would place the caret to the left of the indented $myVar  
string, then run my snippet (which would not work properly).

Allan's solution looks promising, but I cannot figure out where the  
place this key in the snippet's plist file:

	<key>disableOutputAutoIndent</key>
	<true/>

--Cliff



More information about the textmate mailing list