vim
:set ft=php
i
<&
<Esc>
%
Illegal backreference.
The patch below fixes it. The problem is that & in a substitution stands for
the
original match, but here we want to insert it literally into the string. There
may
be other places where the same mistake is made, I guess, but I didn't look; I
just
fixed this one.
Ben.
--- /Applications/MacVim.app/Contents/Resources/vim/runtime/macros/matchit.vim
2008-08-19 18:15:31.000000000 +1000
+++ .vim/plugin/matchit.vim 2008-08-31 15:38:35.000000000 +1000
@@ -357,7 +357,7 @@
execute s:Ref(ini, d, "start", "len")
let ini = strpart(ini, 0, start) . backref . strpart(ini, start+len)
let tailBR = substitute(tailBR, s:notslash . '\zs\\' . d,
- \ escape(backref, '\\'), 'g')
+ \ escape(backref, '\\&'), 'g')
endif
let d = d-1
endwhile
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---