下載插件,須要「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