2024-04-04 11:37:35 +02:00

60 lines
2.1 KiB
Markdown

---
title: Neovim
tags: note software editor neovim
created: 2023-07-01T10:23:16Z
published: true
---
## Basics
| | |
| ------------------------------- | -------- |
| Normal | `Esc` |
| Insert | `i` |
| Append after cursor | `a` |
| Append at end of line | `A` |
| Append line (after) | `o` |
| Append line (before) | `O` |
| Move to next word | `w` |
| Move to beginning of word | `b` |
| Move to end of word | `e` |
| Move forward to character | `f` |
| Move backward to character | `F` |
| Move to start of file | `gg` |
| Move to end of file | `G` |
| Move to start of line | `0` |
| Move to end of line | `$` |
| Move to first character of line | `^` |
| Select | `v` |
| Select line | `V` |
| Copy | `y` |
| Copy line | `yy` |
| Paste (before cursor) | `P` |
| Paste (after cursor) | `p` |
| Delete | `d` |
| Delete until end of line | `D` |
| Delete line | `dd` |
| Repeat last command | `.` |
| Undo | `u` |
| Redo | `Ctrl r` |
| Search | `/` |
## Commands
| | |
| --------- | ------------- |
| Command | `:` |
| Edit file | `:e file.txt` |
| Replace | `:%s/a/b` |
## Combinations
| | |
| --------------------------------------- | ------ |
| Change word under cursor | `ciw` |
| Delete word and whitespace under cursor | `daw` |
| Rewrite line | `^Da` |
| Select word under cursor | `viw` |
| Select next block | `va{` |
| Select everything | `ggVG` |