Sublime Text 2 Keyboard Shortcuts Cheat Sheet (Win, OS X and Linux)
List of common keyboard shortcuts for Sublime Text 2 editor. Tested in Windows, OS X and Linux.
Bold: different from windows shortcut
Red: custom code
Found a mistake? Want to add something? Post in the comments below.
System and Files | Windows | OS X | Linux |
Open File | Ctrl + O | Command + O | Ctrl + O |
Save File | Ctrl + S | Command + S | Ctrl + S |
Close File | Ctrl + W | Command + W | Ctrl + W |
Open recently closed file | Ctrl + Shift + T | Command + Shift + T | Ctrl + Shift + T |
Toggle sidebar | Ctrl + K B | Command + K B | Ctrl + K B |
Switch project | Ctrl + Alt + P | Command + Ctrl + P | Ctrl + Alt + P |
Font size | Ctrl + +/- | Command + +/- | Ctrl + +/- |
Command pallette | Ctrl + Shift + P | Command + Shift + P | Ctrl + Shift + P |
Toggle console (custom code see below) | Ctrl + Alt + C | Ctrl + ` | Ctrl + Alt + C |
Fullscreen | F11 | Command + Ctrl + F | F11 |
Distraction free fullscreen | Shift + F11 | Command + Ctrl + Shift + F | Shift + F11 |
Change tab | Alt + Number | Command + Number | Alt + Number |
Navigate Through Tabs | Ctrl + PageUp/Down | Command + Alt + Left/Right | Ctrl + PageUp/Down |
Show autocomplete suggestions (custom code see below) | Ctrl + Space | Ctrl + Space | Ctrl + Space |
Layout | Windows | OS X | Linux |
Select column layouts | Alt + Shift + (1-4) | Command + Alt + (1-4) | Alt + Shift + (1-4) |
Select 4 grid layout | Alt + Shift + 5 | Command + Alt + 5 | Alt + Shift + 5 |
Select two or three row layouts | Alt + Shift + (8,9) | Command + Alt + Shift + (2,3) | Alt + Shift + (8,9) |
Move to panel | Ctrl + Number | Ctrl + Number | Ctrl + Number |
Move file to panel | Ctrl + Shift + Number | Ctrl + Shift + Number | Ctrl + Shift + Number |
Finding Things | Windows | OS X | Linux |
Find | Ctrl + F | Command + F | Ctrl + F |
Find in files | Ctrl + Shift + F | Command + Shift + F | Ctrl + Shift + F |
Find and replace | Ctrl + H | Command + Alt + F | Ctrl + H |
Incremental search | Ctrl + I | Command + I | Ctrl + I |
Navigate through the search panel | Tab | Tab | Tab |
Close search | Escape | Escape | Escape |
Goto anything | Ctrl + P | Command + P | Ctrl + P |
Goto line number | Ctrl + G | Ctrl + G | Ctrl + G |
Goto symbol | Ctrl + R | Command + R | Ctrl + R |
Go to word | Ctrl + P + write # | Command + P + write # | Ctrl + P + write # |
Find next | Enter (Or F3) | Enter | Enter (Or F3) |
Find previous | Shift + Enter (Or F3) | Shift + Enter | Shift + Enter (Or F3) |
Find all | Alt + F3 | Ctrl + Command + G | Alt + F3 |
Selections / Moving Around | Windows | OS X | Linux |
Jump words / characters | Ctrl + Left/Right | Ctrl + Left/Right | Ctrl + Left/Right |
Moving around and selecting | Ctrl + Shift + Left/Right | Ctrl + Shift + Left/Right | Ctrl + Shift + Left/Right |
Add next occurence to selection | Ctrl + D | Command + D | Ctrl + D |
Add scope to selection | Ctrl + Shift + Space | Command +Shift + Space | Ctrl + Shift + Space |
Add all occurences to selection | Alt + F3 | Ctrl + Command + G | Alt + F3 |
Select contents inside parenthesis | Ctrl + Shift + M | Ctrl + Shift + M | Ctrl + Shift + M |
Expand selection to indentation | Ctrl + Shift + J | Command + Shift + J | Ctrl + Shift + J |
Expand selection to Tag | Ctrl + Shift + A | Command + Shift + A | Ctrl + Shift + A |
Go to closing / opening parenthesis | Ctrl + M | Ctrl + M | Ctrl + M |
Back to single selection | Escape | Escape | Escape |
Scroll to selection | Ctrl + K, Ctrl + C | Command + K,Command + C | Ctrl + K, Ctrl + C |
Draw selection with mouse | Middle Mouse Button | Middle Mouse Button | Right Mouse Button + Shift |
Add to mouse selection | Ctrl | Command | Ctrl |
Subtract from mouse selection | Alt | Command + Shift | Alt |
Multiple Cursors | Windows | OS X | Linux |
Split selection into lines | Ctrl + Shift + L | Command + Shift + L | Ctrl + Shift + L |
Add new cursor | Ctrl + Alt + Up/Down | Ctrl + Shift + Up/Down | Alt + Shift + Up/Down |
Single cursor | Escape | Escape | Escape |
Editing | Windows | OS X | Linux |
Copy line / selection | Ctrl + C | Command + C | Ctrl + C |
Cut line / selection | Ctrl + X | Command + X | Ctrl + X |
Paste | Ctrl + V | Command + V | Ctrl + V |
Paste with indentation | Ctrl + Shift + V | Command + Shift + V | Ctrl + Shift + V |
Delete line | Ctrl + Shift + K | Ctrl + Shift + K | Ctrl + Shift + K |
Delete from cursor to end of line | Ctrl + K K | Command + K K | Ctrl + K K |
Delete from cursor to beginning of line | Ctrl + K Backspace | Command + K Backspace | Ctrl + K Backspace |
Duplicate line / selection | Ctrl + Shift + D | Command + Shift + D | Ctrl + Shift + D |
Select line | Ctrl + L | Command + L | Ctrl + L |
Move line up/down | Ctrl + Shift + Up/Down | Command + Ctrl + Up/Down | Ctrl + Shift + Up/Down |
Insert line after | Ctrl + Enter | Command + Enter | Ctrl + Enter |
Insert line before | Ctrl + Shift + Enter | Command + Shift + Return | Ctrl + Shift + Enter |
Join next line end of the current line | Ctrl + J | Command + J | Ctrl + J |
Transpose (swap place of characters/words) | Ctrl + T | Ctrl + T | Ctrl + T |
Uppercase | Ctrl + K, Ctrl + U | Command + K,Command + U | Ctrl + K, Ctrl + U |
Lowercase | Ctrl + K, Ctrl + L | Command + K,Command + L | Ctrl + K, Ctrl + L |
Indent line(s) (custom code see below) | Ctrl + 9 | Command + ] | Ctrl + 9 |
Unindent line(s) (custom code see below) | Ctrl + 8 | Command + [ | Ctrl + 8 |
Delete word forward | Ctrl + Del | Ctrl + Del | Ctrl + Del |
Delete word backwards | Ctrl + Backspace | Ctrl + Backspace | Ctrl + Backspace |
Close tag | Alt + . | Command + Alt + . | Alt + . |
Commenting | Windows | OS X | Linux |
Comment line (custom code see below) | Ctrl + 7 | Command + \ | Ctrl + 7 |
Block Comment line (custom code see below) | Ctrl + Shift + 7 | Command + Shift + \ | Ctrl + Shift + 7 |
Bookmarks | Windows | OS X | Linux |
Add/remove bookmark | Ctrl + F2 | Command + F2 | Ctrl + F2 |
Goto next bookmark | F2 | F2 | F2 |
Goto previous bookmark | Shift + F2 | Shift + F2 | Shift + F2 |
Select all bookmarks (custom code see below) | Alt + F2 | Alt + F5 | Alt + F5 |
Clear bookmarks | Ctrl + Shift + F2 | Command + Shift + F2 | Ctrl + Shift + F2 |
Mark (you can set one mark) | Windows | OS X | Linux |
Set mark | Ctrl + K Space |
Command + K Space
(Conflicts with spotlight in OSX, customize the shortcut if needed.)
| Ctrl + K Space |
Set new location | Ctrl + K X | Command + K X | Ctrl + K X |
Select to mark | Ctrl + K A | Command + K A | Ctrl + K A |
Delete to mark | Ctrl + K W | Command + K W | Ctrl + K W |
Delete mark | Ctrl + K G | Command + K G | Ctrl + K G |
Misc | Windows | OS X | Linux |
Toggle Spellchecking | F6 | F6 | F6 |
Sort lines | F9 | F5 | F9 |
Custom shortcuts | |
Toggle console | |
{ "keys": ["ctrl+alt+c"], "command": "show_panel", "args": {"panel": "console", "toggle": true} } | |
Autocomplete suggestions (for linux) | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, { "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": [ { "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, { "key": "auto_complete_visible", "operator": "equal", "operand": false }, { "key": "setting.tab_completion", "operator": "equal", "operand": true } ] } | |
Indent line(s) | |
{ "keys": ["ctrl+8"], "command": "indent" } | |
Undent line(s) | |
{ "keys": ["ctrl+9"], "command": "unindent" } | |
Comment line | |
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } } | |
Comment block | |
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } } | |
Select all bookmarks in (in OS X and Linux) | |
{ "keys": ["alt+f5"], "command": "select_all_bookmarks" } | |
Example user keymap file for Windows:
[
{ "keys": ["ctrl+alt+c"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+8"], "command": "indent" },
{ "keys": ["ctrl+9"], "command": "unindent" },
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
]
{ "keys": ["ctrl+alt+c"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{ "keys": ["ctrl+8"], "command": "indent" },
{ "keys": ["ctrl+9"], "command": "unindent" },
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
]