I’m going to try and keep this page as a one stop shop for getting up and running with ST2. It’s a work in progress, so please bare with me. Also let me know if I forgot something or need to add something.
note: Use this key symbol chart for understanding the mac shortcuts
| action | keyboard shortcut(mac) | keyboard shortcut(pc) | special notes |
|---|---|---|---|
| show/hide sidebar | cmd + k, cmd + b | ctrl + k, ctr + b | This is a two key shortcut |
| paste code formatted as you coded it | cmd + shift + v | ? | I like this. Instead of copy and pasting and then having to indent, use this and you won’t have to waste time indenting |
| commands list | cmd + shift + p | ctrl + shift + p | |
| multi-cursor | cmd + click | ctrl + click | everywhere you click you get a new cursor! |
| switch project | ctrl + cmd + K | read this to see why this is useful | |
| Jumping to symbols | cmd + P | ctrl + P | To quickly jump to specific symbols. Type shortcut to open up a search field. Type in your symbol and press enter. |
| Quick Opening File | shift + cmd + T (lowercase L) | shift + ctrl + T(lowercase L) | Super Awesome Feature. Open a textfield that lets you search for files within a project to open. You’ll rarely ever have to use the file tree again. |
| multi-cursor ‘and 1′ (aka ‘select similar word’) | cmd + d | ctrl + d | to select additional occurrences of that word |
| multi-cursor ‘on steroids’ | ctrl + cmd + g | alt + f3 | selects every occurrence of what you have highlighted (my personal favorite!) |
| go to anything | cmd + p | ctrl + p | After typing shortcut, type a part of your file and it finds it fast |
| minify css/js | f7 | f7 | Install the YUI Compressor plugin |
| auto completion | ctrl + space | ctrl + space | |
| switch between open tabs | ctrl + tab | Hate using your mouse and clicking on open tabs? Use this shortcut and you can quickly navigate between tabs without a mouse. | |
| open last closed file | cmd + shift + t | ctrl + shift + t | If you accidentally close a file that you’d like to reopen, If you keep pressing that key combo, ST2 will continue opening tabs in the order that you closed them. |
| go to specific line | ctrl + g | ctrl + g | |
| splits screen | alt+shift+1,2,3,4,5… | Splits screen for multiple views for multiple files | |
| Jumping between word segments | cmd+right arrow | ctrl+right arrow | you move by word segment — this is camel-case (and underscore) aware. |
| find and replace | shift + cmd + F | shift + ctrl + F | search the contents of an entire ST project |
| Jumpling between words/lines | alt + arrow keys | alt + arrow keys | On Macs and PCs, if you hold down Alt while using the arrow keys, you jump between words rather than characters. On Macs, Similarly, if you hold down Cmd while using arrow keys, you jump from the opposite end of a line. Very useful for quickly navigating code without your mouse. |
| find | cmd + f | ctrl + f | |
| duplicate line | cmd + shift + d | shift + ctrl + d | Duplicates the current line, or the selection, if something is selected. |
| delete current line | cmd + shift + k + delete | ctrl + shift + k | |
| toggle full view | ctrl + shift + f | ||
| toggle distraction free mode | ctrl + shift + cmd + f | shift + f11 | If you are using a PC and this keyboard shortcut isn’t working — read this. |
| toggle comment | cmd + / | ||
| toggle block comment | opt + cmd + / | ||
| show console | opt + ` | ctrl + ` | backtic is ‘ and same key has tilda ~ (keys people see a lot but don’t know) |
| wrap with tag | opt + shift + w | alt + shift + w | highlight what you want wrapped and presto, it’s wrapped! |
| move line | ctrl + cmd + up/down | ctrl + shift + up/down | |
| zen coding(plugin) | ctrl + option + return | ctrl + alt + enter | you will see koan box appear on bottom (enter zen coding there) Note: You should remove Zen Coding and Upgrade to Emmet now. Emmet is the new Zen Coding and will be updated. Zen Coding is dead. RIP. The shortcut to get Emmet to wrap around is ctrl + shift + g (PC) |
| AutoFileName(plugin) | cmd + spacebar | ctrl + spacebar | a better way is to edit the User settings file and the file/folder name will be populated by typing ‘/’. |
| AdvancedNewFileName(plugin) | cmd + alt + n | ctrl + alt + n (if that doesn’t work try shift + ctrl + alt + n | a better/faster way to create folders/files |
| prefixr | ctrl + cmd + x | ctrl + alt + x | just type one prefix, use this shortcut and all the others are magically added — awesome! |
| JsFormat(plugin) | cmd + shift + p (and then select Format:JavaScript) | ctrl + shift + p (and then select Format:JavaScript) | I can’t get the keyboard shortcut to work? any ideas/suggestions appreciated |
- 30 Super Awesome Free Jeffrey Way ST2 videos (must see!)
- How do I easily fetch files and packages with ST2?
- How do install the sublime package controller?
- How to install html5boilerplate into ST2
- How do I use Zen Coding with ST2?
- How do I autocomplete folder names and filenames?
- How to use Dreamweaver and ST2 together.
- I’ve been using DW for 10 years so it’s hard to quit cold turkey :).
- How to use multi-cursors with ST2
- How to change key bindings with ST2
- A great way to handle all your snippets in one global location accessible via the github-cloud
- How to use Prefixr with ST2
- How to create and use snippets with ST2
- View files in a browser with ST2
- How can I format my CSS with Sublime Text 2?
- How to minify your CSS and JavaScript using YUI Compressor inside ST2
- How to use the Placeholder plugin
- How to create folders and files quickly inside ST2 with the AdvancedNewFile plugin
- How do I use the ST2 AutoFileName plugin?
- Why is my ST2 keyboard shortcut not working and how can I fix it?
- How to open the same file in two tabs: File > New View Into File
- How do I open files inside ST2 from the Terminal?
- You should use JSLint. It will check your JavaScript every time you save your document. Major time saver. It runs on node.js so make sure you have that installed.
- How to set up Projects with ST2
- Getting CoffeeScript Build Script to work in Sublime Text 2 on PC
- How do I use LESS in ST2 (for Mac and PC)
- Problem — Tab trigger doesn’t activate snippet — quick fix offered
- Add a Block Cursor when in Vim mode of ST2
- SFTP in ST2
- Remove Projects for ST2 project list
- How to use macros in ST2
- Use Vim Surround Plugin inside Sublime Text 2
Very helpful post! However on the “show console” shortcut, you have the mac and pc shortcuts mixed up. Also, you have the Ctrl+D shortcut listed twice with two different titles.
Other than that, amazing!
Hey Wes. The two corrections you suggested have been made. Thanks for letting me know. Glad you like the page.
Hello,
I went to your site and translated Polish to English but had some problems with the translation. I see you are talking about Sublime and other editors. Might I suggest you start doing some screencasts? It really helps people see what you are talking about and I believe it is a great way to learn. Two free sites I are http://www.screenr.com and http://screencast-o-matic.com. You could also download Jing from http://www.techsmith.com/jing.html. I did a blog on this.
Hi!
As many others I fell in love (he he) with Sublime Text. But also in the beginning (as many others) could not start off with it in a convenient way; I think it’s quite normal and obvious when adopting to a new app.
What I missed was lack of a chart like yours! I appreciate your effort, thank you!
It’s a great job and I’m sure it’s very helpful for all the starters and SL lovers :)
Keep up good work!
Thanks Jaco. Glad you found it helpful.