Using these options

set wrap linebreak nolist

set showbreak=~ "adds specified character after wrap

set breakindent "forces word wrap to start at last lines indentation level

set display=lastline "shows as much of last line as possible in wrap mode

when editing prose that expands over multiple lines, if you insert text the wrapping will correctly keep adjusting.

If you instead do cw or 2cw or whatever, text no longer wraps on word, but visually appears to be wrapped by character. But this is actually false, because when you hit x or some similar command, the character deleted is not the one that was under the cursor.

I have to hit :se wrap to adjust the text after doing a 2cw type of command.

Is there a setting I'm missing, or one I'm using that might be causing this bug?

Using just the plain mac osx Terminal.app


I am able to reproduce this bug after commenting out my whole .vimrc and running only

set wrap linebreak nolist

So if I c2w, and f, ; a few times to get to a comma on the next line, the cursor will highlight with an inaccuracy of the number of characters that should have been wrapped. So if "Perhaps" was cut off at "Perh" the cursor will be on the second "e" in ", deeper", but pressing x will still delete the comma. So it's a visual problem.

It might not be obvious, but this is a case where you insert more than you deleted with the change command. So cw "a man" and replace with "something there" or whatever, in order to force the wrapping to need to readjust.

  • Worth noting for any would-be helpers that the breakindent option is only included in and after patch-7.4.338.
    – Tumbler41
    Jul 19, 2016 at 16:43
  • Could this be a mac specific issue? I tried it in Gvim windows and everything was fine. Can you may be try it on mac vim too ? Jul 19, 2016 at 17:05
  • Can't reproduce on Windows vim 7.4.0 terminal or Gvim. Try starting vim with with vim -u NONE and see if the problem persists.
    – Tumbler41
    Jul 19, 2016 at 17:05
  • Using vim -u NONE it's the same problem. Once you write past the $ marker, it will lose your place when you go to a comma on the next line after you exit insert mode and move with normal mode (or any character, but for sake of reproducability and understanding).
    – Wumbo
    Jul 19, 2016 at 17:13
  • 2
    I think you need a newer Vim. I think, patch 576 fixed it Jul 19, 2016 at 17:25

1 Answer 1


My version of vim was out of date. As Christian Brabandt pointed out, patch 576 repaired this bug.

To update my vim on Mac OSX, I used

brew update brew upgrade vim

Without update, brew thought I had the latest version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.