【问题标题】:I am finding trouble to make VSCode as my default git editor, What am I doing wrong?我在将 VSCode 作为我的默认 git 编辑器时遇到了麻烦,我做错了什么?
【发布时间】:2018-03-05 04:46:17
【问题描述】:

我是使用 Git 的新手。所以我在看一些教程,他们使用记事本作为默认编辑器。但我想使用 VSCode 作为我的默认编辑器。所以当我使用像 -

这样的命令时
git config --global -e
git commit

它没有打开我的编辑器,而是为我提供了有关我的 CPU 和内存的信息。

我做错了什么?

然而,Code.exe 在我的 PATH 中:

这是我的配置:

【问题讨论】:

  • 你可以为 Windows 安装最新版本的 git,现在将 Vscode 设置为默认编辑器...

标签: git visual-studio-code


【解决方案1】:

代替-multiInst -nosession,尝试mentioned here--wait 选项:

git config --global core.editor "Code.exe -w"

【讨论】:

  • 你能帮我多一点吗?每当我尝试提交某些内容时,它都会说,编辑器“Code.exe --wait”出现问题。请使用 -m 或 -F 选项提供消息。为什么会这样?
  • @theinterpreter17 你用的是什么版本的 Git?
  • @theinterpreter17 你能试试code.exe的完整路径,如stackoverflow.com/a/34058535/6309吗?
  • @theinterpreter17 另见stackoverflow.com/a/36644561/6309(前提是您使用的是最新的 VSCode 和最新的 Git)
猜你喜欢
  • 2011-08-28
  • 1970-01-01
  • 2017-08-25
  • 1970-01-01
  • 2021-06-06
  • 2013-11-11
  • 2022-01-05
  • 2013-01-06
  • 1970-01-01
相关资源
最近更新 更多