/*
*
* This is a long comment. I broke it into lines, but that made it impossible to edit without screwing up the formatting. Is there a way to make Netbeans add line breaks automatically?
*
*/
Reads: This is a long comment. I broke it into lines, but that made it impossible to edit without screwing up the formatting. Is there a way to make Netbeans add line breaks automatically?
it is referred to as wrap around and run around, which moves the cursor to the next line when a line of text is filled; therefore, users are not required to press Enter after every line.
There is a "Toggle Word Wrap" command hidden in the "Window > Editor" menu (default shortcut is Alt+Shift+Y). Or you can use the Quick Access bar: Ctrl+3, and type wrap.
As for today, the current NetBeans (7.3) word-wraps comments with some nice available extra options when formatting. NB: Unfortunately, this is currently only available for the Java language.
You can launch the formatter with the context menu→Format
, or if you did not change the standard shortcuts, Alt+Shift+F should do.
To access the corresponding configuration: Tools
→ Options
→ Editor
→ Formatting
; Language
: Java
; Category
: Comments
Your IDE won't format the comment for you. You will have to do it by hand. Yes, that means you have to re-format it once you add new words to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With