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

Feature request: Custom keybindings #153

Closed
Alex23rodriguez opened this issue Dec 24, 2022 · 3 comments
Closed

Feature request: Custom keybindings #153

Alex23rodriguez opened this issue Dec 24, 2022 · 3 comments

Comments

@Alex23rodriguez
Copy link

Maybe I'm missing something but I didn't see a way to edit the default keybindings. I use a different keyboard layout so it's always the first thing I do when using vim, because the default keys (specially hjkl) can be hard to reach.

Any way this could be added? Thanks!

@godbout
Copy link
Owner

godbout commented Dec 24, 2022

there's been many approaches thought. it's huge work to handle the custom bindings in kV itself. it's a huge work also to read a .vimrc. so the current best solution is using Karabiner-Elements with the kV's Distributed Notifications. with that combination you can remap keys on a Mode basis. like you could have keys acting in one way when you're in Normal Mode and in another way when you're in Visual Mode.

have a look at the discussion about this: #117

i think this is what you're looking for. lemme know in any case what you think and if it does help.

@Alex23rodriguez
Copy link
Author

I see... I already have Karabiner-Elements, but not Hammerspoon as the post also suggests... I understand that the effort to implement keybindings directly on the app preferences might not be worth it, so i'll have to check if the same applies to me implementing this workaround xD
That being said, thanks for pointing me to a possible solution. I'll go ahead and close the issue

@godbout
Copy link
Owner

godbout commented Jan 10, 2023

@Alex23rodriguez yeah, Hammerspoon is gonna be useful to catch the Distributed Notifications sent by kV to macOS. once you catch them, you will be able to call Karabiner-Elements and do basically whatever you want. this is way more flexible than having an inner custom keybindings, as you can even bind different mappings according to different apps! give it a try, i think you'll not be disappointed. feel free to ping me again if you need help.

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

2 participants