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

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

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

Raspunde prin e-mail lui