Sublime Text3—設置快捷鍵打開瀏覽器

摘要

用瀏覽器查看代碼效果可謂是屢見不鮮,因此用快捷鍵直接打開對應瀏覽器能夠大大提升工做效率。本篇分享個簡單的方法只需二步。html


1、安裝插件SideBarEnhancements

Ctrl+Shift+PPackage Control: Install PackageSideBarEnhancements 安裝。chrome

沒裝Package Control?請看:Sublime Text3—軟件安裝、package control插件管理瀏覽器

安裝SideBarEnhancements.png
安裝SideBarEnhancements.png


2、設置快捷鍵

菜單打開Key Bindings | user複製下面代碼,而後修改成你的瀏覽器路徑,重啓軟件。bash

菜單選擇.png
菜單選擇.png

[
    {
        "keys": ["f1"],
        "command": "side_bar_files_open_with",
        "args": {
            "application": "D:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe",
            "extensions": ".*",
            "paths": []
        }
    },
    {
        "keys": ["f2"],
        "command": "side_bar_files_open_with",
        "args": {
            "application": "C:\\Users\\delll\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe",
            "extensions": ".*",
            "paths": []
        }
    },
    {
        "keys": ["f5"],
        "command": "side_bar_files_open_with",
        "args": {
            "application": "C:\\Program Files\\Internet Explorer\\iexplore.exe",
            "extensions": ".*",
            "paths": []
        }
    }
]複製代碼

keys是按鍵,application是瀏覽器程序路徑,extensions是匹配全部的文件後綴格式。

app

Tips

1.f3是查找下一個的快捷鍵,f11是全屏的快捷鍵,設置時當心衝突!更多快捷鍵請看:Sublime Text—自帶快捷鍵介紹ide

f3默認是findnext.png
f3默認是findnext.png

2.桌面的快捷圖標怎麼看路徑?選中圖標 | 右鍵 | 屬性,反斜槓需轉義把\改成\\post

查看瀏覽器路徑.png
查看瀏覽器路徑.png


掘金:Sublime Text3—設置快捷鍵打開瀏覽器
簡書:Sublime Text3—設置快捷鍵打開瀏覽器
博客園:Sublime Text3—設置快捷鍵打開瀏覽器spa

相關文章
相關標籤/搜索