Hacker News new | ask | show | jobs
by silentbicycle 5599 days ago
In emacs, repeat is C-x z, and then keep pressing z. (C-x zzzzzzzzzzzz...)

While M-f, M-b are e and b, I don't know of an exact equivalent for E and B. But they could very easily be added.

IMHO, basic editing in Emacs has slightly higher constant factors (mostly due to typing the modifier keys), but scales much better as operations become more complex.

1 comments

Cool tip about C-x z, buuut... Playing with it a little bit, it doesn't seem to fit so well with a non-modal editor, because "last command" ends up being more like "last keystroke". E.g., if I write "I like cats" and then hit "C-x z", it enters..."s". Probably a more practical emacs equivalent is to just quickly record and replay a macro.

As for adding equivalents to E and B, sure, but what keys do you bind 'em to? Either unwieldy C-c FOO combinations, or spend the rest of forever playing whack-a-mole with various modes that happen to have already defined the keys you wanted to use. While emacs is infinitely customizable, the baseline editing functionality that everything expects is important -- otherwise you're just fighting against the grain. Though the various vim emulation modes have made a heroic effort...

It would be interesting if something like that vim keystroke competition could be expanded to include emacs as well. >:)

The repeat has different granularity. I prefer Emacs's, but, matter of taste I guess.

"Super"-f/b are free on my keyboard, where "super" is the button with the Windows logo on it. I don't really miss the E/B functionality, though, and I used vim for about five years before I started using Emacs.

Ah, I was wondering how much vim experience you had. Quite a bit! Well, thanks for being an interesting data point. :)

(BTW/FWIW, I'm on mac and keep the option key as command, so no extra key lying around for me to use as super.)

I know this is a late reply, but you're very right about C-x z and vi's . having different groupings. I'm so used to defining keyboard macros for any operation I want to repeat as a whole that it didn't even occur to me.

I'm easily sucked into vi / emacs threads, and I've talked about this at length a few times. I have a bit over five year experience with each, at this point. I prefer vi's general keyboard interface design (edit vs insert mode, etc.), because it gets rid of most of the modal keys that Emacs uses, but strongly prefer Emacs's "continuous environment"/integration and general extensibility. On the balance, I prefer Emacs. (And while there are vi-emulation modes for Emacs, such as viper, few extensions provide vi-like keybindings for them.)