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.
To search the specific previous command in the command line prompt, use : and your search key. For example; type :p and then press the upper arrow key. It will search the command that starts with p and display those commands for you. You can scroll through the history by using up and down arrow keys.
saving history seems to be the default. you may need to check $HOME/. viminfo file. it keeps command history in it.
It's in the file . viminfo (or _viminfo if you are on Windows). It should be in whatever passes for your home directory.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With