An alternative to minibufexplorer (vim)?
Asked Answered
S

7

33

minibufexplorer is a persistent buffer manager for vim that lives in its own window. It shows all the buffers you have open, with color indicators as to which are currently visible in windows and which have unsaved changes.

It's a great plugin which I've been hooked on forever. And without the persistent buffer display I find that I now feel lost.

The problem is, minibufexpl tends to get in the way of other window controls. As it is a normal vim window, it behaves like one, causing issues if you wanted to say, rotate your other working windows. Minibufexplorer's window would rotate as well, which is obviously less than desirable.

What I really need is a plugin that persistently displays the open buffers, but doesn't behave like a window. I don't need file navigation or anything as I use other means for that. Perhaps even something like an extended status bar that was capable of displaying information on buffers like minibufexpl does?

Smelter answered 1/2, 2011 at 16:25 Comment(3)
I have seen that a SO user, Randy Morris, has started working on persistent buffer list in status line. See github.com/rson/vim-bufstat but I don't know if it is working. It is a good idea though.Tenuto
looks promising. I'll definitely check this out later.Smelter
@Xavier T.: Thanks for the plug :) @numbers: My plugin is based off the same idea as buftabs.vim which is in an answer below. It's meant to be very simple but it has not been tested very thoroughly. If you do try it, I'd appreciate any feedback on github.Aplanatic
E
35

There's a new fork of minibufexpl.vim on GitHub which aims to solve some of these problems. One of its new features is "Prevents resizing of MBE buffer by window resizing commands" and it is immune to commands such as C-WC-R (rotate windows).

https://github.com/fholgado/minibufexpl.vim

Excipient answered 13/11, 2011 at 21:3 Comment(2)
This is awesome. I've been "off" minibufexplorer for most the year now. As of tomorrow, I'll probably be hooked again. Thanks for the find!Smelter
No problem! Just found it today.Excipient
T
17

While this is not an exact answer to your question, I think you could find it useful.

FuzzyFinder plugin provides good visual representation of your open buffers, and also offers great way to jump between them - fuzzy match.

Its list of buffers is not "persistent" meaning it's only shown on demand, but I consider this an advantage: firstly the buffers list doesn't eat up precious screen estate, and secondly with fuzzy match I don't feel a need to see it at all.

Consider the below screenshot: in order to switch to ext_gcd.py I just need to press
,bg : ,b invokes buffers list and g fuzzy-matches the only buffer whose name contains letter g.

enter image description here

P.S: it works with files too. My mappings are as follows:

map <leader>f :FufFileWithCurrentBufferDir **/<C-M> 
map <leader>b :FufBuffer<C-M>

,f in this case recursively fuzzy-matches files starting from a directory where current buffer is placed.

Turenne answered 1/2, 2011 at 21:18 Comment(2)
+1 on this, I love fuzzyfinder and use it constantly for opening files and jumping between buffers. But yeah, my issue isn't navigation, it's the persistent display of buffers. I know it's just because I'm so used to it and I'd probably get over it within a week of cutting out minibufexplorer. I just hope to find a nice solution before it comes to that.Smelter
If you like the idea of this, but don't quite like fuzzyfinder's implementation, ctrlp is a similar plugin.Padding
D
14

Old thread, but for anyone else searching checkout the vim-airline plugin. It's very popular and has great compatibility with other plugins.

Use the g:airline#extensions#bufferline#enabled option to get what your looking for.

Dux answered 10/11, 2013 at 19:9 Comment(1)
Just switched myself just now. Might also be interested inlet g:airline#extensions#tabline#buffer_nr_showDisembroil
S
9

I really enjoy buftabs.vim because it keeps the information about which buffers I have open in the status line, which disappear when I need to type there in a nice clear manner. I find this quite preferable to minibufexplorer because my cursor never accidentally ends up in a read-only scratch buffer which takes up more space than necessary. It also does some magic-mapping of :bnext and :blast to allow hopping between buffers for a rather more "familiar" feeling.

enter image description here

Sifuentes answered 1/2, 2011 at 19:3 Comment(3)
Giving this a shot. Seems good. If only it could color highlight.Smelter
Pretty good in concept. Problem for me is that I think I have other plugins vying for that space (supertab for one) and when I really need the tabs to be there I look down to find that they haven't redrawn. Will have to look into how to fix the issue when I get some more time... busy week.Smelter
Probably could use some powerline love.Padding
N
6

You can use ctrlp, a plugin written in pure Vimscript and highly configurable.

:CtrlPBuffer open a window with the list of open buffers

you can begin to type, it is a fuzzy finder.

Napalm answered 10/11, 2013 at 20:48 Comment(0)
D
1

There is also Tagma Buffer Manager. I am not using it yet, but someday I will give it a try, for sure.

Deoxygenate answered 7/11, 2012 at 20:58 Comment(0)
M
0

You can try Powerline's tabline!

I tried many plugins but they tend to take up the command line or the status line, or won't show up the whole tabs when there're too many of them.

Here is a screen shot (the top bar is the tabline!):

You need to add set showtabline=2 in .vimrc after install Powerline.

And if you want to go to the 8th buffer, :b 8 will jump to it!

Hope this helps.

Martijn answered 23/11, 2014 at 7:35 Comment(2)
Your screenshot looks suspiciously like vim-airline. Are you sure that functionality isn't coming from a plugin? Isn't the tabline option typically for tabs, not buffers?Smelter
It is actually Powerline but you're right, it is coming from a plug-in, but it still needs to be configured. Thanks for pointing that out.Martijn

© 2022 - 2024 — McMap. All rights reserved.