Pressing &shortcut:EditorJoinLines; lets you join two lines into one and remove unnecessary spaces to match your code style.