How to open a previously opened buffer in Vim?
I've 4 buffers, say buf1 to buf4.
Currently I've opened buf1 and then I open buf3 executing :b3
.
Now, how do I go back to buf1 (the previously opened buffer) without executing :b1
?
Ctrl+P will go to buf2, the previous buffer in the list.
:b#
Opens the previously opened buffer.
Repetitive use of the command toggles between the buffers.
Thanks to Related questions on this site!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With