sublime text2如何设置快捷键让HTML文件在火狐浏览器预览?

2025-01-14 22:35:18
推荐回答(1个)
回答1:

额。。。我没有下open_in_browser,按照下面步骤设置成功了。

配置在Chrome,Firefox中打开

安装 SideBarEnhancements(packages control-> 输入install packages-> SideBarEnhancements能找到这个插件)
然后通过ctrl + k, ctrl + b打开侧边栏,在侧边栏的html文件上右击,找到 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
}
}
]
}
]
设置快捷键
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
}
}

]