mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
TEMP
This commit is contained in:
parent
1b1d7f22cc
commit
48bb2a3321
2 changed files with 15 additions and 1 deletions
|
@ -327,7 +327,7 @@
|
|||
"Delete"
|
||||
],
|
||||
"shift-d": "vim::DeleteToEndOfLine",
|
||||
"shift-j": "editor::JoinLines",
|
||||
"shift-j": "vim::JoinLines",
|
||||
"y": [
|
||||
"vim::PushOperator",
|
||||
"Yank"
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue