diff options
Diffstat (limited to 'zscripts/keybindrc.zsh')
-rwxr-xr-x | zscripts/keybindrc.zsh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/zscripts/keybindrc.zsh b/zscripts/keybindrc.zsh new file mode 100755 index 0000000..2f2e664 --- /dev/null +++ b/zscripts/keybindrc.zsh @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh + +# Vi mode + requirements for ALL keybindings to work correctly +bindkey -v # Select viins keymap +KEYTIMEOUT=1 + +# Keybindings +autoload edit-command-line; zle -N edit-command-line # Edit line in Vim buffer +bindkey '^E' edit-command-line # Ctrl-e - edit line in Vim buffer + +bindkey '^[[P' delete-char # Delete Key +bindkey '^[[F' end-of-line # End Key +bindkey '^[[H' beginning-of-line # Home Key +bindkey '^[[2~' overwrite-mode # Insert Key +bindkey '^D' kill-whole-line # Ctrl-d - delete line +bindkey '^X' clear-screen # Ctrl-x - clear screen +bindkey '^H' backward-delete-word # Ctrl-Backspace - delete entire word behind cursor +bindkey '^[[3;5~' delete-word # Ctrl-Delete - delete currect word in front of the cursor +# History completion +bindkey '\e[A' history-search-backward # Up arrow - seach history backwards +bindkey '\e[B' history-search-forward # Down arrow - seach history forwards + +# Ignore ctrl-d to exit shell +setopt IGNORE_EOF |