-
-
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
The up and down key behavior is overwritten, even though it has been overridden in the .zshrc
file.
#299
Comments
@jeffreytse I have run into the same problem, and it is driving me quite insane. 😉 Using ZVM as an Oh My Zsh plugin, my ~/.zshrc contains this:
Activating zsh-vi-mode like shown above breaks the key bindings used for zsh-history-substring-search. As soon as I disable ZVM, things are working again. This bug affects me badly, because using the up-arrow to search Zsh history is deeply embedded in my muscle memory. |
you can give a try to
|
@kaushiksahu18 wrote
I'm sorry, but I don't understand your comment. What do you mean? |
@rseichter they are saying you can use the program Atuin to manage your zsh history. Which... Ya I mean that's a workaround, but it would be better if we had a way to tell the plugin "Hey don't overwrite these things". Alternatively I wonder if we were to have vi-mode be the first plugin loaded, would that help? Basically, let vi-mode be loaded, then all other plugins or settings override what they need to do. Its not ideal but it might work? |
@miversen33 Thank you for clarifying, Atuin was a complete unknown to me. At first glance, it seems to be a bit of an overkill for my needs, but looking into Atuin in more detail won't hurt. As for your idea of using plugin load order to our advantage: Does OMZ even have a notion of order/priority when it comes to plugins? I don't recall seeing this mentioned in Oh-My-Zsh documentation yet. Lastly, while I would not say no to a workaround, the problem is apparently caused by ZVM and should be addressed there. If you look at my .zshrc excerpt above, you see that I set my key bindings as the last step. ZVM somehow interferes with this core Zsh functionality. |
I don't use oh-my-zsh anymore but I was able to verify that loading zsh-vi-mode before any other plugins does work as expected. To your question, |
@miversen33 You were? I tried it myself, and found that placing ZVM in different places in the OMZ |
Ahh I should have been more clear. I was able to verify that loading it first works when not using OMZ. IE manually loading plugins. As I stated, I'm not using it anymore, but it's interesting that simply adding the plugin "first" in the plugin array doesn't work. |
@miversen33 I tried manual plugin loading, and even without using OMZ anymore I still can't get backwards history search to work. Would you perhaps be willing to share your |
@rseichter They likely won't be terribly usable but here is a point in time on my dots that had vi-mode being loaded and then I made changes to the bindkeys after. The changes I made were to the That said, I have since removed Since you are using OMZ, are you aware that OMZ includes its own vi-mode you can use? |
@miversen33 Thanks, your .zshrc looks similar enough to mine that I don't feel like I am making some fundamental mistakes. I am still experimenting. Using OMZ, not using it, loading plugins manually or not, even trying Atuin as @kaushiksahu18 suggested (it is quite a fancy approach, I have to admit). I am uncertain about the best way forward. |
General information
Basic examination
Problem description
I would like to utilize the up and down arrow keys for the key bindings listed below, but the current plugin is preventing me from doing so. I am able to access my desired key bindings if I execute the
source .zshrc
command, however, this action must be performed each time. Alternatively, when I commented out the plugin, the functionality operated as expected. I would appreciate your assistance in resolving this issue.Reproduction steps
Expected behavior
...
The text was updated successfully, but these errors were encountered: