Does the Sublime Text 2 editor support real time H

2019-03-08 00:51发布

Does the Sublime Text 2 editor support real time HTML & CSS preview?

2条回答
看我几分像从前
2楼-- · 2019-03-08 01:04

I have found the easiest way to use Sublime with live HTML and CSS is to install WAMP(www.wampserver.com/en/) or XAMPP(www.apachefriends.org/en/xampp.html) which installs an Apache web server, PHP and Mysql server on your computer. Then you can edit your files in Sublime, and so long as they are located within the Apache web root folder (i believe its wamp/htdocs or xampp/htdocs) then you can go to localhost//filename.html and there is your html files. Save in Sublime and refresh the page and there are your changes.

You can also just open up the html file in Chrome or Firefox but selecting Open With... however, i have found that sometimes if you have dynamic content or links, they might not work correctly.

查看更多
Deceive 欺骗
3楼-- · 2019-03-08 01:17

There's a package for this: Browser Refresh by Giovanni Collazo. It supports OS X and Windows 7, and all major browsers.
You can install it via Package Control (or manually) and trigger it with super+shift+r in Sublime Text 2.

I haven't tested it personally since I use CodeKit for this functionality, but it seems popular.


Update:

Windows XP-compatible software

Chrome extensions

Firefox addons

IE addons


Note: Browser extensions will refresh at regular intervals, not when you save a file.

查看更多
登录 后发表回答