views:

38

answers:

1

I have following code template in NB 6.9.1:

function ${functionName}($$${param})
{
    ${selection}${cursor}
} // end: ${functionName} ()

NB formats this to:

function testFuncName($param)
{

}

// end: testFuncName ()

NB keeps to push comment from last line two linebreaks lower than ending bracket, but i want to have it exactly in line witch contains ending bracket. Any ideas?

[EDIT] This if for PHP language, env: Ubuntu 10.04

A: 

Adjust your code formatting options (Tools menu->options, click "Editor" at the top, click the "Formatting" tab, and set "Language" to "PHP").

In the "Blank Lines" category, set "After Function" to zero to eliminate the blank line between the } and the comment. I'm not sure which formatting option is inserting the other newline, but you should be able to tweak the settings and figure it out.

bta
It helped, but as said only with one new line, second is still adding, i went through all options, but can't figure out witch one break this :/
canni
It does seem odd that it will work in C but not in PHP. You may want to file a bug with the NetBeans devs about it.
bta