On 2007-02-02, [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!

In addition to the techniques mentioned by others, you could just 
search backwards instead of forwards, e.g.,

    ?/path/to/file

If searching backwards bothers you, you can change that to a forward 
search by just typing

    //

Another technique would be to use the :grep command, e.g.,

    :grep /path/to/file %

to search the current file, and use the quickfix commands such as 
:cn to traverse the list of matches.

HTH,
Gary

-- 
Gary Johnson                 | Agilent Technologies
[EMAIL PROTECTED]     | Wireless Division
                             | Spokane, Washington, USA

Reply via email to