I'm creating a mapping which is supposed to navigate to a specific window (call TEST_WIN
), focus in on the terminal and then delete a single character.
The mapping looks like this:
noremap '; :let curWin = win_getid()<CR>:call win_gotoid(TEST_WIN)<CR>A<C-c><C-l><up><BS>
I have substituted <BS>
in with <C-w>
and both of these delete the entire line instead of a single charater/word.
How can I get it to just delete a single word or character?
I should add that when I am controlling the terminal without the command, <C-w>
and the backspace key on my Mac both work as expected. The problem only arises during the command.
<C-c
there withnoremap
, this means that control+c will have no effect if you have some mapping to it. Please explain what are you trying to do because this mapping looks confusing. – Moshe Nov 15 '20 at 11:37<C-c>
works perfectly fine. It's the<BS>
that doesn't work. – libby Nov 16 '20 at 6:30