if you are using vim then you can make use of the middle button to paste highlighted text into vi.

now if you want to do it the old-fashioned way (pure keyboard) then here are some tips...

- vi makes use of buffers (specifically the unnamed-buffer) to store deleted and copied text. think of it as the clipboard.
- everytime you delete an entry using x, d, or dd, the entry in the unnamed-buffer is overwritten.
- to copy text the command is y (short for yank). like any ordinary vi command, you can precede it with a marker or a number to amplify its effect (10y to yank 10 characters, 10wy to yank 10 words). to copy whole lines, use the yy command. precede it with a number to denote the number of lines to be yanked (the direction  is usually downwards but my memory is rusty and i cant remeber how to yank lines of text upward. ;-)

- to paste the contents of the unnamed-buffer, press p to paste it after the cursor (or line? i cant remember correctly as i am in windows right now) and P to paste it before.

- delete/yank is more powerful when used with markers. that is another topic and  i still have work to do. ;-)

    NOTE:  it is understood that before executing the command shortcuts that you are out of the editing-mode. press the escape key twice to make sure. ;-)
 

ciao!

SKLIM wrote:

 Hi! I need help to know the key how to copy and paste in vi command ? Can someone help me on this issue   


--

"Programming, an artform that fights back."

=============================
Anuerin G. Diaz
Design Engineer
Millennium Software, Incorporated
2305 B West Tower, Philippines Stocks Exchange Center,
Exchange Road, Ortigas Center, Pasig City

Tel# 638-3070 loc. 72
Fax# 638-3079
=============================
 

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com


Reply via email to