Skip to content

Instantly share code, notes, and snippets.

@chrisblackwell
Last active May 16, 2017 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisblackwell/6504e8c9c956140327aa916f6087b0a3 to your computer and use it in GitHub Desktop.
Save chrisblackwell/6504e8c9c956140327aa916f6087b0a3 to your computer and use it in GitHub Desktop.
Sublime 3 Shortcuts

Sublime Text 3 – Useful Shortcuts (Mac)

See Sublime’s full documentation for more shortcuts and helpers.

Editing

⌘+C copy current line (if no selection)
⌘+X cut current line (if no selection)
⌘+⇧+K delete line
⌘+↩ insert line after
⌘+⇧+↩ insert line before
⌘+⇧+↑ move line (or selection) up
⌘+L select line (repeat to select next lines)
⌘+D select word (repeat select others occurrences in context for multiple editing)
⌘+M jump to closing bracket for current code, repeat to jump to opening bracket
⌘+⇧+M select all contents of the current brackets (curly brackets, square brackets, parentheses)
⌘+KK delete from cursor to end of line
⌘+K+⌫ delete from cursor to start of line
⌘+] 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
⌘+Space select next auto-complete suggestion
⌘+U soft undo (somehow undoes your movements; it jumps to your last change before undoing it when you repeat this command)

Navigation/Goto Anywhere

⌘+P quick-open files by name in your project (doesn’t seem to need an actual project set up, it just searches in the directories around the currently-opened file
⌘+R goto symbol (functions and classes) in the file. Same as ⌘+P, then type @
⌘+; goto word in current file. Same as ⌘+P, then type #
⌘+G goto line in current file. Same as ⌘+P, then type :

General

⌘+⇧+P command prompt
⌘+KB toggle side bar

Find/Replace

⌘+F find
⌘+H replace
⌘+⇧+F find in files

Tabs

⌘+⇧+t open last closed tab (just like in your browser)
⌘+PgDn cycle down through open tabs, cycle up with ⌘+PgUp
⌘+⇆ cycle through last tabs (repeat to go back further in history)

Split window

Alt+⇧+2 split into two columns
Alt+⇧+1 revert to single column
Alt+⇧+5 grid (4 groups)
⌘+[1,2,3,4] jump to “group” (pane)
⌘+⇧+[1,2,3,4] move file to specified group

Bookmarks

⌘+F2 toggle bookmark
F2 next bookmark
⇧+F2 previous bookmark
⌘+⇧+F2 clear bookmarks

Text manipulation

⌘+KU upper case
⌘+KL lower case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment