Auto-reload browser when I save changes to html file, in Chrome?

后端 未结 23 2087
半阙折子戏
半阙折子戏 2020-12-12 11:46

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

Is there a plugin for Google Chrome that will listen for ch

23条回答
  •  一向
    一向 (楼主)
    2020-12-12 12:30

    pip install https://github.com/joh/when-changed/archive/master.zip
    
    alias watch_refresh_chrome=" when-changed -v -r -1 -s ./ osascript -e 'tell application \"Google Chrome\" to tell the active tab of its first window to reload' "
    

    then just enter the directory you want to monitor execute "watch_refresh_chrome"

提交回复
热议问题