summaryrefslogtreecommitdiffstats
path: root/src/repl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl/mod.rs')
-rw-r--r--src/repl/mod.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index d8dcb06..2332569 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -310,15 +310,18 @@ Type ".help" for additional help.
KeyCode::Enter,
ReedlineEvent::Edit(vec![EditCommand::InsertNewline]),
);
+ keybindings.add_binding(
+ KeyModifiers::CONTROL,
+ KeyCode::Char('j'),
+ ReedlineEvent::Edit(vec![EditCommand::InsertNewline]),
+ );
}
fn create_edit_mode(config: &GlobalConfig) -> Box<dyn EditMode> {
let edit_mode: Box<dyn EditMode> = if config.read().keybindings == "vi" {
- let mut normal_keybindings = default_vi_normal_keybindings();
let mut insert_keybindings = default_vi_insert_keybindings();
- Self::extra_keybindings(&mut normal_keybindings);
Self::extra_keybindings(&mut insert_keybindings);
- Box::new(Vi::new(insert_keybindings, normal_keybindings))
+ Box::new(Vi::new(insert_keybindings, default_vi_normal_keybindings()))
} else {
let mut keybindings = default_emacs_keybindings();
Self::extra_keybindings(&mut keybindings);