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,
请先登录再写评论。
The "Surround With" feature (Ctrl-Alt-T) takes care of this in IntelliJ IDEA.
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:
>
>