I want to substitute all
cygdrive/d using vim. But I can’t get the matching pattern correctly. Here is my command:
it doesn’t work. Can anybody show me what is wrong?
vim allows you to specify the delimiter.. (First character after s is the delimiter)
using line range argument .. and # as delimiter
ESC: :1,$ s#/cygdrive/e#/cygdrive/d#g
Your search pattern and replacement string look fine.
Make sure you are in
ex mode when you try it.
: and then
But if you want all he replacements in just the current line you can do:
You have to escape the special character