Monday, August 12, 2013

Re: vim: how to use back reference to compare strings?

On Mon, August 12, 2013 07:03, ping song wrote:
> thanks again John!
>
> I tried your 1st amendment , which is:
> :g#\(abc\d\+\)\(.*\)\(abc\d\+\)\(.*\)#s//\=Diff(submatch(1),submatch(3))/n
>
> really wireld , I still got the same result -- a message saying: "5
> substitutions in 5 lines", nothing got "echo"ed out...

You need a recent Vim, which means Vim 7.4 or 7.3.5XX or newer. Older Vims
did not evaluate the second part of the :s command when given the 'n'
flag.

regards,
Christian

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: