TV Raman recently wrote a nice post about his tips for achieving better typing ergonomics in Emacs. His tips are very good. He utilizes a combination of key remapping software, and changes some Emacs keymaps, while leaving the original key bindings in place.
- I have left-shift and right-shift emit C-s and C-r using XCape.
- I bound C-l to ctl-x-map (still experimental). This remapping fails to take effect in places like Dired and Gnus.
- I additionally bound find-file to C-; o.
- A long time ago, I discovered M-m (back-to-indentation) and I never hit C-a to move to the start of the line.
- When I remap things, I never take away the original Emacs bindings; I only provide alternatives.
- I use C-,, C-., C-;, and C-’ as prefix keys. Downside: these only work under X, but the time where I only ran Emacs in a terminal are long gone.
I basically don’t do any of this, but I think I have a pretty ergonomic setup1, and I don’t go to the same lengths to remap keys.
Here are my tips (some different, some complementary):
- Map Alt to Control. This way, you can press Control with a thumb curl (more comfortable than pinky.)
- Map Capslock to
C-c.2 And place most of your personal keybindings on
C-c <letter>, which follows the recommended convention. So, you can activate some of your common commands with
Capslock <letter>. Since there is no chording, it’s relatively pain-free.
- Make more keymaps as necessary, and place them on function keys. So, as you need more commands, it’s still just two button taps. For example, I place help on symbol on
- With the left-over function keys, bind them to commonly used window configuration commands: next-buffer, delete-other-windows, etc. Here is my function key setup:
;; ESC: leader keymap
;; f1: local leader keymap
;; f2: help leader keymap
;; f7: Go to scratch buffer
;; f8: previous buffer
;; f9: next buffer
;; f10: delete this window
;; f11: delete other windows
;; f12: switch window
I do remove some existing Emacs keymaps, but I only ever used f3/f4, so I’m not losing anything. ymmv.