-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I have run into an issue which I am not sure is solvable. Suppose you have nvim open in your terminal, [ nvim1 ]
, and you then open a floating terminal within the nvim1 instance, [ nvim1 [ fterm ] ]
. This puts nvim1 into terminal mode. The default way to exit terminal mode is <C-\\><C-n>
however let's suppose that this functionality is remapped to <C-[>
. Next, let's open a new instance of nvim within the floating terminal window and enter insert mode, [ nvim1 [ fterm [ nvim2 ] ] ]
. If I wanted to use <C-[>
to exit insert mode in nvim2 then I would run into issues because the earlier keymap will make nvim1 exit terminal mode first.
My question is, is there anyway to make keycodes go to the inner most nvim instance first? I.e. in the above scenario make <C-[>
check if nvim2 is in insert or terminal mode first, in which case exit those, otherwise bubble up to nvim1.