【发布时间】:2020-08-15 05:35:54
【问题描述】:
我最近安装了 Oh My Zsh 和 VS code。每当我输入git commit 时,它都不会打开代码,而是显示以下错误消息:
hint: Waiting for your editor to close the file... error: cannot run code: No such file or directory
error: unable to start editor 'code'
Please supply the message using either -m or -F option.
我可以通过在终端中输入code 来运行代码。
采取的步骤:
我已在我的 .zshrc 中添加了以下行
# Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
plugins=(... vscode)
我已经运行了这一行:
git config --global core.editor "code --wait"
我已在代码的 settings.json 中添加了这些行
"terminal.external.osxExec": "iTerm.app",
"terminal.explorerKind": "external",
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.shell.linux": "/bin/zsh"
}
我错过了什么?谢谢!
【问题讨论】:
标签: git visual-studio-code terminal zsh iterm2