Wednesday, January 27, 2010

How to keep an external log of each file opened in vim?

Sometimes I need to remember which set of files I was working on a few
days ago, and I'd like vim to seamlessly store the path of each file I
open (along with the date) in this kind of format:

(2010-01-27 08:20:00) /Users/remi/somefile.txt
(2010-01-27 08:25:00) /Users/remi/otherfile.txt

I tried to come up with something but the far I could get was there:

function! RecordFileOpen()
" I guess we have to do something here
endfunction
autocmd! BufReadPre * exe RecordFileOpen()

But I don't know if it's the best way to do it. I tried to search on
Google and on this mailing list for something similar but I couldn't
find anything.

Is there a way to do this?

Thank you!

- Rémi

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: