zsh: add vim-keybindings
This commit is contained in:
parent
8172900e22
commit
a5af099628
2 changed files with 14 additions and 0 deletions
12
zsh/keybindings.zsh
Normal file
12
zsh/keybindings.zsh
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# ===== keybindings
|
||||||
|
# use Vi(m) style key bindings.
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
# ===== history bindings
|
||||||
|
# make ^P and ^N behave like arrow keys (scroll through history)
|
||||||
|
bindkey -a '^P' history-beginning-search-backward
|
||||||
|
bindkey -a '^N' history-beginning-search-forward
|
||||||
|
|
||||||
|
# re-enable incremental backward search for vim keybindings which is especially
|
||||||
|
# useful when the string is an argument and not the command.
|
||||||
|
bindkey '^R' history-incremental-pattern-search-backward
|
||||||
2
zshrc
2
zshrc
|
|
@ -1,3 +1,5 @@
|
||||||
|
# Loading keybindings first because activating Vi-bindings resets all keybinds.
|
||||||
|
source ~/.zsh/keybindings.zsh
|
||||||
source ~/.zsh/setopt.zsh
|
source ~/.zsh/setopt.zsh
|
||||||
source ~/.zsh/checks.zsh
|
source ~/.zsh/checks.zsh
|
||||||
source ~/.zsh/colors.zsh
|
source ~/.zsh/colors.zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue