From 9d15e130a6e96b5e06032e6ea0cee04641665c80 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 5 Aug 2022 12:40:40 -0500 Subject: [PATCH] Remove C-n and C-p from the insert mode keymap These are read-line-like bindings which we'd like to minimize in insert mode in general. In particular these two are troublesome if you have a low `editor.idle-timeout` config and are using LSP completions: the behavior of C-n/C-p switches from moving down/up lines to moving down/up the completion menu, so if you hit C-n too quickly expecting to be in the completion menu, you'll end up moving down a line instead. Using C-p moves you back up the line but doesn't re-trigger the completion menu. This kind of timing related change to behavior isn't realistically that big of a deal but it can be annoying. --- helix-term/src/keymap/default.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/helix-term/src/keymap/default.rs b/helix-term/src/keymap/default.rs index f6fb6140b6d3..8a16dc1be1b1 100644 --- a/helix-term/src/keymap/default.rs +++ b/helix-term/src/keymap/default.rs @@ -358,9 +358,7 @@ pub fn default() -> HashMap { "left" => move_char_left, "C-b" => move_char_left, "down" => move_line_down, - "C-n" => move_line_down, "up" => move_line_up, - "C-p" => move_line_up, "right" => move_char_right, "C-f" => move_char_right, "A-b" => move_prev_word_end,