如何在vim中每1秒自动保存一个文件? [英] How to auto-save a file every 1 second in vim?

查看:25
本文介绍了如何在vim中每1秒自动保存一个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想知道为什么你不应该自动保存,或者有交换文件等或任何不自动保存的原因.

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.

我只想自动保存当前工作文件,以便在 vim 中每 1 秒保存一次.

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

我怎样才能做到这一点?

How can I achieve this?

推荐答案

这会在文本更改时保存缓冲区.(Vim 7.4)

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

autocmd TextChanged,TextChangedI ;静默写

这篇关于如何在vim中每1秒自动保存一个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆