2

As with #! waldorf, geany is the default graphical text editor. However i want to substitute that with sublime text. Any ideas on how to do this?

netbrain
  • 145

1 Answers1

2

Do you have it installed through apt-get?

If not, add the PPA:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update

and install it:

sudo apt-get install sublime-text

(source)

You can then set it as default with xdg-mime if you know the mime types corresponding to the file extensions. For example, to open all .txt files in Sublime Text, run this in terminal:

xdg-mime default sublime-text-2.desktop text/plain

To make this work in case you're opening the text file inside some KDE program like Dolphin or Konqueror you will have to copy the corresponding lines under [Default Applications] in ~/.local/share/applications/mimeapps.list and paste them under [Added Associations] in the same file. So your ~/.local/share/applications/mimeapps.list would look like this if you had only this one .txt associaton:

[Default Applications]
text/plain=sublime-text-2.desktop

[Added Associations]
text/plain=sublime-text-2.desktop