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:
parent
c7d3fbcac1
commit
dd7bc5f199
3 changed files with 11 additions and 0 deletions
|
@ -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",
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{"Put":{"state":"abˇc"}}
|
||||
{"Key":"delete"}
|
||||
{"Get":{"state":"aˇb","mode":"Normal"}}
|
Loading…
Add table
Add a link
Reference in a new issue