-
-
Notifications
You must be signed in to change notification settings - Fork 51
Description
I have this VS Code setting enabled:
Git: Terminal Git Editor
Controls whether to enable VS Code to be the Git editor for Git processes spawned in the integrated terminal.
It sets $GIT_EDITOR
to "/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/git-editor.sh"
.
I also have $VISUAL
set to micro
. So when I use Git inside VS Code, it opens a VS Code editor for the rebase todo. Outside of VS Code, it uses micro.
When I press !
in git-interactive-rebase-tool
, it opens micro, even if I'm using Git within VS Code.
From https://git-scm.com/docs/git-var:
GIT_EDITOR
The order of preference is the$GIT_EDITOR
environment variable, thencore.editor
configuration, then$VISUAL
, then$EDITOR
, and then the default chosen at compile time, which is usuallyvi
.
GIT_SEQUENCE_EDITOR
The order of preference is the$GIT_SEQUENCE_EDITOR
environment variable, thensequence.editor
configuration, and then the value ofgit var GIT_EDITOR
.
https://github.com/MitMaro/git-interactive-rebase-tool/blob/master/src/config/git_config.rs checks core.editor
, $VISUAL
, $EDITOR
, then defaults to vi
. Before all of that, it should check $GIT_EDITOR
.