gchp / iota

A terminal-based text editor written in Rust
MIT License
1.62k stars 80 forks source link

Add Json support for keybindings, to add own keybindings #146

Closed x7airworker closed 9 months ago

x7airworker commented 6 years ago

I would like to write my own keybindings for iota, for example in Json. Example:

[
  {
    "keys": [
      {
        "mode": "Ctrl",
        "key": "x"
      },
      {
        "mode": "Ctrl",
        "key": "c"
      }
    ],
    "CommandInfo": {
      "command_name": "editor::quit",
      "args": null
    }
  }
]
gchp commented 6 years ago

Sounds great! This is something I've been working towards. I outlined it at a high-level in this commit message: https://github.com/gchp/iota/commit/7cf0e4f8fce02aa11b2157f3aeed3da66476d9bb

Definitely something I'd like to have too.