VIM
(talks.metaphoric.dev/vim)
qed โ ed โ em โ ex โ vi โ vim
๐ฐ Invest
in your tools!
๐ณ ๐
- ๐ณ delete (verb)
- ๐
word (noun)
๐ฒ ๐
- ๐ฒ change (verb)
- ๐
word (noun)
verbs
- d: delete
- c: change (delete & enter insert mode)
- >: indent
- y: yank (copy)
- v: select (visually)
motions
- w: word (forward)
- b: back
- d2w: delete 2 words
- d3j: delete 3 lines down
text objects
- iw ๐กข inner word
- i" ๐กข inner quotes
- it ๐กข inner tag (HTML tag)
- i{ ๐กข inner brackets
- ip ๐กข inner paragraph
searching
- f, F: "find" a character
- t, T: "find" until
- /: search
Basic Navigation
- hjkl - left down up right
- ^e, ^y - scroll the window down/up
- ^d, ^u - scroll down/up half a page
- ^f, ^b - scroll forward/back a full page
- ^ - move to first non blank character in line
- $ - move to end of line (EOL)
- gg - go to top of file
- G - go to bottom of file
:wq :x
save (write) and quit
Macros
q<letter>
- record a macro
@<letter>
- run a macro