I want a solution that does what's described in the vim wiki here, but that works on Chrome.
That is, I'm trying to avoid this:
The vim wiki solution is for firefox, and other scripts and solutions I've found on the web are Mac only. But I'm on windows, and will often have vim open on the left half of the screen (editing html) and chrome open on the right half of the screen (displaying the file I'm editing).
A really "dumb" solution would work fine for me. That is, there wouldn't even need to be communication of the filename between vim and the browser. If I could just turn on a mode in vim, call it "auto-refresh", and now anytime I do a :w
the currently active tab in chrome refreshes itself, without taking focus off the vim window. That would be perfect. Is it possible?
I don't know how to reload a give chrome page from shell, however, I agree with Chiel92 that if you need to see your changes when file changes, you can do that from browser.
See LiveReload, works with Windows & Mac (not for me then) and supports Safari & Chrome.
LiveReload will check your main page as well all css and javscript that it depends from, if any of those changes, it will reload it.
They seems to have launched a second version, however official site of version 2 it's offline and doesn't seem version 2 it's on github either. (Version 1 it's it's on github)
a solution that might work for you is in your html coding include the line in the head tag
<meta http-equiv="refresh" content="30" />
this will reload the page every 30 seconds directly taking from w3schools.com now when you want to deploy it just remove that line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With