Tuesday, September 12, 2017
Sublime Text 2 in Ubuntu 12 04
Sublime Text 2 in Ubuntu 12 04
Ive been using Sublime Text 2 to edit my code for long time now and I cant get enough of it. The black layout is amazing for the eyes and the functionality is as good as it gets. I have had minor issues installing it on Ubuntu 12.04 however. The following steps should solve the issue.1. Download the tar, locate the directory in terminal and execute
$ tar xf "Sublime Text 2 Build 2181 x64".tar.bz2
This will create a directory Sublime Text 2.
2. Move the folder into /usr/lib/
$ sudo mv "Sublime Text 2" /usr/lib/
This will move the Sublime Text 2 files.
3. Make Sublime Text launchable from the terminal
$ sudo ln -s /usr/lib/"Sublime Text 2"/sublime_text /usr/bin/sublime
At this point, typing sublime in the terminal will launch the application. If you want to have a link to Sublime in the Unity menu bar, simply launch the application and right-click on the icon and select Lock in Launcher.
If you fancy opening all your text files with Sublime Text 2, execute the following:
$ sudo sublime /usr/share/applications/defaults.list
Search for all occurences of gedit.desktop and change them to sublime.desktop
This will essentially change the default application for text files from gedit to Sublime.
Happy hacking!
download file now