How can I change my default text editor from gedit to Emacs?
Right click on a text file, point to "Open With" and it'll show other editors in a sub-menu. Click on "Other Application...". It'll show you a dialog with a list of applications, select Emacs and make sure the "Remember this application for "plain text document" file" option is checked. Click "Open".
I don't use a DE, but for my configurations the next command is the best:
- it selects your default sensible-editor from all installed editors
- must run with current user
- you must have more than one editor in your system
If you would like to replace gedit with any other text editor for all file types, the easiest is to edit the
defaults.list file located here:
Just find and replace all
gedit.desktop references with your own editor (in this case
You need root permissions to edit the file. So, just do:
sudo -H gedit /usr/share/applications/defaults.list
Save the file, close it and it's done.