6

Sometimes in my code I like to comment out a block of code for temporary use/reference etc eg:

/* 

blah

*/ 

But it's a minor annoyance that if I then want to go and insert a line inside that block, when I click enter, it will automatically put a * on the next line as though I were doing a DocBlock. This happens on every enter key:

/* 

blah<enter pressed here>
*

*/ 

Now I would have thought this 'auto-formatting' should only take place if the opening comment is using the format /** (two stars). Multi line comments were around a long time before DocBlocks, so I'm not sure why it forces these "old school" standard straight forward /* */ comments to have fancy unwanted extra DocBlock *'s!

So is there a way to:

  • a) Ideally - only have that formatting take place if the opening tag is /**
  • b) Or if it can't differentiate between /* and /**, is there a way to disable the auto-comment-formatting entirely?

Cheers

Manachi
  • 1,027
  • 16
  • 30

2 Answers2

5

I ended up entering this as a Netbeans bug in their Bugzilla and they have now fixed the issue. They did this VERY Quickly I should add - within 12 hours - kudos to them. From what I can make out it looks like it will be included in Netbeans 7.4 release. Gotta love Open Source! :)

Job details here:

https://netbeans.org/bugzilla/show_bug.cgi?id=230814

Manachi
  • 1,027
  • 16
  • 30
  • 2
    FYI turns out that fix only fixed the java version, not the PHP version. Please add a vote & comment in the bugzilla job if you want it fixed in PHP. – Manachi Sep 24 '14 at 02:52
-3

select your code and press ctrl+? It will comment with double all lines selected

Kamal Kumar
  • 3,393
  • 2
  • 19
  • 15