On Jan 9, 1:52 pm, Andy Wokula <[EMAIL PROTECTED]> wrote:
> I tried to write a function that collects all the matches for a given
> pattern in the text.
>
> For that purpose, it would be very nice if the following worked:
>     :%s/{pattern}/\=MyAddMatch(submatch(0))/gn

Remove the 'n' and let MyAddMatch() return submatch(0).
Not very eficient, but easy.
I am sorry if that is beside your point.


>
> but it doesn't, because the "n" flag disables evaluation of the
> expression after '\='.
>
> IMHO the "n" flag should only ignore the result of the expression.
>
> --
> Andy

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

Raspunde prin e-mail lui