Not a bug, just a mental impedance mis-match between what you
expect, and your 'backspace' setting.
:help i_backspacing
:help 'backspace'
You likely want
set backspace=indent,eol,start
If you check your existing value:
set backspace?
it is likely missing at least "start" in the options which causes
your particular head-scratching. The others are handy to have in
there too.
-tim
This isn't a bug, it's just not terribly well documented... When you
press <C-u> or <C-w>, vim needs to decide how much it should delete...
check out how <C-u> works with some test input. The first time you
press it, it will delete to the place where insert mode started. If
you press it again, it will do nothing if 'bs' does not contain
'start', and will delete til immediately after the end of the
automatically inserted indentation otherwise. If you press it again,
it will do nothing if 'bs' does not contain 'indent', and will delete
til the very beginning of the line otherwise. If you press it again,
it will do nothing if 'bs' does not contain 'eol', and will delete
over the beginning of the line, putting the cursor at the end of the
previous line, otherwise.
This is certainly intentional behavior, and it's very useful behavior
at that... It's just not very well documented...
~Matt
I can't reproduce that - vim 7.2.025 on linux. The first <C-u>
deletes "apple", then future presses do nothing. With 'bs' set to
contain 'start', the second <C-u> deletes "this is a " just fine.
> okay, i think ctrl-w is very good, but ctrl-u is much worse.
>
> i use Vim in windows, i don't know whether it will happened in other
> platform.
~Matt