summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-10-02 03:42:03 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-10-02 03:42:03 +0200
commit94ec9c38e744241e48fb8d75ae6e8811bc73fc59 (patch)
tree03940b00ce5d9a494253af5d2976d095a11a5d2f /ftdetect/polyglot.vim
parentbff55a54fa8a70e664ebe8a614681dd0d92d66b6 (diff)
downloadvim-polyglot-94ec9c38e744241e48fb8d75ae6e8811bc73fc59.tar.gz
vim-polyglot-94ec9c38e744241e48fb8d75ae6e8811bc73fc59.zip
Do not use ++once to support older vims, fixes #7056
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim107
1 files changed, 54 insertions, 53 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 498450d8..b3d04eff 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -1006,6 +1006,7 @@ if !has_key(s:disabled_packages, '8th')
au BufNewFile,BufRead *.8th setf 8th
endif
+
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
@@ -1245,7 +1246,7 @@ endif
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
" Abaqus or Trasys
-au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
+au BufNewFile,BufRead *.inp call polyglot#ft#Check_inp()
" 8th (Firth-derivative)
au BufNewFile,BufRead *.8th setf 8th
@@ -1351,7 +1352,7 @@ au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf
" 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()
+au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call polyglot#ft#FTasm()
" Macro (VAX)
au BufNewFile,BufRead *.mar setf vmasm
@@ -1381,7 +1382,7 @@ au BufNewFile,BufRead *.awk,*.gawk setf awk
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
" BASIC or Visual Basic
-au BufNewFile,BufRead *.bas call dist#ft#FTVB("basic")
+au BufNewFile,BufRead *.bas call polyglot#ft#FTVB("basic")
" Visual Basic Script (close to Visual Basic) or Visual Basic .NET
au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb
@@ -1399,7 +1400,7 @@ au BufNewFile,BufRead *.cmd
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
" Batch file for 4DOS
-au BufNewFile,BufRead *.btm call dist#ft#FTbtm()
+au BufNewFile,BufRead *.btm call polyglot#ft#FTbtm()
" BC calculator
au BufNewFile,BufRead *.bc setf bc
@@ -1419,7 +1420,7 @@ au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named
" BIND zone
au BufNewFile,BufRead named.root setf bindzone
-au BufNewFile,BufRead *.db call dist#ft#BindzoneCheck('')
+au BufNewFile,BufRead *.db call polyglot#ft#BindzoneCheck('')
" Blank
au BufNewFile,BufRead *.bl setf blank
@@ -1438,7 +1439,7 @@ if has("fname_case")
endif
" C or lpc
-au BufNewFile,BufRead *.c call dist#ft#FTlpc()
+au BufNewFile,BufRead *.c call polyglot#ft#FTlpc()
au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
" Calendar
@@ -1493,7 +1494,7 @@ endif
" .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()
+au BufNewFile,BufRead *.h call polyglot#ft#FTheader()
" Ch (CHscript)
au BufNewFile,BufRead *.chf setf ch
@@ -1527,7 +1528,7 @@ au BufNewFile,BufRead NEWS
au BufNewFile,BufRead *..ch setf chill
" Changes for WEB and CWEB or CHILL
-au BufNewFile,BufRead *.ch call dist#ft#FTchange()
+au BufNewFile,BufRead *.ch call polyglot#ft#FTchange()
" ChordPro
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
@@ -1539,7 +1540,7 @@ au BufNewFile,BufRead *.dcl,*.icl setf clean
au BufNewFile,BufRead *.eni setf cl
" Clever or dtd
-au BufNewFile,BufRead *.ent call dist#ft#FTent()
+au BufNewFile,BufRead *.ent call polyglot#ft#FTent()
" Clipper (or FoxPro; could also be eviews)
au BufNewFile,BufRead *.prg
@@ -1594,9 +1595,9 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
" Euphoria 3 or 4
-au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
+au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call polyglot#ft#EuphoriaCheck()
if has("fname_case")
- au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
+ au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call polyglot#ft#EuphoriaCheck()
endif
" Lynx config files
@@ -1653,7 +1654,7 @@ au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq
au BufNewFile,BufRead *.desc setf desc
" the D language or dtrace
-au BufNewFile,BufRead *.d call dist#ft#DtraceCheck()
+au BufNewFile,BufRead *.d call polyglot#ft#DtraceCheck()
" Desktop files
au BufNewFile,BufRead *.desktop,*.directory setf desktop
@@ -1685,7 +1686,7 @@ au BufNewFile,BufRead *.rul
\ endif
" DCL (Digital Command Language - vms) or DNS zone file
-au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
+au BufNewFile,BufRead *.com call polyglot#ft#BindzoneCheck('dcl')
" DOT
au BufNewFile,BufRead *.dot,*.gv setf dot
@@ -1733,7 +1734,7 @@ au BufNewFile,BufRead .editorconfig setf dosini
au BufNewFile,BufRead *.ecd setf ecd
" Eiffel or Specman or Euphoria
-au BufNewFile,BufRead *.e,*.E call dist#ft#FTe()
+au BufNewFile,BufRead *.e,*.E call polyglot#ft#FTe()
" Elinks configuration
au BufNewFile,BufRead elinks.conf setf elinks
@@ -1911,7 +1912,7 @@ au BufRead,BufNewFile *.hws setf hollywood
au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side)
-au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
+au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call polyglot#ft#FThtml()
" HTML with Ruby - eRuby
au BufNewFile,BufRead *.erb,*.rhtml setf eruby
@@ -1938,7 +1939,7 @@ au BufNewFile,BufRead *.htt,*.htb setf httest
au BufNewFile,BufRead *.icn setf icon
" IDL (Interface Description Language)
-au BufNewFile,BufRead *.idl call dist#ft#FTidl()
+au BufNewFile,BufRead *.idl call polyglot#ft#FTidl()
" Microsoft IDL (Interface Description Language) Also *.idl
" MOF = WMI (Windows Management Instrumentation) Managed Object Format
@@ -1949,10 +1950,10 @@ au BufNewFile,BufRead */.icewm/menu setf icemenu
" Indent profile (must come before IDL *.pro!)
au BufNewFile,BufRead .indent.pro setf indent
-au BufNewFile,BufRead indent.pro call dist#ft#ProtoCheck('indent')
+au BufNewFile,BufRead indent.pro call polyglot#ft#ProtoCheck('indent')
" IDL (Interactive Data Language)
-au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
+au BufNewFile,BufRead *.pro call polyglot#ft#ProtoCheck('idlang')
" Indent RC
au BufNewFile,BufRead indentrc setf indent
@@ -2172,7 +2173,7 @@ au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown
au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason
" Mathematica, Matlab, Murphi or Objective C
-au BufNewFile,BufRead *.m call dist#ft#FTm()
+au BufNewFile,BufRead *.m call polyglot#ft#FTm()
" Mathematica notebook
au BufNewFile,BufRead *.nb setf mma
@@ -2205,7 +2206,7 @@ au BufNewFile,BufRead *.mgl setf mgl
au BufNewFile,BufRead *.mix,*.mixal setf mix
" MMIX or VMS makefile
-au BufNewFile,BufRead *.mms call dist#ft#FTmms()
+au BufNewFile,BufRead *.mms call polyglot#ft#FTmms()
" Symbian meta-makefile definition (MMP)
au BufNewFile,BufRead *.mmp setf mmp
@@ -2296,10 +2297,10 @@ au BufNewFile,BufRead *.me
\ setf nroff |
\ endif
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
-au BufNewFile,BufRead *.[1-9] call dist#ft#FTnroff()
+au BufNewFile,BufRead *.[1-9] call polyglot#ft#FTnroff()
" Nroff or Objective C++
-au BufNewFile,BufRead *.mm call dist#ft#FTmm()
+au BufNewFile,BufRead *.mm call polyglot#ft#FTmm()
" Not Quite C
au BufNewFile,BufRead *.nqc setf nqc
@@ -2366,9 +2367,9 @@ au BufNewFile,BufRead *.pcmk setf pcmk
" Perl
if has("fname_case")
- au BufNewFile,BufRead *.pl,*.PL call dist#ft#FTpl()
+ au BufNewFile,BufRead *.pl,*.PL call polyglot#ft#FTpl()
else
- au BufNewFile,BufRead *.pl call dist#ft#FTpl()
+ au BufNewFile,BufRead *.pl call polyglot#ft#FTpl()
endif
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
@@ -2444,7 +2445,7 @@ au BufNewFile,BufRead *.pov setf pov
au BufNewFile,BufRead .povrayrc setf povini
" Povray, PHP or assembly
-au BufNewFile,BufRead *.inc call dist#ft#FTinc()
+au BufNewFile,BufRead *.inc call polyglot#ft#FTinc()
" Printcap and Termcap
au BufNewFile,BufRead *printcap
@@ -2473,13 +2474,13 @@ au BufNewFile,BufRead *.action setf privoxy
au BufNewFile,BufRead .procmail,.procmailrc setf procmail
" Progress or CWEB
-au BufNewFile,BufRead *.w call dist#ft#FTprogress_cweb()
+au BufNewFile,BufRead *.w call polyglot#ft#FTprogress_cweb()
" Progress or assembly
-au BufNewFile,BufRead *.i call dist#ft#FTprogress_asm()
+au BufNewFile,BufRead *.i call polyglot#ft#FTprogress_asm()
" Progress or Pascal
-au BufNewFile,BufRead *.p call dist#ft#FTprogress_pascal()
+au BufNewFile,BufRead *.p call polyglot#ft#FTprogress_pascal()
" Software Distributor Product Specification File (POSIX 1387.2-1995)
au BufNewFile,BufRead *.psf setf psf
@@ -2569,7 +2570,7 @@ else
endif
" Rexx, Rebol or R
-au BufNewFile,BufRead *.r,*.R call dist#ft#FTr()
+au BufNewFile,BufRead *.r,*.R call polyglot#ft#FTr()
" Remind
au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind
@@ -2665,7 +2666,7 @@ au BufNewFile,BufRead *.siv,*.sieve setf sieve
au BufNewFile,BufRead sendmail.cf setf sm
" Sendmail .mc files are actually m4. Could also be MS Message text file.
-au BufNewFile,BufRead *.mc call dist#ft#McSetf()
+au BufNewFile,BufRead *.mc call polyglot#ft#McSetf()
" Services
au BufNewFile,BufRead */etc/services setf services
@@ -2706,9 +2707,9 @@ au BufNewFile,BufRead catalog setf catalog
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds and Arch Linux PKGBUILDs 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-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD 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))
+au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call polyglot#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .kshrc,*.ksh call polyglot#ft#SetFileTypeSH("ksh")
+au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call polyglot#ft#SetFileTypeSH(getline(1))
" Shell script (Arch Linux) or PHP file (Drupal)
@@ -2716,15 +2717,15 @@ au BufNewFile,BufRead *.install
\ if getline(1) =~ '<?php' |
\ setf php |
\ else |
- \ call dist#ft#SetFileTypeSH("bash") |
+ \ call polyglot#ft#SetFileTypeSH("bash") |
\ endif
" tcsh scripts (patterns ending in a star further below)
-au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFileTypeShell("tcsh")
+au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call polyglot#ft#SetFileTypeShell("tcsh")
" 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()
+au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call polyglot#ft#CSH()
" Z-Shell script (patterns ending in a star further below)
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
@@ -2795,7 +2796,7 @@ au BufNewFile,BufRead *.mib,*.my setf mib
" Snort Configuration
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
-au BufNewFile,BufRead *.rules call dist#ft#FTRules()
+au BufNewFile,BufRead *.rules call polyglot#ft#FTRules()
" Spec (Linux RPM)
au BufNewFile,BufRead *.spec setf spec
@@ -2819,7 +2820,7 @@ au BufNewFile,BufRead squid.conf setf squid
au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
" SQL
-au BufNewFile,BufRead *.sql call dist#ft#SQL()
+au BufNewFile,BufRead *.sql call polyglot#ft#SQL()
" SQLJ
au BufNewFile,BufRead *.sqlj setf sqlj
@@ -2885,8 +2886,8 @@ au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
au BufNewFile,BufRead *.svg setf svg
" Tads (or Nroff or Perl test file)
-au BufNewFile,BufRead *.t
- \ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
+"au BufNewFile,BufRead *.t
+" \ if !polyglot#ft#FTnroff() && !polyglot#ft#FTperl() | setf tads | endif
" Tags
au BufNewFile,BufRead tags setf tags
@@ -2915,7 +2916,7 @@ au BufNewFile,BufRead *.ti setf terminfo
" TeX
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
-au BufNewFile,BufRead *.tex call dist#ft#FTtex()
+au BufNewFile,BufRead *.tex call polyglot#ft#FTtex()
" ConTeXt
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
@@ -3018,7 +3019,7 @@ au BufRead,BufNewFile *.hw,*.module,*.pkg
\ endif
" Visual Basic (also uses *.bas) or FORM
-au BufNewFile,BufRead *.frm call dist#ft#FTVB("form")
+au BufNewFile,BufRead *.frm call polyglot#ft#FTVB("form")
" SaxBasic is close to Visual Basic
au BufNewFile,BufRead *.sba setf vb
@@ -3114,10 +3115,10 @@ au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xd
" Xmath
au BufNewFile,BufRead *.msc,*.msf setf xmath
au BufNewFile,BufRead *.ms
- \ if !dist#ft#FTnroff() | setf xmath | endif
+ \ if !polyglot#ft#FTnroff() | setf xmath | endif
" XML specific variants: docbk and xbl
-au BufNewFile,BufRead *.xml call dist#ft#FTxml()
+au BufNewFile,BufRead *.xml call polyglot#ft#FTxml()
" XMI (holding UML models) is also XML
au BufNewFile,BufRead *.xmi setf xml
@@ -3164,7 +3165,7 @@ au BufNewFile,BufRead *.xsl,*.xslt setf xslt
au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc
" Yacc or racc
-au BufNewFile,BufRead *.y call dist#ft#FTy()
+au BufNewFile,BufRead *.y call polyglot#ft#FTy()
" Yaml
au BufNewFile,BufRead *.yaml,*.yml setf yaml
@@ -3183,9 +3184,9 @@ au BufNewFile,BufRead *.zut setf zimbutempl
" 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()
+au BufNewFile,BufRead *.dtml,*.pt,*.cpt call polyglot#ft#FThtml()
" zsql (zope sql method)
-au BufNewFile,BufRead *.zsql call dist#ft#SQL()
+au BufNewFile,BufRead *.zsql call polyglot#ft#SQL()
" Z80 assembler asz80
au BufNewFile,BufRead *.z8a setf z8a
@@ -3352,7 +3353,7 @@ au BufNewFile,BufRead *termcap*
" ReDIF
" Only used when the .rdf file was not detected to be XML.
-au BufRead,BufNewFile *.rdf call dist#ft#Redif()
+au BufRead,BufNewFile *.rdf call polyglot#ft#Redif()
" Remind
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
@@ -3361,15 +3362,15 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts ending in a star
-au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
-au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
-au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
+au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call polyglot#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh")
+au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1))
" tcsh scripts ending in a star
-au BufNewFile,BufRead .tcshrc* call dist#ft#SetFileTypeShell("tcsh")
+au BufNewFile,BufRead .tcshrc* call polyglot#ft#SetFileTypeShell("tcsh")
" csh scripts ending in a star
-au BufNewFile,BufRead .login*,.cshrc* call dist#ft#CSH()
+au BufNewFile,BufRead .login*,.cshrc* call polyglot#ft#CSH()
" VHDL
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')