天天看點

在sublime-text中設定浏覽器預覽

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

然後在這裡邊設定firefox打開的方式。

application : 路徑要修改為自己預設安裝的路徑。

在sublime-text中設定浏覽器預覽

[

    {"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",

                            "application": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",

            }

        ]

    }

]

在sublime-text中設定浏覽器預覽

Key bindings -> User

在sublime-text中設定浏覽器預覽

     { "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": {

                "application": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",

            } 

     }     

在sublime-text中設定浏覽器預覽

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

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

F12 : Firefox

alt + F12 : IE

ctrl + F12 : chrome

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

本文轉自懶得安分部落格園部落格,原文連結:http://www.cnblogs.com/jikey/archive/2013/03/12/2955230.html,如需轉載請自行聯系原作者

繼續閱讀