REPEAT

*repeat.txt*    For IdeaVIM version 0.12.0.  Last change: 2006 Nov 12


                  IdeaVIM REFERENCE MANUAL    by Rick Maddy


Repeating commands, Vim scripts and debugging                   *repeating*

Chapter 26 of the user manual introduces repeating |usr_26.txt|.

1. Single repeats       |single-repeat|
2. Multiple repeats     |multi-repeat|
3. Complex repeats      |complex-repeat|
4. Using Vim scripts    |using-scripts|
5. Debugging scripts    |debug-scripts|


1. Single repeats                                       *single-repeat*

                                                        *.*
.                       Repeat last change, with count replaced with [count].

Simple changes can be repeated with the "." command.  Without a count, the
count of the last change is used.  If you enter a count, it will replace the
last one.  If the last change included a specification of a numbered register,
the register number will be incremented.  See |redo-register| for an example
how to use this.  Note that when repeating a command that used a Visual
selection, the same SIZE of area is used, see |visual-repeat|.

                                                        *@:*
@:                      Repeat last command-line [count] times.



2. Multiple repeats                                     *multi-repeat*


3. Complex repeats                                      *complex-repeat*

                                                        *q* *recording*
q{0-9a-zA-Z"}           Record typed characters into register {0-9a-zA-Z"}
                        (uppercase to append).  The 'q' command is disabled
                        while executing a register, and it doesn't work inside
                        a mapping.

q                       Stops recording.  (Implementation note: The 'q' that
                        stops recording is not stored in the register, unless
                        it was the result of a mapping)

                                                        *@*
@{0-9a-z".=*}           Execute the contents of register {0-9a-z".=*} [count]
                        times.  Note that register '%' (name of the current
                        file) and '#' (name of the alternate file) cannot be
                        used.  For "@=" you are prompted to enter an
                        expression.  The result of the expression is then
                        executed.  See also |@:|.

                                                        *@@*
@@                      Repeat the previous @{0-9a-z":*} [count] times.

                                                                *:@*
:[addr]@{0-9a-z".=*}    Execute the contents of register {0-9a-z".=*} as an Ex
                        command.  First set cursor at line [addr] (default is
                        current line).  When the last line in the register does
                        not have a <CR> it will be added automatically when
                        the 'e' flag is present in 'cpoptions'.
                        For ":@=" the last used expression is used.  The
                        result of evaluating the expression is executed as an
                        Ex command.
                        Mappings are not recognized in these commands.

                                                        *:@:*
:[addr]@:               Repeat last command-line.  First set cursor at line
                        [addr] (default is current line).

                                                        *:@@*
:[addr]@@               Repeat the previous :@{0-9a-z"}.  First set cursor at
                        line [addr] (default is current line).  {Vi: only in
                        some versions}


4. Using Vim scripts                                    *using-scripts*


5. Debugging scripts                                    *debug-scripts*