blob: 738b52721cabeb5ce8b9aae0a517f82a1b697e07 (
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
bind --preset --mode insert ctrl-y yank
bind --preset --mode insert alt-y yank-pop
bind --preset --mode insert right forward-char
bind --preset --mode insert left backward-char
bind --preset --mode insert ctrl-right forward-token
bind --preset --mode insert ctrl-left backward-token
bind --preset --mode insert pageup beginning-of-history
bind --preset --mode insert pagedown end-of-history
bind --preset --mode insert ctrl-x fish_clipboard_copy
bind --preset --mode insert ctrl-v fish_clipboard_paste
bind --preset --mode insert tab complete
bind --preset --mode insert ctrl-i complete
bind --preset --mode insert ctrl-s pager-toggle-search
bind --preset --mode insert shift-tab complete-and-search
bind --preset --mode insert shift-delete history-delete or backward-delete-char
bind --preset --mode insert down down-or-search
bind --preset --mode insert up up-or-search
bind --preset --mode insert shift-right forward-bigword
bind --preset --mode insert shift-left backward-bigword
bind --preset --mode insert alt-b prevd-or-backward-word
bind --preset --mode insert alt-f nextd-or-forward-word
bind --preset --mode insert alt-right nextd-or-forward-word
bind --preset --mode insert \e\[1\;9C nextd-or-forward-word
bind --preset --mode insert alt-left prevd-or-backward-word
bind --preset --mode insert \e\[1\;9D prevd-or-backward-word
bind --preset --mode insert alt-up history-token-search-backward
bind --preset --mode insert alt-down history-token-search-forward
bind --preset --mode insert \e\[1\;9A history-token-search-backward
bind --preset --mode insert \e\[1\;9B history-token-search-forward
bind --preset --mode insert alt-. history-token-search-backward
bind --preset --mode insert alt-l __fish_list_current_token
bind --preset --mode insert alt-o __fish_preview_current_file
bind --preset --mode insert alt-w __fish_whatis_current_token
bind --preset --mode insert ctrl-l 'status test-terminal-feature scroll-content-up && commandline -f scrollback-push' clear-screen
bind --preset --mode insert ctrl-c clear-commandline
bind --preset --mode insert ctrl-u backward-kill-line
bind --preset --mode insert ctrl-k kill-line
bind --preset --mode insert ctrl-w backward-kill-path-component
bind --preset --mode insert end end-of-line
bind --preset --mode insert home beginning-of-line
bind --preset --mode insert alt-d 'if test "$(commandline; printf .)" = \\n.; __fish_echo dirh; else; commandline -f kill-word; end'
bind --preset --mode insert ctrl-d delete-or-exit
bind --preset --mode insert alt-s 'for cmd in sudo doas please run0; if command -q $cmd; fish_commandline_prepend $cmd; break; end; end'
bind --preset --mode insert f1 __fish_man_page
bind --preset --mode insert alt-h __fish_man_page
bind --preset --mode insert alt-p __fish_paginate
bind --preset --mode insert alt-# __fish_toggle_comment_commandline
bind --preset --mode insert alt-e edit_command_buffer
bind --preset --mode insert alt-v edit_command_buffer
bind --preset --mode insert '' self-insert
bind --preset --mode insert space self-insert expand-abbr
bind --preset --mode insert \; self-insert expand-abbr
bind --preset --mode insert \| self-insert expand-abbr
bind --preset --mode insert \& self-insert expand-abbr
bind --preset --mode insert \> self-insert expand-abbr
bind --preset --mode insert \< self-insert expand-abbr
bind --preset --mode insert shift-enter 'commandline -i \\n (commandline --search-field >/dev/null && echo --search-field)' expand-abbr
bind --preset --mode insert alt-enter 'commandline -i \\n (commandline --search-field >/dev/null && echo --search-field)' expand-abbr
bind --preset --mode insert \) self-insert expand-abbr
bind --preset --mode insert ctrl-space 'test -n "$(commandline)" && commandline -i " " (commandline --search-field >/dev/null && echo --search-field)'
bind --preset --mode insert shift-space 'commandline -i " " (commandline --search-field >/dev/null && echo --search-field)' expand-abbr
bind --preset --mode insert enter execute
bind --preset --mode insert ctrl-j execute
bind --preset --mode insert ctrl-m execute
bind --preset --mode insert ctrl-enter execute
bind --preset --mode insert ctrl-n accept-autosuggestion
bind --preset --mode insert delete delete-char
bind --preset --mode insert backspace backward-delete-char
bind --preset --mode insert shift-backspace backward-delete-char
bind --preset --mode insert ctrl-h backward-delete-char
function _bind_insert_escape
if commandline -P
commandline -f cancel
else
set fish_bind_mode default
if test (count (commandline --cut-at-cursor | tail -c2)) != 2
commandline -f backward-char
end
commandline -f repaint-mode
end
end
bind --preset --mode insert escape _bind_insert_escape
bind --preset --mode insert ctrl-\[ _bind_insert_escape
|