Sublime Text 2 Cheat Sheet

by
on October 31, 2012
(2 min read)

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

(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

Find

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

 Bookmarks

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

Miscelaneous

  • 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

Did you enjoy this article?

Buy the author a coffee 🤗☕

No comments yet

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.id=id;js.src="//platform.twitter.com/widgets.js";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); js.id = id;js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=28624667607";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 = 'https://apis.google.com/js/plusone.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();
Airbnb 30€ discount