0

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 1

1

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.

5
  • how to cleanup the :bp, :bn list then? Those get worthless then. Commented May 6 at 16:37
  • Also what's the difference between :q and :bd then Commented May 6 at 16:38
  • @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.
    – romainl
    Commented 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.
    – romainl
    Commented May 6 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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