->Title Page
->Intro
->Unix
->Vi editor
-->Basics
--->Moving around
--->Deleting text
--->Saving and quitting
--->Editing
--->Search and Replace
--->Undo
->Repeat
-->Vi reference
-->Miscellaneous tips
->Mirror sites
->Further reading

[ Up ]
[Prev][Home][Next]
[Author]

Vi ---> Repeat

Often times you may desire to repeat the last command performed. This can be done with the "." command. Place the cursor in the appropriate position and press "." to repeat the most recent command. Suppose I had a C program in which I wished to switch a variable name from no_way to yes_way in two different places. One way I could accomplish this would be to place my cursor on the beginning of the first no_way and type cw (change word) and then type yes_way <esc>. This would accomplish my task for the first case. Now all I would need to do to change the second no_way would be to place my cursor at the beginning of it and type "." to repeat the last command.

Please notify owners of webpages with outdated links to these pages

Find this site useful? Want to give something back?

© 1993-2001 Christopher C. Taylor