Windows C-Del / C-Backspace behavior emulation in VIM

I like to emulate the normal behavior of C-Del / C-Backspace on Windows in VIM. I am currently using:

imap <C-Del> <C-o>dw
imap <C-Backspace> <C-o>db

It is close, but not perfect. For example. when trying to remove this from the end of the line

foo(1, 2)

with C-Backspace, this happens:

foo(1, )

How can i solve this?

+3
source share
1 answer

your new one is the <C-Backspace>same as the inside <C-w>. So, to solve your problem, you can

imap <C-Backspace> <C-w>
+3
source

Source: https://habr.com/ru/post/1706916/


All Articles