3

I am using the line below in my .muttrc Editing generally seems to work except that braking at 79 driving me nuts. I cannot get Vim to stop acting that way. I do not want any braking whatsoever but I want wrapping (based on the terminal screen size)

set editor='vim + -c "set wrapmargin=0" -c "set textwidth=0" -c "set wrap"  -c "set nocp" -c "setlocal fo+=aw" -c "set nohlsearch"  -c "?^$"'

Is there anything else I can do to make Vim respect wrapping? I followed some other SU post, with no success :(

Is it possible that Vim is trying to respect the included message? if so how can I overcome it?

thanks

2

It sounds like you want Vim to visually wrap at word boundaries, but keep paragraphs as single lines within the actual file. If so, remove this:

setlocal fo+=aw

And add this:

setlocal linebreak

Also, I would like to point out that you don't need a separate set command for each option, just put them all together. For example:

set editor='vim + -c "setlocal wrapmargin=0 textwidth=0 wrap nocp linebreak nohlsearch"  -c "?^$"'

Note that the setlocal command behaves as set for options that cannot be set locally.

0
3

The correct way to do it, is to add all mutt specific options to a file called ~/.vim/ftplugin/mail.vim and make sure to include the statement :filetype plugin indent on in your .vimrc. Then Vim will use these settings automatically when writing Mails from within mutt and you don't need to edit your .muttrc to specify different options.

I have further enhanced and customized it. See here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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