xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

neocomplcache updatetime fiddling causing warning from easytags #17

Closed Valloric closed 12 years ago

Valloric commented 12 years ago

I use neocomplcache, which seems to set updatetime to 300ms when in insert mode. When the user leaves insert mode, it sets updatetime back to 4000ms. So when I'm in insert mode, easytags complains about an unreasonable updatetime value.

The relevant code from neocomplcache is here. The default value for g:neocomplcache_cursor_hold_i_time is 300.

I see the relevant easytags code. Could we perhaps get a flag that we can set that will cause easytags to bail on such short updatetime events? Neo will set updatetime back to 4000 after the user leaves insert mode, so easytags can continue after that. Basically I'm asking for a flag that will cause easytags to silently skip these rapid events and resume when we get back to 4000ms.

Or some other solution. Anything that will remove those annoying messages will be fine. :)

Valloric commented 12 years ago

Oh and I'm willing to code up the solution I proposed and then create a pull request if you're busy.

xolox commented 12 years ago

I just pushed version 2.5.8 of the easytags plug-in which contains a new option that should do what you suggested. It's disabled by default unless the neocomplcache plug-in is detected in which case it will be enabled out of the box (so after you update the plug-in it should just work). I hope this fixes the issue for you. Thanks for the bug report!

Valloric commented 12 years ago

I won't be able to test this out for a few days, but I looked at the code and it looks good to me. Thanks for the fix, you're awesome! I especially like the neo autodetection.

Valloric commented 12 years ago

Sorry it took so long, but I just wanted to confirm that your fix does indeed work as expected. Thanks again!

ghost commented 12 years ago

Just want to mention that this problem also occurs when using ConqueTerm, because it sets updatetime to 50 ms. The problem is fixable with the new option.

tgvaughan commented 12 years ago

Hate resurrecting old threads, but this is also a problem with minibufexplorer. However, unlike neocomplcache, mbe sets updatetime=300 permanently --- not only while in insert mode. Thus, the g:easytags_updatetime_disable option isn't really useful here as minibufexplorer never raises the updatetime period above the 4000ms threshold, meaning that easytags never actually updates.

Might it be possible instead to have easytags update the taglist only on multiples of the updatetime period in the instance that updatetime is smaller than 4000? Just an idea..