Skip to content

Instantly share code, notes, and snippets.

@leucos
Created June 15, 2012 13:52
Show Gist options
  • Select an option

  • Save leucos/2936573 to your computer and use it in GitHub Desktop.

Select an option

Save leucos/2936573 to your computer and use it in GitHub Desktop.

Sublime Text 2 – Useful Shortcuts (Linux)

General

⌃-P go to anything (type part of file, :line, @symbol)
^⇧-T go to file
^-R go to methods (@ in goto-anything)
⌃-G go to line (: in goto-anything)
^⌥-P go to project
** toggle side bar
^⇧-P command prompt
⌃-` python console

Editing

^-L select line (repeat select next lines)
^-D select word (repeat select next occurrences in context for multiple editing)
⌃⇧M select content between brackets/parens
⌃⇧J select content at indent level
^⇧↩ insert line before
^↩ inter line after
⌃⇧K delete line
?? delete from cursor to end of line
?? delete from cursor to start of line
^⇧-D duplicate line(s)
?? join lines
*^-K wrap selection
?? upper case
?? lower case
^-/ comment
^⇧-/ block comment (doesn’t work on kbds where ⇧ is required to get /)
^-Z undo
^-Y redo or repeat
^⇧-V paste and indent
⌃ space autocomplete (repeat to select next suggestion)
⌃M jump to matching brackets
^-U soft undo (movement undo)
^⇧-U soft redo (movement redo)

XML/HTML

^⇧-A select tag name
⌥-. close tag

Find/Replace

^-F find
^-H replace
F3 find next occurrence of current word
⌥-F3 select all occurrences of current word for multiple editing
^⇧-F find in files

Windows/Splits/Tabs

^N new tab
^W close tab
^⇧-N new window (useful for new project)
^⇧-W close current window
⌥⇧-1 single column (doesn’t work on kbds where ⇧ is required to compose 1)
⌥⇧-2 two column (doesn’t work on kbds where ⇧ is required to compose 2)
⌥⇧-5 grid (4 groups, doesn’t work on kbds where ⇧ is required to compose 4)
⌃[1,2,3,4] focus group
⌃⇧[1,2,3,4] move file to group
⌥-[1,2,3…] select tab (use ⇧ if it is required to get digits)

Bookmarks

^-F2 toggle bookmark
F2 next bookmark
⇧-F2 previous bookmark
^⇧-F2 clear bookmarks

Marks

?? set mark // ^⇧-K; for me
?? delete from cursor to mark
?? select from cursor to mark
?? clear mark

ToDo

  • ^ + ⇧ + P : Commands list
  • ^+P : Go to anything. I just hit ^+P and type parts of files I want to open – huge time saver.
  • ^ + Space – Auto completion.
  • ⌥ + 1, 2, 3, 4, … – Switch between open files’ tabs. Not to waste your time grabbing a mouse, and clicking on a tab.
  • ^ + PgUp/PgDn – Cicles throught the open files
  • ^ + click somewhere in your code – multiplies your caret, so you can simultaneously enter, delete, overwrite your code. Hitting Esc will exit this function.
  • ⌥ + ⇧ + W – Wrap selection with a tag. Select text, hit shortcut, enter tag’s name, done.
  • ^ + ⇧ + T – Open last closed file
  • ⌥ + ⇧ + 1,2,3,4,5… – Splits the screen into multiple views for multiple files
  • ^ K , ^ B – Opens/Closes the file explorer
  • ^ + G – Goto line
  • ^ + H – Replace
  • ^ + F – Find
  • ⇧ + ^ + D – Duplicates the current line, or the selection, if something is selected.
  • ^ + D – If no thing is selected, (can be previous selected) the current word closest to the caret is selected. Keep hitting this shortcut will select near by strings that are a match, and can be used for multiple editing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment