Reputation: 7324
If I open a given mail file in ~/maildir-sent/
then file has no syntax highlighting. Vi has default highlighting for mail files, and I can turn this on manually with
:set ft=mail
This doesn't occur by default because mail files there have the awkward name structure 1339174749.7162_2.tm24-s00418:2,S
How do I make mail files highlighting occur by default? I.E. I presume this default reads like "all files that are not matched by another syntax highlight definition"
Upvotes: 3
Views: 1345
Reputation: 59607
Use an autocmd
in your .vimrc:
autocmd BufRead ~/maildir-sent/* setlocal ft=mail
See :help autcmd
for more information.
Upvotes: 7