Multiple git editors
Is it possible to have different editors configured for different git commands?
- git commit => nano
- git rebase -i => sublime text
Or is there possibly some scripts that could act as an intermediator and analyse what kind of command I executed and then pen my desired editor?
One Solution collect form web for “Multiple git editors”
You can use the
core.editor will be used for committing, and
sequence.editor will be used for interactive rebasing:
git config --global core.editor nano git config --global sequence.editor <path to sublime text>
From the official Linux Kernel Git documentation for
Commands such as commit and tag that lets you edit messages by launching an editor uses the value of this variable when it is set, and the environment variable GIT_EDITOR is not set. See git-var(1).
Text editor used by
git rebase -ifor editing the rebase insn file. The value is meant to be interpreted by the shell when it is used. It can be overridden by the GIT_SEQUENCE_EDITOR environment variable. When not configured the default commit message editor is used instead.