News for hackers. Stuff that matters.
Re:Quick tip for developers who use OS X by koenigdavidmj on Monday January 13, 2014 @10:53AM (#7051238)
A lot of the Emacs shortcuts work in OS X (most of the system) as well as on Linux (bash and other users of readline).
Re:Quick tip for developers who use OS X by lr on Monday January 13, 2014 @11:08AM (#7051333)
The basic Emacs key-bindings should work in all Cocoa apps. For instance, the URL bar of your web browser, while text editing in just about any editor (maybe even in Office, but I have not tired in a while), etc. Basically, anywhere you have a cursor, the basic line-editing key bindings should work.

So, in practical terms, this means you have 1 + n clipboards[1]. The main global GUI clipboard (using the command key), and then an app-specific clipboard (using the control key with Emacs bindings). As a developer, it is extremely helpful to have two clipboards in TextMate, for instance.

[1] Technically, the clipboard in OS X maintains a history (not sure what the limit is), but the OS X GUI only exposes the last cut/copied item.

Re:Quick tip for developers who use OS X by eddieh on Monday January 13, 2014 @11:55AM (#7051722)
defaults write -g NSTextKillRingSize -string 4
Re:Quick tip for developers who use OS X by lr on Monday January 13, 2014 @02:11PM (#7052632)
Can you shed some light on how to access those other three from the GUI (whether using the command key or some other means)?
Re:Quick tip for developers who use OS X by eddieh on Monday January 13, 2014 @10:31PM (#7055200)
Sorry forgot some steps...You also have to rebind C-y to 'yankAndSelect:' (https://developer.apple.com/library/mac/documentation/Cocoa/...)

For the most in depth info on the Cocoa Text System: http://www.hcs.harvard.edu/~jrus/site/cocoa-text.html

Re:Quick tip for developers who use OS X by mikeroher on Monday January 13, 2014 @10:56AM (#7051255)
I use Vim and was unaware that this shortcut existed. Are there any other Emacs shortcuts which are useful in OSX?
Re:Quick tip for developers who use OS X by coliveira on Monday January 13, 2014 @11:02AM (#7051290)
If you do "set -o vi" you can also use vi shortcuts, such as ESC-j,k to go up/down the history, 0 to go to the beginning of the line, etc.
Re:Quick tip for developers who use OS X by pyre on Monday January 13, 2014 @11:14AM (#7051377)
You cannot use 'set -o vi' to turn Cocoa text fields into vi-mode.
Re:Quick tip for developers who use OS X by 65a on Monday January 13, 2014 @11:00AM (#7051283)
Ctrl-K kill to end of line,

so Ctrl-A Ctrl-K will clear a given field

Re:Quick tip for developers who use OS X by Fishkins on Monday January 13, 2014 @11:38AM (#7051595)
And you can Ctrl-Y to paste the line you killed. This is a separate copy/paste buffer from the normal Cmd-C one, which can be nice.