From owner-freebsd-questions@FreeBSD.ORG Fri Feb 19 23:13:59 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C38721065679 for ; Fri, 19 Feb 2010 23:13:59 +0000 (UTC) (envelope-from web@umich.edu) Received: from hackers.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.81]) by mx1.freebsd.org (Postfix) with ESMTP id 583418FC1C for ; Fri, 19 Feb 2010 23:13:58 +0000 (UTC) Received: FROM itcom245.staff.itd.umich.edu (itcom245.staff.itd.umich.edu [141.213.135.249]) By hackers.mr.itd.umich.edu ID 4B7F1B35.ACC65.3530 ; Authuser web; 19 Feb 2010 18:13:57 EST Date: Fri, 19 Feb 2010 18:13:29 -0500 From: William Bulley To: gahn Message-ID: <20100219231329.GB91701@itcom245.staff.itd.umich.edu> Mail-Followup-To: gahn , freebsd general questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: freebsd general questions Subject: Re: vi question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2010 23:13:59 -0000 According to gahn 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: iword(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@umich.edu 72 characters width template ----------------------------------------->|