Skip to content

Instantly share code, notes, and snippets.

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

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: cmd == command

Open/Goto


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

Editing


  • cmd+l: select line (repeat select next lines)
  • cmd+d: select word (repeat select others occurrences in context for multiple editing)
  • ctrl+shift+m: select content into brackets
  • cmd+shift+enter: insert line before
  • cmd+enter: inter line after
  • ctrl+shift+k: delete line
  • cmd+k-k: delete from cursor to end of line
  • cmd+k-backspace: delete from cursor to start of line
  • cmd+shift+d: duplicate line(s)
  • cmd+j: join lines
  • cmd+k-u: upper case
  • cmd+k-l: lower case
  • cmd+/: comment
  • cmd+alt+/: block comment
  • cmd+y: redo or repeat
  • cmd+shift+z: past and ident
  • ctrl+space: autocomplete (repeat to select next suggestion)
  • ctrl+m: jump to matching brackets

XML/HTML


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

Find/Replace


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

Splits/Tabs


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

Bookmarks


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

Marks


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