开发者

NetBeans PHP formatting rules

How I can change NetBeans 6.9 formatting rule to change this autoformatting:

if (true)
{
    if (true)
    {
    }if (true)
    {
    }$do_something_else;
}re开发者_开发知识库turn;

to

if (true)
{
    if (true)
    {
    }
    if (true)
    {
    }
    $do_something_else;
}
return;

Unfortunately all code in php files saved in one line without spaces. And when I had saved NetBeans example code in the same one-line style and after press Alt+shift+F to format it(with this http://developmentality.wordpress.com/2010/12/06/customize-code-formatting-in-netbeans/ settings), I got some problem with absent new line after if close tag


You can try this to formate the file and use proper indentations , select all ctrl+a then select Source > Formate from the upper menu.

about missing tag and brackets , netbeans are awesome , just check Tools > options

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜