Tip2: Don't Repeat Yourself

January 12, 2021 · View on GitHub

$:

move the cursor to the end of the line.

a:

append after the current position.

A:

append at the end of the current line.(no matter where the cursor is at the time)

Example:

Goal: append a semicolon at the end of each line

>a;Escforeachline.j --> a;Esc for each line. j. --> for other lines.(. equals a;Esc)

Reduce Extraneous Movement

A;Esc --> j. (A instead of $a)

tip2

Tip1 Tip3