For some reason :bnext is not cycling though all the buffers shown by :buffers

I have 5 buffers open but only 3 buffers are visited when I used :bnext repeatedly.

How can I cycle through all the open buffers in vim?


You may be seeing this special behavior documented under :help :bnext:

  If you are in a help buffer, this takes you to the next help
  buffer (if there is one).  Similarly, if you are in a normal
  (non-help) buffer, this takes you to the next normal buffer.
  This is so that if you have invoked help, it doesn't get in
  the way when you're browsing code/text buffers.

To include them in the navigation, use :setlocal buftype=

Unlisted buffers aren't considered by :bnext, neither (cp. :help 'buflisted'). But for those to show up in the buffer list, you'd have to use :buffers!.

|improve this answer|||||

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.