什么是Vim录制以及如何禁用它?

我一直在gVim 7.2窗口底部看到recording消息。

它是什么,我如何关闭它?

368003 次浏览

这意味着您处于“记录宏”模式。此模式通过键入q后跟寄存器名称进入,并且可以通过再次键入q退出。

听起来好像您打开了宏录音。要关闭它,请按q

有关更多信息,请参阅“帮助录制”。

相关链接:

您开始录制q<字母>您可以通过再次输入q来结束它。

录制是Vim的一个非常有用的功能。

它会记录您键入的所有内容。然后您只需键入@<函>即可重播它。记录搜索,移动,替换…

Vim IMHO的最佳功能之一。

正如其他人所说,它是宏记录,你可以用q.这是一篇不错的文章关闭它,关于如何以及为什么它很有用。

输入: h记录以了解更多信息。

                           *q* *recording*q{0-9a-zA-Z"}           Record typed characters into register {0-9a-zA-Z"}(uppercase to append).  The 'q' command is disabledwhile executing a register, and it doesn't work insidea mapping.  {Vi: no recording}
q                       Stops recording.  (Implementation note: The 'q' thatstops recording is not stored in the register, unlessit 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 currentfile) and '#' (name of the alternate file) cannot beused.  For "@=" you are prompted to enter anexpression.  The result of the expression is thenexecuted.  See also |@:|.  {Vi: only named registers}

键入q开始宏录制,当用户再次点击q时录制停止。

正如Joey Adams提到的,要禁用录制,请将以下行添加到主目录中的.vimrc

map q <Nop>