How do you prefer to switch between buffers in Vim?

前端 未结 16 2103
小蘑菇
小蘑菇 2020-12-12 08:33

I\'ve tried MiniBufExplorer, but I usually end up with several windows showing it or close it altogether. What I\'d like is something like LustyJuggler with incremental sear

16条回答
  •  庸人自扰
    2020-12-12 09:08

    I've recently gone more minimalistic.

    To cycle buffers I use ]b and [b from unimpaired: https://github.com/tpope/vim-unimpaired

    To jump straight to an open buffer just use Vim's tab completion with :b. A few letters is enough to get to any open buffer with a tab or two.

    Similarly to open buffers I use :e with relative paths and tab complete.

    I also use :ls occasionally to see what buffers I have open (and to check their modified status).

    To get rid of a buffer I use :bw to wipe the buffer. I usually make a temporary split and change buffers to preserve my layout though since :bw also closes the active window.

    All the minibuf things I tried just ended up annoying me, and I don't want some smart-matching thing opening random files for me. If I really need to browse for something I use NERDtree (:e .).

    IDK, Lately I also dropped Yankring (because it screws up xp) and started using registers, and I recently decided the f/t movements are the greatest thing ever...

提交回复
热议问题