[TxMt] manipulating full lines rather than selection

Tim Diggins tim at red56.co.uk
Fri Nov 5 10:30:15 UTC 2010


Hi there -

loving TextMate in general, but really want one feature I've had from several editors in the past (e.g. Scintilla, Eclipse):

For indenting/dedenting, commenting/uncommenting, duplicating, deleting with a selection, I'd like TextMate to work on the full lines rather than the exact selection.

So if you make a selection of several lines starting from the middle of one and finishing in the middle of one, and then do an operation like commenting

http://img.skitch.com/20101105-c3t72pnsp98jp71d6xfkxjwfnq.png

Then the result wouldn't be as currently (that the comment delimiter is placed in the middle of the line, generating syntactically incorrect code)

http://img.skitch.com/20101105-r4u82qkcxr4germwqkcjgp9wa1.png

But instead comment as if I had selected the whole lines.

http://img.skitch.com/20101105-djej4cyhrkkckp2jjq1jeaeu38.png

I'd like indent/dedent, duplicate and delete to work similarly. 

Is there a way to make this happen? Can I "decorate' those commands somehow to select the relevant lines first... Or would I just have to rewrite those particular features (for each bundle I want them to happen in? )

(Hoping the screenshots I took make it into the mail).

thanks in advance

Tim

http://red56.co.uk
http://tim.teamportfolios.com/
tim at red56.co.uk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20101105/5f64aa8e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sthg.rb.png
Type: image/png
Size: 27051 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20101105/5f64aa8e/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sthg.rb-1.png
Type: image/png
Size: 28466 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20101105/5f64aa8e/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sthg.rb-2.png
Type: image/png
Size: 26073 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20101105/5f64aa8e/attachment-0005.png>


More information about the textmate mailing list