VIM recently edited files history
Asked Answered
C

5

9

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.

Cortney answered 11/8, 2010 at 10:9 Comment(0)
I
4

As standard, no, but there's a plugin here that adds this functionality. This one also mentions recent file history on the page, so it may provide an alternative.

Incommodity answered 11/8, 2010 at 10:11 Comment(0)
T
5

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.

Tafilelt answered 16/11, 2015 at 17:35 Comment(0)
I
4

As standard, no, but there's a plugin here that adds this functionality. This one also mentions recent file history on the page, so it may provide an alternative.

Incommodity answered 11/8, 2010 at 10:11 Comment(0)
S
3

As this answer indicates, one may use ctrl-o to jump backward in file history. It will automatically open previously edited files.

Shumpert answered 21/8, 2013 at 16:24 Comment(0)
T
2

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.

Teresetereshkova answered 18/2, 2013 at 14:50 Comment(0)
I
1

You can use :marks to navigate between recently used files.

Intermix answered 18/2, 2013 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.