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 we
You might be able to access the list from the command line with:
grep '^>' ~/.viminfo|cut -c3-|sed 's,~,'"$HOME"','
Explanation:
grep '^>' ~/.viminfo #find the list of recent files
cut -c3- #remove the first 2 characters
sed 's,~,'"$HOME"',' #replace ~ with absolute path
You could have a bash alias if you use this regularly
alias vim_mru="grep '^>' ~/.viminfo|cut -c3-|sed 's,~,'\"$HOME\"','"
:ls
to list recent files with buffer number on left-hand column.
Then do :b{buffer-number}
to jump there.
Example:
:ls
shows list of files. I want to jump to third-last file I visited.
:b3
will take me there.
For faster searching, map :ls
to something, e.g. <Leader>.
in your .vimrc file.