summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-03 19:24:41 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-03 19:24:41 +0000
commit800b01b0c8a5983e23d8caa2be6c73d195448193 (patch)
tree0615208527a13a8df9f8e20e2ad9446c02b9b81a /runtime
parent6f42cb6e5159b323814a53bbc82def4f2cfb17ad (diff)
downloadvim-git-800b01b0c8a5983e23d8caa2be6c73d195448193.tar.gz
patch 8.2.3730: "/etc/Muttrc.d/README" gets filetype muttrcv8.2.3730
Problem: "/etc/Muttrc.d/README" gets filetype muttrc. Solution: Move the Muttrc.d pattern down, add exception for *.rc files.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 00711d7b5..705c2dce4 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1123,14 +1123,15 @@ au BufNewFile,BufRead *.msql setf msql
" Mysql
au BufNewFile,BufRead *.mysql setf mysql
-" Mutt setup files (must be before catch *.rc)
-au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
-
" Tcl Shell RC file
au BufNewFile,BufRead tclsh.rc setf tcl
" M$ Resource files
-au BufNewFile,BufRead *.rc,*.rch setf rc
+" /etc/Muttrc.d/file.rc is muttrc
+au BufNewFile,BufRead *.rc,*.rch
+ \ if expand("<afile>") !~ "/etc/Muttrc.d/" |
+ \ setf rc |
+ \ endif
" MuPAD source
au BufRead,BufNewFile *.mu setf mupad
@@ -2286,6 +2287,9 @@ au BufNewFile,BufRead */etc/modutils/*
\|endif
au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf')
+" Mutt setup files (must be before catch *.rc)
+au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
+
" Mutt setup file
au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')