-
Notifications
You must be signed in to change notification settings - Fork 26
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
[NEW FEATURE] Custom keybindings #47
Comments
Yeah that sounds useful, I think the format of the config file could be a sticking point. I'd always edge towards |
JSON isn't too terrible, especially if you support JSONC, namely being able to comment lines out with the "//" prefix and allowing unnecessary trailing commas that would normally cause JSON parsers to choke. YAML is also easy and can be a little less verbose than JSON, but some of the nomenclature can be tricky. My personal vote would be for JSON/JSONC. |
As primarily a docker user, YAML or JSON are preferred for me! |
Enable use of a config file, with custom keymap and custom colours
Enable use of a config file, with custom keymap and custom colours
First of all: Hi, great work on this tool! I'd like to start using it by integrating it into my neovim config. This is an awesome effort, thanks for the hard work.
Is your feature request related to a problem? Please describe.
I'm a bit frustrated by the lack of configuration for keybindings. Namely :
tab
to swap between panels isn't really part of my workflow. I'd prefer vim-style bindings such as using H and L to swap between panels for example.q
to quit the app fits my workflow, but I got frustrated when I saw the help panel and I tried to discard it with q, which .. quit the app. Wish I could change that myself.This is just me though, and I'm sure other people would love to customize the tool how they see fit. A follow-up to this issue is probably the ability to customize the colors of the app (the white text on pink background on the help panel in my terminal is .. very hard to read)
Describe the solution you'd like
Ideally the user would be able to have a
keybindings
file stored wherever deemed relevant (e.g.$HOME/.config/oxker/keybindings.ron
).Implementation-wise :
Config
struct, that would contain a fieldkeybindings: KeybindingsConfig
should be constructedInputHandler
Regarding the format of the config file, there's a metric ton of alternatives, including :
I really like
gitui
's documentation and technical choice (RON), but I fully acknowledge that it might not be the most welcoming choice, especially for non-Rust folks. Nothing more frustrating than learning about a new tool and seeing a config file with an extension that you've never seen before.All in all, I think RON or TOML would be great choices. Let me know what you think.
Describe alternatives you've considered
I described alternatives for config languages above.
For larger customization purposes, programs such as neovim allow the user to customize everything with Lua, but this is because the customization goes waaay beyond the scope of keybindings.
Additional context
Looks like
input_handler/mod.rs
contains the list of hardcoded keybindings.Some functions may need to be renamed, e.g.
s_key
,enter_key
,tab_key
and the likes.The text was updated successfully, but these errors were encountered: