This repository has been archived by the owner on Aug 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
S03_keys
72 lines (65 loc) · 1.82 KB
/
S03_keys
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# if you're not familiar/forgot the ZLE binding vi-quoted-insert, then you probably want to read:
# http://stackoverflow.com/questions/1903412/bindkey-with-zsh-on-mac
# this keybinding is usually associated with ^v, however, this file binds ^v to something else
# do not use vi mode for zle despite EDITOR=vim
bindkey -e
autoload edit-command-line
bindkey ^v edit-command-line
zle -N edit-command-line
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
bindkey '^[[3~' delete-char
bindkey '^z' undo
eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }"
zle -N insert-cycledleft
bindkey "^[[1;2D" insert-cycledleft
eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q -0'; zle accept-line }"
zle -N insert-cycledright
bindkey "^[[1;2C" insert-cycledright
# Function keys
eval "zle-no-op() {}"
zle -N zle-no-op
#F1
bindkey '^[OP' zle-no-op
#F2
bindkey '^[OQ' zle-no-op
#F3
eval "f3() {zle push-line;LBUFFER+='f3';zle accept-line}"
zle -N f3
bindkey '^[OR' f3
#F4
eval "f4() {zle push-line;LBUFFER+='f4';zle accept-line}"
zle -N f4
bindkey '^[OS' f4
#F5
eval "f5() {zle push-line;LBUFFER+='f5';zle accept-line}"
zle -N f5
bindkey '^[[15~' f5
#F6
eval "f6() {zle push-line;LBUFFER+='f6';zle accept-line}"
zle -N f6
bindkey '^[[17~' f6
#F7
eval "f7() {zle push-line;LBUFFER+='f7';zle accept-line}"
zle -N f7
bindkey '^[[18~' f7
#F8
eval "f8() {zle push-line;LBUFFER+='f8';zle accept-line}"
zle -N f8
bindkey '^[[19~' f8
#F9
eval "f9() {zle push-line;LBUFFER+='zsh_build';zle accept-line}"
zle -N f9
bindkey '^[[20~' f9
#F10
eval "f10() {zle push-line;LBUFFER+='f10';zle accept-line}"
zle -N f10
bindkey '^[[21~' f10
#F11
eval "f11() {zle push-line;LBUFFER+='f11';zle accept-line}"
zle -N f11
bindkey '^[[23~' f11
#F12
eval "f12() {zle push-line;LBUFFER+='f12';zle accept-line}"
zle -N f12
bindkey '^[[24~' f12