50 likes | 65 Views
Sometimes you may need to set default editor for Git. Here is how to set vim default editor for Git. #git #vim <br><br>Visit https://fedingo.com/how-to-set-vim-default-editor-for-git/
E N D
Set core editor Open terminal and run the following command to set core.editor for git. git config --global core.editor "vim" This is a permanent change and persists even if you quit your session or reboot your system.
Set Global Editor Open terminal and run the following command to set GIT_EDITOR environment variable. export GIT_EDITOR=vim
Set Default Editor for All Programs If you want vim to be the default editor for all programs run the following commands. export VISUAL=vim export EDITOR="$VISUAL" Please note, the above commands will work only till you quit your current session, or reboot your system. To make it permanent, you need to add these commands to ~/.bashrc file.
Thank You Visit for details https://fedingo.com/how-to-set-vim-default-editor-for-git/