o Command [DO]
The o command repeats (without changes) any of the previous 1,000 commands.
DO[ start [ / stop ] ]
[ string ]
[ ALL | @ ]
(Default: repeat the previous command)
Commands are numbered sequentially from 1 as entered and the last 1,000 of them are retained. Use the :Listredo command to display the previous commands. You can repeat a single command (do 5
), a range of commands (do 5/10
) or the most recent command whose name matches a string (do list
). If you want to modify the commands before executing them, use :Redo or Before.
Examples
/listredo {or /bj or ,, } /do {do previous command again} /do 39 {do command line 39 again} /do 5/8 {do command lines 5 to 8 again} /do list {do most recent List command} /do show {do last starting with "show"} /do showjob job {do last "showjob job" command} /do @job {do last containing "job"} /do -2 {do command before previous} /do -7/-5 {do by relative line number} /do 5/ {do command lines 5 to "last"}
Notes
The o command can be abbreviated to “,.” as in MPEX, but you cannot use “;” to combine commands on the same line. To stop a o All, use Control-Y.