-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Use different widgets for 'i' and 'a' #89
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I understand your concern, I will do some revision for better compatibility on this issue.
This feature allows you to bind key to widget with parameters, it gives you a way to bind a custom key to a key depended widget such as `zvm_enter_insert_mode` and so on.
For now, we can settle this issue in below snippet: # The plugin will auto execute this zvm_after_lazy_keybindings function
function zvm_after_init() {
zvm_bindkey vicmd ';' zvm_enter_insert_mode i
zvm_bindkey vicmd ':' zvm_enter_insert_mode a
} And welcome to star this project for further updates in the future. : ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This revision allows users to do some complexed bindings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way of doing it looks good for compatibility! Looks like you missed a few things though, i don't think this will work in the current state (although haven't tested)
Oh, i just saw that you fixed it on the latest commit in master, nevermind! |
The current implementation of
zvm_enter_insert_mode
breaks if you don't use 'i' and 'a' to trigger it (which is a problem for me, as I use a non-standard keyboard). This PR replaceszvm_enter_insert_mode
withzvm_enter_insert_mode_before
andzvm_enter_insert_mode_after
, for 'i' and 'a' respectively.I'm aware that this will break functionality for anyone who has remapped or explicitly mapped
zvm_enter_insert_mode
, if you'd like we can leave the original implementation in, with a warning to change the remaps to the new functions.