Reputation: 51
In C++ Builder, how can I make sure that even correctly nested code like:
void func () {
...
..
)
C++ Builder correctly nested only doing so:
void func ()
{
...
...
}
This is very stressful, because I always have to correct by hand. So how can I make which indents code as well in the first instance?
Upvotes: 5
Views: 3327
Reputation: 59
I am using this free tools:
http://www.cnpack.org/index.php?lang=en
using tabs to shift marked blocks to left or right.
Upvotes: 1
Reputation: 91
Select the block, then press CTRL+SHIFT+I. This is in Borland C++ 6.
Upvotes: 2
Reputation: 2632
The code formatter in C++Builder 2010 should do this automatically for you. (It is invoked with CTRL-D) You’ll have to set the preferences to how you like your code to be formatted, but this is a real time saver new with this most recent release.
Upvotes: 3
Reputation: 22320
I don't have a copy of this to run, but the documentation mentions "Indentation, Spaces, and Line breaks" as some of the options under the formatter tab of the "Tools > Options" dialog.
What you're looking for is probably under the "Line Breaks" section.
Upvotes: 0