Vim 的自动阅读是如何工作的? [英] How does Vim's autoread work?

查看:23
本文介绍了Vim 的自动阅读是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

:h autoread 说:

当检测到一个文件在 Vim 之外被更改而在 Vim 内部没有被更改时,自动重新读取它.

When a file has been detected to have been changed outside of Vim and it has not been changed inside of Vim, automatically read it again.

在我的 vimrc 中放入 set autoread 后,我用 Vim 打开一个文件,切换到另一个编辑器,更改文件,然后等待在 Vim 中看到更改为好.没发生什么事.我必须使用 :e 用新内容重新加载文件.

After putting set autoread in my vimrc, I open a file with Vim, switch to another editor, change the file, and wait to see the changes in Vim as well. Nothing happens. I have to use :e to reload the file with the new content.

我错过了什么?我在 Mac 10.5.8 上使用 Vim 7.2

推荐答案

除非您执行某些操作,否则自动读取不会重新加载文件像运行外部命令(如 !ls 或 !sh 等)vim 不定期检查您可以使用 :e

Autoread does not reload file unless you do something like run external command (like !ls or !sh etc) vim does not do checks periodically you can reload file manually using :e

此线程中的更多详细信息:点击这里

More details in this thread: Click here

这篇关于Vim 的自动阅读是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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