dotfiles

dot files
git clone git://git.rr3.xyz/dotfiles | git clone gits://git.rr3.xyz/dotfiles
Log | Files | Refs | Submodules

keymap.json (18912B)


      1 // TODO: git, pane splits?, search (next, etc.), vim, project_panel
      2 // For the most part, we use ALT as a modifier for application (Zed)-specific
      3 // commands. In a few cases, we use CTRL instead of ALT for consistency with
      4 // other applications (e.g., web browsers).
      5 [
      6 	// Zed application
      7 	{
      8 		// No "context" field means always active.
      9 		"bindings": {
     10 			// Confirm/cancel
     11 			"enter": "menu::Confirm",
     12 			"escape": "menu::Cancel",
     13 
     14 			// Buffer font size
     15 			"ctrl-alt-pageup": [
     16 				"zed::IncreaseBufferFontSize",
     17 				{ "persist": false },
     18 			],
     19 			"ctrl-alt-pagedown": [
     20 				"zed::DecreaseBufferFontSize",
     21 				{ "persist": false },
     22 			],
     23 			"ctrl-alt-home": ["zed::ResetBufferFontSize", { "persist": false }],
     24 
     25 			// UI font size
     26 			"ctrl-alt-shift-pageup": [
     27 				"zed::IncreaseUiFontSize",
     28 				{ "persist": false },
     29 			],
     30 			"ctrl-alt-shift-pagedown": [
     31 				"zed::DecreaseUiFontSize",
     32 				{ "persist": false },
     33 			],
     34 			"ctrl-alt-shift-home": [
     35 				"zed::ResetUiFontSize",
     36 				{ "persist": false },
     37 			],
     38 
     39 			// Keymap configuration
     40 			"f9": "zed::OpenKeymapFile",
     41 			"shift-f9": "zed::OpenDefaultKeymap",
     42 			"ctrl-f9": "vim::OpenDefaultKeymap",
     43 			"ctrl-shift-f9": "dev::OpenKeyContextView",
     44 
     45 			// Settings configuration
     46 			"f10": "zed::OpenSettingsFile",
     47 			"shift-f10": "zed::OpenDefaultSettings",
     48 			"ctrl-f10": "zed::OpenProjectSettingsFile",
     49 
     50 			// Fullscreen
     51 			"f11": "zed::ToggleFullScreen",
     52 
     53 			// Markdown
     54 			"alt-m": "markdown::OpenPreview",
     55 		},
     56 	},
     57 
     58 	// Menus
     59 	{
     60 		"context": "Picker || menu",
     61 		"bindings": {
     62 			// Navigation
     63 			"up": "menu::SelectPrevious",
     64 			"down": "menu::SelectNext",
     65 			"home": "menu::SelectFirst",
     66 			"end": "menu::SelectLast",
     67 			"pageup": "menu::SelectFirst",
     68 			"pagedown": "menu::SelectLast",
     69 			"tab": "menu::SelectNext",
     70 			"shift-tab": "menu::SelectPrevious",
     71 		},
     72 	},
     73 
     74 	{
     75 		"context": "Workspace",
     76 		"bindings": {
     77 			"alt-space": "command_palette::Toggle",
     78 			"alt-`": "workspace::ToggleZoom",
     79 
     80 			// Open new things
     81 			"ctrl-t": "workspace::NewFile",
     82 			"ctrl-n": "workspace::NewWindow",
     83 			"alt-t": "workspace::NewCenterTerminal",
     84 			"alt-f": "workspace::NewSearch",
     85 			"alt-p": "file_finder::Toggle",
     86 
     87 			// Activate panes
     88 			"ctrl-alt-up": "workspace::ActivatePaneUp",
     89 			"ctrl-alt-down": "workspace::ActivatePaneDown",
     90 			"ctrl-alt-left": "workspace::ActivatePaneLeft",
     91 			"ctrl-alt-right": "workspace::ActivatePaneRight",
     92 
     93 			// Move panes
     94 			"ctrl-alt-shift-up": "workspace::SwapPaneUp",
     95 			"ctrl-alt-shift-down": "workspace::SwapPaneDown",
     96 			"ctrl-alt-shift-left": "workspace::SwapPaneLeft",
     97 			"ctrl-alt-shift-right": "workspace::SwapPaneRight",
     98 
     99 			// Open/focus side panes
    100 			"alt-e": "project_panel::ToggleFocus",
    101 			"alt-g": "git_panel::ToggleFocus",
    102 			"alt-o": "outline_panel::ToggleFocus",
    103 
    104 			// Close side panes
    105 			// Ideally, alt-shift-g would only close the git panel and alt-shift-o
    106 			// would only close the outline panel, but this is the best we can get
    107 			// right now.
    108 			"alt-shift-e": "workspace::ToggleLeftDock",
    109 			"alt-shift-g": "workspace::ToggleRightDock",
    110 			"alt-shift-o": "workspace::ToggleRightDock",
    111 		},
    112 	},
    113 
    114 	{
    115 		"context": "Pane",
    116 		"bindings": {
    117 			// Activate tabs
    118 			"alt-1": ["pane::ActivateItem", 0],
    119 			"alt-2": ["pane::ActivateItem", 1],
    120 			"alt-3": ["pane::ActivateItem", 2],
    121 			"alt-4": ["pane::ActivateItem", 3],
    122 			"alt-5": ["pane::ActivateItem", 4],
    123 			"alt-6": ["pane::ActivateItem", 5],
    124 			"alt-7": ["pane::ActivateItem", 6],
    125 			"alt-8": ["pane::ActivateItem", 7],
    126 			"alt-left": "pane::ActivatePreviousItem",
    127 			"alt-right": "pane::ActivateNextItem",
    128 
    129 			// Move tabs
    130 			"alt-down": "pane::SwapItemLeft",
    131 			"alt-up": "pane::SwapItemRight",
    132 
    133 			// Close and reopen tabs
    134 			"ctrl-w": "pane::CloseActiveItem",
    135 			"ctrl-shift-t": "pane::ReopenClosedItem",
    136 
    137 			// Search
    138 			"alt-s": "project_search::ToggleFilters",
    139 			"alt-r": "search::ToggleRegex",
    140 			"alt-c": "search::ToggleCaseSensitive",
    141 			"alt-d": "search::ToggleReplace",
    142 			"alt-shift-d": "search::ReplaceNext",
    143 			"alt-ctrl-d": "search::ReplaceAll",
    144 		},
    145 	},
    146 
    147 	// Editor (multi-line or single-line)
    148 	{
    149 		"context": "Editor",
    150 		"bindings": {
    151 			// Navigation
    152 			"up": "editor::MoveUp",
    153 			"down": "editor::MoveDown",
    154 			"left": "editor::MoveLeft",
    155 			"right": "editor::MoveRight",
    156 			"home": [
    157 				"editor::MoveToBeginningOfLine",
    158 				{ "stop_at_soft_wraps": true, "stop_at_indent": true },
    159 			],
    160 			"end": ["editor::MoveToEndOfLine", { "stop_at_soft_wraps": true }],
    161 			"pageup": "editor::MovePageUp",
    162 			"pagedown": "editor::MovePageDown",
    163 			"ctrl-up": "editor::LineUp",
    164 			"ctrl-down": "editor::LineDown",
    165 
    166 			// Selections
    167 			"shift-up": "editor::SelectUp",
    168 			"shift-down": "editor::SelectDown",
    169 			"shift-left": "editor::SelectLeft",
    170 			"shift-right": "editor::SelectRight",
    171 			"shift-home": [
    172 				"editor::SelectToBeginningOfLine",
    173 				{ "stop_at_soft_wraps": true, "stop_at_indent": true },
    174 			],
    175 			"shift-end": [
    176 				"editor::SelectToEndOfLine",
    177 				{ "stop_at_soft_wraps": true },
    178 			],
    179 			"shift-pageup": "editor::SelectPageUp",
    180 			"shift-pagedown": "editor::SelectPageDown",
    181 			"ctrl-a": "editor::SelectAll",
    182 
    183 			"tab": "editor::Tab",
    184 			"shift-tab": "editor::Backtab",
    185 			"backspace": "editor::Backspace",
    186 			"shift-backspace": "editor::Backspace",
    187 			"delete": "editor::Delete",
    188 
    189 			"escape": "editor::Cancel",
    190 			"f2": "editor::Rename",
    191 
    192 			"ctrl-x": "editor::Cut",
    193 			"ctrl-c": "editor::Copy",
    194 			"ctrl-v": "editor::Paste",
    195 
    196 			"ctrl-z": "editor::Undo",
    197 			"ctrl-shift-z": "editor::Redo",
    198 		},
    199 	},
    200 
    201 	// Editor (multi-line)
    202 	{
    203 		"context": "Editor && mode == full",
    204 		"bindings": {
    205 			// Newlines
    206 			"enter": "editor::Newline",
    207 			"shift-enter": "editor::Newline",
    208 			"ctrl-enter": "editor::NewlineBelow",
    209 			"ctrl-shift-enter": "editor::NewlineAbove",
    210 
    211 			"ctrl-f": "buffer_search::Deploy",
    212 		},
    213 	},
    214 
    215 	{
    216 		"context": "Editor && renaming",
    217 		"bindings": {
    218 			"enter": "editor::ConfirmRename",
    219 		},
    220 	},
    221 
    222 	{
    223 		"context": "Editor && showing_completions",
    224 		"bindings": {
    225 			"enter": "editor::ConfirmCompletion",
    226 		},
    227 	},
    228 
    229 	{
    230 		"context": "Editor && (showing_code_actions || showing_completions)",
    231 		"bindings": {
    232 			"up": "editor::ContextMenuPrevious",
    233 			"down": "editor::ContextMenuNext",
    234 			"pageup": "editor::ContextMenuFirst",
    235 			"pagedown": "editor::ContextMenuLast",
    236 		},
    237 	},
    238 
    239 	{
    240 		// Currently, "VimControl" is an alias for "vim_mode == normal ||
    241 		// vim_mode == visual || vim_mode == operator", but this could change.
    242 		"context": "VimControl && !menu",
    243 		"bindings": {
    244 			"up": ["vim::Up", { "display_lines": true }],
    245 			"shift-up": "editor::AddSelectionAbove",
    246 			"ctrl-up": "vim::LineUp",
    247 			"ctrl-shift-up": "editor::MoveLineUp",
    248 
    249 			"down": ["vim::Down", { "display_lines": true }],
    250 			"shift-down": "editor::AddSelectionBelow",
    251 			"ctrl-down": "vim::LineDown",
    252 			"ctrl-shift-down": "editor::MoveLineDown",
    253 
    254 			"left": "vim::Left",
    255 			"shift-left": null, // TODO
    256 			"ctrl-left": "vim::PreviousWordStart",
    257 			"ctrl-shift-left": "editor::SelectToPreviousWordStart",
    258 
    259 			"right": "vim::Right",
    260 			"shift-right": null, // TODO
    261 			"ctrl-right": "vim::NextWordStart",
    262 			"ctrl-shift-right": "editor::SelectToNextWordEnd",
    263 
    264 			"home": [
    265 				"editor::MoveToBeginningOfLine",
    266 				{ "stop_at_soft_wraps": true, "stop_at_indent": true },
    267 			],
    268 			"shift-home": null,
    269 			"ctrl-home": ["vim::StartOfLine", { "display_lines": false }],
    270 			"ctrl-shift-home": null,
    271 
    272 			"end": ["vim::EndOfLine", { "display_lines": true }],
    273 			"shift-end": null,
    274 			"ctrl-end": ["vim::EndOfLine", { "display_lines": false }],
    275 			"ctrl-shift-end": null,
    276 
    277 			"pageup": "vim::PageUp",
    278 			"shift-pageup": "vim::MoveToPrevious",
    279 			"ctrl-pageup": "vim::ScrollUp",
    280 			"ctrl-shift-pageup": "vim::StartOfDocument",
    281 
    282 			"pagedown": "vim::PageDown",
    283 			"shift-pagedown": "vim::MoveToNext",
    284 			"ctrl-pagedown": "vim::ScrollDown",
    285 			"ctrl-shift-pagedown": "vim::EndOfDocument",
    286 
    287 			"enter": "editor::NewlineBelow",
    288 			"shift-enter": "editor::NewlineAbove",
    289 			"ctrl-enter": null,
    290 			"ctrl-shift-enter": null,
    291 
    292 			"escape": "vim::SwitchToNormalMode",
    293 			"shift-escape": null,
    294 			"ctrl-escape": null,
    295 			"ctrl-shift-escape": null,
    296 
    297 			"insert": null,
    298 			"shift-insert": null,
    299 			"ctrl-insert": null,
    300 			"ctrl-shift-insert": null,
    301 
    302 			"delete": "vim::DeleteRight",
    303 			"shift-delete": null,
    304 			"ctrl-delete": null,
    305 			"ctrl-shift-delete": null,
    306 
    307 			"space": "vim::WrappingRight",
    308 			"shift-space": null,
    309 			"ctrl-space": null,
    310 			"shift-ctrl-space": null,
    311 
    312 			"backspace": "vim::WrappingLeft",
    313 			"shift-backspace": null,
    314 			"ctrl-backspace": null,
    315 			"shift-ctrl-backspace": null,
    316 
    317 			"tab": null,
    318 			"shift-tab": null,
    319 			"ctrl-tab": null,
    320 			"ctrl-shift-tab": null,
    321 
    322 			"0": ["vim::Number", 0],
    323 			")": null,
    324 			"ctrl-0": null,
    325 			"ctrl-)": null,
    326 
    327 			"1": ["vim::Number", 1],
    328 			"!": null,
    329 			"ctrl-1": null,
    330 			"ctrl-!": null,
    331 
    332 			"2": ["vim::Number", 2],
    333 			"@": "vim::PushReplayRegister",
    334 			"ctrl-2": null,
    335 			"ctrl-@": null,
    336 
    337 			"3": ["vim::Number", 3],
    338 			"#": null,
    339 			"ctrl-3": null,
    340 			"ctrl-#": null,
    341 
    342 			"4": ["vim::Number", 4],
    343 			"$": null,
    344 			"ctrl-4": null,
    345 			"ctrl-$": null,
    346 
    347 			"5": ["vim::Number", 5],
    348 			"%": null,
    349 			"ctrl-5": null,
    350 			"ctrl-%": null,
    351 
    352 			"6": ["vim::Number", 6],
    353 			"^": null,
    354 			"ctrl-6": null,
    355 			"ctrl-^": null,
    356 
    357 			"7": ["vim::Number", 7],
    358 			"&": null,
    359 			"ctrl-7": null,
    360 			"ctrl-&": null,
    361 
    362 			"8": ["vim::Number", 8],
    363 			"*": null,
    364 			"ctrl-8": null,
    365 			"ctrl-*": null,
    366 
    367 			"9": ["vim::Number", 9],
    368 			"(": null,
    369 			"ctrl-9": null,
    370 			"ctrl-(": null,
    371 
    372 			"a": ["vim::PushObject", { "around": true }],
    373 			"A": null,
    374 			"ctrl-a": null,
    375 			"ctrl-A": null,
    376 
    377 			"b": null,
    378 			"B": null,
    379 			"ctrl-b": null,
    380 			"ctrl-B": null,
    381 
    382 			"c": null,
    383 			"C": null,
    384 			"ctrl-c": null,
    385 			"ctrl-C": null,
    386 
    387 			"d": null,
    388 			"D": null,
    389 			"ctrl-d": null,
    390 			"ctrl-D": null,
    391 
    392 			"e": "vim::NextWordEnd",
    393 			"E": "vim::PreviousWordEnd",
    394 			"ctrl-e": "vim::NextSubwordEnd",
    395 			"ctrl-E": "vim::PreviousSubwordEnd",
    396 
    397 			"f": [
    398 				"vim::PushFindForward",
    399 				{ "before": false, "multiline": false },
    400 			],
    401 			"F": [
    402 				"vim::PushFindBackward",
    403 				{ "after": false, "multiline": false },
    404 			],
    405 			"ctrl-f": "vim::RepeatFind",
    406 			"ctrl-F": "vim::RepeatFindReversed",
    407 
    408 			"g": [
    409 				"vim::PushFindForward",
    410 				{ "before": true, "multiline": false },
    411 			],
    412 			"G": [
    413 				"vim::PushFindBackward",
    414 				{ "after": true, "multiline": false },
    415 			],
    416 			"ctrl-g": "vim::RepeatFind",
    417 			"ctrl-G": "vim::RepeatFindReversed",
    418 
    419 			"h": "editor::Hover",
    420 			"H": null,
    421 			"ctrl-h": null,
    422 			"ctrl-H": null,
    423 
    424 			"i": ["vim::PushObject", { "around": false }],
    425 			"I": null,
    426 			"ctrl-i": null,
    427 			"ctrl-I": null,
    428 
    429 			"j": "vim::JoinLines",
    430 			"J": "vim::JoinLinesNoWhitespace",
    431 			"ctrl-j": null,
    432 			"ctrl-J": null,
    433 
    434 			"k": null,
    435 			"K": null,
    436 			"ctrl-k": null,
    437 			"ctrl-K": null,
    438 
    439 			"l": null,
    440 			"L": null,
    441 			"ctrl-l": null,
    442 			"ctrl-L": null,
    443 
    444 			"m": null,
    445 			"M": null,
    446 			"ctrl-m": null,
    447 			"ctrl-M": null,
    448 
    449 			"n": "vim::MoveToNextMatch",
    450 			"N": "vim::MoveToPreviousMatch",
    451 			"ctrl-n": "workspace::NewWindow",
    452 			"ctrl-N": null,
    453 
    454 			"o": null,
    455 			"O": null,
    456 			"ctrl-o": null,
    457 			"ctrl-O": null,
    458 
    459 			"p": null,
    460 			"P": null,
    461 			"ctrl-p": null,
    462 			"ctrl-P": null,
    463 
    464 			"q": "vim::ToggleRecord",
    465 			"Q": "vim::ReplayLastRecording",
    466 			"ctrl-q": null,
    467 			"ctrl-Q": null,
    468 
    469 			"r": null,
    470 			"R": null,
    471 			"ctrl-r": null,
    472 			"ctrl-R": null,
    473 
    474 			"s": null,
    475 			"S": null,
    476 			"ctrl-s": null,
    477 			"ctrl-S": null,
    478 
    479 			"t": null,
    480 			"T": null,
    481 			"ctrl-t": "workspace::NewFile",
    482 			"ctrl-T": "pane::ReopenClosedItem",
    483 
    484 			"u": null,
    485 			"U": null,
    486 			"ctrl-u": null,
    487 			"ctrl-U": null,
    488 
    489 			"v": "vim::ToggleVisual",
    490 			"V": "vim::ToggleVisualLine",
    491 			"ctrl-v": "vim::RestoreVisualSelection",
    492 			"ctrl-V": null,
    493 
    494 			"w": "vim::NextWordStart",
    495 			"W": "vim::PreviousWordStart",
    496 			"ctrl-w": "vim::NextSubwordStart",
    497 			"ctrl-W": "vim::PreviousSubwordStart",
    498 
    499 			"x": null,
    500 			"X": null,
    501 			"ctrl-x": null,
    502 			"ctrl-X": null,
    503 
    504 			"y": null,
    505 			"Y": null,
    506 			"ctrl-y": null,
    507 			"ctrl-Y": null,
    508 
    509 			"z": null,
    510 			"Z": null,
    511 			"ctrl-z": null,
    512 			"ctrl-Z": null,
    513 
    514 			"-": null,
    515 			"_": null,
    516 			"ctrl--": null,
    517 			"ctrl-_": null,
    518 
    519 			"=": null,
    520 			"+": null,
    521 			"ctrl-=": null,
    522 			"ctrl-+": null,
    523 
    524 			"[": "editor::SelectLargerSyntaxNode",
    525 			"{": null,
    526 			"ctrl-[": null,
    527 			"ctrl-{": null,
    528 
    529 			"]": "editor::SelectSmallerSyntaxNode",
    530 			"}": null,
    531 			"ctrl-]": null,
    532 			"ctrl-}": null,
    533 
    534 			"\\": "vim::ToggleComments",
    535 			"|": "vim::GoToColumn",
    536 			"ctrl-\\": null,
    537 			"ctrl-|": null,
    538 
    539 			";": null,
    540 			":": null,
    541 			"ctrl-;": null,
    542 			"ctrl-:": null,
    543 
    544 			"'": null,
    545 			"\"": null,
    546 			"ctrl-'": null,
    547 			"ctrl-\"": null,
    548 
    549 			",": null,
    550 			"<": null,
    551 			"ctrl-,": null,
    552 			"ctrl-<": "vim::Outdent", // For workspace::SendKeystrokes
    553 
    554 			".": null,
    555 			">": null,
    556 			"ctrl-.": null,
    557 			"ctrl->": "vim::Indent", // For workspace::SendKeystrokes
    558 
    559 			"/": "vim::Search",
    560 			"?": "outline::Toggle",
    561 			"ctrl-/": null,
    562 			"ctrl-?": "project_symbols::Toggle",
    563 
    564 			"`": null,
    565 			"~": null,
    566 			"ctrl-`": null,
    567 			"ctrl-~": null,
    568 
    569 			//"ctrl-pageup": ["editor::SelectPrevious", { "replace_newest": false }],
    570 			//"ctrl-pagedown": ["editor::SelectNext", { "replace_newest": false }],
    571 			//"ctrl-shift-pageup": ["editor::SelectPrevious", { "replace_newest": true }],
    572 			//"ctrl-shift-pagedown": ["editor::SelectNext", { "replace_newest": true }],
    573 
    574 			// "": "vim::PushLowercase",
    575 			// "": "vim::PushUppercase",
    576 			// "": "vim::PushOppositeCase",
    577 			// "": "vim::ConvertToLowerCase",
    578 			// "": "vim::ConvertToUpperCase",
    579 			// "": "vim::ChangeCase",
    580 			// "": "vim::Enter",
    581 			// "": "vim::Quotes",
    582 			// "": "vim::Literal",
    583 			// "": "vim::Argument",
    584 			// "": "vim::Exchange",
    585 			// "": "vim::Increment",
    586 			// "": "vim::Decrement",
    587 			// "": "vim::Substitute",
    588 			// "": "editor::SelectAllMatches",
    589 			// TODO: replace mode
    590 		},
    591 	},
    592 
    593 	{
    594 		"context": "vim_mode == normal",
    595 		"bindings": {
    596 			// TODO: organize
    597 			":": "command_palette::Toggle",
    598 			".": "vim::Repeat",
    599 			"escape": "editor::Cancel",
    600 			"+": "vim::Increment",
    601 			"-": "vim::Decrement",
    602 
    603 			"tab": "vim::Indent",
    604 			"shift-tab": "vim::Outdent",
    605 			"ctrl-tab": null,
    606 			"ctrl-shift-tab": null,
    607 
    608 			"a": "vim::InsertAfter",
    609 			"A": "vim::InsertEndOfLine",
    610 			"ctrl-a": null,
    611 			"ctrl-A": null,
    612 
    613 			"c": "vim::PushChange",
    614 			"C": "vim::ChangeToEndOfLine",
    615 			"ctrl-c": null,
    616 			"ctrl-C": null,
    617 
    618 			"d": "vim::PushDelete",
    619 			"D": "vim::DeleteToEndOfLine",
    620 			"ctrl-d": null,
    621 			"ctrl-D": null,
    622 
    623 			"i": "vim::InsertBefore",
    624 			"I": "vim::InsertFirstNonWhitespace",
    625 			"ctrl-i": null,
    626 			"ctrl-I": null,
    627 
    628 			"o": "vim::InsertLineBelow",
    629 			"O": "vim::InsertLineAbove",
    630 			"ctrl-o": null,
    631 			"ctrl-O": null,
    632 
    633 			"p": [
    634 				"vim::Paste",
    635 				{ "preserve_clipboard": true, "before": false },
    636 			],
    637 			"P": ["vim::Paste", { "preserve_clipboard": true, "before": true }],
    638 			"ctrl-p": null,
    639 			"ctrl-P": null,
    640 
    641 			"r": null,
    642 			"R": null,
    643 			"ctrl-r": "vim::Redo",
    644 			"ctrl-R": null,
    645 
    646 			"s": "vim::Substitute",
    647 			"S": "vim::SubstituteLine",
    648 			"ctrl-s": null,
    649 			"ctrl-S": null,
    650 
    651 			"u": "vim::Undo",
    652 			"U": "vim::Redo",
    653 			"ctrl-u": null,
    654 			"ctrl-U": null,
    655 
    656 			"x": "vim::DeleteRight",
    657 			"X": "editor::DeleteLine",
    658 			"ctrl-x": null,
    659 			"ctrl-X": null,
    660 
    661 			"y": "vim::PushYank",
    662 			"Y": "vim::YankLine",
    663 			"ctrl-y": null,
    664 			"ctrl-Y": null,
    665 		},
    666 	},
    667 
    668 	{
    669 		"context": "vim_mode == visual",
    670 		"bindings": {
    671 			// TODO: organize
    672 			":": "vim::VisualCommand",
    673 			"escape": "vim::SwitchToNormalMode",
    674 			"+": "vim::Increment",
    675 			"-": "vim::Decrement",
    676 
    677 			"home": [
    678 				"editor::SelectToBeginningOfLine",
    679 				{ "stop_at_soft_wraps": true, "stop_at_indent": true },
    680 			],
    681 
    682 			"delete": "vim::VisualDelete",
    683 			"shift-delete": null,
    684 			"ctrl-delete": null,
    685 			"ctrl-shift-delete": null,
    686 
    687 			"tab": ["workspace::SendKeystrokes", "ctrl-> ctrl-v"],
    688 			"shift-tab": ["workspace::SendKeystrokes", "ctrl-< ctrl-v"],
    689 			"ctrl-tab": null,
    690 			"ctrl-shift-tab": null,
    691 
    692 			"c": "vim::Substitute",
    693 			"C": "vim::SubstituteLine",
    694 			"ctrl-c": null,
    695 			"ctrl-C": null,
    696 
    697 			"d": "vim::VisualDelete",
    698 			"D": "vim::VisualDeleteLine",
    699 			"ctrl-d": null,
    700 			"ctrl-D": null,
    701 
    702 			"p": ["vim::Paste", { "preserve_clipboard": true }],
    703 			"P": ["vim::Paste", { "preserve_clipboard": true }],
    704 			"ctrl-p": null,
    705 			"ctrl-P": null,
    706 
    707 			"s": "vim::Substitute",
    708 			"S": "vim::SubstituteLine",
    709 			"ctrl-s": null,
    710 			"ctrl-S": null,
    711 
    712 			"x": "vim::VisualDelete",
    713 			"X": "vim::VisualDeleteLine",
    714 			"ctrl-x": null,
    715 			"ctrl-X": null,
    716 
    717 			"y": "vim::VisualYank",
    718 			"Y": "vim::VisualYankLine",
    719 			"ctrl-y": null,
    720 			"ctrl-Y": null,
    721 		},
    722 	},
    723 
    724 	{
    725 		"context": "vim_mode == insert",
    726 		"bindings": {
    727 			"escape": "vim::NormalBefore",
    728 			"ctrl-c": "editor::Paste",
    729 			"ctrl-space": "editor::ShowCompletions",
    730 		},
    731 	},
    732 
    733 	// Make escape leave insert mode even if completions are showing.
    734 	{
    735 		"context": "Editor && vim_mode == insert && showing_completions",
    736 		"bindings": {
    737 			"escape": "vim::NormalBefore",
    738 		},
    739 	},
    740 
    741 	{
    742 		"context": "vim_mode == waiting",
    743 		"bindings": {
    744 			"escape": "vim::ClearOperators",
    745 		},
    746 	},
    747 
    748 	{
    749 		"context": "vim_mode == operator",
    750 		"bindings": {
    751 			"escape": "vim::ClearOperators",
    752 		},
    753 	},
    754 
    755 	{
    756 		"context": "vim_operator == a || vim_operator == i",
    757 		"bindings": {
    758 			"w": "vim::Word",
    759 			"'": "vim::Quotes",
    760 			"\"": "vim::DoubleQuotes",
    761 			"`": "vim::BackQuotes",
    762 
    763 			"(": "vim::Parentheses",
    764 			")": "vim::Parentheses",
    765 
    766 			"[": "vim::SquareBrackets",
    767 			"]": "vim::SquareBrackets",
    768 
    769 			"{": "vim::CurlyBrackets",
    770 			"}": "vim::CurlyBrackets",
    771 
    772 			"<": "vim::AngleBrackets",
    773 			">": "vim::AngleBrackets",
    774 		},
    775 	},
    776 
    777 	{
    778 		"context": "vim_operator == c",
    779 		"bindings": {
    780 			"c": "vim::CurrentLine",
    781 		},
    782 	},
    783 
    784 	{
    785 		"context": "vim_operator == d",
    786 		"bindings": {
    787 			"d": "vim::CurrentLine",
    788 		},
    789 	},
    790 
    791 	{
    792 		"context": "vim_operator == y",
    793 		"bindings": {
    794 			"y": "vim::CurrentLine",
    795 		},
    796 	},
    797 
    798 	{
    799 		"context": "BufferSearchBar",
    800 		"bindings": {
    801 			"enter": "vim::SearchSubmit",
    802 			"escape": "buffer_search::Dismiss",
    803 		},
    804 	},
    805 
    806 	//"": "vim::Word",
    807 	//"": "vim::Subword",
    808 	//"": "vim::OtherEnd",
    809 	//"": "vim::StartOfLine",
    810 	//"": "vim::EndOfLine",
    811 	//"": "vim::CurrentLine",
    812 	//"": "vim::Quotes",
    813 	//"": "vim::DoubleQuotes",
    814 	//"": "vim::BackQuotes",
    815 	//"": "vim::AnyQuotes",
    816 	//"": "vim::Parentheses",
    817 	//"": "vim::SquareBrackets",
    818 	//"": "vim::CurlyBrackets",
    819 	//"": "vim::AngleBrackets",
    820 	// TODO: Establish "logical" editing language. E.g., instead of `D` to delete
    821 	// to end of line (which is a sort of special case of `d`), use `d l` instead,
    822 	// where `l` is the EndOfLine object (as below).
    823 
    824 	{
    825 		"context": "Terminal",
    826 		"bindings": {
    827 			"ctrl-shift-c": "terminal::Copy",
    828 			"ctrl-shift-v": "terminal::Paste",
    829 
    830 			"ctrl-shift-up": "terminal::ScrollLineUp",
    831 			"ctrl-shift-down": "terminal::ScrollLineDown",
    832 
    833 			"ctrl-shift-pageup": "terminal::ScrollPageUp",
    834 			"ctrl-shift-pagedown": "terminal::ScrollPageDown",
    835 
    836 			"ctrl-shift-home": "terminal::ScrollToTop",
    837 			"ctrl-shift-end": "terminal::ScrollToBottom",
    838 		},
    839 	},
    840 ]