VSCode 中的 Powerpoint 预览

cyp*_*atk 6 visual-studio-code

我正在使用 vscode 编辑 markdown 文件,有时我会链接到 powerpoint 文件,例如[presentation](powerpoint.ppt).
我现在可以Ctrl+Click在 VScode 中打开 powerpoint 文件,但它没有显示任何内容,the file is not displayed in the editor because it is either a binary or use unsupported text encoding...
我希望能够直接在 VScode 中预览 pptx 文件,或者找到一种在外部应用程序中打开它的简单方法。
有什么建议吗?
谢谢

小智 2

据我所知,您无法直接在 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"
                },
            ]
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)