[Top][All Lists]

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

Re: copy and paste multiple times

From: Philipp Haselwarter
Subject: Re: copy and paste multiple times
Date: Wed, 25 Jan 2012 21:18:02 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux)

On Wed, Jan 25 2012 19:10 (@1327515031), Jambunathan K wrote:

> Rajanikanth Jammalamadaka <> writes:
>> This has been discussed below:
>> emacs-equivalent-of-vims-yy10p 
>> Is there no built-in (short :-)) command in emacs to copy and paste a
>> region multiple times?
> Use registers. Mark the region, store it in register `a' and insert the
> contents of register `a' multiple times.
> Mark region
> C-x r s a
> C-x r i a
> C-x r i a 

Combine it with `repeat':

C-x r s a
C-x r i a
C-x z a z a z a ...

Still, 9 + 2 * n keystrokes

Actually it would be a nice feature to make the behaviour of `repeat'
customizable, so that if `repeat-pass-argument' is t, numeric argument
would be passed to the command, and if nil it would simply repeat the
last command with its previous argument.

Then you could just set the default and create wrappers with let-binds
of `repeat-pass-argument'.

It would simplify the above considerably (and make it more intuitive, in
my opinion):

M-w C-y C-u n C-x z
6 + lg(n) keystrokes…

Any takers?

Philipp Haselwarter

reply via email to

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