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

Support Vim 8’s built-in async and timers #151

Open roryokane opened 7 years ago

roryokane commented 7 years ago

Vim 8.0 was released yesterday, and its new features include background jobs, timers, and asynchronous I/O using channels.

Your description for the g:easytags_async option says that async isn’t the default yet because you’re not sure if it will work reliably for everybody. If you change easytags.vim to use Vim’s new built-in functions such as job_start(), the async tag generation would be more likely to be reliable. Then you could finally make it the default, providing a smoother experience for all users.

You could also add ang:easytags_on_timer option, if you think there would be a demand for it. Though personally I think async would be all I need.

However, you probably shouldn’t remove the current synchronous and hacky-async methods until enough people have had the chance to upgrade to Vim 8.

jalcine commented 7 years ago

Doing a very quick scan of the code, it looks like a lot of the logic for generating tags is here. This would be an undertaking looking at the subtle differences of neovim and vim8's approaches to job control / channels.

Taverius commented 7 years ago

async.vim exists, so that should simplify things.

It doesn't have fallback to non-8 vim sync, but that's already built in here.