这时候主角登场了——SideBarEnhancements。
当然这个玩意儿也是一个非常好用的工具栏,当你在文件上邮件的时候,出现了你意想不到的东西
SideBarEnhancements是一个可以自定义打开方式快捷键的工具包。他可以定义不同的快捷键打开不同的浏览器。接下来,我们先安装它。在Sublime Text按下ctrl+shift+P打开命令面板,输入pcip,第一个就是安装控制包的选项了。
安装完成之后搜索“SideBarEnhancements”,还是第一个,直接回车确认。骚等一会儿就安装成功了。
如果无法在线安装,可以尝试通过下载安装包,放到Packages目录。(https://github.com/titoBouzout/SideBarEnhancements/)
接下来配置快捷键:preferences --> package Setting --> side bar --> key binds - user
复制如下代码(mac)
[
// 习惯command+b默认Chrome
{ "keys": ["command+b"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "/Applications/Google Chrome.app",
"extensions":".*"
}
},
// Safari
{ "keys": ["command+2"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "/Applications/Safari.app",
"extensions":".*"
}
},
// Firefox
{ "keys": ["command+3"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "/Applications/Firefox.app",
"extensions":".*"
}
}
]
Windows如下:
[
{ "keys": ["ctrl+shift+c"], "command": "copy_path" },
//chrome
{ "keys": ["f1"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
"extensions":".*" //匹配任何文件类型
}
},
//firefox
{ "keys": ["f2"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "D:\Program Files\Mozilla Firefox\firefox.exe",
"extensions":".*"
}
},
//ie
{ "keys": ["f4"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:\Program Files\Internet Explorer\iexplore.exe",
"extensions":".*"
}
},
//safari
{ "keys": ["f5"], "command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "D:\Program Files\Safari\safari.exe",
"extensions":".*"
}
}
]
注意浏览器安装路径