Friday, May 25, 2018

Re: VIM Advanced text string search HELP

It may help if you can start vim in non-compatible mode, such as with

vi -N

I suggest also turning on search highlighting:

:set hlsearch

If the path you want to replace does not have any dots, I would first search for the text that needs to be replaced, perhaps

/\/\/\/[^.]\+\/

With search highlighting, you can see what's been matched. When you're happy with it,

:%s##///new/path/to/file/

(Note the # above is an arbitrary choice, usually one uses / but that's messy here.)

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment