When I have a long constructor that forces me to put initialization list items on separate lines, my indentations look like this after gg=G
.
Really_Long_Class_Name::Really_Long_Class_Name(int _arg1, int _arg2) :
arg1(_arg1),
arg2(_arg2) {
do_stuff();
}
I want it to be indented like this:
Really_Long_Class_Name::Really_Long_Class_Name(int _arg1, int _arg2) :
arg1(_arg1),
arg2(_arg2) {
do_stuff();
}
After looking at a similar question, I got closer by playing around with cinoptions
. By using :set cino+=i4,e-4,0}-4
I got it to look the way I want, but then my alignment is screwed up if all the initialization list items are on the same line, like so:
Other_Class::Other_Class(int _arg1, int _arg2) : arg1(_arg1), arg2(_arg2) {
do_stuff();
}
How can I fix indentation for this one case without throwing off indentation for other cases?