Any way to fix Control-O?

As a long-time emacs user, I love that OS X supports many basic emacs commands including Control-O (open-line). In almost all apps it works the same as emacs - inserting a newline at the cursor position and not moving the cursor. In XCode, Control-O is handled strangely - it behaves like the return key, then inserts a space after the cursor, which is inconsistent and not useful to me at least. There are several "Insert Newline..." choices in Key Bindings, but none of them perform the same operation as Control-O does in other Apple apps - Insert Newline without moving the cursor.


Is there any way to get Control-O to behave the same in XCode as it does in every other app?


Thanks,

Dean

Accepted Answer

I expect the only way to get this to work as you want is by turning off auto indentation. And that might just make your life even more difficult. Please file a bug report at <http://bugreport.apple.com> to request this.

Thanks! I've filed a bug report.


You're right that it's auto-indentation that's messing things up - I hadn't noticed that. If the following line doesn't require indentation, Control-O behaves exactly the same as in emacs.


In pseudo-code Control-O was probably implemented something like: newline(); moveCursorBackOneCharacter();

That worked as expected until code was added to newline() to auto-indent.

Any way to fix Control-O?
 
 
Q