Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

autosave - How to auto-save a file every 1 second in vim?

I don't want to know about why you should not auto-save or there is swap file etc or whatever reason to not auto-save.

I simply want to auto-save the current working file to save in every 1 second in vim.

How can I achieve this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This saves the buffer whenever text is changed. (Vim 7.4)

autocmd TextChanged,TextChangedI <buffer> silent write


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...