Skip to content

Instantly share code, notes, and snippets.

@ciaranarcher
Last active February 18, 2016 08:25
Show Gist options
  • Save ciaranarcher/5636409 to your computer and use it in GitHub Desktop.
Save ciaranarcher/5636409 to your computer and use it in GitHub Desktop.
Sublime Text 2 Shortcuts

Sublime Text 2 - Useful Shortcuts (Mac OS X)

Credit to: https://gist.github.com/lucasfais/1207002

General

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

Editing

select line (repeat select next lines)              | ⌘L
select word when multiple editing                   | ⌘D
select content into brackets                        | ⌃⇧M
insert line before                                  | ⌘⇧↩
inter line after                                    | ⌘↩
delete line                                         | ⌃⇧K
delete from cursor to end of line                   | ⌘KK
delete from cursor to start of line                 | ⌘K⌫
duplicate line(s)                                   | ⌘⇧D
join lines                                          | ⌘J
upper case                                          | ⌘KU
lower case                                          | ⌘KL
comment                                             | ⌘ /
block comment                                       | ⌘⌥ /
redo or repeat                                      | ⌘Y
past and ident                                      | ⌘⇧V
autocomplete (repeat to select next suggestion)     | ⌃ space
jump to matching brackets                           | ⌃M
soft undo (movement undo)                           | ⌘U
soft redo (movement redo)                           | ⌘⇧U

HTML

select content into tag                             | ⌘⇧A
close tag                                           | ⌘⌥ .

Find/Replace

find                                                | ⌘F
replace                                             | ⌘⌥F
find next occurrence of current word                | ⌘⌥G
select current word for multiple editing            | ⌘⌃G
find in files                                       | ⌘⇧F
open next search result in results pane             | F4
open previous search result in results pane         | ⇧F4

Splits/Tabs

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

Bookmarks

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

Marks

set mark                                            | ⌘K space
delete from cursor to mark                          | ⌘KW
select from cursor to mark                          | ⌘KA
clear mark                                          | ⌘KG

Formatting

JSON prettify (plugin)                              | ⌘⌃J

Running Tests

run all tests in current test file                  | ⌘⇧T
open test window                                    | ⌘⇧X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment