O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Zipping Through Repetitive Editing

The preceding chapter covered the mechanics of using vi. This chapter shows how vi uses the tools from that chapter to automate almost any situation in which, in other editors, you would have to manually enter the same set of keystrokes (or worse, mouse drags) over and over again.

Using . to Repeat an Edit

The period (.) command repeats the last insert, delete, or modification but applies it to the current cursor position. The catch is, it repeats only the very last change. Assume, for example, that you are composing a letter and want to change a three-word company name (such as Acme Computer Products) to some other name repeatedly. If you first delete the old three-word name, then insert the new name, and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required