¿Qué es la grabación vim y cómo se puede desactivar?


Sigo viendo el mensaje recording en la parte inferior de mi ventana gvim 7.2.

¿Qué es y cómo lo desactivo?

 657
vim
Author: Andrew Hendrie, 2009-10-07

6 answers

Empiezas a grabar por q y puedes terminarlo escribiendo q de nuevo.

La grabación es una característica muy útil de Vim.

Registra todo lo que escribe. A continuación, puede volver a reproducirlo simplemente escribiendo @. Registro de búsqueda, movimiento, reemplazo...

Una de las mejores características de Vim IMHO.

 894
Author: yogsototh,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-06-08 18:43:40

Escriba : h grabando para obtener más información.

                           *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}
 94
Author: ephemient,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-10-06 20:17:25

Parece que tienes la grabación de macro activada. Para apagarlo, pulse q.

Consulte ": help recording" para obtener más información.

Enlaces relacionados:

 33
Author: Tim Henigan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-10-06 20:07:47

Escribiendo q se inicia la grabación de macro, y la grabación se detiene cuando el usuario pulsa q de nuevo.

Como mencionó Joey Adams, para deshabilitar la grabación, agregue la siguiente línea a .vimrc en su directorio personal:

map q <Nop>
 23
Author: mitchus,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-02-13 14:16:03

Como otros han dicho, es una grabación macro, y la desactivas con q. Aquí hay un buen artículo sobre cómo hacerlo y por qué es útil.

 22
Author: JeffH,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-10-06 20:10:26

Significa que estás en modo "grabar macro". Este modo se introduce escribiendo q seguido de un nombre de registro, y se puede salir escribiendo q de nuevo.

 13
Author: John Millikin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-10-06 20:11:14