-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeys.zsh
51 lines (37 loc) · 1.07 KB
/
keys.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
bindkey -v
export KEYTIMEOUT=1 # Don't take 0.4s to change modes
# Use 'jk' as key to switch to command mode
bindkey -s kj '\e'
# Movements
# ---------
bindkey '^a' beginning-of-line
bindkey '^e' end-of-line
bindkey '^f' forward-char
bindkey '^b' backward-char
bindkey '^[f' forward-word
bindkey '^[b' backward-word
# Completion
# ----------
#bindkey '^I' complete-word
# History
# -------
# Move one item at a time in history
bindkey '^p' up-history
bindkey '^n' down-history
# Traditional backward and forward search in history
bindkey "^r" history-incremental-search-backward
bindkey '^s' history-incremental-search-forward
# Search every line up and down the history that starts like words
# before the cursor
bindkey "^k" up-line-or-beginning-search
bindkey "^j" down-line-or-beginning-search
# Text modifications
# ------------------
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
bindkey '^[.' insert-last-word
bindkey '^w' backward-kill-word
bindkey '^o' kill-line
bindkey '^u' kill-whole-line
bindkey '^t' transpose-chars
bindkey '^[t' transpose-words