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
Post a Comment