1.打开Sublime,在菜单栏找到 preferences->package control->输入install package,回车
2.在弹出的输入框里输入SideBarEnhancements 安装。
3. Preferences --> Key Bindings - User
(或 Preferences -> Package Settings -> Side Bar -> Key Bindings - User) 添加如下 配置信息
[ { "keys": ["f1"], "command": "open_in_browser" }, { "keys": ["f2"], "command": "side_bar_files_open_with", "args":{"application": "D:\_jcyTools-PACKAGE\Browsers\Firefox\firefox.exe", "extensions": ".*", "paths": []} }, { "keys": ["f3"], "command": "side_bar_files_open_with", "args":{"application": "C:\Program Files\Internet Explorer\iexplore.exe", "extensions": ".*", "paths": []} }, { "keys": ["f4"], "command": "side_bar_files_open_with", "args":{"application": "D:\_jcyTools-PACKAGE\Browsers\Opera\launcher.exe", "extensions": ".*", "paths": []} }, { "keys": ["f5"], "command": "side_bar_files_open_with", "args":{
"application": "D:\_jcyTools-PACKAGE\Browsers\Safari\Safari.exe",
"extensions": ".*",
"paths": []}
} ]
这是 我根据自己的习惯 定义的快捷键:
其中:
“keys”: [xxx] --> 设置你要设置的打开对应浏览器的 快捷键;(默认:“keys”:[F12])
“command”:"open_in_browser" --> 默认命令,意思是,打开本机的 默认浏览器;(我的默认浏览器是 chorme, 所以就没有设置),
如果想设置的话,按照下边的 格式设置就好。
"args": {} --> 设置一些列参数
“application”: --> application 的路径(注意:“\”)
"extensions": --> 匹配任何文件类型