Morning debugging of #vim: if you use a trick to place the cursor in the same place, where you last edited your file, this will often break your pattern searching if the editor was started:

vim +/foo file

The pattern matching will only start after the cursor was placed, where you had previously left the file. So if you happen to set "nowrapscan" only the part between the cursor and buffer end will be searched. If you do not want to sacrifice "nowrapscan" and still get all the file searched use:

vim +1 +/foo file