3 ms·
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 t
by snprbob86 16y ago
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/ http://mkaz.com/archives/86/disable-caps-lock-on-mac-os-x/
- lanstein 16y agoalternatively, 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)
- thought_alarm 16y agoJacob Rus has an excellent and thorough write up of the Cocoa Text system: http://www.hcs.harvard.edu/~jrus/Site/Cocoa%20Text%20System.html 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%20Esc%20Bindings.dict http://www.hcs.harvard.edu/~jrus/Site/KeyBindings/Emacs%20Es...
- kragen 16y agoUnfortunately it's missing the most crucial Emacs bindings: C-s and C-r.