Is there any key combination that simulate the Del in Vim 开发者_Go百科insert mode? For the Backspace, there is the Ctrl-H which is very convenient, and make it easier than pushing the far away Backspace button.
Take a look at http://vimdoc.sourceforge.net/htmldoc/insert.html There are a few more built-in key combinations for various tasks.
Also you can set your own mappings using .vimrc for example your given example is just
imap ^H <Left><Del>
On my vim installation, Del in insert mode Just Works. :help i_<Del>
If Del isn't doing what you want, you can try :fixdel
. :help :fixdel
has a good explanation of what that tries to fix.
If you simply wanted to simulate Del via another Ctrl-key mapping (e.g. Ctrl-D), I'd recommend the following mapping:
imap <C-D> <C-O>x
Ctrl-O in insert mode will allow you to run a single normal mode command and automatically return back to insert mode. x
deletes the key under the cursor.
You can map keys yourself in vim, including insert mode. The following article reveals more details: Mapping keys in VIM
精彩评论