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

Consider setting up some default key bindings #107

Open
lnicola opened this issue Jan 9, 2020 · 2 comments · May be fixed by #123
Open

Consider setting up some default key bindings #107

lnicola opened this issue Jan 9, 2020 · 2 comments · May be fixed by #123

Comments

@lnicola
Copy link

lnicola commented Jan 9, 2020

I've skimmed some of the various issues here and I understand that there's no single way to set the keybindings up, but I think the ones included in the README are fine and shouldn't conflict with anything else.

Can we add this (or something similar) as a default?

bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

# Bind up and down keys
zmodload -F zsh/terminfo +p:terminfo
if [[ -n ${terminfo[kcuu1]} && -n ${terminfo[kcud1]} ]]; then
  bindkey ${terminfo[kcuu1]} history-substring-search-up
  bindkey ${terminfo[kcud1]} history-substring-search-down
fi
  
bindkey '^P' history-substring-search-up
bindkey '^N' history-substring-search-down
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down

See for zimfw/zimfw#364 (comment) for some context, although it's probably not needed.

@sunaku
Copy link
Member

sunaku commented Aug 3, 2021

Okay, please submit a pull request for this. 👍

ericbn added a commit to ericbn/zsh-history-substring-search that referenced this issue Aug 3, 2021
This will save users from some common boilerplate code in their own
.zshrc file.

Fixes zsh-users#107
ericbn added a commit to ericbn/zsh-history-substring-search that referenced this issue Aug 5, 2021
This will save users from some common boilerplate code in their own
.zshrc file.

Fixes zsh-users#107
ericbn added a commit to ericbn/zsh-history-substring-search that referenced this issue Aug 11, 2021
This will save users from some common boilerplate code in their own
.zshrc file.

Fixes zsh-users#107
ericbn added a commit to ericbn/zsh-history-substring-search that referenced this issue Aug 31, 2021
This will save users from some common boilerplate code in their own
.zshrc file.

Fixes zsh-users#107
@ericbn
Copy link
Contributor

ericbn commented Nov 7, 2021

Created #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants