Vim- need timer for autosave -


in vim, have autosave file with:

augroup write_it     autocmd!     autocmd insertleave * write     autocmd textchanged * write augroup end 

it works good. need place wait in there when rapidly delete characters in command mode textchanged. ideas how? nightmare livereload , gulp tasks watchers front end development.

i tried exec 'sleep 2' vim async , it's useless.

check cursorhold , cursorholdi events. triggered after period of inactivity according 'updatetime' option. can use them.

there autowrite. anyway, can go complicated, in opinion best alternative reuse code thought :-)

autosave plugin: https://github.com/907th/vim-auto-save.git


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -