An alternative to minibufexplorer (vim)?

心已入冬 提交于 2019-12-31 08:48:11

问题


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?


回答1:


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




回答2:


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.

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.




回答3:


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.




回答4:


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.




回答5:


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.




回答6:


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




回答7:


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.



来源:https://stackoverflow.com/questions/4865132/an-alternative-to-minibufexplorer-vim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!