Last Updated: February 25, 2016
·
452
· rondale-sc

Dot macro against multiple lines!

The . in vim is a powerful pseudo macro. It captures the last change and allows you to play that from your current cursor position.

Sometimes it's convenient to play the dot macro across multiple lines. To accomplish this feat is easy:

  • enter visual mode and select your lines (shift-v)
  • type :norm .

<small><range> [colon][norm] [dot]</small>

That's it.