Sublime Text 2 Cheat Sheet

on October 31, 2012
(1 minute read)

Here’s a cheat sheet for the awesome Sublime Text 2 code editor with my most used key shortcuts and tricks:

I’ve got invites for a free bank transfer!

(Click to enlarge)

If this is the first time you hear about Sublime then check out my 15 minute tutorial to setup Sublime Text 2, you will never go back to your old code editor :)

Multi Cursors

Multiple cursors is one of the best features of Sublime.

  • Control+D to select the next occurence of the current selection.
  • Control+Click to place an extra cursor


  • Control+H: Find and replace
  • Control+Shift+F: Find text in project files
  • Control+P: Find file in the project


Always forget to use them but have seen Mark (the back-end developer in my team) using it and it is a workflow game-changing:

  • Control+F2: Add/Remove bookmarks
  • Shift+F2: Jump to next bookmark


  • Control+’: show the console
  • Control+Shift+P: Find and run all commands in Sublime (some cool commands are “Convert spaces to tabs” to clean up files as well as the use of Sublime Snippets)
  • Control+K and then Control+B to show or hide the sidebar
  • Control+/ to comment the selected lines (inline mode)
  • Control+Shift+/ to comment the selected lines (block mode)
  • Control+Shift+T to reopen a recently closed tab

Useful plugins

Zen Coding

  • Control+Alt+Enter: Enter a CSS haiku

All Autocomplete

  • Control+P, then type the name of a file and then
    • : to go to a specific line
    • @ to list and search all the available functions, variables, methods, classes, etc. in that file
    • # to list and search any text in the file

Looking for cool gift ideas? lists hundreds of nice items and lets you know when they go on sale on Amazon.

Did you enjoy this article?

Thank with a coffee ☕

Or help me out by clicking one of these buttons:



  • Sebastián says:

    Hi, i am trying to put this folder in the correct path but i think that should be “Macintosh HD ▸ Users ▸ yourusername ▸ Library ▸ Application Suport ▸ Sublime Text 3 ▸ Packages”, tell me if i’m wrong, and how i activate, thanks

  • ainur says:

    thank you very much!

  • Jake says:

    @Sebastián: Yeah, the path is wrong. It’s supposed to be in “Packages”.

  • Xavi Author says:

    Thank you Sebastián & Jake, I’ve updated the article to reflect the correct path :)

  • Hexley says:

    Thank you,
    my PC shows .php files with default.png
    how to fix it?

  • Xavi Author says:

    Hi Hexley,

    I’m on a Mac so I can’t help you debug it but I’ll do my best on explaining how it works and how you may be able to fix it.

    Go to PreferencesKey bindings and add:
    { "keys": ["ctrl+o"], "command": "show_scope_name" },
    Now press Control+o while on a .php file. This should give you the “scope names” of PHP files (each file type can have more than one, in the theme we have “source.php”).

    Then go to the Theme you downloaded and open Icon (PHP).tmPreferences, in line 6 where it says source.php try changing it to another source name to see if it works.

  • Hexley says:

    Hi Xavi,
    Thank you very much
    change to embedding.php
    I dit it! :)

  • wasim says:

    it didn’t work for me

Follow me for cool new products and interesting findings on graphic design, web development, marketing, startups, life and humor.

/*Twitter*/ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="//";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); /*Facebook*/ (function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) {return;}js = d.createElement(s); = id;js.src = "//";fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk')); /*Google+*/ window.___gcfg = {lang: 'en-GB'};(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = '';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();
Airbnb 25€ discount