> I just found out, that submatch eats my backslashes. Consider this > example: > ~$ gvim -u NONE -N -c ":put ='foo\bar'" -c ":%s/.\+/\=submatch(0)/"
The backslash also has a special meaning in the substitution (eg if
you want to insert \n). This should work:
%s/.\+/\=escape(submatch(0), '\')
tom.
--
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
