Skip to content

Commit c4fa500

Browse files
committed
feat: 支持按照markdown显示
1 parent e976991 commit c4fa500

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,14 @@
113113
"view/item/context": [
114114
{
115115
"command": "codeReDesign.applyThisCvb",
116-
"when": "resourceExtname == .cvb",
117116
"group": "cvb@1"
118117
},
119118
{
120119
"command": "codeReDesign.uploadThisCvb",
121-
"when": "resourceExtname == .cvb",
122120
"group": "cvb@1"
123121
},
124122
{
125123
"command": "codeReDesign.analyzeThisCvb",
126-
"when": "resourceExtname == .cvb",
127124
"group": "cvb@1"
128125
}
129126
],

src/siderBar.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,14 @@ export function registerCvbContextMenu(context: vscode.ExtensionContext) {
5959
context.subscriptions.push(watcher);
6060
}
6161

62-
// 注册右键菜单命令
63-
vscode.commands.registerCommand('codeReDesign.showFile', (uri: vscode.Uri) => {
64-
vscode.window.showTextDocument(uri);
65-
});
62+
// 注册命令
63+
context.subscriptions.push(
64+
vscode.commands.registerCommand('codeReDesign.showFile', (uri: vscode.Uri) => {
65+
// 如果插件已安装,使用其命令打开文件
66+
vscode.commands.executeCommand('markdown.showPreview', uri);
67+
//vscode.commands.executeCommand('vscode.open', uri);
68+
})
69+
);
6670
}
6771

6872

0 commit comments

Comments
 (0)