[TxMt] tab

Allan Odgaard allan at macromates.com
Fri Jan 14 15:59:51 UTC 2005


On Jan 14, 2005, at 16:37, Tobias Luetke wrote:

> How about a smart indent mode which will do the equivalent of command
> [ ] if more than one line is selected?

Not sure what this is suggesting?

> Frankly i cannot imagine any scenario where you would like tab to
> delete the entire block you have selected [...]

I do it all the time. I write single line if/else like this (tab size 
is 3):

    if(some_condition)
          do_true_branch
    else  do_false_branch

But this may have started out as:

    if(some_condition)
    {
       do_true_branch
    }
    else
    {
       do_false_branch
    }

When I pack this together, I'll do a few selections which I replace 
with tab(s), like select from end-of 'else' to begin-of 
'do_false_branch' and press tab.

Perhaps I could test whether the selection starts/ends at BOL though.

>>> Was wondering if there is a way to indent a selection of lines?
>> Command ] or command [

Just to add, option-tab and option-shift-tab will also do it.




More information about the textmate mailing list