Cheatsheets

Sublime Text Shortcuts

SELECTIONS

command-shift-A This selects to the edge of the context.
It’s incredibly useful because it lets you select up the document.
I find, though, that this sometimes doesn’t work on Mac. You can use the menu item, though.,

control-shift-W: (wrap) Allows you to wrap around an element.

command-shift-L: Split into Lines: Turns a single multi-line selection into multiple single-line selections. Very useful.

command-right-arrow Takes you to end of line

command-left-arrow Takes you to beginning of line

command-click Multiple cursors. One of the greatest things in Sublime Text.

command-d Incremental multi-selection: one item at a time is added to the selection.

command-control-g (group selection) selects all instances of the item you’ve selected

bookmarks command-f2  (on mac need to press FN too because of multi function keys), then F2 will cycle through your bookmarks

 

INDENTING

command-] : indent selection

command-[: unindent selection

Edit > Line > Reindent: auto-indent selections based on document structure

 

FILE OPENING OR SELECTING

command-shift-t Open Recent File(s)

command-1, command-2, etc: Switches between open tabs

command-option-arrow ( left or right ): Switches sequentially through tabs

command-p: jump between any files (open or unopened) in your project. Really useful.

 

VIEWS

View > Layout: columns, rows, or grids for viewing multiple files.

File > New View Into File: same document in multiple windows. Very useful.

 

NAVIGATING

command-f: search. use find next or previous or all

command-i: this is like find but is incremental find. it will jump to select the word. press command i to go to the next. press enter to jump there in the document. very useful.

command-shift-f: multiple file search and replace. exceptionally useful.

command-p: Go To Anything. You can jump to any file, or any part of a file. When the field for GoToAnything opens, you can start with a hash (#) for a fuzzy search, or a @ for IDs in a file.

 

Miscellaneous Commands

Command-Shift-p: the Command Palette. Gives access to all commands in the program. Also uses fuzzy logic. One of the most important palettes in the program, and very intuitive. For example, if you want to reformat your code so that everything lines up, just press command-shift-p to bring up the command palette and then start typing what you think the likely command is. If I’m thing “reformat”, I might start typing “re”. The program will show me all commands that start with those letters, which helps me remember that the command I’m looking for is reindent. So very, very useful.

 

Standard