Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Feb 2010 13:45:46 -0800
From:      Bill Campbell <freebsd@celestial.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: vi question
Message-ID:  <20100219214546.GC29816@ayn.mi.celestial.com>
In-Reply-To: <89925.34821.qm@web52106.mail.re2.yahoo.com>
References:  <89925.34821.qm@web52106.mail.re2.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100219214546.GC29816>