pappasam / nvim-repl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't escape out of repl

leg7 opened this issue · comments

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>')