dotfiles

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

keymap.json (18592B)


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