I'm using Intellij IDEA 10.5 Community. If I have a long String and want to split in in mulitple lines I press ENTER key in the middle of a String and get this:
String str = "ONE LONG" + "STRING";
Is it possible to put the + sign in the beginning of the line, like this:
String str = "ONE LONG" + "STRING";
You can enable soft wrap for the editor with ⇧⇧ (macOS), or *Shift+Shift (Windows/Linux), for the Search Everywhere dialogue, and then typing in soft wrap. You can also go to Preferences/Settings > Editor > General to enable Soft Wraps for more file types by default.
Wrap lines to eliminate the need of scrolling horizontally in order to see overly long lines. Enable soft wraps for the file types that tend to have lots of long lines (Preferences/Settings | Editor | General > Soft-wrap files).
Expand or collapse code elementsIntelliJ IDEA collapses or expands all fragments within the selection, or, if nothing is selected, all fragments in the current file, for example, all methods in a file. To collapse or expand code recursively, press Ctrl+Alt+NumPad - / Ctrl+Alt+NumPad + .
There are shortcuts for this in IntelliJ IDEA! Simply hit Shift+Enter to start a new line below the current line or Ctrl+Alt+Enter (⌥⌘Enter on Mac) to start a new line above the current line.
Settings (Preferences on macOS) | Editor | Code Style | Java | Wrapping and Braces | Binary expressions | Operation sign on next line:
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