about summary refs log tree commit diff stats
path: root/modules/by-name/zs/zsh/config/keymaps/viins.zsh
blob: 4e76cdec8a4bd24d4a1d660be39eab9b3f6a8d8a (plain) (blame)
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
bindkey -N viins

# Completion Debugging
bindkey -M viins "^[~" _bash_complete-word
bindkey -M viins "^X~" _bash_list-choices
bindkey -M viins "^X?" _complete_debug
bindkey -M viins "^Xh" _complete_help
bindkey -M viins "^Xt" _complete_tag
bindkey -M viins "^XC" _correct_filename
bindkey -M viins "^Xc" _correct_word
bindkey -M viins "^Xa" _expand_alias
bindkey -M viins "^Xe" _expand_word
bindkey -M viins "^Xd" _list_expansions
bindkey -M viins "^Xm" _most_recent_file
bindkey -M viins "^Xn" _next_tags
bindkey -M viins "^X^R" _read_comp
bindkey -M viins "^[," _history-complete-newer
bindkey -M viins "^[/" _history-complete-older

bindkey -M viins "^J" accept-line
bindkey -M viins "^M" accept-line
bindkey -M viins "^L" clear-screen

bindkey -M viins "^R" atuin-search-viins
bindkey -M viins "^V" edit-command-line

bindkey -M viins "^[[A" history-substring-search-up   # UP ARROW
bindkey -M viins "^[OA" history-substring-search-up   # UP ARROW
bindkey -M viins "^[[B" history-substring-search-down # DOWN ARROW
bindkey -M viins "^[OB" history-substring-search-down # DOWN ARROW

bindkey -M viins "^[[C" beep # RIGHT ARROW
bindkey -M viins "^[OC" beep # RIGHT ARROW
bindkey -M viins "^[[D" beep # LEFT ARROW
bindkey -M viins "^[OD" beep # LEFT ARROW

# Self inserts
bindkey -M viins "^K" self-insert
bindkey -M viins "^S" self-insert
bindkey -R -M viins "\M-^@"-"\M-^?" self-insert
bindkey -R -M viins "^A"-"^C" self-insert
bindkey -R -M viins "^E"-"^F" self-insert
bindkey -R -M viins "^N"-"^P" self-insert
bindkey -R -M viins "^Y"-"^Z" self-insert
bindkey -R -M viins "^\\\\"-"~" self-insert

bindkey -M viins "^[" vi-cmd-mode # ESC

# Support pasted text (and other terminal stuff)
bindkey -M viins "^[[200~" bracketed-paste
bindkey -M viins "^[[2~" overwrite-mode
bindkey -M viins "^[[3~" delete-char
bindkey -M viins "^?" vi-backward-delete-char
bindkey -M viins "^[[5~" beginning-of-buffer-or-history
bindkey -M viins "^[[6~" end-of-buffer-or-history