# Sublime Text Quick Reference

*Navigation, editing, multi-cursor, search, packages*

> Source: Sublime Text Documentation (sublimetext.com/docs) · MIT

## Navigation

### File & Symbol Navigation

| Command | Description |
|---------|-------------|
| `Ctrl+P` | Quick open file by name (fuzzy) |
| `Ctrl+R` | Go to symbol in file |
| `Ctrl+Shift+R` | Go to symbol in project |
| `Ctrl+G` | Go to line number |
| `Ctrl+;` | Go to word in file |

### Tab & Panel Navigation

| Command | Description |
|---------|-------------|
| `Ctrl+Tab` | Cycle through open tabs |
| `Ctrl+PageUp/Down` | Previous / next tab |
| `Alt+1..9` | Switch to tab by number |
| `Ctrl+K Ctrl+B` | Toggle sidebar |
| `Ctrl+`` | Toggle console |

### Goto Anything Prefixes

| Command | Description |
|---------|-------------|
| `:` | Go to line (Ctrl+P then :42) |
| `@` | Go to symbol (Ctrl+P then @func) |
| `#` | Go to word (Ctrl+P then #search) |

## Editing

### Line Operations

| Command | Description |
|---------|-------------|
| `Ctrl+Shift+K` | Delete line |
| `Ctrl+Shift+D` | Duplicate line |
| `Ctrl+Shift+Up/Down` | Move line up / down |
| `Ctrl+J` | Join lines |
| `Ctrl+Enter` | Insert line after |
| `Ctrl+Shift+Enter` | Insert line before |

### Text Manipulation

| Command | Description |
|---------|-------------|
| `Ctrl+Shift+U` | Uppercase selection |
| `Ctrl+K Ctrl+L` | Lowercase selection |
| `Ctrl+K Ctrl+U` | Uppercase selection (alt) |
| `Ctrl+]` | Indent line |
| `Ctrl+[` | Unindent line |
| `Ctrl+/` | Toggle comment |
| `Ctrl+Shift+/` | Toggle block comment |

## Selection

### Expand & Contract

| Command | Description |
|---------|-------------|
| `Ctrl+D` | Select word (repeat to add next occurrence) |
| `Ctrl+K Ctrl+D` | Skip current, select next occurrence |
| `Ctrl+Shift+L` | Split selection into lines |
| `Ctrl+L` | Select entire line |
| `Ctrl+Shift+M` | Select content inside brackets |
| `Ctrl+Shift+A` | Select content inside tag |
| `Ctrl+Shift+Space` | Expand selection to scope |

### Select All Matches

| Command | Description |
|---------|-------------|
| `Alt+F3` | Select all occurrences of word |
| `Ctrl+Shift+F` | Find in files (project-wide) |

## Multi-Cursor

### Adding Cursors

| Command | Description |
|---------|-------------|
| `Ctrl+Click` | Add cursor at click position |
| `Ctrl+D` | Add next occurrence to selection |
| `Alt+F3` | Select all occurrences as cursors |
| `Ctrl+Shift+L` | Add cursor to each selected line |
| `Ctrl+Alt+Up/Down` | Add cursor above / below |

### Multi-Cursor Workflow

```
1. Select word: Ctrl+D
2. Add next match: Ctrl+D (repeat)
3. Skip match: Ctrl+K, Ctrl+D
4. Type replacement — edits all at once
5. Esc to return to single cursor
```

## Search

### Find & Replace

| Command | Description |
|---------|-------------|
| `Ctrl+F` | Find in file |
| `Ctrl+H` | Find and replace |
| `Ctrl+Shift+F` | Find in files (project-wide) |
| `F3 / Shift+F3` | Next / previous match |
| `Alt+Enter` | Select all matches (in find panel) |
| `Ctrl+E` | Use selection for find |
| `Ctrl+Shift+E` | Use selection for replace |

### Search Options (Toggle in Find Panel)

| Command | Description |
|---------|-------------|
| `Alt+R` | Toggle regex mode |
| `Alt+C` | Toggle case sensitivity |
| `Alt+W` | Toggle whole word match |
| `Alt+L` | Toggle within selection |

## Command Palette

### Usage

| Command | Description |
|---------|-------------|
| `Ctrl+Shift+P` | Open Command Palette |
| `type to filter` | Fuzzy search commands |

### Useful Commands

| Command | Description |
|---------|-------------|
| `Set Syntax: [lang]` | Change file syntax highlighting |
| `Convert Indentation` | Switch tabs/spaces |
| `Sort Lines` | Alphabetically sort selected lines |
| `Reindent Lines` | Auto-indent selection |
| `Install Package` | Open Package Control installer |
| `Toggle Word Wrap` | Toggle soft wrapping |

## Build Systems

### Build Commands

| Command | Description |
|---------|-------------|
| `Ctrl+B` | Run build |
| `Ctrl+Shift+B` | Select build system and run |
| `F4 / Shift+F4` | Next / previous build result |

### Custom Build System

```
// Tools > Build System > New Build System
{
  "cmd": ["python3", "$file"],
  "selector": "source.python"
}
```

## Packages

### Package Control

| Command | Description |
|---------|-------------|
| `Ctrl+Shift+P → Install` | Install a package |
| `Ctrl+Shift+P → Remove` | Remove a package |
| `Ctrl+Shift+P → List` | List installed packages |
| `Ctrl+Shift+P → Disable` | Disable a package |

### Popular Packages

| Command | Description |
|---------|-------------|
| `Emmet` | HTML/CSS abbreviation expansion |
| `SublimeLinter` | Linting framework |
| `GitGutter` | Show git diff in gutter |
| `SideBarEnhancements` | Extended sidebar file operations |
| `A File Icon` | File type icons in sidebar |
| `Terminus` | Integrated terminal panel |

## Settings

### Settings Files

| Command | Description |
|---------|-------------|
| `Preferences > Settings` | Open user settings JSON |
| `Preferences > Key Bindings` | Open user key bindings |
| `Project > Edit Project` | Project-specific settings |

### Common Settings

```
{
  "font_size": 14,
  "tab_size": 2,
  "translate_tabs_to_spaces": true,
  "trim_trailing_white_space_on_save": true,
  "ensure_newline_at_eof_on_save": true
}
```

## Common Patterns

### Split Editing

| Command | Description |
|---------|-------------|
| `Alt+Shift+1` | Single column layout |
| `Alt+Shift+2` | Two column layout |
| `Alt+Shift+3` | Three column layout |
| `Alt+Shift+4` | Four column layout |
| `Alt+Shift+5` | Grid layout (2x2) |
| `Alt+Shift+8` | Two row layout |
| `Ctrl+Shift+[1..4]` | Move file to group N |

### Productivity Shortcuts

| Command | Description |
|---------|-------------|
| `Ctrl+K Ctrl+0` | Unfold all |
| `Ctrl+K Ctrl+J` | Unfold all (alternative) |
| `Ctrl+K Ctrl+1..9` | Fold to level N |
| `Ctrl+Shift+[` | Fold selection |
| `Ctrl+Shift+]` | Unfold selection |
| `F11` | Toggle full screen |
| `Shift+F11` | Toggle distraction-free mode |
