On 2007-03-26, Eric Leenman <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have line like
>
> AAAA BBBBB C
> AAAA zzzzz C
>
> What I want is to place a carriage return before the C so that it becomes
>
> AAAA BBBBB
> C
> AAAA zzzzz
> C
>
> I tried
> :g/AAAA/s/C/C<CR>
> but this gives
>
> AAAA BBBBB C<CR>
> AAAA zzzzz C<CR>
>
> What do I need to insert here a real carriage return?
Use \r, as
:g/AAAA/s/C/\rC/
See
:help sub-replace-special
HTH,
Gary
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | Mobile Broadband Division
| Spokane, Washington, USA