[TxMt] snippet and command questions (toggle comments, hard-wrap, etc.)

Jason Moore jmoore at xinsight.ca
Wed Oct 4 15:53:11 UTC 2006


On 4-Oct-06, at 10:28 AM, James Edward Gray II wrote:

> On Oct 4, 2006, at 9:10 AM, Jason Moore wrote:
>>
>> great! ok, now how would i remove comments? (or even better, how to 
>> toggle comments on the current line?)
>
> Did you try command-/?  ;)  It's Comment Line / Selection in the 
> Source bundle.

duh. can't believe i didn't find that. perfect!

>> * hard-wrap: i know textmate doesn't support this out of the box...

> Does control-Q help at all?  That's Reformat Paragraph in the Text 
> menu.
>
> I believe you can change the command above to:
>
>   fmt <<< $TM_SELECTED_TEXT

the <<< works great. but "Reformat Paragraph" is much much better. (i 
must have read an old discussion about TM not supporting 
hard-wrapping.)

one other concept i'm trying to get - is how to replace existing text. 
e.g.

"h1 [tab] Welcome" gives me:
<h1 id="welcome">Welcome</h1>

good. but is there an easy way to change it to:
<h2 id="welcome">Welcome</h2>
or
<div id="welcome">Welcome</div>
?

:jason




More information about the textmate mailing list