I'm sure this has been asked before, but I haven't had much luck with a search. Is there an easy way to append the next line to the end of the current line?
Example:
this.thing = that
.getThing();
I am looking for a one-stroke command that turns it into:
this.thing = that.getThing();
Shift-J joins the next line with the current one. It removes indentation but usually adds a space, unfortunately.
These commands, except "gJ", insert one space in place of the
<EOL>
unless there is trailing white space or the next line starts with a ')'. These commands, except "gJ", delete any leading white space on the next line.
Use J
which is short for join.
Vim doc copied below
*J*
J Join [count] lines, with a minimum of two lines.
Remove the indent and insert up to two spaces
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With