I don't think you need the +.  Just

/word2\_s\word3

is enough...

----- Original Message ----- From: "Niels Bo Andersen" <[EMAIL PROTECTED]>
To: "Kamaraju Kusumanchi" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Wednesday, December 27, 2006 5:45 PM
Subject: Re: treat new line as space while searching


Kamaraju Kusumanchi wrote:
Let's say I have file with 2 lines, whose contents are

word1 word2
word3 word4

Now I want to treat new line character as a space character just for searching purposes. So that I can search for "word2 word3" and a match will be found.

Is this possible? Any extensions which do this
You could use

/word2\_s\+word3

This will search for word2 followed by one or more whitespace or end-of-line characters followed by word3.

See :help /\_


/Niels

Reply via email to