Command for copy
could you please tell me what are the commands for copy and paste for a particular word or sentence of a line in vi editing mode of a file for Redhat Enterprise v.4. As well what are the commands for Visual Mode.
.....Thank you ! |
man vimtutor (have fun learning!)
A copy is a 'yank', so: 12yw = yank 12 words A paste is P (but not in insert mode) That's the most basic stuff - play with the tutor to learn more. |
There's plenty of documentation available on how to use VI editor but graphically and on command line. You might want to Google for some links.
A quick one is below: http://www.cs.rit.edu/~cslab/vi.html Hope this would help. + Varun. |
In visual mode:
-highlight the the text, press d tu cut, y to copy -move to target location, press P to paste aftercursor or p to paste before the cursor |
vi command copy by row (not in insert mode)
:set number :a,b y and press p button to paste (before paste u need to point the cursor to the location u want to paste) a = row start copy (put in number) b = row end copy (put in number) y = copy |
All times are GMT -5. The time now is 12:13 PM. |