Am 16.07.2012 21:27, schrieb Christian Brabandt:
Bram,
On Sa, 07 Jul 2012, Tim Chase wrote:
On 07/07/12 06:35, Christian Brabandt wrote:
I'd favor a solution with
:%s/{pattern}/\=CollectMatch(submatch(0))/gn
but '\=' and the "n" flag don't work together.
What about a todo item? Add another flag?
I must say I'm surprised that the \= and "n" flags don't play well
together. Though it would toggle 'modified', you could have
CollectMatch just return its argument for a noop replacement...
Attached s_eval_expr_n-flag.diff allows to execute functions inside the
substitution part of an :s-command. The function is executed inside the
sandbox, which should be good enough.
Makes sense, with "n"-flag the expression should be disallowed to change
text etc. I could apply your :substitute patch (even to an older
7.3.420) and collect some matches ... great!
--
Andy
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php