You can use regular expressions to search.
In your case, you replace space character to match new line too. The "\_." 
modifier match "any single character or end-of-line"
So, your search will look:
/a\_.very\_.interesting\_.place\_.which\_.was\_.far\_.away

New line can be anywhere (actually, any character can be between words) the 
expression will find it !

See :help pattern

(
If you don't like typing a lot, you can make a 
:cmap <space> \_.
command, and make the search, so when you press space, \_. will substitute it :)
and when you finished, you make 
:cunmap(press CTRL-V and space here to get a space instead of \_. this 
time)<space>
and voila, the space will behave like space again ! :)
)

Walkman

On 2012.01.15., at 12:41, Pau wrote:

> Hi,
> 
> I very frequently have to look for a couple of words in a huge
> document to find the place where I have to resume work or do
> modifications. Unfortunately, the search function stops in a new line,
> so that if I look for "a very interesting place which was far away"
> vim will not find it if there is a new line, i.e. something like this
> 
> a very
> interesting place
> which was far away
> 
> How can I tell vim to ignore new lines in the search function?
> 
> thanks,
> 
> Pau
> 
> -- 
> 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 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

Reply via email to