A plugin sets $EDITOR
using vim in :terminal
.
With vim-plug:
Plug 'kyoh86/vim-editerm'
Put below lines in .zshrc
or .bashrc
.
if [[ -n "${VIM_TERMINAL}" ]]; then
function vim() {
$EDITOR $@
}
fi
Bithout being conscious.
In :terminal
, you can git commit
in buffer in the parent vim.
If you want to stop editing with the error (i.e. to stop to commit), call :Cq
or :CQ
.