vi question

Bill Campbell freebsd at celestial.com
Fri Feb 19 21:45:49 UTC 2010


On Fri, Feb 19, 2010, gahn wrote:
>Hi, all:
>

>How could I use vi to repeat a word, say, 100 times in the same line, of
>course with a space in between?

Use a repeat count.  The following is generated by this:

20a thisword<ESC>

 thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword thisword

I use this frequently to generate sequences of characters when laying out
forms.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

When we must wait for Washington to tell us when to sow and when to reap,
we shall soon want bread -- Thomas Jefferson


More information about the freebsd-questions mailing list