[CLUE-Tech] another vi question

Jed S. Baer thag at frii.com
Fri Apr 23 21:53:07 MDT 2004


On Sat, 24 Apr 2004 08:48:37 +0800
thadphole <thadphole at softhome.net> wrote:

> suppose i need to copy some characters or words from a line, not the
> entire line, how will i do that, e.g.
> i want to copy the first 5 charcters of this sample to next line: 
> 
> vbvb(llll)
> ^^^^^

One way would by to "mark and yank". Position the cursor at the beginning
of your range of text, and enter :m[a-zA-Z] (The letter is just a "label"
for the mark. Then move the cursor to the end of the range, and enter
:y`[a-zA-Z] (using the same letter as before). Then use [Pp] to paste
wherever.

jed
-- 
http://s88369986.onlinehome.us/freedomsight/

... it is poor civic hygiene to install technologies that could someday
facilitate a police state. -- Bruce Schneier



More information about the clue-tech mailing list