Sublime Text 2 Tips and Shortcuts

Sublime Text is the new awesome text editor out their right now. I know some people still prefer so many editors like Notepad++, Eclipse, Dreamweaver… But, if you’re the one looking for light-weight and fast editor (and smoooth).. Sublime Text 2 is the right girl for you!!!

Why Sublime Text 2?

Awesome File Lookup!!

Once you import your project/any folder into sublime, just press <pre>ctrl + p</pre> and start type any name of the file, its just fetches in lighting fast way

Instant Preview Thing!

Just click any file in the project bar and bamn!!! It shows the preview, how cool is that?? It means, you don’t have to open the file actual to peek it!

Package Control!

You gonna love this, it is like plugin and once integrate it, you will get all sorts of cool plugins, like, SVN Integration, Bracket Highlight, Coffee Compiler, GIT, LiveReload etc.,

(For how to install  package control, click here)

Multiple Select Edit

Sometimes, you want to make change of every line or add space in front of everything, instead of find and replace stuff, do this

<pre>Put the cursor on any line you want to edit and do the “Ctrl + left click”, you will see another cursor, keep on doing that and start typing, you can edit all the stuff in same type</pre>

Also, Double click any character, you will see highlight on the matched texts (like Notepad++), but, when on pressing <pre>ctrl + d</pre> all those match will get selecting and you can edit in same way!

Other Tricks

ctrl + r-> Function lookup

ctrl + shift + p -> Shortcut for most of things you want

ctrl + p -> type “#”-> To search within the file

ctrl + r-> To jump to symbols

ctrl + g -> To go to a line number.

ctrl + d-> Duplicate line

Goodbye Notepad++, Hellooooo Sublime Text 2 for PHP!!!

Updated: Check out the new article about VS Code and more features compared to sublime text 2!

Yo Fellow Coders & Newbies! 🙂 You might have used several editors for PHP and sure Notepad++ is the best one of’em (atleast for me :P)!!! But, recently i came a across another cool and “Lighhhtttiiing-fast” editor when i’m using Ubuntu. its Sublime2-Text!!! Its so amazing when considering speed at which file opens and its smoothness! I tried it in my Windows 7 and best as it is But, to me that’s just a basic armor with cool items to be integrated it with! For ex., you can do a runtime validation for PHP  during save or when typing itself useful Sublime Linter


Above is just a example, there are sooooooooooooo many cool packages/plugins you can install to make your pistol to like a gattling gun!!!

(If you wanna peek why Sublime Text 2, check it out here Sublime Text 2 Tips


Step 1: Install Sublime Text2 (duh!)

Download SublimeText2

Installing Sublime Text 2 on Ubuntu Linux

Step 2: Install Package Control (The gateway for Cool things to come!)

To do this

  1. Press Ctrl + ` in your editor, something like a console should show up!
  2. Paste the below line in it and …. Press Enter ofcourse!!!

3. Once done, restart sublime2, press “ctrl+shift+p” and type “Install package” and hit it!!! It worked for me in Windows 7 and Ubuntu 12.

(note: If you got problem installing Package Control, follow here or Google it!)

Step 3: Install some packages!!!

For PHP, the useful stuffs are, (You gotta do the below in Package Control: Install Package by “ctrl+shift+p”)

  1. PHPcs
  2. sublimelint

( restart sublime!! and try a PHP Example, you should get syntax during type and saving!!! cool-huh??)

Step 4: Theme! Theme!! Theme!!!

I’m a theme freak! The editor color matters!

Default will be “monaki” its good and dark and…and.. sllleeepp! I expect my editor to be bright (and makes me awake during tough times :P)!!

  1. Same good old package control and type: “Theme – Soda” (one of the best themes and styling in Sublime) , Ofcourse, nothing did happen :P. to complete the deal,
  2.  Open “Setting – user” from preference and enter the below within the json format (Dont ask what is json, google it)

     3. (Don’t forget to restart)

     4. Tadaaa!!! Check it now, it’d be much better now!

Step 5: To make it lil like Notepad++ (and not completely!)

  1. Download color theme packages.
  2. Click “Browse packages from Preferences”, Find “Color Scheme – Default” Folder and place the two files inside it (The files you got from Thats you can use those themes!!!
  3. To make even more configuration, Open “Setting-users from preferences” and enter the below lines

(Found the above cool trick from

As you can see, the tab switch will be like on notepad++ instead of something made of sublime2, which is somewhat different (Comment and check it yourself) and reindent is coool try it on your messy-messy code.

So, now you know… sublime2 settings are in json, you can easily configure anything, i mean anything (mostly) in these two settings! There are still many more packages (like

Just google it, you find tons of cool things about sublime2 and yea, did i mention, its free!!!! (Eventhough you can purchase for a license!!) Sublime2 rocks!!! Though i miss Np++ a lot i used that for nearly 3 years… but, time to learn something new!  I even tried Eclipse Helios and Galileo, its good, but, its hell when installing plugins (For Java though, Eclipse Indigo is the best!!! A life saver for non-java programmers).

Sublime Text 2 & SVN

Ever since i started working on Ubuntu 12 LTS, almost everything i see is ‘Terminal’ it was so annoying at the beginning, but, not anymore, i started to like it!!!!

But, One thing i still hate is, there is no SVN Shell Integration. To commit, update or anything else, i need to go terminal and do the ‘svn blah..blah. blah’ command. Just think about checking ‘show log’, ‘diff’, they are truly worse than hell!

Hello Sublime Text 2!

As we all know ‘Sublime Text 2’ is an awesome editor!!! (If you don’t know what it is peek here!)

With the ‘Package Control’ you can install so many cool stuff, one’em is SVN. Still there is no shell integration, but using sublime, SVN is lil more easier than doing it from Terminal.

To install Sublime SVN

1. Ctrl + shift + p and select ‘Install Package’

2. Select SVN and it will be start installing in the background

3. Once done (yay!..uh,  just in case, close and reopen sublime), right click the project list (SVN project of course), you should get it… cool, huh! Better than Traditional Terminal thing!

4. You can also do, ctrl+shift+p and type “SVN”, you can see lots of SVN functionalities (the easy way)

This is no better than GUI version of SVN which i’m still searching in Ubuntu 12. Though there are some few GUI in Ubuntu, sadly, they are really nothing compared to Tortoise SVN in Windows! Tsk!

Well, that’s it! If you find any better version of SVN for Ubuntu just lemme know… cuz, i’m too a moderate geek 😛

If you still like learning stuff, have a peek at Shortcuts in linux and tips and tricks!!