VSCode 中的 Powerpoint 预览

发布于 2025-01-11 13:48:34 字数 295 浏览 0 评论 0 原文

我正在使用 vscode 编辑 Markdown 文件,有时会有指向 powerpoint 文件的链接,例如 [presentation](powerpoint.ppt)
我现在可以Ctrl+Click 在 VScode 中打开 powerpoint 文件,但它只显示文件未显示在编辑器中,因为它是二进制文件或使用不受支持的文本编码。 .
我希望能够直接在 vscode 中预览 pptx 文件,或者找到一种简单的方法在外部应用程序中打开它。
有什么建议吗?
谢谢

I am using vscode to edit markdown files, and I have sometime links to powerpoint file such as [presentation](powerpoint.ppt).
I can now Ctrl+Click to open the powerpoint file in VScode, but it shows nothing than the file is not displayed in the editor because it is either a binary or use unsupported text encoding...
I would like to be able to preview the pptx file directely in vscode, or find a simple way to open it in an external application.
Any suggestion?
thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼前雾蒙蒙 2025-01-18 13:48:34

AFAIK 您无法直接在 VSCode 中打开这些文件,但是您可以使用诸如 在外部应用中打开(您可以通过 vscode 中的扩展搜索找到该扩展)。

安装后,您可以更新您的 settings.json 配置:

{ 
 // [...]
"openInExternalApp.openMapper": [
        {
            // represent file extension name
            "extensionName": "pptx",
            // the external applications to open the file which extension name is html
            "apps": [
                // openCommand can be shell command or the complete executable application path
                // title will be shown in the drop list if there are several apps
                {
                    "title": "powerpoint",
                    // This will vary depending on your OS, you can also use a PPT viewer of your chosing
                    // On Windows, could be Program Files (x86) and a different version of Office, but you get the idea
                    "openCommand": "C:\\Program Files\\Microsoft Office\\root\\Office16\\powerpnt.exe"
                },
            ]
        }
    ]
}

AFAIK you can't open those files directly in VSCode, however you can open them in another application by using an extension such as Open in External App (you can find the extension via the extension search in vscode).

Once installed you can update your settings.json configuration :

{ 
 // [...]
"openInExternalApp.openMapper": [
        {
            // represent file extension name
            "extensionName": "pptx",
            // the external applications to open the file which extension name is html
            "apps": [
                // openCommand can be shell command or the complete executable application path
                // title will be shown in the drop list if there are several apps
                {
                    "title": "powerpoint",
                    // This will vary depending on your OS, you can also use a PPT viewer of your chosing
                    // On Windows, could be Program Files (x86) and a different version of Office, but you get the idea
                    "openCommand": "C:\\Program Files\\Microsoft Office\\root\\Office16\\powerpnt.exe"
                },
            ]
        }
    ]
}
幻想少年梦 2025-01-18 13:48:34

Mac 用户会改变这条线。
“openCommand”:“/Applications/Microsoft powerpoint.app”

Mac owners would change this line.
"openCommand": "/Applications/Microsoft powerpoint.app"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文