On Monday, March 26, 2012 10:24:53 AM UTC-5, howardb21 wrote:
> Let's say i suspend an instance of vim with ctrl-Z  or :suspend
> Is there any way to use autocommands to update vim when I restart it with
> fg on the command line?
> 
> Once put to sleep it will not know what might have happened, for instance in 
> viminfo after it went to sleep. Only method I can think of is to use the
> fileChangedShell or fileChangedShellPost. While suspended, I could somehow
> use touch to change the file's date.
> 
> When it wakes it should do autocommands triggered by the data change, but
> I do not know how vim looks for this change? Does it check the status of its 
> file very n milliseconds to see if it changed? Must it be running while the 
> change is done through some other process?

                                                        *FocusGained*
FocusGained                     When Vim got input focus.  Only for the GUI
                                version and a few console versions where this
                                can be detected.
                                                        *FocusLost*
FocusLost                       When Vim lost input focus.  Only for the GUI
                                version and a few console versions where this
                                can be detected.  May also happen when a
                                dialog pops up.

Is your terminal one of the lucky few? Does the event fire on a fg anyway?

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to