Login or Sign up

Change the default editor in ubuntu to vim and never see nano again

Posted by: skyl on Oct. 21, 2009

I was seeing nano instead of vim when I was running things like crontab -e or git commit on this one machine. How infuriating is that? Well, I had finally had enough.

$ sudo update-alternatives --config editor

Will give you a choice. Likewise, if you run sudo aptitude install vim-full ubuntu will know that you are serious enough about vim to want it to be your default editor.

Ah, now I will never have the humiliation of typing :wq into nano again. With any luck, I will not have to go through the trouble of ctrl-o, enter, ctrl-x to save a file and exit. I guess either way it is five keys, but esc, :wq, enter is the righteous way to save and exit!

Comments on This Post:

Please Login (or Sign Up) to leave a comment