sublime text 3 設定在不同瀏覽器中執行的快捷方式
阿新 • • 發佈:2018-12-31
自從遇到sublime text 後,一下子就喜歡上了這款軟體,強大的外掛支援功能,真的讓人愛不釋手!可是,不得不說,它有一個小缺點,就是隻能在預設的瀏覽器中開啟(貌似也沒有外掛可以解決這個問題(個人拙見))。。不知道別人怎麼想,反正強迫症的我是有些容忍不了,,花了不少時間,終於解決了這個問題,下面就來看看怎麼設定不同瀏覽器執行的快捷方式吧!
安裝 外掛後,開啟sublime text 3 ,Preferences->Key Bindings-User,在開啟的視窗中輸入如下程式碼(我的瀏覽器設定):
[ { "keys": ["ctrl+shift+c"], "command": "copy_path" }, // { "keys": ["alt+f12"], "command": "open_in_browser" },//預設瀏覽器開啟 { "keys": ["ctrl+fn+f1"], "command": "side_bar_files_open_with", // ctrl+fn+f1在firefox中開啟 "args": { "paths": [], "application": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "extensions":".*" //any file with extension } }, { "keys": ["ctrl+fn+f2"], "command": "side_bar_files_open_with", // ctrl+fn+f2在chrome中開啟 "args": { "paths": [], "application": "C:\\Users\\lenovo\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe", "extensions":".*" //any file with extension } }, { "keys": ["ctrl+fn+f3"], "command": "side_bar_files_open_with", // ctrl+fn+f3在ie中開啟 "args": { "paths": [], "application": "C:\\Program Files\\Internet Explorer\\iexplore.exe", "extensions":".*" //any file with extension } }, { "keys": ["ctrl+fn+f4"], "command": "side_bar_files_open_with", // ctrl+fn+f4在UC browser中開啟 "args": { "paths": [], "application": "F:\\software\\UCBrowser\\Application\\UCBrowser.exe", "extensions":".*" //any file with extension } } ]
儲存後重啟。現在你的html檔案就可以用自己設定的快捷鍵在不同的瀏覽器中運行了!!