1

I am on a ubuntu 10.04 machine. The installed vim7.2 works as expected in insert mode for <ctrl-w,h,u> but my custom compiled vim7.3.744 shows a strange behaviour:

Starting vim with an empty buffer (cursor indicated by |):

~|

When I switch to insert mode, and type a few letters the commands <ctrl-w,h,u> work just fine:

~adsf|<ctrl-w>

=>

~|

However, when I leave insert mode after typing and enter insert mode again and press <ctrl-w,h,u> nothing happens:

~adsf|<Esc>

Pressing A to enter insert mode again

~adsf|<ctrl-w>

=>

~asdf|

If I should show :ver I can do this.

Update

Note: the vim setting backspace is set in $VIMRUNTIME/debian.vim which /usr/bin/vim7.2 uses for startup.

2
  • Yes, :version would be useful. But if there is nothing in your buffer/line, it's quite normal for <C-w> and friends to do nothing, don't you think?
    – romainl
    Dec 11, 2012 at 17:43
  • Thanks for your comment. Hope my edit of my question made my problem clearer. Of course on an empty line nothing would happen, but that was not what I was talking about.
    – Hotschke
    Dec 11, 2012 at 20:37

1 Answer 1

1

Try ":set backspace+=start". You may want to go the whole way and do ":set backspace=indent,eol,start".

See ":help 'backspace'" (the single-quotes are meant to be typed).

1
  • Thanks for your answer. That solved my problem: within /usr/bin/vim :set backspace? gives backspace=indent,eol,start, and within $HOME/usr/bin/vim, set backspace? gives backspace=. I guess there is a system-wide vimrc file which my custom $HOME/usr/bin/vim is not considering. Sometimes the solutions are somewhere unexpected and simple.
    – Hotschke
    Dec 11, 2012 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .