ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Join lines

Last modified: 25 September 2024

ReSharper makes it possible to append the next code line after the current one and join several selected lines into one, accurately arranging spaces.

To append the next line after the line where your caret is, or to join all selected lines into one line, do one of the following:

  • Choose ReSharper | Edit | Join Lines from the main menu.

  • If you are using the IntelliJ IDEA keymap, press Control+Shift+J. Alternatively, you can assign a desired shortcut to the ReSharper_JoinLines command in Visual Studio options (Tools | Options | Environment | Keyboard).

  • Press AltEnter and start typing 'join lines' to invoke the command with the Go to action feature.

This feature is supported in the following languages and technologies:

The instructions and examples given here address the use of the feature in C#. For more information about other languages, refer to corresponding topics in the Languages and frameworks section.