* simgle repeat?
@ 2005-04-11 23:32 Rui Tiago Matos
2005-04-12 10:58 ` Peter Dyballa
0 siblings, 1 reply; 9+ messages in thread
From: Rui Tiago Matos @ 2005-04-11 23:32 UTC (permalink / raw)
One vim feature which is really handy (and my vim user house mate is
always teasing me about :-) is the single repeat command aka "dot" or
"."[1]
So is there anyway to have anything like it in emacs?
Thanks,
Rui
[1] http://vimdoc.sourceforge.net/htmldoc/repeat.html#.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: simgle repeat?
2005-04-11 23:32 simgle repeat? Rui Tiago Matos
@ 2005-04-12 10:58 ` Peter Dyballa
0 siblings, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2005-04-12 10:58 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 12.04.2005 um 01:32 schrieb Rui Tiago Matos:
> So is there anyway to have anything like it in emacs?
>
Bind some key to 'repeat-complex-command' -- the Sun-4 keyboard was
great in providing so useful extra keys!!! Maybe to Alt-.?
--
Greetings
Pete
In a world without walls and fences, who needs gates and windows?
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>]
* Re: simgle repeat?
[not found] <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>
@ 2005-04-12 0:16 ` Sébastien Kirche
2005-04-12 0:31 ` Rui Tiago Matos
2005-04-12 1:01 ` Barry Margolin
2005-04-12 18:28 ` kgold
2 siblings, 1 reply; 9+ messages in thread
From: Sébastien Kirche @ 2005-04-12 0:16 UTC (permalink / raw)
Le 12 avr 2005, Rui Tiago Matos vraute :
> One vim feature which is really handy (and my vim user house mate is
> always teasing me about :-) is the single repeat command aka "dot" or
> "."[1]
>
> So is there anyway to have anything like it in emacs?
You can prefix a command, or a single key press with the universal argument
C-u :
,----[ C-h k C-u ]
| C-u runs the command universal-argument
| which is an interactive compiled Lisp function in `simple'.
| It is bound to C-u.
| (universal-argument)
|
| Begin a numeric argument for the following command.
| Digits or minus sign following C-u make up the numeric argument.
| C-u following the digits or minus sign ends the argument.
| C-u without digits or minus sign provides 4 as argument.
| Repeating C-u without digits or minus sign
| multiplies the argument by 4 each time.
| For some commands, just C-u by itself serves as a flag
| which is different in effect from any particular numeric argument.
| These commands include C-@ and M-x start-kbd-macro.
|
| [back]
`----
For example : C-u 25 . gives 25 dots : .........................
HTH.
--
Sébastien Kirche
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: simgle repeat?
[not found] <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>
2005-04-12 0:16 ` Sébastien Kirche
@ 2005-04-12 1:01 ` Barry Margolin
2005-04-12 2:07 ` Angelina Carlton
[not found] ` <mailman.1129.1113271432.2895.help-gnu-emacs@gnu.org>
2005-04-12 18:28 ` kgold
2 siblings, 2 replies; 9+ messages in thread
From: Barry Margolin @ 2005-04-12 1:01 UTC (permalink / raw)
In article <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>,
Rui Tiago Matos <tiagomatos@gmail.com> wrote:
> One vim feature which is really handy (and my vim user house mate is
> always teasing me about :-) is the single repeat command aka "dot" or
> "."[1]
>
> So is there anyway to have anything like it in emacs?
The repeat command, on C-x z.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: simgle repeat?
2005-04-12 1:01 ` Barry Margolin
@ 2005-04-12 2:07 ` Angelina Carlton
[not found] ` <mailman.1129.1113271432.2895.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Angelina Carlton @ 2005-04-12 2:07 UTC (permalink / raw)
On Mon, Apr 11, 2005 at 09:01:51PM -0400, Barry Margolin wrote:
>
> The repeat command, on C-x z.
>
Rui, note also the C-x z isnt the same as vim's repeat. It repeats
even the last cursor movement. Vim will repeat the last text
insertion/delete etc.
For example, if you wanted to place the character K at specific points
in a file, in vim, move to point, press . But with emacs the C-x z
will repeat the cursor movement after you placed the first K.
Something else....this works only in the gui version for me. But I always use emacs -nw
C-x z suspends my terminal. From what I can tell in the gui version
C-x z runs the command "repeat"
If I try M-x repeat from emacs -nw I get:
Wrong type argument: number-or-marker-p, nil
--
Angelina Carlton
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.1129.1113271432.2895.help-gnu-emacs@gnu.org>]
* Re: simgle repeat?
[not found] ` <mailman.1129.1113271432.2895.help-gnu-emacs@gnu.org>
@ 2005-04-12 11:52 ` Pascal Bourguignon
0 siblings, 0 replies; 9+ messages in thread
From: Pascal Bourguignon @ 2005-04-12 11:52 UTC (permalink / raw)
Angelina Carlton <brat@magma.ca> writes:
> On Mon, Apr 11, 2005 at 09:01:51PM -0400, Barry Margolin wrote:
> >
> > The repeat command, on C-x z.
> >
>
> Rui, note also the C-x z isnt the same as vim's repeat. It repeats
> even the last cursor movement. Vim will repeat the last text
> insertion/delete etc.
>
> For example, if you wanted to place the character K at specific points
> in a file, in vim, move to point, press . But with emacs the C-x z
> will repeat the cursor movement after you placed the first K.
You have the source...
> Something else....this works only in the gui version for me. But I always use emacs -nw
> C-x z suspends my terminal. From what I can tell in the gui version
> C-x z runs the command "repeat"
>
> If I try M-x repeat from emacs -nw I get:
> Wrong type argument: number-or-marker-p, nil
Use:
(global-set-key ?. 'repeat)
--
__Pascal Bourguignon__ http://www.informatimago.com/
Nobody can fix the economy. Nobody can be trusted with their finger
on the button. Nobody's perfect. VOTE FOR NOBODY.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: simgle repeat?
[not found] <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>
2005-04-12 0:16 ` Sébastien Kirche
2005-04-12 1:01 ` Barry Margolin
@ 2005-04-12 18:28 ` kgold
2005-04-12 18:25 ` Rui Tiago Matos
2 siblings, 1 reply; 9+ messages in thread
From: kgold @ 2005-04-12 18:28 UTC (permalink / raw)
Rui Tiago Matos <tiagomatos@gmail.com> writes:
> One vim feature which is really handy (and my vim user house mate is
> always teasing me about :-) is the single repeat command aka "dot" or
> "."[1]
>
> So is there anyway to have anything like it in emacs?
keyboard macros are a more powerful version of the dot command.
Start recording, do anything you want, and stop recording. When you
play back the macro, it reruns the keystrokes,
They can of course include insert and delete and cursor movement, but
also cut and paste, transpose, case changes, searching, saving a file,
editing a file, go to next instance of a grep list, etc.
For me, keyboard macros are what makes emacs #1.
--
Ken Goldman kgold@watson.ibm.com 914-784-7646
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: simgle repeat?
2005-04-12 18:28 ` kgold
@ 2005-04-12 18:25 ` Rui Tiago Matos
0 siblings, 0 replies; 9+ messages in thread
From: Rui Tiago Matos @ 2005-04-12 18:25 UTC (permalink / raw)
On 12 Apr 2005 18:28:45 GMT, kgold <kgold@watson.ibm.com> wrote:
> For me, keyboard macros are what makes emacs #1.
Yep, I use them too :-) I just wanted to know if there was something
more like the "dot" (i.e. not having to explicitly start and terminate
a kbd macro) and apparently C-x z comes somewhat close. Thanks to all
who answered!
Rui
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-04-12 18:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-11 23:32 simgle repeat? Rui Tiago Matos
2005-04-12 10:58 ` Peter Dyballa
[not found] <mailman.1120.1113260612.2895.help-gnu-emacs@gnu.org>
2005-04-12 0:16 ` Sébastien Kirche
2005-04-12 0:31 ` Rui Tiago Matos
2005-04-12 1:01 ` Barry Margolin
2005-04-12 2:07 ` Angelina Carlton
[not found] ` <mailman.1129.1113271432.2895.help-gnu-emacs@gnu.org>
2005-04-12 11:52 ` Pascal Bourguignon
2005-04-12 18:28 ` kgold
2005-04-12 18:25 ` Rui Tiago Matos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).