I am using Neovide and I just don't understand. Maybe I am missing something about buffers? I just want to get rid of annoying empty buffers or old buffers that I don't use anymore. Only in the current tab of course. How can I achieve that and why?
1 Answer
Why does
:bd
closes tabs instead of buffers?
If the "deleted" buffer is displayed in a window and its alternate file doesn't have unsaved changes, then the window is closed.
If that window is the only one in a tab page, then the tab page is closed too.
Maybe I am missing something about buffers?
Most likely.
I just want to get rid of annoying empty buffers or old buffers that I don't use anymore.
Vim works just as well with 300 buffers as it does with 3 and having lots of buffers doesn't impact navigation negatively at all, so you don't have to micro-manage them.
Only in the current tab of course.
Buffers are global. They can't be tied to a specific window or tab page, so you can't "delete" a buffer in the current tab page.
-
how to cleanup the :bp, :bn list then? Those get worthless then. Commented May 6 at 16:37
-
-
@samuelnihoul perhaps read stackoverflow.com/q/26708822/4400820, vimcasts.org/categories/managing-your-workspace, codeinthehole.com/tips/vim-lists, etc. The short answer,
:bnext
and:bprevious
are probably the wrong tool for jumping where you want to be.– D. Ben Knoble ♦Commented May 6 at 18:04 -
@samuelnihoul "How to cleanup the
:bp
,:bn
list?" You don't. You leave the list as-is and you use a navigation method that is more suited to your actual needs.– romainlCommented May 6 at 18:07 -
1@samuelnihoul "What's the difference between
:q
and:bd
?" The former is a window command while the later is a buffer command. They have different usages. See:help :q
and:help :bd
.– romainlCommented May 6 at 18:09