下载插件,须要“FQ”,故提供一下该插件的github地址:https://github.com/titoBouzout/SideBarEnhancements/html
在打开的配置文件中,输入如下代码:(以设置chrome浏览器为例),注意:ctrl + s 保存git
1 { 2 "default_browser": "chrome"//one of this list: firefox, , canary, chromium, opera, safari, ie 3 }
保存后,在html文件上右键Open In Browser->Default,便可用chrome打开html;github
而后在打开的配置文件中添加下面的代码,ctrl+s 保存;chrome
1 [ 2 { "keys": ["f1"], "command": "side_bar_files_open_with", 3 "args": { 4 "paths": [], 5 "application": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\Chrome", 6 "extensions":".*", 7 }, 8 }, 9 { "keys": ["ctrl+t"], "command": "side_bar_files_open_with", 10 "args": { 11 "paths": [], 12 "application": "C:\\Program Files (x86)\\Internet Explorer\\iexplore", 13 "extensions":"html", 14 }, 15 }, 16 ]
上面的代码设置效果为:json
“F1”键 可运行chrome浏览器来展现当前页面,无论它是什么格式的文件;浏览器
“Ctrl”+“T” 组合键,若是当前页面是html页面,才会运行IE浏览器来展现页面;app
在保存配置文件的时候,若是报错相似:error trying to parse file:xxx 的时候,通常状况都是配置代码中缺乏了一些关键符号,好比逗号,引号等,也可能多了些没必要要的符号,致使没法解析json字符串;ide
如图:其中少写了一个逗号,致使报错;this
————————————————————————————————————————————————————————————spa