Use zed-style shifted letters (#20254)

Release Notes:

- vim: Fixed some shortcuts to render correctly in Command
This commit is contained in:
Conrad Irwin 2024-11-05 15:51:52 -07:00 committed by GitHub
parent 86ff6e2c8e
commit 236498408f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 deletions

View file

@ -137,14 +137,14 @@
"z .": ["workspace::SendKeystrokes", "z z ^"], "z .": ["workspace::SendKeystrokes", "z z ^"],
"z b": "editor::ScrollCursorBottom", "z b": "editor::ScrollCursorBottom",
"z a": "editor::ToggleFold", "z a": "editor::ToggleFold",
"z A": "editor::ToggleFoldRecursive", "z shift-a": "editor::ToggleFoldRecursive",
"z c": "editor::Fold", "z c": "editor::Fold",
"z C": "editor::FoldRecursive", "z shift-c": "editor::FoldRecursive",
"z o": "editor::UnfoldLines", "z o": "editor::UnfoldLines",
"z O": "editor::UnfoldRecursive", "z shift-o": "editor::UnfoldRecursive",
"z f": "editor::FoldSelectedRanges", "z f": "editor::FoldSelectedRanges",
"z M": "editor::FoldAll", "z shift-m": "editor::FoldAll",
"z R": "editor::UnfoldAll", "z shift-r": "editor::UnfoldAll",
"shift-z shift-q": ["pane::CloseActiveItem", { "saveIntent": "skip" }], "shift-z shift-q": ["pane::CloseActiveItem", { "saveIntent": "skip" }],
"shift-z shift-z": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }], "shift-z shift-z": ["pane::CloseActiveItem", { "saveIntent": "saveAll" }],
// Count support // Count support
@ -234,7 +234,7 @@
"bindings": { "bindings": {
":": "vim::VisualCommand", ":": "vim::VisualCommand",
"u": "vim::ConvertToLowerCase", "u": "vim::ConvertToLowerCase",
"U": "vim::ConvertToUpperCase", "shift-u": "vim::ConvertToUpperCase",
"o": "vim::OtherEnd", "o": "vim::OtherEnd",
"shift-o": "vim::OtherEnd", "shift-o": "vim::OtherEnd",
"d": "vim::VisualDelete", "d": "vim::VisualDelete",
@ -258,8 +258,8 @@
"g ctrl-x": ["vim::Decrement", { "step": true }], "g ctrl-x": ["vim::Decrement", { "step": true }],
"shift-i": "vim::InsertBefore", "shift-i": "vim::InsertBefore",
"shift-a": "vim::InsertAfter", "shift-a": "vim::InsertAfter",
"g I": "vim::VisualInsertFirstNonWhiteSpace", "g shift-i": "vim::VisualInsertFirstNonWhiteSpace",
"g A": "vim::VisualInsertEndOfLine", "g shift-a": "vim::VisualInsertEndOfLine",
"shift-j": "vim::JoinLines", "shift-j": "vim::JoinLines",
"r": ["vim::PushOperator", "Replace"], "r": ["vim::PushOperator", "Replace"],
"ctrl-c": ["vim::SwitchMode", "Normal"], "ctrl-c": ["vim::SwitchMode", "Normal"],

View file

@ -227,17 +227,17 @@ mod test {
let mut cx = NeovimBackedTestContext::new(cx).await; let mut cx = NeovimBackedTestContext::new(cx).await;
// works in visual mode // works in visual mode
cx.set_shared_state("a😀C«dÉ1*fˇ»\n").await; cx.set_shared_state("a😀C«dÉ1*fˇ»\n").await;
cx.simulate_shared_keystrokes("U").await; cx.simulate_shared_keystrokes("shift-u").await;
cx.shared_state().await.assert_eq("a😀CˇDÉ1*F\n"); cx.shared_state().await.assert_eq("a😀CˇDÉ1*F\n");
// works with line selections // works with line selections
cx.set_shared_state("abˇC\n").await; cx.set_shared_state("abˇC\n").await;
cx.simulate_shared_keystrokes("shift-v U").await; cx.simulate_shared_keystrokes("shift-v shift-u").await;
cx.shared_state().await.assert_eq("ˇABC\n"); cx.shared_state().await.assert_eq("ˇABC\n");
// works in visual block mode // works in visual block mode
cx.set_shared_state("ˇaa\nbb\ncc").await; cx.set_shared_state("ˇaa\nbb\ncc").await;
cx.simulate_shared_keystrokes("ctrl-v j U").await; cx.simulate_shared_keystrokes("ctrl-v j shift-u").await;
cx.shared_state().await.assert_eq("ˇAa\nBb\ncc"); cx.shared_state().await.assert_eq("ˇAa\nBb\ncc");
} }

View file

@ -752,7 +752,7 @@ mod test {
}, },
Mode::Visual, Mode::Visual,
); );
cx.simulate_keystrokes("g I"); cx.simulate_keystrokes("g shift-i");
cx.assert_state( cx.assert_state(
indoc! { indoc! {
"ˇThe quick brown "ˇThe quick brown
@ -775,7 +775,7 @@ mod test {
}, },
Mode::Visual, Mode::Visual,
); );
cx.simulate_keystrokes("g A"); cx.simulate_keystrokes("g shift-a");
cx.assert_state( cx.assert_state(
indoc! { indoc! {
"The quick brownˇ "The quick brownˇ

View file

@ -1,12 +1,12 @@
{"Put":{"state":"a😀C«dÉ1*fˇ»\n"}} {"Put":{"state":"a😀C«dÉ1*fˇ»\n"}}
{"Key":"U"} {"Key":"shift-u"}
{"Get":{"state":"a😀CˇDÉ1*F\n","mode":"Normal"}} {"Get":{"state":"a😀CˇDÉ1*F\n","mode":"Normal"}}
{"Put":{"state":"abˇC\n"}} {"Put":{"state":"abˇC\n"}}
{"Key":"shift-v"} {"Key":"shift-v"}
{"Key":"U"} {"Key":"shift-u"}
{"Get":{"state":"ˇABC\n","mode":"Normal"}} {"Get":{"state":"ˇABC\n","mode":"Normal"}}
{"Put":{"state":"ˇaa\nbb\ncc"}} {"Put":{"state":"ˇaa\nbb\ncc"}}
{"Key":"ctrl-v"} {"Key":"ctrl-v"}
{"Key":"j"} {"Key":"j"}
{"Key":"U"} {"Key":"shift-u"}
{"Get":{"state":"ˇAa\nBb\ncc","mode":"Normal"}} {"Get":{"state":"ˇAa\nBb\ncc","mode":"Normal"}}