Shortcut for joining two lines

Press F1, and type Join Lines. By default there is no key bindings to it yet, but you can easily set it under 'Preferences > Keyboard Shortcuts', then search for Join Lines and set a shortcut.


You can simply:

  • Select the lines to be joined.
  • Hit Ctrl+Shift+P or F1.
  • Type join lines.

Visual Studio Code now comes with a default key binding for joining lines, Ctrl + J.

You can find all keyboard shortcuts under Preferences > Open Keyboard Shortcuts.

You can overwrite it using the UI or by providing a different key combination for the command editor.action.joinLines in keybindings.json.