Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/content/docs/code/code-editor/code-editor-vim-keybindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,28 @@ See [Vim docs: motion](https://vimdoc.sourceforge.net/htmldoc/motion.html) for m
| `.` | repeat last edit |
| `gcc` | toggle comments on current line |
| `gc` | toggle comments on visual selection |
| `>`, `<` | indent or dedent a range or object |
| `>>`, `<<` | indent or dedent the current line |

See [Vim docs: editing](https://vimdoc.sourceforge.net/htmldoc/editing.html) for more information.

#### Indenting and dedenting

`>` and `<` are operators, so they combine with any supported motion or text object the same way `d` and `y` do:

| Command | Description |
| --------- | -------------------------------------------------------- |
| `>>` | indent the current line |
| `<<` | dedent the current line |
| `>j` | indent the current line and the line below |
| `>ap` | indent the current paragraph |
| `3>>` | indent the current line and the two below it |
| `>` / `<` | indent or dedent the selection in visual or visual line mode |

In visual mode, `>` and `<` shift the selected lines and return to Normal mode.

See [Vim docs: shifting text](https://vimdoc.sourceforge.net/htmldoc/change.html#%3E) for more information.

#### Text objects

| Command(s) | Description |
Expand Down
Loading