-
Notifications
You must be signed in to change notification settings - Fork 0
/
keysrc
59 lines (51 loc) · 1.71 KB
/
keysrc
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
## vim: set fenc=utf-8 ts=2 sw=0 sts=0 sr et si tw=0 fdm=marker fmr={{{,}}} ft=zsh:
##
## keysrc by Andy3153
## created 31/01/21 ~ 14:05:08
## remade 11/03/24 ~ 10:52:28
##
# {{{ Bindkey mode
bindkey -v # use Vi keybindings
# }}}
# {{{ Keybinds
# {{{ Cursor movement
bindkey "^[[1;5C" forward-word # move to next word (ctrl+left_arrow)
bindkey "^[[1;5D" backward-word # move to previous word (ctrl+right_arrow)
bindkey "^[[H" beginning-of-line # home key
bindkey "^[[F" end-of-line # end key
# }}}
# {{{ Completion movement
#bindkey -M menuselect "left" vi-backward-char
#bindkey -M menuselect "down" vi-down-line-or-history
#bindkey -M menuselect "up" vi-up-line-or-history
#bindkey -M menuselect "right" vi-forward-char
#
#bindkey -M menuselect "^[[Z" vi-up-line-or-history # previous match (shift-tab)
# }}}
# {{{ Delete keys
bindkey "^[[3~" delete-char # delete key
bindkey "^H" backward-delete-word # delete previous word (ctrl+bksp)
bindkey "^[[3;5~" delete-word # delete next word (ctrl+del)
# }}}
# {{{ Vi keybinds
bindkey -M vicmd "z" edit-command-line # edit line in $EDITOR
# {{{ Change/delete inside ...
for m in visual viopp
do for c in {a,i}{\',\",\`}
do bindkey -M "${m}" "${c}" select-quoted
done
done
for m in visual viopp
do for c in {a,i}${(s..)^:-'()[]{}<>bB'}
do bindkey -M "${m}" "${c}" select-bracketed
done
done
# }}}
# }}}
# {{{ Run commands
bindkey -s "^[c" "clear" # clear (alt+c)
bindkey -s "^[r" "source ranger" # ranger cd (alt+r)
# }}}
# }}}