How to set your default editor in Linux
- Edit the .bash_profile file in your home directory
- Add the following lines to your .bash_profile file
export VISUAL=vim export EDITOR="$VISUAL"
Note: Replace vim with any other preferred editor such as nano
- Logout and login again for changes to take effect.
- If you want the changes to come into play immediately, execute the following command