Changing the default text editor on Ubuntu


There is a few software that will use the editor command to find out what text editor to use. Example commands will be dch to add a new .deb changelog entry, revision control softwares when prompting for commit a message …
There is basically 2 ways for changing the default editor:

1. System Wide
Run Terminal and type:
$ sudo update-alternatives –config editor
And then choose whichever editor you want to be default.

2. User Level
As a user, you cannot change the setting for the whole system, but you can add an alias for editor to let say vim.
Open and edit ~/.bashrc and add:
alias editor=vim
Next time you will open a bash prompt, your default editor will be vim. AddThis

2 thoughts on “Changing the default text editor on Ubuntu

  1. Rocky

    Ubuntu upgrades rrlaey seem to go well for me. I really think it’s something that needs to be worked on, but I have no idea how they’d smooth things out.An experienced friend informs me that it’s ideal to have a separate partition for your home folder and a textfile list of installed applications. That way, you can do a clean install every upgrade and feed your textfile into apt-get.I just got sick of the whole thing and went back to Arch Linux. Rolling releases mean a lot more individual package upgrades, but it seems to go quite a bit smoother overall.

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s