10
Sjoerd
6y

So… I prefer nano over other terminal editors (Mainly because I don’t understand how to use others properly) and I wasn’t really aware of the VISUAL and EDITOR environment variables. So on my Arch machine most things would default to vi. Vi to me is like an annoying pop-up that really doesn’t want you to close it (Tho, one thing I did learn eventually was how to close it ). So at some point I quickly wanted to edit crontab as root and I just couldn't manage to get crontab to use nano. So what did I do?

sudo pacman -R vi

ln -s /usr/bin/nano /usr/bin/vi

I symlinked nano to vi and it finally worked. I know that there are probably countless ways this could’ve been done better but in that case I wouldn't have posted it here under wk81 ;)

Comments
  • 4
    In that time you could have easily learned the ~8 buttons for doing all the basics in Vim. It's not as complicated as most people think, in fact I find nano's controls more confusing.
  • 0
    Didn't work with just "sudo EDITOR=nano crontab -e" ? 🤔
  • 0
    @sonywalk Hmmm, I think I did just that but without success.
  • 1
    @Sjoerd I had to try it... worked for me... strange :/
  • 1
    @sonywalk The reverse didn't work for me as well in a certain installation: It always started nano, with EDITOR=vi it just got buggy and unusable.
Add Comment