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

134992Re: copy and replace with a slight modification a line several times

Expand Messages
  • Ben Fritz
    Dec 11, 2012
    • 0 Attachment
      On Tuesday, December 11, 2012 6:55:30 PM UTC-6, JohnBeckett wrote:
      > Ben Fritz wrote:
      >
      > > ...
      >
      > > call setline(".",[line,repl1,repl2,repl3])
      >
      >
      >
      > There is a problem with that because four lines will be inserted
      >
      > into the buffer, and those lines will OVERWRITE existing lines.
      >
      > That's why my script used 'setline()' to replace the first line,
      >
      > and 'put' to insert the extra lines.
      >

      Oops, I guess I wanted append(). I thought I used setline() in TOhtml like this, but I only do it this way when the new buffer is empty. For adding text TOhtml uses append().

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 7 messages in this topic