Reputation: 578
Is there a history of files edited in VIM that persists between vim sessions, e.g. last 20 opened files. I tend to edit the same .conf files and I have to navigate to them each time of course they are spread all over the filesystem.
Upvotes: 9
Views: 5112
Reputation: 8905
Actually this behavior IS built in. With default settings you should be able to use the :oldfiles
command to view a numbered list of recent files. Then use :e #>4
for example, to edit number 4 in the list. Or :browse oldfiles
, according to this answer.
Upvotes: 5
Reputation: 7395
As this answer indicates, one may use ctrl-o
to jump backward in file history. It will automatically open previously edited files.
Upvotes: 3
Reputation: 12423
You should consider giving ctrlp a chance (if you are not using it now). It provides the command:
:CtrlPMRUFiles
that let's you select previous opened files. That is besides all the other cool stuff. I was using the MRU plugin mentioned by @DrAI but once I started using ctrlp I just use that one.
Another popular plugin that provides a mru capability is Unite.
Upvotes: 2