Commit 8754b68
authored
Ensure command keybindings work reliably in any vim-mode (#1821)
When the vim extension is enabled and in "normal" mode, some default
bindings collide with Silverbullets commands (eg: `ctrl-p` - Share,
`ctrl-o` - Open Document, `ctrl-e` - Export, `ctrl-g h` - Home). These
vim bindings are not always functional (they may appear to do nothing
depending on vims state). This gives the impression that Silverbullet is
bugged and wont trigger commands. In "insert" mode, most bindings are
passed through correctly with some exceptions (eg: `ctrl-o`).
By splitting the command keybindings into their own keymap extension and
loading it before the vim extension, we can ensure Silverbullet commands
always trigger.
This does mean some vim bindings are overshadowed, but if a binding
triggers a Silverbullet command, its generally obvious that *something*
happened and the user should be able to recognise why the vim binding
failed and then rebind the command or vim mapping.1 parent d285288 commit 8754b68
File tree
4 files changed
+28
-17
lines changed- client
- codemirror
- components
4 files changed
+28
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
| 128 | + | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| |||
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
| |||
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
186 | | - | |
| 196 | + | |
187 | 197 | | |
188 | 198 | | |
189 | 199 | | |
| |||
331 | 341 | | |
332 | 342 | | |
333 | 343 | | |
334 | | - | |
| 344 | + | |
335 | 345 | | |
336 | 346 | | |
337 | 347 | | |
| |||
386 | 396 | | |
387 | 397 | | |
388 | 398 | | |
389 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
390 | 402 | | |
391 | 403 | | |
392 | | - | |
| 404 | + | |
393 | 405 | | |
394 | | - | |
395 | | - | |
396 | | - | |
| 406 | + | |
397 | 407 | | |
398 | 408 | | |
399 | | - | |
400 | 409 | | |
401 | 410 | | |
402 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
185 | | - | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
| |||
0 commit comments