In insert mode I want to delete all text from the cursor to the beginning of a line and stay in insert mode.
Here is the mapping I tried:
inoremap DD <ESC>c0
and this almost works. In the following line (in insert mode)
This is a test line ^ cursor
in insert mode cursor goes 1 step further than just typed symbol (t in my case). And if I press DD, I will get
but want just
line ^ cursor
with the space the cursor pointed.
Is there a way to do this in vim?