- 首先中文名的或路径中带中文的文件目前是无法打开的,github上还再讨论这个问题(可将路径改成全英文)
https://github.com/tjx666/open-in-external-app/issues/5
只要路径带有非 ascii 字符就打不开,因为扩展使用的 API vscode.env.openExternal 本身不支持。
- 纯英文路径仍无法打开可以在setting.json文件中添加
"isElectronApp": true
配置项解决问题
"openInExternalApp.openMapper": [
{
// 文件后缀名
"extensionName": "md",
"apps": [
{
// 添加如下配置
"isElectronApp": true,
"title": "typora",
// exe文件路径,需要换成自己的
"openCommand": "D:\\typora\\Typora\\Typora.exe"
}
]
}
]
参考 Open markdown-file by Typora (windows) · Issue #7 · tjx666/open-in-external-app · GitHub