开发者

NetBeans PHP formatting rules

开发者 https://www.devze.com 2023-02-04 13:56 出处:网络
How I can change NetBeans 6.9 formatting rule to change this autoformatting: if (true) { if (true) { }if (true)

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

精彩评论

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