Wed, May 12th, 2022
To my future self:
My learning process using VIM key bindings was stuck on move commands; even though I realized the power of moving freely and accurately around the editor, I haven’t a reason to waste my life with key bindings. This post is a never-ending excuse to continue developing my VIM workflow. If I am reading this now, I am sure I forgot something.
char
or a seq
of chars n
timesSequence: ESC
-n
-i
-char/seq
-ESC
-ESC
n
: number of timesi
: insert modechar/seq
: char or sequence of charsUsage: Create a header for a file or when I need to repeat an arbitrary sequence of characters.
:s
or in all llines :%s
Sequence: :s/this/for that/g
or :%s/this/for that/g
:s
: is short for “substitute” on the current line:%s
: is short for “substitute” on the whole documentthis
: is the pattern you want to replacefor that
: you want insteadg
: is short for “global” and refers to replacing more than the first
occurrenceUsage: guess what!
Sequence: guu
(upper-to-lower) or gUU
(lower-to-upper) the current line
U
: Change lower-to-upper caseu
: Change upper-to-lower caseu
or U
}: change the selection given u
or U
behavior
That’s the way computer talks to each other.