File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 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 ],
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments