Allow ctrl+[ as an alias for escape

Also remove unneeded mappings in `g` and `z` modes

Fixes: zed-industries/community#358
This commit is contained in:
Conrad Irwin 2023-07-17 14:57:21 -06:00
parent 9f650dfa52
commit 9e44de90af

View file

@ -99,6 +99,10 @@
"vim::SwitchMode",
"Normal"
],
"ctrl+[": [
"vim::SwitchMode",
"Normal"
],
"0": "vim::StartOfLine", // When no number operator present, use start of line motion
"1": [
"vim::Number",
@ -234,10 +238,6 @@
"h": "editor::Hover",
"t": "pane::ActivateNextItem",
"shift-t": "pane::ActivatePrevItem",
"escape": [
"vim::SwitchMode",
"Normal"
],
"d": "editor::GoToDefinition"
}
},
@ -265,10 +265,6 @@
"t": "editor::ScrollCursorTop",
"z": "editor::ScrollCursorCenter",
"b": "editor::ScrollCursorBottom",
"escape": [
"vim::SwitchMode",
"Normal"
]
}
},
{
@ -322,7 +318,8 @@
"context": "Editor && vim_mode == insert",
"bindings": {
"escape": "vim::NormalBefore",
"ctrl-c": "vim::NormalBefore"
"ctrl-c": "vim::NormalBefore",
"ctrl-[": "vim::NormalBefore",
}
},
{
@ -333,6 +330,10 @@
"escape": [
"vim::SwitchMode",
"Normal"
],
"ctrl+[": [
"vim::SwitchMode",
"Normal"
]
}
}