"Trans" <transfire / gmail.com> writes:

> Thomas Kirchner wrote:
>> It has to be said.  Gvim :)  If you already know vi, it's the
>> only way to fly.
>
> I use vi/vim for quick/light editing. But I don't understand how others
> use it as their main editor. And I don't say this lightly: I even
> bought a book on using vi/vim. Yet I still often hear how "wonderous"
> it is if one does.
>
> So tell me this, how does one copy and paste without counting lines?
> Using n+yy & p (where n is some number) for a few lines is okay, but
> beyond that...

ma [mark the top (or bottom) position of the text that you want
    to copy or cut, and call this mark 'a']
[now, position to the bottom (top) of the text to mark]
y'a [copy ("yank") the text from the 'a' mark to the line where
     the cursor is currently positioned]
[if you want to cut the text, do this, instead:  d'a ]
[now, position to where you want the text to go]
p [to paste the text after the cursor or ... ]
P [to paste the text before the cursor]

Not that I'm advocating vi/vim, as I'm an emacs person, myself.  But I
just want to show that it's possible to copy/cut/paste/etc. without
counting lines.


-- 
 Lloyd Zusman
 ljz / asfast.com
 God bless you.