2 ms·
Another Vim tip: I use a plugin called bufexplorer. I patched bufexplorer.vim with this: if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMappin
by kazinator 4y ago
Another Vim tip: I use a plugin called bufexplorer.
I patched bufexplorer.vim with this:
if !hasmapto('BufExplorer') && g:bufExplorerDisableDefaultKeyMapping == 0
nnoremap <script> <silent> <unique> <Leader>\ :BufExplorer<CR>
endif
What that does is make the buffer explorer's window accessible just by hitting backslash twice. The \ key is the default <Leader> key in Vim. So <Leader>\ means \\.
Bufexplorer lists the open buffers one per line in a window that is searchable. The window can be sorted by recently used.
Switching among buffers with plain Vim is a paint: using :ls to list buffers, and :b <number> and such. A more ergonomic buffer switcher is a must.
- Scarbutt 4y agoI settled on fzf.vim for that (since I'm already using fzf on the terminal) which also has other niceties.