NetBeans IDE 7.3 RC2使用PHP插件v1.47.1
我喜欢这样注释我的if和else:
/*
* If this is the case, then do that.
*/
if (*condition1*) {
// do some stuff.
}
/*
* Otherwise, if this is the case, do the other thing.
*/
elseif (*condition2*) {
// do some other stuff
}
/*
* Finally, if neither of these is the case, then do something
* totally different.
*/
else {
// do something totally different.
}
但是当我点击——来自动格式化时,我得到以下内容:
/*
* If this is the case, then do that.
*/
if (*condition1*) {
// do some stuff.
}
/*
* Otherwise, if this is the case, do the other thing.
*/ elseif (*condition2*) {
// do some other stuff
}
/*
* Finally, if neither of these is the case, then do something
* totally different.
*/ else {
// do something totally different.
}
我可以处理它,但我希望能够改变它。我查看了"工具->选项->编辑器->格式",但没有看到任何关于在新行上添加"elseif"或"else"的内容。
您可以更改与格式相关的非常有限的设置。
进入tools->options点击选项对话框左上角的编辑器按钮单击格式选项卡从语言选择框中选择PHP然后你就可以看到需要修改的设置