Skip to content

Instantly share code, notes, and snippets.

@hileon
Forked from lucasfais/gist:1207002
Created October 25, 2011 07:39
Show Gist options
  • Select an option

  • Save hileon/1311735 to your computer and use it in GitHub Desktop.

Select an option

Save hileon/1311735 to your computer and use it in GitHub Desktop.
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

Open/Goto

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌘⇧P command prompt
⌃G go to line
⌃ ` python console

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
⌘⇧Z past and ident
⌃ space autocomplete (repeat to select next suggestion)
⌃M jump to matching brackets

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
@marcJV
Copy link

marcJV commented Dec 29, 2011

Some other useful tips are:
Ctrl+Home Takes you to the top of the document
Ctrl+End Takes you to the bottom of the document
Ctrl+P Search all files in your project by name. If you then type in @ it searches that file by functions and classes.

@hileon
Copy link
Author

hileon commented Dec 30, 2011

I like Ctrl+P and its @, it is very convenient.

@adibMosharrof
Copy link

There is a shortcut to the Ctrl+P and then @, if you press Ctrl+R, then the @ sign will automatically come.

Also there is another shortcut, Ctrl+; This produces a # in the Ctrl+P menu, and you will be able to search any name in the file.

@davidkaneda
Copy link

Any idea if there's a keyboard-based way to navigate the search results page?

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