Wednesday, January 27, 2010

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

On Jan 27, 7:27 am, Rémi Prévost <remip...@gmail.com> wrote:
> 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.
>
>

Are you aware of the "Most Recently Used" plugin from Yegappan?

http://www.vim.org/scripts/script.php?script_id=521

This is one a very small set of plugins I actually use.

You will probably set the MRU_Max_Entries option appropriately to get
the history from a few days ago, if you work on a large number of
files in a given day.

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

No comments: