Change summary
assets/keymaps/vim.json | 4 ++++
crates/vim/src/test.rs | 11 +++++++++++
2 files changed, 15 insertions(+)
Detailed changes
@@ -25,11 +25,15 @@
}
],
"h": "vim::Left",
+ "left": "vim::Left",
"backspace": "vim::Backspace",
"j": "vim::Down",
+ "down": "vim::Down",
"enter": "vim::NextLineStart",
"k": "vim::Up",
+ "up": "vim::Up",
"l": "vim::Right",
+ "right": "vim::Right",
"$": "vim::EndOfLine",
"shift-g": "vim::EndOfDocument",
"w": "vim::NextWordStart",
@@ -98,3 +98,14 @@ async fn test_buffer_search(cx: &mut gpui::TestAppContext) {
assert_eq!(bar.query_editor.read(cx).text(cx), "jumps");
})
}
+
+#[gpui::test]
+async fn test_count_down(cx: &mut gpui::TestAppContext) {
+ let mut cx = VimTestContext::new(cx, true).await;
+
+ cx.set_state(indoc! {"aˇa\nbb\ncc\ndd\nee"}, Mode::Normal);
+ cx.simulate_keystrokes(["2", "down"]);
+ cx.assert_editor_state("aa\nbb\ncˇc\ndd\nee");
+ cx.simulate_keystrokes(["9", "down"]);
+ cx.assert_editor_state("aa\nbb\ncc\ndd\neˇe");
+}