[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repeat count for yanking
From: |
Richard Riley |
Subject: |
Re: Repeat count for yanking |
Date: |
Tue, 05 Jul 2011 19:09:59 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) |
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> 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")))
Or press C-y a few times ;)