Missing Minor Feature from VS

I've been using IntelliJ for a couple of days and I have to say generally I'm finding it fantastic.
So much better than Eclipse!

I'm missing one feature however from VS where most of my work takes place.

What I call corrective indentation.

Say I wrote some code

int a=1;
int b=2;
int c = a+b;
print c;


and then at a later point I decide to surround it with an if statement

if (theSunHasGotItsHatOn == true)
{

int a=1;
int b=2;
int c = a+b;
print c;
}


Now with VS as soon as I tap in the closing brace, everything in between would be indented:


if (theSunHasGotItsHatOn == true)
{

     int a=1;
     int b=2;
     int c = a+b;
     print c;
}

I'm aware I can use reformat code at any point which would put it right... but that seems like a sledgehammer for a nut type situation.

Is there an option/plugin anywhere for IntelliJ which will do this?

Many Thanks,
Chris,

2 comments
Comment actions Permalink

The "Surround With" feature (Ctrl-Alt-T) takes care of this in IntelliJ IDEA.


0
Comment actions Permalink

I can also recommend the "SmarterEditor" plugin which offers a shortcut to format the current block only.

On 13.01.2012 20:07, Dmitry Jemerov wrote:

The "Surround With" feature (Ctrl-Alt-T) takes care of this in IntelliJ IDEA.

>
>

---
Original message URL: http://devnet.jetbrains.net/message/5448968#5448968


0

Please sign in to leave a comment.