I have program running in the neovim terminal window, and I want to interrupt it. I can do so by moving to the window,
<C-W>l, going into insert mode, and pressing
<Ctrl-C>. Normally, at this time, I want to move back to the editor window, so I press
If I record this sequence as a macro, it functions correctly when I replay the macro. But when I print out the macro, and assign it to a keystroke, it no longer functions.
nnoremap <LocalLeader>cc ^WlA^C^[^Wh
Even if I assign it using the
<C- mappings, it does not function
nnoremap <LocalLeader>cc <C-W>lA<C-C><Esc><C-W>h
What happens instead is that it types the
h in the terminal. I think the
C-C 'absorbs' the
<Esc>, but I don't know how to put a delay within in a set of keystrokes.
Multiple escapes also does not work.
It drives me crazy, knowing that this is possible because it works in the macro, but I just don't know how to specify it as a keyboard mapping.