Skip to content

different key binding presets #57

Closed
@extrawurst

Description

@extrawurst

based off of #43 there is still the open issue of how to support different key bindings like vim,emacs and nano. I need input on those, cause I don't use them at all.

The most flexible solution would be having gitui dump the default bindings into a config file (on first run) and load it on startup so people can alter it.

My plan is to do it in 2 bigger changes:

1. make key bindings dynamic

  • refactor the key constants into a type KeyBindings
  • change all the pattern matching on CT constants for the bindings currently to be done using runtime variables from the KeyBindings
  • refactor commands::CommandText to be dynamic since they reference the keys

2. allow changing the bindings

  • enable serde feature in crossterm to be able to serialise them
  • use ron to load/save KeyBindings

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions