David Rock wrote:
* Yakov Lerner <[EMAIL PROTECTED]> [2007-02-11 05:04]:
On 2/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I have a string that has lots of forward slashes. I need to search it
and delete it (e.g. unix path name).  I could use a backslash for
everything forward slash and find it in vim. Is there a way I need not
do that? For now, I use 'grep -n' to get the line number and then delete
it. I don't actually type the string, I just use cut-and-paste!

You can use any separator you want, not just /

:%s!/path/with/slashes/!/newpath/!


In :s and :g any separator (except \ | ") is OK. In / and ? the end separator (if any) must be the same as the search command, and can't be used (unless backslash-escaped) as part of the pattern.

Best regards,
Tony.
--
Some don't prefer the pursuit of happiness to the happiness of pursuit.

Reply via email to