Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.