Summary: add link to ergoemacs
> * ErgoEmacs
> * [[esdf-mode]]
Ergo Movement mode is a global minor mode which defines ergonomic and easy cursor movement keys. The movement keys are:
i C-p M- j k l = C-b C-n C-f C-M- j l = M-b M-f
This mode does not hard-code above keys to any commands. Instead it calls the commands which have been defined to their default counterparts. That is,
M-l executes the command which is bound to
C-f in the current keymap (usually
M-k executes the command which is bound to
C-n in the current keymap (usually
next-line) etc. This kind of relative binding is useful because major modes sometimes rebind the default movement keys to something other than
next-line etc. With Ergo Movement mode you always get the same commands with Ergo bindings as with the default cursor movement bindings.
Ergo Movement mode overrides certain default keybindings (
C-M-jl). The overridden keys are resurrected as Shifted versions. That is, just add Shift key to the original keybinding the get the original command. For example,
Meta + l) executes normally command
downcase-word. With Ergo Movement mode it’s bound to
Meta + Shift + l).
Wouldnt it be best to switch these bindings to the correspondents that they are mirroring instead of Shift key to get original? eg, C-f to M-l and the reverse is also true M-l to C-f. (feel free to put this dialog down there, i added it here cause i thought was the right place)
Circular relative bindings are not possible. In Ergo Movement mode
M-l executes whatever command is bound to
C-f. Technically speaking
M-l is bound to
(lambda () (interactive) (call-interactively (key-binding "\C-f")))
If you rebind
C-f to some new command then Ergo mode’s
M-l will execute that new command too.
You might try something like
(let ((ergo-mode nil)) (call-interactively (key-binding "\M-f")))
to get to the original key binding.
It might be a good idea long termwise to use something reminding of the corresponding bindings in viper/vi instead of the above bindings.