The vim help describes the +/searchpat/ startup arg as follows:
+/{pat} The cursor will be positioned on the first line containing
"pat" in the first file being edited (see |pattern| for the
available search patterns).
That description is false when one sets nowrapscan in one's vimrc (as I do,
because I don't like wrapscan) and one has edited a file before.
The problem is, having edited a file before, there's an entry in the viminfo
file which records the line where you left vim when you last edited the file.
And now, if your search pattern appears in the file *before* that line you were
last editing, either your line positioning is wrong (you're on whatever
occurrence of the pattern is *after* your "last" line), or you get the E385
error message about "search hit BOTTOM without match".
vim's searching beyond that "last line you edited" rather than (as in the arg
description) "the first line containing pat in the first file being edited").
I believe vim should always begin searching at line 1 when a searchpat command
line argument is given. Unfortunately, I don't expect that, because I've
perceived a strong tendency in Brad to reflexively reject any bug report that
doesn't involve vim actually crashing. Whatever else vim does is, by
definition, correct. Sigh.
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.