Keyboard Shortcuts - OSX
Editing
| Keypress | Command |
|---|---|
| ⌘ X | Cut line |
| ⌘ ⏎ | Insert line after |
| ⇧ ⌘ ⏎ | Insert line before |
| Ctrl ⌘ ↑ | Swap line up |
| Ctrl ⌘ ↓ | Swap line down |
| ⌘ L | Select line - Repeat to select next lines |
| ⌘ D | Select word - Repeat to select next occurrence |
| Ctrl ⌘ G | Select all occurrences of current selection |
| Ctrl ⇧ ↑ | Extra cursor on the line above |
| Ctrl ⇧ ↓ | Extra cursor on the line below |
| Ctrl A | Move to beginning of line |
| ⌘ ← | Move to beginning of text on line |
| Ctrl E, ⌘ → | Move to end of line |
| ⌘ K, ⌘ K | Delete from cursor to end of line |
| ⌘ K, ⌘ ⌫ | Delete from cursor to start of line |
| Ctrl M | Jump to closing parentheses Repeat to jump to opening parentheses |
| Ctrl ⇧ M | Select all contents of the current parentheses |
| Ctrl ⇧ W | Insert XML long tag |
| ⌘ ] | Indent current line(s) |
| ⌘ [ | Un-indent current line(s) |
| ⇧ ⌘ D | Duplicate line(s) |
| ⌘ J | Join line below to the end of the current line |
| ⌘ / | Comment/un-comment current line |
| ⌥ ⌘ / | Block comment current selection |
| ⌘ Y | Redo, or repeat last keyboard shortcut command |
| ⇧ ⌘ V | Paste and indent correctly |
| Ctrl ␣ | Select next auto-complete suggestion |
| ⌘ U | Soft undo; jumps to your last change before undoing change when repeated |
| Ctrl Alt ↑ | Scroll lines up |
| Ctrl Alt ↓ | Scroll lines down |
Navigation/Goto Anywhere
| Keypress | Command |
|---|---|
| ⌘ P | Quick-open files by name |
| ⌘ R | Goto symbol |
| ⇧ ⌘ R | Goto symbol in project |
| F12 | Goto definition |
| ⌘ F12 | Goto definition in split |
| ⇧ F12 | Goto reference |
| ⇧ ⌘ F12 | Goto reference in split |
| Ctrl G | Goto line in current file |
Build
| Keypress | Command |
|---|---|
| F7 | Build |
| ⌘ B | Build |
| ⇧ ⌘ B | Build selected |
| Ctrl C | Cancel build |
General
| Keypress | Command |
|---|---|
| ⇧ ⌘ P | Command Palette |
| Ctrl Backquote | Python Console |
| Ctrl ⌘ F | Toggle fullscreen mode |
| Ctrl ⇧ ⌘ F | Toggle distraction-free mode |
| ⌘ K, ⌘ B | Toggle side bar |
| Ctrl ⇧ P | Show scope in status bar |
Find/Replace
| Keypress | Command |
|---|---|
| ⌘ F | Find |
| ⌥ ⌘ F | Replace |
| ⇧ ⌘ F | Find in files |
| ⌘ I | Incremental Find |
Scrolling
| Keypress | Command |
|---|---|
| Ctrl V | Scroll down one page |
| Ctrl L | Center current line vertically in page |
| ⌘ ↓ | Scroll to end of file |
| ⌘ ↑ | Scroll to start of file |
Tabs
| Keypress | Command |
|---|---|
| ⇧ ⌘ T | Open last closed tab |
| ⌘ [1-8] | Jump to tab in current group |
| ⌘ 9 | Jump to last tab in current group |
| ⇧ ⌘ [ | Cycle left through tabs |
| ⇧ ⌘ ] | Cycle right through tabs |
| Ctrl ⭾ | Cycle up through recent tabs |
| Ctrl ⇧ ⭾ | Cycle down through recent tabs |
Split window
| Keypress | Command |
|---|---|
| ⌥ ⌘ 1 | Revert view to single column |
| ⌥ ⌘ 2 | Split view into two columns |
| ⌥ ⌘ 3 | Split view into three columns |
| ⌥ ⌘ 4 | Split view into four columns |
| ⌥ ⌘ 5 | Set view to grid (4 groups) |
| Ctrl [1-4] | Jump to group |
| Ctrl ⇧ [1-4] | Move file to specified group |
Folding
| Keypress | Command |
|---|---|
| ⌥ ⌘ [ | Fold |
| ⌥ ⌘ ] | Unfold |
| ⌘ K, ⌘ 1 to ⌘ K, ⌘ 9 | Fold by level 1 to 9 |
| ⌘ K, ⌘ T | Fold tag attributes |
Bookmarks
| Keypress | Command |
|---|---|
| ⌘ F2 | Toggle bookmark |
| F2 | Next bookmark |
| ⇧ F2 | Previous bookmark |
| ⇧ ⌘ F2 | Clear bookmarks |
Text manipulation
| Keypress | Command |
|---|---|
| ⌘ K, ⌘ U | Transform to Uppercase |
| ⌘ K, ⌘ L | Transform to Lowercase |