Skip to content

Instantly share code, notes, and snippets.

@simov
Created September 4, 2013 16:21
Show Gist options
  • Save simov/6439361 to your computer and use it in GitHub Desktop.
Save simov/6439361 to your computer and use it in GitHub Desktop.
Sublime Text 2 Shortcuts

#Sublime Text 2 Shortcuts

###Legend

key symbol
ctrl
shift
alt
tab
enter
backspace

###UI

key action
⎈KB toggle sidebar
⎈M toggle minimap
⎈⇧N new window

###Navigation

key action
⎈G go to line
⎈R go to methods
⎈P go to file
⎈; ?
⎈⇧P commands palette
⎈⎇P go to project

###Splits

key action
⇧⎇1 single column
⇧⎇2 two columns
⇧⎇3 three columns
⇧⎇4 four columns
⇧⎇5 grid (4 groups)
⇧⎇8 two rows
⇧⎇9 three rows
⎈⇧[1..4] move file to a group
⎈[1..4] focus group

###Tabs

key action
⎈↹ switch between last two active
⎈↹↹ cycle through the history of active tabs
⎇[1..9] select tab

###Find/Replace

key action
⎈F find
⎈H replace
⎈⇧H replace next
⎈⇧F find in files
F3 find next
⇧F3 find previous
⎈I incremental find
⎈F3 quick find
⎇F3 quick find all (selects all accurances, usefull for multiple editing)

###Folding

key action
⎈K0 unfold all
⎈K[1..9] fold all at specified indent level
⎈⇧[ fold block
⎈⇧] unfold block
⎈KT fold html attributes (⎈K0 to unfold)

###Bookmarks

key action
⎈F2 toggle bookmark
F2 next bookmark
⇧F2 previous bookmark
⎈⇧F2 clear bookmarks

###Marks

key action
⎈K space set mark
⎈KW delete from cursor to mark
⎈KA select from cursor to mark
⎈KG clear mark

###Selection

key action
⇧⎇ arrows multiline selection
⎈L select line (repeat select next lines)
⎈D select word (repeat select others occurrences in context for multiple editing)
⎈KD skip current word (used with ⎈D)
⎈⇧ space expand selection to scope
⎈⇧M expand selection to brackets
⎈⇧J expand selection to indentation
⎈⇧A expand selection to tag
⎈⇧L split selection into lines

###Editing

key action
⎈↵ insert line after
⎈⇧↵ insert line before
⎈⇧ up/down swap lines up/down
⎈⇧D duplicate line or selection
⎈J join lines
⎈/ comment
⎈⇧/ comment block
⎈KU upper case
⎈KL lower case
⎈Y redo
⎈Z undo
⎈U soft undo (movement undo)
⎈⇧U soft redo (movement redo)
⎈⇧V paste and indent
⎈⇧K delete line
⎈KK delete from cursor to end of line
⎈K⌫ delete from cursor to start of line
⎈ delete delete word forward
⎈⌫ delete word backward

###Misc

key action
F6 toggle spell check
⎇ . close tag (xml/html)
⎇ / show completions

###Custom shortcuts

  • Preferences - Key Bindings - Default - all available shortcuts
  • Preferences - Key Bindings - User - user defined shortcuts
[
    { "keys": ["shift+alt+d"], "command": "duplicate_line" },
    { "keys": ["ctrl+k+m"], "command": "toggle_minimap" }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment