$EDITOR
The System's default text editor can be defined within /etc/profile. It's given the variable EDITOR
.
Add these lines to /etc/profile.d/local.sh
:
1
2export EDITOR=vim
3
4export VISUAL=$EDITOR
Then reload that profile with:
1source /etc/profile
If you want to ensure nano
never appears again:
1sudo ln -sf $(which vim) $(which nano)