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, and only when attempting to write to  
>>> the
>>> file does vim complain about it changing - is there any more  
>>> proactive
>>> way to know about this?
>>
>> 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't  
immediately check the status of that buffer for having been changed?


> - 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 instantaneous, but will probably
> be when you're making your next edit to or movement around the buffer.
> You could also add  CursorMoved,CursorMovedI  if you wanted to be
> *really* agressive, but if your OS actually checks with the filesystem
> every time :checktime is run, that might get annoying...

This will definitely work.  Certainly if I'm editing a file and not  
changing buffers, this is good (and changes do happen underneath them  
for us much of the time) - I would just think that changing to another  
could kick off all sorts of things...

thanks!
-lev

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

Reply via email to