mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ac0dd5a80 | ||
|
|
e95c5f49aa | ||
|
|
ba11e0f1ad | ||
|
|
c45f0b8f64 | ||
|
|
bbee246aae | ||
|
|
3da600ac30 | ||
|
|
0d48ba9245 | ||
|
|
1993b9f68f | ||
|
|
bb3de8fa5e | ||
|
|
b3763a917a |
@@ -7,7 +7,7 @@ A collection of language packs for Vim.
|
||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->590<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->593<!--/Package Count--> packages it consists of.
|
||||
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
@@ -163,7 +163,6 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
||||
- [rst](https://github.com/marshallward/vim-restructuredtext)
|
||||
- [ruby](https://github.com/vim-ruby/vim-ruby)
|
||||
- [rust](https://github.com/rust-lang/rust.vim)
|
||||
- [sbt](https://github.com/derekwyatt/vim-sbt)
|
||||
- [scala](https://github.com/derekwyatt/vim-scala)
|
||||
- [scss](https://github.com/cakebaker/scss-syntax.vim)
|
||||
- [sh](https://github.com/arzg/vim-sh)
|
||||
|
||||
13
after/ftplugin/html.vim
Normal file
13
after/ftplugin/html.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
|
||||
" Maintainer: othree <othree@gmail.com>
|
||||
" URL: http://github.com/othree/html5.vim
|
||||
" Last Change: 2014-05-02
|
||||
" License: MIT
|
||||
" Changes: Add - to keyword
|
||||
|
||||
" setlocal iskeyword+=-
|
||||
|
||||
setlocal commentstring=<!--%s-->
|
||||
|
||||
endif
|
||||
1064
after/indent/html.vim
Normal file
1064
after/indent/html.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,20 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
|
||||
" Original Author: Jon Haggblad <https://github.com/octol>
|
||||
" Maintainer: bfrg <https://github.com/bfrg>
|
||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||
" Last Change: Oct 4, 2020
|
||||
" Last Change: Oct 8, 2020
|
||||
"
|
||||
" This syntax file is based on:
|
||||
" https://github.com/octol/vim-cpp-enhanced-highlight
|
||||
" http://www.vim.org/scripts/script.php?script_id=4293
|
||||
" ==============================================================================
|
||||
|
||||
" C++ attributes {{{1
|
||||
if get(g:, 'cpp_attributes_highlight', 0)
|
||||
syntax region cppAttribute matchgroup=cppAttributeBrackets start='\[\[' end=']]' contains=cString
|
||||
hi def link cppAttribute Macro
|
||||
hi def link cppAttributeBrackets Identifier
|
||||
endif
|
||||
|
||||
|
||||
" Standard library {{{1
|
||||
syntax keyword cppSTLdefine
|
||||
\ MB_CUR_MAX MB_LEN_MAX WCHAR_MAX WCHAR_MIN WEOF __STDC_UTF_16__ __STDC_UTF_32__
|
||||
|
||||
@@ -2,11 +2,195 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: HTML (version 5.1)
|
||||
" Last Change: 2017 Feb 15
|
||||
" SVG (SVG 1.1 Second Edition)
|
||||
" MathML (MathML 3.0 Second Edition)
|
||||
" Last Change: 2017 Mar 07
|
||||
" License: Public domain
|
||||
" (but let me know if you like :) )
|
||||
"
|
||||
" Note: This file just add new tags from HTML 5
|
||||
" and don't replace default html.vim syntax file
|
||||
"
|
||||
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
|
||||
" Changes: update to Draft 2016 Jan 13
|
||||
" add microdata Attributes
|
||||
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
|
||||
" URL: http://rm.blog.br/vim/syntax/html.vim
|
||||
" Modified: htdebeer <H.T.de.Beer@gmail.com>
|
||||
" Changes: add common SVG elements and attributes for inline SVG
|
||||
|
||||
" Patch 7.4.1142
|
||||
if has("patch-7.4-1142")
|
||||
if has("win32")
|
||||
syn iskeyword @,48-57,_,128-167,224-235,-
|
||||
else
|
||||
syn iskeyword @,48-57,_,192-255,-
|
||||
endif
|
||||
endif
|
||||
|
||||
" HTML 5 tags
|
||||
syn keyword htmlTagName contained article aside audio canvas command
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||
syn keyword htmlTagName contained template content shadow slot
|
||||
syn keyword htmlTagName contained wbr bdi
|
||||
syn keyword htmlTagName contained picture
|
||||
|
||||
" SVG tags
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" as found in http://www.w3.org/TR/SVG/eltindex.html
|
||||
syn keyword htmlTagName contained svg
|
||||
syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem
|
||||
syn keyword htmlTagName contained animate animateColor animateMotion animateTransform
|
||||
syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
|
||||
syn keyword htmlTagName contained clipPath color-profile cursor
|
||||
syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
|
||||
syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence
|
||||
syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri
|
||||
syn keyword htmlTagName contained glyph glyphRef hkern
|
||||
syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
|
||||
syn keyword htmlTagName contained missing-glyph mpath
|
||||
syn keyword htmlTagName contained text textPath tref tspan vkern
|
||||
syn keyword htmlTagName contained metadata title
|
||||
|
||||
" MathML tags
|
||||
" https://www.w3.org/TR/MathML3/appendixi.html#index.elem
|
||||
syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth
|
||||
syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind
|
||||
syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes
|
||||
syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch
|
||||
syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication
|
||||
syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false
|
||||
syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary
|
||||
syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda
|
||||
syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt
|
||||
syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose
|
||||
syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv
|
||||
syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts
|
||||
syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow
|
||||
syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder
|
||||
syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or
|
||||
syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product
|
||||
syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev
|
||||
syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh
|
||||
syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union
|
||||
syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
|
||||
|
||||
" Custom Element
|
||||
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
|
||||
syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>"
|
||||
|
||||
" HTML 5 arguments
|
||||
" Core Attributes
|
||||
syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
|
||||
syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate
|
||||
" Event-handler Attributes
|
||||
syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
|
||||
syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
|
||||
syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
|
||||
syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
|
||||
syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
|
||||
syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
|
||||
syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
|
||||
syn keyword htmlArg contained onvolumechange onwaiting
|
||||
" XML Attributes
|
||||
syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
|
||||
" new features
|
||||
" <body>
|
||||
syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
|
||||
syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
|
||||
" <video>, <audio>, <source>, <track>
|
||||
syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track playsinline
|
||||
" <form>, <input>, <button>
|
||||
syn keyword htmlArg contained form autocomplete autofocus list min max step
|
||||
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
|
||||
syn keyword htmlArg contained required placeholder pattern
|
||||
" <command>, <details>, <time>
|
||||
syn keyword htmlArg contained label icon open datetime-local pubdate
|
||||
" <script>
|
||||
syn keyword htmlArg contained async
|
||||
" <content>
|
||||
syn keyword htmlArg contained select
|
||||
" <iframe>
|
||||
syn keyword htmlArg contained seamless srcdoc sandbox allowfullscreen allowusermedia allowpaymentrequest allowpresentation
|
||||
" <picture>
|
||||
syn keyword htmlArg contained srcset sizes
|
||||
" <a>
|
||||
syn keyword htmlArg contained download media
|
||||
" <script>, <style>
|
||||
syn keyword htmlArg contained nonce
|
||||
" <area>, <a>, <img>, <iframe>, <link>
|
||||
syn keyword htmlArg contained referrerpolicy
|
||||
" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
|
||||
syn keyword htmlArg contained integrity crossorigin
|
||||
" <link>
|
||||
syn keyword htmlArg contained prefetch
|
||||
" syn keyword htmlArg contained preload
|
||||
" <img>
|
||||
syn keyword htmlArg contained decoding
|
||||
" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||
syn keyword htmlArg contained onselectstart onselectionchange
|
||||
" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
||||
syn keyword htmlArg contained loading
|
||||
|
||||
" Custom Data Attributes
|
||||
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes
|
||||
syn match htmlArg "\<data[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Vendor Extension Attributes
|
||||
" http://w3c.github.io/html/single-page.html#conformance-requirements-extensibility
|
||||
syn match htmlArg "\<x[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Microdata
|
||||
" http://dev.w3.org/html5/md/
|
||||
syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
|
||||
|
||||
" SVG
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" Some common attributes from http://www.w3.org/TR/SVG/attindex.html
|
||||
syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth
|
||||
syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by
|
||||
syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy
|
||||
syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy
|
||||
syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired
|
||||
syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy
|
||||
syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits
|
||||
syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-x horiz-origin-y
|
||||
syn keyword htmlArg contained id ideographic in in2 intercept
|
||||
syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes
|
||||
syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local
|
||||
syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name
|
||||
syn keyword htmlArg contained numOctaves
|
||||
syn keyword htmlArg contained offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness
|
||||
syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits
|
||||
syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry
|
||||
syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage
|
||||
syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type
|
||||
syn keyword htmlArg contained u1 u2 underline-position underline-thickness unicode unicode-range units-per-em
|
||||
syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget
|
||||
syn keyword htmlArg contained width widths
|
||||
syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space
|
||||
syn keyword htmlArg contained y y1 y2 yChannelSelector
|
||||
syn keyword htmlArg contained z zoomAndPan
|
||||
syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode
|
||||
|
||||
" MathML attributes
|
||||
" https://www.w3.org/TR/MathML3/chapter2.html#interf.toplevel.atts
|
||||
syn keyword htmlArg contained accent accentunder actiontype align alignmentscope altimg altimg-height altimg-valign altimg-width alttext
|
||||
syn keyword htmlArg contained annotation-xml background base baseline bevelled cd cdgroup charalign charspacing close
|
||||
syn keyword htmlArg contained closure color columnalign columnalignment columnlines columnspacing columnspan columnwidth crossout decimalpoint
|
||||
syn keyword htmlArg contained definitionURL denomalign depth display displaystyle edge encoding equalcolumns equalrows fence
|
||||
syn keyword htmlArg contained fontfamily fontsize fontstyle fontweight form frame framespacing groupalign height indentalign
|
||||
syn keyword htmlArg contained indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget index infixlinebreakstyle integer largeop
|
||||
syn keyword htmlArg contained leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote
|
||||
syn keyword htmlArg contained lspace ltr macros math mathbackground mathcolor mathsize mathvariant maxsize maxwidth
|
||||
syn keyword htmlArg contained mediummathspace menclose minlabelspacing minsize mode movablelimits msgroup mslinethickness name nargs
|
||||
syn keyword htmlArg contained newline notation numalign number occurrence open order other overflow position
|
||||
syn keyword htmlArg contained rightoverhang role rowalign rowlines rowspacing rowspan rquote rspace schemaLocation scope
|
||||
syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemultiplier selection separator separators shift side stackalign
|
||||
syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace
|
||||
syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref
|
||||
|
||||
" Comment
|
||||
" https://github.com/w3c/html/issues/694
|
||||
|
||||
@@ -266,15 +266,25 @@ function! go#config#SetTemplateAutocreate(value) abort
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterCommand() abort
|
||||
return get(g:, "go_metalinter_command", "golangci-lint")
|
||||
return get(g:, 'go_metalinter_command', 'golangci-lint')
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterAutosaveEnabled() abort
|
||||
return get(g:, "go_metalinter_autosave_enabled", ["govet", "golint"])
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
let l:default = ['govet', 'golint']
|
||||
endif
|
||||
|
||||
return get(g:, 'go_metalinter_autosave_enabled', l:default)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterEnabled() abort
|
||||
return get(g:, "go_metalinter_enabled", ["vet", "golint", "errcheck"])
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
let l:default = ['vet', 'golint', 'errcheck']
|
||||
endif
|
||||
|
||||
return get(g:, 'go_metalinter_enabled', l:default)
|
||||
endfunction
|
||||
|
||||
function! go#config#GolintBin() abort
|
||||
|
||||
@@ -4,7 +4,10 @@ set cpo&vim
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
func! polyglot#detect#Inp()
|
||||
func! polyglot#detect#Inp(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^\*'
|
||||
set ft=abaqus | return
|
||||
@@ -17,14 +20,20 @@ func! polyglot#detect#Inp()
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Asa()
|
||||
func! polyglot#detect#Asa(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_asa")
|
||||
let &ft = g:filetype_asa | return
|
||||
endif
|
||||
set ft=aspvbs | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Asp()
|
||||
func! polyglot#detect#Asp(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_asp")
|
||||
let &ft = g:filetype_asp | return
|
||||
endif
|
||||
@@ -37,7 +46,10 @@ func! polyglot#detect#Asp()
|
||||
set ft=aspvbs | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#H()
|
||||
func! polyglot#detect#H(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 200]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)'
|
||||
@@ -56,7 +68,10 @@ func! polyglot#detect#H()
|
||||
set ft=cpp | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#M()
|
||||
func! polyglot#detect#M(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let saw_comment = 0
|
||||
for lnum in range(1, min([line("$"), 100]))
|
||||
let line = getline(lnum)
|
||||
@@ -85,7 +100,10 @@ func! polyglot#detect#M()
|
||||
set ft=octave | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Fs()
|
||||
func! polyglot#detect#Fs(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\(: \|new-device\)'
|
||||
@@ -104,7 +122,10 @@ func! polyglot#detect#Fs()
|
||||
set ft=forth | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Re()
|
||||
func! polyglot#detect#Re(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*#\%(\%(if\|ifdef\|define\|pragma\)\s\+\w\|\s*include\s\+[<"]\|template\s*<\)'
|
||||
@@ -114,7 +135,10 @@ func! polyglot#detect#Re()
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Idr()
|
||||
func! polyglot#detect#Idr(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*--.*[Ii]dris \=1'
|
||||
@@ -148,7 +172,10 @@ func! polyglot#detect#Idr()
|
||||
set ft=idris2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Lidr()
|
||||
func! polyglot#detect#Lidr(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 200]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^>\s*--.*[Ii]dris \=1'
|
||||
@@ -158,7 +185,10 @@ func! polyglot#detect#Lidr()
|
||||
set ft=lidris2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Bas()
|
||||
func! polyglot#detect#Bas(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
|
||||
@@ -168,7 +198,10 @@ func! polyglot#detect#Bas()
|
||||
set ft=basic | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Pm()
|
||||
func! polyglot#detect#Pm(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# 'XPM2'
|
||||
set ft=xpm2 | return
|
||||
@@ -192,7 +225,10 @@ func! polyglot#detect#Pm()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Pl()
|
||||
func! polyglot#detect#Pl(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^[^#]*:-' || line =~# '^\s*\%(%\|/\*\)' || line =~# '\.\s*$'
|
||||
set ft=prolog | return
|
||||
@@ -213,7 +249,10 @@ func! polyglot#detect#Pl()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#T()
|
||||
func! polyglot#detect#T(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\.'
|
||||
@@ -236,7 +275,10 @@ func! polyglot#detect#T()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Tt2()
|
||||
func! polyglot#detect#Tt2(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 3]))
|
||||
let line = getline(lnum)
|
||||
if line =~? '<\%(!DOCTYPE HTML\|[%?]\|html\)'
|
||||
@@ -246,14 +288,17 @@ func! polyglot#detect#Tt2()
|
||||
set ft=tt2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Html()
|
||||
func! polyglot#detect#Html(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^\(%\|<[%&].*>\)'
|
||||
set ft=mason | return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)\|{#\s\+'
|
||||
if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\|load\)\(\<\|\>\)\|{#\s\+'
|
||||
set ft=htmldjango | return
|
||||
endif
|
||||
if line =~# '\(\<\|\>\)DTD\s\+XHTML\s'
|
||||
|
||||
@@ -513,7 +513,6 @@ let s:interpreters = {
|
||||
\ 'pdksh': 'sh',
|
||||
\ 'rc': 'sh',
|
||||
\ 'sh': 'sh',
|
||||
\ 'zsh': 'sh',
|
||||
\ 'boolector': 'smt2',
|
||||
\ 'cvc4': 'smt2',
|
||||
\ 'mathsat5': 'smt2',
|
||||
@@ -526,6 +525,7 @@ let s:interpreters = {
|
||||
\ 'z3': 'smt2',
|
||||
\ 'deno': 'typescript',
|
||||
\ 'ts-node': 'typescript',
|
||||
\ 'zsh': 'zsh',
|
||||
\ }
|
||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
let s:globs = {
|
||||
\ '8th': '*.8th',
|
||||
\ 'Dockerfile': '*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*',
|
||||
\ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',
|
||||
\ 'a2ps': 'a2psrc,.a2psrc',
|
||||
\ 'a65': '*.a65',
|
||||
@@ -35,7 +34,7 @@ let s:globs = {
|
||||
\ 'atlas': '*.atl,*.as',
|
||||
\ 'autohotkey': '*.ahk,*.ahkl',
|
||||
\ 'autoit': '*.au3',
|
||||
\ 'automake': '*.mak,*.dsp,*.mk,Makefile.am,makefile.am,GNUmakefile.am',
|
||||
\ 'automake': '[mM]akefile.am,GNUmakefile.am',
|
||||
\ 'ave': '*.ave',
|
||||
\ 'awk': '*.awk,*.gawk',
|
||||
\ 'b': '*.mch,*.ref,*.imp',
|
||||
@@ -203,7 +202,7 @@ let s:globs = {
|
||||
\ 'gtkrc': '.gtkrc,gtkrc,.gtkrc*,gtkrc*',
|
||||
\ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars',
|
||||
\ 'hamster': '*.hsc,*.hsm',
|
||||
\ 'haproxy': '*.cfg,haproxy.cfg,haproxy*.conf*',
|
||||
\ 'haproxy': 'haproxy*.conf*,haproxy*.cfg*',
|
||||
\ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig',
|
||||
\ 'haste': '*.ht',
|
||||
\ 'hastepreproc': '*.htpp',
|
||||
@@ -305,6 +304,7 @@ let s:globs = {
|
||||
\ 'mail': '*.eml,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,{neo,}mutt[[:alnum:]._-]\\\{6\},reportbug-*',
|
||||
\ 'mailaliases': '',
|
||||
\ 'mailcap': '.mailcap,mailcap',
|
||||
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
|
||||
\ 'mako': '*.mako,*.mao',
|
||||
\ 'mallard': '*.page',
|
||||
\ 'manconf': 'man.config',
|
||||
@@ -374,7 +374,7 @@ let s:globs = {
|
||||
\ 'pamconf': '',
|
||||
\ 'pamenv': 'pam_env.conf,.pam_environment',
|
||||
\ 'papp': '*.papp,*.pxml,*.pxsl',
|
||||
\ 'pascal': '*.pas,*.dpr',
|
||||
\ 'pascal': '*.pas,*.pp,*.dpr,*.lpr',
|
||||
\ 'passwd': '',
|
||||
\ 'pccts': '*.g',
|
||||
\ 'pcmk': '*.pcmk',
|
||||
@@ -455,7 +455,7 @@ let s:globs = {
|
||||
\ 'sas': '*.sas',
|
||||
\ 'sass': '*.sass',
|
||||
\ 'sather': '*.sa',
|
||||
\ 'sbt.scala': '*.sbt',
|
||||
\ 'sbt': '*.sbt',
|
||||
\ 'scala': '*.scala,*.kojo,*.sc',
|
||||
\ 'scheme': '*.scm,*.ss,*.rkt',
|
||||
\ 'scilab': '*.sci,*.sce',
|
||||
@@ -469,7 +469,7 @@ let s:globs = {
|
||||
\ 'services': '',
|
||||
\ 'setserial': '',
|
||||
\ 'sexplib': '*.sexp',
|
||||
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc',
|
||||
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile',
|
||||
\ 'sieve': '*.siv,*.sieve',
|
||||
\ 'sil': '*.sil',
|
||||
\ 'simula': '*.sim',
|
||||
@@ -536,7 +536,7 @@ let s:globs = {
|
||||
\ 'textile': '*.textile',
|
||||
\ 'tf': '*.tf,.tfrc,tfrc',
|
||||
\ 'thrift': '*.thrift',
|
||||
\ 'tidy': '.tidyrc,tidyrc',
|
||||
\ 'tidy': '.tidyrc,tidyrc,tidy.conf',
|
||||
\ 'tilde': '*.t.html',
|
||||
\ 'tli': '*.tli',
|
||||
\ 'tmux': '.tmux*.conf',
|
||||
@@ -594,6 +594,7 @@ let s:globs = {
|
||||
\ 'wvdial': 'wvdial.conf,.wvdialrc',
|
||||
\ 'xdc': '*.xdc',
|
||||
\ 'xdefaults': '*.ad,.Xdefaults,.Xpdefaults,.Xresources,xdm-config,Xresources*',
|
||||
\ 'xf86conf': 'XF86Config-4*,XF86Config*,xorg.conf,xorg.conf-4',
|
||||
\ 'xhtml': '*.xhtml,*.xht',
|
||||
\ 'xinetd': '',
|
||||
\ 'xmath': '*.msc,*.msf',
|
||||
|
||||
@@ -1625,27 +1625,45 @@ window. The list to use can be set using |'g:go_list_type_commands'|.
|
||||
<
|
||||
*'g:go_metalinter_autosave_enabled'*
|
||||
|
||||
Specifies the enabled linters for auto |:GoMetaLinter| on save. By
|
||||
default it's using `vet` and `golint`. If any are enabled, `--disable-all`
|
||||
will be sent to the metalinter.
|
||||
Specifies the enabled linters for auto |:GoMetaLinter| on save. When the
|
||||
metalinter is `golangci-lint`, if any are enabled, `--disable-all` will be
|
||||
sent to the metalinter.
|
||||
|
||||
When `g:go_metalinter_command` is set to `staticcheck`, the default value is
|
||||
an empty list; `staticcheck`'s `-checks` flag will not be used.
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['all']
|
||||
<
|
||||
|
||||
When `g:go_metalinter_command is set to `golangci-lint'`, the default value is
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['vet', 'golint']
|
||||
<
|
||||
*'g:go_metalinter_enabled'*
|
||||
|
||||
Specifies the linters to enable for the |:GoMetaLinter| command. By default
|
||||
it's using `vet`, `golint` and `errcheck`. If any are enabled, `--disable-all`
|
||||
will be sent to the metalinter.
|
||||
Specifies the linters to enable for the |:GoMetaLinter| command. For
|
||||
`golangci-lint`, if any are enabled, `--disable-all` will be passed to the
|
||||
metalinter.
|
||||
|
||||
When `g:go_metalinter_command` is set to `staticcheck`, the default value is
|
||||
an empty list; `staticcheck`'s `-checks` flag will not be used.
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['all']
|
||||
<
|
||||
|
||||
When `g:go_metalinter_command is set to `golangci-lint'`, the default value is
|
||||
>
|
||||
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck']
|
||||
<
|
||||
*'g:go_metalinter_command'*
|
||||
|
||||
Overrides the command to be executed when |:GoMetaLinter| is called. By
|
||||
default it's `golangci-lint`. Valid options are `golangci-lint` and `gopls`.
|
||||
default it's `golangci-lint`. Valid options are `golangci-lint, `gopls`, and
|
||||
`staticcheck`..
|
||||
|
||||
When the value is `gopls`, users may want to consider setting
|
||||
`g:go_gopls_staticcheck`. It can also be used as an advanced setting for
|
||||
users who want to have more control over the metalinter.
|
||||
`g:go_gopls_staticcheck`. It can also be used as an advanced setting for users
|
||||
who want to have more control over the metalinter.
|
||||
>
|
||||
let g:go_metalinter_command = "golangci-lint"
|
||||
<
|
||||
@@ -1653,6 +1671,8 @@ users who want to have more control over the metalinter.
|
||||
|
||||
Overrides the maximum time the linters have to complete. By default it's 5
|
||||
seconds.
|
||||
|
||||
Only applies when the metalinter is `golangci-lint`.
|
||||
>
|
||||
let g:go_metalinter_deadline = "5s"
|
||||
<
|
||||
@@ -2286,7 +2306,7 @@ The program will halt on the breakpoint, at which point you can inspect the
|
||||
program state. You can go to the next line with |:GoDebugNext| (<F10>) or step
|
||||
in with |:GoDebugStep| (<F11>).
|
||||
|
||||
The program can also be halted with `:GoDebugHalt` (<F6>).
|
||||
The program can also be halted with `:GoDebugHalt` (<F8>).
|
||||
|
||||
The variable window in the bottom left (`GODEBUG_VARIABLES`) will display all
|
||||
local variables. Struct values are displayed as `{...}`, array/slices as
|
||||
@@ -2362,7 +2382,7 @@ The rest of the commands and mappings become available after executing
|
||||
|
||||
Halt the program.
|
||||
|
||||
Mapped to <F6> by default.
|
||||
Mapped to <F8> by default.
|
||||
|
||||
*:GoDebugStop*
|
||||
*(go-debug-stop)*
|
||||
|
||||
@@ -27,6 +27,9 @@ let did_load_filetypes = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Be consistent across different systems
|
||||
set nofileignorecase
|
||||
|
||||
func! s:Observe(fn)
|
||||
let b:polyglot_observe = a:fn
|
||||
augroup polyglot-observer
|
||||
@@ -114,10 +117,21 @@ func! s:StarSetf(ft)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Load user-defined filetype.vim
|
||||
augroup filetypedetect
|
||||
runtime! filetype.vim
|
||||
augroup END
|
||||
|
||||
augroup filetypedetect
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
if !has_key(s:disabled_packages, 'xf86conf')
|
||||
au BufNewFile,BufRead */xorg.conf.d/*.conf,xorg.conf,xorg.conf-4 setf xf86conf
|
||||
au BufNewFile,BufRead XF86Config-4* call s:StarSetf('xf86conf')
|
||||
au BufNewFile,BufRead XF86Config* call s:StarSetf('xf86conf')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'pullrequest')
|
||||
au BufNewFile,BufRead PULLREQ_EDITMSG setf pullrequest
|
||||
endif
|
||||
@@ -346,7 +360,7 @@ if !has_key(s:disabled_packages, 'tpp')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'tidy')
|
||||
au BufNewFile,BufRead {.,}tidyrc,tidyrc setf tidy
|
||||
au BufNewFile,BufRead {.,}tidyrc,tidy.conf,tidyrc setf tidy
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'texmf')
|
||||
@@ -558,10 +572,6 @@ if !has_key(s:disabled_packages, 'sieve')
|
||||
au BufNewFile,BufRead *.sieve,*.siv setf sieve
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sed')
|
||||
au BufNewFile,BufRead *.sed setf sed
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sdl')
|
||||
au BufNewFile,BufRead *.pr,*.sdl setf sdl
|
||||
endif
|
||||
@@ -574,6 +584,10 @@ if !has_key(s:disabled_packages, 'scilab')
|
||||
au BufNewFile,BufRead *.sce,*.sci setf scilab
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sbt')
|
||||
au BufNewFile,BufRead *.sbt setf sbt
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sather')
|
||||
au BufNewFile,BufRead *.sa setf sather
|
||||
endif
|
||||
@@ -624,7 +638,7 @@ endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'remind')
|
||||
au BufNewFile,BufRead *.rem,*.remind,{.,}reminders setf remind
|
||||
au BufNewFile,BufRead {.,}reminders* call s:StarSetf('remind')
|
||||
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'rrst')
|
||||
@@ -776,7 +790,7 @@ if !has_key(s:disabled_packages, 'pdf')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'pascal')
|
||||
au BufNewFile,BufRead *.dpr,*.pas setf pascal
|
||||
au BufNewFile,BufRead *.dpr,*.lpr,*.pas,*.pp setf pascal
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'passwd')
|
||||
@@ -849,7 +863,7 @@ if !has_key(s:disabled_packages, 'neomuttrc')
|
||||
au BufNewFile,BufRead Neomuttrc setf neomuttrc
|
||||
au BufNewFile,BufRead neomuttrc* call s:StarSetf('neomuttrc')
|
||||
au BufNewFile,BufRead Neomuttrc* call s:StarSetf('neomuttrc')
|
||||
au BufNewFile,BufRead {.,}neomuttrc* call s:StarSetf('neomuttrc')
|
||||
au BufNewFile,BufRead .neomuttrc* call s:StarSetf('neomuttrc')
|
||||
au BufNewFile,BufRead */.neomutt/neomuttrc* call s:StarSetf('neomuttrc')
|
||||
endif
|
||||
|
||||
@@ -877,15 +891,11 @@ if !has_key(s:disabled_packages, 'muttrc')
|
||||
au BufNewFile,BufRead Mutt{ng,}rc setf muttrc
|
||||
au BufNewFile,BufRead mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead Mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead {.,}mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead .mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc')
|
||||
au BufNewFile,BufRead */.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'mysql')
|
||||
au BufNewFile,BufRead *.mysql setf mysql
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'msql')
|
||||
au BufNewFile,BufRead *.msql setf msql
|
||||
endif
|
||||
@@ -1237,6 +1247,11 @@ if !has_key(s:disabled_packages, 'tilde')
|
||||
au BufNewFile,BufRead *.t.html setf tilde
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'html')
|
||||
au BufNewFile,BufRead,BufWritePost *.html call polyglot#detect#Html()
|
||||
au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml setf html
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'hollywood')
|
||||
au BufNewFile,BufRead *.hws setf hollywood
|
||||
endif
|
||||
@@ -1268,7 +1283,7 @@ endif
|
||||
if !has_key(s:disabled_packages, 'gtkrc')
|
||||
au BufNewFile,BufRead {.,}gtkrc,gtkrc setf gtkrc
|
||||
au BufNewFile,BufRead gtkrc* call s:StarSetf('gtkrc')
|
||||
au BufNewFile,BufRead {.,}gtkrc* call s:StarSetf('gtkrc')
|
||||
au BufNewFile,BufRead .gtkrc* call s:StarSetf('gtkrc')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'group')
|
||||
@@ -1690,11 +1705,11 @@ if !has_key(s:disabled_packages, 'gitignore')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'tads')
|
||||
au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
au BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'prolog')
|
||||
au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog
|
||||
endif
|
||||
|
||||
@@ -1717,7 +1732,7 @@ if !has_key(s:disabled_packages, 'spec')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'visual-basic')
|
||||
au! BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas()
|
||||
au BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas()
|
||||
au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb
|
||||
endif
|
||||
|
||||
@@ -1726,7 +1741,7 @@ if !has_key(s:disabled_packages, 'basic')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'trasys')
|
||||
au! BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp()
|
||||
au BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'zig')
|
||||
@@ -1876,21 +1891,17 @@ if !has_key(s:disabled_packages, 'slim')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sh')
|
||||
au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc setf sh
|
||||
au BufNewFile,BufRead *.zsh,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh
|
||||
au BufNewFile,BufRead {.,}zsh* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead {.,}zlog* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead {.,}zcompdump* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile setf sh
|
||||
au BufNewFile,BufRead *.zsh,*/etc/zprofile,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh
|
||||
au BufNewFile,BufRead .zsh* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead .zlog* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead .zcompdump* call s:StarSetf('zsh')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'scss')
|
||||
au BufNewFile,BufRead *.scss setf scss
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sbt')
|
||||
au BufNewFile,BufRead *.sbt setf sbt.scala
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'scala')
|
||||
au BufNewFile,BufRead *.kojo,*.sc,*.scala setf scala
|
||||
endif
|
||||
@@ -1918,7 +1929,7 @@ if !has_key(s:disabled_packages, 'rst')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'reason')
|
||||
au! BufNewFile,BufRead,BufWritePost *.re call polyglot#detect#Re()
|
||||
au BufNewFile,BufRead,BufWritePost *.re call polyglot#detect#Re()
|
||||
au BufNewFile,BufRead *.rei setf reason
|
||||
endif
|
||||
|
||||
@@ -1931,9 +1942,9 @@ if !has_key(s:disabled_packages, 'raml')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'raku')
|
||||
au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm()
|
||||
au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
au BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm()
|
||||
au BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead *.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl6,*.pm6,*.pod6,*.raku,*.rakudoc,*.rakumod,*.rakutest,*.t6 setf raku
|
||||
endif
|
||||
|
||||
@@ -2013,14 +2024,14 @@ if !has_key(s:disabled_packages, 'pgsql')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'perl')
|
||||
au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm()
|
||||
au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
|
||||
au BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm()
|
||||
au BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
|
||||
au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc setf perl
|
||||
au BufNewFile,BufRead *.pod setf pod
|
||||
au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason
|
||||
au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2()
|
||||
au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2()
|
||||
au BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2()
|
||||
au BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2()
|
||||
au BufNewFile,BufRead *.xs setf xs
|
||||
endif
|
||||
|
||||
@@ -2033,7 +2044,7 @@ if !has_key(s:disabled_packages, 'opencl')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'octave')
|
||||
au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead *.oct setf octave
|
||||
endif
|
||||
|
||||
@@ -2050,8 +2061,8 @@ if !has_key(s:disabled_packages, 'ocaml')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'objc')
|
||||
au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'nix')
|
||||
@@ -2069,7 +2080,7 @@ if !has_key(s:disabled_packages, 'nginx')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'murphi')
|
||||
au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'moonscript')
|
||||
@@ -2085,12 +2096,8 @@ if !has_key(s:disabled_packages, 'mdx')
|
||||
au BufNewFile,BufRead *.mdx setf markdown.mdx
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'markdown')
|
||||
au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr setf markdown
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'mathematica')
|
||||
au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M()
|
||||
au BufNewFile,BufRead *.cdf,*.ma,*.mathematica,*.mma,*.mt,*.nb,*.nbp,*.wl,*.wls,*.wlt setf mma
|
||||
endif
|
||||
|
||||
@@ -2161,7 +2168,7 @@ endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'jq')
|
||||
au BufNewFile,BufRead *.jq,{.,}jqrc setf jq
|
||||
au BufNewFile,BufRead {.,}jqrc* call s:StarSetf('jq')
|
||||
au BufNewFile,BufRead .jqrc* call s:StarSetf('jq')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'htmldjango')
|
||||
@@ -2178,14 +2185,14 @@ if !has_key(s:disabled_packages, 'ion')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'idris2')
|
||||
au! BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr()
|
||||
au BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr()
|
||||
au BufNewFile,BufRead *.ipkg,idris-response setf idris2
|
||||
au! BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr()
|
||||
au BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'idris')
|
||||
au! BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr()
|
||||
au! BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr()
|
||||
au BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr()
|
||||
au BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr()
|
||||
au BufNewFile,BufRead idris-response setf idris
|
||||
endif
|
||||
|
||||
@@ -2197,11 +2204,6 @@ if !has_key(s:disabled_packages, 'i3')
|
||||
au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'html5')
|
||||
au! BufNewFile,BufRead,BufWritePost *.html call polyglot#detect#Html()
|
||||
au BufNewFile,BufRead *.htm,*.html.hl,*.inc,*.st,*.xht,*.xhtml setf html
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'hive')
|
||||
au BufNewFile,BufRead *.hql,*.q,*.ql setf hive
|
||||
endif
|
||||
@@ -2218,6 +2220,11 @@ if !has_key(s:disabled_packages, 'haskell')
|
||||
au BufNewFile,BufRead *.bpk,*.hs,*.hs-boot,*.hsc,*.hsig setf haskell
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haproxy')
|
||||
au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy')
|
||||
au BufNewFile,BufRead haproxy*.cfg* call s:StarSetf('haproxy')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'handlebars')
|
||||
au BufNewFile,BufRead *.hjs,*.hogan,*.hulk,*.mustache setf html.mustache
|
||||
au BufNewFile,BufRead *.handlebars,*.hb,*.hbs,*.hdbs setf html.handlebars
|
||||
@@ -2263,7 +2270,7 @@ if !has_key(s:disabled_packages, 'gmpl')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'glsl')
|
||||
au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead *.comp,*.fp,*.frag,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader setf glsl
|
||||
endif
|
||||
|
||||
@@ -2271,7 +2278,7 @@ if !has_key(s:disabled_packages, 'git')
|
||||
au BufNewFile,BufRead *.gitconfig,*.git/config,*.git/modules/*/config,*/.config/git/config,*/git/config,{.,}gitconfig,{.,}gitmodules setf gitconfig
|
||||
au BufNewFile,BufRead */{.,}gitconfig.d/* call s:StarSetf('gitconfig')
|
||||
au BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
au BufNewFile,BufRead {.,}gitsendemail.* call s:StarSetf('gitsendemail')
|
||||
au BufNewFile,BufRead .gitsendemail.* call s:StarSetf('gitsendemail')
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
endif
|
||||
|
||||
@@ -2280,12 +2287,12 @@ if !has_key(s:disabled_packages, 'gdscript')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'fsharp')
|
||||
au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'forth')
|
||||
au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
|
||||
au BufNewFile,BufRead *.ft,*.fth setf forth
|
||||
endif
|
||||
|
||||
@@ -2327,8 +2334,6 @@ if !has_key(s:disabled_packages, 'elixir')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dockerfile')
|
||||
au BufNewFile,BufRead *.Dockerfile,*.dock,*.dockerfile,Dockerfile,dockerfile setf Dockerfile
|
||||
au BufNewFile,BufRead Dockerfile* call s:StarSetf('Dockerfile')
|
||||
au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml setf yaml.docker-compose
|
||||
endif
|
||||
|
||||
@@ -2336,6 +2341,14 @@ if !has_key(s:disabled_packages, 'yaml')
|
||||
au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,fish_history,fish_read_history,glide.lock,yarn.lock setf yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'mysql')
|
||||
au BufNewFile,BufRead *.mysql setf mysql
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sed')
|
||||
au BufNewFile,BufRead *.sed setf sed
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dlang')
|
||||
au BufNewFile,BufRead *.d,*.di setf d
|
||||
au BufNewFile,BufRead *.lst setf dcov
|
||||
@@ -2374,6 +2387,10 @@ if !has_key(s:disabled_packages, 'coffee-script')
|
||||
au BufNewFile,BufRead *.coffee.md,*.litcoffee setf litcoffee
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'markdown')
|
||||
au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr setf markdown
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'cmake')
|
||||
au BufNewFile,BufRead *.cmake,*.cmake.in,CMakeLists.txt setf cmake
|
||||
endif
|
||||
@@ -2407,12 +2424,12 @@ if !has_key(s:disabled_packages, 'atlas')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aspperl')
|
||||
au! BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp()
|
||||
au BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aspvbs')
|
||||
au! BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp()
|
||||
au! BufNewFile,BufRead,BufWritePost *.asa call polyglot#detect#Asa()
|
||||
au BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp()
|
||||
au BufNewFile,BufRead,BufWritePost *.asa call polyglot#detect#Asa()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'asn')
|
||||
@@ -2420,13 +2437,17 @@ if !has_key(s:disabled_packages, 'asn')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'automake')
|
||||
au BufNewFile,BufRead *.dsp,*.mak,*.mk,GNUmakefile.am,Makefile.am,makefile.am setf automake
|
||||
au BufNewFile,BufRead GNUmakefile.am,[mM]akefile.am setf automake
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'elf')
|
||||
au BufNewFile,BufRead *.am setf elf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'make')
|
||||
au BufNewFile,BufRead *.dsp,*.mak,*.mk,*[mM]akefile setf make
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'autohotkey')
|
||||
au BufNewFile,BufRead *.ahk,*.ahkl setf autohotkey
|
||||
endif
|
||||
@@ -2444,9 +2465,9 @@ if !has_key(s:disabled_packages, 'arduino')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'c/c++')
|
||||
au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
au BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.moc,*.tcc,*.tlh,*.tpp setf cpp
|
||||
au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
au BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
|
||||
au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c
|
||||
endif
|
||||
|
||||
@@ -2506,6 +2527,14 @@ if !has_key(s:disabled_packages, 'alsaconf')
|
||||
au BufNewFile,BufRead */etc/asound.conf,*/usr/share/alsa/alsa.conf,{.,}asoundrc setf alsaconf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'conf')
|
||||
au BufNewFile,BufRead *.conf,auto.master,config setf conf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'master')
|
||||
au BufNewFile,BufRead *.mas,*.master setf master
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aidl')
|
||||
" AIDL
|
||||
au BufNewFile,BufRead *.aidl setf aidl
|
||||
@@ -2541,7 +2570,7 @@ if !has_key(s:disabled_packages, 'abc')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'abaqus')
|
||||
au! BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp()
|
||||
au BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'abap')
|
||||
@@ -2563,19 +2592,6 @@ if !has_key(s:disabled_packages, 'a2ps')
|
||||
au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,{.,}a2psrc,a2psrc setf a2ps
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haproxy')
|
||||
au BufNewFile,BufRead *.cfg,haproxy.cfg setf haproxy
|
||||
au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'conf')
|
||||
au BufNewFile,BufRead *.conf,auto.master,config setf conf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'master')
|
||||
au BufNewFile,BufRead *.mas,*.master setf master
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'cfg')
|
||||
au BufNewFile,BufRead *.cfg,*.hgrc,*hgrc setf cfg
|
||||
endif
|
||||
@@ -2719,6 +2735,9 @@ if !has_key(s:disabled_packages, 'autoindent')
|
||||
if s:guess(getline(1, 32))
|
||||
return
|
||||
endif
|
||||
if s:guess(getline(1, 1024))
|
||||
return
|
||||
endif
|
||||
let pattern = polyglot#sleuth#GlobForFiletype(&filetype)
|
||||
if len(pattern) == 0
|
||||
return
|
||||
@@ -3635,9 +3654,6 @@ au BufNewFile,BufRead *.mod
|
||||
\ setf modsim3 |
|
||||
\ endif
|
||||
|
||||
" Modula 2 (.md removed in favor of Markdown)
|
||||
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
|
||||
|
||||
" Modula 3 (.m3, .i3, .mg, .ig)
|
||||
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
|
||||
@@ -3950,13 +3966,6 @@ au BufNewFile,BufRead *.rego setf rego
|
||||
" Rexx
|
||||
au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
|
||||
|
||||
" R (Splus)
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.s,*.S setf r
|
||||
else
|
||||
au BufNewFile,BufRead *.s setf r
|
||||
endif
|
||||
|
||||
" R Help file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
|
||||
@@ -4833,6 +4842,10 @@ au BufNewFile,BufRead *.txt
|
||||
\| setf text
|
||||
\| endif
|
||||
|
||||
" 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
|
||||
" and started another one. Let's make sure it has ended to get to a consistent
|
||||
" state.
|
||||
|
||||
3
ftoff.vim
Normal file
3
ftoff.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if exists("did_load_polyglot")
|
||||
unlet did_load_polyglot
|
||||
endif
|
||||
@@ -1,37 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
|
||||
function! DockerfileReplaceInstruction(original, replacement)
|
||||
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
|
||||
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
|
||||
let word = a:replacement
|
||||
else
|
||||
let word = a:original
|
||||
endif
|
||||
let g:UnduBuffer = a:original
|
||||
return word
|
||||
endfunction
|
||||
|
||||
inoreabbr <silent> <buffer> from <C-R>=DockerfileReplaceInstruction("from", "FROM")<CR>
|
||||
inoreabbr <silent> <buffer> maintainer <C-R>=DockerfileReplaceInstruction("maintainer", "MAINTAINER")<CR>
|
||||
inoreabbr <silent> <buffer> run <C-R>=DockerfileReplaceInstruction("run", "RUN")<CR>
|
||||
inoreabbr <silent> <buffer> cmd <C-R>=DockerfileReplaceInstruction("cmd", "CMD")<CR>
|
||||
inoreabbr <silent> <buffer> label <C-R>=DockerfileReplaceInstruction("label", "LABEL")<CR>
|
||||
inoreabbr <silent> <buffer> expose <C-R>=DockerfileReplaceInstruction("expose", "EXPOSE")<CR>
|
||||
inoreabbr <silent> <buffer> env <C-R>=DockerfileReplaceInstruction("env", "ENV")<CR>
|
||||
inoreabbr <silent> <buffer> add <C-R>=DockerfileReplaceInstruction("add", "ADD")<CR>
|
||||
inoreabbr <silent> <buffer> copy <C-R>=DockerfileReplaceInstruction("copy", "COPY")<CR>
|
||||
inoreabbr <silent> <buffer> entrypoint <C-R>=DockerfileReplaceInstruction("entrypoint", "ENTRYPOINT")<CR>
|
||||
inoreabbr <silent> <buffer> volume <C-R>=DockerfileReplaceInstruction("volume", "VOLUME")<CR>
|
||||
inoreabbr <silent> <buffer> user <C-R>=DockerfileReplaceInstruction("user", "USER")<CR>
|
||||
inoreabbr <silent> <buffer> workdir <C-R>=DockerfileReplaceInstruction("workdir", "WORKDIR")<CR>
|
||||
inoreabbr <silent> <buffer> arg <C-R>=DockerfileReplaceInstruction("arg", "ARG")<CR>
|
||||
inoreabbr <silent> <buffer> onbuild <C-R>=DockerfileReplaceInstruction("onbuild", "ONBUILD")<CR>
|
||||
inoreabbr <silent> <buffer> stopsignal <C-R>=DockerfileReplaceInstruction("stopsignal", "STOPSIGNAL")<CR>
|
||||
|
||||
endif
|
||||
@@ -16,7 +16,7 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal softtabstop=4 shiftwidth=4 encoding=utf-8
|
||||
setlocal softtabstop=4 shiftwidth=4
|
||||
setlocal suffixesadd=.fal,.ftd
|
||||
|
||||
" Matchit support
|
||||
|
||||
@@ -1,13 +1,55 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Maintainer: othree <othree@gmail.com>
|
||||
" URL: http://github.com/othree/html5.vim
|
||||
" Last Change: 2014-05-02
|
||||
" License: MIT
|
||||
" Changes: Add - to keyword
|
||||
" Vim filetype plugin file
|
||||
" Language: html
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Changed: 20 Jan 2009
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
|
||||
" setlocal iskeyword+=-
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Make sure the continuation lines below do not cause problems in
|
||||
" compatibility mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
setlocal commentstring=<!--%s-->
|
||||
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
|
||||
|
||||
if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
endif
|
||||
|
||||
if exists('&omnifunc')
|
||||
setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
call htmlcomplete#DetectOmniFlavor()
|
||||
endif
|
||||
|
||||
" HTML: thanks to Johannes Zellner and Benji Fisher.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1
|
||||
let b:match_words = '<:>,' .
|
||||
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
|
||||
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
|
||||
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
endif
|
||||
|
||||
" Change the :browse e filter to primarily show HTML-related files.
|
||||
if has("gui_win32")
|
||||
let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
|
||||
\ "JavaScript Files (*.js)\t*.js\n" .
|
||||
\ "Cascading StyleSheets (*.css)\t*.css\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .
|
||||
\ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
|
||||
|
||||
" Restore the saved compatibility options.
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
endif
|
||||
|
||||
37
ftplugin/make.vim
Normal file
37
ftplugin/make.vim
Normal file
@@ -0,0 +1,37 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: Make
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Apr 02
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<"
|
||||
|
||||
" Make sure a hard tab is used, required for most make programs
|
||||
setlocal noexpandtab softtabstop=0
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
setlocal fo-=t fo+=croql
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
setlocal com=sO:#\ -,mO:#\ \ ,b:#
|
||||
|
||||
" Set 'commentstring' to put the marker after a #.
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Including files.
|
||||
let &l:include = '^\s*include'
|
||||
|
||||
" For matchit.vim, suggested by Albert Netymk and Ken Takata.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words = '^ *ifn\=\(eq\|def\)\>:^ *else\(\s\+ifn\=\(eq\|def\)\)\=\>:^ *endif\>,\<define\>:\<endef\>,^!\s*if\(n\=def\)\=\>:^!\s*else\(if\(n\=def\)\=\)\=\>:^!\s*endif\>'
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -524,7 +524,7 @@ endfunction
|
||||
"c. link this stuff with what the user wants
|
||||
" ie. get the expression selected/under the cursor
|
||||
|
||||
let s:ocaml_word_char = '\w|[<EFBFBD>-<2D>]|'''
|
||||
let s:ocaml_word_char = '\w|[\u00ac-\uffff]|'''
|
||||
|
||||
"In: the current mode (eg. "visual", "normal", etc.)
|
||||
"Out: the borders of the expression we are looking for the type
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: RPL/2
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" Last Change: 2012 Mar 07
|
||||
" Version: 0.1
|
||||
|
||||
|
||||
19
ftplugin/sbt.vim
Normal file
19
ftplugin/sbt.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" License: Same as Vim
|
||||
" Last Change: 2017.04.30
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if exists('b:did_ftplugin') || &cp
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
runtime! ftplugin/scala.vim
|
||||
|
||||
|
||||
endif
|
||||
109
ftplugin/vim.vim
109
ftplugin/vim.vim
@@ -1,109 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 14
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('*VimFtpluginUndo')
|
||||
func VimFtpluginUndo()
|
||||
setl fo< isk< com< tw< commentstring<
|
||||
if exists('b:did_add_maps')
|
||||
silent! nunmap <buffer> [[
|
||||
silent! vunmap <buffer> [[
|
||||
silent! nunmap <buffer> ]]
|
||||
silent! vunmap <buffer> ]]
|
||||
silent! nunmap <buffer> []
|
||||
silent! vunmap <buffer> []
|
||||
silent! nunmap <buffer> ][
|
||||
silent! vunmap <buffer> ][
|
||||
silent! nunmap <buffer> ]"
|
||||
silent! vunmap <buffer> ]"
|
||||
silent! nunmap <buffer> ["
|
||||
silent! vunmap <buffer> ["
|
||||
endif
|
||||
unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps
|
||||
endfunc
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "call VimFtpluginUndo()"
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
setlocal fo-=t fo+=croql
|
||||
|
||||
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a
|
||||
" keyword character. E.g., for netrw#Nread().
|
||||
setlocal isk+=#
|
||||
|
||||
" Use :help to lookup the keyword under the cursor with K.
|
||||
setlocal keywordprg=:help
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
" Avoid that #{} starts a comment.
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &tw == 0
|
||||
setlocal tw=78
|
||||
endif
|
||||
|
||||
" Comments start with a double quote; in Vim9 script # would also work
|
||||
setlocal commentstring=\"%s
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
let b:did_add_maps = 1
|
||||
|
||||
" Move around functions.
|
||||
nnoremap <silent><buffer> [[ m':call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ]] m':call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
|
||||
nnoremap <silent><buffer> [] m':call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ][ m':call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
|
||||
|
||||
" Move around comments
|
||||
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
|
||||
vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
|
||||
nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
endif
|
||||
|
||||
" Let the matchit plugin know what items can be matched.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
" - set spl=de,en
|
||||
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
|
||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name")
|
||||
\ =~? "comment\\|string\\|vimSynReg\\|vimSet"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" removed this, because 'cpoptions' is a global option.
|
||||
" setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
endif
|
||||
23
ftplugin/xf86conf.vim
Normal file
23
ftplugin/xf86conf.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: XFree86 Configuration File
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
endif
|
||||
@@ -188,7 +188,7 @@ rules:
|
||||
filetype: mason
|
||||
- lines: 50
|
||||
rules:
|
||||
- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans)\b|{#\s+'
|
||||
- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans|load)\b|{#\s+'
|
||||
filetype: htmldjango
|
||||
- pattern: '\bDTD\s+XHTML\s'
|
||||
filetype: xhtml
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
if exists('b:did_indent') | finish | endif
|
||||
let b:did_indent = 1
|
||||
|
||||
|
||||
function! DockerfileIndent(line)
|
||||
let prev_line = getline(a:line - 1)
|
||||
if a:line > 1 && prev_line =~ '\\\s*$'
|
||||
let i = indent(a:line - 1)
|
||||
if i == 0
|
||||
let i += &l:shiftwidth
|
||||
if &l:expandtab && prev_line =~# '^RUN\s'
|
||||
" Overindent past RUN
|
||||
let i = 4 + &l:shiftwidth
|
||||
endif
|
||||
endif
|
||||
return i
|
||||
endif
|
||||
|
||||
return -1
|
||||
endfunction
|
||||
|
||||
|
||||
set indentexpr=DockerfileIndent(v:lnum)
|
||||
|
||||
endif
|
||||
@@ -1,11 +1,10 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Vim indent script for HTML
|
||||
" Header: "{{{
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2017 Jun 13
|
||||
" Version: 1.0
|
||||
" Last Change: 2020 Jul 06
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
" Supports template systems through hooks.
|
||||
@@ -58,6 +57,9 @@ let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
"}}}
|
||||
|
||||
" Pattern to match the name of a tag, including custom elements.
|
||||
let s:tagname = '\w\+\(-\w\+\)*'
|
||||
|
||||
" Check and process settings from b:html_indent and g:html_indent... variables.
|
||||
" Prefer using buffer-local settings over global settings, so that there can
|
||||
" be defaults for all HTML files and exceptions for specific types of HTML
|
||||
@@ -216,25 +218,27 @@ endfunc "}}}
|
||||
" Self-closing tags and tags that are sometimes {{{
|
||||
" self-closing (e.g., <p>) are not here (when encountering </p> we can find
|
||||
" the matching <p>, but not the other way around).
|
||||
" Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track',
|
||||
" 'wbr'.
|
||||
" Old HTML tags:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
|
||||
\ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code',
|
||||
\ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font',
|
||||
\ 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'font',
|
||||
\ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html',
|
||||
\ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li',
|
||||
\ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol',
|
||||
\ 'optgroup', 'p', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub',
|
||||
\ 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub',
|
||||
\ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td',
|
||||
\ 'tr', 'tbody', 'tfoot', 'thead'])
|
||||
|
||||
" New HTML5 elements:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
|
||||
\ 'command', 'data', 'datalist', 'details', 'dislog', 'embed', 'figcaption',
|
||||
\ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', 'nav', 'output',
|
||||
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg',
|
||||
\ 'time', 'track', 'video', 'wbr'])
|
||||
\ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data',
|
||||
\ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure',
|
||||
\ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output',
|
||||
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary',
|
||||
\ 'svg', 'time', 'video'])
|
||||
|
||||
" Tags added for web components:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
@@ -282,7 +286,7 @@ func! s:CountITags(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
let s:block = 0 " assume starting outside of a block
|
||||
let s:countonly = 1 " don't change state
|
||||
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
call substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let s:countonly = 0
|
||||
endfunc "}}}
|
||||
|
||||
@@ -294,7 +298,7 @@ func! s:CountTagsAndState(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
|
||||
let s:block = b:hi_newstate.block
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let tmp = substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
if s:block == 3
|
||||
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
|
||||
endif
|
||||
@@ -532,7 +536,7 @@ func! s:FreshState(lnum)
|
||||
let swendtag = match(text, '^\s*</') >= 0
|
||||
|
||||
" If previous line ended in a closing tag, line up with the opening tag.
|
||||
if !swendtag && text =~ '</\w\+\s*>\s*$'
|
||||
if !swendtag && text =~ '</' . s:tagname . '\s*>\s*$'
|
||||
call cursor(state.lnum, 99999)
|
||||
normal! F<
|
||||
let start_lnum = HtmlIndent_FindStartTag()
|
||||
@@ -584,7 +588,7 @@ func! s:Alien3()
|
||||
return eval(b:hi_js1indent)
|
||||
endif
|
||||
if b:hi_indent.scripttype == "javascript"
|
||||
return GetJavascriptIndent()
|
||||
return eval(b:hi_js1indent) + GetJavascriptIndent()
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
@@ -623,7 +627,7 @@ func! s:CSSIndent()
|
||||
return eval(b:hi_css1indent)
|
||||
endif
|
||||
|
||||
" If the current line starts with "}" align with it's match.
|
||||
" If the current line starts with "}" align with its match.
|
||||
if curtext =~ '^\s*}'
|
||||
call cursor(v:lnum, 1)
|
||||
try
|
||||
@@ -661,7 +665,7 @@ func! s:CSSIndent()
|
||||
else
|
||||
let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:'
|
||||
let prev_unfinished = s:CssUnfinished(prev_text)
|
||||
if !cur_hasfield && (prev_hasfield || prev_unfinished)
|
||||
if prev_unfinished
|
||||
" Continuation line has extra indent if the previous line was not a
|
||||
" continuation line.
|
||||
let extra = shiftwidth()
|
||||
@@ -714,9 +718,13 @@ func! s:CSSIndent()
|
||||
endfunc "}}}
|
||||
|
||||
" Inside <style>: Whether a line is unfinished.
|
||||
" tag:
|
||||
" tag: blah
|
||||
" tag: blah &&
|
||||
" tag: blah ||
|
||||
func! s:CssUnfinished(text)
|
||||
"{{{
|
||||
return a:text =~ '\s\(||\|&&\|:\)\s*$'
|
||||
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
|
||||
endfunc "}}}
|
||||
|
||||
" Search back for the first unfinished line above "lnum".
|
||||
@@ -843,11 +851,12 @@ func! HtmlIndent_FindTagStart(lnum)
|
||||
" - a flag indicating whether we found the end of a tag.
|
||||
" This method is global so that HTML-like indenters can use it.
|
||||
" To avoid matching " > " or " < " inside a string require that the opening
|
||||
" "<" is followed by a word character
|
||||
" "<" is followed by a word character and the closing ">" comes after a
|
||||
" non-white character.
|
||||
let idx = match(getline(a:lnum), '\S>\s*$')
|
||||
if idx > 0
|
||||
call cursor(a:lnum, idx)
|
||||
let lnum = searchpair('<\w', '' , '>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
|
||||
let lnum = searchpair('<\w', '' , '\S>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
|
||||
if lnum > 0
|
||||
return [lnum, 1]
|
||||
endif
|
||||
@@ -861,7 +870,7 @@ func! HtmlIndent_FindStartTag()
|
||||
" The cursor must be on or before a closing tag.
|
||||
" If found, positions the cursor at the match and returns the line number.
|
||||
" Otherwise returns 0.
|
||||
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\(-\w\+\)*\ze')
|
||||
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs' . s:tagname . '\ze')
|
||||
let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW')
|
||||
if start_lnum > 0
|
||||
return start_lnum
|
||||
@@ -877,7 +886,7 @@ func! HtmlIndent_FindTagEnd()
|
||||
" a self-closing tag, to the matching ">".
|
||||
" Limited to look up to b:html_indent_line_limit lines away.
|
||||
let text = getline('.')
|
||||
let tagname = matchstr(text, '\w\+\(-\w\+\)*\|!--', col('.'))
|
||||
let tagname = matchstr(text, s:tagname . '\|!--', col('.'))
|
||||
if tagname == '!--'
|
||||
call search('--\zs>')
|
||||
elseif s:get_tag('/' . tagname) != 0
|
||||
@@ -894,12 +903,19 @@ func! s:InsideTag(foundHtmlString)
|
||||
"{{{
|
||||
if a:foundHtmlString
|
||||
" Inside an attribute string.
|
||||
" Align with the previous line or use an external function.
|
||||
" Align with the opening quote or use an external function.
|
||||
let lnum = v:lnum - 1
|
||||
if lnum > 1
|
||||
if exists('b:html_indent_tag_string_func')
|
||||
return b:html_indent_tag_string_func(lnum)
|
||||
endif
|
||||
" If there is a double quote in the previous line, indent with the
|
||||
" character after it.
|
||||
if getline(lnum) =~ '"'
|
||||
call cursor(lnum, 0)
|
||||
normal f"
|
||||
return virtcol('.')
|
||||
endif
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
@@ -923,17 +939,21 @@ func! s:InsideTag(foundHtmlString)
|
||||
let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="')
|
||||
endif
|
||||
if idx == -1
|
||||
let idx = match(text, '<\w\+\(-\w\+\)*\s\zs\w')
|
||||
" try <tag attr
|
||||
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
|
||||
endif
|
||||
if idx == -1
|
||||
let idx = match(text, '<\w\+\(-\w\+\)*')
|
||||
" after just "<tag" indent one level more
|
||||
let idx = match(text, '<' . s:tagname . '$')
|
||||
if idx >= 0
|
||||
let idx = idx + shiftwidth()
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.') + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
if idx > 0
|
||||
" Found the attribute. TODO: assumes spaces, no Tabs.
|
||||
return idx
|
||||
" Found the attribute to align with.
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.')
|
||||
endif
|
||||
endwhile
|
||||
return -1
|
||||
|
||||
120
indent/make.vim
Normal file
120
indent/make.vim
Normal file
@@ -0,0 +1,120 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Makefile
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2007-05-07
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetMakeIndent()
|
||||
setlocal indentkeys=!^F,o,O,<:>,=else,=endif
|
||||
setlocal nosmartindent
|
||||
|
||||
if exists("*GetMakeIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:comment_rx = '^\s*#'
|
||||
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continuation_rx = '\\$'
|
||||
let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
|
||||
let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
|
||||
" TODO: This needs to be a lot more restrictive in what it matches.
|
||||
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
||||
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
||||
let s:end_conditional_directive_rx = '^\s*\%(else\|endif\)\>'
|
||||
|
||||
function s:remove_continuation(line)
|
||||
return substitute(a:line, s:continuation_rx, "", "")
|
||||
endfunction
|
||||
|
||||
function GetMakeIndent()
|
||||
" TODO: Should this perhaps be v:lnum -1?
|
||||
" let prev_lnum = prevnonblank(v:lnum - 1)
|
||||
let prev_lnum = v:lnum - 1
|
||||
if prev_lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_line = getline(prev_lnum)
|
||||
|
||||
let prev_prev_lnum = prev_lnum - 1
|
||||
let prev_prev_line = prev_prev_lnum != 0 ? getline(prev_prev_lnum) : ""
|
||||
|
||||
" TODO: Deal with comments. In comments, continuations aren't interesting.
|
||||
if prev_line =~ s:continuation_rx
|
||||
if prev_prev_line =~ s:continuation_rx
|
||||
return indent(prev_lnum)
|
||||
elseif prev_line =~ s:rule_rx
|
||||
return shiftwidth()
|
||||
elseif prev_line =~ s:assignment_rx
|
||||
call cursor(prev_lnum, 1)
|
||||
if search(s:assignment_rx, 'W') != 0
|
||||
return virtcol('.') - 1
|
||||
else
|
||||
" TODO: ?
|
||||
return shiftwidth()
|
||||
endif
|
||||
else
|
||||
" TODO: OK, this might be a continued shell command, so perhaps indent
|
||||
" properly here? Leave this out for now, but in the next release this
|
||||
" should be using indent/sh.vim somehow.
|
||||
"if prev_line =~ '^\t' " s:rule_command_rx
|
||||
" if prev_line =~ '^\s\+[@-]\%(if\)\>'
|
||||
" return indent(prev_lnum) + 2
|
||||
" endif
|
||||
"endif
|
||||
return indent(prev_lnum) + shiftwidth()
|
||||
endif
|
||||
elseif prev_prev_line =~ s:continuation_rx
|
||||
let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line)
|
||||
let lnum = prev_prev_lnum - 1
|
||||
let line = getline(lnum)
|
||||
while line =~ s:continuation_rx
|
||||
let folded_line = s:remove_continuation(line) . ' ' . folded_line
|
||||
let lnum -= 1
|
||||
let line = getline(lnum)
|
||||
endwhile
|
||||
let folded_lnum = lnum + 1
|
||||
if folded_line =~ s:rule_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return &ts
|
||||
endif
|
||||
else
|
||||
" elseif folded_line =~ s:folded_assignment_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return indent(folded_lnum)
|
||||
endif
|
||||
" else
|
||||
" " TODO: ?
|
||||
" return indent(prev_lnum)
|
||||
endif
|
||||
elseif prev_line =~ s:rule_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return &ts
|
||||
endif
|
||||
elseif prev_line =~ s:conditional_directive_rx
|
||||
return shiftwidth()
|
||||
else
|
||||
let line = getline(v:lnum)
|
||||
if line =~ s:just_inserted_rule_rx
|
||||
return 0
|
||||
elseif line =~ s:end_conditional_directive_rx
|
||||
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth()
|
||||
else
|
||||
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
endif
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
" Language: RPL/2
|
||||
" Version: 0.2
|
||||
" Last Change: 2017 Jun 13
|
||||
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr>
|
||||
" Maintainer: BERTRAND Joël <rpl2@free.fr>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
|
||||
|
||||
"Description: Indent scheme for the tilde weblanguage
|
||||
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu>
|
||||
"Author: Tobias Rundström <tobi@tobi.nu>
|
||||
"URL: http://tilde.tildesoftware.net
|
||||
"Last Change: May 8 09:15:09 CEST 2002
|
||||
|
||||
|
||||
134
indent/vim.vim
134
indent/vim.vim
@@ -1,134 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Sep 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetVimIndent()
|
||||
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys-=0#
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetVimIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
function GetVimIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetVimIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
let s:lineContPat = '^\s*\(\\\|"\\ \)'
|
||||
|
||||
function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" If the current line doesn't start with '\' or '"\ ' and below a line that
|
||||
" starts with '\' or '"\ ', use the indent of the line above it.
|
||||
let cur_text = getline(v:lnum)
|
||||
if cur_text !~ s:lineContPat
|
||||
while lnum > 0 && getline(lnum) =~ s:lineContPat
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" At the start of the file use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_text = getline(lnum)
|
||||
|
||||
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
|
||||
" and :else. Add it three times for a line that starts with '\' or '"\ '
|
||||
" after a line that doesn't (or g:vim_indent_cont if it exists).
|
||||
let ind = indent(lnum)
|
||||
|
||||
" In heredoc indenting works completely differently.
|
||||
if has('syntax_items')
|
||||
let syn_here = synIDattr(synID(v:lnum, 1, 1), "name")
|
||||
if syn_here =~ 'vimLetHereDocStop'
|
||||
" End of heredoc: use indent of matching start line
|
||||
let lnum = v:lnum - 1
|
||||
while lnum > 0
|
||||
if synIDattr(synID(lnum, 1, 1), "name") !~ 'vimLetHereDoc'
|
||||
return indent(lnum)
|
||||
endif
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
if syn_here =~ 'vimLetHereDoc'
|
||||
if synIDattr(synID(lnum, 1, 1), "name") !~ 'vimLetHereDoc'
|
||||
" First line in heredoc: increase indent
|
||||
return ind + shiftwidth()
|
||||
endif
|
||||
" Heredoc continues: no change in indent
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
|
||||
if exists("g:vim_indent_cont")
|
||||
let ind = ind + g:vim_indent_cont
|
||||
else
|
||||
let ind = ind + shiftwidth() * 3
|
||||
endif
|
||||
elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>'
|
||||
let ind = ind + shiftwidth()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement indent.
|
||||
if prev_text !~ '^\s*au\%[tocmd]'
|
||||
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the previous line contains an "end" after a pipe, but not in an ":au"
|
||||
" command. And not when there is a backslash before the pipe.
|
||||
" And when syntax HL is enabled avoid a match inside a string.
|
||||
let i = match(prev_text, '[^\\]|\s*\(ene\@!\)')
|
||||
if i > 0 && prev_text !~ '^\s*au\%[tocmd]'
|
||||
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2
|
||||
|
||||
endif
|
||||
41
indent/xf86conf.vim
Normal file
41
indent/xf86conf.vim
Normal file
@@ -0,0 +1,41 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: XFree86 Configuration File
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetXF86ConfIndent()
|
||||
setlocal indentkeys=!^F,o,O,=End
|
||||
setlocal nosmartindent
|
||||
|
||||
if exists("*GetXF86ConfIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetXF86ConfIndent()
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
|
||||
if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
|
||||
if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
endif
|
||||
@@ -245,19 +245,26 @@ filetypes:
|
||||
- name: autohotkey
|
||||
linguist: AutoHotkey
|
||||
---
|
||||
name: make
|
||||
remote: vim/vim:runtime
|
||||
glob: '**/make.vim'
|
||||
filetypes:
|
||||
- name: make
|
||||
filenames:
|
||||
- '*[mM]akefile'
|
||||
extensions:
|
||||
- mak
|
||||
- dsp
|
||||
- mk
|
||||
---
|
||||
name: automake
|
||||
remote: vim/vim:runtime
|
||||
glob: '**/automake.vim'
|
||||
filetypes:
|
||||
- name: automake
|
||||
filenames:
|
||||
- Makefile.am
|
||||
- makefile.am
|
||||
- '[mM]akefile.am'
|
||||
- GNUmakefile.am
|
||||
extensions:
|
||||
- mak
|
||||
- dsp
|
||||
- mk
|
||||
---
|
||||
name: asn
|
||||
remote: vim/vim:runtime
|
||||
@@ -493,15 +500,8 @@ filetypes:
|
||||
---
|
||||
name: dockerfile
|
||||
remote: ekalinin/Dockerfile.vim
|
||||
glob: '**/docker-compose.vim'
|
||||
filetypes:
|
||||
- name: Dockerfile
|
||||
linguist: Dockerfile
|
||||
extra_extensions:
|
||||
- dock
|
||||
- Dockerfile
|
||||
extra_filenames:
|
||||
- dockerfile
|
||||
- Dockerfile*
|
||||
- name: yaml.docker-compose
|
||||
filenames:
|
||||
- 'docker-compose*.yaml'
|
||||
@@ -754,8 +754,13 @@ filetypes:
|
||||
linguist: HAProxy
|
||||
extra_filenames:
|
||||
- 'haproxy*.conf*'
|
||||
- 'haproxy*.cfg*'
|
||||
ignored_warnings:
|
||||
- 'haproxy*.c*'
|
||||
ignored_extensions:
|
||||
- cfg
|
||||
ignored_filenames:
|
||||
- haproxy.cfg
|
||||
---
|
||||
name: haskell
|
||||
remote: neovimhaskell/haskell-vim
|
||||
@@ -792,13 +797,6 @@ filetypes:
|
||||
extra_extensions:
|
||||
- ql
|
||||
---
|
||||
# TODO: change after https://github.com/othree/html5.vim/pull/106 is merged
|
||||
name: html5
|
||||
remote: sheerun/html5.vim
|
||||
filetypes:
|
||||
- name: html
|
||||
linguist: HTML
|
||||
---
|
||||
name: i3
|
||||
remote: mboughaba/i3config.vim
|
||||
filetypes:
|
||||
@@ -1478,13 +1476,6 @@ filetypes:
|
||||
# handled by sbt plugin
|
||||
- sbt
|
||||
---
|
||||
name: sbt
|
||||
remote: derekwyatt/vim-sbt
|
||||
filetypes:
|
||||
- name: sbt.scala
|
||||
extensions:
|
||||
- sbt
|
||||
---
|
||||
name: scss
|
||||
remote: cakebaker/scss-syntax.vim
|
||||
filetypes:
|
||||
@@ -1504,10 +1495,19 @@ filetypes:
|
||||
- '.zlogin'
|
||||
- '.zprofile'
|
||||
- '.zlogout'
|
||||
- 'zshrc'
|
||||
- 'zshenv'
|
||||
- 'zlogin'
|
||||
- 'zprofile'
|
||||
- 'zlogout'
|
||||
# Udev symlinks config
|
||||
extra_filenames:
|
||||
- '*/etc/udev/cdsymlinks.conf'
|
||||
ignored_interpreters:
|
||||
- zsh
|
||||
- name: zsh
|
||||
interpreters:
|
||||
- zsh
|
||||
extensions:
|
||||
- zsh
|
||||
filenames:
|
||||
@@ -1520,6 +1520,7 @@ filetypes:
|
||||
- '.zcompdump*'
|
||||
- '.zfbfmarks'
|
||||
- '.zsh*'
|
||||
- '*/etc/zprofile'
|
||||
---
|
||||
name: zinit
|
||||
remote: zinit-zsh/zplugin-vim-syntax
|
||||
@@ -2328,7 +2329,7 @@ glob: "**/dockerfile.vim"
|
||||
filetypes:
|
||||
- name: dockerfile
|
||||
patterns:
|
||||
- pattern: Containerfile,Dockerfile,*.Dockerfile
|
||||
- pattern: Containerfile,Dockerfile,*.Dockerfile,*.dock,dockerfile,Dockerfile*
|
||||
description: Dockerfile; Podman uses the same syntax with name Containerfile
|
||||
---
|
||||
name: dcd
|
||||
@@ -3981,9 +3982,9 @@ glob: "**/pascal.vim"
|
||||
filetypes:
|
||||
- name: pascal
|
||||
patterns:
|
||||
- pattern: "*.pas"
|
||||
- pattern: "*.pas,*.pp"
|
||||
description: Pascal (also *.p)
|
||||
- pattern: "*.dpr"
|
||||
- pattern: "*.dpr,*.lpr"
|
||||
description: Delphi or Lazarus program file
|
||||
---
|
||||
name: pdf
|
||||
@@ -4631,6 +4632,7 @@ filetypes:
|
||||
name: st
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/st.vim"
|
||||
after: html
|
||||
filetypes:
|
||||
- name: st
|
||||
patterns:
|
||||
@@ -4976,7 +4978,7 @@ glob: "**/tidy.vim"
|
||||
filetypes:
|
||||
- name: tidy
|
||||
patterns:
|
||||
- pattern: ".tidyrc,tidyrc"
|
||||
- pattern: ".tidyrc,tidyrc,tidy.conf"
|
||||
description: Tidy config
|
||||
---
|
||||
name: tf
|
||||
@@ -5152,8 +5154,6 @@ filetypes:
|
||||
- pattern: "*.vhdl_[0-9]*"
|
||||
---
|
||||
name: vim
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/vim.vim"
|
||||
filetypes:
|
||||
- name: vim
|
||||
patterns:
|
||||
@@ -5485,3 +5485,24 @@ remote: vim/vim:runtime
|
||||
glob: "**/autodoc.vim"
|
||||
# Needed by c, cmod, and pike
|
||||
filetypes: []
|
||||
---
|
||||
name: html
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/html.vim"
|
||||
filetypes:
|
||||
- name: html
|
||||
linguist: HTML
|
||||
---
|
||||
# TODO: change after https://github.com/othree/html5.vim/pull/106 is merged
|
||||
name: html5
|
||||
remote: sheerun/html5.vim
|
||||
dependencies: html
|
||||
filetypes: []
|
||||
---
|
||||
name: xf86conf
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/xf86conf.vim"
|
||||
filetypes:
|
||||
- name: xf86conf
|
||||
patterns:
|
||||
- pattern: "XF86Config-4*,XF86Config*,*/xorg.conf.d/*.conf,xorg.conf,xorg.conf-4"
|
||||
|
||||
@@ -22,6 +22,7 @@ def except(hash, *keys)
|
||||
h
|
||||
end
|
||||
|
||||
|
||||
def verify(packages, heuristics)
|
||||
extensions_with_heuristics = Set.new(heuristics.flat_map { |e| e["extensions"] })
|
||||
no_heuristics = Hash.new { |a, b| a[b] = [] }
|
||||
@@ -64,7 +65,7 @@ def sort_packages(packages)
|
||||
for p in packages
|
||||
for f in p["filetypes"]
|
||||
for e in f["extensions"]
|
||||
by_extension[e] << p["name"]
|
||||
by_extension[e] << p["name"] unless by_extension[e].include?(p["name"])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -84,6 +85,25 @@ def sort_packages(packages)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for e in f["extensions"]
|
||||
if e.count(".") > 0
|
||||
ext = e.split(".").last
|
||||
for name in by_extension[ext]
|
||||
if p["name"] != name
|
||||
implicit_dependencies[p["name"]] |= [name]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if e.match?(/[A-Z]/) && by_extension[e.downcase].size > 0
|
||||
for name in by_extension[e.downcase]
|
||||
if p["name"] != name
|
||||
implicit_dependencies[p["name"]] |= [name]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -120,6 +140,7 @@ def load_data()
|
||||
end
|
||||
end
|
||||
end
|
||||
filetype.delete("patterns")
|
||||
end
|
||||
if filetype["linguist"]
|
||||
if filetype["extensions"]
|
||||
@@ -275,10 +296,14 @@ def copy_file(package, src, dest)
|
||||
output << "if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '#{name}') == -1\n\n"
|
||||
end
|
||||
contents = File.read(input)
|
||||
# fix encoding if required
|
||||
contents.gsub!(/!@#%#/, "") rescue contents = contents.force_encoding('iso-8859-1').encode('utf-8')
|
||||
# ..= is feature of new vims...
|
||||
contents.gsub!(' ..= ', ' .= ')
|
||||
# https://github.com/vim/vim/pull/7091
|
||||
contents.gsub!('fileencoding=', 'encoding=')
|
||||
contents.gsub!(/set(local)? fileencoding=utf-8/, '')
|
||||
contents.gsub!(/ fileencoding=utf-8/, '')
|
||||
contents.gsub!('À-ÿ', '\u00ac-\uffff')
|
||||
output << contents
|
||||
output << "\nendif\n"
|
||||
end
|
||||
@@ -286,7 +311,7 @@ def copy_file(package, src, dest)
|
||||
end
|
||||
|
||||
def download(packages)
|
||||
packages.map { |p| p["remote"] or raise "No remote for: " + p["name"] }.uniq.each_slice(20) do |remotes|
|
||||
packages.map { |p| p["remote"] }.compact.uniq.each_slice(20) do |remotes|
|
||||
remotes.map do |remote|
|
||||
Thread.new do
|
||||
repo, branch, path, dir = parse_remote(remote)
|
||||
@@ -334,7 +359,11 @@ def pattern_to_condition(rule)
|
||||
end
|
||||
|
||||
def rules_to_code(rules)
|
||||
output = ""
|
||||
output = <<~EOF
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
EOF
|
||||
|
||||
vars = []
|
||||
each_hash(rules) do |h|
|
||||
@@ -459,6 +488,9 @@ def extract(packages)
|
||||
|
||||
output = []
|
||||
packages.map do |package|
|
||||
if !package["remote"]
|
||||
next
|
||||
end
|
||||
repo, branch, path, dir = parse_remote(package["remote"])
|
||||
dirs = package.fetch("dirs", default_dirs)
|
||||
ignored_dirs = package.fetch("ignored_dirs", [])
|
||||
@@ -476,8 +508,8 @@ def extract(packages)
|
||||
globs = [package.fetch("glob", package.fetch('globs', '**/*.{vim,ctags,vital,txt}'))].flatten
|
||||
globs.each do |glob|
|
||||
Dir.glob("#{subdir}/#{glob}", base: subtree).each do |p|
|
||||
next unless File.file?("#{subtree}/#{p}")
|
||||
copy_file(package, "#{subtree}/#{p}", p)
|
||||
next unless File.file?("#{subtree}#{p}")
|
||||
copy_file(package, "#{subtree}#{p}", p)
|
||||
end
|
||||
end
|
||||
elsif File.exist?(subpath)
|
||||
@@ -575,7 +607,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
end
|
||||
|
||||
for filename in filenames.sort
|
||||
if filename[0] == "."
|
||||
if filename.match?(/^\.[^\/]+[^\*]$/)
|
||||
filename = "{.,}" + filename[1..-1]
|
||||
end
|
||||
if filename[-1] == "*"
|
||||
@@ -591,7 +623,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
|
||||
for heuristic in filetype_heuristics.uniq
|
||||
extensions = heuristic["extensions"].map { |e| "*.#{e}" }
|
||||
autocommands << "au! BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
|
||||
autocommands << "au BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
|
||||
end
|
||||
|
||||
if autocommands.size > 0 && filetype["description"]
|
||||
@@ -617,7 +649,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
|
||||
for heuristic in heuristics
|
||||
output << <<~EOS
|
||||
func! polyglot#detect##{camelize(heuristic["extensions"].first)}()
|
||||
func! polyglot#detect##{camelize(heuristic["extensions"].first)}(...)
|
||||
#{indent(rules_to_code(heuristic), 2)}
|
||||
endfunc
|
||||
EOS
|
||||
@@ -839,8 +871,4 @@ if __FILE__ == $0
|
||||
generate_plugins(packages)
|
||||
generate_tests(packages)
|
||||
puts(" Bye! Have a wonderful time!")
|
||||
|
||||
if !ENV["DEV"]
|
||||
FileUtils.rm_rf("tmp")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'yaml'
|
||||
require 'json'
|
||||
|
||||
def comma_expanson(s)
|
||||
s.scan(/{[^{]+}|[^{]+/).map { |a| a[0] == "{" ? a : a.split(",", -1) }.reduce([]) do |a, b|
|
||||
s.scan(/{[^{]+}|[^{]+/).map { |a| a[0] == "{" ? a : a.split(/(?<!\\),/, -1) }.reduce([]) do |a, b|
|
||||
a.size > 0 ?
|
||||
(b.is_a?(String) ?
|
||||
a[0..-2] + [a[-1] + b] :
|
||||
a[0..-2] + [a[-1] + b[0]] + b[1..-1]) :
|
||||
[b].flatten
|
||||
end
|
||||
end.map { |e| e.gsub('\\,', ',')}
|
||||
end
|
||||
|
||||
def import_autocommands
|
||||
@@ -37,6 +38,9 @@ vim -es -u DEFAULTS -c 'exe("func! Capture() \\n redir => capture \\n silent aut
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in filetypes
|
||||
filetypes[k].uniq!
|
||||
end
|
||||
|
||||
filetypes
|
||||
end
|
||||
@@ -87,8 +91,6 @@ def generate_packages_entries(filetypes, comments)
|
||||
return entries
|
||||
end
|
||||
|
||||
filetypes = import_autocommands
|
||||
|
||||
def fix_quotes(a)
|
||||
a = a.gsub(/\\/) { '\\\\' }
|
||||
a.scan(/^.*?"(.+?)"\n/m).each { |p| a[p[0]] = p[0].gsub('"') { '\\"'} }
|
||||
@@ -114,9 +116,200 @@ def get_comments
|
||||
result
|
||||
end
|
||||
|
||||
comments = get_comments()
|
||||
def square_expansion(s)
|
||||
return [s] unless s.include?('[')
|
||||
s.scan(/(\[[^\]]+\]|[^\[]+)/).map { |x| x[0] }
|
||||
.map { |x| x[0] == "[" ? x[1..-2].split("") : [x] }
|
||||
.reduce(&:product).map(&:flatten).map(&:join)
|
||||
end
|
||||
|
||||
def brace_expansion(s)
|
||||
if !s.include?('{')
|
||||
return [s]
|
||||
end
|
||||
r=1 # Dummy value to forward-declare the parse function `r`
|
||||
t=->x{ # Function to parse a bracket block
|
||||
x=x[0].gsub(/^{(.*)}$/){$1} # Remove outer brackets if both are present
|
||||
# x[0] is required because of quirks in the `scan` function
|
||||
x=x.scan(/(({(\g<1>|,)*}|[^,{}]|(?<=,|^)(?=,|$))+)/)
|
||||
# Regex black magic: collect elements of outer bracket
|
||||
x.map{|i|i=i[0];i[?{]?r[i]:i}.flatten # For each element with brackets, run parse function
|
||||
}
|
||||
r=->x{ # Function to parse bracket expansions a{b,c}{d,e}
|
||||
i=x.scan(/({(\g<1>)*}|[^{} ]+)/) # Regex black magic: scan for adjacent sets of brackets
|
||||
i=i.map(&t) # Map all elements against the bracket parser function `t`
|
||||
i.shift.product(*i).map &:join # Combine the adjacent sets with cartesian product and join them together
|
||||
}
|
||||
s.split.map(&r).flatten
|
||||
end
|
||||
|
||||
def generate_tests(autocommands)
|
||||
existing = JSON.parse(File.read('tmp/vim/vim/src/testdir/test_filetype.vim')
|
||||
.match(/let s:filename_checks = ({.*?\\ })/m)[1]
|
||||
.gsub(' \\', ' ').gsub("'", '"')
|
||||
.gsub('$VIMRUNTIME .', '').gsub(",\n }", "}"))
|
||||
|
||||
output = []
|
||||
|
||||
generated = {}
|
||||
for ft in autocommands.keys().sort()
|
||||
patterns = autocommands[ft]
|
||||
|
||||
files1 = []
|
||||
to_delete = []
|
||||
|
||||
patterns.reject! { |p| p.match?(/[\|\\\(]/) }
|
||||
|
||||
patterns = patterns.map do |pattern|
|
||||
pattern = pattern.gsub('[0-9]', '1').gsub('[2-3]', '2').gsub('[1-3]', '1').gsub('?', 'x')
|
||||
|
||||
if pattern.match?(/\/\*\.[^\*\/]+$/)
|
||||
pattern = pattern.gsub(/\/\*\.([^\*\/]+)$/, '/file.\1')
|
||||
end
|
||||
|
||||
if pattern.match?(/[\/\.-]\*$/)
|
||||
pattern = pattern[0..-2] + "file"
|
||||
end
|
||||
|
||||
pattern = pattern.gsub(/\/\*\//) { '/any/' }
|
||||
|
||||
pattern
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map { |p| brace_expansion(p) }
|
||||
|
||||
for pattern in patterns
|
||||
if pattern.match(/^\*[.\,][^\*\/]+$/)
|
||||
files1 << pattern.gsub('*', 'file')
|
||||
|
||||
to_delete << pattern
|
||||
end
|
||||
if pattern.match(/^[^\*\/]+\.\*$/)
|
||||
files1 << pattern.gsub('*', 'file')
|
||||
to_delete << pattern
|
||||
end
|
||||
end
|
||||
files1.sort!
|
||||
patterns = patterns - to_delete
|
||||
|
||||
|
||||
files2 = []
|
||||
for pattern in patterns
|
||||
if !pattern.match(/\*/)
|
||||
files2 << pattern
|
||||
to_delete << pattern
|
||||
end
|
||||
end
|
||||
files2.sort!
|
||||
patterns = patterns - to_delete
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/^\*\//)
|
||||
[pattern[1..-1], "any" + pattern[1..-1]]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/^\*[-\.]/)
|
||||
["some" + pattern[1..-1]]
|
||||
elsif pattern.match?(/^\*/)
|
||||
[pattern[1..-1], "some-" + pattern[1..-1]]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/[^\/]+\/\*-[^\\]+$/)
|
||||
[pattern.gsub('/*-', '/file-')]
|
||||
elsif pattern.match?(/[^\/]+\/\*\.[^\\]+$/)
|
||||
[pattern.gsub('/*.', '/file.')]
|
||||
elsif pattern.match?(/[^\/]+\/\*[^\\]+$/)
|
||||
[pattern.gsub('/*', '/'), pattern.gsub('/*', '/some-')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.include?('-*/')
|
||||
[pattern.gsub('-*/', '-file/')]
|
||||
elsif pattern.include?('.*/')
|
||||
[pattern.gsub('.*/', '.file/')]
|
||||
elsif pattern.include?('*/')
|
||||
[pattern.gsub('*/', '/'), pattern.gsub('*/', '-some/')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/[^\/]+\.\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('.*.', '.file.')]
|
||||
elsif pattern.match?(/[^\/]+-\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('-*.', '-file.')]
|
||||
elsif pattern.match?(/[^\/]+\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('*.', '.'), pattern.gsub('*.', '-file.')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/\*$/)
|
||||
[pattern[0..-2], pattern[0..-2] + "-file"]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
patterns.sort!
|
||||
|
||||
files = [*files1, *files2, *patterns].flat_map { |e| square_expansion(e) }
|
||||
generated[ft] = files
|
||||
|
||||
end
|
||||
|
||||
|
||||
for ft, original in existing
|
||||
for file in generated.fetch(ft, [])
|
||||
|
||||
unless original.include?(file) || ['file.DEF', 'file.MOD', 'file.BUILD', 'BUILD'].include?(file) || ft == "help"
|
||||
original << file
|
||||
end
|
||||
end
|
||||
generated.delete(ft)
|
||||
output << " \\ '#{ft}': #{JSON.generate(original).gsub('"', "'").gsub("','", "', '")},"
|
||||
end
|
||||
|
||||
for ft, paths in generated
|
||||
idx = output.find_index { |a| a > " \\ '" + ft }
|
||||
output.insert(idx, " \\ '#{ft}': #{JSON.generate(paths).gsub('"', "'").gsub("','", "', '")},")
|
||||
end
|
||||
|
||||
|
||||
output << " \\ }"
|
||||
|
||||
msgs = <<'EOF'
|
||||
\ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user',
|
||||
\ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log',
|
||||
\ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err',
|
||||
\ '/log/auth.info', '/log/cron.info', '/log/daemon.info', '/log/debug.info', '/log/kern.info', '/log/lpr.info', '/log/mail.info', '/log/messages.info', '/log/news/news.info', '/log/syslog.info', '/log/user.info',
|
||||
\ '/log/auth.warn', '/log/cron.warn', '/log/daemon.warn', '/log/debug.warn', '/log/kern.warn', '/log/lpr.warn', '/log/mail.warn', '/log/messages.warn', '/log/news/news.warn', '/log/syslog.warn', '/log/user.warn',
|
||||
\ '/log/auth.crit', '/log/cron.crit', '/log/daemon.crit', '/log/debug.crit', '/log/kern.crit', '/log/lpr.crit', '/log/mail.crit', '/log/messages.crit', '/log/news/news.crit', '/log/syslog.crit', '/log/user.crit',
|
||||
\ '/log/auth.notice', '/log/cron.notice', '/log/daemon.notice', '/log/debug.notice', '/log/kern.notice', '/log/lpr.notice', '/log/mail.notice', '/log/messages.notice', '/log/news/news.notice', '/log/syslog.notice', '/log/user.notice'],
|
||||
EOF
|
||||
|
||||
|
||||
"let s:filename_checks = {\n" + output.join("\n").gsub("'/doc/help.txt'", "$VIMRUNTIME . '/doc/help.txt'").gsub(/ \\ 'messages':.*?\],\n/m) { msgs }
|
||||
|
||||
|
||||
end
|
||||
|
||||
#comments = get_comments()
|
||||
autocommands = import_autocommands()
|
||||
entries = generate_packages_entries(autocommands, comments)
|
||||
print(entries.join(""))
|
||||
|
||||
|
||||
# entries = generate_packages_entries(autocommands, comments)
|
||||
# print(entries.join(""))
|
||||
result = generate_tests(autocommands)
|
||||
print(result)
|
||||
|
||||
45
scripts/test
45
scripts/test
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
def run_script(src)
|
||||
system("bash", "-c", src)
|
||||
if system("bash", "-eo", "pipefail", "-c", src) != true
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
def run_vimscript(src)
|
||||
|
||||
wrapper = <<~EOF
|
||||
vim --clean --not-a-term -u <(cat <<- "EOM"
|
||||
let g:polyglot_test = 1
|
||||
set nocompatible
|
||||
let &rtp='$PWD,' . &rtp
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
let &rtp='#{Dir.pwd},' . &rtp
|
||||
set t_ti= t_te=
|
||||
set shortmess+=F
|
||||
set noswapfile
|
||||
@@ -23,18 +23,36 @@ def run_vimscript(src)
|
||||
endif
|
||||
endfunc
|
||||
EOM
|
||||
EOF
|
||||
|
||||
wrapper += <<~'EOF'
|
||||
) -S <(cat <<- "EOM"
|
||||
try
|
||||
#{src}
|
||||
catch
|
||||
echo v:exception
|
||||
echo v:throwpoint
|
||||
endtry
|
||||
|
||||
redir @q
|
||||
silent function /^NewTest_
|
||||
redir END
|
||||
let s:tests = split(substitute(@q, '\(function\|def\) \(\k*()\)', '\2', 'g'))
|
||||
for test in s:tests
|
||||
echo test
|
||||
%bwipe!
|
||||
exe 'call ' . test
|
||||
set noinsertmode
|
||||
if len(v:errors) > 0
|
||||
for err in v:errors
|
||||
echo err
|
||||
endfor
|
||||
cq!
|
||||
endif
|
||||
endfor
|
||||
|
||||
qa!
|
||||
EOM
|
||||
) | perl -pe 's/\e\[[0-9;]*[a-zA-Z]//g'
|
||||
EOF
|
||||
|
||||
wrapper.gsub!('#{src}') { src }
|
||||
|
||||
run_script(wrapper)
|
||||
end
|
||||
|
||||
@@ -46,7 +64,12 @@ test_helptags = <<~EOF
|
||||
EOF
|
||||
|
||||
run_vimscript('source tests/filetypes.vim')
|
||||
# run_vimscript('source tests/extensions.vim')
|
||||
run_vimscript('source tests/extensions.vim')
|
||||
|
||||
if !ENV['DEV']
|
||||
run_vimscript('source tests/native.vim')
|
||||
end
|
||||
|
||||
run_script(test_helptags)
|
||||
|
||||
# run_vimscript("
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Dockerfile
|
||||
" Maintainer: Eugene Kalinin
|
||||
" Latest Revision: 11 September 2013
|
||||
" Source: http://docs.docker.io/en/latest/use/builder/
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" case sensitivity (fix #17)
|
||||
" syn case ignore
|
||||
|
||||
" Keywords
|
||||
syn keyword dockerfileKeywords FROM AS MAINTAINER RUN CMD COPY
|
||||
syn keyword dockerfileKeywords EXPOSE ADD ENTRYPOINT
|
||||
syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD
|
||||
syn keyword dockerfileKeywords LABEL ARG HEALTHCHECK SHELL STOPSIGNAL
|
||||
|
||||
" Bash statements
|
||||
setlocal iskeyword+=-
|
||||
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
|
||||
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
|
||||
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
|
||||
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
|
||||
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
|
||||
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
|
||||
syn keyword bashStatement wget gzip
|
||||
|
||||
" Strings
|
||||
syn region dockerfileString start=/"/ skip=/\\"|\\\\/ end=/"/
|
||||
syn region dockerfileString1 start=/'/ skip=/\\'|\\\\/ end=/'/
|
||||
|
||||
" Emails
|
||||
syn region dockerfileEmail start=/</ end=/>/ contains=@ oneline
|
||||
|
||||
" Urls
|
||||
syn match dockerfileUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\._]\+/
|
||||
|
||||
" Task tags
|
||||
syn keyword dockerfileTodo contained TODO FIXME XXX
|
||||
|
||||
" Comments
|
||||
syn region dockerfileComment start="#" end="\n" contains=dockerfileTodo
|
||||
syn region dockerfileEnvWithComment start="^\s*ENV\>" end="\n" contains=dockerfileEnv
|
||||
syn match dockerfileEnv contained /\<ENV\>/
|
||||
|
||||
" Highlighting
|
||||
hi link dockerfileKeywords Keyword
|
||||
hi link dockerfileEnv Keyword
|
||||
hi link dockerfileString String
|
||||
hi link dockerfileString1 String
|
||||
hi link dockerfileComment Comment
|
||||
hi link dockerfileEmail Identifier
|
||||
hi link dockerfileUrl Identifier
|
||||
hi link dockerfileTodo Todo
|
||||
hi link bashStatement Function
|
||||
|
||||
let b:current_syntax = "dockerfile"
|
||||
|
||||
endif
|
||||
@@ -63,7 +63,7 @@ syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
|
||||
syn match cssClassNameDot contained '\.'
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<EFBFBD>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*"
|
||||
syn match cssIdentifier "#[A-Za-z\u00ac-\uffff_@][A-Za-z\u00ac-\uffff0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: ELF
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: Son 22 Jun 2003 20:43:14 CEST
|
||||
" Filenames: *.ab,*.am
|
||||
" URL: http://www.cvjb.de/comp/vim/elf.vim
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1
|
||||
" Vim syntax file
|
||||
" Language: FORTH
|
||||
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
|
||||
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: 2018-03-29
|
||||
" Filenames: *.fs,*.ft
|
||||
" URL: https://github.com/jkotlinski/forth.vim
|
||||
|
||||
@@ -12,9 +12,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1
|
||||
" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile,
|
||||
" Walter Dieudonn<EFBFBD>, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judica<EFBFBD>l Grasset, and Takuma Yoshida
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, and Takuma Yoshida
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
495
syntax/html.vim
495
syntax/html.vim
@@ -1,23 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: HTML (version 5.1)
|
||||
" SVG (SVG 1.1 Second Edition)
|
||||
" MathML (MathML 3.0 Second Edition)
|
||||
" Last Change: 2017 Mar 07
|
||||
" License: Public domain
|
||||
" (but let me know if you like :) )
|
||||
" Language: HTML
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2020 Mar 17
|
||||
" Included patch from Florian Breisch to add the summary element
|
||||
"
|
||||
" Note: This file just add new tags from HTML 5
|
||||
" and don't replace default html.vim syntax file
|
||||
"
|
||||
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
|
||||
" Changes: update to Draft 2016 Jan 13
|
||||
" add microdata Attributes
|
||||
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
|
||||
" URL: http://rm.blog.br/vim/syntax/html.vim
|
||||
" Modified: htdebeer <H.T.de.Beer@gmail.com>
|
||||
" Changes: add common SVG elements and attributes for inline SVG
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
@@ -30,178 +22,312 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Patch 7.4.1142
|
||||
if has("patch-7.4-1142")
|
||||
if has("win32")
|
||||
syn iskeyword @,48-57,_,128-167,224-235,-
|
||||
syntax spell toplevel
|
||||
|
||||
syn case ignore
|
||||
|
||||
" mark illegal characters
|
||||
syn match htmlError "[<>&]"
|
||||
|
||||
|
||||
" tags
|
||||
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
|
||||
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
|
||||
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
|
||||
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
|
||||
syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
|
||||
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagError contained "[^>]<"ms=s+1
|
||||
|
||||
|
||||
" tag names
|
||||
syn keyword htmlTagName contained address applet area a base basefont
|
||||
syn keyword htmlTagName contained big blockquote br caption center
|
||||
syn keyword htmlTagName contained cite code dd dfn dir div dl dt font
|
||||
syn keyword htmlTagName contained form hr html img
|
||||
syn keyword htmlTagName contained input isindex kbd li link map menu
|
||||
syn keyword htmlTagName contained meta ol option param pre p samp span
|
||||
syn keyword htmlTagName contained select small sub sup
|
||||
syn keyword htmlTagName contained table td textarea th tr tt ul var xmp
|
||||
syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
|
||||
|
||||
" new html 4.0 tags
|
||||
syn keyword htmlTagName contained abbr acronym bdo button col label
|
||||
syn keyword htmlTagName contained colgroup fieldset iframe ins legend
|
||||
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
|
||||
|
||||
" new html 5 tags
|
||||
syn keyword htmlTagName contained article aside audio bdi canvas data
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption
|
||||
syn keyword htmlTagName contained figure footer header hgroup keygen main
|
||||
syn keyword htmlTagName contained mark menuitem meter nav output picture
|
||||
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
|
||||
syn keyword htmlTagName contained slot source summary template time track
|
||||
syn keyword htmlTagName contained video wbr
|
||||
|
||||
" legal arg names
|
||||
syn keyword htmlArg contained action
|
||||
syn keyword htmlArg contained align alink alt archive background bgcolor
|
||||
syn keyword htmlArg contained border bordercolor cellpadding
|
||||
syn keyword htmlArg contained cellspacing checked class clear code codebase color
|
||||
syn keyword htmlArg contained cols colspan content coords enctype face
|
||||
syn keyword htmlArg contained gutter height hspace id
|
||||
syn keyword htmlArg contained link lowsrc marginheight
|
||||
syn keyword htmlArg contained marginwidth maxlength method name prompt
|
||||
syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape
|
||||
syn keyword htmlArg contained size src start target text type url
|
||||
syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
|
||||
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
|
||||
|
||||
" aria attributes
|
||||
syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
|
||||
syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
|
||||
syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
|
||||
syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
|
||||
syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
|
||||
syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
|
||||
syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
|
||||
syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
|
||||
syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
|
||||
syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
|
||||
syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
|
||||
syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
|
||||
syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
|
||||
syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
|
||||
syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
|
||||
syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
|
||||
syn keyword htmlArg contained role
|
||||
|
||||
" Netscape extensions
|
||||
syn keyword htmlTagName contained frame noframes frameset nobr blink
|
||||
syn keyword htmlTagName contained layer ilayer nolayer spacer
|
||||
syn keyword htmlArg contained frameborder noresize pagex pagey above below
|
||||
syn keyword htmlArg contained left top visibility clip id noshade
|
||||
syn match htmlArg contained "\<z-index\>"
|
||||
|
||||
" Microsoft extensions
|
||||
syn keyword htmlTagName contained marquee
|
||||
|
||||
" html 4.0 arg names
|
||||
syn match htmlArg contained "\<\(accept-charset\|label\)\>"
|
||||
syn keyword htmlArg contained abbr accept accesskey axis char charoff charset
|
||||
syn keyword htmlArg contained cite classid codetype compact data datetime
|
||||
syn keyword htmlArg contained declare defer dir disabled for frame
|
||||
syn keyword htmlArg contained headers hreflang lang language longdesc
|
||||
syn keyword htmlArg contained multiple nohref nowrap object profile readonly
|
||||
syn keyword htmlArg contained rules scheme scope span standby style
|
||||
syn keyword htmlArg contained summary tabindex valuetype version
|
||||
|
||||
" html 5 arg names
|
||||
syn keyword htmlArg contained allowfullscreen async autocomplete autofocus
|
||||
syn keyword htmlArg contained autoplay challenge contenteditable contextmenu
|
||||
syn keyword htmlArg contained controls crossorigin default dirname download
|
||||
syn keyword htmlArg contained draggable dropzone form formaction formenctype
|
||||
syn keyword htmlArg contained formmethod formnovalidate formtarget hidden
|
||||
syn keyword htmlArg contained high icon inputmode keytype kind list loop low
|
||||
syn keyword htmlArg contained max min minlength muted nonce novalidate open
|
||||
syn keyword htmlArg contained optimum pattern placeholder poster preload
|
||||
syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck
|
||||
syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
|
||||
syn keyword htmlArg contained typemustmatch
|
||||
|
||||
" special characters
|
||||
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
|
||||
|
||||
" Comments (the real ones or the old netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
|
||||
else
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell
|
||||
syn match htmlCommentError contained "[^><!]"
|
||||
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
|
||||
endif
|
||||
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||
|
||||
" server-parsed commands
|
||||
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
|
||||
syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
|
||||
syn match htmlPreError contained "<!--#\S*"ms=s+4
|
||||
syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName
|
||||
syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend
|
||||
syn match htmlPreProcAttrError contained "\w\+="he=e-1
|
||||
syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
|
||||
|
||||
if !exists("html_no_rendering")
|
||||
" rendering
|
||||
syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
|
||||
|
||||
syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
syn region htmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
|
||||
syn region htmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
|
||||
syn region htmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
|
||||
syn region htmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlItalicUnderlineBold
|
||||
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn match htmlLeadingSpace "^\s\+" contained
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
|
||||
syn region htmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
|
||||
syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn keyword htmlTagName contained noscript
|
||||
syn keyword htmlSpecialTagName contained script style
|
||||
if main_syntax != 'java' || exists("java_javascript")
|
||||
" JAVA SCRIPT
|
||||
syn include @htmlJavaScript syntax/javascript.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
hi def link htmlScriptTag htmlTag
|
||||
|
||||
" html events (i.e. arguments that include javascript commands)
|
||||
if exists("html_extended_events")
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
|
||||
else
|
||||
syn iskeyword @,48-57,_,192-255,-
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
|
||||
endif
|
||||
syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
|
||||
syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
|
||||
hi def link htmlEventSQ htmlEvent
|
||||
hi def link htmlEventDQ htmlEvent
|
||||
|
||||
" a javascript expression is used as an arg value
|
||||
syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc
|
||||
endif
|
||||
|
||||
if main_syntax != 'java' || exists("java_vb")
|
||||
" VB SCRIPT
|
||||
syn include @htmlVbScript syntax/vb.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn cluster htmlJavaScript add=@htmlPreproc
|
||||
|
||||
if main_syntax != 'java' || exists("java_css")
|
||||
" embedded style sheets
|
||||
syn keyword htmlArg contained media
|
||||
syn include @htmlCss syntax/css.vim
|
||||
unlet b:current_syntax
|
||||
syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
|
||||
syn match htmlCssStyleComment contained "\(<!--\|-->\)"
|
||||
syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc
|
||||
hi def link htmlStyleArg htmlString
|
||||
endif
|
||||
|
||||
if main_syntax == "html"
|
||||
" synchronizing (does not always work if a comment includes legal
|
||||
" html tags, but doing it right would mean to always start
|
||||
" at the first line, which is too slow)
|
||||
syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]"
|
||||
syn sync match htmlHighlight groupthere javaScript "<script"
|
||||
syn sync match htmlHighlightSkip "^.*['\"].*$"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" The default highlighting.
|
||||
hi def link htmlTag Function
|
||||
hi def link htmlEndTag Identifier
|
||||
hi def link htmlArg Type
|
||||
hi def link htmlTagName htmlStatement
|
||||
hi def link htmlSpecialTagName Exception
|
||||
hi def link htmlValue String
|
||||
hi def link htmlSpecialChar Special
|
||||
|
||||
if !exists("html_no_rendering")
|
||||
hi def link htmlH1 Title
|
||||
hi def link htmlH2 htmlH1
|
||||
hi def link htmlH3 htmlH2
|
||||
hi def link htmlH4 htmlH3
|
||||
hi def link htmlH5 htmlH4
|
||||
hi def link htmlH6 htmlH5
|
||||
hi def link htmlHead PreProc
|
||||
hi def link htmlTitle Title
|
||||
hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic
|
||||
hi def link htmlUnderlineBold htmlBoldUnderline
|
||||
hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic
|
||||
hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic
|
||||
hi def link htmlItalicUnderline htmlUnderlineItalic
|
||||
hi def link htmlItalicBold htmlBoldItalic
|
||||
hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic
|
||||
hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic
|
||||
hi def link htmlLink Underlined
|
||||
hi def link htmlLeadingSpace None
|
||||
if !exists("html_my_rendering")
|
||||
hi def htmlBold term=bold cterm=bold gui=bold
|
||||
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
|
||||
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
|
||||
hi def htmlUnderline term=underline cterm=underline gui=underline
|
||||
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
|
||||
hi def htmlItalic term=italic cterm=italic gui=italic
|
||||
if v:version > 800 || v:version == 800 && has("patch1038")
|
||||
hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough
|
||||
else
|
||||
hi def htmlStrike term=underline cterm=underline gui=underline
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" HTML 5 tags
|
||||
syn keyword htmlTagName contained article aside audio canvas command
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||
syn keyword htmlTagName contained template content shadow slot
|
||||
syn keyword htmlTagName contained wbr bdi
|
||||
syn keyword htmlTagName contained picture
|
||||
hi def link htmlPreStmt PreProc
|
||||
hi def link htmlPreError Error
|
||||
hi def link htmlPreProc PreProc
|
||||
hi def link htmlPreAttr String
|
||||
hi def link htmlPreProcAttrName PreProc
|
||||
hi def link htmlPreProcAttrError Error
|
||||
hi def link htmlSpecial Special
|
||||
hi def link htmlSpecialChar Special
|
||||
hi def link htmlString String
|
||||
hi def link htmlStatement Statement
|
||||
hi def link htmlComment Comment
|
||||
hi def link htmlCommentPart Comment
|
||||
hi def link htmlValue String
|
||||
hi def link htmlCommentError htmlError
|
||||
hi def link htmlTagError htmlError
|
||||
hi def link htmlEvent javaScript
|
||||
hi def link htmlError Error
|
||||
|
||||
" SVG tags
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" as found in http://www.w3.org/TR/SVG/eltindex.html
|
||||
syn keyword htmlTagName contained svg
|
||||
syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem
|
||||
syn keyword htmlTagName contained animate animateColor animateMotion animateTransform
|
||||
syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
|
||||
syn keyword htmlTagName contained clipPath color-profile cursor
|
||||
syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
|
||||
syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence
|
||||
syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri
|
||||
syn keyword htmlTagName contained glyph glyphRef hkern
|
||||
syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
|
||||
syn keyword htmlTagName contained missing-glyph mpath
|
||||
syn keyword htmlTagName contained text textPath tref tspan vkern
|
||||
syn keyword htmlTagName contained metadata title
|
||||
|
||||
" MathML tags
|
||||
" https://www.w3.org/TR/MathML3/appendixi.html#index.elem
|
||||
syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth
|
||||
syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind
|
||||
syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes
|
||||
syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch
|
||||
syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication
|
||||
syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false
|
||||
syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary
|
||||
syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda
|
||||
syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt
|
||||
syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose
|
||||
syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv
|
||||
syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts
|
||||
syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow
|
||||
syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder
|
||||
syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or
|
||||
syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product
|
||||
syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev
|
||||
syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh
|
||||
syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union
|
||||
syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
|
||||
|
||||
" Custom Element
|
||||
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
|
||||
syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>"
|
||||
|
||||
" HTML 5 arguments
|
||||
" Core Attributes
|
||||
syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
|
||||
syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate
|
||||
" Event-handler Attributes
|
||||
syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
|
||||
syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
|
||||
syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
|
||||
syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
|
||||
syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
|
||||
syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
|
||||
syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
|
||||
syn keyword htmlArg contained onvolumechange onwaiting
|
||||
" XML Attributes
|
||||
syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
|
||||
" new features
|
||||
" <body>
|
||||
syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
|
||||
syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
|
||||
" <video>, <audio>, <source>, <track>
|
||||
syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track playsinline
|
||||
" <form>, <input>, <button>
|
||||
syn keyword htmlArg contained form autocomplete autofocus list min max step
|
||||
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
|
||||
syn keyword htmlArg contained required placeholder pattern
|
||||
" <command>, <details>, <time>
|
||||
syn keyword htmlArg contained label icon open datetime-local pubdate
|
||||
" <script>
|
||||
syn keyword htmlArg contained async
|
||||
" <content>
|
||||
syn keyword htmlArg contained select
|
||||
" <iframe>
|
||||
syn keyword htmlArg contained seamless srcdoc sandbox allowfullscreen allowusermedia allowpaymentrequest allowpresentation
|
||||
" <picture>
|
||||
syn keyword htmlArg contained srcset sizes
|
||||
" <a>
|
||||
syn keyword htmlArg contained download media
|
||||
" <script>, <style>
|
||||
syn keyword htmlArg contained nonce
|
||||
" <area>, <a>, <img>, <iframe>, <link>
|
||||
syn keyword htmlArg contained referrerpolicy
|
||||
" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
|
||||
syn keyword htmlArg contained integrity crossorigin
|
||||
" <link>
|
||||
syn keyword htmlArg contained prefetch
|
||||
" syn keyword htmlArg contained preload
|
||||
" <img>
|
||||
syn keyword htmlArg contained decoding
|
||||
" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||
syn keyword htmlArg contained onselectstart onselectionchange
|
||||
" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
||||
syn keyword htmlArg contained loading
|
||||
|
||||
" Custom Data Attributes
|
||||
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes
|
||||
syn match htmlArg "\<data[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Vendor Extension Attributes
|
||||
" http://w3c.github.io/html/single-page.html#conformance-requirements-extensibility
|
||||
syn match htmlArg "\<x[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Microdata
|
||||
" http://dev.w3.org/html5/md/
|
||||
syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
|
||||
|
||||
" SVG
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" Some common attributes from http://www.w3.org/TR/SVG/attindex.html
|
||||
syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth
|
||||
syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by
|
||||
syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy
|
||||
syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy
|
||||
syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired
|
||||
syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy
|
||||
syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits
|
||||
syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-x horiz-origin-y
|
||||
syn keyword htmlArg contained id ideographic in in2 intercept
|
||||
syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes
|
||||
syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local
|
||||
syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name
|
||||
syn keyword htmlArg contained numOctaves
|
||||
syn keyword htmlArg contained offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness
|
||||
syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits
|
||||
syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry
|
||||
syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage
|
||||
syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type
|
||||
syn keyword htmlArg contained u1 u2 underline-position underline-thickness unicode unicode-range units-per-em
|
||||
syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget
|
||||
syn keyword htmlArg contained width widths
|
||||
syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space
|
||||
syn keyword htmlArg contained y y1 y2 yChannelSelector
|
||||
syn keyword htmlArg contained z zoomAndPan
|
||||
syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode
|
||||
|
||||
" MathML attributes
|
||||
" https://www.w3.org/TR/MathML3/chapter2.html#interf.toplevel.atts
|
||||
syn keyword htmlArg contained accent accentunder actiontype align alignmentscope altimg altimg-height altimg-valign altimg-width alttext
|
||||
syn keyword htmlArg contained annotation-xml background base baseline bevelled cd cdgroup charalign charspacing close
|
||||
syn keyword htmlArg contained closure color columnalign columnalignment columnlines columnspacing columnspan columnwidth crossout decimalpoint
|
||||
syn keyword htmlArg contained definitionURL denomalign depth display displaystyle edge encoding equalcolumns equalrows fence
|
||||
syn keyword htmlArg contained fontfamily fontsize fontstyle fontweight form frame framespacing groupalign height indentalign
|
||||
syn keyword htmlArg contained indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget index infixlinebreakstyle integer largeop
|
||||
syn keyword htmlArg contained leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote
|
||||
syn keyword htmlArg contained lspace ltr macros math mathbackground mathcolor mathsize mathvariant maxsize maxwidth
|
||||
syn keyword htmlArg contained mediummathspace menclose minlabelspacing minsize mode movablelimits msgroup mslinethickness name nargs
|
||||
syn keyword htmlArg contained newline notation numalign number occurrence open order other overflow position
|
||||
syn keyword htmlArg contained rightoverhang role rowalign rowlines rowspacing rowspan rquote rspace schemaLocation scope
|
||||
syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemultiplier selection separator separators shift side stackalign
|
||||
syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace
|
||||
syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref
|
||||
hi def link javaScript Special
|
||||
hi def link javaScriptExpression javaScript
|
||||
hi def link htmlCssStyleComment Comment
|
||||
hi def link htmlCssDefinition Special
|
||||
|
||||
let b:current_syntax = "html"
|
||||
|
||||
@@ -211,5 +337,6 @@ endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'initng') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: initng .i files
|
||||
" Maintainer: Elan Ruusam<EFBFBD>e <glen@pld-linux.org>
|
||||
" Maintainer: Elan Ruusamäe <glen@pld-linux.org>
|
||||
" URL: http://glen.alkohol.ee/pld/initng/
|
||||
" License: GPL v2
|
||||
" Version: 0.13
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'iss') == -1
|
||||
" Vim syntax file
|
||||
" Language: Inno Setup File (iss file) and My InnoSetup extension
|
||||
" Maintainer: Jason Mills (jmills@cs.mun.ca)
|
||||
" Previous Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" Last Change: 2019 Sep 27
|
||||
"
|
||||
" Todo:
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lout') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Lout
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: So 12 Feb 2012 15:15:03 CET
|
||||
" Filenames: *.lout,*.lt
|
||||
" URL: http://www.cvjb.de/comp/vim/lout.vim
|
||||
|
||||
148
syntax/make.vim
Normal file
148
syntax/make.vim
Normal file
@@ -0,0 +1,148 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Makefile
|
||||
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
|
||||
" Last Change: 2020 May 03
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" some special characters
|
||||
syn match makeSpecial "^\s*[@+-]\+"
|
||||
syn match makeNextLine "\\\n\s*"
|
||||
|
||||
" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$"
|
||||
\ contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
|
||||
" Microsoft Makefile specials
|
||||
syn case ignore
|
||||
syn match makeInclude "^!\s*include\s.*$"
|
||||
syn match makePreCondit "^!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|else\s*if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
|
||||
syn case match
|
||||
|
||||
" identifiers
|
||||
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent
|
||||
syn match makeIdent "\$\$\w*"
|
||||
syn match makeIdent "\$[^({]"
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
|
||||
syn match makeIdent "%"
|
||||
|
||||
" Makefile.in variables
|
||||
syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
|
||||
" make targets
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget
|
||||
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1
|
||||
\ end=";"re=e-1,me=e-1 end="[^\\]$"
|
||||
\ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString
|
||||
\ skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$"
|
||||
\ contains=makeIdent,makeSpecTarget,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget
|
||||
\ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1
|
||||
\ end="[^\\]$" keepend
|
||||
\ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$"
|
||||
\ contains=makeIdent,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn match makeCommandError "^\s\+\S.*" contained
|
||||
syn region makeCommands contained start=";"hs=s+1 start="^\t"
|
||||
\ end="^[^\t#]"me=e-1,re=e-1 end="^$"
|
||||
\ contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString
|
||||
\ nextgroup=makeCommandError
|
||||
syn match makeCmdNextLine "\\\n."he=e-1 contained
|
||||
|
||||
" some directives
|
||||
syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)"
|
||||
syn match makeInclude "^ *[-s]\=include\s.*$"
|
||||
syn match makeStatement "^ *vpath"
|
||||
syn match makeExport "^ *\(export\|unexport\)\>"
|
||||
syn match makeOverride "^ *override\>"
|
||||
" Statements / Functions (GNU make)
|
||||
syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
|
||||
|
||||
" Comment
|
||||
if exists("make_microsoft")
|
||||
syn match makeComment "#.*" contains=@Spell,makeTodo
|
||||
elseif !exists("make_no_comments")
|
||||
syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo
|
||||
syn match makeComment "#$" contains=@Spell
|
||||
endif
|
||||
syn keyword makeTodo TODO FIXME XXX contained
|
||||
|
||||
" match escaped quotes and any other escaped character
|
||||
" except for $, as a backslash in front of a $ does
|
||||
" not make it a standard character, but instead it will
|
||||
" still act as the beginning of a variable
|
||||
" The escaped char is not highlightet currently
|
||||
syn match makeEscapedChar "\\[^$]"
|
||||
|
||||
|
||||
syn region makeDString start=+\(\\\)\@<!"+ skip=+\\.+ end=+"+ contained contains=makeIdent
|
||||
syn region makeSString start=+\(\\\)\@<!'+ skip=+\\.+ end=+'+ contained contains=makeIdent
|
||||
syn region makeBString start=+\(\\\)\@<!`+ skip=+\\.+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine
|
||||
|
||||
" Syncing
|
||||
syn sync minlines=20 maxlines=200
|
||||
|
||||
" Sync on Make command block region: When searching backwards hits a line that
|
||||
" can't be a command or a comment, use makeCommands if it looks like a target,
|
||||
" NONE otherwise.
|
||||
syn sync match makeCommandSync groupthere NONE "^[^\t#]"
|
||||
syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"
|
||||
syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link makeNextLine makeSpecial
|
||||
hi def link makeCmdNextLine makeSpecial
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
hi def link makeSpecTarget Statement
|
||||
if !exists("make_no_commands")
|
||||
hi def link makeCommands Number
|
||||
endif
|
||||
hi def link makeImplicit Function
|
||||
hi def link makeTarget Function
|
||||
hi def link makeInclude Include
|
||||
hi def link makePreCondit PreCondit
|
||||
hi def link makeStatement Statement
|
||||
hi def link makeIdent Identifier
|
||||
hi def link makeSpecial Special
|
||||
hi def link makeComment Comment
|
||||
hi def link makeDString String
|
||||
hi def link makeSString String
|
||||
hi def link makeBString Function
|
||||
hi def link makeError Error
|
||||
hi def link makeTodo Todo
|
||||
hi def link makeDefine Define
|
||||
hi def link makeCommandError Error
|
||||
hi def link makeConfig PreCondit
|
||||
|
||||
let b:current_syntax = "make"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
endif
|
||||
@@ -97,7 +97,7 @@ if exists("moo_unknown_builtin_functions")
|
||||
syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained
|
||||
endif
|
||||
|
||||
"<EFBFBD>Enclosed expressions
|
||||
" Enclosed expressions
|
||||
syn match mooUnenclosedError display ~[')\]|}]~
|
||||
syn match mooParenthesesError display ~[';\]|}]~ contained
|
||||
syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError
|
||||
|
||||
@@ -14,7 +14,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'n1ql') == -1
|
||||
" Questions, comments: <n1ql AT cime.net>
|
||||
" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r
|
||||
"
|
||||
" vim: set encoding=utf-8:
|
||||
" vim: :
|
||||
|
||||
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
|
||||
|
||||
" VIM syntax file
|
||||
" Language: nroff/groff
|
||||
" Maintainer: Pedro Alejandro L<EFBFBD>pez-Valencia <palopezv@gmail.com>
|
||||
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
|
||||
" URL: http://vorbote.wordpress.com/
|
||||
" Last Change: 2012 Feb 2
|
||||
"
|
||||
@@ -10,7 +10,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
|
||||
"
|
||||
" ACKNOWLEDGEMENTS:
|
||||
"
|
||||
" My thanks to J<EFBFBD>r<EFBFBD>me Pl<EFBFBD>t <Jerome.Plut@ens.fr>, who was the
|
||||
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
|
||||
" creator and maintainer of this syntax file for several years.
|
||||
" May I be as good at it as he has been.
|
||||
"
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1
|
||||
" Language: Pascal
|
||||
" Version: 2.8
|
||||
" Last Change: 2004/10/17 17:47:30
|
||||
" Maintainer: Xavier Cr<EFBFBD>gut <xavier.cregut@enseeiht.fr>
|
||||
" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
|
||||
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
|
||||
|
||||
" Contributors: Tim Chase <tchase@csc.com>,
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1
|
||||
" Vim syntax file
|
||||
" Language: R noweb Files
|
||||
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2007 M<EFBFBD>r 30
|
||||
" Last Change: 2007 Mär 30
|
||||
" Version: 0.8
|
||||
" SVN: $Id: rnoweb.vim 69 2007-03-30 08:55:36Z ranke $
|
||||
" Remarks: - This file is inspired by the proposal of
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'robots') == -1
|
||||
" Vim syntax file
|
||||
" Language: "Robots.txt" files
|
||||
" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/robots.zip
|
||||
" Last change: 2001 May 09
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
" Language: RPL/2
|
||||
" Version: 0.15.15 against RPL/2 version 4.00pre7i
|
||||
" Last Change: 2012 Feb 03 by Thilo Six
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
|
||||
" Credits: Nothing
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rtf') == -1
|
||||
" .hlp (windows help files) use compiled rtf files
|
||||
" rtf documentation at http://night.primate.wisc.edu/software/RTF/
|
||||
"
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/rtf.zip
|
||||
" Last change: 2001 Mai 02
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: sbt
|
||||
" Maintainer: Derek Wyatt <derek@{myfirstname}{mylastname}.org>
|
||||
" Last Change: 2013 Oct 20
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" Last Change: 2017.04.30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -17,7 +17,6 @@ syn match sbtStringEscape "\\[nrfvb\\\"]" contained
|
||||
|
||||
syn match sbtIdentitifer "^\S\+\ze\s*\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
syn match sbtBeginningSeq "^[Ss]eq\>"
|
||||
syn match sbtAddPlugin "^addSbtPlugin\>"
|
||||
|
||||
syn match sbtSpecial "\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
|
||||
@@ -28,10 +27,10 @@ syn region sbtDocComment start="/\*\*" end="\*/" keepend
|
||||
hi link sbtString String
|
||||
hi link sbtIdentitifer Keyword
|
||||
hi link sbtBeginningSeq Keyword
|
||||
hi link sbtAddPlugin Keyword
|
||||
hi link sbtSpecial Special
|
||||
hi link sbtComment Comment
|
||||
hi link sbtLineComment Comment
|
||||
hi link sbtDocComment Comment
|
||||
|
||||
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
|
||||
" Vim syntax file
|
||||
" This file works only for Vim6.x
|
||||
" Language: Tilde
|
||||
" Maintainer: Tobias Rundstr<EFBFBD>m <tobi@tildesoftware.net>
|
||||
" Maintainer: Tobias Rundström <tobi@tildesoftware.net>
|
||||
" URL: http://www.tildesoftware.net
|
||||
" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $
|
||||
|
||||
|
||||
1032
syntax/vim.vim
1032
syntax/vim.vim
File diff suppressed because it is too large
Load Diff
209
syntax/xf86conf.vim
Normal file
209
syntax/xf86conf.vim
Normal file
@@ -0,0 +1,209 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: XF86Config (XFree86 configuration file)
|
||||
" Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2010 Nov 01
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim
|
||||
" Required Vim Version: 6.0
|
||||
"
|
||||
" Options: let xf86conf_xfree86_version = 3 or 4
|
||||
" to force XFree86 3.x or 4.x XF86Config syntax
|
||||
|
||||
" Setup
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("b:xf86conf_xfree86_version")
|
||||
if exists("xf86conf_xfree86_version")
|
||||
let b:xf86conf_xfree86_version = xf86conf_xfree86_version
|
||||
else
|
||||
let b:xf86conf_xfree86_version = 4
|
||||
endif
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
" Comments
|
||||
syn match xf86confComment "#.*$" contains=xf86confTodo
|
||||
syn case match
|
||||
syn keyword xf86confTodo FIXME TODO XXX NOT contained
|
||||
syn case ignore
|
||||
syn match xf86confTodo "???" contained
|
||||
|
||||
" Sectioning errors
|
||||
syn keyword xf86confSectionError Section contained
|
||||
syn keyword xf86confSectionError EndSection
|
||||
syn keyword xf86confSubSectionError SubSection
|
||||
syn keyword xf86confSubSectionError EndSubSection
|
||||
syn keyword xf86confModeSubSectionError Mode
|
||||
syn keyword xf86confModeSubSectionError EndMode
|
||||
syn cluster xf86confSectionErrors contains=xf86confSectionError,xf86confSubSectionError,xf86confModeSubSectionError
|
||||
|
||||
" Values
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confConstant,xf86confOptionName oneline keepend nextgroup=xf86confValue skipwhite
|
||||
else
|
||||
syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confOptionName oneline keepend
|
||||
endif
|
||||
syn match xf86confSpecialChar "\\\d\d\d\|\\." contained
|
||||
syn match xf86confDecimalNumber "\(\s\|-\)\zs\d*\.\=\d\+\>"
|
||||
syn match xf86confFrequency "\(\s\|-\)\zs\d\+\.\=\d*\(Hz\|k\|kHz\|M\|MHz\)"
|
||||
syn match xf86confOctalNumber "\<0\o\+\>"
|
||||
syn match xf86confOctalNumberError "\<0\o\+[89]\d*\>"
|
||||
syn match xf86confHexadecimalNumber "\<0x\x\+\>"
|
||||
syn match xf86confValue "\s\+.*$" contained contains=xf86confComment,xf86confString,xf86confFrequency,xf86conf\w\+Number,xf86confConstant
|
||||
syn keyword xf86confOption Option nextgroup=xf86confString skipwhite
|
||||
syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf86confSync skipwhite skipnl
|
||||
|
||||
" Sections and subsections
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
|
||||
syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
|
||||
syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
else
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMX matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Module\|Xinput\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
endif
|
||||
|
||||
" Options
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained
|
||||
else
|
||||
command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained nextgroup=xf86confValue,xf86confComment skipwhite
|
||||
endif
|
||||
|
||||
Xf86confdeclopt 18bitBus AGPFastWrite AGPMode Accel AllowClosedownGrabs AllowDeactivateGrabs
|
||||
Xf86confdeclopt AllowMouseOpenFail AllowNonLocalModInDev AllowNonLocalXvidtune AlwaysCore
|
||||
Xf86confdeclopt AngleOffset AutoRepeat BaudRate BeamTimeout Beep BlankTime BlockWrite BottomX
|
||||
Xf86confdeclopt BottomY ButtonNumber ButtonThreshold Buttons ByteSwap CacheLines ChordMiddle
|
||||
Xf86confdeclopt ClearDTR ClearDTS ClickMode CloneDisplay CloneHSync CloneMode CloneVRefresh
|
||||
Xf86confdeclopt ColorKey Composite CompositeSync CoreKeyboard CorePointer Crt2Memory CrtScreen
|
||||
Xf86confdeclopt CrtcNumber CyberShadow CyberStretch DDC DDCMode DMAForXv DPMS Dac6Bit DacSpeed
|
||||
Xf86confdeclopt DataBits Debug DebugLevel DefaultServerLayout DeltaX DeltaY Device DeviceName
|
||||
Xf86confdeclopt DisableModInDev DisableVidModeExtension Display Display1400 DontVTSwitch
|
||||
Xf86confdeclopt DontZap DontZoom DoubleScan DozeMode DozeScan DozeTime DragLockButtons
|
||||
Xf86confdeclopt DualCount DualRefresh EarlyRasPrecharge Emulate3Buttons Emulate3Timeout
|
||||
Xf86confdeclopt EmulateWheel EmulateWheelButton EmulateWheelInertia EnablePageFlip EnterCount
|
||||
Xf86confdeclopt EstimateSizesAggressively ExternDisp FPClock16 FPClock24 FPClock32
|
||||
Xf86confdeclopt FPClock8 FPDither FastDram FifoAggresive FifoConservative FifoModerate
|
||||
Xf86confdeclopt FireGL3000 FixPanelSize FlatPanel FlipXY FlowControl ForceCRT1 ForceCRT2Type
|
||||
Xf86confdeclopt ForceLegacyCRT ForcePCIMode FpmVRAM FrameBufferWC FullMMIO GammaBrightness
|
||||
Xf86confdeclopt HWClocks HWCursor HandleSpecialKeys HistorySize Interlace Interlaced InternDisp
|
||||
Xf86confdeclopt InvX InvY InvertX InvertY KeepShape LCDClock LateRasPrecharge LcdCenter
|
||||
Xf86confdeclopt LeftAlt Linear MGASDRAM MMIO MMIOCache MTTR MaxX MaxY MaximumXPosition
|
||||
Xf86confdeclopt MaximumYPosition MinX MinY MinimumXPosition MinimumYPosition NoAccel
|
||||
Xf86confdeclopt NoAllowMouseOpenFail NoAllowNonLocalModInDev NoAllowNonLocalXvidtune
|
||||
Xf86confdeclopt NoBlockWrite NoCompositeSync NoCompression NoCrtScreen NoCyberShadow NoDCC
|
||||
Xf86confdeclopt NoDDC NoDac6Bit NoDebug NoDisableModInDev NoDisableVidModeExtension NoDontZap
|
||||
Xf86confdeclopt NoDontZoom NoFireGL3000 NoFixPanelSize NoFpmVRAM NoFrameBufferWC NoHWClocks
|
||||
Xf86confdeclopt NoHWCursor NoHal NoLcdCenter NoLinear NoMGASDRAM NoMMIO NoMMIOCache NoMTTR
|
||||
Xf86confdeclopt NoOverClockMem NoOverlay NoPC98 NoPM NoPciBurst NoPciRetry NoProbeClock
|
||||
Xf86confdeclopt NoSTN NoSWCursor NoShadowFb NoShowCache NoSlowEDODRAM NoStretch NoSuspendHack
|
||||
Xf86confdeclopt NoTexturedVideo NoTrapSignals NoUseFBDev NoUseModeline NoUseVclk1 NoVTSysReq
|
||||
Xf86confdeclopt NoXVideo NvAGP OSMImageBuffers OffTime Origin OverClockMem Overlay
|
||||
Xf86confdeclopt PC98 PCIBurst PM PWMActive PWMSleep PanelDelayCompensation PanelHeight
|
||||
Xf86confdeclopt PanelOff PanelWidth Parity PciBurst PciRetry Pixmap Port PressDur PressPitch
|
||||
Xf86confdeclopt PressVol ProbeClocks ProgramFPRegs Protocol RGBBits ReleaseDur ReleasePitch
|
||||
Xf86confdeclopt ReportingMode Resolution RightAlt RightCtl Rotate STN SWCursor SampleRate
|
||||
Xf86confdeclopt ScreenNumber ScrollLock SendCoreEvents SendDragEvents Serial ServerNumLock
|
||||
Xf86confdeclopt SetLcdClk SetMClk SetRefClk ShadowFb ShadowStatus ShowCache SleepMode
|
||||
Xf86confdeclopt SleepScan SleepTime SlowDram SlowEDODRAM StandbyTime StopBits Stretch
|
||||
Xf86confdeclopt SuspendHack SuspendTime SwapXY SyncOnGreen TV TVOutput TVOverscan TVStandard
|
||||
Xf86confdeclopt TVXPosOffset TVYPosOffset TexturedVideo Threshold Tilt TopX TopY TouchTime
|
||||
Xf86confdeclopt TrapSignals Type USB UseBIOS UseFB UseFBDev UseFlatPanel UseModeline
|
||||
Xf86confdeclopt UseROMData UseVclk1 VTInit VTSysReq VTime VideoKey Vmin XAxisMapping
|
||||
Xf86confdeclopt XLeds XVideo XaaNoCPUToScreenColorExpandFill XaaNoColor8x8PatternFillRect
|
||||
Xf86confdeclopt XaaNoColor8x8PatternFillTrap XaaNoDashedBresenhamLine XaaNoDashedTwoPointLine
|
||||
Xf86confdeclopt XaaNoImageWriteRect XaaNoMono8x8PatternFillRect XaaNoMono8x8PatternFillTrap
|
||||
Xf86confdeclopt XaaNoOffscreenPixmaps XaaNoPixmapCache XaaNoScanlineCPUToScreenColorExpandFill
|
||||
Xf86confdeclopt XaaNoScanlineImageWriteRect XaaNoScreenToScreenColorExpandFill
|
||||
Xf86confdeclopt XaaNoScreenToScreenCopy XaaNoSolidBresenhamLine XaaNoSolidFillRect
|
||||
Xf86confdeclopt XaaNoSolidFillTrap XaaNoSolidHorVertLine XaaNoSolidTwoPointLine Xinerama
|
||||
Xf86confdeclopt XkbCompat XkbDisable XkbGeometry XkbKeycodes XkbKeymap XkbLayout XkbModel
|
||||
Xf86confdeclopt XkbOptions XkbRules XkbSymbols XkbTypes XkbVariant XvBskew XvHsync XvOnCRT2
|
||||
Xf86confdeclopt XvRskew XvVsync YAxisMapping ZAxisMapping ZoomOnLCD
|
||||
|
||||
delcommand Xf86confdeclopt
|
||||
|
||||
" Keywords
|
||||
syn keyword xf86confKeyword Device Driver FontPath Group Identifier Load ModelName ModulePath Monitor RGBPath VendorName VideoAdaptor Visual nextgroup=xf86confComment,xf86confString skipwhite
|
||||
syn keyword xf86confKeyword BiosBase Black BoardName BusID ChipID ChipRev Chipset nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword ClockChip Clocks DacSpeed DefaultDepth DefaultFbBpp nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword DefaultColorDepth nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Depth DisplaySize DotClock FbBpp Flags Gamma HorizSync nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Modes Ramdac Screen TextClockFreq UseModes VendorName nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword VertRefresh VideoRam ViewPort Virtual VScan VTimings nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Weight White nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl
|
||||
|
||||
" Constants
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn keyword xf86confConstant true false on off yes no omit contained
|
||||
else
|
||||
syn keyword xf86confConstant Meta Compose Control
|
||||
endif
|
||||
syn keyword xf86confConstant StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained
|
||||
syn keyword xf86confConstant Absolute RightOf LeftOf Above Below Relative StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained
|
||||
syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained
|
||||
|
||||
" Synchronization
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\""
|
||||
syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\""
|
||||
syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\""
|
||||
else
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\""
|
||||
syn sync match xf86confSyncSectionMX grouphere xf86confSectionMX "^\s*Section\s\+\"\(Module\|Xinput\)\""
|
||||
endif
|
||||
syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\""
|
||||
syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\""
|
||||
syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$"
|
||||
|
||||
" Define the default highlighting
|
||||
hi def link xf86confComment Comment
|
||||
hi def link xf86confTodo Todo
|
||||
hi def link xf86confSectionDelim Statement
|
||||
hi def link xf86confOptionName Identifier
|
||||
|
||||
hi def link xf86confSectionError xf86confError
|
||||
hi def link xf86confSubSectionError xf86confError
|
||||
hi def link xf86confModeSubSectionError xf86confError
|
||||
hi def link xf86confOctalNumberError xf86confError
|
||||
hi def link xf86confError Error
|
||||
|
||||
hi def link xf86confOption xf86confKeyword
|
||||
hi def link xf86confModeLine xf86confKeyword
|
||||
hi def link xf86confKeyword Type
|
||||
|
||||
hi def link xf86confDecimalNumber xf86confNumber
|
||||
hi def link xf86confOctalNumber xf86confNumber
|
||||
hi def link xf86confHexadecimalNumber xf86confNumber
|
||||
hi def link xf86confFrequency xf86confNumber
|
||||
hi def link xf86confModeLineValue Constant
|
||||
hi def link xf86confNumber Constant
|
||||
|
||||
hi def link xf86confSync xf86confConstant
|
||||
hi def link xf86confConstant Special
|
||||
hi def link xf86confSpecialChar Special
|
||||
hi def link xf86confString String
|
||||
|
||||
hi def link xf86confValue Constant
|
||||
|
||||
let b:current_syntax = "xf86conf"
|
||||
|
||||
endif
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
let b:current_syntax = "zig"
|
||||
|
||||
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal anytype
|
||||
syn keyword zigStructure struct enum union error
|
||||
syn keyword zigStructure struct enum union error opaque
|
||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async nosuspend await suspend resume
|
||||
syn keyword zigConditional if else switch and or orelse
|
||||
syn keyword zigRepeat while for
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
filetype on
|
||||
|
||||
function! TestExtension(filetype, filename, content)
|
||||
call Log('Detecting ' . a:filetype . ' filetype (' . a:filename . ')...')
|
||||
|
||||
@@ -369,6 +371,7 @@ call TestExtension("mason", "mason2.html", "<%filter></%filter>")
|
||||
call TestExtension("htmldjango", "jinja2.html", "{% for item in navigation %}{% endfor %}")
|
||||
call TestExtension("htmldjango", "jinja3.html", "{% block head %}")
|
||||
call TestExtension("htmldjango", "jinja4.html", "{# some comment #}")
|
||||
call TestExtension("htmldjango", "jinja3.html", "{% load static %}")
|
||||
call TestExtension("xhtml", "xhtml.html", "<DTD XHTML ")
|
||||
|
||||
" many html templates use {{ }}, e.g. Angular, we should not assume django
|
||||
@@ -385,3 +388,8 @@ call TestExtension("xml", "fglrxrc", "")
|
||||
call TestExtension("conf", "foo.conf", "")
|
||||
call TestExtension("conf", "config", "")
|
||||
call TestExtension("conf", "auto.master", "")
|
||||
|
||||
" https://github.com/sheerun/vim-polyglot/issues/579
|
||||
call TestExtension("dart", "reminders.dart", "")
|
||||
|
||||
filetype off
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
function! TestFiletype(filetype)
|
||||
filetype plugin indent on
|
||||
|
||||
func! TestFiletype(filetype)
|
||||
call Log('Loading ' . a:filetype . ' filetype...')
|
||||
|
||||
try
|
||||
enew
|
||||
exec 'set ft=' . a:filetype
|
||||
exec ":bw!"
|
||||
catch
|
||||
echo 'Failed to load ' . a:filetype . ' filetype...'
|
||||
echo v:exception
|
||||
throw v:exception
|
||||
cq!
|
||||
endtry
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
call TestFiletype('8th')
|
||||
call TestFiletype('cfg')
|
||||
call TestFiletype('master')
|
||||
call TestFiletype('conf')
|
||||
call TestFiletype('haproxy')
|
||||
call TestFiletype('a2ps')
|
||||
call TestFiletype('a65')
|
||||
call TestFiletype('aap')
|
||||
@@ -29,6 +30,8 @@ call TestFiletype('asl')
|
||||
call TestFiletype('ada')
|
||||
call TestFiletype('ahdl')
|
||||
call TestFiletype('aidl')
|
||||
call TestFiletype('master')
|
||||
call TestFiletype('conf')
|
||||
call TestFiletype('alsaconf')
|
||||
call TestFiletype('aml')
|
||||
call TestFiletype('ampl')
|
||||
@@ -46,6 +49,7 @@ call TestFiletype('arduino')
|
||||
call TestFiletype('art')
|
||||
call TestFiletype('asciidoc')
|
||||
call TestFiletype('autohotkey')
|
||||
call TestFiletype('make')
|
||||
call TestFiletype('elf')
|
||||
call TestFiletype('automake')
|
||||
call TestFiletype('asn')
|
||||
@@ -59,6 +63,7 @@ call TestFiletype('caddyfile')
|
||||
call TestFiletype('carp')
|
||||
call TestFiletype('clojure')
|
||||
call TestFiletype('cmake')
|
||||
call TestFiletype('markdown')
|
||||
call TestFiletype('coffee')
|
||||
call TestFiletype('litcoffee')
|
||||
call TestFiletype('cryptol')
|
||||
@@ -73,8 +78,9 @@ call TestFiletype('dcov')
|
||||
call TestFiletype('dd')
|
||||
call TestFiletype('ddoc')
|
||||
call TestFiletype('dsdl')
|
||||
call TestFiletype('sed')
|
||||
call TestFiletype('mysql')
|
||||
call TestFiletype('yaml')
|
||||
call TestFiletype('Dockerfile')
|
||||
call TestFiletype('yaml.docker-compose')
|
||||
call TestFiletype('elixir')
|
||||
call TestFiletype('eelixir')
|
||||
@@ -108,11 +114,11 @@ call TestFiletype('grub')
|
||||
call TestFiletype('haml')
|
||||
call TestFiletype('html.mustache')
|
||||
call TestFiletype('html.handlebars')
|
||||
call TestFiletype('haproxy')
|
||||
call TestFiletype('haskell')
|
||||
call TestFiletype('haxe')
|
||||
call TestFiletype('hcl')
|
||||
call TestFiletype('hive')
|
||||
call TestFiletype('html')
|
||||
call TestFiletype('i3config')
|
||||
call TestFiletype('icalendar')
|
||||
call TestFiletype('idris')
|
||||
@@ -139,7 +145,6 @@ call TestFiletype('lua')
|
||||
call TestFiletype('m4')
|
||||
call TestFiletype('mako')
|
||||
call TestFiletype('mma')
|
||||
call TestFiletype('markdown')
|
||||
call TestFiletype('markdown.mdx')
|
||||
call TestFiletype('meson')
|
||||
call TestFiletype('dosini')
|
||||
@@ -199,7 +204,6 @@ call TestFiletype('ruby')
|
||||
call TestFiletype('brewfile')
|
||||
call TestFiletype('rust')
|
||||
call TestFiletype('scala')
|
||||
call TestFiletype('sbt.scala')
|
||||
call TestFiletype('scss')
|
||||
call TestFiletype('sh')
|
||||
call TestFiletype('zsh')
|
||||
@@ -360,6 +364,7 @@ call TestFiletype('hastepreproc')
|
||||
call TestFiletype('hercules')
|
||||
call TestFiletype('hex')
|
||||
call TestFiletype('hollywood')
|
||||
call TestFiletype('html')
|
||||
call TestFiletype('tilde')
|
||||
call TestFiletype('htmlm4')
|
||||
call TestFiletype('template')
|
||||
@@ -446,7 +451,6 @@ call TestFiletype('mplayerconf')
|
||||
call TestFiletype('srec')
|
||||
call TestFiletype('mrxvtrc')
|
||||
call TestFiletype('msql')
|
||||
call TestFiletype('mysql')
|
||||
call TestFiletype('muttrc')
|
||||
call TestFiletype('mupad')
|
||||
call TestFiletype('mush')
|
||||
@@ -521,10 +525,10 @@ call TestFiletype('samba')
|
||||
call TestFiletype('sas')
|
||||
call TestFiletype('sass')
|
||||
call TestFiletype('sather')
|
||||
call TestFiletype('sbt')
|
||||
call TestFiletype('scilab')
|
||||
call TestFiletype('sd')
|
||||
call TestFiletype('sdl')
|
||||
call TestFiletype('sed')
|
||||
call TestFiletype('sieve')
|
||||
call TestFiletype('sm')
|
||||
call TestFiletype('services')
|
||||
@@ -632,5 +636,9 @@ call TestFiletype('logcheck')
|
||||
call TestFiletype('svn')
|
||||
call TestFiletype('text')
|
||||
call TestFiletype('pullrequest')
|
||||
call TestFiletype('xf86conf')
|
||||
|
||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
filetype plugin indent off
|
||||
filetype off
|
||||
|
||||
703
tests/native.vim
Normal file
703
tests/native.vim
Normal file
@@ -0,0 +1,703 @@
|
||||
func Test_detection()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
new something.vim
|
||||
call assert_equal('vim', &filetype)
|
||||
|
||||
bwipe!
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_conf_type()
|
||||
filetype on
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
augroup END
|
||||
split Xfile
|
||||
call assert_equal('conf', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_other_type()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
au BufNewFile,BufRead Xfile setf testfile
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
split Xfile
|
||||
call assert_equal('testfile', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" Filetypes detected just from matching the file name.
|
||||
let s:filename_checks = {
|
||||
\ '8th': ['file.8th'],
|
||||
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
|
||||
\ 'a65': ['file.a65'],
|
||||
\ 'aap': ['file.aap'],
|
||||
\ 'abap': ['file.abap'],
|
||||
\ 'abc': ['file.abc'],
|
||||
\ 'abel': ['file.abl'],
|
||||
\ 'acedb': ['file.wrm'],
|
||||
\ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'],
|
||||
\ 'ahdl': ['file.tdf'],
|
||||
\ 'aidl': ['file.aidl'],
|
||||
\ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf', 'any/etc/asound.conf', 'any/usr/share/alsa/alsa.conf'],
|
||||
\ 'aml': ['file.aml'],
|
||||
\ 'ampl': ['file.run'],
|
||||
\ 'ant': ['build.xml'],
|
||||
\ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file'],
|
||||
\ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
|
||||
\ 'applescript': ['file.scpt'],
|
||||
\ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
|
||||
\ 'arch': ['.arch-inventory', '=tagging-method'],
|
||||
\ 'arduino': ['file.ino', 'file.pde'],
|
||||
\ 'art': ['file.art'],
|
||||
\ 'asciidoc': ['file.asciidoc', 'file.adoc'],
|
||||
\ 'asn': ['file.asn', 'file.asn1'],
|
||||
\ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
|
||||
\ 'atlas': ['file.atl', 'file.as'],
|
||||
\ 'autohotkey': ['file.ahk'],
|
||||
\ 'autoit': ['file.au3'],
|
||||
\ 'automake': ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
|
||||
\ 'ave': ['file.ave'],
|
||||
\ 'awk': ['file.awk', 'file.gawk'],
|
||||
\ 'b': ['file.mch', 'file.ref', 'file.imp'],
|
||||
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
|
||||
\ 'bc': ['file.bc'],
|
||||
\ 'bdf': ['file.bdf'],
|
||||
\ 'bib': ['file.bib'],
|
||||
\ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
|
||||
\ 'blank': ['file.bl'],
|
||||
\ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
|
||||
\ 'bst': ['file.bst'],
|
||||
\ 'bzr': ['bzr_log.any', 'bzr_log.file'],
|
||||
\ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
|
||||
\ 'cabal': ['file.cabal'],
|
||||
\ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/.calendar/file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
|
||||
\ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
|
||||
\ 'cdl': ['file.cdl'],
|
||||
\ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao', 'any/etc/cdrdao.conf', 'any/etc/default/cdrdao', 'any/etc/defaults/cdrdao'],
|
||||
\ 'cdrtoc': ['file.toc'],
|
||||
\ 'cf': ['file.cfm', 'file.cfi', 'file.cfc'],
|
||||
\ 'cfengine': ['cfengine.conf'],
|
||||
\ 'cfg': ['file.cfg', 'file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'],
|
||||
\ 'ch': ['file.chf'],
|
||||
\ 'chaiscript': ['file.chai'],
|
||||
\ 'chaskell': ['file.chs'],
|
||||
\ 'chill': ['file..ch'],
|
||||
\ 'chordpro': ['file.chopro', 'file.crd', 'file.cho', 'file.crdpro', 'file.chordpro'],
|
||||
\ 'cl': ['file.eni'],
|
||||
\ 'clean': ['file.dcl', 'file.icl'],
|
||||
\ 'clojure': ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
|
||||
\ 'cmake': ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
|
||||
\ 'cmusrc': ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],
|
||||
\ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
|
||||
\ 'coco': ['file.atg'],
|
||||
\ 'conaryrecipe': ['file.recipe'],
|
||||
\ 'conf': ['auto.master'],
|
||||
\ 'config': ['configure.in', 'configure.ac', 'Pipfile', '/etc/hostname.file'],
|
||||
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
|
||||
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
|
||||
\ 'crm': ['file.crm'],
|
||||
\ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
|
||||
\ 'cs': ['file.cs'],
|
||||
\ 'csc': ['file.csc'],
|
||||
\ 'csdl': ['file.csdl'],
|
||||
\ 'csp': ['file.csp', 'file.fdr'],
|
||||
\ 'css': ['file.css'],
|
||||
\ 'cterm': ['file.con'],
|
||||
\ 'cucumber': ['file.feature'],
|
||||
\ 'cuda': ['file.cu', 'file.cuh'],
|
||||
\ 'cupl': ['file.pld'],
|
||||
\ 'cuplsim': ['file.si'],
|
||||
\ 'cvs': ['cvs123'],
|
||||
\ 'cvsrc': ['.cvsrc'],
|
||||
\ 'cynpp': ['file.cyn'],
|
||||
\ 'dart': ['file.dart', 'file.drt'],
|
||||
\ 'datascript': ['file.ds'],
|
||||
\ 'dcd': ['file.dcd'],
|
||||
\ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'],
|
||||
\ 'debcontrol': ['/debian/control', 'any/debian/control'],
|
||||
\ 'debcopyright': ['/debian/copyright', 'any/debian/copyright'],
|
||||
\ 'debsources': ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list', 'any/etc/apt/sources.list', 'any/etc/apt/sources.list.d/file.list'],
|
||||
\ 'def': ['file.def'],
|
||||
\ 'denyhosts': ['denyhosts.conf'],
|
||||
\ 'desc': ['file.desc'],
|
||||
\ 'desktop': ['file.desktop', '.directory', 'file.directory'],
|
||||
\ 'dictconf': ['dict.conf', '.dictrc'],
|
||||
\ 'dictdconf': ['dictd.conf'],
|
||||
\ 'diff': ['file.diff', 'file.rej'],
|
||||
\ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
|
||||
\ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
|
||||
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile'],
|
||||
\ 'dosbatch': ['file.bat', 'file.sys'],
|
||||
\ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file'],
|
||||
\ 'dot': ['file.dot', 'file.gv'],
|
||||
\ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
|
||||
\ 'dsl': ['file.dsl'],
|
||||
\ 'dtd': ['file.dtd'],
|
||||
\ 'dts': ['file.dts', 'file.dtsi'],
|
||||
\ 'dylan': ['file.dylan'],
|
||||
\ 'dylanintr': ['file.intr'],
|
||||
\ 'dylanlid': ['file.lid'],
|
||||
\ 'ecd': ['file.ecd'],
|
||||
\ 'edif': ['file.edf', 'file.edif', 'file.edo'],
|
||||
\ 'elinks': ['elinks.conf'],
|
||||
\ 'elm': ['file.elm'],
|
||||
\ 'elmfilt': ['filter-rules'],
|
||||
\ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
|
||||
\ 'eruby': ['file.erb', 'file.rhtml'],
|
||||
\ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
|
||||
\ 'esqlc': ['file.ec', 'file.EC'],
|
||||
\ 'esterel': ['file.strl'],
|
||||
\ 'eterm': ['anyEterm/file.cfg', 'Eterm/file.cfg', 'some-Eterm/file.cfg'],
|
||||
\ 'exim': ['exim.conf'],
|
||||
\ 'expect': ['file.exp'],
|
||||
\ 'exports': ['exports'],
|
||||
\ 'factor': ['file.factor'],
|
||||
\ 'falcon': ['file.fal'],
|
||||
\ 'fan': ['file.fan', 'file.fwt'],
|
||||
\ 'fetchmail': ['.fetchmailrc'],
|
||||
\ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
|
||||
\ 'focexec': ['file.fex', 'file.focexec'],
|
||||
\ 'forth': ['file.fs', 'file.ft', 'file.fth'],
|
||||
\ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
|
||||
\ 'framescript': ['file.fsl'],
|
||||
\ 'freebasic': ['file.fb', 'file.bi'],
|
||||
\ 'fstab': ['fstab', 'mtab'],
|
||||
\ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
|
||||
\ 'gdb': ['.gdbinit'],
|
||||
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
||||
\ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
|
||||
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
|
||||
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
|
||||
\ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'],
|
||||
\ 'gitrebase': ['git-rebase-todo'],
|
||||
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
|
||||
\ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
|
||||
\ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
|
||||
\ 'gnuplot': ['file.gpi'],
|
||||
\ 'go': ['file.go'],
|
||||
\ 'gp': ['file.gp', '.gprc'],
|
||||
\ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'],
|
||||
\ 'grads': ['file.gs'],
|
||||
\ 'gretl': ['file.gretl'],
|
||||
\ 'groovy': ['file.gradle', 'file.groovy'],
|
||||
\ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
|
||||
\ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
|
||||
\ 'gsp': ['file.gsp'],
|
||||
\ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
|
||||
\ 'haml': ['file.haml'],
|
||||
\ 'hamster': ['file.hsc', 'file.hsm'],
|
||||
\ 'haskell': ['file.hs', 'file.hs-boot'],
|
||||
\ 'haste': ['file.ht'],
|
||||
\ 'hastepreproc': ['file.htpp'],
|
||||
\ 'hb': ['file.hb'],
|
||||
\ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
|
||||
\ 'hex': ['file.hex', 'file.h32'],
|
||||
\ 'hgcommit': ['hg-editor-file.txt'],
|
||||
\ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
|
||||
\ 'hollywood': ['file.hws'],
|
||||
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
||||
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
||||
\ 'logcheck': ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file', 'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
|
||||
\ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
|
||||
\ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],
|
||||
\ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'],
|
||||
\ 'opl': ['file.OPL', 'file.OPl', 'file.OpL', 'file.Opl', 'file.oPL', 'file.oPl', 'file.opL', 'file.opl'],
|
||||
\ 'pcmk': ['file.pcmk'],
|
||||
\ 'r': ['file.r'],
|
||||
\ 'rhelp': ['file.rd'],
|
||||
\ 'rmd': ['file.rmd', 'file.smd'],
|
||||
\ 'rnoweb': ['file.rnw', 'file.snw'],
|
||||
\ 'rrst': ['file.rrst', 'file.srst'],
|
||||
\ 'template': ['file.tmpl'],
|
||||
\ 'htmlm4': ['file.html.m4'],
|
||||
\ 'httest': ['file.htt', 'file.htb'],
|
||||
\ 'ibasic': ['file.iba', 'file.ibi'],
|
||||
\ 'icemenu': ['/.icewm/menu', 'any/.icewm/menu'],
|
||||
\ 'icon': ['file.icn'],
|
||||
\ 'indent': ['.indent.pro', 'indentrc'],
|
||||
\ 'inform': ['file.inf', 'file.INF'],
|
||||
\ 'initng': ['/etc/initng/any/file.i', 'file.ii', 'any/etc/initng/any/file.i'],
|
||||
\ 'inittab': ['inittab'],
|
||||
\ 'ipfilter': ['ipf.conf', 'ipf6.conf', 'ipf.rules'],
|
||||
\ 'iss': ['file.iss'],
|
||||
\ 'ist': ['file.ist', 'file.mst'],
|
||||
\ 'j': ['file.ijs'],
|
||||
\ 'jal': ['file.jal', 'file.JAL'],
|
||||
\ 'jam': ['file.jpl', 'file.jpr', 'JAM-file.file', 'JAM.file', 'Prl-file.file', 'Prl.file'],
|
||||
\ 'java': ['file.java', 'file.jav'],
|
||||
\ 'javacc': ['file.jj', 'file.jjt'],
|
||||
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
|
||||
\ 'javascriptreact': ['file.jsx'],
|
||||
\ 'jess': ['file.clp'],
|
||||
\ 'jgraph': ['file.jgr'],
|
||||
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
||||
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'],
|
||||
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
|
||||
\ 'jsp': ['file.jsp'],
|
||||
\ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
|
||||
\ 'kivy': ['file.kv'],
|
||||
\ 'kix': ['file.kix'],
|
||||
\ 'kotlin': ['file.kt', 'file.ktm', 'file.kts'],
|
||||
\ 'kscript': ['file.ks'],
|
||||
\ 'kwt': ['file.k'],
|
||||
\ 'lace': ['file.ace', 'file.ACE'],
|
||||
\ 'latte': ['file.latte', 'file.lte'],
|
||||
\ 'ld': ['file.ld'],
|
||||
\ 'ldif': ['file.ldif'],
|
||||
\ 'less': ['file.less'],
|
||||
\ 'lex': ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
|
||||
\ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc', 'lftp/rc', 'some-lftp/rc'],
|
||||
\ 'lhaskell': ['file.lhs'],
|
||||
\ 'libao': ['/etc/libao.conf', '/.libao', 'any/.libao', 'any/etc/libao.conf'],
|
||||
\ 'lifelines': ['file.ll'],
|
||||
\ 'lilo': ['lilo.conf', 'lilo.conf-file'],
|
||||
\ 'limits': ['/etc/limits', '/etc/anylimits.conf', '/etc/anylimits.d/file.conf', '/etc/limits.conf', '/etc/limits.d/file.conf', '/etc/some-limits.conf', '/etc/some-limits.d/file.conf', 'any/etc/limits', 'any/etc/limits.conf', 'any/etc/limits.d/file.conf', 'any/etc/some-limits.conf', 'any/etc/some-limits.d/file.conf'],
|
||||
\ 'liquid': ['file.liquid'],
|
||||
\ 'lisp': ['file.lsp', 'file.lisp', 'file.el', 'file.cl', '.emacs', '.sawfishrc', 'sbclrc', '.sbclrc'],
|
||||
\ 'lite': ['file.lite', 'file.lt'],
|
||||
\ 'litestep': ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
|
||||
\ 'loginaccess': ['/etc/login.access', 'any/etc/login.access'],
|
||||
\ 'logindefs': ['/etc/login.defs', 'any/etc/login.defs'],
|
||||
\ 'logtalk': ['file.lgt'],
|
||||
\ 'lotos': ['file.lot', 'file.lotos'],
|
||||
\ 'lout': ['file.lou', 'file.lout'],
|
||||
\ 'lprolog': ['file.sig'],
|
||||
\ 'lsl': ['file.lsl'],
|
||||
\ 'lss': ['file.lss'],
|
||||
\ 'lua': ['file.lua', 'file.rockspec', 'file.nse'],
|
||||
\ 'lynx': ['lynx.cfg'],
|
||||
\ 'm4': ['file.at'],
|
||||
\ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml', 'reportbug-file'],
|
||||
\ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases', 'any/etc/aliases', 'any/etc/mail/aliases'],
|
||||
\ 'mailcap': ['.mailcap', 'mailcap'],
|
||||
\ 'make': ['file.mk', 'file.mak', 'file.dsp', 'makefile', 'Makefile', 'makefile-file', 'Makefile-file', 'some-makefile', 'some-Makefile'],
|
||||
\ 'mallard': ['file.page'],
|
||||
\ 'man': ['file.man'],
|
||||
\ 'manconf': ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
|
||||
\ 'map': ['file.map'],
|
||||
\ 'maple': ['file.mv', 'file.mpl', 'file.mws'],
|
||||
\ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
|
||||
\ 'mason': ['file.mason', 'file.mhtml', 'file.comp'],
|
||||
\ 'master': ['file.mas', 'file.master'],
|
||||
\ 'mel': ['file.mel'],
|
||||
\ 'meson': ['meson.build', 'meson_options.txt'],
|
||||
\ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user',
|
||||
\ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log',
|
||||
\ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err',
|
||||
\ '/log/auth.info', '/log/cron.info', '/log/daemon.info', '/log/debug.info', '/log/kern.info', '/log/lpr.info', '/log/mail.info', '/log/messages.info', '/log/news/news.info', '/log/syslog.info', '/log/user.info',
|
||||
\ '/log/auth.warn', '/log/cron.warn', '/log/daemon.warn', '/log/debug.warn', '/log/kern.warn', '/log/lpr.warn', '/log/mail.warn', '/log/messages.warn', '/log/news/news.warn', '/log/syslog.warn', '/log/user.warn',
|
||||
\ '/log/auth.crit', '/log/cron.crit', '/log/daemon.crit', '/log/debug.crit', '/log/kern.crit', '/log/lpr.crit', '/log/mail.crit', '/log/messages.crit', '/log/news/news.crit', '/log/syslog.crit', '/log/user.crit',
|
||||
\ '/log/auth.notice', '/log/cron.notice', '/log/daemon.notice', '/log/debug.notice', '/log/kern.notice', '/log/lpr.notice', '/log/mail.notice', '/log/messages.notice', '/log/news/news.notice', '/log/syslog.notice', '/log/user.notice'],
|
||||
\ 'mf': ['file.mf'],
|
||||
\ 'mgl': ['file.mgl'],
|
||||
\ 'mgp': ['file.mgp'],
|
||||
\ 'mib': ['file.mib', 'file.my'],
|
||||
\ 'mix': ['file.mix', 'file.mixal'],
|
||||
\ 'mma': ['file.nb'],
|
||||
\ 'mmp': ['file.mmp'],
|
||||
\ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
|
||||
\ 'modula2': ['file.m2', 'file.mi'],
|
||||
\ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
|
||||
\ 'moo': ['file.moo'],
|
||||
\ 'mp': ['file.mp'],
|
||||
\ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'],
|
||||
\ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'],
|
||||
\ 'msidl': ['file.odl', 'file.mof'],
|
||||
\ 'msql': ['file.msql'],
|
||||
\ 'mupad': ['file.mu'],
|
||||
\ 'mush': ['file.mush'],
|
||||
\ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'],
|
||||
\ 'mysql': ['file.mysql'],
|
||||
\ 'n1ql': ['file.n1ql', 'file.nql'],
|
||||
\ 'named': ['namedfile.conf', 'rndcfile.conf', 'named-file.conf', 'named.conf', 'rndc-file.conf', 'rndc-file.key', 'rndc.conf', 'rndc.key'],
|
||||
\ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
|
||||
\ 'ncf': ['file.ncf'],
|
||||
\ 'netrc': ['.netrc'],
|
||||
\ 'ninja': ['file.ninja'],
|
||||
\ 'nqc': ['file.nqc'],
|
||||
\ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
|
||||
\ 'nsis': ['file.nsi', 'file.nsh'],
|
||||
\ 'obj': ['file.obj'],
|
||||
\ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit'],
|
||||
\ 'occam': ['file.occ'],
|
||||
\ 'omnimark': ['file.xom', 'file.xin'],
|
||||
\ 'openroad': ['file.or'],
|
||||
\ 'ora': ['file.ora'],
|
||||
\ 'pamconf': ['/etc/pam.conf', '/etc/pam.d/file', 'any/etc/pam.conf', 'any/etc/pam.d/file'],
|
||||
\ 'pamenv': ['/etc/security/pam_env.conf', '/home/user/.pam_environment', '.pam_environment', 'pam_env.conf'],
|
||||
\ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
|
||||
\ 'pascal': ['file.pas', 'file.pp', 'file.dpr', 'file.lpr'],
|
||||
\ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
|
||||
\ 'pccts': ['file.g'],
|
||||
\ 'pdf': ['file.pdf'],
|
||||
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
|
||||
\ 'raku': ['file.p6', 'file.pm6', 'file.pl6', 'file.raku', 'file.rakumod', 'file.pod6'],
|
||||
\ 'pf': ['pf.conf'],
|
||||
\ 'pfmain': ['main.cf'],
|
||||
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
|
||||
\ 'lpc': ['file.lpc', 'file.ulpc'],
|
||||
\ 'pike': ['file.pike', 'file.pmod'],
|
||||
\ 'cmod': ['file.cmod'],
|
||||
\ 'pilrc': ['file.rcp'],
|
||||
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
||||
\ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
|
||||
\ 'pli': ['file.pli', 'file.pl1'],
|
||||
\ 'plm': ['file.plm', 'file.p36', 'file.pac'],
|
||||
\ 'plp': ['file.plp'],
|
||||
\ 'plsql': ['file.pls', 'file.plsql'],
|
||||
\ 'po': ['file.po', 'file.pot'],
|
||||
\ 'pod': ['file.pod'],
|
||||
\ 'postscr': ['file.ps', 'file.pfa', 'file.afm', 'file.eps', 'file.epsf', 'file.epsi', 'file.ai'],
|
||||
\ 'pov': ['file.pov'],
|
||||
\ 'povini': ['.povrayrc'],
|
||||
\ 'ppd': ['file.ppd'],
|
||||
\ 'ppwiz': ['file.it', 'file.ih'],
|
||||
\ 'privoxy': ['file.action'],
|
||||
\ 'proc': ['file.pc'],
|
||||
\ 'procmail': ['.procmail', '.procmailrc'],
|
||||
\ 'prolog': ['file.pdb'],
|
||||
\ 'promela': ['file.pml'],
|
||||
\ 'proto': ['file.proto'],
|
||||
\ 'protocols': ['/etc/protocols', 'any/etc/protocols'],
|
||||
\ 'psf': ['file.psf'],
|
||||
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
||||
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
|
||||
\ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
|
||||
\ 'radiance': ['file.rad', 'file.mat'],
|
||||
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
||||
\ 'rc': ['file.rc', 'file.rch'],
|
||||
\ 'rcs': ['file,v'],
|
||||
\ 'readline': ['.inputrc', 'inputrc'],
|
||||
\ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
|
||||
\ 'rego': ['file.rego'],
|
||||
\ 'resolv': ['resolv.conf'],
|
||||
\ 'reva': ['file.frt'],
|
||||
\ 'rexx': ['file.rex', 'file.orx', 'file.rxo', 'file.rxj', 'file.jrexx', 'file.rexxj', 'file.rexx', 'file.testGroup', 'file.testUnit'],
|
||||
\ 'rib': ['file.rib'],
|
||||
\ 'rnc': ['file.rnc'],
|
||||
\ 'rng': ['file.rng'],
|
||||
\ 'robots': ['robots.txt'],
|
||||
\ 'rpcgen': ['file.x'],
|
||||
\ 'rpl': ['file.rpl'],
|
||||
\ 'rst': ['file.rst'],
|
||||
\ 'rtf': ['file.rtf'],
|
||||
\ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file'],
|
||||
\ 'rust': ['file.rs'],
|
||||
\ 'samba': ['smb.conf'],
|
||||
\ 'sas': ['file.sas'],
|
||||
\ 'sass': ['file.sass'],
|
||||
\ 'sather': ['file.sa'],
|
||||
\ 'sbt': ['file.sbt'],
|
||||
\ 'scala': ['file.scala'],
|
||||
\ 'scheme': ['file.scm', 'file.ss', 'file.rkt'],
|
||||
\ 'scilab': ['file.sci', 'file.sce'],
|
||||
\ 'screen': ['.screenrc', 'screenrc'],
|
||||
\ 'scss': ['file.scss'],
|
||||
\ 'sd': ['file.sd'],
|
||||
\ 'sdc': ['file.sdc'],
|
||||
\ 'sdl': ['file.sdl', 'file.pr'],
|
||||
\ 'sed': ['file.sed'],
|
||||
\ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', 'any/etc/sensors.conf', 'any/etc/sensors3.conf'],
|
||||
\ 'services': ['/etc/services', 'any/etc/services'],
|
||||
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
|
||||
\ 'sh': ['/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
|
||||
\ 'sieve': ['file.siv', 'file.sieve'],
|
||||
\ 'simula': ['file.sim'],
|
||||
\ 'sinda': ['file.sin', 'file.s85'],
|
||||
\ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
|
||||
\ 'skill': ['file.il', 'file.ils', 'file.cdf'],
|
||||
\ 'slang': ['file.sl'],
|
||||
\ 'slice': ['file.ice'],
|
||||
\ 'slpconf': ['/etc/slp.conf', 'any/etc/slp.conf'],
|
||||
\ 'slpreg': ['/etc/slp.reg', 'any/etc/slp.reg'],
|
||||
\ 'slpspi': ['/etc/slp.spi', 'any/etc/slp.spi'],
|
||||
\ 'slrnrc': ['.slrnrc'],
|
||||
\ 'slrnsc': ['file.score'],
|
||||
\ 'sm': ['sendmail.cf'],
|
||||
\ 'smarty': ['file.tpl'],
|
||||
\ 'smcl': ['file.hlp', 'file.ihlp', 'file.smcl'],
|
||||
\ 'smith': ['file.smt', 'file.smith'],
|
||||
\ 'sml': ['file.sml'],
|
||||
\ 'snobol4': ['file.sno', 'file.spt'],
|
||||
\ 'spec': ['file.spec'],
|
||||
\ 'spice': ['file.sp', 'file.spice'],
|
||||
\ 'spup': ['file.speedup', 'file.spdata', 'file.spd'],
|
||||
\ 'spyce': ['file.spy', 'file.spi'],
|
||||
\ 'sql': ['file.tyb', 'file.typ', 'file.tyc', 'file.pkb', 'file.pks'],
|
||||
\ 'sqlj': ['file.sqlj'],
|
||||
\ 'sqr': ['file.sqr', 'file.sqi'],
|
||||
\ 'squid': ['squid.conf'],
|
||||
\ 'srec': ['file.s19', 'file.s28', 'file.s37', 'file.mot', 'file.srec'],
|
||||
\ 'sshconfig': ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf', 'any/.ssh/config'],
|
||||
\ 'sshdconfig': ['sshd_config', '/etc/ssh/sshd_config.d/file.conf', 'any/etc/ssh/sshd_config.d/file.conf'],
|
||||
\ 'st': ['file.st'],
|
||||
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
|
||||
\ 'stp': ['file.stp'],
|
||||
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers'],
|
||||
\ 'svg': ['file.svg'],
|
||||
\ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
|
||||
\ 'swift': ['file.swift'],
|
||||
\ 'swiftgyb': ['file.swift.gyb'],
|
||||
\ 'sil': ['file.sil'],
|
||||
\ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],
|
||||
\ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile', '/.config/systemd/user/.#', '/.config/systemd/user/.#-file', '/.config/systemd/user/file.d/.#', '/.config/systemd/user/file.d/.#-file', '/.config/systemd/user/file.d/file.conf', '/etc/systemd/file.conf.d/file.conf', '/etc/systemd/system/.#', '/etc/systemd/system/.#-file', '/etc/systemd/system/file.d/.#', '/etc/systemd/system/file.d/.#-file', '/etc/systemd/system/file.d/file.conf', '/systemd/file.automount', '/systemd/file.dnssd', '/systemd/file.link', '/systemd/file.mount', '/systemd/file.netdev', '/systemd/file.network', '/systemd/file.nspawn', '/systemd/file.path', '/systemd/file.service', '/systemd/file.slice', '/systemd/file.socket', '/systemd/file.swap', '/systemd/file.target', '/systemd/file.timer', 'any/.config/systemd/user/.#', 'any/.config/systemd/user/.#-file', 'any/.config/systemd/user/file.d/.#', 'any/.config/systemd/user/file.d/.#-file', 'any/.config/systemd/user/file.d/file.conf', 'any/etc/systemd/file.conf.d/file.conf', 'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file', 'any/etc/systemd/system/file.d/.#', 'any/etc/systemd/system/file.d/.#-file', 'any/etc/systemd/system/file.d/file.conf'],
|
||||
\ 'systemverilog': ['file.sv', 'file.svh'],
|
||||
\ 'tags': ['tags'],
|
||||
\ 'tak': ['file.tak'],
|
||||
\ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
|
||||
\ 'taskedit': ['file.task'],
|
||||
\ 'tcl': ['file.tcl', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl'],
|
||||
\ 'teraterm': ['file.ttl'],
|
||||
\ 'terminfo': ['file.ti'],
|
||||
\ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
|
||||
\ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
|
||||
\ 'texmf': ['texmf.cnf'],
|
||||
\ 'text': ['file.text', 'README'],
|
||||
\ 'tf': ['.tfrc', 'tfrc'],
|
||||
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
|
||||
\ 'tilde': ['file.t.html'],
|
||||
\ 'tli': ['file.tli'],
|
||||
\ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf'],
|
||||
\ 'tpp': ['file.tpp'],
|
||||
\ 'treetop': ['file.treetop'],
|
||||
\ 'trustees': ['trustees.conf'],
|
||||
\ 'tsalt': ['file.slt'],
|
||||
\ 'tsscl': ['file.tsscl'],
|
||||
\ 'tssgm': ['file.tssgm'],
|
||||
\ 'tssop': ['file.tssop'],
|
||||
\ 'html.twig': ['file.twig'],
|
||||
\ 'typescript': ['file.ts'],
|
||||
\ 'typescriptreact': ['file.tsx'],
|
||||
\ 'uc': ['file.uc'],
|
||||
\ 'udevconf': ['/etc/udev/udev.conf', 'any/etc/udev/udev.conf'],
|
||||
\ 'udevperm': ['/etc/udev/permissions.d/file.permissions', 'any/etc/udev/permissions.d/file.permissions'],
|
||||
\ 'udevrules': ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
|
||||
\ 'uil': ['file.uit', 'file.uil'],
|
||||
\ 'updatedb': ['/etc/updatedb.conf', 'any/etc/updatedb.conf'],
|
||||
\ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override', 'any/.config/upstart/file.conf', 'any/.config/upstart/file.override', 'any/.init/file.conf', 'any/.init/file.override', 'any/etc/init/file.conf', 'any/etc/init/file.override', 'any/usr/share/upstart/file.conf', 'any/usr/share/upstart/file.override'],
|
||||
\ 'upstreamdat': ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
|
||||
\ 'upstreaminstalllog': ['upstreaminstall.log', 'UPSTREAMINSTALL.LOG', 'upstreaminstall.file.log', 'UPSTREAMINSTALL.FILE.LOG', 'file.upstreaminstall.log', 'FILE.UPSTREAMINSTALL.LOG'],
|
||||
\ 'upstreamlog': ['fdrupstream.log', 'upstream.log', 'UPSTREAM.LOG', 'upstream.file.log', 'UPSTREAM.FILE.LOG', 'file.upstream.log', 'FILE.UPSTREAM.LOG', 'UPSTREAM-file.log', 'UPSTREAM-FILE.LOG'],
|
||||
\ 'usserverlog': ['usserver.log', 'USSERVER.LOG', 'usserver.file.log', 'USSERVER.FILE.LOG', 'file.usserver.log', 'FILE.USSERVER.LOG'],
|
||||
\ 'usw2kagtlog': ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
|
||||
\ 'vb': ['file.sba', 'file.vbs', 'file.dsm', 'file.ctl'],
|
||||
\ 'vera': ['file.vr', 'file.vri', 'file.vrh'],
|
||||
\ 'verilog': ['file.v'],
|
||||
\ 'verilogams': ['file.va', 'file.vams'],
|
||||
\ 'vgrindefs': ['vgrindefs'],
|
||||
\ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
|
||||
\ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file'],
|
||||
\ 'viminfo': ['.viminfo', '_viminfo'],
|
||||
\ 'vmasm': ['file.mar'],
|
||||
\ 'voscm': ['file.cm'],
|
||||
\ 'vrml': ['file.wrl'],
|
||||
\ 'vroom': ['file.vroom'],
|
||||
\ 'vue': ['file.vue'],
|
||||
\ 'wast': ['file.wast', 'file.wat'],
|
||||
\ 'webmacro': ['file.wm'],
|
||||
\ 'wget': ['.wgetrc', 'wgetrc'],
|
||||
\ 'winbatch': ['file.wbt'],
|
||||
\ 'wml': ['file.wml'],
|
||||
\ 'wsh': ['file.wsf', 'file.wsc'],
|
||||
\ 'wsml': ['file.wsml'],
|
||||
\ 'wvdial': ['wvdial.conf', '.wvdialrc'],
|
||||
\ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
|
||||
\ 'xhtml': ['file.xhtml', 'file.xht'],
|
||||
\ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
|
||||
\ 'xmath': ['file.msc', 'file.msf'],
|
||||
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu'],
|
||||
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
|
||||
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
||||
\ 'xpm2': ['file.xpm2'],
|
||||
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
|
||||
\ 'xs': ['file.xs'],
|
||||
\ 'xsd': ['file.xsd'],
|
||||
\ 'xslt': ['file.xsl', 'file.xslt'],
|
||||
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
|
||||
\ 'yaml': ['file.yaml', 'file.yml'],
|
||||
\ 'raml': ['file.raml'],
|
||||
\ 'z8a': ['file.z8a'],
|
||||
\ 'zimbu': ['file.zu'],
|
||||
\ 'zimbutempl': ['file.zut'],
|
||||
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
|
||||
\
|
||||
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
|
||||
\ 'xpm': ['file.xpm'],
|
||||
\ }
|
||||
|
||||
let s:filename_case_checks = {
|
||||
\ 'modula2': ['file.DEF', 'file.MOD'],
|
||||
\ 'bzl': ['file.BUILD', 'BUILD'],
|
||||
\ }
|
||||
|
||||
func CheckItems(checks)
|
||||
for [ft, names] in items(a:checks)
|
||||
for i in range(0, len(names) - 1)
|
||||
new
|
||||
try
|
||||
exe 'edit ' . fnameescape(names[i])
|
||||
catch
|
||||
call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
|
||||
endtry
|
||||
if &filetype == '' && &readonly
|
||||
" File exists but not able to edit it (permission denied)
|
||||
else
|
||||
call assert_equal(ft, &filetype, 'with file name: ' . names[i])
|
||||
endif
|
||||
bwipe!
|
||||
endfor
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func NewTest_filetype_detection()
|
||||
filetype on
|
||||
call CheckItems(s:filename_checks)
|
||||
if has('fname_case')
|
||||
call CheckItems(s:filename_case_checks)
|
||||
endif
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" Filetypes detected from the file contents by scripts.vim
|
||||
let s:script_checks = {
|
||||
\ 'virata': [['% Virata'],
|
||||
\ ['', '% Virata'],
|
||||
\ ['', '', '% Virata'],
|
||||
\ ['', '', '', '% Virata'],
|
||||
\ ['', '', '', '', '% Virata']],
|
||||
\ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
|
||||
\ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
|
||||
\ ['__libc_start_main and something']],
|
||||
\ 'clojure': [['#!/path/clojure']],
|
||||
\ 'scala': [['#!/path/scala']],
|
||||
\ 'tcsh': [['#!/path/tcsh']],
|
||||
\ 'zsh': [['#!/path/zsh']],
|
||||
\ 'tcl': [['#!/path/tclsh'],
|
||||
\ ['#!/path/wish'],
|
||||
\ ['#!/path/expectk'],
|
||||
\ ['#!/path/itclsh'],
|
||||
\ ['#!/path/itkwish']],
|
||||
\ 'expect': [['#!/path/expect']],
|
||||
\ 'gnuplot': [['#!/path/gnuplot']],
|
||||
\ 'make': [['#!/path/make']],
|
||||
\ 'pike': [['#!/path/pike'],
|
||||
\ ['#!/path/pike0'],
|
||||
\ ['#!/path/pike9']],
|
||||
\ 'lua': [['#!/path/lua']],
|
||||
\ 'raku': [['#!/path/perl6']],
|
||||
\ 'perl': [['#!/path/perl']],
|
||||
\ 'php': [['#!/path/php']],
|
||||
\ 'python': [['#!/path/python'],
|
||||
\ ['#!/path/python2'],
|
||||
\ ['#!/path/python3']],
|
||||
\ 'groovy': [['#!/path/groovy']],
|
||||
\ 'ruby': [['#!/path/ruby']],
|
||||
\ 'javascript': [['#!/path/node'],
|
||||
\ ['#!/path/js'],
|
||||
\ ['#!/path/nodejs'],
|
||||
\ ['#!/path/rhino']],
|
||||
\ 'bc': [['#!/path/bc']],
|
||||
\ 'sed': [['#!/path/sed']],
|
||||
\ 'ocaml': [['#!/path/ocaml']],
|
||||
\ 'awk': [['#!/path/awk'],
|
||||
\ ['#!/path/gawk']],
|
||||
\ 'wml': [['#!/path/wml']],
|
||||
\ 'scheme': [['#!/path/scheme']],
|
||||
\ 'cfengine': [['#!/path/cfengine']],
|
||||
\ 'erlang': [['#!/path/escript']],
|
||||
\ 'haskell': [['#!/path/haskell']],
|
||||
\ 'cpp': [['// Standard iostream objects -*- C++ -*-'],
|
||||
\ ['// -*- C++ -*-']],
|
||||
\ 'yaml': [['%YAML 1.2']],
|
||||
\ }
|
||||
|
||||
" Various forms of "env" optional arguments.
|
||||
let s:script_env_checks = {
|
||||
\ 'perl': [['#!/usr/bin/env VAR=val perl']],
|
||||
\ 'scala': [['#!/usr/bin/env VAR=val VVAR=vval scala']],
|
||||
\ 'awk': [['#!/usr/bin/env VAR=val -i awk']],
|
||||
\ 'scheme': [['#!/usr/bin/env VAR=val --ignore-environment scheme']],
|
||||
\ 'python': [['#!/usr/bin/env VAR=val -S python -w -T']],
|
||||
\ 'wml': [['#!/usr/bin/env VAR=val --split-string wml']],
|
||||
\ }
|
||||
|
||||
func Run_script_detection(test_dict)
|
||||
filetype on
|
||||
for [ft, files] in items(a:test_dict)
|
||||
for file in files
|
||||
enew
|
||||
silent put =file
|
||||
1delete _
|
||||
filetype detect
|
||||
call assert_equal(ft, &filetype, 'for text: ' . string(file))
|
||||
bwipe!
|
||||
endfor
|
||||
endfor
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_script_detection()
|
||||
call Run_script_detection(s:script_checks)
|
||||
call Run_script_detection(s:script_env_checks)
|
||||
endfunc
|
||||
|
||||
func Test_setfiletype_completion()
|
||||
call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"setfiletype java javacc javascript javascriptreact', @:)
|
||||
endfunc
|
||||
|
||||
" Test for ':filetype detect' command for a buffer without a file
|
||||
func Test_emptybuf_ftdetect()
|
||||
new
|
||||
call setline(1, '#!/bin/sh')
|
||||
call assert_equal('', &filetype)
|
||||
filetype detect
|
||||
call assert_equal('sh', &filetype)
|
||||
close!
|
||||
endfunc
|
||||
|
||||
" Test for ':filetype indent on' and ':filetype indent off' commands
|
||||
func Test_filetype_indent_off()
|
||||
new Xtest.vim
|
||||
filetype indent on
|
||||
call assert_equal(1, g:did_indent_on)
|
||||
call assert_equal(['filetype detection:ON plugin:OFF indent:ON'],
|
||||
\ execute('filetype')->split("\n"))
|
||||
filetype indent off
|
||||
call assert_equal(0, exists('g:did_indent_on'))
|
||||
call assert_equal(['filetype detection:ON plugin:OFF indent:OFF'],
|
||||
\ execute('filetype')->split("\n"))
|
||||
close
|
||||
endfunc
|
||||
|
||||
func Test_hook_file()
|
||||
filetype on
|
||||
|
||||
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_equal('dosini', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['not pacman'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_notequal('dosini', &filetype)
|
||||
bwipe!
|
||||
|
||||
call delete('Xfile.hook')
|
||||
filetype off
|
||||
endfunc
|
||||
Reference in New Issue
Block a user