ReSharper 2023.3 Help

Join lines

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 Alt+Enter 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:

Language: C#

Language: VB.NET

Language: C++

Language: HTML

Language: ASP.NET

Language: Razor

Language: JavaScript

Language: TypeScript

Language: CSS

Language: XML

Language: XAML

Language: Resx

Language: Build Scripts

Language: Protobuf

Language: JSON

Feature is available in C#

Feature is available in Visual Basic

Feature is available in C++

Feature is available in HTML

Feature is available in ASP.NET

Feature is available in Razor

Feature is available in JavaScript

Feature is available in TypeScript

Feature is available in CSS

Feature is available in XML

Feature is available in XAML

Feature is available in Resource files

Feature is available in build script files

Feature is available in Protobuf

Feature is available in JSON

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 ReSharper by language section.

Last modified: 18 March 2024