blob: 2f2e664a5b41c39c61400a471886473cb6dcebd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|