zsh keybindings

This commit is contained in:
Dirk Alders 2023-09-24 17:19:46 +02:00
parent 399f0254d4
commit 11624cffb6

28
.zshrc
View File

@ -19,19 +19,21 @@ WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
# hide EOL sign ('%') # hide EOL sign ('%')
PROMPT_EOL_MARK="" PROMPT_EOL_MARK=""
# configure key keybindings # configure key keybindings - Identify keys with: sudo showkey -a
bindkey -e # emacs key bindings bindkey -e # emacs key bindings
bindkey ' ' magic-space # do history expansion on space bindkey ' ' magic-space # do history expansion on space
bindkey '^U' backward-kill-line # ctrl + U bindkey '^U' backward-kill-line # ctrl + U
bindkey '^[[3;5~' kill-word # ctrl + Supr bindkey '^[[3;5~' kill-word # ctrl + Supr
bindkey '^[[3~' delete-char # delete bindkey '^[[3~' delete-char # delete
bindkey '^[[1;5C' forward-word # ctrl + -> bindkey '^[[1;5C' forward-word # ctrl + ->
bindkey '^[[1;5D' backward-word # ctrl + <- bindkey '^[[1;5D' backward-word # ctrl + <-
bindkey '^[[5~' beginning-of-buffer-or-history # page up bindkey '^[[5~' beginning-of-buffer-or-history # page up
bindkey '^[[6~' end-of-buffer-or-history # page down bindkey '^[[6~' end-of-buffer-or-history # page down
bindkey "${terminfo[khome]}" beginning-of-line # home bindkey "^[[H" beginning-of-line # home
bindkey "${terminfo[kend]}" end-of-line # end bindkey "^[[1~" beginning-of-line # home
bindkey '^[[Z' undo # shift + tab undo last action bindkey "^[[4~" end-of-line # end
bindkey "^[[F" end-of-line # end
bindkey '^[[Z' undo # shift + tab undo last action
# enable completion features # enable completion features
autoload -Uz compinit autoload -Uz compinit