Bug#475300: vim: slight tweak to detection of "mail" format files

Kevin B. McCarty kmccarty at debian.org
Wed Apr 9 21:19:57 UTC 2008


Package: vim
Version: 1:7.1.291-1
Severity: minor
Tags: patch

Hi,

I find that vim's detection of mbox (filetype "mail") files for syntax
coloring, etc. doesn't work when they are generated by Mozilla
Thunderbird, the reason being that in the From line preceding each
message, Thunderbird apparently puts a "-" rather than an email address.

Example header line in debian-private archive:

From list at liszt.debian.org Tue Apr 01 09:36:16 2008

Example header line in my local mailbox generated by Icedove:

From - Wed Jan 02 08:44:14 2008

The attached, very minor patch to /usr/share/vim/vim71/scripts.vim
allows vim to also realize that Thunderbird's idiosyncratic headers
signal a file in mbox format.

Side note: This is not included in the patch, but also maybe "=~" on the
line changed by the diff should be changed to "=~#" since to the best of
my knowledge, the "From" is case-sensitive.

best regards,

-- 
Kevin B. McCarty <kmccarty at gmail.com>
WWW: http://www.starplot.org/
WWW: http://people.debian.org/~kmccarty/
GPG: public key ID 4F83C751
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scripts.vim.diff
Type: text/x-patch
Size: 372 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080409/31e3bd30/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080409/31e3bd30/attachment-0001.pgp 


More information about the pkg-vim-maintainers mailing list