vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 645816b3606bf6802bcfe62092a8215861e15935 parent f55a604c8872dd5fd9b72362a70c8453d50e3996 Author: Marc André Tanner <mat@brain-dump.org> Date: Fri, 26 Jan 2018 19:14:17 +0100 vis: keep <C-j> mapped to <Enter> in command line window This keeps the existing testing infrastructure, which pipes newline separated commands to stdin, working. Diffstat:
| M | vis-prompt.c | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/vis-prompt.c b/vis-prompt.c @@ -169,6 +169,7 @@ void vis_prompt_show(Vis *vis, const char *title) { prompt->parent_mode = vis->mode; vis_window_mode_map(prompt, VIS_MODE_NORMAL, true, "<Enter>", &prompt_enter_binding); vis_window_mode_map(prompt, VIS_MODE_INSERT, true, "<Enter>", &prompt_enter_binding); + vis_window_mode_map(prompt, VIS_MODE_INSERT, true, "<C-j>", &prompt_enter_binding); vis_window_mode_map(prompt, VIS_MODE_VISUAL, true, "<Enter>", &prompt_enter_binding); vis_window_mode_map(prompt, VIS_MODE_NORMAL, true, "<Escape>", &prompt_esc_binding); vis_window_mode_map(prompt, VIS_MODE_INSERT, true, "<Up>", &prompt_up_binding);