sublime 实现浏览器预览功能

1. 安装SideBarEnhancements插件

ctrl+shift+p —> Install Package —> 找到SideBarEnhancements

SideBarEnhancements

2. 配置预览快捷键

Preferences —> Key Bindings - User 将以下代码复制到数组中。

// chrome
{ "keys": ["f2"], "command": "side_bar_files_open_with",
        "args": {
            "paths": [],
            "application": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
            "extensions":".*"
        }
 },

// firefox
{ "keys": ["f3"], "command": "side_bar_files_open_with",
         "args": {
            "paths": [],
            "application": "D:/Program Files (x86)/Mozilla Firefox/firefox.exe",
            "extensions":".*"
        }
},

// ie
 { "keys": ["f4"], "command": "side_bar_files_open_with",
         "args": {
            "paths": [],
            "application": "C:/Program Files/Internet Explorer/iexplore.exe",
            "extensions":".*"
        }
}

上面的代码中有两处需要注意的地方,一个是keys表示快捷键,即f2可以启动chrome进行预览。另一个是application,表示浏览器所在的安装路径,只有路径配置正确,才能够正常调用浏览器。

猜你喜欢

转载自blog.csdn.net/lemon1330/article/details/77746184