Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I like to emulate the normal behavior of C-Del/C-Backspace on Windows in VIM. Currently i'm using:

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

This is close but not perfect. E.g. when trying to delete this from the end of the line

foo(1, 2)

with C-Backspace, this happens:

foo(1, )

How can I solve this?


1 Answers

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

imap <C-Backspace> <C-w>
like image 171
Mykola Golubyev Avatar answered Apr 25 '26 07:04

Mykola Golubyev