Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the vim equivalent of emacs' ctrl-k?

Tags:

vim

How can I delete from the current cursor position to the end of line in vim's insert mode?

I know you can do this with D in command mode, and I know you can delete from the cursor position to the beginning of the line in insert mode with ctrl-u, so I'm guessing this should be possible.

like image 247
outis Avatar asked Aug 18 '14 11:08

outis


1 Answers

If you're in insert mode and you want to execute a single normal mode command, you can press:

Ctrl+o

After the normal mode command has executed, you'll be returned to insert mode. So, you can use D that way:

Ctrl+oD

like image 180
Xophmeister Avatar answered Oct 23 '22 22:10

Xophmeister