3

My situation is, I have set nowrapscan, however now, when I hit the end of a file, it will display

E385: search hit BOTTOM without match for: \v^[^=]*(…

How can I avoid that from displaying? I used help but couldn't find anything about it.

4
  • 4
    :h silent might help Jul 9, 2016 at 16:59
  • But it isn't practical for interactive use
    – hgiesel
    Jul 9, 2016 at 17:28
  • I think you can't, if you don't want the message to be displayed, enable wrapscan. Otherwise it will be displayed, saying that you reached the end of the file.
    – nobe4
    Jul 9, 2016 at 17:42
  • Is there some way to the wrapscan setting for a specific search, like the \c and \C flags for case sensitive / insensitive search?
    – hgiesel
    Jul 9, 2016 at 17:51

1 Answer 1

2

you can use a custom command, if :sil norm! n is too much to type in interactive mode:

:com! :Nextmatch :sil :norm n
:nnoremap <silent> n :Nextmatch<cr>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.