0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00
vim/runtime/filetype.vim

3176 lines
84 KiB
VimL
Raw Normal View History

2004-06-13 20:20:40 +00:00
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Dec 06
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
2004-06-13 20:20:40 +00:00
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
finish
endif
let did_load_filetypes = 1
" Line continuation is used here, remove 'C' from 'cpoptions'
let s:cpo_save = &cpo
set cpo&vim
augroup filetypedetect
" Ignored extensions
2008-05-28 14:49:58 +00:00
if exists("*fnameescape")
2016-04-30 15:13:38 +02:00
au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew
2008-05-28 14:49:58 +00:00
\ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r"))
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *~
\ let s:name = expand("<afile>") |
\ let s:short = substitute(s:name, '\~\+$', '', '') |
2004-06-13 20:20:40 +00:00
\ if s:name != s:short && s:short != "" |
2008-05-28 14:49:58 +00:00
\ exe "doau filetypedetect BufRead " . fnameescape(s:short) |
2004-06-13 20:20:40 +00:00
\ endif |
2008-08-06 17:06:04 +00:00
\ unlet! s:name s:short
2005-09-25 22:16:38 +00:00
au BufNewFile,BufRead ?\+.in
2004-06-13 20:20:40 +00:00
\ if expand("<afile>:t") != "configure.in" |
2008-05-28 14:49:58 +00:00
\ exe "doau filetypedetect BufRead " . fnameescape(expand("<afile>:r")) |
2004-06-13 20:20:40 +00:00
\ endif
2008-05-28 14:49:58 +00:00
elseif &verbose > 0
echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()"
endif
2004-06-13 20:20:40 +00:00
" Pattern used to match file names which should not be inspected.
" Currently finds compressed files.
if !exists("g:ft_ignore_pat")
let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
endif
2005-03-18 20:25:31 +00:00
" Function used for patterns that end in a star: don't set the filetype if the
" file name matches ft_ignore_pat.
2019-04-04 13:11:03 +02:00
" When using this, the entry should probably be further down below with the
" other StarSetf() calls.
func s:StarSetf(ft)
2005-03-18 20:25:31 +00:00
if expand("<amatch>") !~ g:ft_ignore_pat
exe 'setf ' . a:ft
endif
2007-05-10 18:44:18 +00:00
endfunc
2005-03-18 20:25:31 +00:00
" Vim help file
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
2004-06-13 20:20:40 +00:00
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
2004-06-13 20:20:40 +00:00
2019-02-17 21:18:32 +01:00
" 8th (Firth-derivative)
au BufNewFile,BufRead *.8th setf 8th
2004-06-13 20:20:40 +00:00
" A-A-P recipe
au BufNewFile,BufRead *.aap setf aap
2005-07-04 22:49:24 +00:00
" A2ps printing utility
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps
2005-07-04 22:49:24 +00:00
2004-09-02 19:12:26 +00:00
" ABAB/4
au BufNewFile,BufRead *.abap setf abap
2004-06-13 20:20:40 +00:00
" ABC music notation
au BufNewFile,BufRead *.abc setf abc
" ABEL
au BufNewFile,BufRead *.abl setf abel
" AceDB
au BufNewFile,BufRead *.wrm setf acedb
" Ada (83, 9X, 95)
au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada
2007-05-05 18:24:42 +00:00
if has("vms")
2008-07-18 10:54:50 +00:00
au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada
2007-05-05 18:24:42 +00:00
else
2008-07-18 10:54:50 +00:00
au BufNewFile,BufRead *.gpr setf ada
2007-05-05 18:24:42 +00:00
endif
2004-06-13 20:20:40 +00:00
" AHDL
au BufNewFile,BufRead *.tdf setf ahdl
" AIDL
au BufNewFile,BufRead *.aidl setf aidl
2004-06-13 20:20:40 +00:00
" AMPL
au BufNewFile,BufRead *.run setf ampl
" Ant
au BufNewFile,BufRead build.xml setf ant
2014-01-07 06:09:28 +01:00
" Arduino
au BufNewFile,BufRead *.ino,*.pde setf arduino
" Ash of busybox
au BufNewFile,BufRead .ash_history setf sh
2004-06-13 20:20:40 +00:00
" Apache config file
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache
2019-02-03 15:27:20 +01:00
au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache
2004-06-13 20:20:40 +00:00
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65
2010-01-06 20:54:52 +01:00
" Applescript
au BufNewFile,BufRead *.scpt setf applescript
" Automake (must be before the *.am pattern)
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
2004-06-13 20:20:40 +00:00
" Applix ELF
au BufNewFile,BufRead *.am setf elf
2004-06-13 20:20:40 +00:00
2004-09-13 20:26:32 +00:00
" ALSA configuration
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
2004-09-13 20:26:32 +00:00
2004-06-13 20:20:40 +00:00
" Arc Macro Language
au BufNewFile,BufRead *.aml setf aml
2012-10-05 22:26:30 +02:00
" APT config file
au BufNewFile,BufRead apt.conf setf aptconf
2012-10-05 22:26:30 +02:00
au BufNewFile,BufRead */.aptitude/config setf aptconf
" more generic pattern far down
2012-10-05 22:26:30 +02:00
2004-06-13 20:20:40 +00:00
" Arch Inventory file
au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch
" ART*Enterprise (formerly ART-IM)
au BufNewFile,BufRead *.art setf art
2013-03-19 11:35:58 +01:00
" AsciiDoc
2015-09-25 20:34:21 +02:00
au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc
2013-03-19 11:35:58 +01:00
2004-06-13 20:20:40 +00:00
" ASN.1
au BufNewFile,BufRead *.asn,*.asn1 setf asn
" Active Server Pages (with Visual Basic Script)
au BufNewFile,BufRead *.asa
\ if exists("g:filetype_asa") |
\ exe "setf " . g:filetype_asa |
\ else |
\ setf aspvbs |
\ endif
" Active Server Pages (with Perl or Visual Basic Script)
au BufNewFile,BufRead *.asp
\ if exists("g:filetype_asp") |
\ exe "setf " . g:filetype_asp |
\ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" |
\ setf aspperl |
\ else |
\ setf aspvbs |
\ endif
" Grub (must be before pattern *.lst)
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub
2004-06-13 20:20:40 +00:00
" Maxima, see:
" https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima
" Must be before the pattern *.mac.
" *.dem omitted - also used by gnuplot demos
" *.mc omitted - used by dist#ft#McSetf()
au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
2004-06-13 20:20:40 +00:00
" Assembly (all kinds)
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
2004-06-13 20:20:40 +00:00
" Assembly - Macro (VAX)
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.mar setf vmasm
" Astro
au BufNewFile,BufRead *.astro setf astro
2004-06-13 20:20:40 +00:00
" Atlas
au BufNewFile,BufRead *.atl,*.as setf atlas
" Atom is based on XML
au BufNewFile,BufRead *.atom setf xml
" Authzed
au BufNewFile,BufRead *.zed setf authzed
2007-05-05 18:24:42 +00:00
" Autoit v3
au BufNewFile,BufRead *.au3 setf autoit
2007-05-10 18:44:18 +00:00
" Autohotkey
au BufNewFile,BufRead *.ahk setf autohotkey
2005-06-29 22:40:58 +00:00
" Autotest .at files are actually m4
au BufNewFile,BufRead *.at setf m4
2004-06-13 20:20:40 +00:00
" Avenue
au BufNewFile,BufRead *.ave setf ave
" Awk
au BufNewFile,BufRead *.awk,*.gawk setf awk
2004-06-13 20:20:40 +00:00
" B
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
" BASIC or Visual Basic
au BufNewFile,BufRead *.bas call dist#ft#FTbas()
au BufNewFile,BufRead *.bi,*.bm call dist#ft#FTbas()
2004-06-13 20:20:40 +00:00
" Bass
au BufNewFile,BufRead *.bass setf bass
2007-05-05 18:24:42 +00:00
" IBasic file (similar to QBasic)
au BufNewFile,BufRead *.iba,*.ibi setf ibasic
" FreeBasic file (similar to QBasic)
au BufNewFile,BufRead *.fb setf freebasic
2007-05-05 18:24:42 +00:00
" Batch file for MSDOS. See dist#ft#FTsys for *.sys
au BufNewFile,BufRead *.bat setf dosbatch
2004-06-13 20:20:40 +00:00
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
au BufNewFile,BufRead *.cmd
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
" ABB RAPID or Batch file for MSDOS.
au BufNewFile,BufRead *.sys\c call dist#ft#FTsys()
2004-06-13 20:20:40 +00:00
" Batch file for 4DOS
au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
2004-06-13 20:20:40 +00:00
" BC calculator
au BufNewFile,BufRead *.bc setf bc
" BDF font
au BufNewFile,BufRead *.bdf setf bdf
" Beancount
au BufNewFile,BufRead *.beancount setf beancount
2004-06-13 20:20:40 +00:00
" BibTeX bibliography database file
au BufNewFile,BufRead *.bib setf bib
2006-04-27 21:47:44 +00:00
" BibTeX Bibliography Style
au BufNewFile,BufRead *.bst setf bst
" Bicep
au BufNewFile,BufRead *.bicep,*.bicepparam setf bicep
2004-06-13 20:20:40 +00:00
" BIND configuration
2017-03-29 13:48:40 +02:00
" sudoedit uses namedXXXX.conf
2017-11-02 22:58:42 +01:00
au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
2004-06-13 20:20:40 +00:00
" BIND zone
au BufNewFile,BufRead named.root setf bindzone
au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
2004-06-13 20:20:40 +00:00
" Blade
au BufNewFile,BufRead *.blade.php setf blade
2004-06-13 20:20:40 +00:00
" Blank
au BufNewFile,BufRead *.bl setf blank
" Bitbake
au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/conf/*.conf setf bitbake
2008-07-18 10:54:50 +00:00
" Blkid cache file
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
2008-07-18 10:54:50 +00:00
" BSDL
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
" Bazel (https://bazel.build) and Buck2 (https://buck2.build/)
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod setf bzl
2017-01-10 13:31:15 +01:00
if has("fname_case")
" There is another check for BUILD and BUCK further below.
autocmd BufRead,BufNewFile *.BUILD,BUILD,BUCK setf bzl
2017-01-10 13:31:15 +01:00
endif
2015-10-13 23:21:27 +02:00
" Busted (Lua unit testing framework - configuration files)
au BufNewFile,BufRead .busted setf lua
" Bundle config
au BufNewFile,BufRead */.bundle/config setf yaml
2004-06-13 20:20:40 +00:00
" C or lpc
au BufNewFile,BufRead *.c call dist#ft#FTlpc()
2018-01-28 22:47:25 +01:00
au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
2004-06-13 20:20:40 +00:00
" Cairo
au BufNewFile,BufRead *.cairo setf cairo
2004-06-13 20:20:40 +00:00
" Calendar
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead calendar setf calendar
2004-06-13 20:20:40 +00:00
" Cap'n Proto
au BufNewFile,BufRead *.capnp setf capnp
" Cgdb config file
au BufNewFile,BufRead cgdbrc setf cgdbrc
2004-06-13 20:20:40 +00:00
" C#
au BufNewFile,BufRead *.cs,*.csx setf cs
2004-06-13 20:20:40 +00:00
2013-03-07 13:20:54 +01:00
" CSDL
au BufNewFile,BufRead *.csdl setf csdl
" Ctags
au BufNewFile,BufRead *.ctags setf conf
2010-05-14 23:24:24 +02:00
" Cabal
2011-03-22 14:05:35 +01:00
au BufNewFile,BufRead *.cabal setf cabal
2010-05-14 23:24:24 +02:00
" Cdrdao TOC or LaTeX \tableofcontents files
au BufNewFile,BufRead *.toc
\ if getline(1) =~# '\\contentsline' |setf tex|else|setf cdrtoc|endif
2007-05-10 18:44:18 +00:00
2008-06-25 20:13:35 +00:00
" Cdrdao config
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf
2008-06-25 20:13:35 +00:00
2005-10-12 20:58:49 +00:00
" Cfengine
au BufNewFile,BufRead cfengine.conf setf cfengine
2010-05-14 23:24:24 +02:00
" ChaiScript
au BufRead,BufNewFile *.chai setf chaiscript
" Chatito
au BufNewFile,BufRead *.chatito setf chatito
" Chktex
au BufRead,BufNewFile .chktexrc setf conf
" Chuck
au BufNewFile,BufRead *.ck setf chuck
2004-06-13 20:20:40 +00:00
" Comshare Dimension Definition Language
au BufNewFile,BufRead *.cdl setf cdl
2007-05-05 18:24:42 +00:00
" Conary Recipe
au BufNewFile,BufRead *.recipe setf conaryrecipe
" Corn config file
au BufNewFile,BufRead *.corn setf corn
" ChainPack Object Notation (CPON)
au BufNewFile,BufRead *.cpon setf cpon
2004-06-13 20:20:40 +00:00
" Controllable Regex Mutilator
au BufNewFile,BufRead *.crm setf crm
" Cyn++
au BufNewFile,BufRead *.cyn setf cynpp
" Cynlib
" .cc and .cpp files can be C++ or Cynlib.
au BufNewFile,BufRead *.cc
\ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif
au BufNewFile,BufRead *.cpp
\ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif
" Cypher query language
au BufNewFile,BufRead *.cypher setf cypher
2004-06-13 20:20:40 +00:00
" C++
2010-01-06 20:54:52 +01:00
au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp
2004-06-13 20:20:40 +00:00
if has("fname_case")
au BufNewFile,BufRead *.C,*.H if !&fileignorecase | setf cpp | endif
2004-06-13 20:20:40 +00:00
endif
" C++ 20 modules (clang)
" https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirement
au BufNewFile,BufRead *.cppm,*.ccm,*.cxxm,*.c++m setf cpp
2008-06-25 20:13:35 +00:00
" .h files can be C, Ch C++, ObjC or ObjC++.
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
" detected automatically.
au BufNewFile,BufRead *.h call dist#ft#FTheader()
2004-06-13 20:20:40 +00:00
" Ch (CHscript)
au BufNewFile,BufRead *.chf setf ch
" TLH files are C++ headers generated by Visual C++'s #import from typelibs
au BufNewFile,BufRead *.tlh setf cpp
" Cascading Style Sheets
au BufNewFile,BufRead *.css setf css
" Century Term Command Scripts (*.cmd too)
au BufNewFile,BufRead *.con setf cterm
" Changelog
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
2006-03-26 21:06:50 +00:00
\ setf debchangelog
au BufNewFile,BufRead [cC]hange[lL]og
\ if getline(1) =~ '; urgency='
\| setf debchangelog
\| else
\| setf changelog
\| endif
au BufNewFile,BufRead NEWS
\ if getline(1) =~ '; urgency='
\| setf debchangelog
\| endif
2004-06-13 20:20:40 +00:00
" CHILL
au BufNewFile,BufRead *..ch setf chill
" Changes for WEB and CWEB or CHILL
au BufNewFile,BufRead *.ch call dist#ft#FTchange()
2004-06-13 20:20:40 +00:00
2006-04-21 22:12:41 +00:00
" ChordPro
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
" Clangd
au BufNewFile,BufRead .clangd setf yaml
" Clang-format
au BufNewFile,BufRead .clang-format setf yaml
" Clang-tidy
au BufNewFile,BufRead .clang-tidy setf yaml
" Matplotlib
au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml
2004-06-13 20:20:40 +00:00
" Clean
au BufNewFile,BufRead *.dcl,*.icl setf clean
" Clever
au BufNewFile,BufRead *.eni setf cl
" Clever or dtd
au BufNewFile,BufRead *.ent call dist#ft#FTent()
2004-06-13 20:20:40 +00:00
" Cling
au BufNewFile,BufRead .cling_history setf cpp
" Clipper, FoxPro, ABB RAPID or eviews
au BufNewFile,BufRead *.prg\c call dist#ft#FTprg()
2004-06-13 20:20:40 +00:00
2013-02-06 17:34:04 +01:00
" Clojure
2015-06-09 19:44:55 +02:00
au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure
2013-02-06 17:34:04 +01:00
2006-04-18 21:55:01 +00:00
" Cmake
au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake
" CmakeCache
autocmd BufRead,BufNewFile CMakeCache.txt setf cmakecache
2007-05-05 18:24:42 +00:00
" Cmusrc
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc
2007-05-05 18:24:42 +00:00
au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc
2004-06-13 20:20:40 +00:00
" Cobol
2006-03-26 21:06:50 +00:00
au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol
" cobol or zope form controller python script? (heuristic)
au BufNewFile,BufRead *.cpy
\ if getline(1) =~ '^##' |
\ setf python |
\ else |
\ setf cobol |
\ endif
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" Coco/R
au BufNewFile,BufRead *.atg setf coco
2004-06-13 20:20:40 +00:00
" Cold Fusion
au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
" Configure scripts
au BufNewFile,BufRead configure.in,configure.ac setf config
" Cooklang
au BufNewFile,BufRead *.cook setf cook
" Clinical Quality Language (CQL)
" .cql is also mentioned as the 'XDCC Catcher queue list' file extension.
" If support for XDCC Catcher is needed in the future, the contents of the file
" needs to be inspected.
au BufNewFile,BufRead *.cql setf cqlang
" Crystal
au BufNewFile,BufRead *.cr setf crystal
" CSV Files
au BufNewFile,BufRead *.csv setf csv
" CUDA Compute Unified Device Architecture
2018-01-28 22:47:25 +01:00
au BufNewFile,BufRead *.cu,*.cuh setf cuda
2008-06-25 20:13:35 +00:00
" Cue
au BufNewFile,BufRead *.cue setf cue
" Dockerfile; Podman uses the same syntax with name Containerfile
" Also see Dockerfile.* below.
au BufNewFile,BufRead Containerfile,Dockerfile,dockerfile,*.[dD]ockerfile setf dockerfile
2014-08-29 15:12:19 +02:00
2004-06-13 20:20:40 +00:00
" WildPackets EtherPeek Decoder
au BufNewFile,BufRead *.dcd setf dcd
" Enlightenment configuration files
au BufNewFile,BufRead *enlightenment/*.cfg setf c
" Eterm
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
" Elixir or Euphoria
au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
" Elixir
au BufRead,BufNewFile mix.lock,*.exs setf elixir
au BufRead,BufNewFile *.eex,*.leex setf eelixir
" Elvish
au BufRead,BufNewFile *.elv setf elvish
" Euphoria 3 or 4
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
if has("fname_case")
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
endif
" Execline (s6) scripts
au BufNewFile,BufRead *s6*/\(up\|down\|run\|finish\) setf execline
au BufNewFile,BufRead s6-* setf execline
" Fontconfig config files
au BufNewFile,BufRead fonts.conf setf xml
" Libreoffice config files
au BufNewFile,BufRead *.xcu,*.xlb,*.xlc,*.xba setf xml
au BufNewFile,BufRead psprint.conf,sofficerc setf dosini
2004-06-13 20:20:40 +00:00
" Lynx config files
au BufNewFile,BufRead lynx.cfg setf lynx
" LyRiCs
au BufNewFile,BufRead *.lrc setf lyrics
" Modula-3 configuration language (must be before *.cfg and *makefile)
au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake
au BufNewFile,BufRead m3makefile,m3overrides setf m3build
" XDG mimeapps.list
au BufNewFile,BufRead mimeapps.list setf dosini
" Many tools written in Python use dosini as their config
" like setuptools, pudb, coverage, pypi, gitlint, oelint-adv, pylint, bpython, mypy
" (must be before *.cfg)
au BufNewFile,BufRead pip.conf,setup.cfg,pudb.cfg,.coveragerc,.pypirc,.gitlint,.oelint.cfg setf dosini
au BufNewFile,BufRead {.,}pylintrc,*/bpython/config,*/mypy/config setf dosini
" Many tools written in Python use toml as their config, like black
au BufNewFile,BufRead .black setf toml
au BufNewFile,BufRead black
\ if getline(1) =~ 'tool.back'
\| setf toml
\| endif
" LXQt's programs use dosini as their config
au BufNewFile,BufRead */{lxqt,screengrab}/*.conf setf dosini
2004-06-13 20:20:40 +00:00
" Quake
au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
" Quake C
au BufNewFile,BufRead *.qc setf c
" LaTeX packages use LaTeX as their configuration, such as:
" ~/.texlive/texmf-config/tex/latex/hyperref/hyperref.cfg
" ~/.texlive/texmf-config/tex/latex/docstrip/docstrip.cfg
au BufNewFile,BufRead */tex/latex/**.cfg setf tex
" Wakatime config
au BufNewFile,BufRead .wakatime.cfg setf dosini
2004-06-13 20:20:40 +00:00
" Configure files
au BufNewFile,BufRead *.cfg\c call dist#ft#FTcfg()
2004-06-13 20:20:40 +00:00
" Cucumber
2011-03-22 14:05:35 +01:00
au BufNewFile,BufRead *.feature setf cucumber
2004-06-13 20:20:40 +00:00
" Communicating Sequential Processes
au BufNewFile,BufRead *.csp,*.fdr setf csp
" CUPL logic description and simulation
au BufNewFile,BufRead *.pld setf cupl
au BufNewFile,BufRead *.si setf cuplsim
" Dafny
au BufNewFile,BufRead *.dfy setf dafny
" Dart
au BufRead,BufNewfile *.dart,*.drt setf dart
2004-06-13 20:20:40 +00:00
" Debian Control
au BufNewFile,BufRead */debian/control setf debcontrol
2008-06-25 20:13:35 +00:00
au BufNewFile,BufRead control
\ if getline(1) =~ '^Source:'
\| setf debcontrol
\| endif
2004-06-13 20:20:40 +00:00
2018-05-06 17:57:30 +02:00
" Debian Copyright
au BufNewFile,BufRead */debian/copyright setf debcopyright
au BufNewFile,BufRead copyright
\ if getline(1) =~ '^Format:'
\| setf debcopyright
\| endif
2006-03-28 21:08:56 +00:00
" Debian Sources.list
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/apt/sources.list setf debsources
au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources
au BufNewFile,BufRead */etc/apt/sources.list.d/*.sources setf deb822sources
2006-03-28 21:08:56 +00:00
2008-06-25 20:13:35 +00:00
" Deny hosts
au BufNewFile,BufRead denyhosts.conf setf denyhosts
" Dhall
au BufNewFile,BufRead *.dhall setf dhall
2011-04-28 19:02:44 +02:00
" dnsmasq(8) configuration files
2011-05-19 12:22:51 +02:00
au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
2011-04-28 19:02:44 +02:00
2004-06-13 20:20:40 +00:00
" ROCKLinux package description
au BufNewFile,BufRead *.desc setf desc
2008-06-25 20:13:35 +00:00
" the D language or dtrace
au BufNewFile,BufRead */dtrace/*.d setf dtrace
au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
2004-06-13 20:20:40 +00:00
" Desktop files
au BufNewFile,BufRead *.desktop,*.directory setf desktop
2004-06-13 20:20:40 +00:00
2005-07-04 22:49:24 +00:00
" Dict config
au BufNewFile,BufRead dict.conf,.dictrc setf dictconf
" Dictd config
au BufNewFile,BufRead dictd*.conf setf dictdconf
2005-07-04 22:49:24 +00:00
" DEP3 formatted patch files
au BufNewFile,BufRead */debian/patches/* call dist#ft#Dep3patch()
2004-06-13 20:20:40 +00:00
" Diff files
au BufNewFile,BufRead *.diff,*.rej setf diff
au BufNewFile,BufRead *.patch
\ if getline(1) =~# '^From [0-9a-f]\{40,\} Mon Sep 17 00:00:00 2001$' |
\ setf gitsendemail |
\ else |
\ setf diff |
\ endif
2004-06-13 20:20:40 +00:00
" Dircolors
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors
2004-06-13 20:20:40 +00:00
" Diva (with Skill) or InstallShield
au BufNewFile,BufRead *.rul
\ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' |
\ setf ishd |
\ else |
\ setf diva |
\ endif
" DCL (Digital Command Language - vms) or DNS zone file
au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
2004-06-13 20:20:40 +00:00
" DOT
au BufNewFile,BufRead *.dot,*.gv setf dot
2004-06-13 20:20:40 +00:00
" Dune
au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune
2004-06-13 20:20:40 +00:00
" Dylan - lid files
au BufNewFile,BufRead *.lid setf dylanlid
" Dylan - intr files (melange)
au BufNewFile,BufRead *.intr setf dylanintr
" Dylan
au BufNewFile,BufRead *.dylan setf dylan
" Microsoft Module Definition or Modula-2
au BufNewFile,BufRead *.def call dist#ft#FTdef()
if has("fname_case")
au BufNewFile,BufRead *.DEF setf modula2
endif
2004-06-13 20:20:40 +00:00
" Dracula
au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula
" Datascript
au BufNewFile,BufRead *.ds setf datascript
" dsl: DSSSL or Structurizr
au BufNewFile,BufRead *.dsl
\ if getline(1) =~ '^\s*<\!' |
\ setf dsl |
\ else |
\ setf structurizr |
\ endif
2004-06-13 20:20:40 +00:00
" DTD (Document Type Definition for XML)
au BufNewFile,BufRead *.dtd setf dtd
" DTS/DSTI/DTSO (device tree files)
au BufNewFile,BufRead *.dts,*.dtsi,*.dtso,*.its,*.keymap setf dts
2012-10-03 21:46:54 +02:00
" Earthfile
au BufNewFile,BufRead Earthfile setf earthfile
2017-01-17 12:22:32 +01:00
" EDIF (*.edf,*.edif,*.edn,*.edo) or edn
au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif
au BufNewFile,BufRead *.edn
\ if getline(1) =~ '^\s*(\s*edif\>' |
\ setf edif |
\ else |
\ setf clojure |
\ endif
2004-06-13 20:20:40 +00:00
" EditorConfig
au BufNewFile,BufRead .editorconfig setf editorconfig
2016-09-16 20:02:31 +02:00
2004-06-13 20:20:40 +00:00
" Embedix Component Description
au BufNewFile,BufRead *.ecd setf ecd
2014-03-08 18:38:28 +01:00
" Eiffel or Specman or Euphoria
au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
2004-06-13 20:20:40 +00:00
" Elinks configuration
au BufNewFile,BufRead elinks.conf setf elinks
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" ERicsson LANGuage; Yaws is erlang too
2008-07-13 17:41:49 +00:00
au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang
2004-06-13 20:20:40 +00:00
" Elm
au BufNewFile,BufRead *.elm setf elm
2004-06-13 20:20:40 +00:00
" Elm Filter Rules file
au BufNewFile,BufRead filter-rules setf elmfilt
" Elsa - https://github.com/ucsd-progsys/elsa
au BufNewFile,BufRead *.lc setf elsa
" EdgeDB Schema Definition Language
au BufNewFile,BufRead *.esdl setf esdl
2005-02-22 08:49:11 +00:00
" ESMTP rc file
au BufNewFile,BufRead *esmtprc setf esmtprc
2004-06-13 20:20:40 +00:00
" ESQL-C
au BufNewFile,BufRead *.ec,*.EC setf esqlc
2005-05-20 21:27:20 +00:00
" Esterel
au BufNewFile,BufRead *.strl setf esterel
2004-06-13 20:20:40 +00:00
" Essbase script
au BufNewFile,BufRead *.csc setf csc
" Exim
au BufNewFile,BufRead exim.conf setf exim
" Expect
au BufNewFile,BufRead *.exp setf expect
" Exports
au BufNewFile,BufRead exports setf exports
2010-09-30 21:47:56 +02:00
" Falcon
2011-03-22 14:05:35 +01:00
au BufNewFile,BufRead *.fal setf falcon
2010-09-30 21:47:56 +02:00
" Fantom
au BufNewFile,BufRead *.fan,*.fwt setf fan
2005-06-16 21:59:56 +00:00
" Factor
au BufNewFile,BufRead *.factor setf factor
" Fennel
autocmd BufRead,BufNewFile *.fnl setf fennel
2004-06-13 20:20:40 +00:00
" Fetchmail RC file
au BufNewFile,BufRead .fetchmailrc setf fetchmail
" FIRRTL - Flexible Internal Representation for RTL
au BufNewFile,BufRead *.fir setf firrtl
" Fish shell
au BufNewFile,BufRead *.fish setf fish
" Flatpak config
au BufNewFile,BufRead */flatpak/repo/config setf dosini
2010-01-06 20:54:52 +01:00
" FlexWiki - disabled, because it has side effects when a .wiki file
" is not actually FlexWiki
"au BufNewFile,BufRead *.wiki setf flexwiki
2006-04-27 21:47:44 +00:00
2004-06-13 20:20:40 +00:00
" Focus Executable
au BufNewFile,BufRead *.fex,*.focexec setf focexec
" Focus Master file (but not for auto.master)
au BufNewFile,BufRead auto.master setf conf
au BufNewFile,BufRead *.mas,*.master setf master
" Forth
au BufNewFile,BufRead *.ft,*.fth,*.4th setf forth
2008-06-25 20:13:35 +00:00
" Reva Forth
au BufNewFile,BufRead *.frt setf reva
2004-06-13 20:20:40 +00:00
" Fortran
2007-05-05 18:24:42 +00:00
if has("fname_case")
au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran
2007-05-05 18:24:42 +00:00
endif
au BufNewFile,BufRead *.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran
" Fortran or Forth
au BufNewFile,BufRead *.f call dist#ft#FTf()
2004-06-13 20:20:40 +00:00
2008-08-06 17:06:04 +00:00
" Framescript
au BufNewFile,BufRead *.fsl setf framescript
2004-06-13 20:20:40 +00:00
" FStab
2006-04-05 20:41:53 +00:00
au BufNewFile,BufRead fstab,mtab setf fstab
2004-06-13 20:20:40 +00:00
" Func
au BufNewFile,BufRead *.fc setf func
" Fusion
au BufRead,BufNewFile *.fusion setf fusion
" F# or Forth
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
" FHIR Shorthand (FSH)
au BufNewFile,BufRead *.fsh setf fsh
" F#
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
2004-06-13 20:20:40 +00:00
" GDB command files
au BufNewFile,BufRead .gdbinit,gdbinit,.gdbearlyinit,gdbearlyinit,*.gdb setf gdb
2004-06-13 20:20:40 +00:00
" GDMO
au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
" GDscript
au BufNewFile,BufRead *.gd setf gdscript
" Godot resource
au BufRead,BufNewFile *.tscn,*.tres setf gdresource
" Godot shader
au BufRead,BufNewFile *.gdshader,*.shader setf gdshader
2004-06-13 20:20:40 +00:00
" Gedcom
2010-01-06 20:54:52 +01:00
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
2004-06-13 20:20:40 +00:00
" Gemtext
au BufNewFile,BufRead *.gmi,*.gemini setf gemtext
" Gift (Moodle)
autocmd BufRead,BufNewFile *.gift setf gift
2008-06-25 20:13:35 +00:00
" Git
2020-06-21 22:12:03 +02:00
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
au BufNewFile,BufRead NOTES_EDITMSG,EDIT_DESCRIPTION setf gitcommit
au BufNewFile,BufRead *.git/config,.gitconfig,*/etc/gitconfig setf gitconfig
au BufNewFile,BufRead */.config/git/config setf gitconfig
au BufNewFile,BufRead *.git/config.worktree setf gitconfig
au BufNewFile,BufRead *.git/worktrees/*/config.worktree setf gitconfig
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
if exists('$XDG_CONFIG_HOME')
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/attributes setf gitattributes
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/ignore setf gitignore
2014-11-05 17:02:17 +01:00
endif
au BufNewFile,BufRead .gitattributes,*.git/info/attributes setf gitattributes
au BufNewFile,BufRead */.config/git/attributes setf gitattributes
au BufNewFile,BufRead */etc/gitattributes setf gitattributes
au BufNewFile,BufRead .gitignore,*.git/info/exclude setf gitignore
au BufNewFile,BufRead */.config/git/ignore setf gitignore
au BufNewFile,BufRead git-rebase-todo setf gitrebase
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
2013-08-03 18:35:36 +02:00
au BufNewFile,BufRead *.git/*
\ if getline(1) =~# '^\x\{40,\}\>\|^ref: ' |
2008-06-25 20:13:35 +00:00
\ setf git |
\ endif
2004-06-13 20:20:40 +00:00
" Gkrellmrc
au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
" Gleam
au BufNewFile,BufRead *.gleam setf gleam
" GLSL
au BufNewFile,BufRead *.glsl setf glsl
" GN (generate ninja) files
au BufNewFile,BufRead *.gn,*.gni setf gn
2004-06-13 20:20:40 +00:00
" GP scripts (2.0 and onward)
2006-04-12 21:52:12 +00:00
au BufNewFile,BufRead *.gp,.gprc setf gp
2004-06-13 20:20:40 +00:00
" GPG
au BufNewFile,BufRead */.gnupg/options setf gpg
au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
2013-08-03 18:35:36 +02:00
au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
2016-09-22 22:33:02 +02:00
if !empty($GNUPGHOME)
au BufNewFile,BufRead $GNUPGHOME/options setf gpg
au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg
endif
2011-04-28 19:02:44 +02:00
" gnash(1) configuration files
au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
2004-06-13 20:20:40 +00:00
2011-10-20 22:22:38 +02:00
" Gitolite
au BufNewFile,BufRead gitolite.conf setf gitolite
2013-03-19 11:35:58 +01:00
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
2011-10-20 22:22:38 +02:00
" Glimmer-flavored TypeScript and JavaScript
au BufNewFile,BufRead *.gts setf typescript.glimmer
au BufNewFile,BufRead *.gjs setf javascript.glimmer
2004-06-13 20:20:40 +00:00
" Gnuplot scripts
au BufNewFile,BufRead *.gpi,*.gnuplot,.gnuplot_history setf gnuplot
2004-06-13 20:20:40 +00:00
2014-08-22 19:21:47 +02:00
" Go (Google)
au BufNewFile,BufRead *.go setf go
au BufNewFile,BufRead Gopkg.lock setf toml
au BufRead,BufNewFile go.work setf gowork
2014-08-22 19:21:47 +02:00
2004-06-13 20:20:40 +00:00
" GrADS scripts
au BufNewFile,BufRead *.gs setf grads
" GraphQL
au BufNewFile,BufRead *.graphql,*.graphqls,*.gql setf graphql
2006-01-12 23:22:24 +00:00
" Gretl
au BufNewFile,BufRead *.gretl setf gretl
2004-06-13 20:20:40 +00:00
" Groovy
au BufNewFile,BufRead *.gradle,*.groovy,Jenkinsfile setf groovy
2004-06-13 20:20:40 +00:00
" GNU Server Pages
au BufNewFile,BufRead *.gsp setf gsp
2005-07-04 22:49:24 +00:00
" Group file
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" GTK RC
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
" GYP
au BufNewFile,BufRead *.gyp,*.gypi setf gyp
" Hack
au BufRead,BufNewFile *.hack,*.hackpartial setf hack
2008-07-13 17:41:49 +00:00
" Haml
au BufNewFile,BufRead *.haml setf haml
2007-05-05 18:24:42 +00:00
" Hamster Classic | Playground files
au BufNewFile,BufRead *.hsm setf hamster
2007-05-05 18:24:42 +00:00
" Handlebars
au BufNewFile,BufRead *.hbs setf handlebars
" Hare
au BufNewFile,BufRead *.ha setf hare
2004-06-13 20:20:40 +00:00
" Haskell
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell
au BufNewFile,BufRead cabal.project setf cabalproject
au BufNewFile,BufRead */{.,}cabal/config setf cabalconfig
au BufNewFile,BufRead cabal.config setf cabalconfig
Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 05:44:25 +02:00
au BufNewFile,BufRead *.persistentmodels setf haskellpersistent
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" Haste
au BufNewFile,BufRead *.ht setf haste
2008-07-13 17:41:49 +00:00
au BufNewFile,BufRead *.htpp setf hastepreproc
2008-06-25 20:13:35 +00:00
" HCL
au BufRead,BufNewFile *.hcl setf hcl
" Go checksum file (must be before *.sum Hercules)
au BufNewFile,BufRead go.sum,go.work.sum setf gosum
2004-06-13 20:20:40 +00:00
" Hercules
2016-10-30 21:55:26 +01:00
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
2004-06-13 20:20:40 +00:00
" HEEx
au BufRead,BufNewFile *.heex setf heex
2004-06-13 20:20:40 +00:00
" HEX (Intel)
au BufNewFile,BufRead *.hex,*.ihex,*.int,*.ihe,*.ihx,*.mcs,*.h32,*.h80,*.h86,*.a43,*.a90 setf hex
2004-06-13 20:20:40 +00:00
" Hjson
au BufNewFile,BufRead *.hjson setf hjson
" HLS Playlist (or another form of playlist)
au BufNewFile,BufRead *.m3u,*.m3u8 setf hlsplaylist
2019-08-17 20:09:31 +02:00
" Hollywood
au BufRead,BufNewFile *.hws setf hollywood
" Hoon
au BufRead,BufNewFile *.hoon setf hoon
2004-06-13 20:20:40 +00:00
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
" Translate shell
au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure
2005-08-24 22:16:11 +00:00
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
au BufNewFile,BufRead *.cshtml setf html
2004-06-13 20:20:40 +00:00
2005-08-24 22:16:11 +00:00
" HTML with Ruby - eRuby
2007-05-10 18:44:18 +00:00
au BufNewFile,BufRead *.erb,*.rhtml setf eruby
2004-06-13 20:20:40 +00:00
" HTML with M4
au BufNewFile,BufRead *.html.m4 setf htmlm4
" Some template. Used to be HTML Cheetah.
au BufNewFile,BufRead *.tmpl setf template
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" Host config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/host.conf setf hostconf
2008-06-25 20:13:35 +00:00
2008-07-18 10:54:50 +00:00
" Hosts access
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess
2008-07-18 10:54:50 +00:00
Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 05:44:25 +02:00
" Hurl
au BufRead,BufNewFile *.hurl setf hurl
2004-06-13 20:20:40 +00:00
" Hyper Builder
au BufNewFile,BufRead *.hb setf hb
" Hyprlang
au BufNewFile,BufRead hypr\(land\|paper\|idle\|lock\).conf setf hyprlang
2013-06-12 21:29:15 +02:00
" Httest
au BufNewFile,BufRead *.htt,*.htb setf httest
" i3
au BufNewFile,BufRead */i3/config setf i3config
au BufNewFile,BufRead */.i3/config setf i3config
" sway
au BufNewFile,BufRead */sway/config setf swayconfig
au BufNewFile,BufRead */.sway/config setf swayconfig
2004-06-13 20:20:40 +00:00
" Icon
au BufNewFile,BufRead *.icn setf icon
" IDL (Interface Description Language)
au BufNewFile,BufRead *.idl call dist#ft#FTidl()
2004-06-13 20:20:40 +00:00
" Microsoft IDL (Interface Description Language) Also *.idl
" MOF = WMI (Windows Management Instrumentation) Managed Object Format
au BufNewFile,BufRead *.odl,*.mof setf msidl
" Icewm menu
au BufNewFile,BufRead */.icewm/menu setf icemenu
2007-05-10 18:44:18 +00:00
" Indent profile (must come before IDL *.pro!)
au BufNewFile,BufRead .indent.pro setf indent
au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent')
2007-05-10 18:44:18 +00:00
" IDL (Interactive Data Language), Prolog, Cproto or zsh module C
au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
2004-06-13 20:20:40 +00:00
2005-07-04 22:49:24 +00:00
" Indent RC
2008-07-18 10:54:50 +00:00
au BufNewFile,BufRead indentrc setf indent
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" Inform
au BufNewFile,BufRead *.inf,*.INF setf inform
2007-05-05 18:24:42 +00:00
" Initng
2013-08-03 18:35:36 +02:00
au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
2007-05-05 18:24:42 +00:00
2013-06-24 22:22:18 +02:00
" Innovation Data Processing
2020-06-21 22:12:03 +02:00
au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
2013-08-03 18:35:36 +02:00
au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog
2020-06-21 22:12:03 +02:00
au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog
au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog
2013-06-24 22:22:18 +02:00
2005-01-31 19:19:04 +00:00
" Ipfilter
2007-05-05 18:24:42 +00:00
au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter
2005-01-31 19:19:04 +00:00
2004-06-13 20:20:40 +00:00
" Informix 4GL (source - canonical, include file, I4GL+M4 preproc.)
au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl
" .INI file for MSDOS
au BufNewFile,BufRead *.ini,*.INI setf dosini
2004-06-13 20:20:40 +00:00
" SysV Inittab
au BufNewFile,BufRead inittab setf inittab
" Inko
au BufNewFile,BufRead *.inko setf inko
2004-06-13 20:20:40 +00:00
" Inno Setup
au BufNewFile,BufRead *.iss setf iss
" J
au BufNewFile,BufRead *.ijs setf j
2004-06-13 20:20:40 +00:00
" JAL
au BufNewFile,BufRead *.jal,*.JAL setf jal
" Jam
au BufNewFile,BufRead *.jpl,*.jpr setf jam
" Janet
au BufNewFile,BufRead *.janet setf janet
2004-06-13 20:20:40 +00:00
" Java
au BufNewFile,BufRead *.java,*.jav setf java
" JavaCC
au BufNewFile,BufRead *.jj,*.jjt setf javacc
" JavaScript, ECMAScript, ES module script, CommonJS script
au BufNewFile,BufRead *.js,*.jsm,*.javascript,*.es,*.mjs,*.cjs setf javascript
au BufNewFile,BufRead .node_repl_history setf javascript
" JavaScript with React
au BufNewFile,BufRead *.jsx setf javascriptreact
2004-06-13 20:20:40 +00:00
" Java Server Pages
au BufNewFile,BufRead *.jsp setf jsp
" Java Properties resource file (note: doesn't catch font.properties.pl)
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
" Eclipse preference files use Java Properties syntax
au BufNewFile,BufRead org.eclipse.*.prefs setf jproperties
2004-06-13 20:20:40 +00:00
" Jess
au BufNewFile,BufRead *.clp setf jess
" Jgraph
au BufNewFile,BufRead *.jgr setf jgraph
" Jujutsu
au BufNewFile,BufRead *.jjdescription setf jj
2011-06-19 05:09:16 +02:00
" Jovial
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
" Jq
au BufNewFile,BufRead *.jq setf jq
" JSON5
au BufNewFile,BufRead *.json5 setf json5
" JSON Patch (RFC 6902)
au BufNewFile,BufRead *.json-patch setf json
" Geojson is also json
au BufNewFile,BufRead *.geojson setf json
" Jupyter Notebook and jupyterlab config is also json
au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json
" Sublime config
au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
" Other files that look like json
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock setf json
" JSONC (JSON with comments)
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
au BufNewFile,BufRead .jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
" JSON Lines
au BufNewFile,BufRead *.jsonl setf jsonl
" Jsonnet
au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
" Julia
au BufNewFile,BufRead *.jl setf julia
" Just
au BufNewFile,BufRead [jJ]ustfile,.justfile,*.just setf just
" KDL
au BufNewFile,BufRead *.kdl setf kdl
2004-06-13 20:20:40 +00:00
" Kixtart
au BufNewFile,BufRead *.kix setf kix
" Kuka Robot Language
au BufNewFile,BufRead *.src\c call dist#ft#FTsrc()
au BufNewFile,BufRead *.dat\c call dist#ft#FTdat()
au BufNewFile,BufRead *.sub\c setf krl
2004-06-13 20:20:40 +00:00
" Kimwitu[++]
au BufNewFile,BufRead *.k setf kwt
2014-06-12 21:46:14 +02:00
" Kivy
au BufNewFile,BufRead *.kv setf kivy
" Kotlin
au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
2004-06-13 20:20:40 +00:00
" KDE script
au BufNewFile,BufRead *.ks setf kscript
2006-04-11 21:38:50 +00:00
" Kconfig
au BufNewFile,BufRead Kconfig,Kconfig.debug,Config.in setf kconfig
2006-04-11 21:38:50 +00:00
2004-06-13 20:20:40 +00:00
" Lace (ISE)
au BufNewFile,BufRead *.ace,*.ACE setf lace
" Larch Shared Language
au BufNewFile,BufRead .lsl call dist#ft#FTlsl()
" Latexmkrc
au BufNewFile,BufRead .latexmkrc,latexmkrc setf perl
2004-06-13 20:20:40 +00:00
" Latte
au BufNewFile,BufRead *.latte,*.lte setf latte
2005-06-29 22:40:58 +00:00
" Limits
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits
2005-06-29 22:40:58 +00:00
" LambdaProlog or SML (see dist#ft#FTmod for *.mod)
au BufNewFile,BufRead *.sig call dist#ft#FTsig()
2004-06-13 20:20:40 +00:00
" LDAP LDIF
au BufNewFile,BufRead *.ldif setf ldif
" Luadoc, Ldoc (must be before *.ld)
au BufNewFile,BufRead config.ld setf lua
2005-06-29 22:40:58 +00:00
" Ld loader
au BufNewFile,BufRead *.ld,*/ldscripts/* setf ld
2005-06-29 22:40:58 +00:00
" Lean
au BufNewFile,BufRead *.lean setf lean
" Ledger
au BufRead,BufNewFile *.ldg,*.ledger,*.journal setf ledger
2015-01-07 16:57:10 +01:00
" Less
au BufNewFile,BufRead *.less setf less
2004-06-13 20:20:40 +00:00
" Lex
2014-03-08 18:38:28 +01:00
au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex
2004-06-13 20:20:40 +00:00
" Libao
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao
2004-06-13 20:20:40 +00:00
2005-07-04 22:49:24 +00:00
" Libsensors
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" LFTP
au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
" Lifelines (or Lex for C++!)
au BufNewFile,BufRead *.ll setf lifelines
" Lilo: Linux loader
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead lilo.conf setf lilo
2004-06-13 20:20:40 +00:00
" Lilypond
au BufNewFile,BufRead *.ly,*.ily setf lilypond
" Lisp (*.el = ELisp, *.cl = Common Lisp)
" *.jl was removed, it's also used for Julia, better skip than guess wrong.
2004-06-13 20:20:40 +00:00
if has("fname_case")
au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp
2004-06-13 20:20:40 +00:00
else
au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc,*.stsg,*/supertux2/config setf lisp
2004-06-13 20:20:40 +00:00
endif
2005-06-29 22:40:58 +00:00
" SBCL implementation of Common Lisp
au BufNewFile,BufRead sbclrc,.sbclrc setf lisp
" Liquidsoap
au BufNewFile,BufRead *.liq setf liquidsoap
2010-05-21 12:05:36 +02:00
" Liquid
au BufNewFile,BufRead *.liquid setf liquid
2004-06-13 20:20:40 +00:00
" Lite
au BufNewFile,BufRead *.lite,*.lt setf lite
2007-05-10 18:44:18 +00:00
" LiteStep RC files
au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep
" Livebook
au BufNewFile,BufRead *.livemd setf livebook
2005-06-29 22:40:58 +00:00
" Login access
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/login.access setf loginaccess
2005-06-29 22:40:58 +00:00
" Login defs
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/login.defs setf logindefs
2005-06-29 22:40:58 +00:00
2004-06-13 20:20:40 +00:00
" Logtalk
au BufNewFile,BufRead *.lgt setf logtalk
" LOTOS
au BufNewFile,BufRead *.lotos setf lotos
" LOTOS or LaTeX \listoftables files
au BufNewFile,BufRead *.lot
\ if getline(1) =~# '\\contentsline' |setf tex|else|setf lotos|endif
2004-06-13 20:20:40 +00:00
" Lout (also: *.lt)
au BufNewFile,BufRead *.lou,*.lout setf lout
" Lua, Texlua
au BufNewFile,BufRead *.lua,*.tlu,.lua_history setf lua
2004-06-13 20:20:40 +00:00
" Luau
au BufNewFile,BufRead *.luau setf luau
" Luau config
au BufNewFile,BufRead .luaurc setf jsonc
" Luacheck
au BufNewFile,BufRead .luacheckrc setf lua
2014-09-09 18:48:09 +02:00
" Luarocks
au BufNewFile,BufRead *.rockspec,rock_manifest setf lua
2008-06-25 20:13:35 +00:00
" Linden Scripting Language (Second Life)
au BufNewFile,BufRead *.lsl call dist#ft#FTlsl()
2008-06-25 20:13:35 +00:00
2004-06-13 20:20:40 +00:00
" Lynx style file (or LotusScript!)
au BufNewFile,BufRead *.lss setf lss
" M4
au BufNewFile,BufRead *.m4
\ if expand("<afile>") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif
au BufNewFile,BufRead .m4_history setf m4
2004-06-13 20:20:40 +00:00
" MaGic Point
au BufNewFile,BufRead *.mgp setf mgp
2017-11-02 22:58:42 +01:00
" Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt)
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail
2004-06-13 20:20:40 +00:00
2006-03-26 21:06:50 +00:00
" Mail aliases
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases
2006-03-26 21:06:50 +00:00
2004-06-13 20:20:40 +00:00
" Mailcap configuration file
au BufNewFile,BufRead .mailcap,mailcap setf mailcap
" Makefile
au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make
au BufNewFile,BufRead Kbuild setf make
2004-06-13 20:20:40 +00:00
" MakeIndex
au BufNewFile,BufRead *.ist,*.mst setf ist
" Mallard
au BufNewFile,BufRead *.page setf mallard
2004-06-13 20:20:40 +00:00
" Manpage
au BufNewFile,BufRead *.man setf man
2005-07-04 22:49:24 +00:00
" Man config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/man.conf,man.config setf manconf
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" Maple V
au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
2008-07-13 17:41:49 +00:00
" Map (UMN mapserver config file)
au BufNewFile,BufRead *.map setf map
2010-05-21 12:05:36 +02:00
" Markdown
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
\ if exists("g:filetype_md") |
\ exe "setf " . g:filetype_md |
\ else |
\ setf markdown |
\ endif
2010-05-21 12:05:36 +02:00
2004-06-13 20:20:40 +00:00
" Mason
2014-08-22 19:21:47 +02:00
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
2004-06-13 20:20:40 +00:00
" Mathematica, Matlab, Murphi, Objective C or Octave
au BufNewFile,BufRead *.m call dist#ft#FTm()
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" Mathematica notebook
au BufNewFile,BufRead *.nb setf mma
2004-06-13 20:20:40 +00:00
" Maya Extension Language
au BufNewFile,BufRead *.mel setf mel
" mbsync
au BufNewFile,BufRead .mbsyncrc setf conf
2012-08-15 17:43:31 +02:00
" Mercurial (hg) commit file
au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
2010-01-06 20:54:52 +01:00
" Mercurial config (looks like generic config file)
au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
" Mermaid
au BufNewFile,BufRead *.mmd,*.mmdc,*.mermaid setf mermaid
" Meson Build system config
au BufNewFile,BufRead meson.build,meson.options,meson_options.txt setf meson
au BufNewFile,BufRead *.wrap setf dosini
2011-02-25 14:42:19 +01:00
" Messages (logs mostly)
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
2007-05-05 18:24:42 +00:00
2004-06-13 20:20:40 +00:00
" Metafont
au BufNewFile,BufRead *.mf setf mf
" MetaPost
au BufNewFile,BufRead *.mp setf mp
au BufNewFile,BufRead *.mpxl,*.mpiv,*.mpvi let b:mp_metafun = 1 | setf mp
2004-06-13 20:20:40 +00:00
2006-02-23 21:32:16 +00:00
" MGL
au BufNewFile,BufRead *.mgl setf mgl
2013-11-14 05:48:46 +01:00
" MIX - Knuth assembly
au BufNewFile,BufRead *.mix,*.mixal setf mix
2004-06-13 20:20:40 +00:00
" MMIX or VMS makefile
au BufNewFile,BufRead *.mms call dist#ft#FTmms()
2004-06-13 20:20:40 +00:00
" msmtp
au BufNewFile,BufRead .msmtprc setf msmtp
2008-06-25 20:13:35 +00:00
" Symbian meta-makefile definition (MMP)
au BufNewFile,BufRead *.mmp setf mmp
" ABB Rapid, Modula-2, Modsim III or LambdaProlog
au BufNewFile,BufRead *.mod\c call dist#ft#FTmod()
2004-06-13 20:20:40 +00:00
" Modula-3 (.m3, .i3, .mg, .ig)
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.[mi][3g] setf modula3
" Larch/Modula-3
au BufNewFile,BufRead *.lm3 setf modula3
" Modconf
au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf
2004-06-13 20:20:40 +00:00
" Monk
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
" MOO
au BufNewFile,BufRead *.moo setf moo
" Moonscript
au BufNewFile,BufRead *.moon setf moonscript
" Move language
au BufNewFile,BufRead *.move setf move
2004-06-13 20:20:40 +00:00
" MPD is based on XML
au BufNewFile,BufRead *.mpd setf xml
2004-06-13 20:20:40 +00:00
" Mplayer config
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
2015-03-21 18:06:14 +01:00
" Motorola S record
au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec
2004-06-13 20:20:40 +00:00
2006-04-27 21:47:44 +00:00
" Mrxvtrc
au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc
2004-06-13 20:20:40 +00:00
" Msql
au BufNewFile,BufRead *.msql setf msql
" Mysql
au BufNewFile,BufRead *.mysql,.mysql_history setf mysql
2004-06-13 20:20:40 +00:00
" Tcl Shell RC file
au BufNewFile,BufRead tclsh.rc setf tcl
2004-06-13 20:20:40 +00:00
" M$ Resource files
" /etc/Muttrc.d/file.rc is muttrc
au BufNewFile,BufRead *.rc,*.rch
\ if expand("<afile>") !~ "/etc/Muttrc.d/" |
\ setf rc |
\ endif
2004-06-13 20:20:40 +00:00
" Mojo
" Mojo files use either .mojo or .🔥 as extension
au BufNewFile,BufRead *.mojo,*.🔥 setf mojo
2004-07-02 15:38:35 +00:00
" MuPAD source
au BufRead,BufNewFile *.mu setf mupad
2004-06-13 20:20:40 +00:00
" Mush
au BufNewFile,BufRead *.mush setf mush
" Mustache
au BufNewFile,BufRead *.mustache setf mustache
2007-05-05 18:24:42 +00:00
" Mutt setup file (also for Muttng)
2008-06-25 20:13:35 +00:00
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
2004-06-13 20:20:40 +00:00
" N1QL
au BufRead,BufNewfile *.n1ql,*.nql setf n1ql
2005-07-04 22:49:24 +00:00
" Nano
2020-06-21 22:12:03 +02:00
au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" Nastran input/DMAP
"au BufNewFile,BufRead *.dat setf nastran
" Natural
au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural
2017-11-02 22:58:42 +01:00
" Noemutt setup file
au BufNewFile,BufRead Neomuttrc setf neomuttrc
2004-12-19 22:46:22 +00:00
" Netrc
au BufNewFile,BufRead .netrc setf netrc
" Neofetch
au BufNewFile,BufRead */neofetch/config.conf setf sh
" Nginx
au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/nginx/conf/*,*/nginx/*.conf setf nginx
" Nim file
au BufNewFile,BufRead *.nim,*.nims,*.nimble setf nim
2012-01-10 14:55:01 +01:00
" Ninja file
au BufNewFile,BufRead *.ninja setf ninja
" Nix
au BufRead,BufNewFile *.nix setf nix
" Norg
au BufNewFile,BufRead *.norg setf norg
" NPM RC file
au BufNewFile,BufRead npmrc,.npmrc setf dosini
2004-06-13 20:20:40 +00:00
" Novell netware batch files
au BufNewFile,BufRead *.ncf setf ncf
" Nroff/Troff (*.ms and *.t are checked below)
au BufNewFile,BufRead *.me
\ if expand("<afile>") != "read.me" && expand("<afile>") != "click.me" |
\ setf nroff |
\ endif
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
au BufNewFile,BufRead *.[1-9] call dist#ft#FTnroff()
2004-06-13 20:20:40 +00:00
" Nroff or Objective C++
au BufNewFile,BufRead *.mm call dist#ft#FTmm()
2004-06-13 20:20:40 +00:00
" Not Quite C
au BufNewFile,BufRead *.nqc setf nqc
" notmuch
au BufNewFile,BufRead .notmuch-config setf dosini
2017-03-16 17:41:02 +01:00
" NSE - Nmap Script Engine - uses Lua syntax
au BufNewFile,BufRead *.nse setf lua
2004-06-13 20:20:40 +00:00
" NSIS
2012-04-25 19:07:41 +02:00
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
2004-06-13 20:20:40 +00:00
" Nu
au BufNewFile,BufRead *.nu setf nu
" Oblivion Language and Oblivion Script Extender
au BufNewFile,BufRead *.obl,*.obse,*.oblivion,*.obscript setf obse
" Objdump
au BufNewFile,BufRead *.objdump,*.cppobjdump setf objdump
" OCaml
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
2004-06-13 20:20:40 +00:00
" Occam
au BufNewFile,BufRead *.occ setf occam
" Octave
au BufNewFile,BufRead octave.conf,.octaverc,octaverc,*/octave/history setf octave
" Odin
au BufNewFile,BufRead *.odin setf odin
2004-06-13 20:20:40 +00:00
" Omnimark
au BufNewFile,BufRead *.xom,*.xin setf omnimark
" ondir
au BufNewFile,BufRead .ondirrc setf ondir
" OPAM
au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam
" OpenFOAM
au BufNewFile,BufRead [a-zA-Z0-9]*Dict\(.*\)\=,[a-zA-Z]*Properties\(.*\)\=,*Transport\(.*\),fvSchemes,fvSolution,fvConstrains,fvModels,*/constant/g,*/0\(\.orig\)\=/* call dist#ft#FTfoam()
2004-06-13 20:20:40 +00:00
" OpenROAD
au BufNewFile,BufRead *.or setf openroad
2004-06-13 20:20:40 +00:00
" OPL
au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl
2004-06-13 20:20:40 +00:00
" OpenSCAD
au BufNewFile,BufRead *.scad setf openscad
2004-06-13 20:20:40 +00:00
" Oracle config file
au BufNewFile,BufRead *.ora setf ora
2004-06-13 20:20:40 +00:00
" Org
au BufNewFile,BufRead *.org,*.org_archive setf org
2004-06-13 20:20:40 +00:00
" Packet filter conf
au BufNewFile,BufRead pf.conf setf pf
2004-06-13 20:20:40 +00:00
" ini style config files, using # comments
au BufNewFile,BufRead pacman.conf,mpv.conf setf confini
au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini
au BufNewFile,BufRead *.nmconnection setf confini
au BufNewFile,BufRead paru.conf setf confini
" Pacman hooks
au BufNewFile,BufRead *.hook
\ if getline(1) == '[Trigger]' |
\ setf confini |
\ endif
" Pacman makepkg
au BufNewFile,BufRead {.,}makepkg.conf setf sh
" Pacman log
au BufNewFile,BufRead pacman.log setf pacmanlog
2005-06-29 22:40:58 +00:00
" Pam conf
au BufNewFile,BufRead */etc/pam.conf setf pamconf
2005-06-29 22:40:58 +00:00
" Pam environment
au BufNewFile,BufRead pam_env.conf,.pam_environment setf pamenv
2004-06-13 20:20:40 +00:00
" PApp
au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
2004-06-13 20:20:40 +00:00
2005-07-04 22:49:24 +00:00
" Password file
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
2005-07-04 22:49:24 +00:00
" Pascal (also *.p, *.pp, *.inc)
au BufNewFile,BufRead *.pas setf pascal
" Pascal or Puppet manifest
au BufNewFile,BufRead *.pp call dist#ft#FTpp()
2004-06-13 20:20:40 +00:00
" Delphi
au BufNewFile,BufRead *.dpr setf pascal
" Xilinx labtools project file or Lazarus program file
au BufNewFile,BufRead *.lpr
\ if getline(1) =~# "<?xml" |
\ setf xml |
\ else |
\ setf pascal |
\ endif
2004-06-13 20:20:40 +00:00
" Free Pascal makefile definition file
au BufNewFile,BufRead *.fpc setf fpcmake
" Path of Exile item filter
au BufNewFile,BufRead *.filter setf poefilter
2008-06-25 20:13:35 +00:00
" PDF
au BufNewFile,BufRead *.pdf setf pdf
2008-06-25 20:13:35 +00:00
" PCMK - HAE - crm configure edit
au BufNewFile,BufRead *.pcmk setf pcmk
2017-11-02 22:58:42 +01:00
" PEM (Privacy-Enhanced Mail)
au BufNewFile,BufRead *.pem,*.cer,*.crt,*.csr setf pem
2004-06-13 20:20:40 +00:00
" Perl
if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
2004-06-13 20:20:40 +00:00
else
au BufNewFile,BufRead *.pl call dist#ft#FTpl()
2004-06-13 20:20:40 +00:00
endif
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
2004-06-13 20:20:40 +00:00
" Perl Reply
au BufNewFile,BufRead .replyrc setf dosini
2004-06-13 20:20:40 +00:00
" Perl, XPM or XPM2
au BufNewFile,BufRead *.pm
\ if getline(1) =~ "XPM2" |
\ setf xpm2 |
\ elseif getline(1) =~ "XPM" |
\ setf xpm |
\ else |
\ setf perl |
\ endif
" Perl POD
au BufNewFile,BufRead *.pod setf pod
2006-04-28 22:39:47 +00:00
" Php, php3, php4, etc.
" Also Phtml (was used for PHP 2 in the past).
" Also .ctp for Cake template file.
" Also .phpt for php tests.
" Also .theme for Drupal theme files.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt,*.theme setf php
2004-06-13 20:20:40 +00:00
" PHP config
2020-09-28 21:48:16 +02:00
au BufNewFile,BufRead php.ini-* setf dosini
2018-01-28 22:47:25 +01:00
" Pike and Cmod
au BufNewFile,BufRead *.pike,*.pmod setf pike
au BufNewFile,BufRead *.cmod setf cmod
2004-06-13 20:20:40 +00:00
" Pinfo config
au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo
" Palm Resource compiler
au BufNewFile,BufRead *.rcp setf pilrc
" Pine config
au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine
Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 05:44:25 +02:00
" Pip requirements
au BufNewFile,BufRead *.pip setf requirements
au BufNewFile,BufRead requirements.txt setf requirements
au BufNewFile,BufRead *-requirements.txt setf requirements
au BufNewFile,BufRead constraints.txt setf requirements
au BufNewFile,BufRead requirements.in setf requirements
au BufNewFile,BufRead requirements/*.txt setf requirements
au BufNewFile,BufRead requires/*.txt setf requirements
Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
2023-08-10 05:44:25 +02:00
" Pipenv Pipfiles
au BufNewFile,BufRead Pipfile setf toml
au BufNewFile,BufRead Pipfile.lock setf json
2013-07-24 19:53:36 +02:00
" PL/1, PL/I
au BufNewFile,BufRead *.pli,*.pl1 setf pli
2004-06-13 20:20:40 +00:00
" PL/M (also: *.inp)
au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm
" PL/SQL
au BufNewFile,BufRead *.pls,*.plsql setf plsql
" PLP
au BufNewFile,BufRead *.plp setf plp
" PO and PO template (GNU gettext)
au BufNewFile,BufRead *.po,*.pot setf po
" Pony
au BufNewFile,BufRead *.pony setf pony
2004-06-13 20:20:40 +00:00
" Postfix main config
au BufNewFile,BufRead main.cf,main.cf.proto setf pfmain
2004-06-13 20:20:40 +00:00
" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
" PostScript Printer Description
au BufNewFile,BufRead *.ppd setf ppd
" Povray
au BufNewFile,BufRead *.pov setf pov
" Povray configuration
au BufNewFile,BufRead .povrayrc setf povini
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
2004-06-13 20:20:40 +00:00
" PowerShell
au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
au BufNewFile,BufRead *.ps1xml setf ps1xml
au BufNewFile,BufRead *.cdxml,*.psc1 setf xml
2004-06-13 20:20:40 +00:00
" Printcap and Termcap
au BufNewFile,BufRead *printcap
\ let b:ptcap_type = "print" | setf ptcap
au BufNewFile,BufRead *termcap
\ let b:ptcap_type = "term" | setf ptcap
" Prisma
au BufRead,BufNewFile *.prisma setf prisma
" PCCTS / ANTLR
"au BufNewFile,BufRead *.g setf antlr
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.g setf pccts
" PPWizard
au BufNewFile,BufRead *.it,*.ih setf ppwiz
" Pug
au BufRead,BufNewFile *.pug setf pug
" Puppet
au BufNewFile,BufRead Puppetfile setf ruby
" Embedded Puppet
au BufNewFile,BufRead *.epp setf epuppet
2010-05-14 23:24:24 +02:00
" Obj 3D file format
" TODO: is there a way to avoid MS-Windows Object files?
2011-03-22 14:05:35 +01:00
au BufNewFile,BufRead *.obj setf obj
2010-05-14 23:24:24 +02:00
2004-06-13 20:20:40 +00:00
" Oracle Pro*C/C++
2007-05-15 07:12:25 +00:00
au BufNewFile,BufRead *.pc setf proc
2004-06-13 20:20:40 +00:00
2007-05-05 18:24:42 +00:00
" Privoxy actions file
au BufNewFile,BufRead *.action setf privoxy
2004-06-13 20:20:40 +00:00
" Procmail
au BufNewFile,BufRead .procmail,.procmailrc setf procmail
" Progress or CWEB
au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb()
2004-06-13 20:20:40 +00:00
" Progress or assembly or Swig
au BufNewFile,BufRead *.i call dist#ft#FTi()
2004-06-13 20:20:40 +00:00
" Progress or Pascal
au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal()
2004-06-13 20:20:40 +00:00
" Software Distributor Product Specification File (POSIX 1387.2-1995)
au BufNewFile,BufRead *.psf setf psf
au BufNewFile,BufRead INDEX,INFO
\ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' |
\ setf psf |
\ endif
" Prolog
au BufNewFile,BufRead *.pdb setf prolog
2008-06-25 20:13:35 +00:00
" Promela
au BufNewFile,BufRead *.pml setf promela
" Property Specification Language (PSL)
au BufNewFile,BufRead *.psl setf psl
2013-06-12 21:29:15 +02:00
" Google protocol buffers
au BufNewFile,BufRead *.proto setf proto
au BufNewFile,BufRead *.txtpb,*.textproto,*.textpb,*.pbtxt setf pbtxt
2013-06-12 21:29:15 +02:00
" Poke
au BufNewFile,BufRead *.pk setf poke
2005-07-04 22:49:24 +00:00
" Protocols
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/protocols setf protocols
2005-07-04 22:49:24 +00:00
" PyPA manifest files
au BufNewFile,BufRead MANIFEST.in setf pymanifest
" Pyret
au BufNewFile,BufRead *.arr setf pyret
2004-06-13 20:20:40 +00:00
" Pyrex
au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
" Python, Python Shell Startup and Python Stub Files
2008-07-18 10:54:50 +00:00
" Quixote (Python-based web framework)
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc,.python_history,.jline-jython.history setf python
au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
2008-07-18 10:54:50 +00:00
" QL
au BufRead,BufNewFile *.ql,*.qll setf ql
" QML
au BufRead,BufNewFile *.qml,*.qbs setf qml
" QMLdir
au BufRead,BufNewFile qmldir setf qmldir
" Quarto
au BufRead,BufNewFile *.qmd setf quarto
" Racket (formerly detected as "scheme")
au BufNewFile,BufRead *.rkt,*.rktd,*.rktl setf racket
2004-06-13 20:20:40 +00:00
" Radiance
au BufNewFile,BufRead *.rad,*.mat setf radiance
2021-09-09 21:55:11 +02:00
" Raku (formerly Perl6)
au BufNewFile,BufRead *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest setf raku
2004-06-13 20:20:40 +00:00
" Ratpoison config/command files
au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
" RCS file
au BufNewFile,BufRead *\,v setf rcs
" Readline
2005-04-15 21:13:42 +00:00
au BufNewFile,BufRead .inputrc,inputrc setf readline
2004-06-13 20:20:40 +00:00
" Registry for MS-Windows
au BufNewFile,BufRead *.reg
\ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif
" Renderman Interface Bytestream
au BufNewFile,BufRead *.rib setf rib
" Rego Policy Language
au BufNewFile,BufRead *.rego setf rego
2004-06-13 20:20:40 +00:00
" Rexx
2012-10-21 03:02:54 +02:00
au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
2004-06-13 20:20:40 +00:00
" Ripgrep rc
au BufNewFile,BufRead {.,}ripgreprc setf conf
2006-03-01 22:09:21 +00:00
" R Help file
2006-04-18 21:55:01 +00:00
if has("fname_case")
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
else
au BufNewFile,BufRead *.rd setf rhelp
endif
" R noweb file
if has("fname_case")
au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb
else
au BufNewFile,BufRead *.rnw,*.snw setf rnoweb
endif
2006-03-01 22:09:21 +00:00
2014-07-10 22:01:47 +02:00
" R Markdown file
if has("fname_case")
au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd
else
au BufNewFile,BufRead *.rmd,*.smd setf rmd
endif
" R profile file
au BufNewFile,BufRead .Rhistory,.Rprofile,Rprofile,Rprofile.site setf r
" RSS looks like XML
au BufNewFile,BufRead *.rss setf xml
2014-07-10 22:01:47 +02:00
" R reStructuredText file
if has("fname_case")
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
else
au BufNewFile,BufRead *.rrst,*.srst setf rrst
endif
2004-06-13 20:20:40 +00:00
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
2004-06-13 20:20:40 +00:00
" Remind
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
2004-06-13 20:20:40 +00:00
" ReScript
au BufNewFile,BufRead *.res,*.resi setf rescript
2004-06-13 20:20:40 +00:00
" Resolv.conf
au BufNewFile,BufRead resolv.conf setf resolv
" Relax NG Compact
au BufNewFile,BufRead *.rnc setf rnc
2013-04-05 22:26:15 +02:00
" Relax NG XML
au BufNewFile,BufRead *.rng setf rng
" ILE RPG
au BufNewFile,BufRead *.rpgle,*.rpgleinc setf rpgle
2004-06-13 20:20:40 +00:00
" RPL/2
au BufNewFile,BufRead *.rpl setf rpl
" Robot Framework
au BufNewFile,BufRead *.robot,*.resource setf robot
2004-06-13 20:20:40 +00:00
" Robots.txt
au BufNewFile,BufRead robots.txt setf robots
" Roc
au BufNewFile,BufRead *.roc setf roc
" RON (Rusty Object Notation)
au BufNewFile,BufRead *.ron setf ron
2004-06-13 20:20:40 +00:00
" MikroTik RouterOS script
au BufRead,BufNewFile *.rsc setf routeros
" Rpcgen
au BufNewFile,BufRead *.x setf rpcgen
2004-06-13 20:20:40 +00:00
" reStructuredText Documentation Format
au BufNewFile,BufRead *.rst setf rst
" RTF
au BufNewFile,BufRead *.rtf setf rtf
2008-07-18 10:54:50 +00:00
" Interactive Ruby shell
au BufNewFile,BufRead .irbrc,irbrc,.irb_history,irb_history setf ruby
2008-07-18 10:54:50 +00:00
2004-06-13 20:20:40 +00:00
" Ruby
2011-01-08 16:06:37 +01:00
au BufNewFile,BufRead *.rb,*.rbw setf ruby
" RubyGems
au BufNewFile,BufRead *.gemspec setf ruby
" RBS (Ruby Signature)
au BufNewFile,BufRead *.rbs setf rbs
2016-10-30 21:55:26 +01:00
2011-01-08 16:06:37 +01:00
" Rackup
au BufNewFile,BufRead *.ru setf ruby
" Bundler
au BufNewFile,BufRead Gemfile setf ruby
2004-06-13 20:20:40 +00:00
2007-05-10 18:44:18 +00:00
" Ruby on Rails
au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
" Rantfile and Rakefile is like Ruby
au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
2005-11-23 21:25:05 +00:00
" Rust
au BufNewFile,BufRead *.rs setf rust
au BufNewFile,BufRead Cargo.lock,*/.cargo/config,*/.cargo/credentials setf toml
2010-01-06 20:54:52 +01:00
" S-lang (or shader language, or SmallLisp)
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.sl setf slang
" Sage
au BufNewFile,BufRead *.sage setf sage
2004-06-13 20:20:40 +00:00
" Samba config
au BufNewFile,BufRead smb.conf setf samba
" SAS script
au BufNewFile,BufRead *.sas setf sas
2008-07-13 17:41:49 +00:00
" Sass
au BufNewFile,BufRead *.sass setf sass
2004-06-13 20:20:40 +00:00
" Sather
au BufNewFile,BufRead *.sa setf sather
" Scala
au BufNewFile,BufRead *.scala setf scala
2017-05-27 16:45:17 +02:00
" SBT - Scala Build Tool
au BufNewFile,BufRead *.sbt setf sbt
" Slint
au BufNewFile,BufRead *.slint setf slint
" SuperCollider
au BufNewFile,BufRead *.sc call dist#ft#FTsc()
au BufNewFile,BufRead *.quark setf supercollider
" scdoc
au BufNewFile,BufRead *.scd call dist#ft#FTscd()
2004-06-13 20:20:40 +00:00
" Scilab
2006-03-26 21:06:50 +00:00
au BufNewFile,BufRead *.sci,*.sce setf scilab
2004-06-13 20:20:40 +00:00
2010-07-26 22:21:27 +02:00
" SCSS
2011-03-22 14:05:35 +01:00
au BufNewFile,BufRead *.scss setf scss
2010-07-26 22:21:27 +02:00
2007-05-05 18:24:42 +00:00
" SD: Streaming Descriptors
au BufNewFile,BufRead *.sd setf sd
2004-06-13 20:20:40 +00:00
" SDL
au BufNewFile,BufRead *.sdl,*.pr setf sdl
" sed
au BufNewFile,BufRead *.sed setf sed
" SubRip
au BufNewFile,BufRead *.srt setf srt
" SubStation Alpha
au BufNewFile,BufRead *.ass,*.ssa setf ssa
" svelte
au BufNewFile,BufRead *.svelte setf svelte
" Sieve (RFC 3028, 5228)
au BufNewFile,BufRead *.siv,*.sieve setf sieve
2004-12-09 21:34:53 +00:00
2004-06-13 20:20:40 +00:00
" Sendmail
au BufNewFile,BufRead sendmail.cf setf sm
" Sendmail .mc files are actually m4. Could also be MS Message text file or
" Maxima.
au BufNewFile,BufRead *.mc call dist#ft#McSetf()
2004-06-13 20:20:40 +00:00
2005-07-04 22:49:24 +00:00
" Services
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/services setf services
2005-07-04 22:49:24 +00:00
" Service Location config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/slp.conf setf slpconf
2005-07-04 22:49:24 +00:00
" Service Location registration
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/slp.reg setf slpreg
2005-07-04 22:49:24 +00:00
" Service Location SPI
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/slp.spi setf slpspi
2005-07-04 22:49:24 +00:00
" Setserial config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/serial.conf setf setserial
2005-07-04 22:49:24 +00:00
2004-06-13 20:20:40 +00:00
" SGML
au BufNewFile,BufRead *.sgm,*.sgml
\ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' |
\ setf sgmllnx |
\ elseif getline(1) =~ '<!DOCTYPE.*DocBook' || getline(2) =~ '<!DOCTYPE.*DocBook' |
2012-11-28 18:21:11 +01:00
\ let b:docbk_type = "sgml" |
\ let b:docbk_ver = 4 |
2004-06-13 20:20:40 +00:00
\ setf docbk |
\ else |
\ setf sgml |
\ endif
" SGMLDECL
au BufNewFile,BufRead *.decl,*.dcl,*.dec
\ if getline(1).getline(2).getline(3) =~? '^<!SGML' |
\ setf sgmldecl |
\ endif
" SGML catalog file
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead catalog setf catalog
2004-06-13 20:20:40 +00:00
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
2020-10-26 21:12:46 +01:00
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
" bash scripts.
" NOTE: Patterns ending in a star are further down, these have lower priority.
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
2016-04-30 15:13:38 +02:00
" Shell script (Arch Linux) or PHP file (Drupal)
au BufNewFile,BufRead *.install
\ if getline(1) =~ '<?php' |
\ setf php |
\ else |
\ call dist#ft#SetFileTypeSH("bash") |
2016-04-30 15:13:38 +02:00
\ endif
" tcsh scripts (patterns ending in a star further below)
au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
2004-06-13 20:20:40 +00:00
" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
" (patterns ending in a start further below)
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
2004-06-13 20:20:40 +00:00
" Zig and Zig Object Notation (ZON)
au BufNewFile,BufRead *.zig,*.zon setf zig
" Zserio
au BufNewFile,BufRead *.zs setf zserio
" Z-Shell script (patterns ending in a star further below)
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump,.zsh_history setf zsh
au BufNewFile,BufRead *.zsh,*.zsh-theme,*.zunit setf zsh
2004-06-13 20:20:40 +00:00
" Scheme ("racket" patterns are now separate, see above)
au BufNewFile,BufRead *.scm,*.ss,*.sld setf scheme
2004-06-13 20:20:40 +00:00
" Screen RC
au BufNewFile,BufRead .screenrc,screenrc setf screen
" Sexplib
au BufNewFile,BufRead *.sexp setf sexplib
2004-06-13 20:20:40 +00:00
" Simula
au BufNewFile,BufRead *.sim setf simula
" SINDA
au BufNewFile,BufRead *.sin,*.s85 setf sinda
2006-04-05 20:41:53 +00:00
" SiSU
2006-05-02 22:08:30 +00:00
au BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst,*._sst setf sisu
2006-04-05 20:41:53 +00:00
au BufNewFile,BufRead *.sst.meta,*.-sst.meta,*._sst.meta setf sisu
2004-06-13 20:20:40 +00:00
" SKILL
2005-06-17 22:00:15 +00:00
au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
2004-06-13 20:20:40 +00:00
" Cadence
au BufNewFile,BufRead *.cdc setf cdc
2004-06-13 20:20:40 +00:00
" SLRN
au BufNewFile,BufRead .slrnrc setf slrnrc
au BufNewFile,BufRead *.score setf slrnsc
" Smali
au BufNewFile,BufRead *.smali setf smali
" Smalltalk
2005-05-18 22:24:46 +00:00
au BufNewFile,BufRead *.st setf st
" Smalltalk (and Rexx, TeX, and Visual Basic)
au BufNewFile,BufRead *.cls call dist#ft#FTcls()
2004-06-13 20:20:40 +00:00
" Smarty templates
au BufNewFile,BufRead *.tpl setf smarty
" SMIL or XML
au BufNewFile,BufRead *.smil
\ if getline(1) =~ '<?\s*xml.*?>' |
\ setf xml |
\ else |
\ setf smil |
\ endif
" SMIL or SNMP MIB file
au BufNewFile,BufRead *.smi
\ if getline(1) =~ '\<smil\>' |
\ setf smil |
\ else |
\ setf mib |
\ endif
" SMITH
au BufNewFile,BufRead *.smt,*.smith setf smith
" Smithy
au BufNewFile,BufRead *.smithy setf smithy
2006-05-02 22:08:30 +00:00
" Snobol4 and spitbol
au BufNewFile,BufRead *.sno,*.spt setf snobol4
2004-06-13 20:20:40 +00:00
" SNMP MIB files
au BufNewFile,BufRead *.mib,*.my setf mib
" Snort Configuration
2007-05-10 18:44:18 +00:00
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
2007-05-10 18:44:18 +00:00
" Solidity
au BufRead,BufNewFile *.sol setf solidity
" SPARQL queries
au BufNewFile,BufRead *.rq,*.sparql setf sparql
2004-06-13 20:20:40 +00:00
" Spec (Linux RPM)
au BufNewFile,BufRead *.spec setf spec
" Speedup (AspenTech plant simulator)
au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup
" Slice
au BufNewFile,BufRead *.ice setf slice
" Microsoft Visual Studio Solution
au BufNewFile,BufRead *.sln setf solution
au BufNewFile,BufRead *.slnf setf json
2004-06-13 20:20:40 +00:00
" Spice
au BufNewFile,BufRead *.sp,*.spice setf spice
" Spyce
au BufNewFile,BufRead *.spy,*.spi setf spyce
" Squid
au BufNewFile,BufRead squid.conf setf squid
2004-09-02 19:12:26 +00:00
" SQL for Oracle Designer
au BufNewFile,BufRead *.tyb,*.tyc,*.pkb,*.pks setf sql
" *.typ can be either SQL or Typst files
au BufNewFile,BufRead *.typ call dist#ft#FTtyp()
2004-09-02 19:12:26 +00:00
" SQL
au BufNewFile,BufRead *.sql call dist#ft#SQL()
au BufNewFile,BufRead .sqlite_history setf sql
2004-06-13 20:20:40 +00:00
" SQLJ
au BufNewFile,BufRead *.sqlj setf sqlj
" PRQL
au BufNewFile,BufRead *.prql setf prql
2004-06-13 20:20:40 +00:00
" SQR
au BufNewFile,BufRead *.sqr,*.sqi setf sqr
" Squirrel
au BufNewFile,BufRead *.nut setf squirrel
2004-06-13 20:20:40 +00:00
" OpenSSH configuration
au BufNewFile,BufRead ssh_config,*/.ssh/config,*/.ssh/*.conf setf sshconfig
au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig
2004-06-13 20:20:40 +00:00
" OpenSSH server configuration
au BufNewFile,BufRead sshd_config setf sshdconfig
au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig
2004-06-13 20:20:40 +00:00
" Starlark
au BufNewFile,BufRead *.ipd,*.star,*.starlark setf starlark
" OpenVPN configuration
au BufNewFile,BufRead *.ovpn setf openvpn
au BufNewFile,BufRead */openvpn/*/*.conf setf openvpn
2006-04-15 20:25:09 +00:00
" Stata
2017-04-23 18:40:21 +02:00
au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata
" Also *.class, but not when it's a Java bytecode file
au BufNewFile,BufRead *.class
\ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif
2006-04-15 20:25:09 +00:00
" SMCL
au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl
2004-06-13 20:20:40 +00:00
" Stored Procedures
au BufNewFile,BufRead *.stp setf stp
" Standard ML
au BufNewFile,BufRead *.sml setf sml
2008-06-25 20:13:35 +00:00
" Sratus VOS command macro
au BufNewFile,BufRead *.cm setf voscm
" Swift
au BufNewFile,BufRead *.swift setf swift
2020-06-21 22:12:03 +02:00
au BufNewFile,BufRead *.swift.gyb setf swiftgyb
" Swift Intermediate Language or SILE
au BufNewFile,BufRead *.sil call dist#ft#FTsil()
" Swig
au BufNewFile,BufRead *.swg,*.swig setf swig
2005-06-29 22:40:58 +00:00
" Sysctl
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl
2005-06-29 22:40:58 +00:00
2015-10-13 23:21:27 +02:00
" Systemd unit files
au BufNewFile,BufRead */systemd/*.{automount,dnssd,link,mount,netdev,network,nspawn,path,service,slice,socket,swap,target,timer} setf systemd
2019-03-24 15:09:13 +01:00
" Systemd overrides
au BufNewFile,BufRead */etc/systemd/*.conf.d/*.conf setf systemd
au BufNewFile,BufRead */etc/systemd/system/*.d/*.conf setf systemd
au BufNewFile,BufRead */.config/systemd/user/*.d/*.conf setf systemd
2019-03-24 15:09:13 +01:00
" Systemd temp files
au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd
au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd
au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd
2015-10-13 23:21:27 +02:00
2010-01-06 20:54:52 +01:00
" Synopsys Design Constraints
au BufNewFile,BufRead *.sdc setf sdc
2004-12-19 22:46:22 +00:00
" Sudoers
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
2004-12-19 22:46:22 +00:00
2010-05-14 23:24:24 +02:00
" SVG (Scalable Vector Graphics)
au BufNewFile,BufRead *.svg setf svg
" Surface
au BufRead,BufNewFile *.sface setf surface
" LLVM TableGen
au BufNewFile,BufRead *.td setf tablegen
2005-11-23 21:25:05 +00:00
" Tads (or Nroff or Perl test file)
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.t
\ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
2004-06-13 20:20:40 +00:00
" Tags
au BufNewFile,BufRead tags setf tags
" TAK
au BufNewFile,BufRead *.tak setf tak
" Unx Tal
au BufNewFile,BufRead *.tal setf tal
2010-01-06 20:54:52 +01:00
" Task
au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata
au BufRead,BufNewFile *.task setf taskedit
2010-01-06 20:54:52 +01:00
2005-11-23 21:25:05 +00:00
" Tcl (JACL too)
au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc,.tclsh-history setf tcl
" Xilinx's xsct and xsdb use tcl
au BufNewFile,BufRead .xsctcmdhistory,.xsdbcmdhistory setf tcl
2004-06-13 20:20:40 +00:00
" templ
au BufNewFile,BufRead *.templ setf templ
" Teal
au BufRead,BufNewFile *.tl setf teal
2004-06-13 20:20:40 +00:00
" TealInfo
au BufNewFile,BufRead *.tli setf tli
" Telix Salt
au BufNewFile,BufRead *.slt setf tsalt
" Tera Term Language or Turtle
au BufRead,BufNewFile *.ttl
\ if getline(1) =~ '^@\?\(prefix\|base\)' |
\ setf turtle |
\ else |
\ setf teraterm |
\ endif
2015-07-21 19:19:13 +02:00
2004-06-13 20:20:40 +00:00
" Terminfo
au BufNewFile,BufRead *.ti setf terminfo
" Terraform variables
au BufRead,BufNewFile *.tfvars setf terraform-vars
2004-06-13 20:20:40 +00:00
" TeX
2005-06-30 22:04:15 +00:00
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
au BufNewFile,BufRead texdoc.cnf setf conf
2005-06-30 22:04:15 +00:00
" LaTeX packages will generate some medium LaTeX files during compiling
" They should be ignored by .gitignore https://github.com/github/gitignore/blob/main/TeX.gitignore
" Sometime we need to view its content for debugging
au BufNewFile,BufRead *.{pgf,nlo,nls,thm,eps_tex,pygtex,pygstyle,clo,aux,brf,ind,lof,loe,nav,vrb,ins,tikz,bbx,cbx,beamer} setf tex
2008-06-25 20:13:35 +00:00
" ConTeXt
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context
2004-06-13 20:20:40 +00:00
" Texinfo
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
" TeX configuration
au BufNewFile,BufRead texmf.cnf setf texmf
" Thrift (Apache)
au BufNewFile,BufRead *.thrift setf thrift
2004-06-13 20:20:40 +00:00
" Tidy config
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
2004-06-13 20:20:40 +00:00
" TF mud client
au BufNewFile,BufRead .tfrc,tfrc setf tf
" TF mud client or terraform
au BufNewFile,BufRead *.tf call dist#ft#FTtf()
2004-06-13 20:20:40 +00:00
" TLA+
au BufNewFile,BufRead *.tla setf tla
2017-03-05 17:04:09 +01:00
" tmux configuration
2017-03-16 17:41:02 +01:00
au BufNewFile,BufRead {.,}tmux*.conf setf tmux
2017-03-05 17:04:09 +01:00
" TOML
au BufNewFile,BufRead *.toml setf toml
2004-10-24 19:18:58 +00:00
" TPP - Text Presentation Program
au BufNewFile,BufRead *.tpp setf tpp
2004-10-24 19:18:58 +00:00
" TRACE32 Script Language
au BufNewFile,BufRead *.cmm,*.t32 setf trace32
2011-03-22 14:05:35 +01:00
" Treetop
au BufRead,BufNewFile *.treetop setf treetop
2005-10-12 20:58:49 +00:00
" Trustees
au BufNewFile,BufRead trustees.conf setf trustees
2004-06-13 20:20:40 +00:00
" TSS - Geometry
au BufNewFile,BufReadPost *.tssgm setf tssgm
" TSS - Optics
au BufNewFile,BufReadPost *.tssop setf tssop
" TSS - Command Line (temporary)
au BufNewFile,BufReadPost *.tsscl setf tsscl
" TSV Files
au BufNewFile,BufRead *.tsv setf tsv
2012-04-05 17:33:26 +02:00
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
" TypeScript or Qt translation file (which is XML)
au BufNewFile,BufReadPost *.ts
\ if getline(1) =~ '<?xml' |
\ setf xml |
\ else |
\ setf typescript |
\ endif
au BufNewFile,BufRead .ts_node_repl_history setf typescript
" TypeScript module and common
au BufNewFile,BufRead *.mts,*.cts setf typescript
" TypeScript with React
au BufNewFile,BufRead *.tsx setf typescriptreact
" TypeSpec files
au BufNewFile,BufRead *.tsp setf typespec
2004-06-13 20:20:40 +00:00
" Motif UIT/UIL files
au BufNewFile,BufRead *.uit,*.uil setf uil
2005-07-04 22:49:24 +00:00
" Udev conf
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf
2005-07-04 22:49:24 +00:00
" Udev permissions
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm
2005-07-04 22:49:24 +00:00
"
" Udev symlinks config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/udev/cdsymlinks.conf setf sh
2005-07-04 22:49:24 +00:00
" Ungrammar, AKA Un-grammar
au BufNewFile,BufRead *.ungram setf ungrammar
2004-06-13 20:20:40 +00:00
" UnrealScript
au BufNewFile,BufRead *.uc setf uc
2005-06-29 22:40:58 +00:00
" Updatedb
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/updatedb.conf setf updatedb
2005-06-29 22:40:58 +00:00
2011-03-22 14:05:35 +01:00
" Upstart (init(8)) config files
au BufNewFile,BufRead */usr/share/upstart/*.conf setf upstart
au BufNewFile,BufRead */usr/share/upstart/*.override setf upstart
2013-03-07 13:20:54 +01:00
au BufNewFile,BufRead */etc/init/*.conf,*/etc/init/*.override setf upstart
au BufNewFile,BufRead */.init/*.conf,*/.init/*.override setf upstart
au BufNewFile,BufRead */.config/upstart/*.conf setf upstart
au BufNewFile,BufRead */.config/upstart/*.override setf upstart
2011-03-22 14:05:35 +01:00
" URL shortcut
au BufNewFile,BufRead *.url setf urlshortcut
" V
au BufNewFile,BufRead *.vsh,*.vv setf v
" Vala
au BufNewFile,BufRead *.vala setf vala
" VDF
au BufNewFile,BufRead *.vdf setf vdf
" VDM
au BufRead,BufNewFile *.vdmpp,*.vpp setf vdmpp
au BufRead,BufNewFile *.vdmrt setf vdmrt
au BufRead,BufNewFile *.vdmsl,*.vdm setf vdmsl
" Vento
au BufNewFile,BufRead *.vto setf vento
2006-04-18 21:55:01 +00:00
" Vera
au BufNewFile,BufRead *.vr,*.vri,*.vrh setf vera
" Vagrant (uses Ruby syntax)
au BufNewFile,BufRead Vagrantfile setf ruby
" Verilog HDL, V or Coq
au BufNewFile,BufRead *.v call dist#ft#FTv()
2004-06-13 20:20:40 +00:00
2005-08-15 21:41:48 +00:00
" Verilog-AMS HDL
au BufNewFile,BufRead *.va,*.vams setf verilogams
" SystemVerilog
au BufNewFile,BufRead *.sv,*.svh setf systemverilog
" VHS tape
" .tape is also used by TapeCalc, which we do not support ATM. If TapeCalc
" support is needed the contents of the file needs to be inspected.
au BufNewFile,BufRead *.tape setf vhs
2004-06-13 20:20:40 +00:00
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl
2004-06-13 20:20:40 +00:00
" Vim script
au BufNewFile,BufRead *.vim,.exrc,_exrc,.netrwhist setf vim
2004-06-13 20:20:40 +00:00
" Viminfo file
au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
2010-01-06 20:54:52 +01:00
" Virata Config Script File or Drupal module
au BufRead,BufNewFile *.hw,*.module,*.pkg
\ if getline(1) =~ '<?php' |
\ setf php |
\ else |
\ setf virata |
\ endif
2004-06-13 20:20:40 +00:00
" Visual Basic (see also *.bas *.cls)
" Visual Basic or FORM
au BufNewFile,BufRead *.frm call dist#ft#FTfrm()
2004-06-13 20:20:40 +00:00
" Visual Basic
" user control, ActiveX document form, active designer, property page
au BufNewFile,BufRead *.ctl,*.dob,*.dsr,*.pag setf vb
" Visual Basic or Vimball Archiver
au BufNewFile,BufRead *.vba call dist#ft#FTvba()
" Visual Basic Project
au BufNewFile,BufRead *.vbp setf dosini
" VBScript (close to Visual Basic)
au BufNewFile,BufRead *.vbs setf vb
" Visual Basic .NET (close to Visual Basic)
au BufNewFile,BufRead *.vb setf vb
" Visual Studio Macro
au BufNewFile,BufRead *.dsm setf vb
" SaxBasic (close to Visual Basic)
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.sba setf vb
" Vgrindefs file
au BufNewFile,BufRead vgrindefs setf vgrindefs
" VRML V1.0c
au BufNewFile,BufRead *.wrl setf vrml
" Vroom (vim testing and executable documentation)
au BufNewFile,BufRead *.vroom setf vroom
" Vue.js Single File Component
au BufNewFile,BufRead *.vue setf vue
2004-06-13 20:20:40 +00:00
2018-07-31 22:23:58 +02:00
" WebAssembly
au BufNewFile,BufRead *.wat,*.wast setf wat
2018-07-31 22:23:58 +02:00
" WebAssembly Interface Type (WIT)
au BufNewFile,BufRead *.wit setf wit
" Webmacro
au BufNewFile,BufRead *.wm setf webmacro
2004-06-13 20:20:40 +00:00
" Wget config
au BufNewFile,BufRead .wgetrc,wgetrc setf wget
" Wget2 config
au BufNewFile,BufRead .wget2rc,wget2rc setf wget2
" WebGPU Shading Language (WGSL)
au BufNewFile,BufRead *.wgsl setf wgsl
2004-06-13 20:20:40 +00:00
" Website MetaLanguage
au BufNewFile,BufRead *.wml setf wml
" Winbatch
au BufNewFile,BufRead *.wbt setf winbatch
2006-03-13 22:15:53 +00:00
" WSML
au BufNewFile,BufRead *.wsml setf wsml
2017-11-02 22:58:42 +01:00
" WPL
au BufNewFile,BufRead *.wpl setf xml
2004-06-13 20:20:40 +00:00
" WvDial
au BufNewFile,BufRead wvdial.conf,.wvdialrc setf wvdial
" CVS RC file
au BufNewFile,BufRead .cvsrc setf cvsrc
" CVS commit file
au BufNewFile,BufRead cvs\d\+ setf cvs
" WEB (*.web is also used for Winbatch: Guess, based on expecting "%" comment
" lines in a WEB file).
au BufNewFile,BufRead *.web
\ if getline(1)[0].getline(2)[0].getline(3)[0].getline(4)[0].getline(5)[0] =~ "%" |
\ setf web |
\ else |
\ setf winbatch |
\ endif
" Windows Scripting Host and Windows Script Component
au BufNewFile,BufRead *.ws[fc] setf wsh
" Xdg-user-dirs
au BufNewFile,BufRead user-dirs.dirs,user-dirs.defaults setf sh
2007-05-05 18:24:42 +00:00
" XHTML
au BufNewFile,BufRead *.xhtml,*.xht setf xhtml
" X11vnc
au BufNewFile,BufRead .x11vncrc setf conf
" Xprofile
au BufNewFile,BufRead .xprofile setf sh
2021-10-04 21:32:54 +01:00
" X Pixmap (dynamically sets colors, this used to trigger on BufEnter to make
" it work better, but that breaks setting 'filetype' manually)
au BufNewFile,BufRead *.xpm
2004-06-13 20:20:40 +00:00
\ if getline(1) =~ "XPM2" |
\ setf xpm2 |
\ else |
\ setf xpm |
\ endif
2021-10-04 21:32:54 +01:00
au BufNewFile,BufRead *.xpm2 setf xpm2
2004-06-13 20:20:40 +00:00
" XFree86 config
au BufNewFile,BufRead XF86Config
\ if getline(1) =~ '\<XConfigurator\>' |
2011-04-28 19:02:44 +02:00
\ let b:xf86conf_xfree86_version = 3 |
2004-06-13 20:20:40 +00:00
\ endif |
\ setf xf86conf
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */xorg.conf.d/*.conf
\ let b:xf86conf_xfree86_version = 4 |
\ setf xf86conf
2004-06-13 20:20:40 +00:00
" Xorg config
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
" Xinetd conf
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
2005-06-29 22:40:58 +00:00
" Xilinx Vivado/Vitis project files and block design files
au BufNewFile,BufRead *.xpr,*.xpfm,*.spfm,*.bxml setf xml
au BufNewFile,BufRead *.bd,*.bda,*.xci setf json
2004-06-13 20:20:40 +00:00
" XS Perl extension interface language
au BufNewFile,BufRead *.xs setf xs
" X compose file
au BufNewFile,BufRead .XCompose,Compose setf xcompose
2004-06-13 20:20:40 +00:00
" X resources file
au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
" Xmath
au BufNewFile,BufRead *.msc,*.msf setf xmath
au BufNewFile,BufRead *.ms
\ if !dist#ft#FTnroff() | setf xmath | endif
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" XML specific variants: docbk and xbl
au BufNewFile,BufRead *.xml call dist#ft#FTxml()
2004-06-13 20:20:40 +00:00
" XMI (holding UML models) is also XML
au BufNewFile,BufRead *.xmi setf xml
" CSPROJ files are Visual Studio.NET's XML-based C# project config files
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *.csproj,*.csproj.user setf xml
" FSPROJ files are Visual Studio.NET's XML-based F# project config files
au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
2023-08-09 21:50:52 +07:00
" Unison Language
au BufNewFile,BufRead *.u,*.uu setf unison
2004-06-13 20:20:40 +00:00
" Qt Linguist translation source and Qt User Interface Files are XML
" However, for .ts TypeScript is more common.
au BufNewFile,BufRead *.ui setf xml
2004-06-13 20:20:40 +00:00
2007-05-05 18:24:42 +00:00
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)
au BufNewFile,BufRead *.tpm setf xml
2005-07-04 22:49:24 +00:00
" Xdg menus
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml
2005-07-04 22:49:24 +00:00
2008-06-25 20:13:35 +00:00
" ATI graphics driver configuration
au BufNewFile,BufRead fglrxrc setf xml
2018-08-11 18:00:22 +02:00
" Web Services Description Language (WSDL)
au BufNewFile,BufRead *.wsdl setf xml
" Workflow Description Language (WDL)
au BufNewFile,BufRead *.wdl setf wdl
2008-06-25 20:13:35 +00:00
" XLIFF (XML Localisation Interchange File Format) is also XML
au BufNewFile,BufRead *.xlf setf xml
au BufNewFile,BufRead *.xliff setf xml
" XML User Interface Language
au BufNewFile,BufRead *.xul setf xml
2008-06-25 20:13:35 +00:00
" X11 xmodmap (also see below)
au BufNewFile,BufRead *Xmodmap setf xmodmap
2005-07-18 21:58:11 +00:00
" Xquery
au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery
2004-06-13 20:20:40 +00:00
" XSD
au BufNewFile,BufRead *.xsd setf xsd
" Xslt
au BufNewFile,BufRead *.xsl,*.xslt setf xslt
" Yacc
2014-03-08 18:38:28 +01:00
au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
2005-06-29 22:40:58 +00:00
" Yacc or racc
au BufNewFile,BufRead *.y call dist#ft#FTy()
2004-06-13 20:20:40 +00:00
" Yaml
au BufNewFile,BufRead *.yaml,*.yml,*.eyaml setf yaml
" Raml
au BufNewFile,BufRead *.raml setf raml
2004-06-13 20:20:40 +00:00
2011-09-14 17:55:08 +02:00
" yum conf (close enough to dosini)
2013-03-19 11:35:58 +01:00
au BufNewFile,BufRead */etc/yum.conf setf dosini
2011-09-14 17:55:08 +02:00
" YANG
au BufRead,BufNewFile *.yang setf yang
" Yuck
au BufNewFile,BufRead *.yuck setf yuck
2012-05-18 13:46:39 +02:00
" Zimbu
2013-03-19 11:35:58 +01:00
au BufNewFile,BufRead *.zu setf zimbu
2014-12-06 23:33:00 +01:00
" Zimbu Templates
au BufNewFile,BufRead *.zut setf zimbutempl
2012-05-18 13:46:39 +02:00
2006-03-26 21:06:50 +00:00
" Zope
" dtml (zope dynamic template markup language), pt (zope page template),
" cpt (zope form controller page template)
au BufNewFile,BufRead *.dtml,*.pt,*.cpt call dist#ft#FThtml()
2006-03-26 21:06:50 +00:00
" zsql (zope sql method)
au BufNewFile,BufRead *.zsql call dist#ft#SQL()
2006-03-26 21:06:50 +00:00
2004-06-13 20:20:40 +00:00
" Z80 assembler asz80
au BufNewFile,BufRead *.z8a setf z8a
augroup END
" Source the user-specified filetype file, for backwards compatibility with
" Vim 5.x.
2005-03-18 20:25:31 +00:00
if exists("myfiletypefile") && filereadable(expand(myfiletypefile))
2004-06-13 20:20:40 +00:00
execute "source " . myfiletypefile
endif
" Check for "*" after loading myfiletypefile, so that scripts.vim is only used
" when there are no matching file name extensions.
" Don't do this for compressed files.
augroup filetypedetect
au BufNewFile,BufRead *
\ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
\ | runtime! scripts.vim | endif
au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
" Plain text files, needs to be far down to not override others. This avoids
" the "conf" type being used if there is a line starting with '#'.
" But before patterns matching everything in a directory.
au BufNewFile,BufRead *.text,README,LICENSE,COPYING,AUTHORS setf text
" What should *.out files be? Text?
" Disabled until it is clear, to what this should be set
"au BufNewFile,BufRead *.out setf text
2004-06-13 20:20:40 +00:00
" Extra checks for when no filetype has been detected now. Mostly used for
" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim
" script file.
2005-03-18 20:25:31 +00:00
" Most of these should call s:StarSetf() to avoid names ending in .gz and the
" like are used.
2004-06-13 20:20:40 +00:00
2017-12-17 17:17:07 +01:00
" More Apache style config files
au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle')
2019-04-04 13:11:03 +02:00
au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
2017-12-17 17:17:07 +01:00
2011-04-01 18:03:16 +02:00
" More Apache config files
au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache')
au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache')
2008-07-13 17:41:49 +00:00
" APT config file
au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} call s:StarSetf('aptconf')
2005-09-20 23:22:24 +00:00
" Asterisk config file
2006-04-30 18:54:39 +00:00
au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk')
2006-03-21 21:29:36 +00:00
au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm')
2005-09-20 23:22:24 +00:00
2007-05-05 18:24:42 +00:00
" Bazaar version control
au BufNewFile,BufRead bzr_log.* setf bzr
" Bazel and Buck2 build file
if !has("fname_case")
au BufNewFile,BufRead *.BUILD,BUILD,BUCK setf bzl
endif
2004-06-13 20:20:40 +00:00
" BIND zone
2006-03-25 21:59:56 +00:00
au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead cabal.project.* call s:StarSetf('cabalproject')
2011-04-28 19:02:44 +02:00
" Calendar
au BufNewFile,BufRead */.calendar/*,
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
\ call s:StarSetf('calendar')
2004-06-13 20:20:40 +00:00
" Changelog
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead [cC]hange[lL]og*
\ if getline(1) =~ '; urgency='
\| call s:StarSetf('debchangelog')
\|else
\| call s:StarSetf('changelog')
\|endif
2004-06-13 20:20:40 +00:00
" Crontab
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab')
2006-03-28 21:08:56 +00:00
2011-04-28 19:02:44 +02:00
" dnsmasq(8) configuration
au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq')
" Dockerfile
au BufNewFile,BufRead Dockerfile.*,Containerfile.* call s:StarSetf('dockerfile')
2004-06-13 20:20:40 +00:00
" Dracula
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
2004-06-13 20:20:40 +00:00
" Fvwm
2007-05-05 18:24:42 +00:00
au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm')
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook
2005-03-18 20:25:31 +00:00
\ let b:fvwm_version = 1 | call s:StarSetf('fvwm')
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *fvwm2rc*
2005-03-18 20:25:31 +00:00
\ if expand("<afile>:e") == "m4"
\| call s:StarSetf('fvwm2m4')
\|else
\| let b:fvwm_version = 2 | call s:StarSetf('fvwm')
\|endif
2004-06-13 20:20:40 +00:00
2010-01-06 20:54:52 +01:00
" Gedcom
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
2010-01-06 20:54:52 +01:00
2019-04-04 13:11:03 +02:00
" Git
au BufNewFile,BufRead */.gitconfig.d/*,*/etc/gitconfig.d/* call s:StarSetf('gitconfig')
2019-04-04 13:11:03 +02:00
" Gitolite
au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
2004-06-13 20:20:40 +00:00
" GTK RC
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
2004-06-13 20:20:40 +00:00
" Jam
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam')
2004-06-13 20:20:40 +00:00
" Jargon
au! BufNewFile,BufRead *jarg*
2005-03-18 20:25:31 +00:00
\ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE'
\| call s:StarSetf('jargon')
\|endif
2004-06-13 20:20:40 +00:00
2019-04-04 13:11:03 +02:00
" Java Properties resource file (note: doesn't catch font.properties.pl)
au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
2006-04-19 21:23:36 +00:00
" Kconfig
au BufNewFile,BufRead Kconfig.*,Config.in.* call s:StarSetf('kconfig')
2006-04-19 21:23:36 +00:00
2011-04-28 19:02:44 +02:00
" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
" Libsensors
au BufNewFile,BufRead */etc/sensors.d/[^.]* call s:StarSetf('sensors')
" Logcheck
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck')
2004-06-13 20:20:40 +00:00
" Makefile
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
2004-06-13 20:20:40 +00:00
" Ruby Makefile
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
2004-06-13 20:20:40 +00:00
2008-06-25 20:13:35 +00:00
" Mail (also matches muttrc.vim, so this is below the other checks)
2017-11-02 22:58:42 +01:00
au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\} setf mail
2008-06-25 20:13:35 +00:00
2016-07-17 13:35:14 +02:00
au BufNewFile,BufRead reportbug-* call s:StarSetf('mail')
2008-06-25 20:13:35 +00:00
" Modconf
2011-04-28 19:02:44 +02:00
au BufNewFile,BufRead */etc/modutils/*
\ if executable(expand("<afile>")) != 1
\| call s:StarSetf('modconf')
\|endif
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf')
2008-06-25 20:13:35 +00:00
" Mutt setup files (must be before catch *.rc)
au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
2004-06-13 20:20:40 +00:00
" Mutt setup file
2008-06-25 20:13:35 +00:00
au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
2005-08-19 20:40:30 +00:00
au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc')
2004-06-13 20:20:40 +00:00
2017-11-02 22:58:42 +01:00
" Neomutt setup file
au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc* call s:StarSetf('neomuttrc')
au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc')
" Nfs
au BufNewFile,BufRead nfs.conf,nfsmount.conf setf dosini
2004-06-13 20:20:40 +00:00
" Nroff macros
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
2004-06-13 20:20:40 +00:00
2016-11-06 14:48:06 +01:00
" OpenBSD hostname.if
au BufNewFile,BufRead */etc/hostname.* call s:StarSetf('config')
2016-11-06 14:48:06 +01:00
2005-06-29 22:40:58 +00:00
" Pam conf
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
2005-06-29 22:40:58 +00:00
" Pandoc
au BufNewFile,BufRead,BufFilePost *.pandoc,*.pdk,*.pd,*.pdc setf pandoc
2004-06-13 20:20:40 +00:00
" Printcap and Termcap
au BufNewFile,BufRead *printcap*
2005-03-18 20:25:31 +00:00
\ if !did_filetype()
\| let b:ptcap_type = "print" | call s:StarSetf('ptcap')
\|endif
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead *termcap*
2005-03-18 20:25:31 +00:00
\ if !did_filetype()
\| let b:ptcap_type = "term" | call s:StarSetf('ptcap')
\|endif
2004-06-13 20:20:40 +00:00
2013-04-12 15:09:51 +02:00
" ReDIF
" Only used when the .rdf file was not detected to be XML.
au BufRead,BufNewFile *.rdf call dist#ft#Redif()
2013-04-12 15:09:51 +02:00
2011-04-28 19:02:44 +02:00
" Remind
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
2019-04-04 13:11:03 +02:00
" SGML catalog file
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Stylus
au BufNewFile,BufReadPost *.styl,*.stylus setf stylus
" avoid doc files being recognized a shell files
au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text
" Shell scripts ending in a star
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
" Sudoers
au BufNewFile,BufRead */etc/sudoers.d/* call s:StarSetf('sudoers')
" tcsh scripts ending in a star
au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
" csh scripts ending in a star
au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
" tmux configuration with arbitrary extension
au BufNewFile,BufRead {.,}tmux*.conf* setf tmux
" Universal Scene Description
au BufNewFile,BufRead *.usda,*.usd setf usd
" UCI
" UCI files are normally in /etc/config, but that might be mounted over sshfs or similar, so we match more loosely.
" There was some concern[1] that this pattern would match too much, so now we check the file content as well.
" [1]: https://github.com/vim/vim/pull/14385#discussion_r1558878741
au BufNewFile,BufRead */etc/config/* if dist#ft#Detect_UCI_statements() | call s:StarSetf('uci') | endif
2019-04-04 13:11:03 +02:00
" VHDL
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
2004-06-13 20:20:40 +00:00
" Vim script
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
2004-06-13 20:20:40 +00:00
" Subversion commit file
2004-12-31 20:58:58 +00:00
au BufNewFile,BufRead svn-commit*.tmp setf svn
2004-06-13 20:20:40 +00:00
" X resources file
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
2004-06-13 20:20:40 +00:00
" XFree86 config
au BufNewFile,BufRead XF86Config-4*
2011-04-01 18:03:16 +02:00
\ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf')
2004-06-13 20:20:40 +00:00
au BufNewFile,BufRead XF86Config*
2005-03-18 20:25:31 +00:00
\ if getline(1) =~ '\<XConfigurator\>'
2011-04-01 18:03:16 +02:00
\| let b:xf86conf_xfree86_version = 3
2005-03-18 20:25:31 +00:00
\|endif
\|call s:StarSetf('xf86conf')
2004-06-13 20:20:40 +00:00
" XKB
au BufNewFile,BufRead */usr/share/X11/xkb/{compat,geometry,keycodes,symbols,types}/* call s:StarSetf('xkb')
2004-06-13 20:20:40 +00:00
" X11 xmodmap
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
2004-06-13 20:20:40 +00:00
2005-06-29 22:40:58 +00:00
" Xinetd conf
2011-04-01 18:03:16 +02:00
au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
2005-06-29 22:40:58 +00:00
2011-09-14 17:55:08 +02:00
" yum conf (close enough to dosini)
2013-03-19 11:35:58 +01:00
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
2011-09-14 17:55:08 +02:00
" Z-Shell script ending in a star
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
2005-03-18 20:25:31 +00:00
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
2004-06-13 20:20:40 +00:00
" Zsh module
" mdd: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L285-L288
" mdh, pro: https://github.com/zsh-users/zsh/blob/57248b88830ce56adc243a40c7773fb3825cab34/Etc/zsh-development-guide#L268-L271
" *.mdd will generate *.mdh, *.pro and *.epro.
" module's *.c will #include *.mdh containing module dependency information and
" *.pro containing all static declarations of *.c
" *.epro contains all external declarations of *.c
au BufNewFile,BufRead *.mdh,*.epro setf c
au BufNewFile,BufRead *.mdd setf sh
2004-06-13 20:20:40 +00:00
" Help files match *.txt but should have a last line that is a modeline.
au BufNewFile,BufRead *.txt
\ if getline('$') !~ 'vim:.*ft=help'
\| setf text
\| endif
2011-12-30 13:11:27 +01:00
" Blueprint markup files
au BufNewFile,BufRead *.blp setf blueprint
2009-12-02 11:08:38 +00:00
" Blueprint build system file
au BufNewFile,BufRead *.bp setf bp
2009-12-02 11:08:38 +00:00
" Use the filetype detect plugins. They may overrule any of the previously
" detected filetypes.
runtime! ftdetect/*.vim
" NOTE: The above command could have ended the filetypedetect autocmd group
2012-02-13 00:05:22 +01:00
" and started another one. Let's make sure it has ended to get to a consistent
" state.
augroup END
2009-12-02 11:08:38 +00:00
" Generic configuration file. Use FALLBACK, it's just guessing!
au filetypedetect BufNewFile,BufRead,StdinReadPost *
2004-06-13 20:20:40 +00:00
\ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat
\ && (expand("<amatch>") =~# '\.conf$'
\ || getline(1) =~ '^#' || getline(2) =~ '^#'
\ || getline(3) =~ '^#' || getline(4) =~ '^#'
\ || getline(5) =~ '^#') |
\ setf FALLBACK conf |
2004-06-13 20:20:40 +00:00
\ endif
" Yarn lock
au BufNewFile,BufRead yarn.lock setf yaml
" Zathurarc
au BufNewFile,BufRead zathurarc setf zathurarc
2004-06-13 20:20:40 +00:00
" If the GUI is already running, may still need to install the Syntax menu.
" Don't do it when the 'M' flag is included in 'guioptions'.
if has("menu") && has("gui_running")
\ && !exists("did_install_syntax_menu") && &guioptions !~# "M"
source <sfile>:p:h/menu.vim
endif
2007-05-10 18:44:18 +00:00
" Function called for testing all functions defined here. These are
" script-local, thus need to be executed here.
" Returns a string with error messages (hopefully empty).
func TestFiletypeFuncs(testlist)
2007-05-10 18:44:18 +00:00
let output = ''
for f in a:testlist
try
exe f
catch
let output = output . "\n" . f . ": " . v:exception
endtry
endfor
return output
endfunc
2004-06-13 20:20:40 +00:00
" Restore 'cpoptions'
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8