Home Download Buy Blog Forum Support

TextMate-style "Indent Selection"?

TextMate-style "Indent Selection"?

Postby peterjmag on Thu Oct 13, 2011 4:19 am

Hi there!

I bought ST2 for my Mac last night after playing around with it for half an hour, and I love it so far. However, I do miss TextMate's "Indent Selection" ( Cmd-Opt-[ ) which could take a selection like this:

Code: Select all
<div id="example">
<h1>Lorem ipsum</h1>
<ul>
<li class="first">Test0</li>
<li>Test1</li>
<li><a href="#">Something</a></li>
<li>
<div>Nesting</div>
</li>
</ul>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>


and smart-indent it to

Code: Select all
<div id="example">
    <h1>Lorem ipsum</h1>
    <ul>
        <li class="first">Test0</li>
        <li>Test1</li>
        <li><a href="#">Something</a></li>
        <li>
            <div>Nesting</div>
        </li>
    </ul>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>


Is there a similar functionality in ST2? I tried the "Paste and Indent" command ( Cmd-Shift-V ) with some unindented code in my pasteboard, but it didn't "auto-indent" like I was expecting.
peterjmag
 
Posts: 4
Joined: Thu Oct 13, 2011 4:02 am

Re: TextMate-style "Indent Selection"?

Postby tito on Thu Oct 13, 2011 4:54 am

Give APIs, let the community build the rest!
https://github.com/titoBouzout
tito
 
Posts: 866
Joined: Thu Sep 29, 2011 2:27 pm
Location: Montevideo, Uruguay

Re: TextMate-style "Indent Selection"?

Postby peterjmag on Thu Oct 13, 2011 11:25 pm

Thanks Tito! That'll work just fine.
peterjmag
 
Posts: 4
Joined: Thu Oct 13, 2011 4:02 am


Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests