From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: Repeat count for yanking Date: Tue, 05 Jul 2011 14:44:43 +0200 Message-ID: <87y60c99s4.fsf@gmail.com> References: <128vsdeyqg.fsf@news.eternal-september.org> <0A0F98DA-B6DA-4C1B-B3E2-D5F76299AD75@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309870042 17839 80.91.229.12 (5 Jul 2011 12:47:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2011 12:47:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 05 14:47:12 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qe520-0008Ms-IY for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Jul 2011 14:47:12 +0200 Original-Received: from localhost ([::1]:45951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe51z-0000I3-8y for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Jul 2011 08:47:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe4zr-0000GE-Vj for help-gnu-emacs@gnu.org; Tue, 05 Jul 2011 08:45:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qe4zq-0007DJ-6T for help-gnu-emacs@gnu.org; Tue, 05 Jul 2011 08:44:59 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:51239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qe4zp-0007D7-Rg for help-gnu-emacs@gnu.org; Tue, 05 Jul 2011 08:44:58 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qe4zo-0007Th-7t for help-gnu-emacs@gnu.org; Tue, 05 Jul 2011 14:44:56 +0200 Original-Received: from 43.77.197.77.rev.sfr.net ([77.197.77.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jul 2011 14:44:56 +0200 Original-Received: from thierry.volpiatto by 43.77.197.77.rev.sfr.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 05 Jul 2011 14:44:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 43.77.197.77.rev.sfr.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:gMprvL1NcEXbrtrUgQso8TkVW+k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81497 Archived-At: Perry Smith writes: > On Jul 5, 2011, at 6:46 AM, Richard Riley wrote: > >> C K Kashyap writes: >> >>> Hi, >>> How can I provide a repeat count to yank - >>> >>> I'd like to kill a line and then paste it 100 times - how can I >>> achieve this? >>> >>> Regards, >>> Kashyap >>> >>> >> >> I was looking at this recently. >> >> http://stackoverflow.com/questions/71985/emacs-equivalent-of-vims-yy10p > > If it is a one time thing, I usually do it in powers of two. e.g. yank it maybe 4 times, then kill that and yank 4 times. Now you have 16 lines. ... > > Remember that M-< sets the mark. So if you narrow the region you can paste a lot of lines rather quickly. > > If I was going to do this moderately frequently, I would toy around and learn how to do it via M-; (eval). Seems like one line of lisp could do this. > > M-: (loop repeat 5 do (progn (yank) (insert "\n"))) -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997