summaryrefslogtreecommitdiffstats
path: root/runtime/filetype.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/filetype.vim')
-rw-r--r--runtime/filetype.vim27
1 files changed, 19 insertions, 8 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index cc4faf72e3..89370f79ce 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2019 Mar 19
+" Last Change: 2019 Mar 26
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -42,6 +42,8 @@ endif
" Function used for patterns that end in a star: don't set the filetype if the
" file name matches ft_ignore_pat.
+" When using this, the entry should probably be further down below with the
+" other StarSetf() calls.
func! s:StarSetf(ft)
if expand("<amatch>") !~ g:ft_ignore_pat
exe 'setf ' . a:ft
@@ -95,9 +97,6 @@ au BufNewFile,BufRead build.xml setf ant
" Arduino
au BufNewFile,BufRead *.ino,*.pde setf arduino
-" Apache style config file
-au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
-
" Apache config file
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache
@@ -655,7 +654,6 @@ au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
" Gitolite
au BufNewFile,BufRead gitolite.conf setf gitolite
-au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Gnuplot scripts
@@ -804,7 +802,6 @@ au BufNewFile,BufRead *.jsp setf jsp
" Java Properties resource file (note: doesn't catch font.properties.pl)
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
-au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
" Jess
au BufNewFile,BufRead *.clp setf jess
@@ -1462,7 +1459,6 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec
" SGML catalog file
au BufNewFile,BufRead catalog setf catalog
-au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
@@ -1743,7 +1739,6 @@ au BufNewFile,BufRead *.sv,*.svh setf systemverilog
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
-au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
" Vim script
au BufNewFile,BufRead *.vim,*.vba,.exrc,_exrc setf vim
@@ -1956,6 +1951,7 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
" More Apache style config files
au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle')
+au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
" More Apache config files
au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
@@ -2012,6 +2008,12 @@ au BufNewFile,BufRead *fvwm2rc*
" Gedcom
au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
+" Git
+au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig')
+
+" Gitolite
+au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
+
" GTK RC
au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
@@ -2024,6 +2026,9 @@ au! BufNewFile,BufRead *jarg*
\| call s:StarSetf('jargon')
\|endif
+" Java Properties resource file (note: doesn't catch font.properties.pl)
+au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
+
" Kconfig
au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
@@ -2085,6 +2090,9 @@ au BufRead,BufNewFile *.rdf call dist#ft#Redif()
" Remind
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
+" SGML catalog file
+au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
+
" Shell scripts ending in a star
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
@@ -2096,6 +2104,9 @@ au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
" csh scripts ending in a star
au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
+" VHDL
+au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
+
" Vim script
au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')