Saturday, May 1, 2010

VIM commands

Hello,

I wont to right some thing about VIM, VI Editor

There are so many editors but vi editor is the most used editor in linux.

Below is the link for all simple copy, paste open kind of commands for vi editors

http://www.tuxfiles.org/linuxhelp/vimcheat.html

That's OK,

But some times question arise,

If I want to copy some line something from one file and paste it into another file then?

Cause if I close one file and open another it will flush the buffer generated for first file.

There is one more command in editor to do this.

:1,50w >> ../../fileName.txt

This will copy lines 1 to 50 from current file and paste it to the file located in given place.

for copying single line and paste (append) it to another file use

:25w >> ../../fileName.txt

No comments: