在瀏覽器中打開預覽sublime text當前所編輯文件的方法和快捷鍵設置

配置在Chrome,Firefox中打開

安裝 SideBarEnhancements

然後通過ctrl + k, ctrl + b打開側邊欄,在側邊欄的文件中右擊,找到 open width -> edit applications

然後在這裏邊設置firefox打開的方式。

application : 路徑要修改爲自己默認安裝的路徑。

複製代碼
[
    {"id": "side-bar-files-open-with",
        "children":
        [
            //application firefox
            {
                "caption": "firefox",
                "id": "side-bar-files-open-with-firefox",

                "command": "side_bar_files_open_with",
                "args": {
                            "paths": [],
                            "application": "D:\\Program Files\\Mozilla Firefox\\firefox.exe",
                            "extensions":".*" //any file with extension
                        }
            },

            {"caption":"-"},
            {
                "caption": "chrome",
                "id": "side-bar-files-open-with-chrome",

                "command": "side_bar_files_open_with",
                "args": {
                            "paths": [],
                            "application": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
                            "extensions":".*" //any file with extension
                        }
            }
        ]
    }
]
複製代碼

配置在IE中打開

Key bindings -> User

複製代碼
[
     { "keys": ["ctrl+shift+c"], "command": "copy_path" },
     { "keys": ["alt+f12"], "command": "open_in_browser" },
     { "keys": ["f12"], "command": "side_bar_files_open_with",
             "args": {
                "paths": [],
                "application": "D:\\Program Files\\Mozilla Firefox\\firefox.exe",
                "extensions":".*" //any file with extension
            } },
    { "keys": ["ctrl+f12"], "command": "side_bar_files_open_with",
            "args": {
                "paths": [],
                "application": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
                "extensions":".*" //any file with extension
            } 
     }     
    
]
複製代碼

如果是其它瀏覽器,可以 ctrl+shift+c 路徑,然後直接在地址欄粘貼。

這樣就可以用這三個鍵在瀏覽中預覽頁面了:

F12 : Firefox

alt + F12 : IE

ctrl + F12 : chrome

當然,你也可以配置,其它配置器用這樣的方式預覽。 

轉自:http://www.cnblogs.com/jikey/archive/2013/03/12/2955230.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章