Vim Cheat Sheet
Basic Usage⌗
- delete inside parentheses (which can be replaced with any symbol)
di(
di"
di'
- …
Split⌗
- Horizontal:
ctrl + w + s
- Vertical:
ctrl + w + v
Replace a word with yanked text⌗
yiw Yank inner word (copy word under cursor, say "first").
Move the cursor to another word (say "second").
ciw Ctrl-R 0 Esc Change "second", replacing it with "first". (Ctrl-R: paste `0` register in insert mode)
Move the cursor to another word (say "third").
. Repeat the operation (change word and replace it with "first").
Move the cursor to another word and press . to repeat the change.
ref: https://vim.fandom.com/wiki/Replace_a_word_with_yanked_text
Read other posts