将VSCode设置为我的Mac M1';Git的默认编辑器

将VSCode设置为我的Mac M1';Git的默认编辑器,git,macos,visual-studio-code,apple-silicon,Git,Macos,Visual Studio Code,Apple Silicon,最近得到了一个M1,我正试图用默认的shellzsh。 我尝试的第一件事是使用bash的常规行: git config--global core.editor“code-w” 这句话过去很有魅力,但现在不一样了,我一次又一次地犯这个错误 hint: Waiting for your editor to close the file... code -w: code: command not found error: There was a problem with the editor 'cod

最近得到了一个M1,我正试图用默认的shell
zsh
。 我尝试的第一件事是使用
bash
的常规行:

git config--global core.editor“code-w”

这句话过去很有魅力,但现在不一样了,我一次又一次地犯这个错误

hint: Waiting for your editor to close the file... code -w: code: command not found
error: There was a problem with the editor 'code -w'.
然后,我尝试将export
EDITOR=“code-w”
行添加到
~/.zshrc
中,甚至按照以下步骤从shell命令安装到vscode中:
install'code'in command PATH
,但显然它在bash而不是zsh中安装了所有依赖项

我到处都在搜索如何在新的M1模型上配置vsc,但没有找到任何与之相关的内容


如果有人能透露一些如何做到这一点,我们将不胜感激。一般来说,将VSC作为我的默认文本编辑器也很好,不仅适用于Git,而且适用于所有内容。

正如您所看到的,这可以:

 git config --global core.editor "/usr/local/bin/code"
<>但是你也可以考虑安装(几天)VSCode 1.54(2月2021日):


(目前这仍然是一个问题)

正如您所看到的,这是有效的:

 git config --global core.editor "/usr/local/bin/code"
<>但是你也可以考虑安装(几天)VSCode 1.54(2月2021日):


(目前这仍然是一个问题)

where code?'/usr/local/bin/code'在配置git时,您在VSC或终端中的意思是什么?在终端中,
where code
?'/usr/local/bin/code'在配置git时,您在VSC或终端中的意思是什么