Skip to content

Commit

Permalink
Remove conflicting keybindings added with nushell#689 (comment), to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tastaturtaste committed Jan 22, 2024
1 parent d9db6a8 commit 2b1b1c1
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/edit_mode/keybindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ pub fn add_common_navigation_bindings(kb: &mut Keybindings) {
KC::Home,
edit_bind(EC::MoveToLineStart { select: false }),
);
kb.add_binding(
KM::CONTROL,
KC::Char('a'),
edit_bind(EC::MoveToLineStart { select: false }),
);
kb.add_binding(
KM::NONE,
KC::End,
Expand Down Expand Up @@ -214,10 +209,18 @@ pub fn add_common_edit_bindings(kb: &mut Keybindings) {
// Base commands should not affect cut buffer
kb.add_binding(KM::CONTROL, KC::Char('h'), edit_bind(EC::Backspace));
kb.add_binding(KM::CONTROL, KC::Char('w'), edit_bind(EC::BackspaceWord));
kb.add_binding(KM::CONTROL, KC::Char('x'), edit_bind(EC::CutSelection));
kb.add_binding(KM::CONTROL, KC::Char('c'), edit_bind(EC::CopySelection));
kb.add_binding(
KM::CONTROL,
KM::CONTROL | KM::SHIFT,
KC::Char('x'),
edit_bind(EC::CutSelection),
);
kb.add_binding(
KM::CONTROL | KM::SHIFT,
KC::Char('c'),
edit_bind(EC::CopySelection),
);
kb.add_binding(
KM::CONTROL | KM::SHIFT,
KC::Char('v'),
edit_bind(EC::PasteCutBufferBefore),
);
Expand Down Expand Up @@ -268,5 +271,9 @@ pub fn add_common_selection_bindings(kb: &mut Keybindings) {
KC::Home,
edit_bind(EC::MoveToStart { select: true }),
);
kb.add_binding(KM::CONTROL, KC::Char('a'), edit_bind(EC::SelectAll));
kb.add_binding(
KM::CONTROL | KM::SHIFT,
KC::Char('a'),
edit_bind(EC::SelectAll),
);
}

0 comments on commit 2b1b1c1

Please sign in to comment.