Re: buffer file status

2009-02-17 Thread Matt Wozniski
On 2/15/09, Lev Lvovsky wrote: > On Feb 14, 2009, at 1:03 AM, Matt Wozniski wrote: > >>> gvim takes care of this pretty well. It complains as soon as you >>> focus >>> the window. >> >> Which can't be detected in terminal vim > > Is that to say that when you change to a different buffer, vim can'

Re: buffer file status

2009-02-17 Thread Rodolfo Borges
what I do is open a shell and exit back to vim. has the same effect as gvim gaining focus. On Fri, Feb 13, 2009 at 8:18 PM, Lev Lvovsky wrote: > > Is there a way to tell (or be warned) if the file associated with a > buffer has been changed prior to writing and/or saving it? > > Often times we

Re: buffer file status

2009-02-17 Thread Ben Fritz
Once you've got the detection working, here's a good example of how you could handle it: http://vim.wikia.com/wiki/File_no_longer_available_-_mark_buffer_modified Or just use the defaults which will prompt you every time. --~--~-~--~~~---~--~~ You received this me

Re: buffer file status

2009-02-17 Thread Lev Lvovsky
Hi Matt, On Feb 14, 2009, at 1:03 AM, Matt Wozniski wrote: > > On Fri, Feb 13, 2009 at 7:46 PM, Javier Rojas wrote: >> On Fri, Feb 13, 2009 at 03:18:26PM -0800, Lev Lvovsky wrote: >>> Often times we update files with our version control apps, and >>> without >>> knowing it, edit the buffers, a

Re: buffer file status

2009-02-14 Thread François Ingelrest
On Sat, Feb 14, 2009 at 10:03, Matt Wozniski wrote: > Which can't be detected in terminal vim - but I think this will get > you pretty close: This command will cause vim to check if the file > has been modified every time you let the cursor sit still for > 'updatetime' seconds, so it won't be ins

Re: buffer file status

2009-02-14 Thread Matt Wozniski
On Fri, Feb 13, 2009 at 7:46 PM, Javier Rojas wrote: > On Fri, Feb 13, 2009 at 03:18:26PM -0800, Lev Lvovsky wrote: >> Often times we update files with our version control apps, and without >> knowing it, edit the buffers, and only when attempting to write to the >> file does vim complain about it

Re: buffer file status

2009-02-13 Thread Javier Rojas
On Fri, Feb 13, 2009 at 03:18:26PM -0800, Lev Lvovsky wrote: > Often times we update files with our version control apps, and without > knowing it, edit the buffers, and only when attempting to write to the > file does vim complain about it changing - is there any more proactive > way to know

buffer file status

2009-02-13 Thread Lev Lvovsky
Is there a way to tell (or be warned) if the file associated with a buffer has been changed prior to writing and/or saving it? Often times we update files with our version control apps, and without knowing it, edit the buffers, and only when attempting to write to the file does vim complain