To join two lines into one and remove unnecessary spaces, press
&shortcut:EditorJoinLines;
.