If you are using the elegant Sublime Text editor to write your web pages, and you want to refresh the page using the keyboard. Here is the trick:

1/ Open Sublime Text and create a new file and save it to C:/refresh.vbs

2/ If you are using Google Chrome, paste these lines to the created file:

Set chrome = WScript.CreateObject(“WScript.Shell”)
chrome.AppActivate(“chrome”)
chrome.SendKeys “{F5}”
chrome.AppActivate(“TextPad”)

Or if you are using Mozilla Firefox then paste this instead:

Set firefox = WScript.CreateObject(“WScript.Shell”)
firefox.AppActivate(“firefox”)
firefox.SendKeys “{F5}”
firefox.AppActivate(“TextPad”)

Save the file and close it.

2 / Go to Tools -> Build System -> New Build System

01

3/ Change the content of the new build system file to:

{
“shell_cmd”: “C:/refresh.vbs”
}

Save the file as webpreview.sublime-build.

4/ Go to Tools -> Build System and make sure webpreview is checked.

Make sure your browser active tab is the one showing the page you’re creating, then you should be able to preview the page by pressing Ctrl+B .

Done, happy coding!