For example, I want to highlight occurrences of the current yank register, i.e.,
:let @/=@"
It works, unless @"
has 'funny' stuff in it like backslash.
I can do
:let @/=escape(@", '\\')
but I'm not sure if this is the right thing to do, and if it will escape all possible problematic characters. Maybe there are others.
Update: ok, I really need to escape more stuff. all the regent special characters at least it seems. so is there a regexp escaping function or variable listing all regexp special chars?