sublime 实现浏览器预览功能

xiaoxiao2021-02-28  67

1. 安装SideBarEnhancements插件

ctrl+shift+p —> Install Package —> 找到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,表示浏览器所在的安装路径,只有路径配置正确,才能够正常调用浏览器。

转载请注明原文地址: https://www.6miu.com/read-37120.html

最新回复(0)