I've installed Sublime Text 3 from the .deb found here: http://www.sublimetext.com/3
Now, how to set it as the default text editor in place of gedit in Mint 16?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
/usr/share/applications/defaults.list in Sublime:
sudo subl /usr/share/applications/defaults.list
Search for all instances of
gedit and replace them with
sublime_text. Save the file, quit Sublime, log out and back in, and you should be all set.
While the above instructions should work with any
.deb-based system (I use Ubuntu), apparently there is an issue with Mint where changes to
/usr/share/applications/defaults.list are lost upon reboot. To work around this, do the following:
~/.local/share/applications/defaults.listin Sublime. The first line should be
/usr/share/applications/defaults.listin Sublime. Hit CtrlF to open the
Finddialog and type
geditinto the search box.
Find Allbutton to select all the instances of
geditin the file.
~/.local/share/applications/defaults.list, hit CtrlV to paste the lines containing
Replacedialog. Search for
geditand replace with
sublime_text. Hit CtrlAltEnter to Replace All (or click the
Replace Allbutton) and you're all set.
~/.local/share/applications/defaults.list, log out and back in, and Sublime Text should now be your default text editor.
Matt's answer worked for me too, many thanks for the clear instructions!
Just to state the obvious, in case it helps someone: if you want a different default editor, then:
ensure it's executable name, eg
gedit in the ~/.local/share/applications/defaults.list file
export EDITOR=path\executable is included in the appropriate config file for you (
~\.bashrc or whatever)