created January 17, 2004 · complexity basic · author Jochen Behrens · version 5.7
If you are in insert mode and typed a command for normal mode, you can use it.
inoremap <somekey> <Esc>u@.
This mapping switches to normal mode, undoes the last insertion and takes it as a command.
Most times I need it, if I typed dd and the line still remains because of Insert-Mode and the unwanted 'dd' ist somewhere in my text.
I guess you meant:
inoremap <somekey> <Esc>u:@.
inoremap <somekey> <Esc>u@. i
yy yank current line into default register @" execute default recording