|
From: | Deniz Dogan |
Subject: | Re: Repeat count for yanking |
Date: | Thu, 21 Jul 2011 23:41:28 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
On 2011-07-21 23:39, Steinar Bang wrote:
pmlists@free.fr (Peter Münster):You can put the yank into a keyboard macro and use the prefix argument to call the macro 100 times.That would be `C-x ( C-y C-x )' to define the macro (and as a side effect do a single yank), and then `C-u 99 C-x e' to execute the macro 99 times (to get the remaining 99 yanks). It's less effort than you might think, since creating a keyboard macro for a repetitive task, is something you do frequently once you've discovered it (at least I did).
I advised `yank' so that C-u 100 C-y yanks 100 times instead (which is much more useful in my opinion):
(defadvice yank (around damd-yank first nil activate) "If ARG is neither nil nor \\[universal-argument], yank ARG times. Otherwise, use the original definition of `yank'." (if (or (not arg) (consp arg)) ad-do-it (dotimes (i arg) (yank)))) Deniz
[Prev in Thread] | Current Thread | [Next in Thread] |