(Shell)~zshrc: added bind keys to make using vim mode nicer

This commit is contained in:
2024-08-19 16:31:45 +01:00
parent 2fb7897da4
commit b094a88067

View File

@@ -91,14 +91,18 @@ bindkey -v
autoload -z edit-command-line
zle -N edit-command-line
bindkey "^X^E" edit-command-line
bindkey "^[[Z" forward-char
# Menu
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'j' vi-up-line-or-history
bindkey -M menuselect 'k' vi-down-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -a 'k' history-substring-search-up
bindkey -a 'j' history-substring-search-down
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^l' clear
bindkey '^P' history-substring-search-up
bindkey '^N' history-substring-search-down
# Cursor
function zle-keymap-select {
@@ -127,8 +131,6 @@ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
. $HOME/.cargo/env
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/oreo/.sdkman"
[[ -s "/home/oreo/.sdkman/bin/sdkman-init.sh" ]] && source "/home/oreo/.sdkman/bin/sdkman-init.sh"