Can you write unescaped search terms in the Vim command line?
When I do a search and replace on a yanked line that has characters that require escaping it's really annoying to have to go back through the command line string and escape all the special characte开发者_JS百科rs.
Is there a way to use a literal (raw) string modifer like in python: str = r'\unescaped\'
?
Use the \V
modifier:
:%s/\V$foo//g
See also :help /magic
I just thought of doing this instead: :%s;\foo\;bar;g
. This solves the escape the backslash problem Manni points out.
精彩评论