martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.2k stars 258 forks source link

Action pseudo-keys don't work #998

Open adigitoleo opened 2 years ago

adigitoleo commented 2 years ago

After registering an action with action_register, the action can be used only by passing an explicit reference to map.

In the API docs there's this line:

name string the name of the action, can be referred to in key bindings as `` pseudo key

where I guess the missing part was supposed to say that we should be able to use a string like <action-name> in the map call as well. This is already possible for built-in actions, e.g. vis:map(vis.modes.NORMAL, 'gh', '<vis-window-next>').

It seems like the action names are tracked, since they show up in :help. Could they be used for resolving actions in the same way?