xolox/vim-easytags — pull request #49 by xolox (2013-05-20 13:28:06+00:00)
Title: Asynchronous tag updates

I would love to see asynchronous tag updating implemented and working so reliably that it can be made the default. In pull request #43 I discussed with @inkarkat how to implement this in a portable manner (without too much dependencies and machinery). He pointed out that I could always fork Vim to the background:

>> @inkarkat said:
>> One idea I had was to strip off the tags updating part of easytags into a separate Vimscript, and then just launch a non-interactive separate Vim process in the background (without loading .vimrc and other plugins). Though not as efficient as Python or binary, it might be a good compromise, and everybody probably has a terminal Vim available :-)
>
> @xolox said:
>For some reason this seems really dirty to me :-) however it would definitely be portable *and* it would completely solve the code duplication issue. You definitely got me wondering, so I tried it out and it seems surprisingly fast:
>
> peter@lucid-vm> time vim -u NONE -U NONE --noplugin --cmd 'call xolox#misc#msg#info("testing, 1, 2, 3") | scriptnames | quit'
>
> … Vim startup screen snipped …
>
> testing, 1, 2, 3
>
> 1: ~/Dropbox/Dotfiles/vim/autoload/xolox/misc/msg.vim
>
> vim -u NONE -U NONE --noplugin --cmd 0.00s user 0.02s system 58% cpu 0.034 total
>
> Hopefully I'll have some time to create a prototype to play around with in the next weekend.

So a bit later than estimated, but here's a start. This code definitely still has some issues, so instead of simply releasing it as the default I'm keeping it in a feature branch until I trust it a bit more :-).