Auto indent

  • Thread starter Thread starter Jack
  • Start date Start date
J

Jack

How to enable the auto indent function in visual studio?
For example:

void f()
{
for(int i = 0; i < 10; i++)
{
cout << a; //When I type this line, indent
automatically.
}

}

Thanks.
 
Jack said:
How to enable the auto indent function in visual studio?
For example:

void f()
{
for(int i = 0; i < 10; i++)
{
cout << a; //When I type this line, indent
automatically.
}

}

Thanks.

Try this (but, I'm mystified why it isn't happening for you by default. It
does for me.)

For the entire file: Edit->Advanced->Format Document (also Ctrl-K, Ctrl-D)
For the selected text: Edit->Advanced->Format Selection (also Ctrl-K,
Ctrl-F)
 
Back
Top