You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a vanilla oh-my-zsh installation, pushing left / right arrow move words forward / backward rather than characters. If I switch to vim keybindings using bindkey -v the issue disappears.
I added also bound the up/down keys using
bindkey "^[[A" history-beginning-search-backward # Up
bindkey "^[[B" history-beginning-search-forward # Down
This binding works in emacs mode but not in vim mode.
The text was updated successfully, but these errors were encountered:
To resolve the issue and ensure consistent behavior for keybindings in both modes, you can adjust your Zsh configuration with the following approach:
Keybinding Mode Selection: First, you need to ensure that you're consistently using the same keybinding mode (either emacs or vim) for both arrow keys and other custom keybindings.
Keybinding Customization: Depending on the keybinding mode you prefer (emacs or vim), customize the keybindings as needed.
For example, if you want to use emacs mode:
# Set Zsh to emacs keybinding mode
bindkey -e
# Customize keybindings (example with Up and Down arrow keys)
bindkey "^[[A" history-beginning-search-backward # Up
bindkey "^[[B" history-beginning-search-forward # Down
If you want to use vim mode:
# Set Zsh to vim keybinding mode
bindkey -v
# Customize keybindings (example with Up and Down arrow keys)
bindkey "^[[A" history-beginning-search-backward # Up
bindkey "^[[B" history-beginning-search-forward # Down
Reload Your Shell Configuration: After making changes to your Zsh configuration file (usually ~/.zshrc), don't forget to reload your shell configuration for the changes to take effect:
source~/.zshrc
By using either emacs or vim keybinding modes consistently, you can achieve the behavior you desire for arrow keys and other custom keybindings in your Zsh shell. Just make sure to choose the keybinding mode that suits your preferences.
When using a vanilla oh-my-zsh installation, pushing left / right arrow move words forward / backward rather than characters. If I switch to vim keybindings using
bindkey -v
the issue disappears.I added also bound the up/down keys using
This binding works in emacs mode but not in vim mode.
The text was updated successfully, but these errors were encountered: