## Editor-wide

These shortcuts work regardless of which mode you’re in.

| Command | macOS | Windows |
| --- | --- | --- |
| **Search files and content** | `Cmd` \+ `K` | `Ctrl` \+ `K` |
| **Toggle AI assistant** (when not editing text) | `Cmd` \+ `I` | `Ctrl` \+ `I` |
| **Switch between visual and source mode** | `Cmd` \+ `Shift` \+ `S` | `Ctrl` \+ `Shift` \+ `S` |
| **Show all files** (including dotfiles and non-content files) | `Cmd` \+ `Shift` \+ `.` | `Ctrl` \+ `Shift` \+ `.` |

## Visual mode

Use these shortcuts when editing in visual mode.

### Text formatting

| Command | macOS | Windows |
| --- | --- | --- |
| **Bold** | `Cmd` \+ `B` | `Ctrl` \+ `B` |
| **Italic** | `Cmd` \+ `I` | `Ctrl` \+ `I` |
| **Underline** | `Cmd` \+ `U` | `Ctrl` \+ `U` |
| **Strikethrough** | `Cmd` \+ `Shift` \+ `X` | `Ctrl` \+ `Shift` \+ `X` |
| **Code** | `Cmd` \+ `E` | `Ctrl` \+ `E` |
| **Subscript** | `Cmd` \+ `,` | `Ctrl` \+ `,` |
| **Superscript** | `Cmd` \+ `.` | `Ctrl` \+ `.` |

### Headings

| Command | macOS | Windows |
| --- | --- | --- |
| **Text** | `Cmd` \+ `Option` \+ `0` | `Ctrl` \+ `Alt` \+ `0` |
| **Heading 1** | `Cmd` \+ `Option` \+ `1` | `Ctrl` \+ `Alt` \+ `1` |
| **Heading 2** | `Cmd` \+ `Option` \+ `2` | `Ctrl` \+ `Alt` \+ `2` |
| **Heading 3** | `Cmd` \+ `Option` \+ `3` | `Ctrl` \+ `Alt` \+ `3` |
| **Heading 4** | `Cmd` \+ `Option` \+ `4` | `Ctrl` \+ `Alt` \+ `4` |
| **Heading 5** | `Cmd` \+ `Option` \+ `5` | `Ctrl` \+ `Alt` \+ `5` |
| **Heading 6** | `Cmd` \+ `Option` \+ `6` | `Ctrl` \+ `Alt` \+ `6` |

### Lists and blocks

| Command | macOS | Windows |
| --- | --- | --- |
| **Unordered list** | `Cmd` \+ `Shift` \+ `8` | `Ctrl` \+ `Shift` \+ `8` |
| **Blockquote** | `Cmd` \+ `Shift` \+ `B` | `Ctrl` \+ `Shift` \+ `B` |

### Content actions

| Command | macOS | Windows |
| --- | --- | --- |
| **Add link** to selected text | `Cmd` \+ `K` | `Ctrl` \+ `K` |
| **Add line break** | `Cmd` \+ `Enter` | `Ctrl` \+ `Enter` |
| **Comment on highlighted text** | `Cmd` \+ `Shift` \+ `M` | `Ctrl` \+ `Shift` \+ `M` |
| **Toggle suggesting mode** | `Cmd` \+ `Shift` \+ `E` | `Ctrl` \+ `Shift` \+ `E` |
| **Component menu** | `/` | `/` |
| **Emoji picker** | `:` \+ keyword | `:` \+ keyword |

### Smart substitutions

The editor automatically converts certain character sequences into typographic symbols as you type. The editor skips substitutions inside code blocks and inline code.

| Type | Result |
| --- | --- |
| `->` | → |
| `<-` | ← |
| `=>` | ⇒ |
| `<=` | ≤ |
| `>=` | ≥ |
| `!=` | ≠ |

## Source mode

Source mode uses CodeMirror. Most common code editor shortcuts work, along with the ones below.

### Search and navigation

| Command | macOS | Windows |
| --- | --- | --- |
| **Search files** | `Cmd` \+ `K` | `Ctrl` \+ `K` |
| **Find** | `Cmd` \+ `F` | `Ctrl` \+ `F` |

### Editing

| Command | macOS | Windows |
| --- | --- | --- |
| **Bold** (wraps in `**`) | `Cmd` \+ `B` | `Ctrl` \+ `B` |
| **Italic** (wraps in `_`) | `Cmd` \+ `I` | `Ctrl` \+ `I` |
| **Toggle comment** | `Cmd` \+ `/` | `Ctrl` \+ `/` |
| **Fold all** | `Cmd` \+ `Option` \+ `Shift` \+ `[` | `Ctrl` \+ `Alt` \+ `Shift` \+ `[` |
| **Unfold all** | `Cmd` \+ `Option` \+ `Shift` \+ `]` | `Ctrl` \+ `Alt` \+ `Shift` \+ `]` |
| **Indent line** | `Tab` | `Tab` |
| **Outdent line** | `Shift` \+ `Tab` | `Shift` \+ `Tab` |
| **Move line up** | `Option` \+ `↑` | `Alt` \+ `↑` |
| **Move line down** | `Option` \+ `↓` | `Alt` \+ `↓` |
| **Duplicate line** | `Shift` \+ `Option` \+ `↓` | `Shift` \+ `Alt` \+ `↓` |

### Multiple cursors

| Command | macOS | Windows |
| --- | --- | --- |
| **Add cursor** | `Option` \+ Click | `Alt` \+ Click |
| **Add cursor above** | `Cmd` \+ `Option` \+ `↑` | `Ctrl` \+ `Alt` \+ `↑` |
| **Add cursor below** | `Cmd` \+ `Option` \+ `↓` | `Ctrl` \+ `Alt` \+ `↓` |
