
由於某些原因 :bnext 沒有循環 :buffers 顯示的所有緩衝區
我打開了 5 個緩衝區,但當我重複使用 :bnext 時,只訪問了 3 個緩衝區。
如何循環遍歷 vim 中所有開啟的緩衝區?
答案1
您可能會在以下記錄中看到這種特殊行為: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.
要將它們包含在導航中,請使用:setlocal buftype=
未列出的緩衝區也不被考慮:bnext
(cp. :help 'buflisted'
)。但對於那些顯示在緩衝區列表中的內容,您必須使用:buffers!
.