tags:

views:

753

answers:

6

What are the best and worst emacs key bindings in development software? Ever since I learned it, I find myself trying to use C-p and C-n to move up and down in everything that has a text box on it.

I'm perpetually annoyed by software that has an emacs mode that's pretty obviously either put together by someone who's never used emacs before or it's done in a crappy manner. So let's recognize the winners and losers in this thread.

+2  A: 

The good

  • Um... emacs? Haven't found any software other than emacs that does a decent job of making the environment emacs-like enough.

The bad

  • SQL Developer by Oracle - seriously, does it have to be that difficult to make C-p do something other than print?

Meh

  • Visual Studio - Overall, the emacs mode is passable, but it's pretty obvious in some places that you're using a Microsoft IDE and not good old emacs.
Jason Baker
+7  A: 

A Valiant attempt

Eclipse Emacs bindings are decent when editing. In some dialog boxes, however, they mysteriously break and copy reverts to C-c and paste to C-v. An irritation.

A nice Mac OS Bonus

On Mac OS, all Cocoa applications support basic emacs key bindings. This works out quite well because native Mac apps don't use the control key for anything so there's no chance of conflict. This also means that you can pick up almost any text editor (or word processor) on the Mac and have at least basic Emacs keys.

An unexpected Benefit

This even means that Oxygen (an XML editor using the Swing GUI toolkit) supports Emacs keybindings, but only on the mac. I assume this is the case because Apple is actually using a heavyweight (Cocoa) text widget to implement the Swing text widget in their LAF.

On other platforms, I often use the Eclipse plugin version of Oxygen just to get my keybindings back.

Ugly

G^%$&^% F^%$ StackOverflow for overriding some of the Cocoa Emacs bindings with some Javascript crap on the Mac. Very annoying.

C-k (kill-line)     is bound to (insert-this-crap `print("code sample");`)
C-b (backward-char) is bound to (insert-this-crap **strong text**)
C-e, C-a, C-p, C-f, C-n work as expected.

These SO shortcuts are neither documented, nor do they appear to be customizable. They also aren't particularly useful.

Reported as a bug here: http://stackoverflow.uservoice.com/pages/general/suggestions/72686

bendin
Nice to know about the Cocoa support! +1
jkp
+4  A: 

[This is an example of a bad EMACS binding from an editor that wasn't even trying to be EMACS-like.]

I once found myself moving backwards and forwards between EMACS on Solaris and SOL on PRIMOS.

On Emacs, C-p meant go up one line.

On SOL, C-p was apparently an undocumented command that meant quit the editor without prompting or saving!

I lost a lot of work during that period, let me tell you.

Oddthinking
M-x recover-session
RamyenHead
+2  A: 

Firemacs stops me bringing up the "save page" dialog every time I want to search in Firefox. It's a bit flaky but I find it more accessible than Conkeror, even though it looks like that has much more faithful Emacs bindings.

Along the lines of the OP's comments on "C-p to print", I think I've wanted to save maybe one or two web pages in over a decade, so I'm a bit puzzled why Firefox has it on such a common key combination as C-s.

Matt Curtis
+2  A: 

Bash supports some Emacs keys (C-p, C-n, C-f, C-b, C-Space, C-w, C-y, C-a), but when I use screen I find it rather confusing, that I should enter C-a a C-k to kill the line. So it might be a good idea to change screen prefix key to something else.

Anton Nazarov
+1  A: 

[This is an example of a bad EMACS binding from an editor that wasn't even trying to be EMACS-like.]

I once found myself moving backwards and forwards between EMACS on Solaris and SOL on PRIMOS.

On Emacs, C-p meant go up one line.

On SOL, C-p was apparently an undocumented command that meant quit the editor without prompting or saving!

C-p in PRIMOS meant "break" everywhere (like C-c in Unix). I believe it was there before Emacs was ported to PRIMOS, so it was easier to change one program than umpteen-thousand users and customers. I learned Emacs first on PRIMOS and it took me a couple of years to later feel comfortable with C-p :-).

D-Coder