设置自动缩进不缩进标签 [英] Set auto-indent not to indent labels
问题描述
我正在Windows上使用Eclipse CDT。我应该补充一点,总的来说,我对自动格式化功能感到满意。
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.
我不知道如何配置Eclipse以不缩进带有标签的行。
I can't figure out how to configure Eclipse to not indent lines with labels.
这就是我想要的:
void myfunc() {
goto MYLABEL;
MYLABEL:
return;
}
但我得到的是:
void myfunc() {
goto MYLABEL;
MYLABEL:
return;
}
我如何配置Eclipse以精确地获取 我想要?
How can I configure Eclipse to get exactly what I want?
使用代码样式->格式程序
,缩进下没有标签部分。
In Code Style --> Formatter
, there's no section for "labels" under "Indentation".
推荐答案
这是一个错误在日食中。我在2009年提交了该文件,但尚未修复。
This is a bug in eclipse. I filed it in 2009 and it has yet to be fixed.
C / C ++开发工具插件的维护似乎很差,因为我有很多错误,并且
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
这篇关于设置自动缩进不缩进标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!