// Here's a sample file plaa.cc:
class a {
public:
a() : i(0)
{
}
a() : i(0) {
}
a()
{
}
a() {
}
private:
int i_;
};
// end of plaa.cc
Started editor like this:
vim -u NONE -U NONE plaa.cc
Ran the following commands:
:filetype plugin indent on
:syntax on
And then reindent the whole file by =G and the end result is as you can see
above.
Everything else is ok, except for the first constructor that has an initializer
list and then the { on the next line. The indent is one level too little,
compared to all the other functions.
Often the line containing the constructor signature and the initializer list is
much longer and needs to be split to separate lines, but then vim can't indent
the function body properly anymore, so this is quite annoying.
Leo Moisio