ap / vim-buftabline

Forget Vim tabs – now you can have buffer tabs
http://www.vim.org/scripts/script.php?script_id=5057
MIT License
782 stars 75 forks source link

When use quickfix, it will use tabs instead of buffers #42

Closed iwifigame closed 6 years ago

iwifigame commented 6 years ago

you can use ag or ack plugin to search some text, it will open quickfix. then you will see the picture below qq 20171121212732

ap commented 6 years ago

Your screenshot shows more than a single tab page. Note that your first tab shows “NERD_tree_1” – a buffer which isn’t visible on the screenshot. So evidently you legitimately have two different tab pages.

There is nothing in buftabline which can create tab pages, so I don’t believe that it can be the cause. (There could be a weird side effect I’m not realising, of course. We would have to at the very least confirm that it doesn’t happen without buftabline, and then I’d need to figure out which mistaken assumption I’m making.)

What you see on the screenshot is the fact that buftabline disables itself temporarily when there are multiple Vim tabs. That’s so you can use your tabs normally, as long as you have them open. If you close them all, you will find that buftabline enables itself again. (Someday I want to add real tab page support to buftabline. Then it’ll show a tiny list of tab page numbers on one end of the tabline instead of turning itself off.)

I don’t know what part of your configuration would be creating new tab pages.

Does that cover your question?

iwifigame commented 6 years ago

When I not use buftabline, use ag it didn't open tabs. So I think it may be the buftabline problem.

iwifigame commented 6 years ago

And when I use minibuffer or airline plugin to show buffers, when use ag them also not open tabs.

iwifigame commented 6 years ago

Sorry, I found it's because CtrlP has set switchbuf="useropen,usertab,tabnew". Just set swichbuf to default "" to fix this problem.

ap commented 6 years ago

No worries. 😊