-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathexecutable_binds.zsh
52 lines (44 loc) · 1.52 KB
/
executable_binds.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# bindkey -e
# ZSH autocomplete
bindkey '^I' insert-unambiguous-or-complete
bindkey -M menuselect '^I' menu-complete
bindkey -M menuselect "$terminfo[kcbt]" reverse-menu-complete
bindkey -M menuselect '^M' .accept-line
## Allow for normal editing keys in the select menu
bindkey -M menuselect '^[[D' .backward-char '^[OD' .backward-char
bindkey -M menuselect '^[[C' .forward-char '^[OC' .forward-char
# delete key
bindkey '^[[3~' delete-char
# bindkey -M menuselect '^[[3~' delete-char
# backspace key
bindkey '^?' backward-delete-char
# bindkey -M menuselect '^?' backward-delete-char
# CTRL + A
bindkey '^A' beginning-of-line
bindkey -M menuselect '^A' beginning-of-line
# CTRL + E
bindkey '^E' end-of-line
bindkey -M menuselect '^E' end-of-line
# Ctrl+Delete: kill the word forward
bindkey '^[[3;5~' kill-word
bindkey -M menuselect '^[[3;5~' kill-word
# Ctrl+Backspace: kill the word backward
bindkey "^H" backward-kill-word
bindkey -M menuselect "^H" backward-kill-word
# CTRL + LEFT ARROW -> Move to the previous word
bindkey '^[[1;5D' backward-word
bindkey -M menuselect '^[[1;5D' backward-word
# CTRL + RIGHT ARROW -> Move to the next word
bindkey '^[[1;5C' forward-word
bindkey -M menuselect '^[[1;5C' forward-word
# bind ctrl + f to fzf
zle -N zi
bindkey '^f' zi
# use ctrl-n for navi cheatsheets
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
bindkey '^n' navi_widget
bindkey '^R' atuin-search
# bind to the up key, which depends on terminal mode
# bindkey '^[[A' atuin-up-search
# bindkey '^[OA' atuin-up-search
fi