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

Re: copy & paste with auto increment

Expand Messages
  • Federico Nati
    Hi, ok, I ve found the solution by myself: ... qa Y p CTRL-A q 10@q ... It works! Note: if the number is in the form 01 put the cursor on
    Message 1 of 2 , Sep 30 2:37 AM
      Hi,

      ok, I've found the solution by myself:

      I can record a macro and use CTRL-A to increment the number(s):

      ----------------------------
      qa
      Y
      p
      <move on the number> CTRL-A
      q
      10@q
      ----------------------------

      It works!

      Note:
      if the number is in the form
      01
      put the cursor on the "0" and not on the "1"

      Ciao, Federico.


      On Thu, 30 Sep 2004 10:57:10 +0200
      Federico Nati <federico.nati@...> wrote:

      > Hi all,
      >
      > let's imagine a line like this:
      >
      > blah blah blah 01 blah blah blah
      >
      > I want to copy it (i.e. by typing yy) and pasting it 10 times (i.e. by
      > typing p10p), but I would like to automatically increment the number
      > 01, so that the result should be:
      >
      > blah blah blah 01 blah blah blah
      > blah blah blah 02 blah blah blah
      > blah blah blah 03 blah blah blah
      > blah blah blah 04 blah blah blah
      > blah blah blah 05 blah blah blah
      > blah blah blah 06 blah blah blah
      > blah blah blah 07 blah blah blah
      > blah blah blah 08 blah blah blah
      > blah blah blah 09 blah blah blah
      > blah blah blah 10 blah blah blah
      >
      > Is there any way to make it work?
      >
      > Thanks, ciao, Federico.
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.