Scala offers an ability to enter multi-line strings literals
Scala offers a method called stripMargin that removes the left-hand part of a multiline string up to a specified delimiter (default: "|"). Here is an example:

Entering Multi-line strings

Enter triple quots to envoke StripMargin method. You can enter multi-line strings.

It also preseves white space. Please see the following example:


You can choose different intention options for Scala multi-line strings. Place your cursor on the string and press [span:class=shortcut}Alt

+

Enter
.

For example, if you select Convert to "String" option, you will see the following result:

The multi-line string is converted to the one-line string.