It seems to me it would make more sense to have a :browse oldfiles for the last n sessions you opened up / saved in vim.

Is there such a thing?

1 Answer 1


There's a single :h v:oldfiles list saved to / restored from :h viminfo. And it has nothing to do with :h session-file.

On the other hand, "session" does not store "oldfiles"-sort of stuff. What it contains is a buffer list (possibly including unloaded buffers, see :h 'sessionoptions'), but this still differs from "MRU" (Most Recently Used (files)) and such.

Another thing to remember about "session", it is a VimScript file itself, so it could be tricky to extract only partial info without fully sourcing it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.