I would like to go to the file I just edited last and next kind of like MRU plugins do.
:bnext
and :bprev
works sometimes, but more often than not I just end up in some obscure file I don't remember editing and forced to fall back to MRU plugin.
Is there a way to fix it?
Ctrl-^
swaps between two last files. What is the best way to navigate between more?
I understand it might be tricky but I would agree to anything that can improve current :bn
:bp
behavior. The buffers I often see are totally out of place. Maybe there is a plugin that can keep track of the recent files and provide hooks so I can create mappings?
Replying to comments cleared up my thoughts a bit. I believe what I want is to be able to move through files in order of latest saves. That way if I go back in history the order won't change until I save the file which then becomes last and make one step "back" to the file saved right before that, i.e. the one I've started from.
Something like Ctrl-O
Ctrl-I
pair that switches files immediately without jumping around the current buffer. Sort of like u
and U
in netrw
:
u Change to recently-visited directory |netrw-u|
U Change to subsequently-visited directory |netrw-U|
Ctrl-O
(or sometimesCtrl-T
) till I get there.Ctrl-O
andCtrl-I
. But it jumps between edit points and that breaks the flow. All I want to go back and forth between buffers in order of access. How plugins display a list of most recent files? Do they keep track of them internally?Ctrl-^
swaps between two last files. But what is the best way to navigate between more?Ctrl-O/I
are window-specific fwiw, while MRU is usually global. If you do want order by most recently accessed, as soon as you jump back once, the order of the list changes, further complicating things.