Here is a trick you can use in VI if you need to repeat an action multiple times. Imagine you have this file:
hello
Workd
hello
Workd
hello
WorkdYou want to change it to read "Hello world!" Here is what you can do in VI:
So, now you have learned what this (annoying) "recording" option can be used for!
| About | Consultancy | Articles | Contact |
|
|
|
|
|
| References | Red Hat Certified Architect | By Robert de Bock | Robert de Bock |
| Curriculum Vitae | By Fred Clausen | +31 6 14 39 58 72 | |
| By Nelson Manning | robert@meinit.nl |
Comments
In 8 key presses plus the
In 8 key presses plus the filename:
tr k l
Obviously in this particalur
Obviously in this particalur example, it would have been more convenient and efficient to just do "%s/rkd/rld/gc" :)