Is there any key combination that simulate the Del in Vim 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.
Or, you could perhaps use the key sequence bdwi to delete the current word and go into INSERT mode. You can use bcw to go to the beginning of the current word then change the word, which leaves you insert mode. If your cursor is already on the first character of the word, that will end up deleting the previous word.
Deleting a single line in Vim editor: First, bring your cursor to the line you want to delete. Press the “Esc” key to change the mode. Now type, “:d”, and press “Enter” to delete the line or quickly press “dd”.
I often use the Ctrl-w command in "Insert" mode to delete the word behind the cursor, just like I would do in Bash. In Bash, I also have a Meta-d ( Esc-d ) command for deleting the word in front of the cursor.
vim has two "modes": COMMAND mode and INSERT mode. In COMMAND mode, you execute commands (like undo, redo, find and replace, quit, etc.). In INSERT mode, you type text. There is a third mode, VISUAL mode, that is used to highlight and edit text in bulk.
You can map keys yourself in vim, including insert mode. The following article reveals more details: Mapping keys in VIM
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With