VSCode + Cmder集成-奇怪的问题 [英] VSCode + Cmder integration - strange issue

查看:68
本文介绍了VSCode + Cmder集成-奇怪的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能告诉我为什么在集成vscode和cmder时为什么这样:

could you tell me why while I integrate the vscode and cmder, like that:

"terminal.integrated.shell.windows": "cmd.exe",
    "terminal.integrated.shellArgs.windows": ["/k", "%CMDER_ROOT%\\vendor\\init.bat"]

并使用mini_cmder版本,一切正常.但是,如果我对完整版本的cmder执行相同操作,则上下文菜单中的在终端中打开"选项不起作用.有人知道如何解决吗?

and use mini_cmder version, everything is working fine. But if I do it the same with full version of cmder, the "Open in terminal" option from contextual menu doesen't work. Anybody know how to resolve that?

最好的问候,

crova

推荐答案

是的,要在VS Code中使用Cmder shell,您需要在cmder路径中创建一个具有以下内容的vscode.bat文件:

Yes, to use the Cmder shell in VS Code, you need to create a vscode.bat file in your cmder path with the following contents:

@echo off
SET CurrentWorkingDirectory=%CD%
SET CMDER_ROOT=C:\cmder (your path to cmder)
CALL "%CMDER_ROOT%\vendor\init.bat"
CD /D %CurrentWorkingDirectory%

然后在VS Code用户设置中,将以下内容添加到settings.json文件中:

then in your VS Code user settings, add the following to your settings.json file:

"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": ["/K", "C:\\cmder\\vscode.bat"]

这篇关于VSCode + Cmder集成-奇怪的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆