set default editor to vim code example
Example 1: set git editor to vim
git config --global core.editor "vim"
Example 2: set vim default editor
sudo update-alternatives --config editor
git config --global core.editor "vim"
sudo update-alternatives --config editor