Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 12-18-2006, 05:04 PM   #1
LQ Newbie
Registered: Sep 2005
Distribution: Arch
Posts: 13

Rep: Reputation: 0
Mutt mysteriously changes/breaks vim settings

I'm new to mutt, seminew to vi[m]. Mutt is version 1.5.12 and vim is version 7, patches 1-118 according to their version statements. Both are running on an Arch Linux system which was installed fresh and fully updated (pacman -Syu) a month ago. A month in I'm liking mutt so far, but like everyone I've got my own opinion on what I want it to do.

The particular thing I'm trying to accomplish is because I'm in a predominantly Microsoft environment. When mutt/vim autowraps my lines it may be the UNIX Way but my emails are awkward to read and Outlook tears them to shreds in replies and forwards. I also tend to do some editing after initially writing a body, so I wind up with insane linebreaks which I haven't hacked vim enough to fix conveniently. I know there's some super paragraph macro {ql:?#boogabooga} or whatever, but long story short I'm not mailing to terminals and I've got this big button on the keyboard for putting in my own linebreaks, thanks very much.

I've made minimal changes to my .vimrc - first I tried
set textwidth=0
and then switched to
set fo=q
during troubleshooting. Both appear to have the same effect for my purposes. This command is the only thing in my ~/.vimrc . When run from the command line, it works the way I want. Lines fill the window and only appear to wrap, and arrow keys and delete work.

Unfortunately, mutt appears to ignore or break this in some way. Here's where it gets somewhat weird.

If I change the editor variable in my ~/.muttrc to just "vi" or "vim", then when sending email A) the launched vim autowraps my lines at 80 columns and B) arrows and delete work OK. If I use the "vim -u ~/.vimrc" option, A) the launched vim properly lets my lines run but B) arrows produce capital A, B, C, D (probably with Ctrl bits which I can't see) and delete in insert mode does its "screw up your case" operation for the first keystroke, then deletes characters properly on all subsequent ones until the next switch to insert mode.

My ~/.muttrc follows.
set folder="~/Mail"
set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="xxxxxxx"
set envelope_from=yes
set move=no
set editor="vim -u ~/.vimrc"
set fast_reply=yes
set sort=threads

fcc-hook .* ~/Mail/SENT
macro index  G "!getmail -v\n" "Invoke getmail"
The final thing I've checked is that I have no ~/.mutt/ to screw things up. Most of the stuff I've found manning and Googling this has to do with people wanting vim to use different settings when called from mutt. I just want it to use the same settings; I can break it myself later, when I've learned more. Any elders' ideas are respectfully solicited.
Old 12-19-2006, 10:21 AM   #2
LQ Newbie
Registered: Sep 2005
Distribution: Arch
Posts: 13

Original Poster
Rep: Reputation: 0
This thread deals with the same problem, but uses the inelegant method of passing all vim settings explicitly from /muttrc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Vim tips: Using Vim mappings and abbreviations LXer Syndicated Linux News 0 06-18-2006 02:54 PM
LXer: Cream for Vim - Making Vim more user friendly LXer Syndicated Linux News 0 06-18-2006 12:54 AM
vim with mutt shellcode Linux - Software 1 08-17-2004 11:52 PM
Strange Vim settings under Slackware 10 Lars79 Slackware 5 08-02-2004 08:50 AM
simple vi (vim) settings lenlutz Linux - General 20 10-04-2003 05:40 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration