2016-06-18 07:15:03 +02:00
|
|
|
---
|
|
|
|
title: Sublime Text
|
|
|
|
category: Apps
|
|
|
|
---
|
|
|
|
|
|
|
|
### Select & Expand
|
|
|
|
|
|
|
|
| `⌘ D` | select current word (repeat to include next instance of word) |
|
|
|
|
| `⌘ L` | select current line (repeat to include next line) |
|
2017-10-27 13:09:55 +02:00
|
|
|
| `⌘ ⇧ L` | split selection into multiple lines |
|
|
|
|
| `⌘ ⇧ A` | select text inside tag (repeat to expand) |
|
2016-06-18 07:15:03 +02:00
|
|
|
| `Ctrl ⇧ M` | select to curly or angle brackets (repeat to expand) |
|
2017-10-16 16:59:57 +02:00
|
|
|
{: .-shortcuts}
|
2016-06-18 07:15:03 +02:00
|
|
|
|
2017-10-16 16:59:57 +02:00
|
|
|
Replace ⌘ with Ctrl on Windows and Linux.
|
2016-06-18 07:15:03 +02:00
|
|
|
|
|
|
|
### Code Folding
|
|
|
|
|
2017-10-16 16:59:57 +02:00
|
|
|
| `⌘ Alt [` | fold closest block |
|
|
|
|
| `⌘ Alt ]` | unfold closest block |
|
|
|
|
| `⌘ K` `⌘ 1` | fold all first level code blocks |
|
|
|
|
| `⌘ K` `⌘ 2` | fold all second level code blocks |
|
|
|
|
| `⌘ K` `⌘ 3 (etc)` | fold all third level code blocks (etc) |
|
|
|
|
| `⌘ K` `⌘ T` | fold all HTML attributes |
|
|
|
|
| `⌘ K` `⌘ 0` | unfold everything |
|
|
|
|
{: .-shortcuts}
|
2016-06-18 07:15:03 +02:00
|
|
|
|
2017-10-26 20:10:17 +02:00
|
|
|
### Editing
|
|
|
|
|
|
|
|
| `⌘ ⇧ D` | duplicate current line/selection |
|
|
|
|
| `⌘ ⇧ K` | delete current line/selection |
|
2021-10-21 05:31:36 +02:00
|
|
|
| `⇧ del` | delete current line/selection |
|
|
|
|
| `⌘ ⇧ ↑` | move line up |
|
|
|
|
| `⌘ ⇧ ↓` | move line down |
|
2017-10-27 13:13:28 +02:00
|
|
|
{: .-shortcuts}
|
2017-10-26 20:10:17 +02:00
|
|
|
|
2016-06-18 07:15:03 +02:00
|
|
|
### Goto
|
|
|
|
|
|
|
|
| `⌘ P` | goto anything |
|
2017-10-26 20:10:17 +02:00
|
|
|
| `⌘ G` | goto line number |
|
|
|
|
| `⌘ R` | goto symbol |
|
2016-06-18 07:15:03 +02:00
|
|
|
| `⌘ P, :` | goto line number (enter number after `:`) |
|
|
|
|
| `⌘ P, #` | goto and list fuzzy-matches of string (enter characters after `#`) |
|
|
|
|
| `⌘ P, @` | goto and list symbol (begin typing symbol name after `@`) |
|
2017-10-16 16:59:57 +02:00
|
|
|
{: .-shortcuts}
|
2016-08-12 10:34:19 +02:00
|
|
|
|
|
|
|
### Command line
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ subl .
|
|
|
|
$ subl README.md
|
|
|
|
```
|
2017-10-16 16:59:57 +02:00
|
|
|
|
|
|
|
Use `subl` to open files in Sublime from the terminal.
|