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

Re: A number generator in built in vi

Expand Messages
  • Kevin Dillman
    If you have macro capability: Insert 1 on the first line. qf to begin recording a macro in register f. yyp to copy and past the same number on the
    Message 1 of 8 , Oct 10, 2008
    • 0 Attachment
      If you have macro capability:
      Insert 1 on the first line.
      qf       to begin recording a macro in register f.
      yyp    to copy and past the same number on the line below.
      C-a    to increment the second number.
      q       to stop recording
      98@f to run the macro in register f 98 more times for a total of 100.
       
      Kevin

      On Fri, Oct 10, 2008 at 9:19 AM, Andy Wokula <anwoku@...> wrote:

      parag_paul@... schrieb:
      > Does vi has some quick way to generate lets say 1-100
      > in 100 lines

      In Vim7 you'd say for example
        :put = range(1,100)

      but in Vi ... are you sure you're using Vi and not Vim?
        :ver

      --
      Andy



      --~--~---------~--~----~------------~-------~--~----~
      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.