Vim - Repeatable Actions and How to Reverse Them
- Vim’s normal mode is similar to how painters spend the majority of time doing things other than putting paint to paper
| Intent | Action | Repeat | Reverse |
|---|---|---|---|
| Make a change | {edit} | . | u |
| Scan line for next char | f{char}/t{char} | ; | , |
| Scan line for prev char | F{char}/T{char} | ; | , |
| Scan document for next match | /pattern<CR> | n | N |
| Scan document for prev match | ?pattern<CR> | n | N |
| Scan document for current word | * | n | N |
| Substitution | :s/target/repl | & | u |
| Macro sequence | qx{changes}q | @x | u |
<C-o>lets you exit insert mode to perform a single normal mode command
References
[1] Drew Neil. “Practical Vim.”