Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
TEMP
Conrad Irwin48bb2a3321f5
diff --git a/assets/keymaps/vim.json b/assets/keymaps/vim.jsonindex 2027943a0f3..f7fdb57d9da 100644--- a/assets/keymaps/vim.json+++ b/assets/keymaps/vim.json@@ -327,7 +327,7 @@"Delete"],"shift-d": "vim::DeleteToEndOfLine",- "shift-j": "editor::JoinLines",+ "shift-j": "vim::JoinLines","y": ["vim::PushOperator","Yank"diff --git a/crates/vim/src/normal.rs b/crates/vim/src/normal.rsindex 25a5ba5131e..d328f663c55 100644--- a/crates/vim/src/normal.rs+++ b/crates/vim/src/normal.rs@@ -46,6 +46,7 @@ actions!(DeleteToEndOfLine,Yank,ChangeCase,+ JoinLines,]);@@ -106,6 +107,19 @@ pub fn init(cx: &mut AppContext) {);})});+ cx.add_action(|_: &mut Workspace, _: &JoinLines, cx| {+ Vim::update(cx, |vim, cx| {+ vim.record_current_action(cx);+ let times = vim.pop_number_operator(cx).unwrap_or(1);+ vim.update_active_editor(cx, |editor, cx| {+ editor.transact(cx, |editor, cx| {+ for _ in 0..times {+ editor.join_lines(editor::JoinLines, cx)+ }+ })+ })+ })+ })}pub fn normal_motion(