1. 安装Package Control
2. 利用Package Control包管理工具安装SidebarEnhancement插件
3. 右键项目->Project->Edit Preview Urls打开SideBarEnhancements.json,添加如下代码
WIN系统下的代码
{
"D:/xampps/htdocs/": {
"url_testing": "http://localhost/",
"url_production" : ""
}
}
苹果Mac系统下的代码:
{
"/Library/WebServer/Documents/": {
"url_testing": "http://localhost/",
"url_production" : ""
}
}
图片如下
4. 点击Preferences->Package Settings->Side Bar->Key Bindings-User,打开一键绑定文件,添加如下代码
[
{"keys":["command+1"],"command":"side_bar_open_in_browser","args":{"paths":[],"type":"testing","browser":"chrome"}},
{"keys":["command+2"],"command":"side_bar_open_in_browser","args":{"paths":[],"type":"testing","browser":"Safari"}},
]
如图