CR_JoinLines is a DXCore/CodeRush/Refactor plugin that adds a command ("Join Lines") that you can bind to a keyboard shortcut (Ctrl+J, Enter is what I use) and will join lines in the code editor. It also allows for an optional delimiter, so if you want a pipe or comma or some other string (yes, string - you're not limited to a single character) inserted between the joined lines, you can do that.
Requires DXCore 11.2.8 or later.
After you install the plugin, you need to configure a keyboard shortcut:
From the DevExpress menu, select "Options," then "IDE/Shortcuts" from the treeview on the side.
Add a new shortcut.
Bind a key to the shortcut in the "Key 1" field ("Ctrl + Shift + J" is recommended).
Bind a key to the shortcut in the "Key 2" field ("Enter" is recommended). This makes it so you have a two-key combination in order to execute the join. In this case, you'll type "Ctrl + J" then press "Enter" to execute the join. The second key is recommended in case you decide to allow for different types of line joins based on delimiter (more on this below).
Set the shortcut's command to "Join Lines".
Set the shortcut's context to "Focus/Documents/Source/Code Editor". (Hint: You can copy the "Code Editor" context from any existing command shortcut and paste it into your new shortcut by right-clicking.)
<tt>CR_JoinLines</tt> allows you to optionally pass a string parameter to it as a delimiter to be used between joined lines. For example, if you want to join several lines into a pipe-delimited list, you could provide the pipe character as the delimiter. If you don't provide a delimiter, lines will just be joined directly together with no characters or space between them. To provide a delimiter, type the delimiter (inside quotes) into the "Parameters" box for the shortcut. For example, to have a pipe delimited join, type: "|"
It is recommended that the default binding of "Ctrl + Shift + J", "Enter" provides a join with no delimiter parameter. To add additional types of joins - space delimited, comma-delimited, etc. - repeat steps 5 through 10, changing the second key binding (in step 7) to something intuitive and setting the appropriate delimiter parameter in step 10. It's easy to remember the delimiter if you set the delimiter and the second key to the same character. For example, a pipe-delimited join might have a key binding of "Ctrl + Shift + J", "|".
Click "OK" to close the options window when you are done adding shortcuts.