I would like to easily transform these two lines :
One line.
long line with many words in this example
into the line :
One long line with many words in this example line.
How I currently do it :
- place cursor on the l of long
- enter visual mode
- go to the end of the line with
$
key - go one character backward (to deselect the line-break character)
- hit
x
to cut the words in the line and leave visual mode - place cursor on the space betwen One and line
- hit
p
- add a space after example
How I wish it was possible to do it :
- place cursor anywhere on second line
- hit
shift-v
to visualize the second line - hit
x
(optionallyy
to keep second line) - place cursor on the space betwen One and line
- hit a
magick key
- if needs be, insert the space
Remarks :
- In general I would like not to keep the trailing blank characters from the second line.
- it is already possible to paste a line that you cut with
shift-v
thenx
but it will be pasted as a line, before (or after) the current line. - if the two lines are side by side and if one simply wants to move the second line at the end of the first one, one can use the join command (that has options regarding spaces to insert).
Any help is appreciated !