Auto indent

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.
 
P

PvdG42

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top