diff --git a/src/edit_mode/emacs.rs b/src/edit_mode/emacs.rs index 773618fe..786b4eed 100644 --- a/src/edit_mode/emacs.rs +++ b/src/edit_mode/emacs.rs @@ -121,6 +121,7 @@ impl EditMode for Emacs { Event::Key(KeyEvent { code, modifiers, .. }) => match (modifiers, code) { + (KeyModifiers::CONTROL, KeyCode::Char('j')) => ReedlineEvent::Enter, (modifier, KeyCode::Char(c)) => { // Note. The modifier can also be a combination of modifiers, for // example: diff --git a/src/edit_mode/vi/mod.rs b/src/edit_mode/vi/mod.rs index dc3fcb0a..75646087 100644 --- a/src/edit_mode/vi/mod.rs +++ b/src/edit_mode/vi/mod.rs @@ -68,6 +68,10 @@ impl EditMode for Vi { self.mode = ViMode::Visual; ReedlineEvent::Multiple(vec![ReedlineEvent::Esc, ReedlineEvent::Repaint]) } + (_, KeyModifiers::CONTROL, KeyCode::Char('j')) => { + self.mode = ViMode::Insert; + ReedlineEvent::Enter + } (ViMode::Normal | ViMode::Visual, modifier, KeyCode::Char(c)) => { let c = c.to_ascii_lowercase();