Sublime text3 设置快捷键打开指定浏览器预览

来源:互联网 发布:网络分流器和交换机 编辑:程序博客网 时间:2024/05/21 06:48

使用Sublime text3编写代码,发现快捷键F2在浏览器的预览功能竟然失效了,之前一直都是正常的,这款软件使用很久了,已经忘记当初是怎么配置的,于是在网上搜了设置自定义预览的方式
第一步:在Package Control安装SideBarEnhancements插件
第二步:打开Preferences > Key Bindings > Default(Windows).sublime-keymap—User
第三步:把下面的代码复制到中括号[]中,keys参数修改为想要设置的快捷键,application参数修改成本机的浏览器安装地址

//chrome{    "keys": ["f2"],//快捷键    "command": "side_bar_files_open_with",    "args":    {        "paths": [],        "application": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",//浏览器安装路径(路径中的\\线是转义\,不设置可能报错)        "extensions": ".*" //匹配任何文件类型    }},//firefox{    "keys": ["f3"],    "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 (x86)\\Internet Explorer\\iexplore.exe",        "extensions": ".*"    }}

第四步: 保存,按快捷键测试启动浏览器预览,反正我是启动成功了。

阅读全文
0 0
原创粉丝点击