Устранение неполадок: Как я могу заставить Git использовать VS Code при совершении коммита? - PullRequest
0 голосов
/ 30 апреля 2020

Я недавно установил Oh My Zsh и код VS. Всякий раз, когда я ввожу 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 в терминале.


Предпринятые шаги:

Я добавил следующую строку в свой .zshr c

# 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"

Я добавил эти строки в мои настройки. json в коде

    "terminal.external.osxExec": "iTerm.app",
    "terminal.explorerKind": "external",
    "terminal.integrated.shell.osx": "/bin/zsh",
    "terminal.integrated.shell.linux": "/bin/zsh"
}

Чего мне не хватает? Спасибо!

...