Skip to content

Instantly share code, notes, and snippets.

@lucasfais
Created September 9, 2011 18:46
Show Gist options
  • Save lucasfais/1207002 to your computer and use it in GitHub Desktop.
Save lucasfais/1207002 to your computer and use it in GitHub Desktop.
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
⌃ ` python console
⌘⇧N new window (useful for new project)

Editing

⌘L select line (repeat select next lines)
⌘D select word (repeat select others occurrences in context for multiple editing)
⌃⇧M select content into brackets
⌘⇧↩ insert line before
⌘↩ inter line after
⌃⇧K delete line
⌘KK delete from cursor to end of line
⌘K⌫ delete from cursor to start of line
⌘⇧D duplicate line(s)
⌘J join lines
⌘KU upper case
⌘KL lower case
⌘ / comment
⌘⌥ / block comment
⌘Y redo or repeat
⌘⇧V past and ident
⌃ 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 content into tag
⌘⌥ . close tag

Find/Replace

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

Splits/Tabs

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

Bookmarks

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

Marks

⌘K space set mark // ⌘K; for me
⌘KW delete from cursor to mark
⌘KA select from cursor to mark
⌘KG clear mark
@cortesben
Copy link

Nice I will be using this! Thanks!

@fabOnReact
Copy link

Hello Experts, I am searching for a Linux shortcut to move tabs in Sublime text, I do not mean switching tab but moving them.
Tab 1 is the first of 3 tabs and I want to move it as last. Thanks

@jasperf
Copy link

jasperf commented Apr 18, 2017

Hello Experts, I am searching for a Linux shortcut to move tabs in Sublime text, I do not mean switching tab but moving them.
Tab 1 is the first of 3 tabs and I want to move it as last. Thanks

would love to know this as well

@g-liu
Copy link

g-liu commented Jun 26, 2017

Does anyone know shortcut to find all of one word and delete it?

@shalins Command + Control + G

@prasdeva
Copy link

Having little experience with sublime Text, how do i quickly find a text with in a file ?

CMD + F will get me find but I need to copy + past search text into the search box. Surely there must be a quick way to get the selected text with in search box, like notepad++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment