您可以通过q <字母>开始录制,也可以再次输入q结束录制。
记录是 Vim 真正有用的功能。
它记录您键入的所有内容。然后,您只需键入@
Vim IMHO 的最佳功能之一。
输入:h 录制以了解更多信息。
*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 . {Vi: no recording} q Stops recording . (Implementation note: The ' q ' that stops recording is not stored in the register , unless it was the result of a mapping ) {Vi: no recording} *@* @{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 | @: |. {Vi: only named registers}