Skip to content

Instantly share code, notes, and snippets.

@criscom
Forked from lucasfais/gist:1207002
Last active October 15, 2018 18:27
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 criscom/08cac79cb1bfee4f9f76 to your computer and use it in GitHub Desktop.
Save criscom/08cac79cb1bfee4f9f76 to your computer and use it in GitHub Desktop.
#sublime-text-3: useful shortcuts

Sublime Text 3 - Useful Shortcuts (Mac OS X)

last update: 20181015

terminology:

super = cmd / ⌘
^ = ctrl

Pro Tips

⌘P+↩ Switch between current and last edited file
^↑T+↩ Remove white space
↑⌘+O Switch between open windows
⌘⌥v Clipboard history

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
⌃ ` python console
⌘⇧N new window (useful for new project)
⌘M move window to dock

Editing

⌘L select line (repeat select next lines)
⌃⌘↑/↓ move selected line up or down
⌘D select word (repeat select others occurrences in context for multiple editing)
⌃⇧M select content into brackets
⌃M move to each parenthesis in CSS
⌘⇧↩ insert line before
⌘↩ insert line after
⌃⇧K delete line
⌘KK delete from cursor to end of line
⌘K⌫ delete from cursor to start of line
⌘⇧D duplicate line(s)
⌘J join lines
⌘K+⌘U upper case
⌘K+⌘L lower case
⌘ / comment
⌘⌥ / block comment
⌘Y redo or repeat
⌘⇧V paste and ident
⌃ space autocomplete (repeat to select next suggestion)
⌃M jump to matching brackets
⌘U soft undo (movement undo)
⌘⇧U soft redo (movement redo)
⌘⌃A Alignment

XML/HTML

⌘⇧A select content into tag
⌘⌥ . close tag

Find/Replace

⌘F find
⌘⌥F replace
⌘⌥G find next occurrence of current word
⌘⌃G select all occurrences of current word for multiple editing
⌘⇧F find in files

Splits/Tabs

⌘⌥1 single column
⌘⌥2 two columns
⌘⌥5 grid (4 groups)
⌃[1,2,3,4] focus group
⌃⇧[1,2,3,4] move file to group
⌘[1,2,3...] select tab

Bookmarks

ctrl+# toggle bookmark
ctrl⇧+# clear bookmarks
⌘ctrl+alt+# select all bookmarks
alt+# next bookmark
alt⇧+# previous bookmark

Marks

⌘⇧M set mark // ⌘+shift+M; for me
⌘M+⌘A select from cursor to mark
⌘M+⌘W delete from cursor to mark
⌘M+⌘X swap with mark
⌘M+⌘G clear mark

tools

⌥⇧T delete trailing whitespace
⌥⇧X expand selection to whitespace
⌘Ä toggle comment
⌘⌥Ä remove comment
⌥⇧B add section start snippet
⌥⇧Z add section end snippet

Sublime Text 3

⌘⌥v Clipboard history

Some shortcuts from Ben Frain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment