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

vim like keybindings not working on mac #1491

Closed
scubacabra opened this issue Jan 2, 2023 · 6 comments
Closed

vim like keybindings not working on mac #1491

scubacabra opened this issue Jan 2, 2023 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@scubacabra
Copy link

following https://github.com/extrawurst/gitui/blob/master/KEY_CONFIG.md

i would expect hjkl keys to work. Instead 'h' always brings up help menu and no motion with the other keys.

running with '-l' flag and i don't see a log about reading the key config file. makes sense as I threw in an

edit_file: Some(( code: Char('I'), modifiers: ( bits: 1,),)),

and 'e' is what triggers the edit action, not (shift i) 'I'.

these are the files in the config dir

/Users/jacobono/.config/gitui

  • key_bindings.ron
  • key_config.ron
  • theme.ron

am i doing something silly (?) bc the instructions are fairly straightforward and i've double checked a couple of times.

mac: 12.6 monterrey
alacritty 0.10.1 (2844606)
gitui 0.22.1

@scubacabra scubacabra added the bug Something isn't working label Jan 2, 2023
@extrawurst
Copy link
Owner

are you sure you rebound the help key away from h? see https://github.com/extrawurst/gitui/blob/master/vim_style_key_config.ron#L21

@scubacabra
Copy link
Author

ahhh yes so i misunderstood the

'// every key not overwritten via the config file will use the default specified there'

i read that as key like key stroke, not key in the struct. thank you, now it works!

when the motion didn't work i realized that i syntax error for comment. then it loaded, but no way to tell that there was an error parsing the .ron file when logging.

is that something you might want as a PR?

@extrawurst
Copy link
Owner

hm yeah some error in the log would make sense indeed

@scubacabra
Copy link
Author

ok, ill look at making a PR. i was thinking something like

log

  • reading config file at path
    if found, log read config file successfully
    if not found log no config file, using defaults (maybe logging defaults?)
    if error in config, spit out error, log defaults. looking at KeyListFile::read_file.

cool?

@extrawurst
Copy link
Owner

lets have a PR to start talking about 👍

@extrawurst extrawurst added this to the v0.23 milestone Jan 29, 2023
@extrawurst
Copy link
Owner

closed via 32f6134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants