2022-04-21 20:33:39 +00:00
|
|
|
[
|
2023-04-20 11:08:30 +00:00
|
|
|
{
|
2023-06-27 03:46:06 +00:00
|
|
|
"context": "Editor && VimControl && !VimWaiting && !menu",
|
2023-04-20 11:08:30 +00:00
|
|
|
"bindings": {
|
|
|
|
"i": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"Object": {
|
|
|
|
"around": false
|
|
|
|
}
|
2022-04-22 16:43:15 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"a": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"Object": {
|
|
|
|
"around": true
|
|
|
|
}
|
2022-10-09 04:20:47 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
2023-09-08 04:48:01 +00:00
|
|
|
":": "command_palette::Toggle",
|
2023-04-20 11:08:30 +00:00
|
|
|
"h": "vim::Left",
|
2023-06-21 20:02:32 +00:00
|
|
|
"left": "vim::Left",
|
2023-04-20 11:08:30 +00:00
|
|
|
"backspace": "vim::Backspace",
|
|
|
|
"j": "vim::Down",
|
2023-06-21 20:02:32 +00:00
|
|
|
"down": "vim::Down",
|
2023-04-20 11:08:30 +00:00
|
|
|
"enter": "vim::NextLineStart",
|
2023-07-19 16:24:23 +00:00
|
|
|
"tab": "vim::Tab",
|
|
|
|
"shift-tab": "vim::Tab",
|
2023-04-20 11:08:30 +00:00
|
|
|
"k": "vim::Up",
|
2023-06-21 20:02:32 +00:00
|
|
|
"up": "vim::Up",
|
2023-04-20 11:08:30 +00:00
|
|
|
"l": "vim::Right",
|
2023-06-21 20:02:32 +00:00
|
|
|
"right": "vim::Right",
|
2023-04-20 11:08:30 +00:00
|
|
|
"$": "vim::EndOfLine",
|
2023-07-03 18:55:41 +00:00
|
|
|
"^": "vim::FirstNonWhitespace",
|
2023-09-11 19:07:11 +00:00
|
|
|
"_": "vim::StartOfLineDownward",
|
|
|
|
"g _": "vim::EndOfLineDownward",
|
2023-04-20 11:08:30 +00:00
|
|
|
"shift-g": "vim::EndOfDocument",
|
|
|
|
"w": "vim::NextWordStart",
|
2023-06-30 04:45:54 +00:00
|
|
|
"{": "vim::StartOfParagraph",
|
|
|
|
"}": "vim::EndOfParagraph",
|
2023-10-23 04:04:55 +00:00
|
|
|
"|": "vim::GoToColumn",
|
2023-04-20 11:08:30 +00:00
|
|
|
"shift-w": [
|
|
|
|
"vim::NextWordStart",
|
|
|
|
{
|
|
|
|
"ignorePunctuation": true
|
2022-04-21 20:33:39 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"e": "vim::NextWordEnd",
|
|
|
|
"shift-e": [
|
|
|
|
"vim::NextWordEnd",
|
|
|
|
{
|
|
|
|
"ignorePunctuation": true
|
2022-04-22 16:43:15 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"b": "vim::PreviousWordStart",
|
|
|
|
"shift-b": [
|
|
|
|
"vim::PreviousWordStart",
|
|
|
|
{
|
|
|
|
"ignorePunctuation": true
|
2022-04-22 16:43:15 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
2023-06-28 18:48:15 +00:00
|
|
|
"n": "search::SelectNextMatch",
|
|
|
|
"shift-n": "search::SelectPrevMatch",
|
2023-04-20 11:08:30 +00:00
|
|
|
"%": "vim::Matching",
|
|
|
|
"f": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"FindForward": {
|
|
|
|
"before": false
|
|
|
|
}
|
2022-05-23 16:23:25 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"t": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"FindForward": {
|
|
|
|
"before": true
|
|
|
|
}
|
2022-12-08 00:39:32 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"shift-f": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"FindBackward": {
|
|
|
|
"after": false
|
|
|
|
}
|
2022-10-06 03:19:30 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"shift-t": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"FindBackward": {
|
|
|
|
"after": true
|
|
|
|
}
|
2022-05-03 17:29:57 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
2023-06-21 20:34:35 +00:00
|
|
|
"ctrl-o": "pane::GoBack",
|
2023-09-28 03:04:13 +00:00
|
|
|
"ctrl-i": "pane::GoForward",
|
2023-06-21 20:34:35 +00:00
|
|
|
"ctrl-]": "editor::GoToDefinition",
|
2023-10-23 04:04:55 +00:00
|
|
|
"escape": ["vim::SwitchMode", "Normal"],
|
|
|
|
"ctrl+[": ["vim::SwitchMode", "Normal"],
|
2023-07-28 03:39:37 +00:00
|
|
|
"v": "vim::ToggleVisual",
|
|
|
|
"shift-v": "vim::ToggleVisualLine",
|
2023-08-15 19:26:04 +00:00
|
|
|
"ctrl-v": "vim::ToggleVisualBlock",
|
2023-08-18 17:39:48 +00:00
|
|
|
"ctrl-q": "vim::ToggleVisualBlock",
|
2023-06-28 19:13:02 +00:00
|
|
|
"*": "vim::MoveToNext",
|
|
|
|
"#": "vim::MoveToPrev",
|
2023-04-20 11:08:30 +00:00
|
|
|
"0": "vim::StartOfLine", // When no number operator present, use start of line motion
|
2023-08-17 21:58:10 +00:00
|
|
|
"ctrl-f": "vim::PageDown",
|
|
|
|
"pagedown": "vim::PageDown",
|
|
|
|
"ctrl-b": "vim::PageUp",
|
|
|
|
"pageup": "vim::PageUp",
|
|
|
|
"ctrl-d": "vim::ScrollDown",
|
|
|
|
"ctrl-u": "vim::ScrollUp",
|
|
|
|
"ctrl-e": "vim::LineDown",
|
|
|
|
"ctrl-y": "vim::LineUp",
|
2023-07-20 00:54:29 +00:00
|
|
|
// "g" commands
|
|
|
|
"g g": "vim::StartOfDocument",
|
|
|
|
"g h": "editor::Hover",
|
|
|
|
"g t": "pane::ActivateNextItem",
|
|
|
|
"g shift-t": "pane::ActivatePrevItem",
|
|
|
|
"g d": "editor::GoToDefinition",
|
|
|
|
"g shift-d": "editor::GoToTypeDefinition",
|
2023-09-25 21:23:14 +00:00
|
|
|
"g n": "vim::SelectNext",
|
|
|
|
"g shift-n": "vim::SelectPrevious",
|
|
|
|
"g >": [
|
|
|
|
"editor::SelectNext",
|
|
|
|
{
|
|
|
|
"replace_newest": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g <": [
|
|
|
|
"editor::SelectPrevious",
|
|
|
|
{
|
|
|
|
"replace_newest": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g a": "editor::SelectAllMatches",
|
2023-09-14 19:49:02 +00:00
|
|
|
"g s": "outline::Toggle",
|
|
|
|
"g shift-s": "project_symbols::Toggle",
|
2023-07-20 15:08:07 +00:00
|
|
|
"g .": "editor::ToggleCodeActions", // zed specific
|
|
|
|
"g shift-a": "editor::FindAllReferences", // zed specific
|
2023-09-28 03:05:58 +00:00
|
|
|
"g space": "editor::OpenExcerpts", // zed specific
|
2023-07-20 00:54:29 +00:00
|
|
|
"g *": [
|
|
|
|
"vim::MoveToNext",
|
|
|
|
{
|
|
|
|
"partialWord": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g #": [
|
|
|
|
"vim::MoveToPrev",
|
|
|
|
{
|
|
|
|
"partialWord": true
|
|
|
|
}
|
|
|
|
],
|
vim: Fix relative line motion
Before this change up and down were in display co-ordinates, after this
change they are in fold coordinates (which matches the vim behaviour).
To make this work without causing usabliity problems, a bunch of extra
keyboard shortcuts now work:
- vim: `z {o,c}` to open,close a fold
- vim: `z f` to fold current visual selection
- vim: `g {j,k,up,down}` to move up/down a display line
- vim: `g {0,^,$,home,end}` to get to start/end of a display line
Fixes: zed-industries/community#1562
2023-08-25 04:11:51 +00:00
|
|
|
"g j": [
|
|
|
|
"vim::Down",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g down": [
|
|
|
|
"vim::Down",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g k": [
|
|
|
|
"vim::Up",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g up": [
|
|
|
|
"vim::Up",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g $": [
|
|
|
|
"vim::EndOfLine",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g end": [
|
|
|
|
"vim::EndOfLine",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g 0": [
|
|
|
|
"vim::StartOfLine",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g home": [
|
|
|
|
"vim::StartOfLine",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g ^": [
|
|
|
|
"vim::FirstNonWhitespace",
|
|
|
|
{
|
|
|
|
"displayLines": true
|
|
|
|
}
|
|
|
|
],
|
2023-07-20 00:54:29 +00:00
|
|
|
// z commands
|
|
|
|
"z t": "editor::ScrollCursorTop",
|
|
|
|
"z z": "editor::ScrollCursorCenter",
|
|
|
|
"z b": "editor::ScrollCursorBottom",
|
vim: Fix relative line motion
Before this change up and down were in display co-ordinates, after this
change they are in fold coordinates (which matches the vim behaviour).
To make this work without causing usabliity problems, a bunch of extra
keyboard shortcuts now work:
- vim: `z {o,c}` to open,close a fold
- vim: `z f` to fold current visual selection
- vim: `g {j,k,up,down}` to move up/down a display line
- vim: `g {0,^,$,home,end}` to get to start/end of a display line
Fixes: zed-industries/community#1562
2023-08-25 04:11:51 +00:00
|
|
|
"z c": "editor::Fold",
|
|
|
|
"z o": "editor::UnfoldLines",
|
|
|
|
"z f": "editor::FoldSelectedRanges",
|
2023-09-08 19:55:13 +00:00
|
|
|
"shift-z shift-q": [
|
|
|
|
"pane::CloseActiveItem",
|
|
|
|
{
|
2023-09-21 02:54:30 +00:00
|
|
|
"saveIntent": "skip"
|
2023-09-08 19:55:13 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"shift-z shift-z": [
|
|
|
|
"pane::CloseActiveItem",
|
|
|
|
{
|
2023-09-21 02:54:30 +00:00
|
|
|
"saveIntent": "saveAll"
|
2023-09-08 19:55:13 +00:00
|
|
|
}
|
|
|
|
],
|
2023-07-20 00:54:29 +00:00
|
|
|
// Count support
|
2023-10-23 04:04:55 +00:00
|
|
|
"1": ["vim::Number", 1],
|
|
|
|
"2": ["vim::Number", 2],
|
|
|
|
"3": ["vim::Number", 3],
|
|
|
|
"4": ["vim::Number", 4],
|
|
|
|
"5": ["vim::Number", 5],
|
|
|
|
"6": ["vim::Number", 6],
|
|
|
|
"7": ["vim::Number", 7],
|
|
|
|
"8": ["vim::Number", 8],
|
|
|
|
"9": ["vim::Number", 9],
|
vim: Add support for ctrl-w commands
Primarily {h,j,k,l,left,right,up,down} for moving to a pane by
direction; but also {w,W,p} for going forward/back, and {v,s} for
splitting a pane vertically/horizontally, and {c,q} to close a pane.
There are a large number of ctrl-w commands that are not supported, and
which fall into three buckets:
* switch this pane with that one (VScode also has this, and it's a
requested feature)
* move to top/bottom/leftmost/rightmost
* counts on any of these
* jump to "definition/file-under-cursor/etc.etc." in a new pane.
2023-07-20 00:29:13 +00:00
|
|
|
// window related commands (ctrl-w X)
|
2023-10-23 04:04:55 +00:00
|
|
|
"ctrl-w left": ["workspace::ActivatePaneInDirection", "Left"],
|
|
|
|
"ctrl-w right": ["workspace::ActivatePaneInDirection", "Right"],
|
|
|
|
"ctrl-w up": ["workspace::ActivatePaneInDirection", "Up"],
|
|
|
|
"ctrl-w down": ["workspace::ActivatePaneInDirection", "Down"],
|
|
|
|
"ctrl-w h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
|
|
"ctrl-w l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
|
|
"ctrl-w k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
|
|
"ctrl-w j": ["workspace::ActivatePaneInDirection", "Down"],
|
|
|
|
"ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
|
|
|
"ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
|
|
|
"ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
|
|
|
"ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
|
|
|
|
"ctrl-w shift-left": ["workspace::SwapPaneInDirection", "Left"],
|
|
|
|
"ctrl-w shift-right": ["workspace::SwapPaneInDirection", "Right"],
|
|
|
|
"ctrl-w shift-up": ["workspace::SwapPaneInDirection", "Up"],
|
|
|
|
"ctrl-w shift-down": ["workspace::SwapPaneInDirection", "Down"],
|
|
|
|
"ctrl-w shift-h": ["workspace::SwapPaneInDirection", "Left"],
|
|
|
|
"ctrl-w shift-l": ["workspace::SwapPaneInDirection", "Right"],
|
|
|
|
"ctrl-w shift-k": ["workspace::SwapPaneInDirection", "Up"],
|
|
|
|
"ctrl-w shift-j": ["workspace::SwapPaneInDirection", "Down"],
|
vim: Add support for ctrl-w commands
Primarily {h,j,k,l,left,right,up,down} for moving to a pane by
direction; but also {w,W,p} for going forward/back, and {v,s} for
splitting a pane vertically/horizontally, and {c,q} to close a pane.
There are a large number of ctrl-w commands that are not supported, and
which fall into three buckets:
* switch this pane with that one (VScode also has this, and it's a
requested feature)
* move to top/bottom/leftmost/rightmost
* counts on any of these
* jump to "definition/file-under-cursor/etc.etc." in a new pane.
2023-07-20 00:29:13 +00:00
|
|
|
"ctrl-w g t": "pane::ActivateNextItem",
|
|
|
|
"ctrl-w ctrl-g t": "pane::ActivateNextItem",
|
|
|
|
"ctrl-w g shift-t": "pane::ActivatePrevItem",
|
|
|
|
"ctrl-w ctrl-g shift-t": "pane::ActivatePrevItem",
|
|
|
|
"ctrl-w w": "workspace::ActivateNextPane",
|
|
|
|
"ctrl-w ctrl-w": "workspace::ActivateNextPane",
|
|
|
|
"ctrl-w p": "workspace::ActivatePreviousPane",
|
|
|
|
"ctrl-w ctrl-p": "workspace::ActivatePreviousPane",
|
|
|
|
"ctrl-w shift-w": "workspace::ActivatePreviousPane",
|
|
|
|
"ctrl-w ctrl-shift-w": "workspace::ActivatePreviousPane",
|
|
|
|
"ctrl-w v": "pane::SplitLeft",
|
|
|
|
"ctrl-w ctrl-v": "pane::SplitLeft",
|
|
|
|
"ctrl-w s": "pane::SplitUp",
|
|
|
|
"ctrl-w shift-s": "pane::SplitUp",
|
|
|
|
"ctrl-w ctrl-s": "pane::SplitUp",
|
|
|
|
"ctrl-w c": "pane::CloseAllItems",
|
|
|
|
"ctrl-w ctrl-c": "pane::CloseAllItems",
|
|
|
|
"ctrl-w q": "pane::CloseAllItems",
|
2023-09-20 21:00:41 +00:00
|
|
|
"ctrl-w ctrl-q": "pane::CloseAllItems",
|
|
|
|
"ctrl-w o": "workspace::CloseInactiveTabsAndPanes",
|
|
|
|
"ctrl-w ctrl-o": "workspace::CloseInactiveTabsAndPanes",
|
2023-10-23 04:04:55 +00:00
|
|
|
"ctrl-w n": ["workspace::NewFileInDirection", "Up"],
|
|
|
|
"ctrl-w ctrl-n": ["workspace::NewFileInDirection", "Up"]
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
2023-08-14 21:51:00 +00:00
|
|
|
{
|
|
|
|
// escape is in its own section so that it cancels a pending count.
|
|
|
|
"context": "Editor && vim_mode == normal && vim_operator == none && !VimWaiting",
|
|
|
|
"bindings": {
|
|
|
|
"escape": "editor::Cancel",
|
|
|
|
"ctrl+[": "editor::Cancel"
|
|
|
|
}
|
|
|
|
},
|
2023-04-20 11:08:30 +00:00
|
|
|
{
|
2023-09-11 19:10:01 +00:00
|
|
|
"context": "Editor && vim_mode == normal && vim_operator == none && !VimWaiting",
|
2023-04-20 11:08:30 +00:00
|
|
|
"bindings": {
|
2023-08-21 22:10:13 +00:00
|
|
|
".": "vim::Repeat",
|
2023-10-23 04:04:55 +00:00
|
|
|
"c": ["vim::PushOperator", "Change"],
|
2023-04-20 11:08:30 +00:00
|
|
|
"shift-c": "vim::ChangeToEndOfLine",
|
2023-10-23 04:04:55 +00:00
|
|
|
"d": ["vim::PushOperator", "Delete"],
|
2023-04-20 11:08:30 +00:00
|
|
|
"shift-d": "vim::DeleteToEndOfLine",
|
2023-09-07 16:51:18 +00:00
|
|
|
"shift-j": "vim::JoinLines",
|
2023-10-23 04:04:55 +00:00
|
|
|
"y": ["vim::PushOperator", "Yank"],
|
2023-10-11 00:46:49 +00:00
|
|
|
"shift-y": "vim::YankLine",
|
2023-08-21 22:10:13 +00:00
|
|
|
"i": "vim::InsertBefore",
|
2023-04-20 11:08:30 +00:00
|
|
|
"shift-i": "vim::InsertFirstNonWhitespace",
|
|
|
|
"a": "vim::InsertAfter",
|
|
|
|
"shift-a": "vim::InsertEndOfLine",
|
|
|
|
"x": "vim::DeleteRight",
|
|
|
|
"shift-x": "vim::DeleteLeft",
|
|
|
|
"o": "vim::InsertLineBelow",
|
|
|
|
"shift-o": "vim::InsertLineAbove",
|
2023-06-27 02:19:28 +00:00
|
|
|
"~": "vim::ChangeCase",
|
2023-09-27 18:32:01 +00:00
|
|
|
"ctrl-a": "vim::Increment",
|
|
|
|
"ctrl-x": "vim::Decrement",
|
2023-04-20 11:08:30 +00:00
|
|
|
"p": "vim::Paste",
|
2023-08-21 18:55:59 +00:00
|
|
|
"shift-p": [
|
|
|
|
"vim::Paste",
|
|
|
|
{
|
|
|
|
"before": true
|
|
|
|
}
|
|
|
|
],
|
2023-04-20 11:08:30 +00:00
|
|
|
"u": "editor::Undo",
|
|
|
|
"ctrl-r": "editor::Redo",
|
2023-07-06 19:21:01 +00:00
|
|
|
"/": "vim::Search",
|
|
|
|
"?": [
|
|
|
|
"vim::Search",
|
2023-04-20 11:08:30 +00:00
|
|
|
{
|
2023-07-19 16:24:23 +00:00
|
|
|
"backwards": true
|
2022-04-22 16:43:15 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
2023-07-20 21:22:15 +00:00
|
|
|
";": "vim::RepeatFind",
|
|
|
|
",": [
|
|
|
|
"vim::RepeatFind",
|
|
|
|
{
|
|
|
|
"backwards": true
|
|
|
|
}
|
|
|
|
],
|
2023-10-23 04:04:55 +00:00
|
|
|
"r": ["vim::PushOperator", "Replace"],
|
2023-06-26 20:42:47 +00:00
|
|
|
"s": "vim::Substitute",
|
2023-09-01 18:23:45 +00:00
|
|
|
"shift-s": "vim::SubstituteLine",
|
2023-06-26 16:08:34 +00:00
|
|
|
"> >": "editor::Indent",
|
2023-06-27 10:09:47 +00:00
|
|
|
"< <": "editor::Outdent",
|
2023-06-26 20:42:47 +00:00
|
|
|
"ctrl-pagedown": "pane::ActivateNextItem",
|
|
|
|
"ctrl-pageup": "pane::ActivatePrevItem"
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2023-09-11 19:10:01 +00:00
|
|
|
"context": "Editor && VimCount",
|
2023-04-20 11:08:30 +00:00
|
|
|
"bindings": {
|
2023-10-23 04:04:55 +00:00
|
|
|
"0": ["vim::Number", 0]
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"context": "Editor && vim_operator == c",
|
|
|
|
"bindings": {
|
2023-07-20 15:08:07 +00:00
|
|
|
"c": "vim::CurrentLine",
|
|
|
|
"d": "editor::Rename" // zed specific
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"context": "Editor && vim_operator == d",
|
|
|
|
"bindings": {
|
|
|
|
"d": "vim::CurrentLine"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"context": "Editor && vim_operator == y",
|
|
|
|
"bindings": {
|
|
|
|
"y": "vim::CurrentLine"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"context": "Editor && VimObject",
|
|
|
|
"bindings": {
|
|
|
|
"w": "vim::Word",
|
|
|
|
"shift-w": [
|
|
|
|
"vim::Word",
|
|
|
|
{
|
|
|
|
"ignorePunctuation": true
|
2023-01-06 22:03:01 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
],
|
|
|
|
"s": "vim::Sentence",
|
|
|
|
"'": "vim::Quotes",
|
|
|
|
"`": "vim::BackQuotes",
|
|
|
|
"\"": "vim::DoubleQuotes",
|
2023-10-23 04:04:55 +00:00
|
|
|
"|": "vim::VerticalBars",
|
2023-04-20 11:08:30 +00:00
|
|
|
"(": "vim::Parentheses",
|
|
|
|
")": "vim::Parentheses",
|
2023-10-23 04:04:55 +00:00
|
|
|
"b": "vim::Parentheses",
|
2023-04-20 11:08:30 +00:00
|
|
|
"[": "vim::SquareBrackets",
|
|
|
|
"]": "vim::SquareBrackets",
|
|
|
|
"{": "vim::CurlyBrackets",
|
|
|
|
"}": "vim::CurlyBrackets",
|
2023-10-23 04:04:55 +00:00
|
|
|
"shift-b": "vim::CurlyBrackets",
|
2023-04-20 11:08:30 +00:00
|
|
|
"<": "vim::AngleBrackets",
|
|
|
|
">": "vim::AngleBrackets"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2023-08-17 23:03:54 +00:00
|
|
|
"context": "Editor && vim_mode == visual && !VimWaiting && !VimObject",
|
2023-04-20 11:08:30 +00:00
|
|
|
"bindings": {
|
|
|
|
"u": "editor::Undo",
|
2023-07-28 19:54:03 +00:00
|
|
|
"o": "vim::OtherEnd",
|
|
|
|
"shift-o": "vim::OtherEnd",
|
2023-04-20 11:08:30 +00:00
|
|
|
"d": "vim::VisualDelete",
|
|
|
|
"x": "vim::VisualDelete",
|
2023-09-15 16:26:43 +00:00
|
|
|
"shift-d": "vim::VisualDelete",
|
|
|
|
"shift-x": "vim::VisualDelete",
|
2023-04-20 11:08:30 +00:00
|
|
|
"y": "vim::VisualYank",
|
2023-09-15 17:14:04 +00:00
|
|
|
"shift-y": "vim::VisualYank",
|
2023-08-21 18:55:59 +00:00
|
|
|
"p": "vim::Paste",
|
|
|
|
"shift-p": [
|
|
|
|
"vim::Paste",
|
|
|
|
{
|
|
|
|
"preserveClipboard": true
|
|
|
|
}
|
|
|
|
],
|
2023-06-21 21:44:19 +00:00
|
|
|
"s": "vim::Substitute",
|
2023-09-01 18:23:45 +00:00
|
|
|
"shift-s": "vim::SubstituteLine",
|
2023-09-06 22:31:52 +00:00
|
|
|
"shift-r": "vim::SubstituteLine",
|
2023-07-28 20:38:45 +00:00
|
|
|
"c": "vim::Substitute",
|
2023-06-27 02:19:28 +00:00
|
|
|
"~": "vim::ChangeCase",
|
2023-09-27 18:32:01 +00:00
|
|
|
"ctrl-a": "vim::Increment",
|
|
|
|
"ctrl-x": "vim::Decrement",
|
2023-09-27 22:43:24 +00:00
|
|
|
"g ctrl-a": [
|
|
|
|
"vim::Increment",
|
|
|
|
{
|
|
|
|
"step": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"g ctrl-x": [
|
|
|
|
"vim::Decrement",
|
|
|
|
{
|
|
|
|
"step": true
|
|
|
|
}
|
|
|
|
],
|
2023-09-06 22:31:52 +00:00
|
|
|
"shift-i": "vim::InsertBefore",
|
2023-08-17 17:21:58 +00:00
|
|
|
"shift-a": "vim::InsertAfter",
|
2023-09-07 17:08:07 +00:00
|
|
|
"shift-j": "vim::JoinLines",
|
2023-10-23 04:04:55 +00:00
|
|
|
"r": ["vim::PushOperator", "Replace"],
|
|
|
|
"ctrl-c": ["vim::SwitchMode", "Normal"],
|
|
|
|
"escape": ["vim::SwitchMode", "Normal"],
|
|
|
|
"ctrl+[": ["vim::SwitchMode", "Normal"],
|
2023-06-27 17:52:04 +00:00
|
|
|
">": "editor::Indent",
|
2023-08-17 23:03:54 +00:00
|
|
|
"<": "editor::Outdent",
|
|
|
|
"i": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"Object": {
|
|
|
|
"around": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"a": [
|
|
|
|
"vim::PushOperator",
|
|
|
|
{
|
|
|
|
"Object": {
|
|
|
|
"around": true
|
|
|
|
}
|
|
|
|
}
|
2023-09-12 00:01:58 +00:00
|
|
|
]
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2023-09-28 03:28:30 +00:00
|
|
|
"context": "Editor && vim_mode == insert",
|
2023-04-20 11:08:30 +00:00
|
|
|
"bindings": {
|
|
|
|
"escape": "vim::NormalBefore",
|
2023-07-17 20:57:21 +00:00
|
|
|
"ctrl-c": "vim::NormalBefore",
|
2023-09-28 03:29:18 +00:00
|
|
|
"ctrl-[": "vim::NormalBefore",
|
|
|
|
"ctrl-x ctrl-o": "editor::ShowCompletions",
|
|
|
|
"ctrl-x ctrl-a": "assistant::InlineAssist", // zed specific
|
|
|
|
"ctrl-x ctrl-c": "copilot::Suggest", // zed specific
|
|
|
|
"ctrl-x ctrl-l": "editor::ToggleCodeActions", // zed specific
|
|
|
|
"ctrl-x ctrl-z": "editor::Cancel"
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"context": "Editor && VimWaiting",
|
|
|
|
"bindings": {
|
|
|
|
"tab": "vim::Tab",
|
|
|
|
"enter": "vim::Enter",
|
2023-10-23 04:04:55 +00:00
|
|
|
"escape": ["vim::SwitchMode", "Normal"],
|
|
|
|
"ctrl+[": ["vim::SwitchMode", "Normal"]
|
2022-04-11 22:54:52 +00:00
|
|
|
}
|
2023-06-28 18:48:15 +00:00
|
|
|
},
|
|
|
|
{
|
2023-09-20 02:47:11 +00:00
|
|
|
"context": "BufferSearchBar && !in_replace > VimEnabled",
|
2023-06-28 18:48:15 +00:00
|
|
|
"bindings": {
|
2023-07-07 17:33:15 +00:00
|
|
|
"enter": "vim::SearchSubmit",
|
2023-07-06 19:21:01 +00:00
|
|
|
"escape": "buffer_search::Dismiss"
|
2023-06-28 18:48:15 +00:00
|
|
|
}
|
2023-04-20 11:08:30 +00:00
|
|
|
}
|
|
|
|
]
|