Basic commands
R Switch to REPLACE mode to overwrite text
v Switch to VISUAL mode
V Switch to VISUAL LINE mode
Видео «which-key» не найдено (урок не готов или slug неверный).
Change Surround: cs(alt)(neu) cs"' Changes " to ' surrounding cs"
Changes " to
cst" Changes tags like to "Delete Surround: ds(alt) ds" Deletes " surrounding dst Deletes tag like
Delete into a buffer
| Command | Action |
|---|---|
| x | one character |
| dw | a word |
| dd | a line |
| Command | Action |
|---|---|
| i | insert text before the cursor |
| I | insert text from the beginning of the line |
| a | append text after the cursor |
| A | append text from the end of the line |
| o | on a new line below the cursor |
| O | on a new line above the cursor |
Undoing actions
| Command | Action |
|---|---|
| u | UNDO the last action |
| U | UNDO the whole line |
| Ctrl-R | REDO |
Entering visual mode
| Command | Action |
|---|---|
| v | character- and line-wise visual mode |
| V | line-wise visual mode |
| Ctrl - v | rectangular block visual mode |
In visual mode we select a block, and then:
| Command | Action |
|---|---|
| d | delete into a buffer (del) |
| с | delete into a buffer and enter insert mode (cut) |
| y | copy into a buffer without deleting (yank) |
Deleting into a buffer
| Command | Action |
|---|---|
| x | one character |
| dw | a word |
| dd | a line |
Positioning in a file
| Command | Action |
|---|---|
| :{number} | go to the line with the given number (do not confuse with :n — the next file). |
| :0 or gg | beginning of the file, |
| :$ or G | end of the file |
| ) or ( | next or previous sentence |
| } or { | the same for a paragraph |
| ]] or [[ | the same for a section, function |
| % | matching bracket |
| `` | previous location, accurate to the character |
| '' (two apostrophes) | the same, accurate to the line |
| <Ctrl> + O | go back to the previous location |
Search/replace
| Command | Action |
|---|---|
| /text | search for "text" below the current position |
| ?text | the same, but above |
| n | repeat the search in the same direction |
| N | the same, but in the opposite direction |
| '*' | find and mark a word the same as the one under the cursor, lower in the file |
| '#' | the same, but higher in the file |
| R | enter replace mode |
Marks
| Command | Action |
|---|---|
| Ctrl + O | return to the previous location |
| Ctrl + I | return to the next location |
| m{a-zA-Z} | mark the current position with the letter {a-zA-Z} |
| `{a-zA-Z} | jump to the mark {a-zA-Z} |
| '{a-zA-Z} | jump to the line with the mark {a-zA-Z} |
| ` {0-9} | jump to the mark {0-9} / or 0 opens the last file |
g'm or g`m | jump to a mark
Git
Git never leaves the editor — the main operations, and you can peek under the hood of history without taking your hands off the buffer:
Видео «blame» не найдено (урок не готов или slug неверный).
Видео «staging» не найдено (урок не готов или slug неверный).
Видео «log» не найдено (урок не готов или slug неверный).
Видео «review» не найдено (урок не готов или slug неверный).
Errors can also be shown with taste rather than as a sheet across half the screen.
In lazyvim:
A small floating window with the diagnostic pops up under the cursor — exactly the place where everything came apart.
We jump between diagnostics with ]d, [d
The same for ]e (errors), ]w (warnings)
All the file's errors at once — Trouble, opened with
Testing
The test config is in place — open a test file: a single test runs with
We click the results summary with
to set up db https://docs.sqlfluff.com/ Copilot chat Aerial Debug