This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Hi, It would be nice to add block commenting support in Ruby editor such that the developer can select block of code to comment, right click, and hit "Comment the selected block" or some such thing. I dislike typing =begin/=end, and so would any Java programmer, I would imagine. In Java block commenting is made much much easier by the original programmers. Besides the fact that =begin/=end idiom doesn't seem to be working in NetBeans' Ruby editor for some reason. Regards, Rima.
Try selecting the text and pressing Ctrl-/ (or click on the editor toolbar action named "Comment"). This will perform a sequence of same-line comments, just like in Java. The reason this is generally preferred over using block-comment delimiters (=begin/=end in Ruby, /* */ in Java) is that these don't nest, so if you need to comment out code which contains already commented out code, it doesn't work - the innermost "escape" causes the outer comment to be seen as regular code. What did you mean by "the fact that =begin/=end idiom doesn't seem to be working in NetBeans' Ruby editor for some reason." ? It does as far as I know; can you provide more details on what you're observing and what the wrong behavior is?
Tor, Yes, Ctrl+/ worked. Noted your point about Ruby's limitation in handling block comments using =begin/=end. Thanks. Now, what I meant by my previous statement is this - I tried marking a code block with =begin and =end at relevant places and NetBeans doesn't seem to understand it. It gives "Syntax error, unexpected =". I am using M10. Yes, I will upgrade to Beta1 when time permits. Regards, Rima.