Loading ...
Sorry, an error occurred while loading the content.
 

repeat macro with "."

Expand Messages
  • leandromartinez98
    When I record a macro using qa ... q , I would like to repeat the macro many times using the . command. Is it possible? Pressing @a requires 3 key
    Message 1 of 4 , Oct 1, 2009
      When I record a macro using "qa"..."q", I would like
      to repeat the macro many times using the "." command.
      Is it possible? Pressing "@a" requires 3 key strokes...

      Thanks,
      Leandro.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Tim Chase
      ... While I don t believe you can do this with the . operator, you have several other options: 1) prefix your macro execution with a count 300@a to execute
      Message 2 of 4 , Oct 1, 2009
        > When I record a macro using "qa"..."q", I would like
        > to repeat the macro many times using the "." command.
        > Is it possible? Pressing "@a" requires 3 key strokes...

        While I don't believe you can do this with the "." operator, you
        have several other options:

        1) prefix your macro execution with a count

        300@a

        to execute the macro 300 times

        2) after executing the macro once with "@a", you can re-run the
        macro with "@@" which I find a lot easier than hitting two
        different keys.

        -tim

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • sc
        ... are you aware that @@ repeats the previous @_ and are you aware that you can put a count in front of @_? sc
        Message 3 of 4 , Oct 1, 2009
          On Thursday 01 October 2009, leandromartinez98 wrote:

          > When I record a macro using "qa"..."q", I would like
          > to repeat the macro many times using the "." command.
          > Is it possible? Pressing "@a" requires 3 key strokes...

          are you aware that @@ repeats the previous @_

          and are you aware that you can put a count in front of @_?

          sc

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Leandro
          ... Thanks. I did know about the count, but not about the @@. It is easier than pressing different keys. Not ideal but ok. Thanks again.
          Message 4 of 4 , Oct 1, 2009
            On Oct 1, 2:59 pm, sc <tooth...@...> wrote:
            > On Thursday 01 October 2009, leandromartinez98 wrote:
            >
            > > When I record a macro using "qa"..."q", I would like
            > > to repeat the macro many times using the "." command.
            > > Is it possible? Pressing "@a" requires 3 key strokes...
            >
            > are you aware that @@ repeats the previous @_
            >
            > and are you aware that you can put a count in front of @_?
            >
            > sc

            Thanks. I did know about the count, but not about the @@.
            It is easier than pressing different keys. Not ideal but ok.
            Thanks again.




            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.