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

RE: clear a register

Expand Messages
  • John Beckett
    ... We have a tip that mentions a method: http://vim.wikia.com/wiki/Power_of_g 0 ay0:g/ /y A ... John
    Message 1 of 2 , Jan 28, 2009
    • 0 Attachment
      Bee wrote:
      > :g/.*beep.*/normal "Ayy
      >
      > This works fine unless there is already something in register a.
      >
      > Is there a simple way to clear a register before issuing this
      > global command?

      We have a tip that mentions a method:
      http://vim.wikia.com/wiki/Power_of_g

      0"ay0:g/<pattern>/y A

      The simple-to-remember method to clear register a is:

      :let @a=''

      John


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