blob: 7ee65d1084c7d88454f04ed54e565f484827b4de (
plain)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# NeoMutt keybindings, grouped by the menu in which they apply.
{ config, lib, ... }:
let
bind = keyMap: key: action: {
map = keyMap;
inherit key action;
};
in
{
config.programs.neomutt.binds = lib.mkIf config.communication.neomutt.enable [
# Index ------------------------------------------------------------------
(bind [ "index" ] "g" "noop")
(bind [ "index" ] "d" "noop")
(bind [ "index" ] "z" "noop")
(bind [ "index" ] ":" "noop")
(bind [ "index" ] "q" "noop")
# Opening a message is reserved for Enter/Return.
(bind [ "index" ] "h" "noop")
(bind [ "index" ] "<Space>" "noop")
(bind [ "index" ] ":q" "exit")
(bind [ "index" ] "j" "next-entry")
(bind [ "index" ] "k" "previous-entry")
(bind [ "index" ] "gg" "first-entry")
(bind [ "index" ] "G" "last-entry")
(bind [ "index" ] "\\Cd" "half-down")
(bind [ "index" ] "\\Cu" "half-up")
(bind [ "index" ] "\\Cf" "next-page")
(bind [ "index" ] "\\Cb" "previous-page")
(bind [ "index" ] "/" "search")
(bind [ "index" ] "?" "search-reverse")
(bind [ "index" ] "n" "search-next")
(bind [ "index" ] "N" "search-opposite")
(bind [ "index" ] "gf" "limit")
(bind [ "index" ] "]" "next-unread")
(bind [ "index" ] "[" "previous-unread")
(bind [ "index" ] "}" "next-new")
(bind [ "index" ] "{" "previous-new")
(bind [ "index" ] "za" "collapse-thread")
(bind [ "index" ] "zA" "collapse-all")
(bind [ "index" ] "\\Ck" "sidebar-prev")
(bind [ "index" ] "\\Cj" "sidebar-next")
(bind [ "index" ] "\\Co" "sidebar-open")
(bind [ "index" ] "\\Cn" "sidebar-toggle-visible")
(bind [ "index" ] "m" "mail")
(bind [ "index" ] "r" "reply")
(bind [ "index" ] "R" "group-reply")
(bind [ "index" ] "f" "forward-message")
(bind [ "index" ] "c" "change-folder")
(bind [ "index" ] "s" "save-message")
(bind [ "index" ] "y" "copy-message")
(bind [ "index" ] "t" "tag-entry")
(bind [ "index" ] "T" "tag-thread")
(bind [ "index" ] "gh" "display-toggle-weed")
(bind [ "index" ] "dd" "delete-message")
(bind [ "index" ] "dT" "delete-thread")
(bind [ "index" ] "u" "undelete-message")
(bind [ "index" ] "U" "undelete-thread")
# Pager ------------------------------------------------------------------
# Messages open in Neovim via $pager. These bindings remain useful for
# NeoMutt's internal pager, e.g. when it is used by a mailcap viewer.
(bind [ "pager" ] "g" "noop")
(bind [ "pager" ] "d" "noop")
(bind [ "pager" ] ":" "noop")
(bind [ "pager" ] "q" "noop")
(bind [ "pager" ] ":q" "exit")
(bind [ "pager" ] "j" "next-line")
(bind [ "pager" ] "k" "previous-line")
(bind [ "pager" ] "gg" "top")
(bind [ "pager" ] "G" "bottom")
(bind [ "pager" ] "\\Cd" "half-down")
(bind [ "pager" ] "\\Cu" "half-up")
(bind [ "pager" ] "\\Cf" "next-page")
(bind [ "pager" ] "\\Cb" "previous-page")
(bind [ "pager" ] "/" "search")
(bind [ "pager" ] "?" "search-reverse")
(bind [ "pager" ] "n" "search-next")
(bind [ "pager" ] "N" "search-opposite")
(bind [ "pager" ] "\\Ck" "sidebar-prev")
(bind [ "pager" ] "\\Cj" "sidebar-next")
(bind [ "pager" ] "\\Co" "sidebar-open")
(bind [ "pager" ] "\\Cn" "sidebar-toggle-visible")
(bind [ "pager" ] "m" "mail")
(bind [ "pager" ] "r" "reply")
(bind [ "pager" ] "R" "group-reply")
(bind [ "pager" ] "f" "forward-message")
(bind [ "pager" ] "c" "change-folder")
(bind [ "pager" ] "s" "save-message")
(bind [ "pager" ] "y" "copy-message")
(bind [ "pager" ] "t" "tag-message")
(bind [ "pager" ] "gh" "display-toggle-weed")
(bind [ "pager" ] "dd" "delete-message")
(bind [ "pager" ] "u" "undelete-message")
# Attachment menu --------------------------------------------------------
(bind [ "attach" ] "g" "noop")
(bind [ "attach" ] "d" "noop")
(bind [ "attach" ] ":" "noop")
(bind [ "attach" ] "q" "noop")
(bind [ "attach" ] ":q" "exit")
(bind [ "attach" ] "j" "next-entry")
(bind [ "attach" ] "k" "previous-entry")
(bind [ "attach" ] "l" "view-attach")
(bind [ "attach" ] "s" "save-entry")
(bind [ "attach" ] "p" "print-entry")
(bind [ "attach" ] "dd" "delete-entry")
(bind [ "attach" ] "u" "undelete-entry")
# Mailbox browser --------------------------------------------------------
(bind [ "browser" ] "g" "noop")
(bind [ "browser" ] ":" "noop")
(bind [ "browser" ] "q" "noop")
(bind [ "browser" ] ":q" "exit")
(bind [ "browser" ] "j" "next-entry")
(bind [ "browser" ] "k" "previous-entry")
(bind [ "browser" ] "gg" "first-entry")
(bind [ "browser" ] "G" "last-entry")
(bind [ "browser" ] "l" "select-entry")
(bind [ "browser" ] "\\Cd" "half-down")
(bind [ "browser" ] "\\Cu" "half-up")
# Compose menu -----------------------------------------------------------
(bind [ "compose" ] ":" "noop")
(bind [ "compose" ] "q" "noop")
(bind [ "compose" ] ":q" "exit")
(bind [ "compose" ] "j" "next-entry")
(bind [ "compose" ] "k" "previous-entry")
(bind [ "compose" ] "y" "send-message")
(bind [ "compose" ] "a" "attach-file")
(bind [ "compose" ] "e" "edit-message")
(bind [ "compose" ] "p" "postpone-message")
];
}
|