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

2010-01-27 Thread Rémi Prévost
Ben Fritz a écrit : > 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 fe

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

2010-01-27 Thread Ben Fritz
On Jan 27, 7:27 am, Rémi Prévost 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 >  

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

2010-01-27 Thread Rémi Prévost
Benjamin R. Haskell a écrit : > > 2. With BufReadPre, you get log entries when using Vim's built-in 'help' > > But, maybe that's fine for what you're using it for. You are right, help files are logged. The solution I found is to wrap the "redir" block in a "if &buftype != 'help'" and it now exclud

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

2010-01-27 Thread Benjamin R. Haskell
On Wed, 27 Jan 2010, Rémi Prévost wrote: > Hi Agathoklis, > > Agathoklis D. Hatzimanikas a écrit : > > > You can try the following (substitute the path to the file you > > > want to save your records): > > > > > > function! RecordFileOpen() > > > let record = "\t(".strftime("%F > > > %T").

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

2010-01-27 Thread Agathoklis D. Hatzimanikas
On Wed, Jan 27, at 06:36 Rémi Prévost wrote: > Agathoklis D. Hatzimanikas a écrit : > > > Sorry, I forgot but you need another event also, BufEnter is a choise > > > that works. > > But won't using BufEnter add a line to the log each time a buffer is > displayed (eg. when switching tabs)? I only w

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

2010-01-27 Thread Rémi Prévost
Agathoklis D. Hatzimanikas a écrit : > > Sorry, I forgot but you need another event also, BufEnter is a choise > > that works. But won't using BufEnter add a line to the log each time a buffer is displayed (eg. when switching tabs)? I only want it to log files when they are being opened in vim. -

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

2010-01-27 Thread Rémi Prévost
Hi Agathoklis, Agathoklis D. Hatzimanikas a écrit : > > You can try the following (substitute the path to the file you want to > > save your records): > > > > function! RecordFileOpen() > > let record = "\t(".strftime("%F > > %T").")\t/Users/remi/".expand("%:t").".txt" > > redir>> /pat

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

2010-01-27 Thread Agathoklis D. Hatzimanikas
On Wed, Jan 27, at 04:11 Agathoklis D. Hatzimanikas wrote: > Hi Rémi, > > On Wed, Jan 27, at 05:27 Rémi Prévost 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

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

2010-01-27 Thread Agathoklis D. Hatzimanikas
Hi Rémi, On Wed, Jan 27, at 05:27 Rémi Prévost 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/some

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

2010-01-27 Thread Rémi Prévost
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 tri