Search code examples
vim

Recent file history in Vim?


I would like to access recent files that I had opened and then closed in GVim. I open and close GVim frequently. I would like to access recent files from previous sessions as well.

Does GVim store recent files somewhere as Word and many other desktop apps store? How to access them?


Solution

  • At least terminal vim stores the previous ten files into ~/.viminfo in the filemarks section. You can use '0, '1, '2, ... '9 to jump among them.

    (Probably only useful for '0 to get back to the last file you were editing, unless your memory is stronger than mine.)

    You can also use the :browse oldfiles command to get a menu with numbers.