前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >在sublime-text 中设置浏览器预览方法(2)

在sublime-text 中设置浏览器预览方法(2)

作者头像
李维亮
发布2021-07-09 11:17:52
6350
发布2021-07-09 11:17:52
举报
文章被收录于专栏:李维亮的博客

安装 SideBarEnhancements

然后通过ctrl + k, ctrl + b打开侧边栏,在侧边栏的文件中右击,找到 open width -> edit applications

然后在这里边设置firefox打开的方式。

application : 路径要修改为自己默认安装的路径。

代码语言:javascript
复制
[
    {"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

代码语言:javascript
复制
[
     { "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

当然,你也可以配置,其它配置器用这样的方式预览。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2016-03-22,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档