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

calling to vimming geeks

Expand Messages
  • Aditya Kher
    folks, what is the best way to write something like follows? foo somename_0 { text_that_doesnt_change_A; boo somename_Data_0 { text_that_doesnt_change_B;
    Message 1 of 3 , Aug 3 3:21 AM
      folks,
      what is the best way to write something like follows?

      foo somename_0 {
      text_that_doesnt_change_A;
      boo somename_Data_0 {
      text_that_doesnt_change_B;
      text_that_doesnt_change_C;
      }


      foo somename_1 {
      text_that_doesnt_change_A;
      boo somename_Data_1 {
      text_that_doesnt_change_B;
      text_that_doesnt_change_C;
      }


      and so on till....


      foo somename_1023 {
      text_that_doesnt_change_A;
      boo somename_Data_1023 {
      text_that_doesnt_change_B;
      text_that_doesnt_change_C;
      }




      --
      Aditya Kher
      http://kher.org

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Aditya Kher
      that does it!! I knew A increments but I did not know it increments the number on a *given* line... should ve RTFM... sorry for spamming vim-lovers...
      Message 2 of 3 , Aug 3 4:13 AM
        that does it!!
        I knew <CTRL>A increments but I did not know it increments the number
        on a *given* line... should've RTFM...
        sorry for spamming vim-lovers...
        -aditya

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Sartak
        ... No worries about the spam . It s a perfectly valid question, and I m sure you re not the only one who has learned from Kev s answer. Here s another
        Message 3 of 3 , Aug 3 5:59 AM
          On 8/3/07, Aditya Kher <aditya.kher@...> wrote:
          >
          > that does it!!
          > I knew <CTRL>A increments but I did not know it increments the number
          > on a *given* line... should've RTFM...
          > sorry for spamming vim-lovers...
          > -aditya

          No worries about the "spam". It's a perfectly valid question, and I'm
          sure you're not the only one who has learned from Kev's answer. Here's
          another version:

          yap}p^Ajj^Akk

          1) qq # begin recording
          2) yap # yank a "paragraph" (one of these data structures)
          3) } # go to the end of the "paragraph"
          4) p # put the paragraph in
          5) ^A # increment
          6) jj # move down to the next something_N
          7) ^A # increment
          8) kk # move back to where the macro needs to start

          It's unhappy that your programming language forces you to this length,
          though! :)

          Shawn M Moore

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