문제

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".

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top