I'm trying to find a good way to remap control+U in insert-mode
so that it begins an undo-block.  There are times when type
control+U in insert-mode and it doesn't do what I intend, or I
want to undo it, only to find that an "u"ndo doesn't solve the
problem.  I know that transitioning out of insert-mode (via <esc>
or <c-o>) will mark a point in the undo-stack.  However, I don't
really want to be in insert mode.  I've tried the following:

inoremap <c-u> <c-o><esc><c-u>

This does a funky beep/flash (depending on VB settings) and
doesn't behave quite like I would have expected it to.

inoremap <c-u> <c-o><nop><c-u>

This gives me a crazy

"E486: Pattern not found: insert"

which, I haven't searched for the word "insert" so this one makes
me scratch my head.  Bug perhaps?  Vim-internals showing through?

Have I overlooked some setting that I couldn't find in undo.txt?
 Or does anyone else have a good suggestion on how to tag a
control+U in insert-mode so that it alone can be undone?

Thanks,

-tim



Reply via email to