如何在 vim 中更改 :bnext 和 :bprevious 的顺序? [英] How to change order for :bnext and :bprevious in vim?
问题描述
在 vim 中,我在缓冲区中打开了 3 个文件:A、B、C(按此顺序).我要回到缓冲区 B,我在 B 中打开缓冲区 D (:e d)(所以现在我在 D 中).但是当我使用 :bprevious 时,我转到 C,但我想转到上次访问的缓冲区 - B.
In vim I'm opening 3 files in buffers: A,B,C (in this order). I'm going back to buffer B, I open buffer D (:e d) while being in B (so now I'm in D). But when I use :bprevious I go to C, but I would like to go to last visited buffer - B.
是否可以更改缓冲区切换顺序以使用它们的活动顺序,如上例所示?
Is it possible to change buffer swiching order to use order of they activity, as in example above?
推荐答案
我认为改变缓冲区列表的顺序是不可能的,但有很多缓冲区导航插件可用.
I don't think it's possible to change the buffer list's order without some possibly dirty heavy lifting but there are quite a lot of buffer navigation plugins available.
这个,来自列表,似乎解决了你的问题完美.
This one, from the list, seems to adress your problem perfectly.
如果你不需要去previouser-previouser-previouser-previouser缓冲区,你可以考虑<C-^>
切换到上一个.
If you don't need to go to the previouser-previouser-previouser-previouser buffer, you might consider <C-^>
to switch to the previous one.
这篇关于如何在 vim 中更改 :bnext 和 :bprevious 的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!