Saturday, July 7, 2012

How to Install Sublime 2 Text editor on Ubuntu 12.04/12.10

Sublime 2 editor is my favorite text editor for programming different languages. It is very helpful for my HTML,Javascript,css programming.It reduce our efforts during programming,just use Sublime text then you can understand how it help you while coding.i have poor knowledge in english that i cant express something  fluently.But i will tell you how to install Sublime Text 2 editor in Ubuntu/Linux Mint/Debian

1.First Download Sublime Text 2 

You can see that file in Download folder (Downloads/Sublime Text 2.0 x64.tar.bz2)

2.Extract that file

Right click on Sublime Text 2 tar.bz2 file and click on Extract Here

3.Open Terminal


cd Downloads

Downloads folder contains our files

4.Type this command

sudo mv Sublime\ Text\ 2 /usr/lib/

It will move your Sublime Text 2 folder (from Downloads) to lib folder

5.Then we need to create a s Symbolic link

for this type

sudo ln -s /usr/lib/Sublime\ Text\ 2/sublime_text /usr/bin/sublime

This code will create a sublime executable file in bin folder 

6.Next we need to create a shortcut for Unity launcher.You can now use Sublime Text 2 editor via command line.But it is not a easy method  to use Terminal  every time.

So first create a sublime.desktop file 


touch sublime.desktop

You can see this file in Downloads folder because we use cd Downloads command at the begining,so virtually we do everything in Download folder 

(sibin@sibin-Ideapad-Z570:~/Downloads$ touch sublime.desktop)

Then type 

sublime sublime.desktop

It will open sublime.desktop with Sublime Text 2 editor 

Then enter these commands 

[Desktop Entry]
Name=Sublime Text 2
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor
Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png
[NewWindow Shortcut Group]
Name=New Window
Exec=sublime -n

Then save it (File -Save or use save icon)

Then save it

7.Then we need to add sublime.desktop file in the application folder .So type this command

sudo mv sublime.desktop /usr/share/applications

You can see it in applications folder 

8.Click on Ubuntu icon (Unity) then type Sublime .Open it

Then right click sublime icon in the unity side bar then click on lock in launcher 

Get 10-50% offer on all purchace - Flipkart offer zone


Johan Samyn said...

This guide was most useful to me, as it learned me how I can easily add an app to the Unity Sidebar. So thank you for posting it.

Mohsin said...

Hi !

I have started a new project just now and am in a real hurry to get things started. But this articles has been so helpful that I couldn't move to work, without thanking you for such an easy and detailed explanation.

Thanks a ton


Copyright @ 2013 7CHIP.

Designed by Templateify & Sponsored By Twigplay