textwidth in vim, mutt - different behaviours

mdl90

Member

Reaction score: 3
Messages: 50

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.
 

aragats

Daemon

Reaction score: 709
Messages: 1,630

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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,685
Messages: 39,278

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.
 
OP
M

mdl90

Member

Reaction score: 3
Messages: 50

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
 
Top