vi question

William Bulley web at umich.edu
Fri Feb 19 23:13:59 UTC 2010


According to gahn <ipfreak at yahoo.com> on Fri, 02/19/10 at 16:11:
> 
> How could I use vi to repeat a word, say, 100 times in the same
> line, of course with a space in between?

Edit your file: (vi xyz)

On an empty line, enter: i<space>word<space>(esc)

Back up (left arrow) to the front of this line (column zero)

Enter this sequence: 2dw   (the line will disappear)

Enter this sequence: 100P   (voila!)

Regards,

web...

--
William Bulley                     Email: web at umich.edu

72 characters width template ----------------------------------------->|


More information about the freebsd-questions mailing list