方法一:
1.安装sidebarenhancements插件
ctrl+shift+p
—> Install Package
—> 找到SideBarEnhancements
2.配置预览快捷键
Ctrl +Shift + P ----------Key Bindings
在弹出框右边的users的 [ ] 里写入:
{ "keys": ["f12"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
"extensions":".*"
}},
完成
快捷键为f12;可以自行设置;
application为浏览器的路径,其他原样粘贴。
方法二:
Tolls----Build System----New Build System
在打开的文件里写入:
{
"cmd": ["C:/Program Files (x86)/Google/Chrome/Application/chrome.exe", "$file"], // "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" 为Chrome浏览器在电脑里的文件路径,其他原样粘贴
"selector": ["text.html"]
}
最后:重要!!:将文件名设置为 xx.sublime-build
到此处便成功了
将Tolls----Build System----选择Automatic
对于html文件,Ctrl+B,便可以打开浏览器效果了。