#!/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