Sublime Text很多人或多或少都用过,可能很多人会发现。在Sublime Text无法直接打开浏览器,没有像DW那样的快捷键。有的只是右键打开默认的浏览器。而有时候又需要打开不同的浏览器。
这时候主角登场了——SideBarEnhancements。
SideBarEnhancements是一个可以自定义打开方式快捷键的工具包。他可以定义不同的快捷键打开不同的浏览器。接下来,我们先安装它。
在Sublime Text按下ctrl+shift+P打开命令面板,输入pcip,第一个就是安装控制包的选项了。
搜索“SideBarEnhancements”,还是第一个,直接回车确认。骚等一会儿就安装成功了。
如果无法在线安装,可以尝试通过下载安装包,放到Packages目录。(https://github.com/titoBouzout/SideBarEnhancements/)
接下来,就是配置快捷了。
设置用户快捷键。复制如下代码(快捷键可以自行设置,路径可能有所不同),保存即可。
[ /*{ "keys": ["alt+f12"], "command": "side_bar_open_in_browser", "args":{"paths":[], "type":"production", "browser":""} },*/ { "keys": ["ctrl+shift+c"], "command": "copy_path" }, //chrome { "keys": ["f12"], "command": "side_bar_files_open_with", "args": { "paths": [], "application": "C://Program Files (x86)//Google//Chrome//Application//chrome.exe", "extensions":".*" } }, //firefox { "keys": ["ctrl+shift+f12"], "command": "side_bar_files_open_with", "args": { "paths": [], "application": "D://Program Files (x86)//Mozilla Firefox//firefox.exe", "extensions":".*" //匹配任何文件类型 } }, //360se { "keys": ["ctrl+f12"], "command": "side_bar_files_open_with", "args": { "paths": [], "application": "D://360//360se6//Application//360se.exe", "extensions":".*" //匹配任何文件类型 } }, //ie { "keys": ["ctrl+alt+f12"], "command": "side_bar_files_open_with", "args": { "paths": [], "application": "C://Program Files//Internet Explorer//iexplore.exe", "extensions":".*" } }, ]
原文地址:http://www.w3cfuns.com/notes/13810/d9b9ed2fb80785dae88a5344ef0f30d4.html
文章评论