This is where auto indent can be very useful. As soon as the indenting starts doing something unexpected, you are aware the code is not what you think it should be.
Changing the background colour is a *hard* thing for VA to do, since it does not have full control, so it is unlikely we will ever try to offer this. Plus this idea runs into a problem when you are 6, 8, or 20 blocks deep inside a function. This does happen.
In VS2003, VS2005 there is the outlining feature, this gives you visual feedback on the blocks.
To try and stop this happening in the first place try using autotext more often, so it will insert all of the brackets for you as you type the initial if statement.
Talking about auto-indenting: I discovered a case where auto-indenting doesn't work properly. Not sure whether this is an issue of the IDE or VAX (I presume the former).
Here's an example:
class cMyClass
{
private:
int m_myInt;
public:
cMyClass(int someInt)
: m_myInt(someInt) {}
int get () const { return m_myInt; }
};
The problem here is the member initialization on a new line followed by an empty function body on the same line. If you put everything on the same line, it works. If you put the function body on a new line as well, it works. If you leave it like presented above, the next line (and any code following that up to the closing bracket of the class) will be indented one step too deep.
P.S.: While the above is hardly related to the topic, I thought of something else that is: Recognizing the start and end of blocks can get tricky when using #define macros with unmatched brackets. The same goes for macros hiding 'if', 'for' or 'while' statements. (the all-time favorite MIN and MAX macros come to mind...)
the indenting problem, this is definitely the IDE. To prove this take the code, mess up the formatting, then select the code and trigger the IDE's format code option CTRL-K, CTRL-F by default in VS2003, you get exactly the same end result. VA stays well away from the whole "how to format my code" question.
To build on your #define point, what about people who use #define's for the start and end of namespaces, or wrap curly brackets in #if #endif blocks?