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!|
- 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 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?
- 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