How do I change an oh-my-zsh bindkey that a plug-in set?
1
vote
0
answers
1118
views
You can find most of the context on this github comment . I installed the zsh-autocomplete plugin and it adds a feature I don't want: pressing up fills the page with a menu of previous commands I've run. I like the other features but I want the up button to behave like default bash/zsh/oh-my-zsh, cycling through the history one line at a time.
In that first link you can see how to make this change:
bindkey '\eA' up-line-or-search
. But I don't have enough context to know what to do with that information. I'm not even sure if the answer to my SO question applies to zsh-autocomplete, any plug-in, or zsh/oh-my-zsh as a whole (please let me know in your answer):
Am I supposed to add bindkey '\e[A' up-line-or-search
to my ~/.zshrc
to overwrite the default, am I supposed to modify something in ~/.oh-my-zsh/lib/key-bindings.zsh
, or am I supposed to change something in another place?
---
UPDATE: The github issue linked to [zsh-autocomplete/.zshrc . If I looked around more I would've seen the answer to my question at the top of that file:
# The code below sets all of Autocomplete's settings to their default values. To
# change a setting, copy it into your .zshrc
file and modify it there.
FWIW, you should put this after the file runs source $ZSH/oh-my-zsh.sh
. If you put it before, it has no affect.
This answers my main question, but this minor one remains:
> I'm not even sure if the answer to my SO question applies to zsh-autocomplete specifically, any plug-in, or zsh/oh-my-zsh as a whole (please let me know in your answer)
Asked by Daniel Kaplan
(1070 rep)
Apr 7, 2023, 12:18 AM
Last activity: Apr 12, 2023, 09:03 PM
Last activity: Apr 12, 2023, 09:03 PM