vim: Add delete keymapping to vim.json (#28551)

Closes #16511

Added test for delete in normal mode and keymapping in vim.json

Release Notes:

- Added delete mapping in normal mode
This commit is contained in:
Peter Finn 2025-04-11 07:55:43 -07:00 committed by GitHub
parent c7d3fbcac1
commit dd7bc5f199
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 0 deletions

View file

@ -203,6 +203,7 @@
"c": "vim::PushChange",
"shift-c": "vim::ChangeToEndOfLine",
"d": "vim::PushDelete",
"delete": "vim::DeleteRight",
"shift-d": "vim::DeleteToEndOfLine",
"shift-j": "vim::JoinLines",
"g shift-j": "vim::JoinLinesNoWhitespace",

View file

@ -3816,4 +3816,11 @@ mod test {
Mode::Normal,
);
}
#[gpui::test]
async fn test_delete_key_can_remove_last_character(cx: &mut gpui::TestAppContext) {
let mut cx = NeovimBackedTestContext::new(cx).await;
cx.set_shared_state("abˇc").await;
cx.simulate_shared_keystrokes("delete").await;
cx.shared_state().await.assert_eq("aˇb");
}
}

View file

@ -0,0 +1,3 @@
{"Put":{"state":"abˇc"}}
{"Key":"delete"}
{"Get":{"state":"aˇb","mode":"Normal"}}