Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:




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


Pressing A to enter insert mode again




If I should show :ver I can do this.


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

share|improve this question
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 '12 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 '12 at 20:37
up vote 1 down vote accepted

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).

share|improve this answer
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 '12 at 20:34

You must log in to answer this question.

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