Proposal for issue #132 (superseding pull request #33) #42

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

kchr commented Mar 25, 2013

Hey.

Thanks for one of the best vim plugins there is :-)

I came across issue #132 and used the suggested code a a prototype for patching your plugin appropiately.

There's already a pull request waiting (#33), but it does not allow for user configuration of the behavior. This patch will not change the default behavior of vim-easytags.

Regards,
Kim

Adding two new options that allows for automatic delay of tag updates…
…, if another plugin require that updatetime is lower than we want.

xolox added a commit that referenced this pull request Apr 19, 2013

Workaround low 'updatetime' intelligently
This should hopefully resolve the following issues and pull
requests: #31, #33, #42. I tried several of their suggestions
in Vim 7.2 & 7.3 but it didn't work as it should IMHO.

All of the issues and pull requests seem to imply that CursorHold
events fire continuously when you set a low enough updatetime, but
in my testing on Vim 7.2 and 7.3 this is not true. The event fires
once, then Vim waits for user input before any new events fire.
I'm not sure exactly what user input is required; moving the
text cursor is not always enough but mode switching is.

So what happens (in my testing) with all of the proposed solutions is
that you stop typing for 'updatetime' milliseconds, the event fires, the
plug-in simply increments or decrements a counter and then Vim just sits
there doing absolutely nothing expect blinking the cursor...

What I'm now trying instead is to remember the last time the plug-in was
executed (the result of localtime()) and not acting on the CursorHold
event until the following condition holds true:

  localtime() > (last_automatic_run + (easytags_updatetime_min/1000))

I hope this provides a reliable solution. In any case it should be
better than the previous annoying behavior :-)
Owner

xolox commented Apr 30, 2013

Hi Kim and thanks for your feedback! I recently released a new version of the vim-easytags plug-in which should resolve the problem you were having. I solved it a bit differently from how you suggested it but it should work just as well. I'm closing this pull request now, but if you find problems with the new version feel free to report them here or in a new issue.

@xolox xolox closed this Apr 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment