[implementations-list] partially function application and prefix keys for Vi commands that take movement commands as arguments

Bayle Shanks bshanks.list at gmail.com
Tue Oct 13 10:15:03 CEST 2009


I saw that in July, people were talking about alternative ways to
program commands like "d" that take other commands (like "w") as
arguments. Here's another proposal; make "d" a prefix key, and bind
"d"->"w" to a partially applied "delete-cmd" function, with its first
argument fixed to 'viper-forward-word. Use Elisp functions to create
these bindings en masse, to remove the tedium of explicitly writing
out bindings for each pair of movement command and
movement-argument-taking command.

Attached is elisp code that demonstrates this.

The advantage is that you work within emacs's keymap system rather
than replacing it. Apologies if this has already been discussed.


More information about the implementations-list mailing list