help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repeat count for yanking


From: Thierry Volpiatto
Subject: Re: Repeat count for yanking
Date: Tue, 05 Jul 2011 14:44:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Perry Smith <pedzsan@gmail.com> writes:

> On Jul 5, 2011, at 6:46 AM, Richard Riley wrote:
>
>> C K Kashyap <ckkashyap@gmail.com> 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 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]