How to install and set Sublime Text 2 as the default text editor on Ubuntu or Linux Mint:
- Download from http://www.sublimetext.com/
- Unpack the downloaded file into your home directory (eg: /home/yourname/SublimeText2/)
- Open the file /home/yourname/.local/share/applications/defaults.list (create this file if it doesn’t exist)
- Create/edit the [Default Applications] section, with a text/plain entry for Sublime like:
[Default Applications]
text/plain=sublime2.desktop - Create the file /home/yourname/.local/share/applications/sublime2.desktop with this in it:
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime 2
Exec=/home/yourname/SublimeText2/sublime_text
Terminal=false
Categories=Accessories
StartupNotify=true
MimeType=text/plain; - Done (you may need to logout and log back in)
Very useful, thanks. You can also add some other MIME types (depending on your needs) to be opened by SublimeText in the same defaults.list.