Jorgen Grahn said:
[...]
I don't have any
major problems with your way, but I don't want most of my code to be
indented.
I don't indent namespaces anyway. Usually I don't have more than one
namespace in a file so I don't see any advantage in it.
Yeah, that was something I considered doing for a while. In the end
it boiled down to "I don't want others to have to fight their editor
about the indentation" and "I don't want to learn how to train Emacs
not to indent namespaces".
In my experience this is only a problem when inserting something at the
very beginning of the namespace. At least Visual Studio only considers the
local context when indenting.
Except when you autoformat the whole file of course, but I almost never do
that.
(On the other hand I'm not consistent: Emacs wants to indent 'extern
"C"' blocks and that's clearly crazy from a C perspective.)
You mean because of the usual #ifdef __cplusplus guards?
Conditional compilation like that makes "correct" indenting impossible
anyway.