View a list of recent documents in Vim
Don't use a plugin, unless you want a nice menu. From Vim Documentation: Starting (or :help old
):
:ol[dfiles]
Then to open one of the listed files, use: '0
, '1
, '2
, ... '9
List the files that have marks stored in the viminfo
file.
:bro[wse] ol[dfiles][!]
List file names as with :oldfiles
, and then prompt for a number. When the number is valid that file from the list is edited. Use !
to abandon a modified buffer.
The Most Recently Used (MRU) plugin provides an easy access to a list of recently opened/edited files in Vim. This plugin automatically stores the file names as you open/edit them in Vim.
http://www.vim.org/scripts/script.php?script_id=521
Besides :oldfiles
, fzf.vim has :History
.
Start Vim and hit Ctrl-o-o to open previously edited file. Keep hitting o (while still pressing the Ctrl key) to cycle back through earlier files. See https://dev.to/jovica/3-little-known-but-useful-vim-tips-1pbg