bufferhint is a handly buffer switcher for Vim.
With this plugin, you can browse all buffers in a popup side window.
In addition, this plugin provides a "hint key" for each buffer, just like what Vimperator/Vimium/VimFx does.
Therefore, you can switch among buffers quickly with a single key stroke in the best case.
cp bufferhint.vim ~/.vim/plugin/cd ~/.vim/bundle
git clone https://github.com/bsdelf/bufferhint.gitAdd following two lines in ~/.vimrc:
nnoremap - :call bufferhint#Popup()
nnoremap \ :call bufferhint#LoadPrevious()- vim foo.txt bar.txt doe.txt.
- Type -to popup bufferhint window.
- Type j,k,C-f,C-b,PGUP,PGDNto navigate.
- Type ENTERto load the buffer under cursor.
- vim foo.txt bar.txt doe.txt.
- Type -to popup bufferhint window.
- Type bto load "bar.txt".
- Type \to load the previous buffer namely "foo.txt".
- Type -to popup bufferhint window.
- Type SPACEto switch sort mode.
- vim foo.txt bar.txt doe.txt.
- Type -to popup bufferhint window.
- Type ddto delete the buffer under cursor.
- Type dbto delete a buffer by hint.
- Yellow hints means the buffers are sorted by path, green hints means the buffers are sorted by LRU.
- You can also type /in bufferhint window and search what you want, then typeENTERto load it.
- Apparently j/k/d/n/Nare excluded from the hint chars.
- 
bufferhint#Popup()Toggle bufferhint window. 
- 
bufferhint#LoadPrevious()Load the second item in LRU. It's very useful in the scene where you want to switch back and forth between two files. 
- 
bufferhint#Save()Save current session to an external session file which can be restored by vim -Scommand in the future. The default session file name is "session.vim".
- 
g:bufferhint_SortModeDefault sort mode. - 0: sort by path
- 1: sort by LRU
 
- 
g:bufferhint_MaxWidthMaxmium window width. 
- 
g:bufferhint_PageStepPage step, will affect PGUP,PGDN,C-f,C-b.
- 
g:bufferhint_SessionFileThe default session file name. 
- 
g:bufferhint_KeepWindowSet to 1to keep window open after buffer deleting.
If you like this plugin, please rate it here!
