remove new line and bring next line up
C M Reinehr
cmr at amsent.com
Fri Apr 9 13:25:45 PDT 2010
On Fri 09 April 2010 02:09:44 pm Vu Pham wrote:
> In vi, I use J at the end of a line to move the next line up next to the
> current line. How can I do it over many lines by one or two commands ?
>
> What I want is to convert
>
> a,
> b,
> c,
> d,
> e
>
> to a,b,c,d,e
>
>
> I tried
>
> :n,m s/control-VcontrolJ//g
>
> but it fails.
>
> Thanks,
> Vu
Vu,
I I'm understanding you correctly, with your cursor position on the line
containing 'a', you just would type ".,+4j". This will leave embedded spaces,
so you would have to follow it up with "s/ //g" to remove the spaces.
HTH
cmr
--
Debian 'Etch' - Registered Linux User #241964
--------
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
More information about the Linux-users
mailing list