ReSharper 2016.1 Help

Splitting Lines with String Literals

When you type long sting literals, ReSharper helps you split the lines adding the necessary quotation marks and plus signs.

While the caret is within a string literal,

split_literal_1
pressing Enter or Shift+Enter will split the string correctly so that your code syntax does not get broken:
split_literal_2

Now, if you delete the + sign, the string parts will be back together without redundant quotes.

Another way of splitting a string literal is to set the caret where you want to split the string, press Alt+Enter and choose Split string. This context action will also add necessary quotation marks and +, but both parts of the sting will stay on the same line.

This feature is supported in the following languages/technologies:

C# VB.NET C++ HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts Protobuf JSON
feature_available feature_available feature_available

See Also

Last modified: 19 August 2016