0
I use mutt
for e-mail and I let vim
handle plain text attachments. In my ~/.mailcap
I have
text/plain; view %s ; needsterminal
That works fine, but it removes all syntax highlighting. I often receive source code in attachments, and it'd be great to have syntax highlighting. Is there an option that would allow me to preserve it?
I've also tried vim -R -- %s ; needsterminal
in ~/.mailcap
but the result is the same.
Thanks.
Thanks for the reply but that isn't working for me. Mutt now displays things like
gpg: Good signature, etc.
in color, as those are probably surrounded by ANSI color codes, but still not joy with syntax highlighting in attachments. – Dominique – 2015-05-12T14:43:12.477Unfortunately, superuser is not a good forum for troubleshooting. A number of possible issues come to mind, though. Does the
view
found bymutt
have syntax highlighting? (:version
) Doesview
think it's in a color terminal? (:set term? t_Co?
) Didview
detect the 'filetype'? (:set ft?
) Didview
choose a syntax file? (:echo b:current_syntax?
) Whenview
is displaying an attachment, can it be made to display color at all? (:help colortest.vim
) – garyjohn – 2015-05-12T15:21:20.657When run from the command line,
view
behaves perfectly and has syntax highlighting. There's only oneview
on my system. I suspectmutt
somehow removes the colors. – Dominique – 2015-05-12T15:34:48.580