On 2014-02-28, YuGiOhJCJ Mailing-List wrote:
> Hello,
> 
> On Mutt 1.5.21, my editor is Vim 7.3.
> I don't like when it breaks automatically my lines when I am
> writing an e-mail.
> 
> Is there a way to disable the text wrapping in Mutt?
> (I saw the "wrap" setting in ~/.muttrc that can be set to
> positive, negative or null value but in these 3 cases, the text
> wrapping is still enabled)

As Sebastian wrote, this is a Vim configuration issue, not a Mutt
configuration issue.  There are easier ways to solve this than by
making settings manually every time you edit a message, though.

Most Linux distributions configure their Vim packages to have
filetype detection on.  If yours does not, you can enable this by
putting the following in your ~/.vimrc.

    filetype on

Then create a new file under your ~/.vim directory,
~/.vim/after/ftplugin/mail.vim.  In that file put the Vim commands
you want executed when you start editing a message.  In your
example, that would be

    setlocal formatoptions-=t

That tells Vim not to auto-wrap text in that buffer.

Then you don't have to think about it anymore.  If that doesn't do
what you want, come back with a description of the problem and we
can help.  It would be better, though, to ask Vim-related questions
on the vim_...@googlegroups.com mailing list.

In Vim's help system, see also

    :help :filetype
    :help 'formatoptions'
    :help 'textwidth'

Regards,
Gary

Reply via email to