在看到连老师使用vscode替代stata的do文档编辑器的文章后,我也尝试按照文章中的步骤进行配置,但是配置完成后发现code-runner.CustomCommand中设置的命令不能起作用,而是一直提示:
[Running] echo Hello
Hello
[Done] exited with code=0 in 0.042 seconds
即一开始配置于code-runner.CustomCommand中的rundolines无法使用,rundo虽然也能通过创建一个tempdofile来执行选中行的命令,但经常会出错误。我一开始以为是rundolines出了问题,然后我对调了一下配置:
"code-runner.executorMapByFileExtension": {
".do": "D:\\stata16MP\\stata16\\PERSONAL\\rundolines51\\rundolines.exe",
"code-runner.CustomCommand": "D:\\stata16MP\\stata16\\PERSONAL\\rundo51\\rundo.exe",
"stataRun.stataPath": "D:\\stata16MP\\stata16\\StataMP-64.exe",
"stataRun.whichApp": "stataMP",
"stataRun.pasteSpeed": 1,
"stataRun.advancePosition": false,
注意此处后面还有内容,后面没有少花括号。我发现把rundolines配置到.do中去时就起作用了,而rundo不起作用了,所以应该是这个customcommand设置错误。虽然这样只用rundolines也还是比较方便的,但是我还是比较疑惑为什么customcommand设置了之后不起作用,是我放错了位置吗?还请专业人士赐教



雷达卡




京公网安备 11010802022788号







