Skip to content

Instantly share code, notes, and snippets.

@odennZero
Forked from lucasfais/gist:1207002
Last active August 29, 2015 14:13
Show Gist options
  • Save odennZero/2fdc474d34553f246124 to your computer and use it in GitHub Desktop.
Save odennZero/2fdc474d34553f246124 to your computer and use it in GitHub Desktop.

Sublime Text 3 – Useful Shortcuts (Mac OS X and Windows)

General

Mac Windows
⌘⌃P Ctrl P go to global
⌘R Ctrl R go to symbol (Ctrl P + @)
⌃G Ctrl G go to line (Ctrl P + :)
⌃; Ctrl ; go to term (Ctrl P + #)
⌘KB Ctrl K B toggle side bar
⌘⇧P command prompt
⌃ ` Ctrl ’ python console
⌘⇧N Ctrl ⇧ N new window (useful for new project)

Editing

Mac Windows
⌘L Ctrl L select line (repeat select next lines)
⌘D Ctrl D select word (repeat select others occurrences in context for multiple editing)
⌃⇧M Ctrl ⇧ M select content into brackets
⌘⇧↩ Ctrl ⇧ ↩ insert line before
⌘↩ Ctrl ↩ insert line after
⌃⇧K Ctrl ⇧ K delete line
⌘KK Ctrl K K delete from cursor to end of line
⌘K⌫ Ctrl K ⌫ delete from cursor to start of line
⌘⇧D Ctrl ⇧ D duplicate line(s)
⌘J Ctrl J join lines
⌘KU Ctrl K U upper case
⌘KL Ctrl K L lower case
⌘ / Ctrl / comment
⌘⌥ / Ctrl ⇧ / block comment
⌘Y Ctrl Y redo or repeat
⌘⇧V past and ident
⌃ space Ctrl space autocomplete (repeat to select next suggestion)
⌃M Ctrl M jump to matching brackets
⌘U soft undo (movement undo)
⌘⇧U soft redo (movement redo)

XML/HTML

Mac Windows
⌘⇧A Ctrl ⇧ A select content into tag
⌘⌥ . Alt . close tag

Vintage Mode

Windows
Esc enter command mode
a append
v visual mode
cit change inside tag
ci" change inside quotations
ci) change inside parenthesis
^ move to line start
$ move to line end

Find/Replace

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

Splits/Tabs

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

Bookmarks

Mac Windows
⌘F2 toggle bookmark
F2 next bookmark
⇧F2 previous bookmark
⌘⇧F2 clear bookmarks

Marks

Mac Windows
⌘K space set mark // ⌘K; for me
⌘KW delete from cursor to mark
⌘KA select from cursor to mark
⌘KG clear mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment