pappasam / nvim-repl

52 stars 12 forks source link

Can't escape out of repl #20

Closed leg7 closed 11 months ago

leg7 commented 11 months ago

When you switch to the repl buffer with split navigation and then enter insert mode, the repl will capture the escape key & ctrl keys and not let you return to normal mode, thus leaving you stuck in that buffer. The only way to escape is by using the mouse 😵 to click on a normal buffer.

Now I've seen that in #3 someone mentioned the default keybinding to escape in terminal mode is <c-\><c-n> which is so terrible it makes me feel like I'm using emacs. Can we mention this issue and suggest a rebind in the readme? It would have saved me a quite a bit of time.

In the meanwhile I rebound that function to the escape key but I'm not sure if that will cause problems with other repls/terminals. Maybe ctrl+esc would be safer?

vim.keymap.set( 't', '<esc>', '<c-\\><c-n>')