->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.

Site Statistics

t a y l o r@l i n u x b o x.c o m

© 1993-1998 Christopher C. Taylor