On Mon, 23 Oct 2006 at 9:25pm, Bram Moolenaar wrote: > > Hari Krishna Dara wrote: > > > I am using :startinsert! from my plugin to put the user in insert mode, > > but if the user doesn't type anything for 'updatetime' after this, no > > CursorHoldI event is generated. I tried doing an explicit :doauto right > > after :startinsert!, but Vim ignores it, probably because the command > > only schedules for an insert mode (doesn't immediate change it). > > > > Note that the CursorMovedI gets triggered correctly in this case, but I > > don't want to use that as I don't want to know about every character > > that user types, but only when the user is holding. > > > > Any suggestions for a workaround? > > > > I have Vim7 upto the patch 146. > > It works just fine for me. After typing "i" and waiting a little while > the CursorHoldI event is triggered. I used this: > > au! CursorHoldI * echomsg 'hi' | sleep 2 >
You are right, I had an internal flag getting set unexpectedly that was resulting in getting the event ignored. Sorry about that. -- Thanks, Hari __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com