Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save griiettner/9348508 to your computer and use it in GitHub Desktop.
Save griiettner/9348508 to your computer and use it in GitHub Desktop.

Sublime Text 2 - Useful Shortcuts

*Tested in Windows 8

Open/Goto


  • ctrl+p: go to anything
  • ctrl+t: go to file
  • ctrl+ctrl+p: go to project
  • ctrl+r: go to symbol
  • ctrl+shift+p: command prompt
  • ctrl+g: go to line
  • ctrl+`: Python console

Editing Select


  • ctrl+l: select line (repeat select next lines)
  • ctrl+d: select word (repeat select others occurrences in context for multiple editing)
  • ctrl+shift+m: select content into brackets

Editing Select


  • ctrl+shift+enter: insert line before
  • ctrl+enter: inter line after
  • ctrl+shift+k: delete line
  • ctrl+k-k: delete from cursor to end of line
  • ctrl+k-backspace: delete from cursor to start of line
  • ctrl+shift+d: duplicate line(s)
  • ctrl+j: join lines
  • ctrl+k-u: upper case
  • ctrl+k-l: lower case
  • ctrl+/: comment
  • ctrl+alt+/: block comment
  • ctrl+y: redo or repeat
  • ctrl+shift+z: past and ident
  • ctrl+space: autocomplete (repeat to select next suggestion)
  • ctrl+m: jump to matching brackets
  • ctrl+]: Indent
  • ctrl+[: Unindent
  • ctrl+shift+up: swap line up
  • ctrl+shift+down: swap line down
  • ctrl+shift+d: duplicate line
  • ctrl+shift+k: duplicate line

HTML/XML


  • ctrl+shift+a: select content into tag
  • ctrl+alt+.: close tag

Find/Replace


  • ctrl+f: find
  • ctrl+alt+f: replace
  • ctrl+alt+g: find next occurrence of current word
  • ctrl+ctrl+g: select all occurrences of current word for multiple editing
  • ctrl+shift+f: find in files

Splits/Tabs


  • ctrl+alt+1: Single column
  • ctrl+alt+2: Two columns
  • ctrl+alt+5: Grid (4 groups)
  • ctrl+[1,2,3,4]: Focus group
  • ctrl+shift[1,2,3,4]: Move file to group
  • ctrl+[1,2,3...] Select tab

Bookmarks


  • ctrl+f2: Toggle bookmark
  • f2: next bookmark
  • shift+f2: previous bookmark
  • ctrl+shift+f2: clear bookmarks

Marks


  • ctrl+k-space: set mark // ctrl+k-; for me
  • ctrl+k-w: delete from cursor to mark
  • ctrl+k-a: select from cursor to mark
  • ctrl+k-g: clear mark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment