<C-w>
deletes a (small-)word in insert mode, but I often want to delete the Word (to last whitespace) I've most recently typed. I tried
inoremap <C-_> <C-o>dB
which kind-of works -- except that at the end of the line, <C-o>
moves the cursor left one character (and so the last character survives the deletion).
Other options? More generally, how do I use <C-o>
in insert-mode mappings without the end-of-line off-by-one problem? Can the normal-mode cursor (which is what <C-o>
summons) be placed "temporarily" beyond the line-end?