On 7/26/06, mwoehlke <[EMAIL PROTECTED]> wrote:
Gary Johnson wrote:
> I noticed recently that vim does not always set 'filetype' to "mail"
> when I edit mutt temporary files, e.g., postponed messages.  I
> traced the problem to mutt's use of mktemp() with the pattern
> "muttXXXXXX".  I don't know about other OSs, but mktemp() on SunOS
> 5.8 replaces those Xs with characters from the POSIX portable
> filename character set:
>     A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
>     a b c d e f g h i j k l m n o p q r s t u v w x y z
>     0 1 2 3 4 5 6 7 8 9 . _ -
> The pattern used in filetype.vim to match file names of this form is
>     mutt\w\{6\}
> The "\w" character class does not include the characters '.' or '-'.
> I replaced that pattern with this one:
>     mutt[[:alnum:]._-]\{6\}
> I was surprised that [:alnum:] worked in the context of an
> autocommand filename pattern.  I didn't want to use "\f" because it
> included too much.
> A patch is attached.  I have posted it here rather than sending it
> to Bram directly to allow others to comment in case I missed
> something.

Ok, you asked for comments :-).
What's wrong with:

I think \w is not recognized inside [].


Reply via email to