Hacker News new | comments | show | ask | jobs | submit login

This would be a good time to point out that OSX supports Emacs bindings in all Cocoa text fields.

For example, you can press ctrl+a to go to the beginning of the line and ctrl+e to go to the end of the line. The "Meta" modifier can be accessed via alt+ctrl, so you can alt+ctrl+f to go forward a word, or alt+ctrl+b to go back a word. Any motion can be combined with shift to select the text.

These are especially useful with the laptop keyboards. Bonus points if you convert your caps lock key into an additional ctrl key: http://mkaz.com/archives/86/disable-caps-lock-on-mac-os-x/




Jacob Rus has an excellent and thorough write up of the Cocoa Text system: http://www.hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System....

He provides a custom DefaultKeyBinding.dict which adds more emacs keybindings to Cocoa text controls. I've been using it for years: http://www.hcs.harvard.edu/~jrus/Site/KeyBindings/Emacs%20Es...


alternatively, for Terminal, set -o vi

I also bind H to ^ and L to $ with

bind -m vi 'H: vi-first-print'

bind -m vi 'L: end-of-line'

(not OS X specific, but related)


Unfortunately it's missing the most crucial Emacs bindings: C-s and C-r.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: