[prev] [index] [next]

Repeating Yourself

You can repeat the previous change command via .

Leads to an idiom for skipping through file making similar changes:

  • find first place to change using / pattern

  • make change using e.g. cw

  • skip to next occurence of pattern via n

  • make same change again using .

Of course, if you really want to make a global subsitution:

:%s/pattern/replacement/g