Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA plus sign when String wrap

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"; 
like image 529
kovica Avatar asked Jun 20 '11 08:06

kovica


People also ask

How do I wrap text in IntelliJ?

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.

What is soft wrap in IntelliJ?

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).

What is code folding IntelliJ?

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 + .

Should be on a new line IntelliJ?

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.


1 Answers

Settings (Preferences on macOS) | Editor | Code Style | Java | Wrapping and Braces | Binary expressions | Operation sign on next line:

Operation sign on next line

like image 113
CrazyCoder Avatar answered Sep 28 '22 04:09

CrazyCoder