当我在 Chrome 中保存对 html 文件的更改时自动重新加载浏览器? [英] Auto-reload browser when I save changes to html file, in Chrome?

查看:30
本文介绍了当我在 Chrome 中保存对 html 文件的更改时自动重新加载浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Vim 中编辑一个 HTML 文件,我希望浏览器在下面的文件发生变化时刷新.

I'm editing an HTML file in Vim and I want the browser to refresh whenever the file underneath changes.

是否有适用于 Google Chrome 的插件可以侦听文件的更改并在每次我保存对文件的更改时自动刷新页面?我知道有适用于 Firefox 的 XRefresh,但我根本无法运行 XRefresh.

Is there a plugin for Google Chrome that will listen for changes to the file and auto refresh the page every time I save a change to the file? I know there's XRefresh for Firefox but I could not get XRefresh to run at all.

自己编写脚本来执行此操作有多难?

How hard would it be to write a script to do this myself?

推荐答案

我想你不是在使用 OSX?否则你可以用applescript做这样的事情:

I assume you're not on OSX? Otherwise you could do something like this with applescript:

http://brettterpstra.com/watch-for-file-changes-and-refresh-your-browser-automatically/

还有一个名为自动刷新加"的 chrome 插件,您可以指定每 x 秒重新加载一次:

There is also a plugin for chrome called "auto refresh plus" where you can specify a reload every x seconds:

https://chrome.google.com/网上商店/详细信息/自动刷新加号/oilipfekkmncanaajkappbpancpelijih?hl=en

这篇关于当我在 Chrome 中保存对 html 文件的更改时自动重新加载浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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