How to specify the use of vim in Linux?
To designate vim as the default text editor in Linux, follow these steps:
- The file “.bashrc”
$ vi ~/.bashrc
- Add the following lines at the end of the document:
export EDITOR=vim
- Save and close the file.
- Enter the following command to apply the changes:
$ source ~/.bashrc
Now, when you run commands like crontab -e or git commit, Vim will be used as the default text editor.