On 24/02/11 8:49 PM, Ulf Magnusson wrote:
Hi,

One problem with searching for phrases in files that contain wrapped
text (LaTeX source files, e-mails, source code comments, etc.) is that
you never know whether two words will be separated by a space or a
newline. Therefore, it would be handy to have an option that makes
spaces match newlines in searches.

I've looked at http://vim.wikia.com/wiki/Search_across_multiple_lines,
but those solutions have the disadvantage of either forcing you to use
an awkward pattern or not supporting incremental searching.

A solution to a more general class of problems would be to allow the
search pattern to be automatically rewritten (e.g. by a substitution
or a function) prior to being used. That way you could automatically
rewrite spaces to \_s or do other neat things like having "foo bar"
match "foo {\it bar}" in LaTeX documents.

I'm not experienced enough with vimscript to be able to tell how such
a feature could interact badly with other things, but perhaps it
wouldn't be as bad if you limited it to searches initiated with /.

Thanks for making Vim!
/Ulf

Since nobody has replied to this that I've seen, I'd just like to add a
+1 for something like this. It would be very handy for quickly searching
for a phrase you remember in prose that is hard-wrapped.

Ben.



--
You received this message from the "vim_dev" 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