On Sun 30-Dec-07 7:22am -0600, Bram Moolenaar wrote:

> A. Politz wrote:

>> ---buffer---
>> abcdefg
>> 1234567
>> ------------
>> 
>> +
>> 
>> :1s/g\n\zs1//
>> 
>> =
>> 
>> ---buffer---
>> 234567
>> ------------
>>
>> Is it supposed to be this way ? I don't think so.
>> Or maybe someone will enlighten me.

> Yes, that looks like a bug.  Try  :s/defg\n1\zs2//  and only the "a" is
> kept.  One more for the todo list...

I'm not sure this is related but:

    :1s/\%(g\n\)\@<=1//

produces:

    E486: Pattern not found: \%(g\n\)\@<=1

Yet

    /\%(g\n\)\@<=1

matches fine.  Noting (from trying the search() function)
that the match occurs on line 2, I tried:

    :2s/\%(g\n\)\@<=1//

That removed the '1'.

-- 
Best regards,
Bill


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui