Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable keybinding #39

Closed
xiaq opened this issue Oct 8, 2014 · 2 comments
Closed

Customizable keybinding #39

xiaq opened this issue Oct 8, 2014 · 2 comments

Comments

@xiaq
Copy link
Member

xiaq commented Oct 8, 2014

The keybinding is now fixed, but should really be customizable. New builtins needs to be introduced to modify the keybinding.

@xiaq
Copy link
Member Author

xiaq commented Feb 26, 2015

An obvious solution:

  • Introduce an edit: namespace.

  • Expose editor builtins as functions in edit:.

  • Make edit.Key a value type and provide a constructor edit:key for it.

  • Introduce a table $edit:binding whose structure maps to current edit.keyBindings. For instance, with the default binding it looks like:

    [&command [&(edit:key i) $edit:fn-start-insert ...]
     &insert [&(edit:key up) $edit:fn-move-dot-up ...]
     ...]
    
  • Maybe introduce a edit:bind function to help manipulate the binding table. Its interface can mimic bind of bash or bindkey of zsh.

We should be able to manipulate tables first (#11).

@xiaq
Copy link
Member Author

xiaq commented Jan 31, 2016

The bind builtin now supports manipulating the keybinding table. However, it is not yet possible to bind keys to shell functions.

@xiaq xiaq closed this as completed in b868442 Feb 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant