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

Re: move/copy and overlay

Expand Messages
  • Klaus Bosau
    ... Use this instead com -range -nargs=1 Pl : , call Paste_line( ) and call Pl this way 3,5 Pl 1 for instance to change lines 3 to 5 in a
    Message 1 of 15 , Feb 26, 2003
      On Wed, 26 Feb 2003, Vlad Ghitulescu wrote:

      > > [...]
      > >
      > > ----+----1----+----2----+----3----+----4----+----5----+----6
      > > 1| move to
      > > 2|
      > > 3| value1
      > > 4| value2
      > > 5| value3
      > > 6| variable1
      > > 7| variable2
      > > 8| variable3
      > > 9|
      > > ----+----1----+----2----+----3----+----4----+----5----+----6
      > >
      > > [...]
      > >
      > > com -nargs=1 Pl :call Paste_line(<f-args>)
      > >
      > > The Command-line mode variant then becomes
      > >
      > > :Pl 3
      > > :Pl 6
      >
      > It works very well with both, thanks! The dizadvantage in regard to
      > the CTRL-V (or CTRL-Q) version is that I should made this for every
      > line I want to complete.

      Use this instead

      com -range -nargs=1 Pl :<line1>,<line2> call Paste_line(<f-args>)

      and call "Pl" this way

      3,5 Pl 1

      for instance to change lines 3 to 5 in a single blow. This should return

      > > 3| move value1 to
      > > 4| move value2 to
      > > 5| move value3 to

      > (Well ... actually I should searched a little in faq and help to
      > understand how your function works ... it takes some time ... :-)

      A few topics related to this: *com*, *'virtualedit'*, *r*, *map*...
      (type ":h com", ":h 'virtualedit'" etc.)

      Good luck! :-)

      Klaus
    Your message has been successfully submitted and would be delivered to recipients shortly.