textwidth in vim, mutt - different behaviours

Vim doesn't seem to apply textwidth instruction as expected (instead, the line just runs on to the end of the terminal window - so apparently applies no EOL/carriage return). I have confirmed that on start Vim reads ~/.vimrc (line numbers and other settings operate as configured in this file).

Conversely, Mutt (which has Vim set as editor) applies textwidth variable just as expected.

I want Vim to do this as well, but can't see why it is not doing so.
 
Did you check muttrc for editor variable? For example, I use a different vimrc for mutt(1).
Certainly there is a setting which resets your textwidth, search for the abbreviated version tw, or maybe you have a plugin which resets it.
 
It's possibly also the difference between wrap and nowrap. The latter will continue the line even if it's wider than can be shown.
 
It's possibly also the difference between wrap and nowrap. The latter will continue the line even if it's wider than can be shown.

Yes, that seems to be it. My initial 'test' just ran the same character across the screen (so, a faulty diagnosis on my part). Now I see that as soon as I enter a whitespace character, this results in the line break being introduced, just as I expect. More here:

http://vim.wikia.com/wiki/Automatic_word_wrapping
 
Back
Top