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 :bprev
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.
If you don't need to go to the previouser-previouser-previouser-previouser buffer, you might consider <C-^>
to switch to the previous one.
You can use the argument list. See :help :args
.
You can edit a file and put in the argument list easily with the :argedit
command. The argument list behave exactly what you would like.
You can use :n
command to edit the next file in the argument list and :N
(or :prev
) to edit the previous. It's even shorter then :bp
and :bn
!
+1 for editing the alternate file as @romainl said. It's really fast !