Preferences -> Key Bindings 进入设置快捷键的页面,输入以下代码
//默认浏览器
{"keys": ["f1"], "command": "open_in_browser"},
//Chrome
{"keys": ["f2"],
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
"extensions": ".*"
}
},
//QQ浏览器
{
"keys": ["f3"],
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "D:\\Heather_install\\QQBrowser\\QQBrowser.exe",
"extensions": ".*"
}
}
为不同的浏览器设置不同的快捷键,之后使用快捷键皆可以运行html代码。