on master help sign in
Remove C-n and C-p from the insert mode keymap (#3340)

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.

commit973c51c3e970aa975f2bd1869d50ce2ae6c6de34 authorMichael Davis <mcarsondavis@gmail.com> dateSat 6 Aug 2022, 11:25 (4 years ago) parentea04220
1 file changed−2
helix-term/src/keymap/default.rs−2
helix-term/src/keymap/default.rs−2
@@ -358,9 +358,7 @@ pub fn default() -> HashMap<Mode, Keymap> {
358358 "left" => move_char_left,
359359 "C-b" => move_char_left,
360360 "down" => move_line_down,
361− "C-n" => move_line_down,
362361 "up" => move_line_up,
363− "C-p" => move_line_up,
364362 "right" => move_char_right,
365363 "C-f" => move_char_right,
366364 "A-b" => move_prev_word_end,