问题
I'm using Eclipse CDT on Windows. I should add that I'm delighted, overall, with the auto-format feature.
But one thing bugs me.
I can't figure out how to configure Eclipse to not indent lines with labels.
This is what I want:
void myfunc() {
goto MYLABEL;
MYLABEL:
return;
}
but what I get is this:
void myfunc() {
goto MYLABEL;
MYLABEL:
return;
}
How can I configure Eclipse to get exactly what I want?
In Code Style --> Formatter
, there's no section for "labels" under "Indentation".
回答1:
This is a bug in eclipse. I filed it in 2009 and it has yet to be fixed.
The C/C++ development tools plugin seems to be very poorly maintained, as I have quite a few bugs and enhancement requests outstanding which have languished for years.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268404
来源:https://stackoverflow.com/questions/21994909/set-auto-indent-not-to-indent-labels