diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-25 03:19:58 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-25 03:19:58 +0100 |
commit | cbde2571d4f79770ac552fe75440de72893bc73a (patch) | |
tree | c6bf43ecbf9ed76071713dc4cba028d32695987a | |
parent | d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (diff) | |
download | vim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.tar.gz vim-polyglot-cbde2571d4f79770ac552fe75440de72893bc73a.zip |
Respect symlinks for resolving vim-polyglot as fallback, closes #605
1293 files changed, 2073 insertions, 10649 deletions
diff --git a/after/ftplugin/cabal.vim b/after/ftplugin/cabal.vim index 8009502d..461f6a24 100644 --- a/after/ftplugin/cabal.vim +++ b/after/ftplugin/cabal.vim @@ -1,7 +1,7 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) + finish +endif setlocal comments=s1fl:{-,mb:-,ex:-},:-- setlocal iskeyword+=-,.,* setlocal commentstring=--\ %s - -endif diff --git a/after/ftplugin/coffee.vim b/after/ftplugin/coffee.vim index 27c00bcb..a039dd95 100644 --- a/after/ftplugin/coffee.vim +++ b/after/ftplugin/coffee.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 +if !polyglot#util#IsEnabled('cjsx', expand('<sfile>:p')) + finish +endif if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = '(:),\[:\],{:},<:>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif - -endif diff --git a/after/ftplugin/haskell.vim b/after/ftplugin/haskell.vim index a617329c..96ea4d04 100644 --- a/after/ftplugin/haskell.vim +++ b/after/ftplugin/haskell.vim @@ -1,6 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) + finish +endif setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:-- setlocal iskeyword+=' - -endif diff --git a/after/ftplugin/html.vim b/after/ftplugin/html.vim index 50cdb2ae..6b0b48a2 100644 --- a/after/ftplugin/html.vim +++ b/after/ftplugin/html.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Maintainer: othree <othree@gmail.com> " URL: http://github.com/othree/html5.vim @@ -9,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " setlocal iskeyword+=- setlocal commentstring=<!--%s--> - -endif diff --git a/after/ftplugin/idris.vim b/after/ftplugin/idris.vim index 6c6815d5..4b38f4ce 100644 --- a/after/ftplugin/idris.vim +++ b/after/ftplugin/idris.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) + finish +endif setlocal iskeyword+=' - -endif diff --git a/after/ftplugin/idris2.vim b/after/ftplugin/idris2.vim index b96ae5b6..b7f25573 100644 --- a/after/ftplugin/idris2.vim +++ b/after/ftplugin/idris2.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) + finish +endif setlocal iskeyword+=' - -endif diff --git a/after/ftplugin/javascript-1.vim b/after/ftplugin/javascript-1.vim index 9f6c9314..8480c6e7 100644 --- a/after/ftplugin/javascript-1.vim +++ b/after/ftplugin/javascript-1.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) + finish +endif " Vim filetype plugin file " Language: JavaScript @@ -12,5 +14,3 @@ if exists('b:undo_ftplugin') else let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<' endif - -endif diff --git a/after/ftplugin/javascript-2.vim b/after/ftplugin/javascript-2.vim index 2992e942..f56dd82a 100644 --- a/after/ftplugin/javascript-2.vim +++ b/after/ftplugin/javascript-2.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source <sfile>:h/jsx.vim - -endif diff --git a/after/ftplugin/javascriptreact.vim b/after/ftplugin/javascriptreact.vim index 265415d0..be2ea1fc 100644 --- a/after/ftplugin/javascriptreact.vim +++ b/after/ftplugin/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/jsx.vim - -endif diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim index 94f90c13..f6f07131 100644 --- a/after/ftplugin/jsx.vim +++ b/after/ftplugin/jsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim ftplugin file @@ -31,5 +33,3 @@ augroup jsx_comment augroup end setlocal suffixesadd+=.jsx - -endif diff --git a/after/ftplugin/llvm.vim b/after/ftplugin/llvm.vim index fbd4b7ff..192bf2f5 100644 --- a/after/ftplugin/llvm.vim +++ b/after/ftplugin/llvm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) + finish +endif " Copyright (c) 2018 rhysd " @@ -483,5 +485,3 @@ endfunction if !exists(':LLI') command! -buffer -nargs=? -bar -complete=file LLI call <SID>run_lli(<f-args>) endif - -endif diff --git a/after/ftplugin/puppet.vim b/after/ftplugin/puppet.vim index 6ddb64e0..8cbc9972 100644 --- a/after/ftplugin/puppet.vim +++ b/after/ftplugin/puppet.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) + finish +endif if !exists('g:puppet_align_hashes') let g:puppet_align_hashes = 1 @@ -7,5 +9,3 @@ endif if g:puppet_align_hashes inoremap <buffer> <silent> => =><Esc>:call puppet#align#AlignHashrockets()<CR>$a endif - -endif diff --git a/after/ftplugin/tsx.vim b/after/ftplugin/tsx.vim index 96b5515a..2b35ec46 100644 --- a/after/ftplugin/tsx.vim +++ b/after/ftplugin/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif " modified from html.vim " For matchit plugin @@ -28,5 +30,3 @@ augroup jsx_comment augroup end setlocal suffixesadd+=.tsx - -endif diff --git a/after/ftplugin/typescriptreact.vim b/after/ftplugin/typescriptreact.vim index 3d850291..07de9bb7 100644 --- a/after/ftplugin/typescriptreact.vim +++ b/after/ftplugin/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/tsx.vim - -endif diff --git a/after/indent/html.vim b/after/indent/html.vim index 3b9c7eb4..065106ca 100644 --- a/after/indent/html.vim +++ b/after/indent/html.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim indent script for HTML " Header: "{{{ @@ -1060,5 +1062,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: fdm=marker ts=8 sw=2 tw=78 - -endif diff --git a/after/indent/javascript-1.vim b/after/indent/javascript-1.vim index 2992e942..f56dd82a 100644 --- a/after/indent/javascript-1.vim +++ b/after/indent/javascript-1.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source <sfile>:h/jsx.vim - -endif diff --git a/after/indent/javascript-2.vim b/after/indent/javascript-2.vim index 85e52312..24d29703 100644 --- a/after/indent/javascript-2.vim +++ b/after/indent/javascript-2.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -42,5 +44,3 @@ function GetJavascriptGraphQLIndent() return eval(b:indentexpr_base) endfunction - -endif diff --git a/after/indent/javascriptreact.vim b/after/indent/javascriptreact.vim index 265415d0..be2ea1fc 100644 --- a/after/indent/javascriptreact.vim +++ b/after/indent/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/jsx.vim - -endif diff --git a/after/indent/jsx.vim b/after/indent/jsx.vim index fcd7b5ad..394f20b7 100644 --- a/after/indent/jsx.vim +++ b/after/indent/jsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim indent file @@ -29,5 +31,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/after/indent/objc.vim b/after/indent/objc.vim index 081e7033..ee644861 100644 --- a/after/indent/objc.vim +++ b/after/indent/objc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 +if !polyglot#util#IsEnabled('objc', expand('<sfile>:p')) + finish +endif " Vim indent file " Language: Objective-C @@ -93,5 +95,3 @@ endfunction " Restore 'cpo' options let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/after/indent/tsx.vim b/after/indent/tsx.vim index 13312c03..544568a7 100644 --- a/after/indent/tsx.vim +++ b/after/indent/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim indent file @@ -36,5 +38,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim index 45ef3492..8f0172c1 100644 --- a/after/indent/typescript.vim +++ b/after/indent/typescript.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -42,5 +44,3 @@ function GetTypescriptGraphQLIndent() return eval(b:indentexpr_base) endfunction - -endif diff --git a/after/indent/typescriptreact.vim b/after/indent/typescriptreact.vim index 3d850291..07de9bb7 100644 --- a/after/indent/typescriptreact.vim +++ b/after/indent/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/tsx.vim - -endif diff --git a/after/syntax/c.vim b/after/syntax/c.vim index 80501e19..d0478e01 100644 --- a/after/syntax/c.vim +++ b/after/syntax/c.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1 +if !polyglot#util#IsEnabled('cpp-modern', expand('<sfile>:p')) + finish +endif " ============================================================================== " Vim syntax file @@ -66,5 +68,3 @@ if get(g:, 'cpp_simple_highlight', 0) hi link cTypedef Statement hi link cLabel Statement endif - -endif diff --git a/after/syntax/coffee.vim b/after/syntax/coffee.vim index fde51eb4..9b9f38a3 100644 --- a/after/syntax/coffee.vim +++ b/after/syntax/coffee.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 +if !polyglot#util#IsEnabled('cjsx', expand('<sfile>:p')) + finish +endif if exists('b:current_syntax') let s:current_syntax=b:current_syntax @@ -27,5 +29,3 @@ hi def link cjsxTagName Function hi def link cjsxEntity Statement hi def link cjsxEntityPunct Type hi def link cjsxAttribProperty Type - -endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim index ec3f1fcf..b59b9859 100644 --- a/after/syntax/cpp.vim +++ b/after/syntax/cpp.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') == -1 +if !polyglot#util#IsEnabled('cpp-modern', expand('<sfile>:p')) + finish +endif " ============================================================================== " Vim syntax file @@ -208,5 +210,3 @@ if get(g:, 'cpp_simple_highlight', 0) hi link cppExceptions Statement hi link cppStorageClass Statement endif - -endif diff --git a/after/syntax/haskell.vim b/after/syntax/haskell.vim index ac175298..e109b2d7 100644 --- a/after/syntax/haskell.vim +++ b/after/syntax/haskell.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 +if !polyglot#util#IsEnabled('dhall', expand('<sfile>:p')) + finish +endif " store and remove current syntax value let old_syntax = b:current_syntax @@ -13,5 +15,3 @@ hi def link quasiQuote Underlined " restore current syntax value let b:current_syntax = old_syntax - -endif diff --git a/after/syntax/help.vim b/after/syntax/help.vim index 16c46b29..a43546cf 100644 --- a/after/syntax/help.vim +++ b/after/syntax/help.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) + finish +endif " Extends standard help syntax with highlighting of Scala code. " @@ -14,5 +16,3 @@ if has('conceal') else syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode endif - -endif diff --git a/after/syntax/html.vim b/after/syntax/html.vim index c02c02a3..8bdc0b0f 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim syntax file " Language: HTML (version 5.1) @@ -196,5 +198,3 @@ syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffs " https://github.com/w3c/html/issues/694 syntax region htmlComment start=+<!--+ end=+-->+ contains=@Spell syntax region htmlComment start=+<!DOCTYPE+ keepend end=+>+ - -endif diff --git a/after/syntax/html/aria.vim b/after/syntax/html/aria.vim index 0c555e6e..9e457bff 100644 --- a/after/syntax/html/aria.vim +++ b/after/syntax/html/aria.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim syntax file " Language: WAI-ARIA @@ -75,5 +77,3 @@ syn match htmlArg contained "\<aria-\%(\|labelledby\|owns\|posinset\|setsize\ syn match htmlArg contained "\<aria-\%(\|colcount\|colindex\|colspan\)\>" syn match htmlArg contained "\<aria-\%(\|rowcount\|rowindex\|rowspan\)\>" - -endif diff --git a/after/syntax/html/electron.vim b/after/syntax/html/electron.vim index f51e1aef..636e810d 100644 --- a/after/syntax/html/electron.vim +++ b/after/syntax/html/electron.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim syntax file " Language: Electron @@ -15,5 +17,3 @@ syn keyword htmlArg contained useragent disablewebsecurity partition allowpopups syn keyword htmlArg contained webpreferences blinkfeatures disableblinkfeatures syn keyword htmlArg contained guestinstance disableguestresize - -endif diff --git a/after/syntax/html/rdfa.vim b/after/syntax/html/rdfa.vim index d772d43c..ec7d714b 100644 --- a/after/syntax/html/rdfa.vim +++ b/after/syntax/html/rdfa.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim syntax file " Language: RDFa @@ -11,5 +13,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " RDFa " http://www.w3.org/TR/rdfa-syntax/#s_syntax syn keyword htmlArg contained about content datatype href inlist prefix property rel resource rev src typeof vocab - -endif diff --git a/after/syntax/idris.vim b/after/syntax/idris.vim index 29d35632..01f5000e 100644 --- a/after/syntax/idris.vim +++ b/after/syntax/idris.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) + finish +endif " This script allows for unicode concealing of certain characters " For instance -> goes to → @@ -78,5 +80,3 @@ hi link idrNiceOperator Operator hi! link Conceal Operator setlocal conceallevel=2 - -endif diff --git a/after/syntax/idris2.vim b/after/syntax/idris2.vim index 85f674a9..279e5875 100644 --- a/after/syntax/idris2.vim +++ b/after/syntax/idris2.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) + finish +endif " This script allows for unicode concealing of certain characters " For instance -> goes to → @@ -78,5 +80,3 @@ hi link idrNiceOperator Operator hi! link Conceal Operator setlocal conceallevel=2 - -endif diff --git a/after/syntax/javascript.vim b/after/syntax/javascript.vim index 2992e942..f56dd82a 100644 --- a/after/syntax/javascript.vim +++ b/after/syntax/javascript.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source <sfile>:h/jsx.vim - -endif diff --git a/after/syntax/javascript/graphql.vim b/after/syntax/javascript/graphql.vim index 22557862..c0c73742 100644 --- a/after/syntax/javascript/graphql.vim +++ b/after/syntax/javascript/graphql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -60,5 +62,3 @@ elseif graphql#has_syntax_group('javaScriptStringT') syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString endif - -endif diff --git a/after/syntax/javascript/html5.vim b/after/syntax/javascript/html5.vim index 42ab78ad..eaeaccb5 100644 --- a/after/syntax/javascript/html5.vim +++ b/after/syntax/javascript/html5.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) + finish +endif " Vim syntax file " Language: HTML5 New Stuff @@ -49,5 +51,3 @@ syn keyword javascriptDomElemAttrs indeterminate " select https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers syn keyword javascriptDomElemAttrs onselectstart onselectchange - -endif diff --git a/after/syntax/javascript/sql.vim b/after/syntax/javascript/sql.vim index 8b45203c..58e23b56 100644 --- a/after/syntax/javascript/sql.vim +++ b/after/syntax/javascript/sql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1 +if !polyglot#util#IsEnabled('javascript-sql', expand('<sfile>:p')) + finish +endif " Vim plugin " Language: JavaScript @@ -22,5 +24,3 @@ hi def link sqlTaggedTemplate jsTaggedTemplate syn cluster jsExpression add=sqlTaggedTemplate syn cluster sqlTaggedTemplate add=sqlTemplateString - -endif diff --git a/after/syntax/javascriptreact.vim b/after/syntax/javascriptreact.vim index 265415d0..be2ea1fc 100644 --- a/after/syntax/javascriptreact.vim +++ b/after/syntax/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/jsx.vim - -endif diff --git a/after/syntax/javascriptreact/graphql.vim b/after/syntax/javascriptreact/graphql.vim index c86f9d23..52628a1a 100644 --- a/after/syntax/javascriptreact/graphql.vim +++ b/after/syntax/javascriptreact/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif runtime! after/syntax/javascript/graphql.vim - -endif diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim index 00c4b079..0a7a7e1e 100644 --- a/after/syntax/jsx.vim +++ b/after/syntax/jsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim syntax file @@ -55,5 +57,3 @@ let b:current_syntax = 'javascript.jsx' let &cpo = s:jsx_cpo unlet s:jsx_cpo - -endif diff --git a/after/syntax/jsx_pretty.vim b/after/syntax/jsx_pretty.vim index 9f14e4d4..f05969c5 100644 --- a/after/syntax/jsx_pretty.vim +++ b/after/syntax/jsx_pretty.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0) @@ -221,5 +223,3 @@ if s:vim_jsx_pretty_colorful_config == 1 highlight def link jsArrowFuncArgs Type highlight def link jsFuncArgs Type endif - -endif diff --git a/after/syntax/llvm.vim b/after/syntax/llvm.vim index 04d234a2..6f3daebf 100644 --- a/after/syntax/llvm.vim +++ b/after/syntax/llvm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) + finish +endif " Copyright (c) 2018 rhysd " @@ -22,5 +24,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 syn keyword llvmKeyword attributes syn match llvmNoName /#\d\+\>/ - -endif diff --git a/after/syntax/mdx.vim b/after/syntax/mdx.vim index 5538f881..6fd7b963 100644 --- a/after/syntax/mdx.vim +++ b/after/syntax/mdx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mdx') == -1 +if !polyglot#util#IsEnabled('mdx', expand('<sfile>:p')) + finish +endif " based on mxw/vim-jsx @@ -41,5 +43,3 @@ syn cluster jsExpression add=jsxRegion " Allow jsxRegion to contain reserved words. syn cluster javascriptNoReserved add=jsxRegion - -endif diff --git a/after/syntax/mma.vim b/after/syntax/mma.vim index c01de4d0..24d99755 100644 --- a/after/syntax/mma.vim +++ b/after/syntax/mma.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1 +if !polyglot#util#IsEnabled('mathematica', expand('<sfile>:p')) + finish +endif "Vim conceal file " Language: Mathematica @@ -1442,5 +1444,3 @@ endif hi! link Conceal Normal setlocal conceallevel=2 - -endif diff --git a/after/syntax/objc.vim b/after/syntax/objc.vim index 093688b1..0541758d 100644 --- a/after/syntax/objc.vim +++ b/after/syntax/objc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 +if !polyglot#util#IsEnabled('objc', expand('<sfile>:p')) + finish +endif " ARC type modifiers syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained @@ -19,5 +21,3 @@ syn match objcDirective "@property\|@synthesize\|@dynamic\|@package" " Highlight property attributes as if they were type modifiers hi def link objcPropertyAttribute objcTypeModifier - -endif diff --git a/after/syntax/reason.vim b/after/syntax/reason.vim index 3be39690..f608bde1 100644 --- a/after/syntax/reason.vim +++ b/after/syntax/reason.vim @@ -1,4 +1,4 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 - - +if !polyglot#util#IsEnabled('reason', expand('<sfile>:p')) + finish endif + diff --git a/after/syntax/reason/graphql.vim b/after/syntax/reason/graphql.vim index 4f4ba44c..00fe9b5d 100644 --- a/after/syntax/reason/graphql.vim +++ b/after/syntax/reason/graphql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -33,5 +35,3 @@ if exists('s:current_syntax') endif syntax region graphqlExtensionPoint matchgroup=Noise start=+\[%graphql\_s*{|+lc=10 end=+|}\_s*]+he=s+1 contains=@GraphQLSyntax keepend - -endif diff --git a/after/syntax/rspec.vim b/after/syntax/rspec.vim index 96ceb28f..99905ddd 100644 --- a/after/syntax/rspec.vim +++ b/after/syntax/rspec.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1 +if !polyglot#util#IsEnabled('rspec', expand('<sfile>:p')) + finish +endif " " An rspec syntax file @@ -189,5 +191,3 @@ highlight link rspecMatchers Function highlight link rspecMessageExpectation Function let b:current_syntax = 'rspec' - -endif diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim index 78503c94..e57c1d70 100644 --- a/after/syntax/ruby.vim +++ b/after/syntax/ruby.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1 +if !polyglot#util#IsEnabled('yard', expand('<sfile>:p')) + finish +endif " Ruby syntax extensions for highlighting YARD documentation. " @@ -127,5 +129,3 @@ hi def link yardParametricType yardComment hi def link yardArrow yardComment hi def link yardHashAngle yardComment hi def link yardHashCurly yardComment - -endif diff --git a/after/syntax/rust.vim b/after/syntax/rust.vim index 0a54e2fc..bf17e031 100644 --- a/after/syntax/rust.vim +++ b/after/syntax/rust.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) + finish +endif scriptencoding utf-8 @@ -41,5 +43,3 @@ if !get(g:, 'rust_conceal_mod_path', 0) endif " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/after/syntax/tsx.vim b/after/syntax/tsx.vim index 34a6005e..d400f410 100644 --- a/after/syntax/tsx.vim +++ b/after/syntax/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim syntax file @@ -59,5 +61,3 @@ let b:current_syntax = 'typescript.tsx' let &cpo = s:jsx_cpo unlet s:jsx_cpo - -endif diff --git a/after/syntax/typescript/graphql.vim b/after/syntax/typescript/graphql.vim index 5dd01e28..40425b89 100644 --- a/after/syntax/typescript/graphql.vim +++ b/after/syntax/typescript/graphql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -45,5 +47,3 @@ hi def link graphqlTemplateExpression typescriptTemplateSubstitution syn cluster typescriptExpression add=graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString - -endif diff --git a/after/syntax/typescriptreact.vim b/after/syntax/typescriptreact.vim index 3d850291..07de9bb7 100644 --- a/after/syntax/typescriptreact.vim +++ b/after/syntax/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) + finish +endif source <sfile>:h/tsx.vim - -endif diff --git a/after/syntax/typescriptreact/graphql.vim b/after/syntax/typescriptreact/graphql.vim index 62604d20..f9e7151f 100644 --- a/after/syntax/typescriptreact/graphql.vim +++ b/after/syntax/typescriptreact/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif runtime! after/syntax/typescript/graphql.vim - -endif diff --git a/after/syntax/vue/graphql.vim b/after/syntax/vue/graphql.vim index c86f9d23..52628a1a 100644 --- a/after/syntax/vue/graphql.vim +++ b/after/syntax/vue/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) + finish +endif runtime! after/syntax/javascript/graphql.vim - -endif diff --git a/after/syntax/zsh.vim b/after/syntax/zsh.vim index 30f93b63..5e9ff75c 100644 --- a/after/syntax/zsh.vim +++ b/after/syntax/zsh.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zinit') == -1 +if !polyglot#util#IsEnabled('zinit', expand('<sfile>:p')) + finish +endif " Copyright (c) 2019 Sebastian Gniazdowski " @@ -122,5 +124,3 @@ highlight def link ZinitSnippetUrl2 Macro highlight def link ZinitSnippetUrl3 Macro highlight def link ZinitSnippetUrl4 Macro highlight def link ZinitTrailingWhiteSpace Error - -endif diff --git a/autoload/LaTeXtoUnicode.vim b/autoload/LaTeXtoUnicode.vim index f498e5df..bf0c7cc2 100644 --- a/autoload/LaTeXtoUnicode.vim +++ b/autoload/LaTeXtoUnicode.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/LaTeXtoUnicode.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Support for LaTex-to-Unicode conversion as in the Julia REPL " @@ -659,5 +654,3 @@ function! LaTeXtoUnicode#Toggle() endif return '' endfunction - -endif diff --git a/autoload/RstFold.vim b/autoload/RstFold.vim index 926bc1b9..f340565b 100644 --- a/autoload/RstFold.vim +++ b/autoload/RstFold.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/RstFold.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " Author: Antony Lee <anntzer.lee@gmail.com> " Description: Helper functions for reStructuredText syntax folding @@ -69,5 +64,3 @@ function RstFold#GetRstFoldText() let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline return indent . text endfunction - -endif diff --git a/autoload/ada.vim b/autoload/ada.vim index 9a01456c..e54d05e2 100644 --- a/autoload/ada.vim +++ b/autoload/ada.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/ada.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ada', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 "------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. @@ -644,5 +639,3 @@ finish " 1}}} "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker - -endif diff --git a/autoload/cargo.vim b/autoload/cargo.vim index 068cfa89..232dca79 100644 --- a/autoload/cargo.vim +++ b/autoload/cargo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/cargo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 function! cargo#Load() " Utility call to get this script loaded, for debugging @@ -154,5 +149,3 @@ function! cargo#runtarget(args) endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/cargo/quickfix.vim b/autoload/cargo/quickfix.vim index 7f3fffa1..536e09e8 100644 --- a/autoload/cargo/quickfix.vim +++ b/autoload/cargo/quickfix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/cargo/quickfix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 function! cargo#quickfix#CmdPre() abort if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' && @@ -34,5 +29,3 @@ function! cargo#quickfix#CmdPost() abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/clojurecomplete.vim b/autoload/clojurecomplete.vim index 02857c7b..ebecd5cd 100644 --- a/autoload/clojurecomplete.vim +++ b/autoload/clojurecomplete.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/clojurecomplete.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clojure', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 " Vim completion script " Language: Clojure @@ -29,5 +24,3 @@ function! clojurecomplete#Complete(findstart, base) endfunction " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/autoload/coffee.vim b/autoload/coffee.vim index 0388a589..12ea3f97 100644 --- a/autoload/coffee.vim +++ b/autoload/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -61,5 +56,3 @@ function! coffee#CoffeeSetUpErrorFormat() \%f:%l:%c:\ error:\ %m, \%-G%.%# endfunction - -endif diff --git a/autoload/crystal/indent.vim b/autoload/crystal/indent.vim index fbbf91fd..48887469 100644 --- a/autoload/crystal/indent.vim +++ b/autoload/crystal/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/crystal/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Variables {{{1 " ========= @@ -1047,5 +1042,4 @@ endfunction " }}}1 -" vim:sw=2 sts=2 ts=8 fdm=marker et: -endif +" vim:sw=2 sts=2 ts=8 fdm=marker et:
\ No newline at end of file diff --git a/autoload/crystal_lang.vim b/autoload/crystal_lang.vim index 1a1ad421..87060a64 100644 --- a/autoload/crystal_lang.vim +++ b/autoload/crystal_lang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/crystal_lang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:V = vital#crystal#new() let s:P = s:V.import('Process') @@ -370,5 +365,3 @@ function! crystal_lang#expand(file, pos, ...) abort endfunction " vim: sw=2 sts=2 et: - -endif diff --git a/autoload/csv.vim b/autoload/csv.vim index 692ec2a3..20b51923 100644 --- a/autoload/csv.vim +++ b/autoload/csv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/csv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt <cb@256bit.org> @@ -3203,5 +3198,3 @@ endfun " Vim Modeline " {{{2 " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/autoload/dart.vim b/autoload/dart.vim index ccd29b44..1e2c0e07 100644 --- a/autoload/dart.vim +++ b/autoload/dart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/dart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 function! s:error(text) abort @@ -190,5 +185,3 @@ function! dart#setModifiable() abort setlocal nomodifiable endif endfunction - -endif diff --git a/autoload/db/adapter/ecto.vim b/autoload/db/adapter/ecto.vim index 7eca1262..af5da6ae 100644 --- a/autoload/db/adapter/ecto.vim +++ b/autoload/db/adapter/ecto.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/db/adapter/ecto.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 let s:path = expand('<sfile>:h') let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')]) @@ -27,5 +22,3 @@ endfunction function! db#adapter#ecto#complete_opaque(url) abort return map(s:repo_list(), 'v:val[0]') endfunction - -endif diff --git a/autoload/ecrystal.vim b/autoload/ecrystal.vim index 5225c753..43a49edd 100644 --- a/autoload/ecrystal.vim +++ b/autoload/ecrystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/ecrystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:ecrystal_extensions = { \ 'cr': 'crystal', @@ -39,5 +34,3 @@ function! ecrystal#SetSubtype() abort endfunction " vim: sw=2 sts=2 et: - -endif diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim index ccd02881..7286de16 100644 --- a/autoload/elixir/indent.vim +++ b/autoload/elixir/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/elixir/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if !exists("g:elixir_indent_max_lookbehind") let g:elixir_indent_max_lookbehind = 30 @@ -378,5 +373,3 @@ function! elixir#indent#handle_inside_generic_block(context) return -1 endif endfunction - -endif diff --git a/autoload/elixir/util.vim b/autoload/elixir/util.vim index 7acc8814..e5c660f3 100644 --- a/autoload/elixir/util.vim +++ b/autoload/elixir/util.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/elixir/util.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 function! elixir#util#get_filename(word) abort let word = a:word @@ -31,5 +26,3 @@ function! elixir#util#get_filename(word) abort return word endfunction - -endif diff --git a/autoload/fish.vim b/autoload/fish.vim index fb2dda13..c9b498a8 100644 --- a/autoload/fish.vim +++ b/autoload/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 function! fish#Indent() let l:prevlnum = prevnonblank(v:lnum - 1) @@ -92,5 +87,3 @@ endfunction function! fish#errorformat() return '%Afish: %m,%-G%*\\ ^,%-Z%f (line %l):%s' endfunction - -endif diff --git a/autoload/fsharp.vim b/autoload/fsharp.vim index 0331814c..525952ba 100644 --- a/autoload/fsharp.vim +++ b/autoload/fsharp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/fsharp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fsharp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 " Vim autoload functions @@ -520,5 +515,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=4 et sts=4 - -endif diff --git a/autoload/fzf_gitignore.vim b/autoload/fzf_gitignore.vim index bd90be48..f7914f24 100644 --- a/autoload/fzf_gitignore.vim +++ b/autoload/fzf_gitignore.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/fzf_gitignore.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitignore', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1 scriptencoding utf-8 @@ -44,5 +39,3 @@ function! fzf_gitignore#run() abort endfunction " vim: ts=2 et sw=2 - -endif diff --git a/autoload/go/config.vim b/autoload/go/config.vim index 3ddde740..d11bc8d9 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/go/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " don't spam the user when Vim is started in Vi compatibility mode let s:cpo_save = &cpo @@ -630,5 +625,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/autoload/graphql.vim b/autoload/graphql.vim index b5ddd9fa..b92751bb 100644 --- a/autoload/graphql.vim +++ b/autoload/graphql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/graphql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -42,5 +37,3 @@ endfunction function! graphql#javascript_tags() abort return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL']) endfunction - -endif diff --git a/autoload/htmlcomplete.vim b/autoload/htmlcomplete.vim index 7db1fdb9..5b1b4ac5 100644 --- a/autoload/htmlcomplete.vim +++ b/autoload/htmlcomplete.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/htmlcomplete.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " Vim completion script " Language: HTML and XHTML @@ -848,5 +843,3 @@ function! htmlcomplete#CheckDoctype() " {{{ endfunction " }}} " vim:set foldmethod=marker: - -endif diff --git a/autoload/jsonnet.vim b/autoload/jsonnet.vim index c05e2f86..b9386463 100644 --- a/autoload/jsonnet.vim +++ b/autoload/jsonnet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/jsonnet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsonnet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 @@ -132,5 +127,3 @@ function! jsonnet#Format() endfunction - -endif diff --git a/autoload/jsx_pretty/comment.vim b/autoload/jsx_pretty/comment.vim index 5a9db367..44dbf803 100644 --- a/autoload/jsx_pretty/comment.vim +++ b/autoload/jsx_pretty/comment.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/jsx_pretty/comment.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) function! jsx_pretty#comment#update_commentstring(original) let line = getline(".") @@ -44,5 +39,3 @@ function! s:syn_contains(lnum, cnum, syn_name) let syn_names = map(stack, 'synIDattr(v:val, "name")') return index(syn_names, a:syn_name) >= 0 endfunction - -endif diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim index 34f88db0..3c5585a8 100644 --- a/autoload/jsx_pretty/indent.vim +++ b/autoload/jsx_pretty/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/jsx_pretty/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) if exists('*shiftwidth') function! s:sw() @@ -309,5 +304,3 @@ function! jsx_pretty#indent#get(js_indent) return a:js_indent() endfunction - -endif diff --git a/autoload/julia.vim b/autoload/julia.vim index d76454a4..e747028a 100644 --- a/autoload/julia.vim +++ b/autoload/julia.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/julia.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 function! julia#set_syntax_version(jvers) echo "The julia#set_syntax_version function is deprecated" @@ -172,5 +167,3 @@ function! julia#gotodefinition() endfunction endif - -endif diff --git a/autoload/julia/doc.vim b/autoload/julia/doc.vim index e9e77d8c..258c0064 100644 --- a/autoload/julia/doc.vim +++ b/autoload/julia/doc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/julia/doc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " path to the julia binary to communicate with if has('win32') || has('win64') @@ -249,5 +244,3 @@ function! s:likely(str) abort let output = systemlist(cmd) return split(matchstr(output[0], '\C^search: \zs.*')) endfunction - -endif diff --git a/autoload/julia_blocks.vim b/autoload/julia_blocks.vim index 7dd87df9..6be2ba79 100644 --- a/autoload/julia_blocks.vim +++ b/autoload/julia_blocks.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/julia_blocks.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Facilities for moving around Julia blocks (e.g. if/end, function/end etc.) " (AKA a collection of horrible hacks) @@ -801,5 +796,3 @@ function! s:cursor_moved(...) let b:jlblk_did_select = b:jlblk_doing_select let b:jlblk_doing_select = 0 endfunction - -endif diff --git a/autoload/julia_latex_symbols.vim b/autoload/julia_latex_symbols.vim index 5f4c9890..7f6fe007 100644 --- a/autoload/julia_latex_symbols.vim +++ b/autoload/julia_latex_symbols.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/julia_latex_symbols.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " This file is autogenerated from the script 'generate_latex_symbols_table.jl' " The symbols are based on Julia version 1.5.0-DEV.67 @@ -3339,5 +3334,3 @@ function! julia_latex_symbols#get_dict() \ '\:baggage_claim:': '🛄', \ '\:left_luggage:': '🛅'} endfunction - -endif diff --git a/autoload/ledger.vim b/autoload/ledger.vim index badcb175..5b3f2203 100644 --- a/autoload/ledger.vim +++ b/autoload/ledger.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/ledger.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ledger', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 scriptencoding utf-8 " vim:ts=2:sw=2:sts=2:foldmethod=marker @@ -747,5 +742,3 @@ function! ledger#show_balance(file, ...) abort endif endf " }}} - -endif diff --git a/autoload/nim.vim b/autoload/nim.vim index fdf990fc..7bdfa867 100644 --- a/autoload/nim.vim +++ b/autoload/nim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/nim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 let g:nim_log = [] let s:plugin_path = escape(expand('<sfile>:p:h'), '\') @@ -245,5 +240,3 @@ if exists('g:SyntasticRegistry') \ 'filetype': 'nim', \ 'name': 'nim'}) endif - -endif diff --git a/autoload/polyglot/util.vim b/autoload/polyglot/util.vim new file mode 100644 index 00000000..6d5caf88 --- /dev/null +++ b/autoload/polyglot/util.vim @@ -0,0 +1,64 @@ +" Restore 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +let s:disabled_packages = {} +let s:new_polyglot_disabled = [] + +if exists('g:polyglot_disabled') + for pkg in g:polyglot_disabled + let base = split(pkg, '\.') + if len(base) > 0 + let s:disabled_packages[pkg] = 1 + call add(s:new_polyglot_disabled, base[0]) + endif + endfor +else + let g:polyglot_disabled_not_set = 1 +endif + + +let s:base = expand('<sfile>:p:h:h:h') + +func polyglot#util#Filter(idx, val) + let val = fnamemodify(a:val . '/', ':p:h') + return resolve(val) !=? s:base && stridx(val, $VIMRUNTIME) == -1 && val !~? '/after$' +endfunc + +let s:rtp = join(filter(split(&rtp, ','), function('polyglot#util#Filter')), ',') + +func polyglot#util#IsEnabled(type, file) + if a:file != "ftdetect" + let file = a:file[len(s:base) + 1:] + let files = globpath(s:rtp, file, 1, 1) + if !empty(files) + exec 'source' files[0] + return 0 + endif + endif + if a:type == "jsx" + return !has_key(s:disabled_packages, "jsx") && !has_key(s:disabled_packages, "javascript") + endif + return !has_key(s:disabled_packages, a:type) +endfunc + +func! polyglot#util#Verify() + if exists("g:polyglot_disabled_not_set") + if exists("g:polyglot_disabled") + echohl WarningMsg + echo "vim-polyglot: g:polyglot_disabled should be defined before loading vim-polyglot" + echohl None + endif + + unlet g:polyglot_disabled_not_set + endif +endfunc + +" Save polyglot_disabled without postfixes +if exists('g:polyglot_disabled') + let g:polyglot_disabled = s:new_polyglot_disabled +endif + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/pony.vim b/autoload/pony.vim index 5f26c52b..78386b6b 100644 --- a/autoload/pony.vim +++ b/autoload/pony.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/pony.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pony', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 " Vim plugin file " Language: Pony @@ -539,5 +534,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/autoload/puppet/align.vim b/autoload/puppet/align.vim index 4fafac3d..51254120 100644 --- a/autoload/puppet/align.vim +++ b/autoload/puppet/align.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/puppet/align.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 function! puppet#align#IndentLevel(lnum) return indent(a:lnum) / &shiftwidth @@ -75,5 +70,3 @@ function! puppet#align#AlignHashrockets(...) abort endif endfor endfunction - -endif diff --git a/autoload/puppet/ctags.vim b/autoload/puppet/ctags.vim index fad4f87a..a1d1577a 100644 --- a/autoload/puppet/ctags.vim +++ b/autoload/puppet/ctags.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/puppet/ctags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 if !exists('s:ctags_type') @@ -43,5 +38,3 @@ function! puppet#ctags#Type() return s:ctags_type endfunction - -endif diff --git a/autoload/puppet/format.vim b/autoload/puppet/format.vim index 94fe42e7..96b447b6 100644 --- a/autoload/puppet/format.vim +++ b/autoload/puppet/format.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/puppet/format.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " " Simple format using puppet's l:indents and align hashrockets function @@ -77,5 +72,3 @@ function! puppet#format#Fallback(start_lnum, end_lnum) abort endfunction - -endif diff --git a/autoload/python/utils.vim b/autoload/python/utils.vim index 4a02520d..4517f00d 100644 --- a/autoload/python/utils.vim +++ b/autoload/python/utils.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/python/utils.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python-compiler', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 " Sometimes Python issues debugging messages " which don't belong to a call stack context @@ -24,5 +19,3 @@ function! python#utils#fix_qflist() " {{{ call setqflist(l:traceback) endif endfunction " }}} - -endif diff --git a/autoload/requirements.vim b/autoload/requirements.vim index e945a652..ad2e747a 100644 --- a/autoload/requirements.vim +++ b/autoload/requirements.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/requirements.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('requirements', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'requirements') == -1 " the Requirements File Format syntax support for Vim " Version: 1.5.3 @@ -39,5 +34,3 @@ set cpo&vim let &cpo = s:save_cpo unlet s:save_cpo " vim: et sw=4 ts=4 sts=4: - -endif diff --git a/autoload/rubycomplete.vim b/autoload/rubycomplete.vim index 0b8871cb..9551c965 100644 --- a/autoload/rubycomplete.vim +++ b/autoload/rubycomplete.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rubycomplete.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim completion script " Language: Ruby @@ -878,5 +873,3 @@ call s:DefRuby() "}}} ruby-side code " vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: - -endif diff --git a/autoload/rust.vim b/autoload/rust.vim index b8bef48d..a8f5bfa3 100644 --- a/autoload/rust.vim +++ b/autoload/rust.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rust.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Description: Helper functions for Rust commands/mappings " Last Modified: May 27, 2014 @@ -577,5 +572,3 @@ endfunction " }}}1 " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/debugging.vim b/autoload/rust/debugging.vim index d16380b5..9096333b 100644 --- a/autoload/rust/debugging.vim +++ b/autoload/rust/debugging.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rust/debugging.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim @@ -110,5 +105,3 @@ function! rust#debugging#InfoToFile(filename) abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/delimitmate.vim b/autoload/rust/delimitmate.vim index a60dece7..7d2d1817 100644 --- a/autoload/rust/delimitmate.vim +++ b/autoload/rust/delimitmate.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rust/delimitmate.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate' @@ -51,5 +46,3 @@ endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/tags.vim b/autoload/rust/tags.vim index 84388174..8ffa4d51 100644 --- a/autoload/rust/tags.vim +++ b/autoload/rust/tags.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rust/tags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Tagbar support code, for the sake of not automatically overriding its " configuration in case Universal Ctags is detected. @@ -25,5 +20,3 @@ function! rust#tags#IsUCtags() abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim index 2e2a10da..81ebe56e 100644 --- a/autoload/rustfmt.vim +++ b/autoload/rustfmt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/rustfmt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Author: Stephen Sugden <stephen@stephensugden.com> " @@ -267,5 +262,3 @@ endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/smt2.vim b/autoload/smt2.vim index 7a9fa7f8..0d328529 100644 --- a/autoload/smt2.vim +++ b/autoload/smt2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/smt2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smt2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1 " Invokes the solver on current file function! smt2#RunSolver() @@ -37,5 +32,3 @@ function! smt2#PrintSolverVersion() silent !clear execute "!" . g:smt2_solver_command . " " . g:smt2_solver_version_switch endfunction - -endif diff --git a/autoload/terraform.vim b/autoload/terraform.vim index e780440b..7c4e33da 100644 --- a/autoload/terraform.vim +++ b/autoload/terraform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/terraform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terraform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 let s:cpo_save = &cpoptions set cpoptions&vim @@ -86,5 +81,3 @@ endfunction let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/autoload/vital/_crystal.vim b/autoload/vital/_crystal.vim index b8ac5d32..b328af90 100644 --- a/autoload/vital/_crystal.vim +++ b/autoload/vital/_crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:_plugin_name = expand('<sfile>:t:r') @@ -16,5 +11,3 @@ endfunction function! vital#{s:_plugin_name}#function(funcname) abort silent! return function(a:funcname) endfunction - -endif diff --git a/autoload/vital/_crystal/ColorEcho.vim b/autoload/vital/_crystal/ColorEcho.vim index 59c0ec88..7180dce6 100644 --- a/autoload/vital/_crystal/ColorEcho.vim +++ b/autoload/vital/_crystal/ColorEcho.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/ColorEcho.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -189,5 +184,3 @@ function! s:echo(str) abort let echorizer = s:get_echorizer(a:str) call echorizer.echo() endfunction - -endif diff --git a/autoload/vital/_crystal/Data/List.vim b/autoload/vital/_crystal/Data/List.vim index b2045a2a..68f87490 100644 --- a/autoload/vital/_crystal/Data/List.vim +++ b/autoload/vital/_crystal/Data/List.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/List.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -465,5 +460,3 @@ function! s:combinations(list, r) abort endfunction " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Data/String.vim b/autoload/vital/_crystal/Data/String.vim index 8f6ddf3e..67cd217c 100644 --- a/autoload/vital/_crystal/Data/String.vim +++ b/autoload/vital/_crystal/Data/String.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/String.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -629,5 +624,3 @@ function! s:split_posix_text(text, ...) abort endfunction " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Process.vim b/autoload/vital/_crystal/Process.vim index 315a4343..2da1a016 100644 --- a/autoload/vital/_crystal/Process.vim +++ b/autoload/vital/_crystal/Process.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Process.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -174,5 +169,3 @@ endif " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Web/JSON.vim b/autoload/vital/_crystal/Web/JSON.vim index c17269cf..a1d01238 100644 --- a/autoload/vital/_crystal/Web/JSON.vim +++ b/autoload/vital/_crystal/Web/JSON.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Web/JSON.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -180,5 +175,3 @@ endfunction " @vimlint(EVL102, 0, l:ns) " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/crystal.vim b/autoload/vital/crystal.vim index 7674c4ef..68938d83 100644 --- a/autoload/vital/crystal.vim +++ b/autoload/vital/crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/vital/crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:plugin_name = expand('<sfile>:t:r') let s:vital_base_dir = expand('<sfile>:h') @@ -335,5 +330,3 @@ else return a:list endfunction endif - -endif diff --git a/autoload/vital/crystal.vital b/autoload/vital/crystal.vital index 4a13eb01..0ad94eb5 100644 --- a/autoload/vital/crystal.vital +++ b/autoload/vital/crystal.vital @@ -1,10 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 - crystal bee84ae23effb0510137ad177e98c94d8b3657a6 Process Web.JSON ColorEcho - -endif diff --git a/autoload/xml/aria.vim b/autoload/xml/aria.vim index ff8a071c..7a106e0a 100644 --- a/autoload/xml/aria.vim +++ b/autoload/xml/aria.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/xml/aria.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " Vim completion for WAI-ARIA data file " Language: HTML + WAI-ARIA @@ -464,5 +459,3 @@ let g:xmldata_aria = { \ 'default_role': default_role, \ 'vimariaattrinfo': aria_attributes_value \ } - -endif diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim index 7bbc9586..a88808e0 100644 --- a/autoload/xml/html5.vim +++ b/autoload/xml/html5.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/xml/html5.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html5', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " Vim completion for HTML5 data file " Language: HTML (version 5.1 Draft 2016 Jan 13) @@ -882,5 +877,3 @@ let g:xmldata_html5 = { \ 'wbr': ['/>', ''], \ }, \ } - -endif diff --git a/autoload/xml/xsd.vim b/autoload/xml/xsd.vim index 5757ae84..71b0ec89 100644 --- a/autoload/xml/xsd.vim +++ b/autoload/xml/xsd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/xml/xsd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsd') == -1 " Author: Thomas Barthel " Last change: 2007 May 8 @@ -137,5 +132,3 @@ let g:xmldata_xsd = { \ [], \ {'source' : [], 'id' : [], 'xml' : []} ] \ } - -endif diff --git a/autoload/zig/config.vim b/autoload/zig/config.vim index a35e73e8..ed373f56 100644 --- a/autoload/zig/config.vim +++ b/autoload/zig/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/zig/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 function! zig#config#ListTypeCommands() abort return get(g:, 'zig_list_type_commands', {}) @@ -46,5 +41,3 @@ endfunction function! zig#config#Debug() abort return get(g:, 'zig_debug', []) endfunction - -endif diff --git a/autoload/zig/fmt.vim b/autoload/zig/fmt.vim index c148ca2b..bdc21290 100644 --- a/autoload/zig/fmt.vim +++ b/autoload/zig/fmt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/zig/fmt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Adapted from fatih/vim-go: autoload/go/fmt.vim " @@ -173,5 +168,3 @@ function! zig#fmt#ToggleFmtAutoSave() abort endfunction " vim: sw=2 ts=2 et - -endif diff --git a/autoload/zig/list.vim b/autoload/zig/list.vim index 382a9882..d09dd76e 100644 --- a/autoload/zig/list.vim +++ b/autoload/zig/list.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/zig/list.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Adapted from fatih/vim-go: autoload/go/list.vim " @@ -165,5 +160,3 @@ function! zig#list#Type(for) abort endfunction " vim: sw=2 ts=2 et - -endif diff --git a/autoload/zig/util.vim b/autoload/zig/util.vim index 0c803802..baa2d32c 100644 --- a/autoload/zig/util.vim +++ b/autoload/zig/util.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'autoload/zig/util.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Adapted from vim-go: autoload/go/util.vim " @@ -397,5 +392,3 @@ function! zig#util#HasDebug(flag) endfunction " vim: sw=2 ts=2 et - -endif diff --git a/compiler/ant.vim b/compiler/ant.vim index 32470076..8d1b66fb 100644 --- a/compiler/ant.vim +++ b/compiler/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim Compiler File " Compiler: ant @@ -45,5 +40,3 @@ CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/bdf.vim b/compiler/bdf.vim index 2bf1c12f..097d6b00 100644 --- a/compiler/bdf.vim +++ b/compiler/bdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/bdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bdf') == -1 " Vim compiler file " Compiler: BDF to PCF Conversion @@ -29,5 +24,3 @@ setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/cake.vim b/compiler/cake.vim index d3ac35d3..993bf1cf 100644 --- a/compiler/cake.vim +++ b/compiler/cake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -22,5 +17,3 @@ call coffee#CoffeeSetUpVariables() exec 'CompilerSet makeprg=' . escape(g:coffee_cake . ' ' . \ g:coffee_cake_options . ' $*', ' ') call coffee#CoffeeSetUpErrorFormat() - -endif diff --git a/compiler/cargo.vim b/compiler/cargo.vim index c8719dc9..92569939 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cargo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim compiler file " Compiler: Cargo Compiler @@ -56,5 +51,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/coffee.vim b/compiler/coffee.vim index a9e1a6bf..c5dcce7f 100644 --- a/compiler/coffee.vim +++ b/compiler/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -89,5 +84,3 @@ augroup CoffeeUpdateMakePrg autocmd BufWritePre,BufFilePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/credo.vim b/compiler/credo.vim index 801e79d9..e39c6b7c 100644 --- a/compiler/credo.vim +++ b/compiler/credo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/credo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('current_compiler') finish @@ -18,5 +13,3 @@ endif CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,%f:%l:\ %t:\ %m CompilerSet makeprg=mix\ credo\ suggest\ --format=flycheck - -endif diff --git a/compiler/cryptol.vim b/compiler/cryptol.vim index 8cc53f38..062109ac 100644 --- a/compiler/cryptol.vim +++ b/compiler/cryptol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cryptol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cryptol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 " Vim compiler file " Compiler: Cryptol version 1.8.19-academic Compiler @@ -27,5 +22,3 @@ CompilerSet errorformat& " use the default 'errorformat' " "%<" means the current file name without extension. CompilerSet makeprg=cryptol\ -o\ %<\ % - -endif diff --git a/compiler/cs.vim b/compiler/cs.vim index 04a6938b..195887cf 100644 --- a/compiler/cs.vim +++ b/compiler/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim compiler file " Compiler: Microsoft Visual Studio C# @@ -33,5 +28,3 @@ CompilerSet makeprg=csc\ %:S let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/compiler/cucumber.vim b/compiler/cucumber.vim index 4a4eba7e..a41c0de4 100644 --- a/compiler/cucumber.vim +++ b/compiler/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim compiler file " Compiler: Cucumber @@ -36,5 +31,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/dot.vim b/compiler/dot.vim index e1fc35ed..5002e5ff 100644 --- a/compiler/dot.vim +++ b/compiler/dot.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/dot.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dot', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dot') == -1 " Vim compiler file " Compiler: ATT dot @@ -22,5 +17,3 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal endif CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" - -endif diff --git a/compiler/eruby.vim b/compiler/eruby.vim index b50b655a..dd006baa 100644 --- a/compiler/eruby.vim +++ b/compiler/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: eRuby @@ -46,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/exunit.vim b/compiler/exunit.vim index 97ea0341..2a52eff8 100644 --- a/compiler/exunit.vim +++ b/compiler/exunit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/exunit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("current_compiler") finish @@ -32,5 +27,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/fish.vim b/compiler/fish.vim index 6dfb84f9..1ae935f8 100644 --- a/compiler/fish.vim +++ b/compiler/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 if exists('current_compiler') finish @@ -14,5 +9,3 @@ let current_compiler = 'fish' CompilerSet makeprg=fish\ --no-execute\ % execute 'CompilerSet errorformat='.escape(fish#errorformat(), ' ') - -endif diff --git a/compiler/go.vim b/compiler/go.vim index 1d7b873e..fba6a94f 100644 --- a/compiler/go.vim +++ b/compiler/go.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/go.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " Copyright 2013 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -55,5 +50,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/compiler/gradle.vim b/compiler/gradle.vim index 5fdb164a..7790daac 100644 --- a/compiler/gradle.vim +++ b/compiler/gradle.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/gradle.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gradle', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 " Vim Compiler File " Compiler: gradle @@ -31,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/gradlew.vim b/compiler/gradlew.vim index 3cfd0e80..68f23d76 100644 --- a/compiler/gradlew.vim +++ b/compiler/gradlew.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/gradlew.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gradle', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 " Vim Compiler File " Compiler: gradlew @@ -31,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/haml.vim b/compiler/haml.vim index 415a579c..08a64bc5 100644 --- a/compiler/haml.vim +++ b/compiler/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim compiler file " Compiler: Haml @@ -35,5 +30,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/ledger.vim b/compiler/ledger.vim index 70b89925..e0220582 100644 --- a/compiler/ledger.vim +++ b/compiler/ledger.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ledger.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ledger', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 " Vim Compiler File " Compiler: ledger @@ -39,5 +34,3 @@ if !g:ledger_is_hledger else exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' endif - -endif diff --git a/compiler/lilypond.vim b/compiler/lilypond.vim index 2ae68a3b..cbe15bbb 100644 --- a/compiler/lilypond.vim +++ b/compiler/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond compiler file " Language: LilyPond @@ -26,5 +21,3 @@ setlocal makeprg=lilypond\ $* " (how to see multiple-line error messages?) setlocal errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m " - -endif diff --git a/compiler/ls.vim b/compiler/ls.vim index d177eaa3..69c6977f 100644 --- a/compiler/ls.vim +++ b/compiler/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " Maintainer: George Zahariev @@ -81,5 +76,3 @@ augroup LiveScriptUpdateMakePrg autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/mix.vim b/compiler/mix.vim index 9ba5216b..e9e781c5 100644 --- a/compiler/mix.vim +++ b/compiler/mix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/mix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('current_compiler') finish @@ -23,5 +18,3 @@ CompilerSet errorformat= \%E==\ Compilation\ error\ in\ file\ %f\ ==, \%C**\ (%\\w%\\+)\ %f:%l:\ %m,%Z - -endif diff --git a/compiler/nim.vim b/compiler/nim.vim index 1b8c21b1..e7ed6936 100644 --- a/compiler/nim.vim +++ b/compiler/nim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/nim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 if exists('current_compiler') finish @@ -32,5 +27,3 @@ unlet s:cpo_save let g:syntastic_nim_checkers = ['nim'] - -endif diff --git a/compiler/nix-build.vim b/compiler/nix-build.vim index 0eb5f694..89a2453b 100644 --- a/compiler/nix-build.vim +++ b/compiler/nix-build.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/nix-build.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 if exists('current_compiler') finish @@ -18,5 +13,3 @@ endif CompilerSet errorformat=error:\ %m\ at\ %f:%l:%c,builder\ for\ \'%m\'\ failed\ with\ exit\ code\ %n,fixed-output\ derivation\ produced\ path\ \'%s\'\ with\ %m CompilerSet makeprg=nix-build - -endif diff --git a/compiler/ocaml.vim b/compiler/ocaml.vim index a9170be5..92582d67 100644 --- a/compiler/ocaml.vim +++ b/compiler/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim Compiler File " Compiler: ocaml @@ -63,5 +58,3 @@ CompilerSet errorformat = let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/powershell.vim b/compiler/powershell.vim index 9cab203c..e4d5d410 100644 --- a/compiler/powershell.vim +++ b/compiler/powershell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/powershell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Compiler: powershell " Run ps1 scripts in powershell and process their output. Quickly jump through @@ -90,5 +85,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/python.vim b/compiler/python.vim index 1a82a1cd..670ebdb4 100644 --- a/compiler/python.vim +++ b/compiler/python.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/python.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python-compiler', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 " Vim compiler file " Compiler: Unit testing tool for Python @@ -74,5 +69,3 @@ else endif " vim:foldmethod=marker:foldlevel=0 - -endif diff --git a/compiler/rake.vim b/compiler/rake.vim index acd08a35..f8c3186c 100644 --- a/compiler/rake.vim +++ b/compiler/rake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Rake @@ -46,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rspec.vim b/compiler/rspec.vim index c3b4ea0e..c443c735 100644 --- a/compiler/rspec.vim +++ b/compiler/rspec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rspec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: RSpec @@ -42,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/ruby.vim b/compiler/ruby.vim index 8f0127c9..53dc0106 100644 --- a/compiler/ruby.vim +++ b/compiler/ruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Ruby @@ -51,5 +46,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rubyunit.vim b/compiler/rubyunit.vim index 417b49c3..eb6c3d8e 100644 --- a/compiler/rubyunit.vim +++ b/compiler/rubyunit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rubyunit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim compiler file " Language: Test::Unit - Ruby Unit Testing Framework @@ -42,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rustc.vim b/compiler/rustc.vim index f9953732..66827050 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/rustc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim compiler file " Compiler: Rust Compiler @@ -64,5 +59,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/sass.vim b/compiler/sass.vim index bf02fa84..5a1ee532 100644 --- a/compiler/sass.vim +++ b/compiler/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim compiler file " Compiler: Sass @@ -37,5 +32,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/sbt.vim b/compiler/sbt.vim index 7bb2b1f9..15f81ff3 100644 --- a/compiler/sbt.vim +++ b/compiler/sbt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/sbt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim compiler file " Language: Scala SBT (http://www.scala-sbt.org/) @@ -37,5 +32,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/compiler/swift.vim b/compiler/swift.vim index 441d7b2f..39dbe99a 100644 --- a/compiler/swift.vim +++ b/compiler/swift.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 " Vim compiler file " Compiler: Swift Compiler @@ -46,5 +41,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/tcl.vim b/compiler/tcl.vim index 184e17bb..c73d69d5 100644 --- a/compiler/tcl.vim +++ b/compiler/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim compiler file " Compiler: tcl @@ -24,5 +19,3 @@ endif CompilerSet makeprg=tcl CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# - -endif diff --git a/compiler/tex.vim b/compiler/tex.vim index 6d50eacd..7076d04a 100644 --- a/compiler/tex.vim +++ b/compiler/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " Vim compiler file " Compiler: TeX @@ -74,5 +69,3 @@ CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m, let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/compiler/tidy.vim b/compiler/tidy.vim index 380c8d88..7f7f12af 100644 --- a/compiler/tidy.vim +++ b/compiler/tidy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/tidy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tidy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tidy') == -1 " Vim compiler file " Compiler: HTML Tidy @@ -26,5 +21,3 @@ CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S " foo.html:8:1: Warning: inserting missing 'foobar' element " foo.html:9:2: Error: <foobar> is not recognized! CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%# - -endif diff --git a/compiler/typescript.vim b/compiler/typescript.vim index de3f1f0a..d004226c 100644 --- a/compiler/typescript.vim +++ b/compiler/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'compiler/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 if exists('current_compiler') finish @@ -28,5 +23,3 @@ endif let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %' CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m - -endif diff --git a/ctags/puppet.ctags b/ctags/puppet.ctags index 6aa9a13c..ba9ca180 100644 --- a/ctags/puppet.ctags +++ b/ctags/puppet.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 - --langdef=puppet --langmap=puppet:.pp --regex-puppet=/^[[:space:]]*class[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/\1/c,class/ @@ -12,5 +10,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 --regex-puppet=/([A-Z][a-zA-Z0-9_:]+)[[:space:]]*\{/\1/f,default/ --regex-puppet=/^[[:space:]]*type[[:space:]]*([A-Z][a-zA-Z0-9_:]*)[[:space:]]*=/\1/t,type/ --regex-puppet=/^[[:space:]]*function[[:space:]]*([a-zA-Z0-9_:]*)[[:space:]]*/\1/u,function/ - -endif diff --git a/ctags/puppet_u.ctags b/ctags/puppet_u.ctags index 9770cfd0..3a5d380e 100644 --- a/ctags/puppet_u.ctags +++ b/ctags/puppet_u.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 - --langdef=puppet --map-puppet=+.pp --regex-puppet=/^[[:space:]]*node[[:space:]]*[\'|\"]*([a-zA-Z0-9_\.\-]+)[\'|\"]*/\1/n,node/{scope=set} @@ -12,5 +10,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 --regex-puppet=/^[[:space:]]*site[[:space:]]*([a-zA-Z0-9_\-]+)/\1/s,site/ --regex-puppet=/^[[:space:]]*type[[:space:]]*([A-Z][a-zA-Z0-9_:]*)[[:space:]]*=/\1/t,type/ --regex-puppet=/^[[:space:]]*function[[:space:]]*([a-zA-Z0-9_:]*)[[:space:]]*/\1/u,function/ - -endif diff --git a/ctags/rust.ctags b/ctags/rust.ctags index 7971672f..d4f474e6 100644 --- a/ctags/rust.ctags +++ b/ctags/rust.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 - --langdef=Rust --langmap=Rust:.rs --regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ @@ -11,5 +9,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 --regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/ --regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\4 \6 \7/i,impls,trait implementations/ --regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ - -endif diff --git a/ctags/scala.ctags b/ctags/scala.ctags index b640767b..b7d31250 100644 --- a/ctags/scala.ctags +++ b/ctags/scala.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 - --langdef=scala --langmap=scala:.scala @@ -13,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|override|private[^ ]*|protected)[ \t]*)*val[ \t]+([a-zA-Z0-9_]+)/\3/V,values/ --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|override|private[^ ]*|protected)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/v,variables/ --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ - -endif diff --git a/ctags/typescript.ctags b/ctags/typescript.ctags index bd4b0e94..5c7eb9dc 100644 --- a/ctags/typescript.ctags +++ b/ctags/typescript.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 - --langdef=typescript --langmap=typescript:.ts --regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/ @@ -13,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static|readonly)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/ --regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/ --regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/ - -endif diff --git a/extras/flow.vim b/extras/flow.vim index 458067d4..69823efe 100644 --- a/extras/flow.vim +++ b/extras/flow.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'extras/flow.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 syntax region jsFlowDefinition contained start=/:/ end=/\%(\s*[,=;)\n]\)\@=/ contains=@jsFlowCluster containedin=jsParen syntax region jsFlowArgumentDef contained start=/:/ end=/\%(\s*[,)]\|=>\@!\)\@=/ contains=@jsFlowCluster @@ -116,5 +111,3 @@ if version >= 508 || !exists("did_javascript_syn_inits") HiLink jsFlowObjectFuncName jsObjectFuncName delcommand HiLink endif - -endif diff --git a/extras/jsdoc.vim b/extras/jsdoc.vim index 63b816aa..4a71cc66 100644 --- a/extras/jsdoc.vim +++ b/extras/jsdoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'extras/jsdoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 "" syntax coloring for javadoc comments (HTML) syntax region jsComment matchgroup=jsComment start="/\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold @@ -46,5 +41,3 @@ if version >= 508 || !exists("did_javascript_syn_inits") HiLink jsDocParam Label delcommand HiLink endif - -endif diff --git a/extras/ngdoc.vim b/extras/ngdoc.vim index 22a1a590..9936387b 100644 --- a/extras/ngdoc.vim +++ b/extras/ngdoc.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'extras/ngdoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 syntax match jsDocTags contained /@\(link\|method[oO]f\|ngdoc\|ng[iI]nject\|restrict\)/ nextgroup=jsDocParam skipwhite syntax match jsDocType contained "\%(#\|\$\|\w\|\"\|-\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite syntax match jsDocParam contained "\%(#\|\$\|\w\|\"\|-\|\.\|:\|{\|}\|\/\|\[\|]\|=\)\+" - -endif diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 2f85f2ff..d259dc27 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -26,21 +26,6 @@ let did_load_filetypes = 1 " Be consistent across different systems set nofileignorecase -let s:disabled_packages = {} -let s:new_polyglot_disabled = [] - -if exists('g:polyglot_disabled') - for pkg in g:polyglot_disabled - let base = split(pkg, '\.') - if len(base) > 0 - let s:disabled_packages[pkg] = 1 - call add(s:new_polyglot_disabled, base[0]) - endif - endfor -else - let g:polyglot_disabled_not_set = 1 -endif - function! s:SetDefault(name, value) if !exists(a:name) let {a:name} = a:value @@ -116,757 +101,757 @@ runtime! ftdetect/*.vim " DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE -if !has_key(s:disabled_packages, 'context') +if polyglot#util#IsEnabled('context', 'ftdetect') au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context endif -if !has_key(s:disabled_packages, 'xpm2') +if polyglot#util#IsEnabled('xpm2', 'ftdetect') au BufNewFile,BufRead *.xpm2 setf xpm2 endif -if !has_key(s:disabled_packages, 'xpm') +if polyglot#util#IsEnabled('xpm', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm() au BufNewFile,BufRead *.xpm setf xpm endif -if !has_key(s:disabled_packages, 'man') +if polyglot#util#IsEnabled('man', 'ftdetect') au BufNewFile,BufRead *.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc setf man endif -if !has_key(s:disabled_packages, 'xf86conf') +if polyglot#util#IsEnabled('xf86conf', 'ftdetect') 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') +if polyglot#util#IsEnabled('pullrequest', 'ftdetect') au BufNewFile,BufRead PULLREQ_EDITMSG setf pullrequest endif -if !has_key(s:disabled_packages, 'text') +if polyglot#util#IsEnabled('text', 'ftdetect') au BufNewFile,BufRead *.text,README setf text endif -if !has_key(s:disabled_packages, 'svn') +if polyglot#util#IsEnabled('svn', 'ftdetect') au BufNewFile,BufRead svn-commit*.tmp setf svn endif -if !has_key(s:disabled_packages, 'logcheck') +if polyglot#util#IsEnabled('logcheck', 'ftdetect') au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') endif -if !has_key(s:disabled_packages, 'fvwm') +if polyglot#util#IsEnabled('fvwm', 'ftdetect') au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') endif -if !has_key(s:disabled_packages, 'crontab') +if polyglot#util#IsEnabled('crontab', 'ftdetect') au BufNewFile,BufRead crontab setf crontab au BufNewFile,BufRead crontab.* call s:StarSetf('crontab') au BufNewFile,BufRead */etc/cron.d/* call s:StarSetf('crontab') endif -if !has_key(s:disabled_packages, 'bzr') +if polyglot#util#IsEnabled('bzr', 'ftdetect') au BufNewFile,BufRead bzr_log.* call s:StarSetf('bzr') endif -if !has_key(s:disabled_packages, 'asteriskvm') +if polyglot#util#IsEnabled('asteriskvm', 'ftdetect') au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') endif -if !has_key(s:disabled_packages, 'asterisk') +if polyglot#util#IsEnabled('asterisk', 'ftdetect') au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') endif -if !has_key(s:disabled_packages, 'apachestyle') +if polyglot#util#IsEnabled('apachestyle', 'ftdetect') au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') au BufNewFile,BufRead */etc/proftpd/conf.*/* call s:StarSetf('apachestyle') au BufNewFile,BufRead */etc/proftpd/*.conf* call s:StarSetf('apachestyle') endif -if !has_key(s:disabled_packages, 'z8a') +if polyglot#util#IsEnabled('z8a', 'ftdetect') au BufNewFile,BufRead *.z8a setf z8a endif -if !has_key(s:disabled_packages, 'zimbutempl') +if polyglot#util#IsEnabled('zimbutempl', 'ftdetect') au BufNewFile,BufRead *.zut setf zimbutempl endif -if !has_key(s:disabled_packages, 'zimbu') +if polyglot#util#IsEnabled('zimbu', 'ftdetect') au BufNewFile,BufRead *.zu setf zimbu endif -if !has_key(s:disabled_packages, 'yacc') +if polyglot#util#IsEnabled('yacc', 'ftdetect') au BufNewFile,BufRead *.y++,*.yxx,*.yy setf yacc endif -if !has_key(s:disabled_packages, 'xslt') +if polyglot#util#IsEnabled('xslt', 'ftdetect') au BufNewFile,BufRead *.xsl,*.xslt setf xslt endif -if !has_key(s:disabled_packages, 'xsd') +if polyglot#util#IsEnabled('xsd', 'ftdetect') au BufNewFile,BufRead *.xsd setf xsd endif -if !has_key(s:disabled_packages, 'xquery') +if polyglot#util#IsEnabled('xquery', 'ftdetect') au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery endif -if !has_key(s:disabled_packages, 'xmodmap') +if polyglot#util#IsEnabled('xmodmap', 'ftdetect') au BufNewFile,BufRead *Xmodmap setf xmodmap au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') endif -if !has_key(s:disabled_packages, 'xmath') +if polyglot#util#IsEnabled('xmath', 'ftdetect') au BufNewFile,BufRead *.msc,*.msf setf xmath endif -if !has_key(s:disabled_packages, 'xdefaults') +if polyglot#util#IsEnabled('xdefaults', 'ftdetect') au BufNewFile,BufRead *.ad,{.,}Xdefaults,{.,}Xpdefaults,{.,}Xresources,xdm-config setf xdefaults au BufNewFile,BufRead Xresources* call s:StarSetf('xdefaults') au BufNewFile,BufRead */app-defaults/* call s:StarSetf('xdefaults') au BufNewFile,BufRead */Xresources/* call s:StarSetf('xdefaults') endif -if !has_key(s:disabled_packages, 'xinetd') +if polyglot#util#IsEnabled('xinetd', 'ftdetect') au BufNewFile,BufRead */etc/xinetd.conf setf xinetd au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') endif -if !has_key(s:disabled_packages, 'xhtml') +if polyglot#util#IsEnabled('xhtml', 'ftdetect') au BufNewFile,BufRead *.xht,*.xhtml setf xhtml endif -if !has_key(s:disabled_packages, 'wsh') +if polyglot#util#IsEnabled('wsh', 'ftdetect') au BufNewFile,BufRead *.ws[fc] setf wsh endif -if !has_key(s:disabled_packages, 'cvs') +if polyglot#util#IsEnabled('cvs', 'ftdetect') au BufNewFile,BufRead cvs\d\+ setf cvs endif -if !has_key(s:disabled_packages, 'cvsrc') +if polyglot#util#IsEnabled('cvsrc', 'ftdetect') au BufNewFile,BufRead {.,}cvsrc setf cvsrc endif -if !has_key(s:disabled_packages, 'wvdial') +if polyglot#util#IsEnabled('wvdial', 'ftdetect') au BufNewFile,BufRead {.,}wvdialrc,wvdial.conf setf wvdial endif -if !has_key(s:disabled_packages, 'wsml') +if polyglot#util#IsEnabled('wsml', 'ftdetect') au BufNewFile,BufRead *.wsml setf wsml endif -if !has_key(s:disabled_packages, 'winbatch') +if polyglot#util#IsEnabled('winbatch', 'ftdetect') au BufNewFile,BufRead *.wbt setf winbatch endif -if !has_key(s:disabled_packages, 'wml') +if polyglot#util#IsEnabled('wml', 'ftdetect') au BufNewFile,BufRead *.wml setf wml endif -if !has_key(s:disabled_packages, 'wget') +if polyglot#util#IsEnabled('wget', 'ftdetect') au BufNewFile,BufRead {.,}wgetrc,wgetrc setf wget endif -if !has_key(s:disabled_packages, 'webmacro') +if polyglot#util#IsEnabled('webmacro', 'ftdetect') au BufNewFile,BufRead *.wm setf webmacro endif -if !has_key(s:disabled_packages, 'wast') +if polyglot#util#IsEnabled('wast', 'ftdetect') au BufNewFile,BufRead *.wast,*.wat setf wast endif -if !has_key(s:disabled_packages, 'vroom') +if polyglot#util#IsEnabled('vroom', 'ftdetect') au BufNewFile,BufRead *.vroom setf vroom endif -if !has_key(s:disabled_packages, 'vrml') +if polyglot#util#IsEnabled('vrml', 'ftdetect') au BufNewFile,BufRead *.wrl setf vrml endif -if !has_key(s:disabled_packages, 'vgrindefs') +if polyglot#util#IsEnabled('vgrindefs', 'ftdetect') au BufNewFile,BufRead vgrindefs setf vgrindefs endif -if !has_key(s:disabled_packages, 'viminfo') +if polyglot#util#IsEnabled('viminfo', 'ftdetect') au BufNewFile,BufRead {.,}viminfo,_viminfo setf viminfo endif -if !has_key(s:disabled_packages, 'vim') +if polyglot#util#IsEnabled('vim', 'ftdetect') au BufNewFile,BufRead *.vba,*.vim,{.,}exrc,_exrc setf vim au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') endif -if !has_key(s:disabled_packages, 'vhdl') +if polyglot#util#IsEnabled('vhdl', 'ftdetect') au BufNewFile,BufRead *.hdl,*.vbe,*.vhd,*.vhdl,*.vho,*.vst setf vhdl au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') endif -if !has_key(s:disabled_packages, 'systemverilog') +if polyglot#util#IsEnabled('systemverilog', 'ftdetect') au BufNewFile,BufRead *.sv,*.svh setf systemverilog endif -if !has_key(s:disabled_packages, 'verilogams') +if polyglot#util#IsEnabled('verilogams', 'ftdetect') au BufNewFile,BufRead *.va,*.vams setf verilogams endif -if !has_key(s:disabled_packages, 'verilog') +if polyglot#util#IsEnabled('verilog', 'ftdetect') au BufNewFile,BufRead *.v setf verilog endif -if !has_key(s:disabled_packages, 'vera') +if polyglot#util#IsEnabled('vera', 'ftdetect') au BufNewFile,BufRead *.vr,*.vrh,*.vri setf vera endif -if !has_key(s:disabled_packages, 'upstart') +if polyglot#util#IsEnabled('upstart', 'ftdetect') au BufNewFile,BufRead */.config/upstart/*.conf,*/.config/upstart/*.override,*/.init/*.conf,*/.init/*.override,*/etc/init/*.conf,*/etc/init/*.override,*/usr/share/upstart/*.conf,*/usr/share/upstart/*.override setf upstart endif -if !has_key(s:disabled_packages, 'updatedb') +if polyglot#util#IsEnabled('updatedb', 'ftdetect') au BufNewFile,BufRead */etc/updatedb.conf setf updatedb endif -if !has_key(s:disabled_packages, 'uc') +if polyglot#util#IsEnabled('uc', 'ftdetect') au BufNewFile,BufRead *.uc setf uc endif -if !has_key(s:disabled_packages, 'udevperm') +if polyglot#util#IsEnabled('udevperm', 'ftdetect') au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm endif -if !has_key(s:disabled_packages, 'udevconf') +if polyglot#util#IsEnabled('udevconf', 'ftdetect') au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf endif -if !has_key(s:disabled_packages, 'uil') +if polyglot#util#IsEnabled('uil', 'ftdetect') au BufNewFile,BufRead *.uil,*.uit setf uil endif -if !has_key(s:disabled_packages, 'tsscl') +if polyglot#util#IsEnabled('tsscl', 'ftdetect') au BufNewFile,BufRead *.tsscl setf tsscl endif -if !has_key(s:disabled_packages, 'tssop') +if polyglot#util#IsEnabled('tssop', 'ftdetect') au BufNewFile,BufRead *.tssop setf tssop endif -if !has_key(s:disabled_packages, 'tssgm') +if polyglot#util#IsEnabled('tssgm', 'ftdetect') au BufNewFile,BufRead *.tssgm setf tssgm endif -if !has_key(s:disabled_packages, 'trustees') +if polyglot#util#IsEnabled('trustees', 'ftdetect') au BufNewFile,BufRead trustees.conf setf trustees endif -if !has_key(s:disabled_packages, 'treetop') +if polyglot#util#IsEnabled('treetop', 'ftdetect') au BufNewFile,BufRead *.treetop setf treetop endif -if !has_key(s:disabled_packages, 'tpp') +if polyglot#util#IsEnabled('tpp', 'ftdetect') au BufNewFile,BufRead *.tpp setf tpp endif -if !has_key(s:disabled_packages, 'tidy') +if polyglot#util#IsEnabled('tidy', 'ftdetect') au BufNewFile,BufRead {.,}tidyrc,tidy.conf,tidyrc setf tidy endif -if !has_key(s:disabled_packages, 'texmf') +if polyglot#util#IsEnabled('texmf', 'ftdetect') au BufNewFile,BufRead texmf.cnf setf texmf endif -if !has_key(s:disabled_packages, 'texinfo') +if polyglot#util#IsEnabled('texinfo', 'ftdetect') au BufNewFile,BufRead *.texi,*.texinfo,*.txi setf texinfo endif -if !has_key(s:disabled_packages, 'tex') +if polyglot#util#IsEnabled('tex', 'ftdetect') au BufNewFile,BufRead *.bbl,*.dtx,*.latex,*.ltx,*.sty setf tex endif -if !has_key(s:disabled_packages, 'terminfo') +if polyglot#util#IsEnabled('terminfo', 'ftdetect') au BufNewFile,BufRead *.ti setf terminfo endif -if !has_key(s:disabled_packages, 'teraterm') +if polyglot#util#IsEnabled('teraterm', 'ftdetect') au BufNewFile,BufRead *.ttl setf teraterm endif -if !has_key(s:disabled_packages, 'tsalt') +if polyglot#util#IsEnabled('tsalt', 'ftdetect') au BufNewFile,BufRead *.slt setf tsalt endif -if !has_key(s:disabled_packages, 'tli') +if polyglot#util#IsEnabled('tli', 'ftdetect') au BufNewFile,BufRead *.tli setf tli endif -if !has_key(s:disabled_packages, 'tcl') +if polyglot#util#IsEnabled('tcl', 'ftdetect') au BufNewFile,BufRead *.itcl,*.itk,*.jacl,*.tcl,*.tk setf tcl endif -if !has_key(s:disabled_packages, 'taskedit') +if polyglot#util#IsEnabled('taskedit', 'ftdetect') au BufNewFile,BufRead *.task setf taskedit endif -if !has_key(s:disabled_packages, 'taskdata') +if polyglot#util#IsEnabled('taskdata', 'ftdetect') au BufNewFile,BufRead {pending,completed,undo}.data setf taskdata endif -if !has_key(s:disabled_packages, 'tak') +if polyglot#util#IsEnabled('tak', 'ftdetect') au BufNewFile,BufRead *.tak setf tak endif -if !has_key(s:disabled_packages, 'tags') +if polyglot#util#IsEnabled('tags', 'ftdetect') au BufNewFile,BufRead tags setf tags endif -if !has_key(s:disabled_packages, 'sudoers') +if polyglot#util#IsEnabled('sudoers', 'ftdetect') au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers endif -if !has_key(s:disabled_packages, 'sdc') +if polyglot#util#IsEnabled('sdc', 'ftdetect') au BufNewFile,BufRead *.sdc setf sdc endif -if !has_key(s:disabled_packages, 'sysctl') +if polyglot#util#IsEnabled('sysctl', 'ftdetect') au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl endif -if !has_key(s:disabled_packages, 'sil') +if polyglot#util#IsEnabled('sil', 'ftdetect') au BufNewFile,BufRead *.sil setf sil endif -if !has_key(s:disabled_packages, 'swiftgyb') +if polyglot#util#IsEnabled('swiftgyb', 'ftdetect') au BufNewFile,BufRead *.swift.gyb setf swiftgyb endif -if !has_key(s:disabled_packages, 'voscm') +if polyglot#util#IsEnabled('voscm', 'ftdetect') au BufNewFile,BufRead *.cm setf voscm endif -if !has_key(s:disabled_packages, 'sml') +if polyglot#util#IsEnabled('sml', 'ftdetect') au BufNewFile,BufRead *.sml setf sml endif -if !has_key(s:disabled_packages, 'stp') +if polyglot#util#IsEnabled('stp', 'ftdetect') au BufNewFile,BufRead *.stp setf stp endif -if !has_key(s:disabled_packages, 'smcl') +if polyglot#util#IsEnabled('smcl', 'ftdetect') au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl endif -if !has_key(s:disabled_packages, 'stata') +if polyglot#util#IsEnabled('stata', 'ftdetect') au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata endif -if !has_key(s:disabled_packages, 'sshdconfig') +if polyglot#util#IsEnabled('sshdconfig', 'ftdetect') au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf,sshd_config setf sshdconfig endif -if !has_key(s:disabled_packages, 'sshconfig') +if polyglot#util#IsEnabled('sshconfig', 'ftdetect') au BufNewFile,BufRead */.ssh/config,*/etc/ssh/ssh_config.d/*.conf,ssh_config setf sshconfig endif -if !has_key(s:disabled_packages, 'sqr') +if polyglot#util#IsEnabled('sqr', 'ftdetect') au BufNewFile,BufRead *.sqi,*.sqr setf sqr endif -if !has_key(s:disabled_packages, 'sqlj') +if polyglot#util#IsEnabled('sqlj', 'ftdetect') au BufNewFile,BufRead *.sqlj setf sqlj endif -if !has_key(s:disabled_packages, 'squid') +if polyglot#util#IsEnabled('squid', 'ftdetect') au BufNewFile,BufRead squid.conf setf squid endif -if !has_key(s:disabled_packages, 'spice') +if polyglot#util#IsEnabled('spice', 'ftdetect') au BufNewFile,BufRead *.sp,*.spice setf spice endif -if !has_key(s:disabled_packages, 'slice') +if polyglot#util#IsEnabled('slice', 'ftdetect') au BufNewFile,BufRead *.ice setf slice endif -if !has_key(s:disabled_packages, 'spup') +if polyglot#util#IsEnabled('spup', 'ftdetect') au BufNewFile,BufRead *.spd,*.spdata,*.speedup setf spup endif -if !has_key(s:disabled_packages, 'hog') +if polyglot#util#IsEnabled('hog', 'ftdetect') au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog endif -if !has_key(s:disabled_packages, 'mib') +if polyglot#util#IsEnabled('mib', 'ftdetect') au BufNewFile,BufRead *.mib,*.my setf mib endif -if !has_key(s:disabled_packages, 'snobol4') +if polyglot#util#IsEnabled('snobol4', 'ftdetect') au BufNewFile,BufRead *.sno,*.spt setf snobol4 endif -if !has_key(s:disabled_packages, 'smith') +if polyglot#util#IsEnabled('smith', 'ftdetect') au BufNewFile,BufRead *.smith,*.smt setf smith endif -if !has_key(s:disabled_packages, 'st') +if polyglot#util#IsEnabled('st', 'ftdetect') au BufNewFile,BufRead *.st setf st endif -if !has_key(s:disabled_packages, 'slrnsc') +if polyglot#util#IsEnabled('slrnsc', 'ftdetect') au BufNewFile,BufRead *.score setf slrnsc endif -if !has_key(s:disabled_packages, 'slrnrc') +if polyglot#util#IsEnabled('slrnrc', 'ftdetect') au BufNewFile,BufRead {.,}slrnrc setf slrnrc endif -if !has_key(s:disabled_packages, 'skill') +if polyglot#util#IsEnabled('skill', 'ftdetect') au BufNewFile,BufRead *.cdf,*.il,*.ils setf skill endif -if !has_key(s:disabled_packages, 'sisu') +if polyglot#util#IsEnabled('sisu', 'ftdetect') au BufNewFile,BufRead *.-sst,*.-sst.meta,*._sst,*._sst.meta,*.ssi,*.ssm,*.sst,*.sst.meta setf sisu endif -if !has_key(s:disabled_packages, 'sinda') +if polyglot#util#IsEnabled('sinda', 'ftdetect') au BufNewFile,BufRead *.s85,*.sin setf sinda endif -if !has_key(s:disabled_packages, 'simula') +if polyglot#util#IsEnabled('simula', 'ftdetect') au BufNewFile,BufRead *.sim setf simula endif -if !has_key(s:disabled_packages, 'screen') +if polyglot#util#IsEnabled('screen', 'ftdetect') au BufNewFile,BufRead {.,}screenrc,screenrc setf screen endif -if !has_key(s:disabled_packages, 'scheme') +if polyglot#util#IsEnabled('scheme', 'ftdetect') au BufNewFile,BufRead *.rkt,*.scm,*.ss setf scheme endif -if !has_key(s:disabled_packages, 'catalog') +if polyglot#util#IsEnabled('catalog', 'ftdetect') au BufNewFile,BufRead catalog setf catalog au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') endif -if !has_key(s:disabled_packages, 'setserial') +if polyglot#util#IsEnabled('setserial', 'ftdetect') au BufNewFile,BufRead */etc/serial.conf setf setserial endif -if !has_key(s:disabled_packages, 'slpspi') +if polyglot#util#IsEnabled('slpspi', 'ftdetect') au BufNewFile,BufRead */etc/slp.spi setf slpspi endif -if !has_key(s:disabled_packages, 'spyce') +if polyglot#util#IsEnabled('spyce', 'ftdetect') au BufNewFile,BufRead *.spi,*.spy setf spyce endif -if !has_key(s:disabled_packages, 'slpreg') +if polyglot#util#IsEnabled('slpreg', 'ftdetect') au BufNewFile,BufRead */etc/slp.reg setf slpreg endif -if !has_key(s:disabled_packages, 'slpconf') +if polyglot#util#IsEnabled('slpconf', 'ftdetect') au BufNewFile,BufRead */etc/slp.conf setf slpconf endif -if !has_key(s:disabled_packages, 'services') +if polyglot#util#IsEnabled('services', 'ftdetect') au BufNewFile,BufRead */etc/services setf services endif -if !has_key(s:disabled_packages, 'sm') +if polyglot#util#IsEnabled('sm', 'ftdetect') au BufNewFile,BufRead sendmail.cf setf sm endif -if !has_key(s:disabled_packages, 'sieve') +if polyglot#util#IsEnabled('sieve', 'ftdetect') au BufNewFile,BufRead *.sieve,*.siv setf sieve endif -if !has_key(s:disabled_packages, 'sdl') +if polyglot#util#IsEnabled('sdl', 'ftdetect') au BufNewFile,BufRead *.pr,*.sdl setf sdl endif -if !has_key(s:disabled_packages, 'sd') +if polyglot#util#IsEnabled('sd', 'ftdetect') au BufNewFile,BufRead *.sd setf sd endif -if !has_key(s:disabled_packages, 'scilab') +if polyglot#util#IsEnabled('scilab', 'ftdetect') au BufNewFile,BufRead *.sce,*.sci setf scilab endif -if !has_key(s:disabled_packages, 'sbt') +if polyglot#util#IsEnabled('sbt', 'ftdetect') au BufNewFile,BufRead *.sbt setf sbt endif -if !has_key(s:disabled_packages, 'sather') +if polyglot#util#IsEnabled('sather', 'ftdetect') au BufNewFile,BufRead *.sa setf sather endif -if !has_key(s:disabled_packages, 'sass') +if polyglot#util#IsEnabled('sass', 'ftdetect') au BufNewFile,BufRead *.sass setf sass endif -if !has_key(s:disabled_packages, 'sas') +if polyglot#util#IsEnabled('sas', 'ftdetect') au BufNewFile,BufRead *.sas setf sas endif -if !has_key(s:disabled_packages, 'samba') +if polyglot#util#IsEnabled('samba', 'ftdetect') au BufNewFile,BufRead smb.conf setf samba endif -if !has_key(s:disabled_packages, 'slang') +if polyglot#util#IsEnabled('slang', 'ftdetect') au BufNewFile,BufRead *.sl setf slang endif -if !has_key(s:disabled_packages, 'rtf') +if polyglot#util#IsEnabled('rtf', 'ftdetect') au BufNewFile,BufRead *.rtf setf rtf endif -if !has_key(s:disabled_packages, 'rpcgen') +if polyglot#util#IsEnabled('rpcgen', 'ftdetect') au BufNewFile,BufRead *.x setf rpcgen endif -if !has_key(s:disabled_packages, 'robots') +if polyglot#util#IsEnabled('robots', 'ftdetect') au BufNewFile,BufRead robots.txt setf robots endif -if !has_key(s:disabled_packages, 'rpl') +if polyglot#util#IsEnabled('rpl', 'ftdetect') au BufNewFile,BufRead *.rpl setf rpl endif -if !has_key(s:disabled_packages, 'rng') +if polyglot#util#IsEnabled('rng', 'ftdetect') au BufNewFile,BufRead *.rng setf rng endif -if !has_key(s:disabled_packages, 'rnc') +if polyglot#util#IsEnabled('rnc', 'ftdetect') au BufNewFile,BufRead *.rnc setf rnc endif -if !has_key(s:disabled_packages, 'resolv') +if polyglot#util#IsEnabled('resolv', 'ftdetect') au BufNewFile,BufRead resolv.conf setf resolv endif -if !has_key(s:disabled_packages, 'remind') +if polyglot#util#IsEnabled('remind', 'ftdetect') au BufNewFile,BufRead *.rem,*.remind,{.,}reminders setf remind au BufNewFile,BufRead .reminders* call s:StarSetf('remind') endif -if !has_key(s:disabled_packages, 'rrst') +if polyglot#util#IsEnabled('rrst', 'ftdetect') au BufNewFile,BufRead *.rrst,*.srst setf rrst endif -if !has_key(s:disabled_packages, 'rmd') +if polyglot#util#IsEnabled('rmd', 'ftdetect') au BufNewFile,BufRead *.rmd,*.smd setf rmd endif -if !has_key(s:disabled_packages, 'rnoweb') +if polyglot#util#IsEnabled('rnoweb', 'ftdetect') au BufNewFile,BufRead *.rnw,*.snw setf rnoweb endif -if !has_key(s:disabled_packages, 'rexx') +if polyglot#util#IsEnabled('rexx', 'ftdetect') au BufNewFile,BufRead *.jrexx,*.orx,*.rex,*.rexx,*.rexxj,*.rxj,*.rxo,*.testGroup,*.testUnit setf rexx endif -if !has_key(s:disabled_packages, 'rego') +if polyglot#util#IsEnabled('rego', 'ftdetect') au BufNewFile,BufRead *.rego setf rego endif -if !has_key(s:disabled_packages, 'rib') +if polyglot#util#IsEnabled('rib', 'ftdetect') au BufNewFile,BufRead *.rib setf rib endif -if !has_key(s:disabled_packages, 'readline') +if polyglot#util#IsEnabled('readline', 'ftdetect') au BufNewFile,BufRead {.,}inputrc,inputrc setf readline endif -if !has_key(s:disabled_packages, 'rcs') +if polyglot#util#IsEnabled('rcs', 'ftdetect') au BufNewFile,BufRead *\,v setf rcs endif -if !has_key(s:disabled_packages, 'ratpoison') +if polyglot#util#IsEnabled('ratpoison', 'ftdetect') au BufNewFile,BufRead {.,}ratpoisonrc,ratpoisonrc setf ratpoison endif -if !has_key(s:disabled_packages, 'radiance') +if polyglot#util#IsEnabled('radiance', 'ftdetect') au BufNewFile,BufRead *.mat,*.rad setf radiance endif -if !has_key(s:disabled_packages, 'pyrex') +if polyglot#util#IsEnabled('pyrex', 'ftdetect') au BufNewFile,BufRead *.pxd,*.pyx setf pyrex endif -if !has_key(s:disabled_packages, 'protocols') +if polyglot#util#IsEnabled('protocols', 'ftdetect') au BufNewFile,BufRead */etc/protocols setf protocols endif -if !has_key(s:disabled_packages, 'promela') +if polyglot#util#IsEnabled('promela', 'ftdetect') au BufNewFile,BufRead *.pml setf promela endif -if !has_key(s:disabled_packages, 'psf') +if polyglot#util#IsEnabled('psf', 'ftdetect') au BufNewFile,BufRead *.psf setf psf endif -if !has_key(s:disabled_packages, 'procmail') +if polyglot#util#IsEnabled('procmail', 'ftdetect') au BufNewFile,BufRead {.,}procmail,{.,}procmailrc setf procmail endif -if !has_key(s:disabled_packages, 'privoxy') +if polyglot#util#IsEnabled('privoxy', 'ftdetect') au BufNewFile,BufRead *.action setf privoxy endif -if !has_key(s:disabled_packages, 'proc') +if polyglot#util#IsEnabled('proc', 'ftdetect') au BufNewFile,BufRead *.pc setf proc endif -if !has_key(s:disabled_packages, 'obj') +if polyglot#util#IsEnabled('obj', 'ftdetect') au BufNewFile,BufRead *.obj setf obj endif -if !has_key(s:disabled_packages, 'ppwiz') +if polyglot#util#IsEnabled('ppwiz', 'ftdetect') au BufNewFile,BufRead *.ih,*.it setf ppwiz endif -if !has_key(s:disabled_packages, 'pccts') +if polyglot#util#IsEnabled('pccts', 'ftdetect') au BufNewFile,BufRead *.g setf pccts endif -if !has_key(s:disabled_packages, 'povini') +if polyglot#util#IsEnabled('povini', 'ftdetect') au BufNewFile,BufRead {.,}povrayrc setf povini endif -if !has_key(s:disabled_packages, 'pov') +if polyglot#util#IsEnabled('pov', 'ftdetect') au BufNewFile,BufRead *.pov setf pov endif -if !has_key(s:disabled_packages, 'ppd') +if polyglot#util#IsEnabled('ppd', 'ftdetect') au BufNewFile,BufRead *.ppd setf ppd endif -if !has_key(s:disabled_packages, 'postscr') +if polyglot#util#IsEnabled('postscr', 'ftdetect') au BufNewFile,BufRead *.afm,*.ai,*.eps,*.epsf,*.epsi,*.pfa,*.ps setf postscr endif -if !has_key(s:disabled_packages, 'pfmain') +if polyglot#util#IsEnabled('pfmain', 'ftdetect') au BufNewFile,BufRead main.cf setf pfmain endif -if !has_key(s:disabled_packages, 'po') +if polyglot#util#IsEnabled('po', 'ftdetect') au BufNewFile,BufRead *.po,*.pot setf po endif -if !has_key(s:disabled_packages, 'plp') +if polyglot#util#IsEnabled('plp', 'ftdetect') au BufNewFile,BufRead *.plp setf plp endif -if !has_key(s:disabled_packages, 'plsql') +if polyglot#util#IsEnabled('plsql', 'ftdetect') au BufNewFile,BufRead *.pls,*.plsql setf plsql endif -if !has_key(s:disabled_packages, 'plm') +if polyglot#util#IsEnabled('plm', 'ftdetect') au BufNewFile,BufRead *.p36,*.pac,*.plm setf plm endif -if !has_key(s:disabled_packages, 'pli') +if polyglot#util#IsEnabled('pli', 'ftdetect') au BufNewFile,BufRead *.pl1,*.pli setf pli endif -if !has_key(s:disabled_packages, 'pine') +if polyglot#util#IsEnabled('pine', 'ftdetect') au BufNewFile,BufRead {.,}pinerc,{.,}pinercex,pinerc,pinercex setf pine endif -if !has_key(s:disabled_packages, 'pilrc') +if polyglot#util#IsEnabled('pilrc', 'ftdetect') au BufNewFile,BufRead *.rcp setf pilrc endif -if !has_key(s:disabled_packages, 'pinfo') +if polyglot#util#IsEnabled('pinfo', 'ftdetect') au BufNewFile,BufRead */.pinforc,*/etc/pinforc setf pinfo endif -if !has_key(s:disabled_packages, 'cmod') +if polyglot#util#IsEnabled('cmod', 'ftdetect') au BufNewFile,BufRead *.cmod setf cmod endif -if !has_key(s:disabled_packages, 'pike') +if polyglot#util#IsEnabled('pike', 'ftdetect') au BufNewFile,BufRead *.pike,*.pmod setf pike endif -if !has_key(s:disabled_packages, 'pcmk') +if polyglot#util#IsEnabled('pcmk', 'ftdetect') au BufNewFile,BufRead *.pcmk setf pcmk endif -if !has_key(s:disabled_packages, 'pdf') +if polyglot#util#IsEnabled('pdf', 'ftdetect') au BufNewFile,BufRead *.pdf setf pdf endif -if !has_key(s:disabled_packages, 'pascal') +if polyglot#util#IsEnabled('pascal', 'ftdetect') au BufNewFile,BufRead *.dpr,*.lpr,*.pas,*.pp setf pascal endif -if !has_key(s:disabled_packages, 'passwd') +if polyglot#util#IsEnabled('passwd', 'ftdetect') au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd endif -if !has_key(s:disabled_packages, 'papp') +if polyglot#util#IsEnabled('papp', 'ftdetect') au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp endif -if !has_key(s:disabled_packages, 'pamenv') +if polyglot#util#IsEnabled('pamenv', 'ftdetect') au BufNewFile,BufRead {.,}pam_environment,pam_env.conf setf pamenv endif -if !has_key(s:disabled_packages, 'pamconf') +if polyglot#util#IsEnabled('pamconf', 'ftdetect') au BufNewFile,BufRead */etc/pam.conf setf pamconf au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') endif -if !has_key(s:disabled_packages, 'pf') +if polyglot#util#IsEnabled('pf', 'ftdetect') au BufNewFile,BufRead pf.conf setf pf endif -if !has_key(s:disabled_packages, 'ora') +if polyglot#util#IsEnabled('ora', 'ftdetect') au BufNewFile,BufRead *.ora setf ora endif -if !has_key(s:disabled_packages, 'opl') +if polyglot#util#IsEnabled('opl', 'ftdetect') au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl endif -if !has_key(s:disabled_packages, 'openroad') +if polyglot#util#IsEnabled('openroad', 'ftdetect') au BufNewFile,BufRead *.or setf openroad endif -if !has_key(s:disabled_packages, 'omnimark') +if polyglot#util#IsEnabled('omnimark', 'ftdetect') au BufNewFile,BufRead *.xin,*.xom setf omnimark endif -if !has_key(s:disabled_packages, 'occam') +if polyglot#util#IsEnabled('occam', 'ftdetect') au BufNewFile,BufRead *.occ setf occam endif -if !has_key(s:disabled_packages, 'nsis') +if polyglot#util#IsEnabled('nsis', 'ftdetect') au BufNewFile,BufRead *.nsh,*.nsi setf nsis endif -if !has_key(s:disabled_packages, 'nqc') +if polyglot#util#IsEnabled('nqc', 'ftdetect') au BufNewFile,BufRead *.nqc setf nqc endif -if !has_key(s:disabled_packages, 'nroff') +if polyglot#util#IsEnabled('nroff', 'ftdetect') au BufNewFile,BufRead *.mom,*.nr,*.roff,*.tmac,*.tr setf nroff au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') endif -if !has_key(s:disabled_packages, 'ncf') +if polyglot#util#IsEnabled('ncf', 'ftdetect') au BufNewFile,BufRead *.ncf setf ncf endif -if !has_key(s:disabled_packages, 'ninja') +if polyglot#util#IsEnabled('ninja', 'ftdetect') au BufNewFile,BufRead *.ninja setf ninja endif -if !has_key(s:disabled_packages, 'netrc') +if polyglot#util#IsEnabled('netrc', 'ftdetect') au BufNewFile,BufRead {.,}netrc setf netrc endif -if !has_key(s:disabled_packages, 'neomuttrc') +if polyglot#util#IsEnabled('neomuttrc', 'ftdetect') au BufNewFile,BufRead Neomuttrc setf neomuttrc au BufNewFile,BufRead neomuttrc* call s:StarSetf('neomuttrc') au BufNewFile,BufRead Neomuttrc* call s:StarSetf('neomuttrc') @@ -874,27 +859,27 @@ if !has_key(s:disabled_packages, 'neomuttrc') au BufNewFile,BufRead */.neomutt/neomuttrc* call s:StarSetf('neomuttrc') endif -if !has_key(s:disabled_packages, 'natural') +if polyglot#util#IsEnabled('natural', 'ftdetect') au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural endif -if !has_key(s:disabled_packages, 'nanorc') +if polyglot#util#IsEnabled('nanorc', 'ftdetect') au BufNewFile,BufRead *.nanorc,*/etc/nanorc setf nanorc endif -if !has_key(s:disabled_packages, 'n1ql') +if polyglot#util#IsEnabled('n1ql', 'ftdetect') au BufNewFile,BufRead *.n1ql,*.nql setf n1ql endif -if !has_key(s:disabled_packages, 'mush') +if polyglot#util#IsEnabled('mush', 'ftdetect') au BufNewFile,BufRead *.mush setf mush endif -if !has_key(s:disabled_packages, 'mupad') +if polyglot#util#IsEnabled('mupad', 'ftdetect') au BufNewFile,BufRead *.mu setf mupad endif -if !has_key(s:disabled_packages, 'muttrc') +if polyglot#util#IsEnabled('muttrc', 'ftdetect') 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') @@ -903,1006 +888,1006 @@ if !has_key(s:disabled_packages, 'muttrc') au BufNewFile,BufRead */.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') endif -if !has_key(s:disabled_packages, 'msql') +if polyglot#util#IsEnabled('msql', 'ftdetect') au BufNewFile,BufRead *.msql setf msql endif -if !has_key(s:disabled_packages, 'mrxvtrc') +if polyglot#util#IsEnabled('mrxvtrc', 'ftdetect') au BufNewFile,BufRead {.,}mrxvtrc,mrxvtrc setf mrxvtrc endif -if !has_key(s:disabled_packages, 'srec') +if polyglot#util#IsEnabled('srec', 'ftdetect') au BufNewFile,BufRead *.mot,*.s19,*.s28,*.s37,*.srec setf srec endif -if !has_key(s:disabled_packages, 'mplayerconf') +if polyglot#util#IsEnabled('mplayerconf', 'ftdetect') au BufNewFile,BufRead */.mplayer/config,mplayer.conf setf mplayerconf endif -if !has_key(s:disabled_packages, 'modconf') +if polyglot#util#IsEnabled('modconf', 'ftdetect') au BufNewFile,BufRead */etc/conf.modules,*/etc/modules,*/etc/modules.conf setf modconf au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') endif -if !has_key(s:disabled_packages, 'moo') +if polyglot#util#IsEnabled('moo', 'ftdetect') au BufNewFile,BufRead *.moo setf moo endif -if !has_key(s:disabled_packages, 'monk') +if polyglot#util#IsEnabled('monk', 'ftdetect') au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk endif -if !has_key(s:disabled_packages, 'modula3') +if polyglot#util#IsEnabled('modula3', 'ftdetect') au BufNewFile,BufRead *.[mi][3g] setf modula3 endif -if !has_key(s:disabled_packages, 'modula2') +if polyglot#util#IsEnabled('modula2', 'ftdetect') au BufNewFile,BufRead *.DEF,*.MOD,*.m2,*.mi setf modula2 endif -if !has_key(s:disabled_packages, 'mmp') +if polyglot#util#IsEnabled('mmp', 'ftdetect') au BufNewFile,BufRead *.mmp setf mmp endif -if !has_key(s:disabled_packages, 'mix') +if polyglot#util#IsEnabled('mix', 'ftdetect') au BufNewFile,BufRead *.mix,*.mixal setf mix endif -if !has_key(s:disabled_packages, 'mgl') +if polyglot#util#IsEnabled('mgl', 'ftdetect') au BufNewFile,BufRead *.mgl setf mgl endif -if !has_key(s:disabled_packages, 'mp') +if polyglot#util#IsEnabled('mp', 'ftdetect') au BufNewFile,BufRead *.mp setf mp endif -if !has_key(s:disabled_packages, 'mf') +if polyglot#util#IsEnabled('mf', 'ftdetect') au BufNewFile,BufRead *.mf setf mf endif -if !has_key(s:disabled_packages, 'messages') +if polyglot#util#IsEnabled('messages', 'ftdetect') au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages endif -if !has_key(s:disabled_packages, 'hgcommit') +if polyglot#util#IsEnabled('hgcommit', 'ftdetect') au BufNewFile,BufRead hg-editor-*.txt setf hgcommit endif -if !has_key(s:disabled_packages, 'mel') +if polyglot#util#IsEnabled('mel', 'ftdetect') au BufNewFile,BufRead *.mel setf mel endif -if !has_key(s:disabled_packages, 'map') +if polyglot#util#IsEnabled('map', 'ftdetect') au BufNewFile,BufRead *.map setf map endif -if !has_key(s:disabled_packages, 'maple') +if polyglot#util#IsEnabled('maple', 'ftdetect') au BufNewFile,BufRead *.mpl,*.mv,*.mws setf maple endif -if !has_key(s:disabled_packages, 'manconf') +if polyglot#util#IsEnabled('manconf', 'ftdetect') au BufNewFile,BufRead */etc/man.conf,man.config setf manconf endif -if !has_key(s:disabled_packages, 'mallard') +if polyglot#util#IsEnabled('mallard', 'ftdetect') au BufNewFile,BufRead *.page setf mallard endif -if !has_key(s:disabled_packages, 'ist') +if polyglot#util#IsEnabled('ist', 'ftdetect') au BufNewFile,BufRead *.ist,*.mst setf ist endif -if !has_key(s:disabled_packages, 'mailcap') +if polyglot#util#IsEnabled('mailcap', 'ftdetect') au BufNewFile,BufRead {.,}mailcap,mailcap setf mailcap endif -if !has_key(s:disabled_packages, 'mailaliases') +if polyglot#util#IsEnabled('mailaliases', 'ftdetect') au BufNewFile,BufRead */etc/aliases,*/etc/mail/aliases setf mailaliases endif -if !has_key(s:disabled_packages, 'mail') +if polyglot#util#IsEnabled('mail', 'ftdetect') au BufNewFile,BufRead *.eml,{.,}article,{.,}article.\d\+,{.,}followup,{.,}letter,{.,}letter.\d\+,/tmp/SLRN[0-9A-Z.]\+,ae\d\+.txt,mutt[[:alnum:]_-]\\\{6\},mutt{ng,}-*-\w\+,neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},pico.\d\+,snd.\d\+,{neo,}mutt[[:alnum:]._-]\\\{6\} setf mail au BufNewFile,BufRead reportbug-* call s:StarSetf('mail') endif -if !has_key(s:disabled_packages, 'mgp') +if polyglot#util#IsEnabled('mgp', 'ftdetect') au BufNewFile,BufRead *.mgp setf mgp endif -if !has_key(s:disabled_packages, 'lss') +if polyglot#util#IsEnabled('lss', 'ftdetect') au BufNewFile,BufRead *.lss setf lss endif -if !has_key(s:disabled_packages, 'lsl') +if polyglot#util#IsEnabled('lsl', 'ftdetect') au BufNewFile,BufRead *.lsl setf lsl endif -if !has_key(s:disabled_packages, 'lout') +if polyglot#util#IsEnabled('lout', 'ftdetect') au BufNewFile,BufRead *.lou,*.lout setf lout endif -if !has_key(s:disabled_packages, 'lotos') +if polyglot#util#IsEnabled('lotos', 'ftdetect') au BufNewFile,BufRead *.lot,*.lotos setf lotos endif -if !has_key(s:disabled_packages, 'logtalk') +if polyglot#util#IsEnabled('logtalk', 'ftdetect') au BufNewFile,BufRead *.lgt setf logtalk endif -if !has_key(s:disabled_packages, 'logindefs') +if polyglot#util#IsEnabled('logindefs', 'ftdetect') au BufNewFile,BufRead */etc/login.defs setf logindefs endif -if !has_key(s:disabled_packages, 'loginaccess') +if polyglot#util#IsEnabled('loginaccess', 'ftdetect') au BufNewFile,BufRead */etc/login.access setf loginaccess endif -if !has_key(s:disabled_packages, 'litestep') +if polyglot#util#IsEnabled('litestep', 'ftdetect') au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep endif -if !has_key(s:disabled_packages, 'lite') +if polyglot#util#IsEnabled('lite', 'ftdetect') au BufNewFile,BufRead *.lite,*.lt setf lite endif -if !has_key(s:disabled_packages, 'liquid') +if polyglot#util#IsEnabled('liquid', 'ftdetect') au BufNewFile,BufRead *.liquid setf liquid endif -if !has_key(s:disabled_packages, 'lisp') +if polyglot#util#IsEnabled('lisp', 'ftdetect') au BufNewFile,BufRead *.cl,*.el,*.lisp,*.lsp,{.,}emacs,{.,}sawfishrc,{.,}sbclrc,sbclrc setf lisp endif -if !has_key(s:disabled_packages, 'lilo') +if polyglot#util#IsEnabled('lilo', 'ftdetect') au BufNewFile,BufRead lilo.conf setf lilo au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') endif -if !has_key(s:disabled_packages, 'lifelines') +if polyglot#util#IsEnabled('lifelines', 'ftdetect') au BufNewFile,BufRead *.ll setf lifelines endif -if !has_key(s:disabled_packages, 'lftp') +if polyglot#util#IsEnabled('lftp', 'ftdetect') au BufNewFile,BufRead *lftp/rc,{.,}lftprc,lftp.conf setf lftp endif -if !has_key(s:disabled_packages, 'sensors') +if polyglot#util#IsEnabled('sensors', 'ftdetect') au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors endif -if !has_key(s:disabled_packages, 'libao') +if polyglot#util#IsEnabled('libao', 'ftdetect') au BufNewFile,BufRead */.libao,*/etc/libao.conf setf libao endif -if !has_key(s:disabled_packages, 'lex') +if polyglot#util#IsEnabled('lex', 'ftdetect') au BufNewFile,BufRead *.l,*.l++,*.lex,*.lxx setf lex endif -if !has_key(s:disabled_packages, 'ld') +if polyglot#util#IsEnabled('ld', 'ftdetect') au BufNewFile,BufRead *.ld setf ld endif -if !has_key(s:disabled_packages, 'ldif') +if polyglot#util#IsEnabled('ldif', 'ftdetect') au BufNewFile,BufRead *.ldif setf ldif endif -if !has_key(s:disabled_packages, 'lprolog') +if polyglot#util#IsEnabled('lprolog', 'ftdetect') au BufNewFile,BufRead *.sig setf lprolog endif -if !has_key(s:disabled_packages, 'limits') +if polyglot#util#IsEnabled('limits', 'ftdetect') au BufNewFile,BufRead */etc/*limits.conf,*/etc/*limits.d/*.conf,*/etc/limits setf limits endif -if !has_key(s:disabled_packages, 'latte') +if polyglot#util#IsEnabled('latte', 'ftdetect') au BufNewFile,BufRead *.latte,*.lte setf latte endif -if !has_key(s:disabled_packages, 'lace') +if polyglot#util#IsEnabled('lace', 'ftdetect') au BufNewFile,BufRead *.ACE,*.ace setf lace endif -if !has_key(s:disabled_packages, 'kconfig') +if polyglot#util#IsEnabled('kconfig', 'ftdetect') au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') endif -if !has_key(s:disabled_packages, 'kscript') +if polyglot#util#IsEnabled('kscript', 'ftdetect') au BufNewFile,BufRead *.ks setf kscript endif -if !has_key(s:disabled_packages, 'kivy') +if polyglot#util#IsEnabled('kivy', 'ftdetect') au BufNewFile,BufRead *.kv setf kivy endif -if !has_key(s:disabled_packages, 'kwt') +if polyglot#util#IsEnabled('kwt', 'ftdetect') au BufNewFile,BufRead *.k setf kwt endif -if !has_key(s:disabled_packages, 'kix') +if polyglot#util#IsEnabled('kix', 'ftdetect') au BufNewFile,BufRead *.kix setf kix endif -if !has_key(s:disabled_packages, 'jovial') +if polyglot#util#IsEnabled('jovial', 'ftdetect') au BufNewFile,BufRead *.j73,*.jov,*.jovial setf jovial endif -if !has_key(s:disabled_packages, 'jgraph') +if polyglot#util#IsEnabled('jgraph', 'ftdetect') au BufNewFile,BufRead *.jgr setf jgraph endif -if !has_key(s:disabled_packages, 'jess') +if polyglot#util#IsEnabled('jess', 'ftdetect') au BufNewFile,BufRead *.clp setf jess endif -if !has_key(s:disabled_packages, 'jproperties') +if polyglot#util#IsEnabled('jproperties', 'ftdetect') au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') endif -if !has_key(s:disabled_packages, 'jsp') +if polyglot#util#IsEnabled('jsp', 'ftdetect') au BufNewFile,BufRead *.jsp setf jsp endif -if !has_key(s:disabled_packages, 'javacc') +if polyglot#util#IsEnabled('javacc', 'ftdetect') au BufNewFile,BufRead *.jj,*.jjt setf javacc endif -if !has_key(s:disabled_packages, 'java') +if polyglot#util#IsEnabled('java', 'ftdetect') au BufNewFile,BufRead *.jav,*.java setf java endif -if !has_key(s:disabled_packages, 'jam') +if polyglot#util#IsEnabled('jam', 'ftdetect') au BufNewFile,BufRead *.jpl,*.jpr setf jam au BufNewFile,BufRead Prl*.* call s:StarSetf('jam') au BufNewFile,BufRead JAM*.* call s:StarSetf('jam') endif -if !has_key(s:disabled_packages, 'jal') +if polyglot#util#IsEnabled('jal', 'ftdetect') au BufNewFile,BufRead *.JAL,*.jal setf jal endif -if !has_key(s:disabled_packages, 'j') +if polyglot#util#IsEnabled('j', 'ftdetect') au BufNewFile,BufRead *.ijs setf j endif -if !has_key(s:disabled_packages, 'iss') +if polyglot#util#IsEnabled('iss', 'ftdetect') au BufNewFile,BufRead *.iss setf iss endif -if !has_key(s:disabled_packages, 'inittab') +if polyglot#util#IsEnabled('inittab', 'ftdetect') au BufNewFile,BufRead inittab setf inittab endif -if !has_key(s:disabled_packages, 'fgl') +if polyglot#util#IsEnabled('fgl', 'ftdetect') au BufNewFile,BufRead *.4gh,*.4gl,*.m4gl setf fgl endif -if !has_key(s:disabled_packages, 'ipfilter') +if polyglot#util#IsEnabled('ipfilter', 'ftdetect') au BufNewFile,BufRead ipf.conf,ipf.rules,ipf6.conf setf ipfilter endif -if !has_key(s:disabled_packages, 'usw2kagtlog') +if polyglot#util#IsEnabled('usw2kagtlog', 'ftdetect') au BufNewFile,BufRead *.usw2kagt.log\c,usw2kagt.*.log\c,usw2kagt.log\c setf usw2kagtlog endif -if !has_key(s:disabled_packages, 'usserverlog') +if polyglot#util#IsEnabled('usserverlog', 'ftdetect') au BufNewFile,BufRead *.usserver.log\c,usserver.*.log\c,usserver.log\c setf usserverlog endif -if !has_key(s:disabled_packages, 'upstreaminstalllog') +if polyglot#util#IsEnabled('upstreaminstalllog', 'ftdetect') au BufNewFile,BufRead *.upstreaminstall.log\c,upstreaminstall.*.log\c,upstreaminstall.log\c setf upstreaminstalllog endif -if !has_key(s:disabled_packages, 'upstreamlog') +if polyglot#util#IsEnabled('upstreamlog', 'ftdetect') au BufNewFile,BufRead *.upstream.log\c,UPSTREAM-*.log\c,fdrupstream.log,upstream.*.log\c,upstream.log\c setf upstreamlog endif -if !has_key(s:disabled_packages, 'upstreamdat') +if polyglot#util#IsEnabled('upstreamdat', 'ftdetect') au BufNewFile,BufRead *.upstream.dat\c,upstream.*.dat\c,upstream.dat\c setf upstreamdat endif -if !has_key(s:disabled_packages, 'initng') +if polyglot#util#IsEnabled('initng', 'ftdetect') au BufNewFile,BufRead *.ii,*/etc/initng/*/*.i setf initng endif -if !has_key(s:disabled_packages, 'inform') +if polyglot#util#IsEnabled('inform', 'ftdetect') au BufNewFile,BufRead *.INF,*.inf setf inform endif -if !has_key(s:disabled_packages, 'indent') +if polyglot#util#IsEnabled('indent', 'ftdetect') au BufNewFile,BufRead {.,}indent.pro,indentrc setf indent endif -if !has_key(s:disabled_packages, 'icemenu') +if polyglot#util#IsEnabled('icemenu', 'ftdetect') au BufNewFile,BufRead */.icewm/menu setf icemenu endif -if !has_key(s:disabled_packages, 'msidl') +if polyglot#util#IsEnabled('msidl', 'ftdetect') au BufNewFile,BufRead *.mof,*.odl setf msidl endif -if !has_key(s:disabled_packages, 'icon') +if polyglot#util#IsEnabled('icon', 'ftdetect') au BufNewFile,BufRead *.icn setf icon endif -if !has_key(s:disabled_packages, 'httest') +if polyglot#util#IsEnabled('httest', 'ftdetect') au BufNewFile,BufRead *.htb,*.htt setf httest endif -if !has_key(s:disabled_packages, 'hb') +if polyglot#util#IsEnabled('hb', 'ftdetect') au BufNewFile,BufRead *.hb setf hb endif -if !has_key(s:disabled_packages, 'hostsaccess') +if polyglot#util#IsEnabled('hostsaccess', 'ftdetect') au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess endif -if !has_key(s:disabled_packages, 'hostconf') +if polyglot#util#IsEnabled('hostconf', 'ftdetect') au BufNewFile,BufRead */etc/host.conf setf hostconf endif -if !has_key(s:disabled_packages, 'template') +if polyglot#util#IsEnabled('template', 'ftdetect') au BufNewFile,BufRead *.tmpl setf template endif -if !has_key(s:disabled_packages, 'htmlm4') +if polyglot#util#IsEnabled('htmlm4', 'ftdetect') au BufNewFile,BufRead *.html.m4 setf htmlm4 endif -if !has_key(s:disabled_packages, 'tilde') +if polyglot#util#IsEnabled('tilde', 'ftdetect') au BufNewFile,BufRead *.t.html setf tilde endif -if !has_key(s:disabled_packages, 'html') +if polyglot#util#IsEnabled('html', 'ftdetect') 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') +if polyglot#util#IsEnabled('hollywood', 'ftdetect') au BufNewFile,BufRead *.hws setf hollywood endif -if !has_key(s:disabled_packages, 'hex') +if polyglot#util#IsEnabled('hex', 'ftdetect') au BufNewFile,BufRead *.h32,*.hex setf hex endif -if !has_key(s:disabled_packages, 'hercules') +if polyglot#util#IsEnabled('hercules', 'ftdetect') au BufNewFile,BufRead *.errsum,*.ev,*.sum,*.vc setf hercules endif -if !has_key(s:disabled_packages, 'hastepreproc') +if polyglot#util#IsEnabled('hastepreproc', 'ftdetect') au BufNewFile,BufRead *.htpp setf hastepreproc endif -if !has_key(s:disabled_packages, 'haste') +if polyglot#util#IsEnabled('haste', 'ftdetect') au BufNewFile,BufRead *.ht setf haste endif -if !has_key(s:disabled_packages, 'chaskell') +if polyglot#util#IsEnabled('chaskell', 'ftdetect') au BufNewFile,BufRead *.chs setf chaskell endif -if !has_key(s:disabled_packages, 'lhaskell') +if polyglot#util#IsEnabled('lhaskell', 'ftdetect') au BufNewFile,BufRead *.lhs setf lhaskell endif -if !has_key(s:disabled_packages, 'gtkrc') +if polyglot#util#IsEnabled('gtkrc', 'ftdetect') au BufNewFile,BufRead {.,}gtkrc,gtkrc setf 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') +if polyglot#util#IsEnabled('group', 'ftdetect') au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group endif -if !has_key(s:disabled_packages, 'gsp') +if polyglot#util#IsEnabled('gsp', 'ftdetect') au BufNewFile,BufRead *.gsp setf gsp endif -if !has_key(s:disabled_packages, 'gretl') +if polyglot#util#IsEnabled('gretl', 'ftdetect') au BufNewFile,BufRead *.gretl setf gretl endif -if !has_key(s:disabled_packages, 'grads') +if polyglot#util#IsEnabled('grads', 'ftdetect') au BufNewFile,BufRead *.gs setf grads endif -if !has_key(s:disabled_packages, 'gitolite') +if polyglot#util#IsEnabled('gitolite', 'ftdetect') au BufNewFile,BufRead gitolite.conf setf gitolite au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') endif -if !has_key(s:disabled_packages, 'gnash') +if polyglot#util#IsEnabled('gnash', 'ftdetect') au BufNewFile,BufRead {.,}gnashpluginrc,{.,}gnashrc,gnashpluginrc,gnashrc setf gnash endif -if !has_key(s:disabled_packages, 'gpg') +if polyglot#util#IsEnabled('gpg', 'ftdetect') au BufNewFile,BufRead */.gnupg/gpg.conf,*/.gnupg/options,*/usr/*/gnupg/options.skel setf gpg endif -if !has_key(s:disabled_packages, 'gp') +if polyglot#util#IsEnabled('gp', 'ftdetect') au BufNewFile,BufRead *.gp,{.,}gprc setf gp endif -if !has_key(s:disabled_packages, 'gkrellmrc') +if polyglot#util#IsEnabled('gkrellmrc', 'ftdetect') au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc endif -if !has_key(s:disabled_packages, 'gedcom') +if polyglot#util#IsEnabled('gedcom', 'ftdetect') au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') endif -if !has_key(s:disabled_packages, 'gdmo') +if polyglot#util#IsEnabled('gdmo', 'ftdetect') au BufNewFile,BufRead *.gdmo,*.mo setf gdmo endif -if !has_key(s:disabled_packages, 'gdb') +if polyglot#util#IsEnabled('gdb', 'ftdetect') au BufNewFile,BufRead {.,}gdbinit setf gdb endif -if !has_key(s:disabled_packages, 'fstab') +if polyglot#util#IsEnabled('fstab', 'ftdetect') au BufNewFile,BufRead fstab,mtab setf fstab endif -if !has_key(s:disabled_packages, 'framescript') +if polyglot#util#IsEnabled('framescript', 'ftdetect') au BufNewFile,BufRead *.fsl setf framescript endif -if !has_key(s:disabled_packages, 'fortran') +if polyglot#util#IsEnabled('fortran', 'ftdetect') au BufNewFile,BufRead *.f,*.f03,*.f08,*.f77,*.f90,*.f95,*.for,*.fortran,*.fpp,*.ftn setf fortran endif -if !has_key(s:disabled_packages, 'reva') +if polyglot#util#IsEnabled('reva', 'ftdetect') au BufNewFile,BufRead *.frt setf reva endif -if !has_key(s:disabled_packages, 'focexec') +if polyglot#util#IsEnabled('focexec', 'ftdetect') au BufNewFile,BufRead *.fex,*.focexec setf focexec endif -if !has_key(s:disabled_packages, 'fetchmail') +if polyglot#util#IsEnabled('fetchmail', 'ftdetect') au BufNewFile,BufRead {.,}fetchmailrc setf fetchmail endif -if !has_key(s:disabled_packages, 'factor') +if polyglot#util#IsEnabled('factor', 'ftdetect') au BufNewFile,BufRead *.factor setf factor endif -if !has_key(s:disabled_packages, 'fan') +if polyglot#util#IsEnabled('fan', 'ftdetect') au BufNewFile,BufRead *.fan,*.fwt setf fan endif -if !has_key(s:disabled_packages, 'falcon') +if polyglot#util#IsEnabled('falcon', 'ftdetect') au BufNewFile,BufRead *.fal setf falcon endif -if !has_key(s:disabled_packages, 'exports') +if polyglot#util#IsEnabled('exports', 'ftdetect') au BufNewFile,BufRead exports setf exports endif -if !has_key(s:disabled_packages, 'expect') +if polyglot#util#IsEnabled('expect', 'ftdetect') au BufNewFile,BufRead *.exp setf expect endif -if !has_key(s:disabled_packages, 'exim') +if polyglot#util#IsEnabled('exim', 'ftdetect') au BufNewFile,BufRead exim.conf setf exim endif -if !has_key(s:disabled_packages, 'csc') +if polyglot#util#IsEnabled('csc', 'ftdetect') au BufNewFile,BufRead *.csc setf csc endif -if !has_key(s:disabled_packages, 'esterel') +if polyglot#util#IsEnabled('esterel', 'ftdetect') au BufNewFile,BufRead *.strl setf esterel endif -if !has_key(s:disabled_packages, 'esqlc') +if polyglot#util#IsEnabled('esqlc', 'ftdetect') au BufNewFile,BufRead *.EC,*.ec setf esqlc endif -if !has_key(s:disabled_packages, 'esmtprc') +if polyglot#util#IsEnabled('esmtprc', 'ftdetect') au BufNewFile,BufRead *esmtprc setf esmtprc endif -if !has_key(s:disabled_packages, 'elmfilt') +if polyglot#util#IsEnabled('elmfilt', 'ftdetect') au BufNewFile,BufRead filter-rules setf elmfilt endif -if !has_key(s:disabled_packages, 'elinks') +if polyglot#util#IsEnabled('elinks', 'ftdetect') au BufNewFile,BufRead elinks.conf setf elinks endif -if !has_key(s:disabled_packages, 'ecd') +if polyglot#util#IsEnabled('ecd', 'ftdetect') au BufNewFile,BufRead *.ecd setf ecd endif -if !has_key(s:disabled_packages, 'edif') +if polyglot#util#IsEnabled('edif', 'ftdetect') au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif endif -if !has_key(s:disabled_packages, 'dts') +if polyglot#util#IsEnabled('dts', 'ftdetect') au BufNewFile,BufRead *.dts,*.dtsi setf dts endif -if !has_key(s:disabled_packages, 'dtd') +if polyglot#util#IsEnabled('dtd', 'ftdetect') au BufNewFile,BufRead *.dtd setf dtd endif -if !has_key(s:disabled_packages, 'dsl') +if polyglot#util#IsEnabled('dsl', 'ftdetect') au BufNewFile,BufRead *.dsl setf dsl endif -if !has_key(s:disabled_packages, 'datascript') +if polyglot#util#IsEnabled('datascript', 'ftdetect') au BufNewFile,BufRead *.ds setf datascript endif -if !has_key(s:disabled_packages, 'dracula') +if polyglot#util#IsEnabled('dracula', 'ftdetect') au BufNewFile,BufRead *.drac,*.drc,*lpe,*lvs setf dracula au BufNewFile,BufRead drac.* call s:StarSetf('dracula') endif -if !has_key(s:disabled_packages, 'def') +if polyglot#util#IsEnabled('def', 'ftdetect') au BufNewFile,BufRead *.def setf def endif -if !has_key(s:disabled_packages, 'dylan') +if polyglot#util#IsEnabled('dylan', 'ftdetect') au BufNewFile,BufRead *.dylan setf dylan endif -if !has_key(s:disabled_packages, 'dylanintr') +if polyglot#util#IsEnabled('dylanintr', 'ftdetect') au BufNewFile,BufRead *.intr setf dylanintr endif -if !has_key(s:disabled_packages, 'dylanlid') +if polyglot#util#IsEnabled('dylanlid', 'ftdetect') au BufNewFile,BufRead *.lid setf dylanlid endif -if !has_key(s:disabled_packages, 'dot') +if polyglot#util#IsEnabled('dot', 'ftdetect') au BufNewFile,BufRead *.dot,*.gv setf dot endif -if !has_key(s:disabled_packages, 'dircolors') +if polyglot#util#IsEnabled('dircolors', 'ftdetect') au BufNewFile,BufRead */etc/DIR_COLORS,{.,}dir_colors,{.,}dircolors setf dircolors endif -if !has_key(s:disabled_packages, 'diff') +if polyglot#util#IsEnabled('diff', 'ftdetect') au BufNewFile,BufRead *.diff,*.rej setf diff endif -if !has_key(s:disabled_packages, 'dictdconf') +if polyglot#util#IsEnabled('dictdconf', 'ftdetect') au BufNewFile,BufRead dictd.conf setf dictdconf endif -if !has_key(s:disabled_packages, 'dictconf') +if polyglot#util#IsEnabled('dictconf', 'ftdetect') au BufNewFile,BufRead {.,}dictrc,dict.conf setf dictconf endif -if !has_key(s:disabled_packages, 'desktop') +if polyglot#util#IsEnabled('desktop', 'ftdetect') au BufNewFile,BufRead *.desktop,*.directory setf desktop endif -if !has_key(s:disabled_packages, 'desc') +if polyglot#util#IsEnabled('desc', 'ftdetect') au BufNewFile,BufRead *.desc setf desc endif -if !has_key(s:disabled_packages, 'dnsmasq') +if polyglot#util#IsEnabled('dnsmasq', 'ftdetect') au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') endif -if !has_key(s:disabled_packages, 'denyhosts') +if polyglot#util#IsEnabled('denyhosts', 'ftdetect') au BufNewFile,BufRead denyhosts.conf setf denyhosts endif -if !has_key(s:disabled_packages, 'debsources') +if polyglot#util#IsEnabled('debsources', 'ftdetect') au BufNewFile,BufRead */etc/apt/sources.list,*/etc/apt/sources.list.d/*.list setf debsources endif -if !has_key(s:disabled_packages, 'debcopyright') +if polyglot#util#IsEnabled('debcopyright', 'ftdetect') au BufNewFile,BufRead */debian/copyright setf debcopyright endif -if !has_key(s:disabled_packages, 'debcontrol') +if polyglot#util#IsEnabled('debcontrol', 'ftdetect') au BufNewFile,BufRead */debian/control setf debcontrol endif -if !has_key(s:disabled_packages, 'cuplsim') +if polyglot#util#IsEnabled('cuplsim', 'ftdetect') au BufNewFile,BufRead *.si setf cuplsim endif -if !has_key(s:disabled_packages, 'cupl') +if polyglot#util#IsEnabled('cupl', 'ftdetect') au BufNewFile,BufRead *.pld setf cupl endif -if !has_key(s:disabled_packages, 'csp') +if polyglot#util#IsEnabled('csp', 'ftdetect') au BufNewFile,BufRead *.csp,*.fdr setf csp endif -if !has_key(s:disabled_packages, 'quake') +if polyglot#util#IsEnabled('quake', 'ftdetect') au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg,*quake[1-3]/*.cfg setf quake endif -if !has_key(s:disabled_packages, 'lynx') +if polyglot#util#IsEnabled('lynx', 'ftdetect') au BufNewFile,BufRead lynx.cfg setf lynx endif -if !has_key(s:disabled_packages, 'eterm') +if polyglot#util#IsEnabled('eterm', 'ftdetect') au BufNewFile,BufRead *Eterm/*.cfg setf eterm endif -if !has_key(s:disabled_packages, 'dcd') +if polyglot#util#IsEnabled('dcd', 'ftdetect') au BufNewFile,BufRead *.dcd setf dcd endif -if !has_key(s:disabled_packages, 'dockerfile') +if polyglot#util#IsEnabled('dockerfile', 'ftdetect') au BufNewFile,BufRead *.Dockerfile,*.dock,Containerfile,Dockerfile,dockerfile setf dockerfile au BufNewFile,BufRead Dockerfile* call s:StarSetf('dockerfile') endif -if !has_key(s:disabled_packages, 'cuda') +if polyglot#util#IsEnabled('cuda', 'ftdetect') au BufNewFile,BufRead *.cu,*.cuh setf cuda endif -if !has_key(s:disabled_packages, 'config') +if polyglot#util#IsEnabled('config', 'ftdetect') au BufNewFile,BufRead Pipfile,configure.ac,configure.in setf config au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config') endif -if !has_key(s:disabled_packages, 'cf') +if polyglot#util#IsEnabled('cf', 'ftdetect') au BufNewFile,BufRead *.cfc,*.cfi,*.cfm setf cf endif -if !has_key(s:disabled_packages, 'coco') +if polyglot#util#IsEnabled('coco', 'ftdetect') au BufNewFile,BufRead *.atg setf coco endif -if !has_key(s:disabled_packages, 'cobol') +if polyglot#util#IsEnabled('cobol', 'ftdetect') au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol endif -if !has_key(s:disabled_packages, 'cmusrc') +if polyglot#util#IsEnabled('cmusrc', 'ftdetect') au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme},*/cmus/{rc,*.theme} setf cmusrc endif -if !has_key(s:disabled_packages, 'cl') +if polyglot#util#IsEnabled('cl', 'ftdetect') au BufNewFile,BufRead *.eni setf cl endif -if !has_key(s:disabled_packages, 'clean') +if polyglot#util#IsEnabled('clean', 'ftdetect') au BufNewFile,BufRead *.dcl,*.icl setf clean endif -if !has_key(s:disabled_packages, 'chordpro') +if polyglot#util#IsEnabled('chordpro', 'ftdetect') au BufNewFile,BufRead *.cho,*.chopro,*.chordpro,*.crd,*.crdpro setf chordpro endif -if !has_key(s:disabled_packages, 'chill') +if polyglot#util#IsEnabled('chill', 'ftdetect') au BufNewFile,BufRead *..ch setf chill endif -if !has_key(s:disabled_packages, 'debchangelog') +if polyglot#util#IsEnabled('debchangelog', 'ftdetect') au BufNewFile,BufRead */debian/changelog,NEWS.Debian,NEWS.dch,changelog.Debian,changelog.dch setf debchangelog endif -if !has_key(s:disabled_packages, 'cterm') +if polyglot#util#IsEnabled('cterm', 'ftdetect') au BufNewFile,BufRead *.con setf cterm endif -if !has_key(s:disabled_packages, 'css') +if polyglot#util#IsEnabled('css', 'ftdetect') au BufNewFile,BufRead *.css setf css endif -if !has_key(s:disabled_packages, 'ch') +if polyglot#util#IsEnabled('ch', 'ftdetect') au BufNewFile,BufRead *.chf setf ch endif -if !has_key(s:disabled_packages, 'cynpp') +if polyglot#util#IsEnabled('cynpp', 'ftdetect') au BufNewFile,BufRead *.cyn setf cynpp endif -if !has_key(s:disabled_packages, 'crm') +if polyglot#util#IsEnabled('crm', 'ftdetect') au BufNewFile,BufRead *.crm setf crm endif -if !has_key(s:disabled_packages, 'conaryrecipe') +if polyglot#util#IsEnabled('conaryrecipe', 'ftdetect') au BufNewFile,BufRead *.recipe setf conaryrecipe endif -if !has_key(s:disabled_packages, 'cdl') +if polyglot#util#IsEnabled('cdl', 'ftdetect') au BufNewFile,BufRead *.cdl setf cdl endif -if !has_key(s:disabled_packages, 'chaiscript') +if polyglot#util#IsEnabled('chaiscript', 'ftdetect') au BufNewFile,BufRead *.chai setf chaiscript endif -if !has_key(s:disabled_packages, 'cfengine') +if polyglot#util#IsEnabled('cfengine', 'ftdetect') au BufNewFile,BufRead cfengine.conf setf cfengine endif -if !has_key(s:disabled_packages, 'cdrdaoconf') +if polyglot#util#IsEnabled('cdrdaoconf', 'ftdetect') au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/default/cdrdao,*/etc/defaults/cdrdao,{.,}cdrdao setf cdrdaoconf endif -if !has_key(s:disabled_packages, 'cdrtoc') +if polyglot#util#IsEnabled('cdrtoc', 'ftdetect') au BufNewFile,BufRead *.toc setf cdrtoc endif -if !has_key(s:disabled_packages, 'cabal') +if polyglot#util#IsEnabled('cabal', 'ftdetect') au BufNewFile,BufRead *.cabal setf cabal endif -if !has_key(s:disabled_packages, 'csdl') +if polyglot#util#IsEnabled('csdl', 'ftdetect') au BufNewFile,BufRead *.csdl setf csdl endif -if !has_key(s:disabled_packages, 'cs') +if polyglot#util#IsEnabled('cs', 'ftdetect') au BufNewFile,BufRead *.cs setf cs endif -if !has_key(s:disabled_packages, 'calendar') +if polyglot#util#IsEnabled('calendar', 'ftdetect') au BufNewFile,BufRead calendar setf calendar au BufNewFile,BufRead */share/calendar/calendar.* call s:StarSetf('calendar') au BufNewFile,BufRead */share/calendar/*/calendar.* call s:StarSetf('calendar') au BufNewFile,BufRead */.calendar/* call s:StarSetf('calendar') endif -if !has_key(s:disabled_packages, 'lpc') +if polyglot#util#IsEnabled('lpc', 'ftdetect') au BufNewFile,BufRead *.lpc,*.ulpc setf lpc endif -if !has_key(s:disabled_packages, 'bsdl') +if polyglot#util#IsEnabled('bsdl', 'ftdetect') au BufNewFile,BufRead *.bsdl,*bsd setf bsdl endif -if !has_key(s:disabled_packages, 'blank') +if polyglot#util#IsEnabled('blank', 'ftdetect') au BufNewFile,BufRead *.bl setf blank endif -if !has_key(s:disabled_packages, 'bindzone') +if polyglot#util#IsEnabled('bindzone', 'ftdetect') au BufNewFile,BufRead named.root setf bindzone au BufNewFile,BufRead */named/db.* call s:StarSetf('bindzone') au BufNewFile,BufRead */bind/db.* call s:StarSetf('bindzone') endif -if !has_key(s:disabled_packages, 'named') +if polyglot#util#IsEnabled('named', 'ftdetect') au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named endif -if !has_key(s:disabled_packages, 'bst') +if polyglot#util#IsEnabled('bst', 'ftdetect') au BufNewFile,BufRead *.bst setf bst endif -if !has_key(s:disabled_packages, 'bib') +if polyglot#util#IsEnabled('bib', 'ftdetect') au BufNewFile,BufRead *.bib setf bib endif -if !has_key(s:disabled_packages, 'bdf') +if polyglot#util#IsEnabled('bdf', 'ftdetect') au BufNewFile,BufRead *.bdf setf bdf endif -if !has_key(s:disabled_packages, 'bc') +if polyglot#util#IsEnabled('bc', 'ftdetect') au BufNewFile,BufRead *.bc setf bc endif -if !has_key(s:disabled_packages, 'dosbatch') +if polyglot#util#IsEnabled('dosbatch', 'ftdetect') au BufNewFile,BufRead *.bat,*.sys setf dosbatch endif -if !has_key(s:disabled_packages, 'hamster') +if polyglot#util#IsEnabled('hamster', 'ftdetect') au BufNewFile,BufRead *.hsc,*.hsm setf hamster endif -if !has_key(s:disabled_packages, 'freebasic') +if polyglot#util#IsEnabled('freebasic', 'ftdetect') au BufNewFile,BufRead *.bi,*.fb setf freebasic endif -if !has_key(s:disabled_packages, 'ibasic') +if polyglot#util#IsEnabled('ibasic', 'ftdetect') au BufNewFile,BufRead *.iba,*.ibi setf ibasic endif -if !has_key(s:disabled_packages, 'b') +if polyglot#util#IsEnabled('b', 'ftdetect') au BufNewFile,BufRead *.imp,*.mch,*.ref setf b endif -if !has_key(s:disabled_packages, 'sql') +if polyglot#util#IsEnabled('sql', 'ftdetect') au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql endif -if !has_key(s:disabled_packages, 'gitignore') +if polyglot#util#IsEnabled('gitignore', 'ftdetect') au BufNewFile,BufRead *.git/info/exclude,*/.config/git/ignore,{.,}gitignore setf gitignore endif -if !has_key(s:disabled_packages, 'tads') +if polyglot#util#IsEnabled('tads', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T() endif -if !has_key(s:disabled_packages, 'prolog') +if polyglot#util#IsEnabled('prolog', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog endif -if !has_key(s:disabled_packages, 'bzl') +if polyglot#util#IsEnabled('bzl', 'ftdetect') au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE setf bzl endif -if !has_key(s:disabled_packages, 'odin') +if polyglot#util#IsEnabled('odin', 'ftdetect') au BufNewFile,BufRead *.odin setf odin endif -if !has_key(s:disabled_packages, 'dosini') +if polyglot#util#IsEnabled('dosini', 'ftdetect') au BufNewFile,BufRead *.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*/etc/pacman.conf,*/etc/yum.conf,{.,}editorconfig,{.,}npmrc,buildozer.spec setf dosini au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini') au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') endif -if !has_key(s:disabled_packages, 'spec') +if polyglot#util#IsEnabled('spec', 'ftdetect') au BufNewFile,BufRead *.spec setf spec endif -if !has_key(s:disabled_packages, 'visual-basic') +if polyglot#util#IsEnabled('visual-basic', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas() au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb endif -if !has_key(s:disabled_packages, 'basic') +if polyglot#util#IsEnabled('basic', 'ftdetect') au BufNewFile,BufRead *.basic setf basic endif -if !has_key(s:disabled_packages, 'trasys') +if polyglot#util#IsEnabled('trasys', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp() endif -if !has_key(s:disabled_packages, 'zig') +if polyglot#util#IsEnabled('zig', 'ftdetect') au BufNewFile,BufRead *.zir setf zir au BufNewFile,BufRead *.zig,*.zir setf zig endif -if !has_key(s:disabled_packages, 'zephir') +if polyglot#util#IsEnabled('zephir', 'ftdetect') au BufNewFile,BufRead *.zep setf zephir endif -if !has_key(s:disabled_packages, 'help') +if polyglot#util#IsEnabled('help', 'ftdetect') au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help endif -if !has_key(s:disabled_packages, 'helm') +if polyglot#util#IsEnabled('helm', 'ftdetect') au BufNewFile,BufRead */templates/*.tpl,*/templates/*.yaml setf helm endif -if !has_key(s:disabled_packages, 'smarty') +if polyglot#util#IsEnabled('smarty', 'ftdetect') au BufNewFile,BufRead *.tpl setf smarty endif -if !has_key(s:disabled_packages, 'ansible') +if polyglot#util#IsEnabled('ansible', 'ftdetect') au BufNewFile,BufRead handlers.*.y{a,}ml,local.y{a,}ml,main.y{a,}ml,playbook.y{a,}ml,requirements.y{a,}ml,roles.*.y{a,}ml,site.y{a,}ml,tasks.*.y{a,}ml setf yaml.ansible au BufNewFile,BufRead host_vars/* call s:StarSetf('yaml.ansible') au BufNewFile,BufRead group_vars/* call s:StarSetf('yaml.ansible') endif -if !has_key(s:disabled_packages, 'xsl') +if polyglot#util#IsEnabled('xsl', 'ftdetect') au BufNewFile,BufRead *.xsl,*.xslt setf xsl endif -if !has_key(s:disabled_packages, 'xdc') +if polyglot#util#IsEnabled('xdc', 'ftdetect') au BufNewFile,BufRead *.xdc setf xdc endif -if !has_key(s:disabled_packages, 'vue') +if polyglot#util#IsEnabled('vue', 'ftdetect') au BufNewFile,BufRead *.vue,*.wpy setf vue endif -if !has_key(s:disabled_packages, 'vmasm') +if polyglot#util#IsEnabled('vmasm', 'ftdetect') au BufNewFile,BufRead *.mar setf vmasm endif -if !has_key(s:disabled_packages, 'velocity') +if polyglot#util#IsEnabled('velocity', 'ftdetect') au BufNewFile,BufRead *.vm setf velocity endif -if !has_key(s:disabled_packages, 'vcl') +if polyglot#util#IsEnabled('vcl', 'ftdetect') au BufNewFile,BufRead *.vcl setf vcl endif -if !has_key(s:disabled_packages, 'vbnet') +if polyglot#util#IsEnabled('vbnet', 'ftdetect') au BufNewFile,BufRead *.vb,*.vbhtml setf vbnet endif -if !has_key(s:disabled_packages, 'vala') +if polyglot#util#IsEnabled('vala', 'ftdetect') au BufNewFile,BufRead *.vala,*.valadoc,*.vapi setf vala endif -if !has_key(s:disabled_packages, 'v') +if polyglot#util#IsEnabled('v', 'ftdetect') au BufNewFile,BufRead *.v,*.vsh,*.vv setf vlang endif -if !has_key(s:disabled_packages, 'unison') +if polyglot#util#IsEnabled('unison', 'ftdetect') au BufNewFile,BufRead *.u,*.uu setf unison endif -if !has_key(s:disabled_packages, 'typescript') +if polyglot#util#IsEnabled('typescript', 'ftdetect') au BufNewFile,BufRead *.ts setf typescript au BufNewFile,BufRead *.tsx setf typescriptreact endif -if !has_key(s:disabled_packages, 'twig') +if polyglot#util#IsEnabled('twig', 'ftdetect') au BufNewFile,BufRead *.twig setf html.twig au BufNewFile,BufRead *.xml.twig setf xml.twig endif -if !has_key(s:disabled_packages, 'tptp') +if polyglot#util#IsEnabled('tptp', 'ftdetect') au BufNewFile,BufRead *.ax,*.p,*.tptp setf tptp endif -if !has_key(s:disabled_packages, 'toml') +if polyglot#util#IsEnabled('toml', 'ftdetect') au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock setf toml endif -if !has_key(s:disabled_packages, 'tmux') +if polyglot#util#IsEnabled('tmux', 'ftdetect') au BufNewFile,BufRead {.,}tmux*.conf setf tmux endif -if !has_key(s:disabled_packages, 'thrift') +if polyglot#util#IsEnabled('thrift', 'ftdetect') au BufNewFile,BufRead *.thrift setf thrift endif -if !has_key(s:disabled_packages, 'textile') +if polyglot#util#IsEnabled('textile', 'ftdetect') au BufNewFile,BufRead *.textile setf textile endif -if !has_key(s:disabled_packages, 'terraform') +if polyglot#util#IsEnabled('terraform', 'ftdetect') au BufNewFile,BufRead *.tf,*.tfvars setf terraform endif -if !has_key(s:disabled_packages, 'tf') +if polyglot#util#IsEnabled('tf', 'ftdetect') au BufNewFile,BufRead *.tf,{.,}tfrc,tfrc setf tf endif -if !has_key(s:disabled_packages, 'systemd') +if polyglot#util#IsEnabled('systemd', 'ftdetect') au BufNewFile,BufRead *.automount,*.dnssd,*.link,*.mount,*.netdev,*.network,*.nspawn,*.path,*.service,*.slice,*.socket,*.swap,*.target,*.timer,*/systemd/*.conf setf systemd au BufNewFile,BufRead *.#* call s:StarSetf('systemd') endif -if !has_key(s:disabled_packages, 'sxhkd') +if polyglot#util#IsEnabled('sxhkd', 'ftdetect') au BufNewFile,BufRead *.sxhkdrc,sxhkdrc setf sxhkdrc endif -if !has_key(s:disabled_packages, 'swift') +if polyglot#util#IsEnabled('swift', 'ftdetect') au BufNewFile,BufRead *.swift setf swift endif -if !has_key(s:disabled_packages, 'svg') +if polyglot#util#IsEnabled('svg', 'ftdetect') au BufNewFile,BufRead *.svg setf svg endif -if !has_key(s:disabled_packages, 'svelte') +if polyglot#util#IsEnabled('svelte', 'ftdetect') au BufNewFile,BufRead *.svelte setf svelte endif -if !has_key(s:disabled_packages, 'stylus') +if polyglot#util#IsEnabled('stylus', 'ftdetect') au BufNewFile,BufRead *.styl,*.stylus setf stylus endif -if !has_key(s:disabled_packages, 'solidity') +if polyglot#util#IsEnabled('solidity', 'ftdetect') au BufNewFile,BufRead *.sol setf solidity endif -if !has_key(s:disabled_packages, 'smt2') +if polyglot#util#IsEnabled('smt2', 'ftdetect') au BufNewFile,BufRead *.smt,*.smt2 setf smt2 endif -if !has_key(s:disabled_packages, 'slime') +if polyglot#util#IsEnabled('slime', 'ftdetect') au BufNewFile,BufRead *.slime setf slime endif -if !has_key(s:disabled_packages, 'slim') +if polyglot#util#IsEnabled('slim', 'ftdetect') au BufNewFile,BufRead *.slim setf slim endif -if !has_key(s:disabled_packages, 'sh') +if polyglot#util#IsEnabled('sh', 'ftdetect') 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') @@ -1910,132 +1895,132 @@ if !has_key(s:disabled_packages, 'sh') au BufNewFile,BufRead .zcompdump* call s:StarSetf('zsh') endif -if !has_key(s:disabled_packages, 'scss') +if polyglot#util#IsEnabled('scss', 'ftdetect') au BufNewFile,BufRead *.scss setf scss endif -if !has_key(s:disabled_packages, 'scala') +if polyglot#util#IsEnabled('scala', 'ftdetect') au BufNewFile,BufRead *.kojo,*.sc,*.scala setf scala endif -if !has_key(s:disabled_packages, 'rust') +if polyglot#util#IsEnabled('rust', 'ftdetect') au BufNewFile,BufRead *.rs,*.rs.in setf rust endif -if !has_key(s:disabled_packages, 'brewfile') +if polyglot#util#IsEnabled('brewfile', 'ftdetect') au BufNewFile,BufRead Brewfile setf brewfile endif -if !has_key(s:disabled_packages, 'rspec') +if polyglot#util#IsEnabled('rspec', 'ftdetect') au BufNewFile,BufRead *_spec.rb set ft=ruby syntax=rspec endif -if !has_key(s:disabled_packages, 'ruby') +if polyglot#util#IsEnabled('ruby', 'ftdetect') au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Routefile,Snapfile,Thorfile,Vagrantfile,[Rr]antfile,buildfile,vagrantfile setf ruby au BufNewFile,BufRead [Rr]akefile* call s:StarSetf('ruby') au BufNewFile,BufRead *.erb,*.erb.deface,*.rhtml setf eruby endif -if !has_key(s:disabled_packages, 'rst') +if polyglot#util#IsEnabled('rst', 'ftdetect') au BufNewFile,BufRead *.rest,*.rest.txt,*.rst,*.rst.txt setf rst endif -if !has_key(s:disabled_packages, 'reason') +if polyglot#util#IsEnabled('reason', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.re call polyglot#detect#Re() au BufNewFile,BufRead *.rei setf reason endif -if !has_key(s:disabled_packages, 'razor') +if polyglot#util#IsEnabled('razor', 'ftdetect') au BufNewFile,BufRead *.cshtml,*.razor setf razor endif -if !has_key(s:disabled_packages, 'raml') +if polyglot#util#IsEnabled('raml', 'ftdetect') au BufNewFile,BufRead *.raml setf raml endif -if !has_key(s:disabled_packages, 'raku') +if polyglot#util#IsEnabled('raku', 'ftdetect') 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 -if !has_key(s:disabled_packages, 'ragel') +if polyglot#util#IsEnabled('ragel', 'ftdetect') au BufNewFile,BufRead *.rl setf ragel endif -if !has_key(s:disabled_packages, 'racket') +if polyglot#util#IsEnabled('racket', 'ftdetect') au BufNewFile,BufRead *.rkt,*.rktd,*.rktl,*.scrbl setf racket endif -if !has_key(s:disabled_packages, 'r-lang') +if polyglot#util#IsEnabled('r-lang', 'ftdetect') au BufNewFile,BufRead *.S,*.r,*.rsx,*.s,{.,}Rprofile,expr-dist setf r au BufNewFile,BufRead *.rd setf rhelp endif -if !has_key(s:disabled_packages, 'qml') +if polyglot#util#IsEnabled('qml', 'ftdetect') au BufNewFile,BufRead *.qbs,*.qml setf qml endif -if !has_key(s:disabled_packages, 'qmake') +if polyglot#util#IsEnabled('qmake', 'ftdetect') au BufNewFile,BufRead *.pri,*.pro setf qmake endif -if !has_key(s:disabled_packages, 'requirements') +if polyglot#util#IsEnabled('requirements', 'ftdetect') au BufNewFile,BufRead *.pip,*require.{txt,in},*requirements.{txt,in},constraints.{txt,in} setf requirements endif -if !has_key(s:disabled_packages, 'python') +if polyglot#util#IsEnabled('python', 'ftdetect') au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,Snakefile,wscript setf python endif -if !has_key(s:disabled_packages, 'purescript') +if polyglot#util#IsEnabled('purescript', 'ftdetect') au BufNewFile,BufRead *.purs setf purescript endif -if !has_key(s:disabled_packages, 'puppet') +if polyglot#util#IsEnabled('puppet', 'ftdetect') au BufNewFile,BufRead *.pp,Modulefile setf puppet au BufNewFile,BufRead *.epp setf embeddedpuppet endif -if !has_key(s:disabled_packages, 'pug') +if polyglot#util#IsEnabled('pug', 'ftdetect') au BufNewFile,BufRead *.jade,*.pug setf pug endif -if !has_key(s:disabled_packages, 'protobuf') +if polyglot#util#IsEnabled('protobuf', 'ftdetect') au BufNewFile,BufRead *.proto setf proto endif -if !has_key(s:disabled_packages, 'powershell') +if polyglot#util#IsEnabled('powershell', 'ftdetect') au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1 au BufNewFile,BufRead *.ps1xml setf ps1xml endif -if !has_key(s:disabled_packages, 'pony') +if polyglot#util#IsEnabled('pony', 'ftdetect') au BufNewFile,BufRead *.pony setf pony endif -if !has_key(s:disabled_packages, 'plantuml') +if polyglot#util#IsEnabled('plantuml', 'ftdetect') au BufNewFile,BufRead *.iuml,*.plantuml,*.pu,*.puml,*.uml setf plantuml endif -if !has_key(s:disabled_packages, 'blade') +if polyglot#util#IsEnabled('blade', 'ftdetect') au BufNewFile,BufRead *.blade,*.blade.php setf blade endif -if !has_key(s:disabled_packages, 'php') +if polyglot#util#IsEnabled('php', 'ftdetect') au BufNewFile,BufRead *.aw,*.ctp,*.fcgi,*.inc,*.php,*.php3,*.php4,*.php5,*.php9,*.phps,*.phpt,*.phtml,{.,}php,{.,}php_cs,{.,}php_cs.dist,Phakefile setf php endif -if !has_key(s:disabled_packages, 'cql') +if polyglot#util#IsEnabled('cql', 'ftdetect') au BufNewFile,BufRead *.cql setf cql endif -if !has_key(s:disabled_packages, 'pgsql') +if polyglot#util#IsEnabled('pgsql', 'ftdetect') au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql endif -if !has_key(s:disabled_packages, 'perl') +if polyglot#util#IsEnabled('perl', 'ftdetect') 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() @@ -2047,20 +2032,20 @@ if !has_key(s:disabled_packages, 'perl') au BufNewFile,BufRead *.xs setf xs endif -if !has_key(s:disabled_packages, 'rc') +if polyglot#util#IsEnabled('rc', 'ftdetect') au BufNewFile,BufRead *.rc,*.rch setf rc endif -if !has_key(s:disabled_packages, 'opencl') +if polyglot#util#IsEnabled('opencl', 'ftdetect') au BufNewFile,BufRead *.cl,*.opencl setf opencl endif -if !has_key(s:disabled_packages, 'octave') +if polyglot#util#IsEnabled('octave', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() au BufNewFile,BufRead *.oct setf octave endif -if !has_key(s:disabled_packages, 'ocaml') +if polyglot#util#IsEnabled('ocaml', 'ftdetect') au BufNewFile,BufRead *.eliom,*.eliomi,*.ml,*.ml.cppo,*.ml4,*.mli,*.mli.cppo,*.mlip,*.mll,*.mlp,*.mlt,*.mly,{.,}ocamlinit setf ocaml au BufNewFile,BufRead *.om,OMakefile,OMakeroot,OMakeroot.in setf omake au BufNewFile,BufRead *.opam,*.opam.template,opam setf opam @@ -2072,48 +2057,48 @@ if !has_key(s:disabled_packages, 'ocaml') au BufNewFile,BufRead *.sexp setf sexplib endif -if !has_key(s:disabled_packages, 'objc') +if polyglot#util#IsEnabled('objc', 'ftdetect') 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') +if polyglot#util#IsEnabled('nix', 'ftdetect') au BufNewFile,BufRead *.nix setf nix endif -if !has_key(s:disabled_packages, 'nim') +if polyglot#util#IsEnabled('nim', 'ftdetect') au BufNewFile,BufRead *.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg setf nim endif -if !has_key(s:disabled_packages, 'nginx') +if polyglot#util#IsEnabled('nginx', 'ftdetect') au BufNewFile,BufRead *.nginx,*.nginxconf,*.vhost,*/nginx/*.conf,*nginx.conf,nginx*.conf,nginx.conf setf nginx au BufNewFile,BufRead */usr/local/nginx/conf/* call s:StarSetf('nginx') au BufNewFile,BufRead */etc/nginx/* call s:StarSetf('nginx') endif -if !has_key(s:disabled_packages, 'murphi') +if polyglot#util#IsEnabled('murphi', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() endif -if !has_key(s:disabled_packages, 'moonscript') +if polyglot#util#IsEnabled('moonscript', 'ftdetect') au BufNewFile,BufRead *.moon setf moon endif -if !has_key(s:disabled_packages, 'meson') +if polyglot#util#IsEnabled('meson', 'ftdetect') au BufNewFile,BufRead meson.build,meson_options.txt setf meson au BufNewFile,BufRead *.wrap setf dosini endif -if !has_key(s:disabled_packages, 'mdx') +if polyglot#util#IsEnabled('mdx', 'ftdetect') au BufNewFile,BufRead *.mdx setf markdown.mdx endif -if !has_key(s:disabled_packages, 'mathematica') +if polyglot#util#IsEnabled('mathematica', 'ftdetect') 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 -if !has_key(s:disabled_packages, 'mako') +if polyglot#util#IsEnabled('mako', 'ftdetect') au BufNewFile,BufRead *.mako,*.mao setf mako au BufReadPre *.*.mao execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype @@ -2121,172 +2106,172 @@ if !has_key(s:disabled_packages, 'mako') au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype endif -if !has_key(s:disabled_packages, 'm4') +if polyglot#util#IsEnabled('m4', 'ftdetect') au BufNewFile,BufRead *.at,*.m4 setf m4 endif -if !has_key(s:disabled_packages, 'lua') +if polyglot#util#IsEnabled('lua', 'ftdetect') au BufNewFile,BufRead *.fcgi,*.lua,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,{.,}luacheckrc setf lua endif -if !has_key(s:disabled_packages, 'log') +if polyglot#util#IsEnabled('log', 'ftdetect') au BufNewFile,BufRead *.LOG,*.log,*_LOG,*_log setf log endif -if !has_key(s:disabled_packages, 'llvm') +if polyglot#util#IsEnabled('llvm', 'ftdetect') au BufNewFile,BufRead *.ll setf llvm au BufNewFile,BufRead *.td setf tablegen endif -if !has_key(s:disabled_packages, 'livescript') +if polyglot#util#IsEnabled('livescript', 'ftdetect') au BufNewFile,BufRead *._ls,*.ls,Slakefile setf livescript endif -if !has_key(s:disabled_packages, 'lilypond') +if polyglot#util#IsEnabled('lilypond', 'ftdetect') au BufNewFile,BufRead *.ily,*.ly setf lilypond endif -if !has_key(s:disabled_packages, 'less') +if polyglot#util#IsEnabled('less', 'ftdetect') au BufNewFile,BufRead *.less setf less endif -if !has_key(s:disabled_packages, 'ledger') +if polyglot#util#IsEnabled('ledger', 'ftdetect') au BufNewFile,BufRead *.journal,*.ldg,*.ledger setf ledger endif -if !has_key(s:disabled_packages, 'kotlin') +if polyglot#util#IsEnabled('kotlin', 'ftdetect') au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin endif -if !has_key(s:disabled_packages, 'julia') +if polyglot#util#IsEnabled('julia', 'ftdetect') au BufNewFile,BufRead *.jl setf julia endif -if !has_key(s:disabled_packages, 'jst') +if polyglot#util#IsEnabled('jst', 'ftdetect') au BufNewFile,BufRead *.ect,*.ejs,*.jst setf jst endif -if !has_key(s:disabled_packages, 'jsonnet') +if polyglot#util#IsEnabled('jsonnet', 'ftdetect') au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet endif -if !has_key(s:disabled_packages, 'json') +if polyglot#util#IsEnabled('json', 'ftdetect') au BufNewFile,BufRead *.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}htmlhintrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json endif -if !has_key(s:disabled_packages, 'json5') +if polyglot#util#IsEnabled('json5', 'ftdetect') au BufNewFile,BufRead *.json5 setf json5 endif -if !has_key(s:disabled_packages, 'jq') +if polyglot#util#IsEnabled('jq', 'ftdetect') au BufNewFile,BufRead *.jq,{.,}jqrc setf jq au BufNewFile,BufRead .jqrc* call s:StarSetf('jq') endif -if !has_key(s:disabled_packages, 'htmldjango') +if polyglot#util#IsEnabled('htmldjango', 'ftdetect') au BufNewFile,BufRead *.j2,*.jinja,*.jinja2,*.njk setf htmldjango endif -if !has_key(s:disabled_packages, 'jenkins') +if polyglot#util#IsEnabled('jenkins', 'ftdetect') au BufNewFile,BufRead *.Jenkinsfile,*.jenkinsfile,Jenkinsfile setf Jenkinsfile au BufNewFile,BufRead Jenkinsfile* call s:StarSetf('Jenkinsfile') endif -if !has_key(s:disabled_packages, 'ion') +if polyglot#util#IsEnabled('ion', 'ftdetect') au BufNewFile,BufRead *.ion,~/.config/ion/initrc setf ion endif -if !has_key(s:disabled_packages, 'idris2') +if polyglot#util#IsEnabled('idris2', 'ftdetect') 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() endif -if !has_key(s:disabled_packages, 'idris') +if polyglot#util#IsEnabled('idris', 'ftdetect') 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 -if !has_key(s:disabled_packages, 'icalendar') +if polyglot#util#IsEnabled('icalendar', 'ftdetect') au BufNewFile,BufRead *.ics setf icalendar endif -if !has_key(s:disabled_packages, 'i3') +if polyglot#util#IsEnabled('i3', 'ftdetect') au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config endif -if !has_key(s:disabled_packages, 'hive') +if polyglot#util#IsEnabled('hive', 'ftdetect') au BufNewFile,BufRead *.hql,*.q,*.ql setf hive endif -if !has_key(s:disabled_packages, 'hcl') +if polyglot#util#IsEnabled('hcl', 'ftdetect') au BufNewFile,BufRead *.hcl,*.nomad,*.workflow,Appfile setf hcl endif -if !has_key(s:disabled_packages, 'haxe') +if polyglot#util#IsEnabled('haxe', 'ftdetect') au BufNewFile,BufRead *.hx,*.hxsl setf haxe endif -if !has_key(s:disabled_packages, 'haskell') +if polyglot#util#IsEnabled('haskell', 'ftdetect') au BufNewFile,BufRead *.bpk,*.hs,*.hs-boot,*.hsc,*.hsig setf haskell endif -if !has_key(s:disabled_packages, 'haproxy') +if polyglot#util#IsEnabled('haproxy', 'ftdetect') 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') +if polyglot#util#IsEnabled('handlebars', 'ftdetect') au BufNewFile,BufRead *.hjs,*.hogan,*.hulk,*.mustache setf html.mustache au BufNewFile,BufRead *.handlebars,*.hb,*.hbs,*.hdbs setf html.handlebars endif -if !has_key(s:disabled_packages, 'haml') +if polyglot#util#IsEnabled('haml', 'ftdetect') au BufNewFile,BufRead *.haml,*.haml.deface,*.hamlbars,*.hamlc setf haml endif -if !has_key(s:disabled_packages, 'grub') +if polyglot#util#IsEnabled('grub', 'ftdetect') au BufNewFile,BufRead */boot/grub/grub.conf,*/boot/grub/menu.lst,*/etc/grub.conf setf grub endif -if !has_key(s:disabled_packages, 'groovy') +if polyglot#util#IsEnabled('groovy', 'ftdetect') au BufNewFile,BufRead *.gradle,*.groovy,*.grt,*.gtpl,*.gvy,Jenkinsfile setf groovy endif -if !has_key(s:disabled_packages, 'graphql') +if polyglot#util#IsEnabled('graphql', 'ftdetect') au BufNewFile,BufRead *.gql,*.graphql,*.graphqls setf graphql endif -if !has_key(s:disabled_packages, 'jsx') +if polyglot#util#IsEnabled('jsx', 'ftdetect') au BufNewFile,BufRead *.jsx setf javascriptreact endif -if !has_key(s:disabled_packages, 'javascript') +if polyglot#util#IsEnabled('javascript', 'ftdetect') au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript au BufNewFile,BufRead *.flow setf flow endif -if !has_key(s:disabled_packages, 'go') +if polyglot#util#IsEnabled('go', 'ftdetect') au BufNewFile,BufRead *.go setf go au BufNewFile,BufRead go.mod setf gomod au BufNewFile,BufRead *.tmpl setf gohtmltmpl endif -if !has_key(s:disabled_packages, 'gnuplot') +if polyglot#util#IsEnabled('gnuplot', 'ftdetect') au BufNewFile,BufRead *.gnu,*.gnuplot,*.gp,*.gpi,*.p,*.plot,*.plt setf gnuplot endif -if !has_key(s:disabled_packages, 'gmpl') +if polyglot#util#IsEnabled('gmpl', 'ftdetect') au BufNewFile,BufRead *.mod setf gmpl endif -if !has_key(s:disabled_packages, 'glsl') +if polyglot#util#IsEnabled('glsl', 'ftdetect') 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 -if !has_key(s:disabled_packages, 'git') +if polyglot#util#IsEnabled('git', 'ftdetect') 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 @@ -2294,74 +2279,74 @@ if !has_key(s:disabled_packages, 'git') au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit endif -if !has_key(s:disabled_packages, 'gdscript') +if polyglot#util#IsEnabled('gdscript', 'ftdetect') au BufNewFile,BufRead *.gd setf gdscript3 endif -if !has_key(s:disabled_packages, 'fsharp') +if polyglot#util#IsEnabled('fsharp', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() au BufNewFile,BufRead *.fsi,*.fsx setf fsharp endif -if !has_key(s:disabled_packages, 'forth') +if polyglot#util#IsEnabled('forth', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() au BufNewFile,BufRead *.ft,*.fth setf forth endif -if !has_key(s:disabled_packages, 'flatbuffers') +if polyglot#util#IsEnabled('flatbuffers', 'ftdetect') au BufNewFile,BufRead *.fbs setf fbs endif -if !has_key(s:disabled_packages, 'fish') +if polyglot#util#IsEnabled('fish', 'ftdetect') au BufNewFile,BufRead *.fish setf fish endif -if !has_key(s:disabled_packages, 'ferm') +if polyglot#util#IsEnabled('ferm', 'ftdetect') au BufNewFile,BufRead *.ferm,ferm.conf setf ferm endif -if !has_key(s:disabled_packages, 'fennel') +if polyglot#util#IsEnabled('fennel', 'ftdetect') au BufNewFile,BufRead *.fnl setf fennel endif -if !has_key(s:disabled_packages, 'erlang') +if polyglot#util#IsEnabled('erlang', 'ftdetect') au BufNewFile,BufRead *.app,*.app.src,*.erl,*.es,*.escript,*.hrl,*.xrl,*.yaws,*.yrl,Emakefile,rebar.config,rebar.config.lock,rebar.lock setf erlang endif -if !has_key(s:disabled_packages, 'emblem') +if polyglot#util#IsEnabled('emblem', 'ftdetect') au BufNewFile,BufRead *.em,*.emblem setf emblem endif -if !has_key(s:disabled_packages, 'emberscript') +if polyglot#util#IsEnabled('emberscript', 'ftdetect') au BufNewFile,BufRead *.em,*.emberscript setf ember-script endif -if !has_key(s:disabled_packages, 'elm') +if polyglot#util#IsEnabled('elm', 'ftdetect') au BufNewFile,BufRead *.elm setf elm endif -if !has_key(s:disabled_packages, 'elixir') +if polyglot#util#IsEnabled('elixir', 'ftdetect') au BufNewFile,BufRead *.ex,*.exs,mix.lock setf elixir au BufNewFile,BufRead *.eex,*.leex setf eelixir endif -if !has_key(s:disabled_packages, 'docker-compose') +if polyglot#util#IsEnabled('docker-compose', 'ftdetect') au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml setf yaml.docker-compose endif -if !has_key(s:disabled_packages, 'yaml') +if polyglot#util#IsEnabled('yaml', 'ftdetect') 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') +if polyglot#util#IsEnabled('mysql', 'ftdetect') au BufNewFile,BufRead *.mysql setf mysql endif -if !has_key(s:disabled_packages, 'sed') +if polyglot#util#IsEnabled('sed', 'ftdetect') au BufNewFile,BufRead *.sed setf sed endif -if !has_key(s:disabled_packages, 'dlang') +if polyglot#util#IsEnabled('dlang', 'ftdetect') au BufNewFile,BufRead *.d,*.di setf d au BufNewFile,BufRead *.lst setf dcov au BufNewFile,BufRead *.dd setf dd @@ -2369,138 +2354,138 @@ if !has_key(s:disabled_packages, 'dlang') au BufNewFile,BufRead *.sdl setf dsdl endif -if !has_key(s:disabled_packages, 'dhall') +if polyglot#util#IsEnabled('dhall', 'ftdetect') au BufNewFile,BufRead *.dhall setf dhall endif -if !has_key(s:disabled_packages, 'dart') +if polyglot#util#IsEnabled('dart', 'ftdetect') au BufNewFile,BufRead *.dart,*.drt setf dart endif -if !has_key(s:disabled_packages, 'cue') +if polyglot#util#IsEnabled('cue', 'ftdetect') au BufNewFile,BufRead *.cue setf cuesheet endif -if !has_key(s:disabled_packages, 'cucumber') +if polyglot#util#IsEnabled('cucumber', 'ftdetect') au BufNewFile,BufRead *.feature,*.story setf cucumber endif -if !has_key(s:disabled_packages, 'crystal') +if polyglot#util#IsEnabled('crystal', 'ftdetect') au BufNewFile,BufRead *.cr,Projectfile setf crystal au BufNewFile,BufRead *.ecr setf ecrystal endif -if !has_key(s:disabled_packages, 'cryptol') +if polyglot#util#IsEnabled('cryptol', 'ftdetect') au BufNewFile,BufRead *.cry,*.cyl,*.lcry,*.lcyl setf cryptol endif -if !has_key(s:disabled_packages, 'coffee-script') +if polyglot#util#IsEnabled('coffee-script', 'ftdetect') au BufNewFile,BufRead *._coffee,*.cake,*.cjsx,*.coffee,*.coffeekup,*.iced,Cakefile setf coffee au BufNewFile,BufRead *.coffee.md,*.litcoffee setf litcoffee endif -if !has_key(s:disabled_packages, 'markdown') +if polyglot#util#IsEnabled('markdown', 'ftdetect') au BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr setf markdown endif -if !has_key(s:disabled_packages, 'cmake') +if polyglot#util#IsEnabled('cmake', 'ftdetect') au BufNewFile,BufRead *.cmake,*.cmake.in,CMakeLists.txt setf cmake endif -if !has_key(s:disabled_packages, 'clojure') +if polyglot#util#IsEnabled('clojure', 'ftdetect') au BufNewFile,BufRead *.boot,*.cl2,*.clj,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.edn,*.hic,build.boot,profile.boot,riemann.config setf clojure endif -if !has_key(s:disabled_packages, 'carp') +if polyglot#util#IsEnabled('carp', 'ftdetect') au BufNewFile,BufRead *.carp setf carp endif -if !has_key(s:disabled_packages, 'caddyfile') +if polyglot#util#IsEnabled('caddyfile', 'ftdetect') au BufNewFile,BufRead Caddyfile setf caddyfile endif -if !has_key(s:disabled_packages, 'awk') +if polyglot#util#IsEnabled('awk', 'ftdetect') au BufNewFile,BufRead *.awk,*.gawk setf awk endif -if !has_key(s:disabled_packages, 'ave') +if polyglot#util#IsEnabled('ave', 'ftdetect') au BufNewFile,BufRead *.ave setf ave endif -if !has_key(s:disabled_packages, 'autoit') +if polyglot#util#IsEnabled('autoit', 'ftdetect') au BufNewFile,BufRead *.au3 setf autoit endif -if !has_key(s:disabled_packages, 'atlas') +if polyglot#util#IsEnabled('atlas', 'ftdetect') au BufNewFile,BufRead *.as,*.atl setf atlas endif -if !has_key(s:disabled_packages, 'aspperl') +if polyglot#util#IsEnabled('aspperl', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp() endif -if !has_key(s:disabled_packages, 'aspvbs') +if polyglot#util#IsEnabled('aspvbs', 'ftdetect') 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') +if polyglot#util#IsEnabled('asn', 'ftdetect') au BufNewFile,BufRead *.asn,*.asn1 setf asn endif -if !has_key(s:disabled_packages, 'automake') +if polyglot#util#IsEnabled('automake', 'ftdetect') au BufNewFile,BufRead GNUmakefile.am,[mM]akefile.am setf automake endif -if !has_key(s:disabled_packages, 'elf') +if polyglot#util#IsEnabled('elf', 'ftdetect') au BufNewFile,BufRead *.am setf elf endif -if !has_key(s:disabled_packages, 'make') +if polyglot#util#IsEnabled('make', 'ftdetect') au BufNewFile,BufRead *.dsp,*.mak,*.mk,*[mM]akefile setf make endif -if !has_key(s:disabled_packages, 'autohotkey') +if polyglot#util#IsEnabled('autohotkey', 'ftdetect') au BufNewFile,BufRead *.ahk,*.ahkl setf autohotkey endif -if !has_key(s:disabled_packages, 'asciidoc') +if polyglot#util#IsEnabled('asciidoc', 'ftdetect') au BufNewFile,BufRead *.adoc,*.asc,*.asciidoc setf asciidoc endif -if !has_key(s:disabled_packages, 'art') +if polyglot#util#IsEnabled('art', 'ftdetect') au BufNewFile,BufRead *.art setf art endif -if !has_key(s:disabled_packages, 'arduino') +if polyglot#util#IsEnabled('arduino', 'ftdetect') au BufNewFile,BufRead *.ino,*.pde setf arduino endif -if !has_key(s:disabled_packages, 'c/c++') +if polyglot#util#IsEnabled('c/c++', 'ftdetect') 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 *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c endif -if !has_key(s:disabled_packages, 'arch') +if polyglot#util#IsEnabled('arch', 'ftdetect') au BufNewFile,BufRead {.,}arch-inventory,=tagging-method setf arch endif -if !has_key(s:disabled_packages, 'aptconf') +if polyglot#util#IsEnabled('aptconf', 'ftdetect') au BufNewFile,BufRead */.aptitude/config,*/etc/apt/apt.conf.d/*.conf,apt.conf setf aptconf au BufNewFile,BufRead */etc/apt/apt.conf.d/[^.]* call s:StarSetf('aptconf') endif -if !has_key(s:disabled_packages, 'applescript') +if polyglot#util#IsEnabled('applescript', 'ftdetect') au BufNewFile,BufRead *.applescript,*.scpt setf applescript endif -if !has_key(s:disabled_packages, 'apiblueprint') +if polyglot#util#IsEnabled('apiblueprint', 'ftdetect') au BufNewFile,BufRead *.apib setf apiblueprint endif -if !has_key(s:disabled_packages, 'apache') +if polyglot#util#IsEnabled('apache', 'ftdetect') au BufNewFile,BufRead */etc/apache2/sites-*/*.com,*/etc/httpd/*.conf,{.,}htaccess setf apache au BufNewFile,BufRead srm.conf* call s:StarSetf('apache') au BufNewFile,BufRead httpd.conf* call s:StarSetf('apache') @@ -2514,101 +2499,101 @@ if !has_key(s:disabled_packages, 'apache') au BufNewFile,BufRead */etc/apache2/*.conf* call s:StarSetf('apache') endif -if !has_key(s:disabled_packages, 'ant') +if polyglot#util#IsEnabled('ant', 'ftdetect') au BufNewFile,BufRead build.xml setf ant endif -if !has_key(s:disabled_packages, 'xml') +if polyglot#util#IsEnabled('xml', 'ftdetect') au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml endif -if !has_key(s:disabled_packages, 'csv') +if polyglot#util#IsEnabled('csv', 'ftdetect') au BufNewFile,BufRead *.csv,*.tab,*.tsv setf csv endif -if !has_key(s:disabled_packages, 'ampl') +if polyglot#util#IsEnabled('ampl', 'ftdetect') " AMPL au BufNewFile,BufRead *.run setf ampl endif -if !has_key(s:disabled_packages, 'aml') +if polyglot#util#IsEnabled('aml', 'ftdetect') au BufNewFile,BufRead *.aml setf aml endif -if !has_key(s:disabled_packages, 'alsaconf') +if polyglot#util#IsEnabled('alsaconf', 'ftdetect') au BufNewFile,BufRead */etc/asound.conf,*/usr/share/alsa/alsa.conf,{.,}asoundrc setf alsaconf endif -if !has_key(s:disabled_packages, 'conf') +if polyglot#util#IsEnabled('conf', 'ftdetect') au BufNewFile,BufRead *.conf,*/etc/hosts,auto.master,config setf conf endif -if !has_key(s:disabled_packages, 'master') +if polyglot#util#IsEnabled('master', 'ftdetect') au BufNewFile,BufRead *.mas,*.master setf master endif -if !has_key(s:disabled_packages, 'aidl') +if polyglot#util#IsEnabled('aidl', 'ftdetect') " AIDL au BufNewFile,BufRead *.aidl setf aidl endif -if !has_key(s:disabled_packages, 'ahdl') +if polyglot#util#IsEnabled('ahdl', 'ftdetect') " AHDL au BufNewFile,BufRead *.tdf setf ahdl endif -if !has_key(s:disabled_packages, 'ada') +if polyglot#util#IsEnabled('ada', 'ftdetect') " Ada (83, 9X, 95) au BufNewFile,BufRead *.ada,*.ada_m,*.adb,*.adc,*.ads,*.gpr setf ada endif -if !has_key(s:disabled_packages, 'acpiasl') +if polyglot#util#IsEnabled('acpiasl', 'ftdetect') au BufNewFile,BufRead *.asl,*.dsl setf asl endif -if !has_key(s:disabled_packages, 'acedb') +if polyglot#util#IsEnabled('acedb', 'ftdetect') " AceDB au BufNewFile,BufRead *.wrm setf acedb endif -if !has_key(s:disabled_packages, 'abel') +if polyglot#util#IsEnabled('abel', 'ftdetect') " ABEL au BufNewFile,BufRead *.abl setf abel endif -if !has_key(s:disabled_packages, 'abc') +if polyglot#util#IsEnabled('abc', 'ftdetect') " ABC music notation au BufNewFile,BufRead *.abc setf abc endif -if !has_key(s:disabled_packages, 'abaqus') +if polyglot#util#IsEnabled('abaqus', 'ftdetect') au BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp() endif -if !has_key(s:disabled_packages, 'abap') +if polyglot#util#IsEnabled('abap', 'ftdetect') " ABAB/4 au BufNewFile,BufRead *.abap setf abap endif -if !has_key(s:disabled_packages, 'aap') +if polyglot#util#IsEnabled('aap', 'ftdetect') " A-A-P recipe au BufNewFile,BufRead *.aap setf aap endif -if !has_key(s:disabled_packages, 'a65') +if polyglot#util#IsEnabled('a65', 'ftdetect') " XA65 MOS6510 cross assembler au BufNewFile,BufRead *.a65 setf a65 endif -if !has_key(s:disabled_packages, 'a2ps') +if polyglot#util#IsEnabled('a2ps', 'ftdetect') au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,{.,}a2psrc,a2psrc setf a2ps endif -if !has_key(s:disabled_packages, 'cfg') +if polyglot#util#IsEnabled('cfg', 'ftdetect') au BufNewFile,BufRead *.cfg,*.hgrc,*hgrc setf cfg endif -if !has_key(s:disabled_packages, '8th') +if polyglot#util#IsEnabled('8th', 'ftdetect') " 8th (Firth-derivative) au BufNewFile,BufRead *.8th setf 8th endif @@ -2635,7 +2620,7 @@ au FileType * au! polyglot-observer augroup END -if !has_key(s:disabled_packages, 'autoindent') +if polyglot#util#IsEnabled('autoindent', 'ftdetect') " Code below re-implements sleuth for vim-polyglot let g:loaded_sleuth = 1 @@ -2873,24 +2858,7 @@ if !has_key(s:disabled_packages, 'autoindent') command! -bar -bang Sleuth call s:detect_indent() endif -func! s:verify() - if exists("g:polyglot_disabled_not_set") - if exists("g:polyglot_disabled") - echohl WarningMsg - echo "vim-polyglot: g:polyglot_disabled should be defined before loading vim-polyglot" - echohl None - endif - - unlet g:polyglot_disabled_not_set - endif -endfunc - -au VimEnter * call s:verify() - -" Save polyglot_disabled without postfixes -if exists('g:polyglot_disabled') - let g:polyglot_disabled = s:new_polyglot_disabled -endif +au VimEnter * call polyglot#util#Verify() augroup filetypedetect @@ -3486,14 +3454,14 @@ au BufNewFile,BufRead *.txt augroup END " Use the filetype detect plugins. They may overrule any of the previously -" detected filetypes. +" detected filetypes. No need to load if everything is enabled if exists("did_load_filetypes") && exists("g:polyglot_disabled") unlet did_load_filetypes runtime! extras/filetype.vim endif -if !has_key(s:disabled_packages, 'sensible') +if polyglot#util#IsEnabled('sensible', 'ftdetect') " Reload unchanged files automatically. set autoread diff --git a/ftplugin/8th.vim b/ftplugin/8th.vim index befe694b..5199a7bf 100644 --- a/ftplugin/8th.vim +++ b/ftplugin/8th.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/8th.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('8th', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 " Vim ftplugin file " Language: 8th @@ -32,5 +27,3 @@ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 setlocal suffixesadd=.8th - -endif diff --git a/ftplugin/a2ps.vim b/ftplugin/a2ps.vim index d92fdf64..dfcefea7 100644 --- a/ftplugin/a2ps.vim +++ b/ftplugin/a2ps.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/a2ps.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('a2ps', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 " Vim filetype plugin file " Language: a2ps(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/aap.vim b/ftplugin/aap.vim index 2d900318..00588ae9 100644 --- a/ftplugin/aap.vim +++ b/ftplugin/aap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/aap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 " Vim filetype plugin file " Language: Aap recipe @@ -32,5 +27,3 @@ setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- " Expand tabs to spaces to avoid trouble. setlocal expandtab - -endif diff --git a/ftplugin/abap.vim b/ftplugin/abap.vim index 96ab0d56..eced7b2b 100644 --- a/ftplugin/abap.vim +++ b/ftplugin/abap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/abap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 " Vim filetype plugin file " Language: ABAP @@ -36,5 +31,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/ftplugin/abaqus.vim b/ftplugin/abaqus.vim index 2214d4f4..fb3bd11e 100644 --- a/ftplugin/abaqus.vim +++ b/ftplugin/abaqus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/abaqus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abaqus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 " Vim filetype plugin file " Language: Abaqus finite element input file (www.abaqus.com) @@ -104,5 +99,3 @@ let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" " Restore saved compatibility options let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ada.vim b/ftplugin/ada.vim index 1d067182..62d252fd 100644 --- a/ftplugin/ada.vim +++ b/ftplugin/ada.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ada.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ada', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 "------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. @@ -217,5 +212,3 @@ finish " 1}}} "------------------------------------------------------------------------------ " vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker - -endif diff --git a/ftplugin/alsaconf.vim b/ftplugin/alsaconf.vim index a481b76a..093c2ab1 100644 --- a/ftplugin/alsaconf.vim +++ b/ftplugin/alsaconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/alsaconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('alsaconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 " Vim filetype plugin file " Language: alsaconf(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ansible.vim b/ftplugin/ansible.vim index cef2e9c4..e6676ccf 100644 --- a/ftplugin/ansible.vim +++ b/ftplugin/ansible.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ansible.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 set isfname+=@-@ set path+=./../templates,./../files,templates,files - -endif diff --git a/ftplugin/ansible_hosts.vim b/ftplugin/ansible_hosts.vim index 6f819a7e..d6854c20 100644 --- a/ftplugin/ansible_hosts.vim +++ b/ftplugin/ansible_hosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ansible_hosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 if exists("b:did_ftplugin") finish @@ -16,5 +11,3 @@ endif setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions-=c let b:undo_ftplugin = "setl comments< commentstring< formatoptions<" - -endif diff --git a/ftplugin/ant.vim b/ftplugin/ant.vim index 184818a5..799e03ec 100644 --- a/ftplugin/ant.vim +++ b/ftplugin/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim filetype plugin file " Language: ant @@ -51,5 +46,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/arch.vim b/ftplugin/arch.vim index 5910287e..755963a5 100644 --- a/ftplugin/arch.vim +++ b/ftplugin/arch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/arch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('arch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 " Vim filetype plugin file " Language: GNU Arch inventory file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/art.vim b/ftplugin/art.vim index edbc86a3..7b1c4398 100644 --- a/ftplugin/art.vim +++ b/ftplugin/art.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/art.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('art', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 " Vim filetype plugin " Language: ART-IM and ART*Enterprise @@ -22,5 +17,3 @@ run ftplugin/lisp.vim setl lw-=if setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while - -endif diff --git a/ftplugin/aspvbs.vim b/ftplugin/aspvbs.vim index 4899bfb3..03f38e29 100644 --- a/ftplugin/aspvbs.vim +++ b/ftplugin/aspvbs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/aspvbs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aspvbs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspvbs') == -1 " Vim filetype plugin file " Language: aspvbs @@ -67,5 +62,3 @@ let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/automake.vim b/ftplugin/automake.vim index ed47025c..f3e31757 100644 --- a/ftplugin/automake.vim +++ b/ftplugin/automake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/automake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('automake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 " Vim filetype plugin file " Language: Automake @@ -23,5 +18,3 @@ runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/awk.vim b/ftplugin/awk.vim index 9bbeb276..9ff6adf6 100644 --- a/ftplugin/awk.vim +++ b/ftplugin/awk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/awk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('awk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 " Vim filetype plugin " Language: awk, nawk, gawk, mawk @@ -62,5 +57,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8 - -endif diff --git a/ftplugin/bdf.vim b/ftplugin/bdf.vim index 74b50871..aaf1def0 100644 --- a/ftplugin/bdf.vim +++ b/ftplugin/bdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bdf') == -1 " Vim filetype plugin file " Language: BDF font definition @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/blade.vim b/ftplugin/blade.vim index 4fa102d9..ee75475e 100644 --- a/ftplugin/blade.vim +++ b/ftplugin/blade.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/blade.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('blade', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1 " Vim filetype plugin " Language: Blade (Laravel) @@ -40,5 +35,3 @@ if exists('loaded_matchit') && exists('b:match_words') let b:match_skip = 'synIDattr(synID(line("."), col("."), 0), "name") !=# "bladeKeyword"' let b:match_ignorecase = 0 endif - -endif diff --git a/ftplugin/bst.vim b/ftplugin/bst.vim index 2539a109..26555cc7 100644 --- a/ftplugin/bst.vim +++ b/ftplugin/bst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bst') == -1 " Vim filetype plugin file " Language: bst @@ -22,5 +17,3 @@ setlocal comments=:% setlocal fo-=t fo+=croql let b:undo_ftplugin = "setlocal com< cms< fo<" - -endif diff --git a/ftplugin/bzl.vim b/ftplugin/bzl.vim index 69c95d1d..71b7ceaa 100644 --- a/ftplugin/bzl.vim +++ b/ftplugin/bzl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bzl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bzl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bzl') == -1 " Vim filetype plugin file " Language: Bazel (http://bazel.io) @@ -101,5 +96,3 @@ endfunction let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/caddyfile.vim b/ftplugin/caddyfile.vim index f9725ee2..206ed69e 100644 --- a/ftplugin/caddyfile.vim +++ b/ftplugin/caddyfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/caddyfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('caddyfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 " Language: Caddyfile " Author: Josh Glendenning <josh@isobit.io> @@ -31,5 +26,3 @@ else let g:NERDCustomDelimiters = {'caddyfile': s:delimiters} endif unlet s:delimiters - -endif diff --git a/ftplugin/calendar.vim b/ftplugin/calendar.vim index 12f84394..73262759 100644 --- a/ftplugin/calendar.vim +++ b/ftplugin/calendar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/calendar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('calendar', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'calendar') == -1 " Vim filetype plugin file " Language: calendar(1) input file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cdrdaoconf.vim b/ftplugin/cdrdaoconf.vim index f048ef9f..1f6fccdf 100644 --- a/ftplugin/cdrdaoconf.vim +++ b/ftplugin/cdrdaoconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cdrdaoconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdrdaoconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdrdaoconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cfg.vim b/ftplugin/cfg.vim index 6ed841bb..2291a269 100644 --- a/ftplugin/cfg.vim +++ b/ftplugin/cfg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cfg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cfg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cfg') == -1 " Vim filetype plugin file " Language: Configuration File @@ -26,5 +21,3 @@ setlocal commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ch.vim b/ftplugin/ch.vim index cd71d7ec..95865364 100644 --- a/ftplugin/ch.vim +++ b/ftplugin/ch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ch') == -1 " Vim filetype plugin file " Language: Ch @@ -24,5 +19,3 @@ endif " Behaves just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim - -endif diff --git a/ftplugin/clojure.vim b/ftplugin/clojure.vim index 6862f35d..641aaac1 100644 --- a/ftplugin/clojure.vim +++ b/ftplugin/clojure.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/clojure.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clojure', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 " Vim filetype plugin file " Language: Clojure @@ -102,5 +97,3 @@ let &cpo = s:cpo_save unlet! s:cpo_save s:setting s:dir " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/ftplugin/cobol.vim b/ftplugin/cobol.vim index 1441dfb0..89bb817a 100644 --- a/ftplugin/cobol.vim +++ b/ftplugin/cobol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cobol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cobol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cobol') == -1 " Vim filetype plugin file " Language: cobol @@ -276,5 +271,3 @@ function! s:toend(direction) exe "keepjumps ".keep endif endfunction - -endif diff --git a/ftplugin/coffee.vim b/ftplugin/coffee.vim index 84fa245c..9a493b96 100644 --- a/ftplugin/coffee.vim +++ b/ftplugin/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -412,5 +407,3 @@ command! -buffer -range=% -bar -nargs=* CoffeeRun \ call s:CoffeeRun(<line1>, <line2>, <q-args>) command! -buffer -range=% -bang -bar -nargs=* CoffeeLint \ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>) - -endif diff --git a/ftplugin/conf.vim b/ftplugin/conf.vim index 244827cb..8ba8a0bd 100644 --- a/ftplugin/conf.vim +++ b/ftplugin/conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'conf') == -1 " Vim filetype plugin file " Language: generic configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/config.vim b/ftplugin/config.vim index dbd82347..dd85e65d 100644 --- a/ftplugin/config.vim +++ b/ftplugin/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('config', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'config') == -1 " Vim filetype plugin file " Language: config @@ -49,5 +44,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/crm.vim b/ftplugin/crm.vim index 0ca01cd8..46388ca1 100644 --- a/ftplugin/crm.vim +++ b/ftplugin/crm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/crm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crm') == -1 " Vim filetype plugin file " Language: CRM114 @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cryptol/folding.vim b/ftplugin/cryptol/folding.vim index 1dcdc109..717ecadb 100644 --- a/ftplugin/cryptol/folding.vim +++ b/ftplugin/cryptol/folding.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cryptol/folding.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cryptol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 " Copyright © 2013 Edward O'Callaghan. All Rights Reserved. @@ -53,5 +48,3 @@ function! GetPotionFold(lnum) return '>' . next_indent endif endfunction - -endif diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index 5f4e981b..7f391434 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 if exists('b:did_ftplugin') finish @@ -90,5 +85,3 @@ if exists('g:AutoPairsLoaded') endif " vim: sw=2 sts=2 et: - -endif diff --git a/ftplugin/cs.vim b/ftplugin/cs.vim index 9ee46231..cfefde11 100644 --- a/ftplugin/cs.vim +++ b/ftplugin/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim filetype plugin file " Language: C# @@ -36,5 +31,3 @@ endif let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/csc.vim b/ftplugin/csc.vim index b0648a81..a596b93d 100644 --- a/ftplugin/csc.vim +++ b/ftplugin/csc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/csc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csc') == -1 " Vim filetype plugin file " Language: csc @@ -34,5 +29,3 @@ let b:undo_ftplugin = "unlet! b:match_words" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/css.vim b/ftplugin/css.vim index 50d8f714..6c8a3562 100644 --- a/ftplugin/css.vim +++ b/ftplugin/css.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/css.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('css', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css') == -1 " Vim filetype plugin file " Language: CSS @@ -31,5 +26,3 @@ let &l:include = '^\s*@import\s\+\%(url(\)\=' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/csv.vim b/ftplugin/csv.vim index 40d5f95c..f479a6ff 100644 --- a/ftplugin/csv.vim +++ b/ftplugin/csv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/csv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt <cb@256bit.org> @@ -41,5 +36,3 @@ unlet s:cpo_save " Vim Modeline " {{{2 " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index 94246791..ab1e52fa 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim filetype plugin " Language: Cucumber @@ -157,5 +152,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:set sts=2 sw=2: - -endif diff --git a/ftplugin/cvsrc.vim b/ftplugin/cvsrc.vim index 84d059d7..a8049142 100644 --- a/ftplugin/cvsrc.vim +++ b/ftplugin/cvsrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cvsrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cvsrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cvsrc') == -1 " Vim filetype plugin file " Language: cvs(1) RC file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dart.vim b/ftplugin/dart.vim index 52ac5bae..b402543d 100644 --- a/ftplugin/dart.vim +++ b/ftplugin/dart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 if exists('b:did_ftplugin') finish @@ -37,5 +32,3 @@ setlocal isfname+=: setlocal iskeyword+=$ let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms< inex< isf<' - -endif diff --git a/ftplugin/debchangelog.vim b/ftplugin/debchangelog.vim index ba8b046b..13904dc9 100644 --- a/ftplugin/debchangelog.vim +++ b/ftplugin/debchangelog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/debchangelog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debchangelog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debchangelog') == -1 " Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog @@ -390,5 +385,3 @@ setlocal omnifunc=DebCompleteBugs " }}} " vim: set foldmethod=marker: - -endif diff --git a/ftplugin/debcontrol.vim b/ftplugin/debcontrol.vim index 767fbb8f..e6109e73 100644 --- a/ftplugin/debcontrol.vim +++ b/ftplugin/debcontrol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/debcontrol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debcontrol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debcontrol') == -1 " Vim filetype plugin file (GUI menu and folding) " Language: Debian control files @@ -77,5 +72,3 @@ function! DebControlFold(l) endfunction " }}}1 - -endif diff --git a/ftplugin/denyhosts.vim b/ftplugin/denyhosts.vim index 35f1245b..41a54a12 100644 --- a/ftplugin/denyhosts.vim +++ b/ftplugin/denyhosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/denyhosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('denyhosts', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'denyhosts') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dhall.vim b/ftplugin/dhall.vim index 76a6bd22..d0a702ea 100644 --- a/ftplugin/dhall.vim +++ b/ftplugin/dhall.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dhall.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dhall', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 if exists('b:dhall_ftplugin') finish @@ -50,5 +45,3 @@ if exists('g:dhall_format') endif au BufNewFile,BufRead *.dhall setl shiftwidth=2 - -endif diff --git a/ftplugin/dictconf.vim b/ftplugin/dictconf.vim index 2b5467ce..048a4918 100644 --- a/ftplugin/dictconf.vim +++ b/ftplugin/dictconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dictconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictconf') == -1 " Vim filetype plugin file " Language: dict(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dictdconf.vim b/ftplugin/dictdconf.vim index 2d404814..6b3c1174 100644 --- a/ftplugin/dictdconf.vim +++ b/ftplugin/dictdconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dictdconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictdconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictdconf') == -1 " Vim filetype plugin file " Language: dictd(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/diff.vim b/ftplugin/diff.vim index d6ff42bc..7a04c881 100644 --- a/ftplugin/diff.vim +++ b/ftplugin/diff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/diff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('diff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'diff') == -1 " Vim filetype plugin file " Language: Diff @@ -25,5 +20,3 @@ setlocal nomodeline " If there are comments they start with # let &commentstring = "# %s" - -endif diff --git a/ftplugin/dircolors.vim b/ftplugin/dircolors.vim index 9043b649..1ae60648 100644 --- a/ftplugin/dircolors.vim +++ b/ftplugin/dircolors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dircolors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dircolors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dircolors') == -1 " Vim filetype plugin file " Language: dircolors(1) input file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/docker-compose.vim b/ftplugin/docker-compose.vim index df33d6fd..89cc8647 100644 --- a/ftplugin/docker-compose.vim +++ b/ftplugin/docker-compose.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/docker-compose.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('docker-compose', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'docker-compose') == -1 " Define comment string setlocal commentstring=#\ %s " Enable automatic comment insertion setlocal formatoptions+=cro - -endif diff --git a/ftplugin/dockerfile.vim b/ftplugin/dockerfile.vim index 950a48bc..62d99f39 100644 --- a/ftplugin/dockerfile.vim +++ b/ftplugin/dockerfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dockerfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dockerfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 " Vim filetype plugin " Language: Dockerfile @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 let b:undo_ftplugin = "setl commentstring<" setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/dosbatch.vim b/ftplugin/dosbatch.vim index ada06865..902ed8f7 100644 --- a/ftplugin/dosbatch.vim +++ b/ftplugin/dosbatch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dosbatch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosbatch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosbatch') == -1 " Vim filetype plugin file " Language: MS-DOS .bat files @@ -47,5 +42,3 @@ let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dosini.vim b/ftplugin/dosini.vim index 1a841bf6..394b98bd 100644 --- a/ftplugin/dosini.vim +++ b/ftplugin/dosini.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dosini.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosini', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosini') == -1 " Vim filetype plugin file " Language: Configuration File (ini file) for MSDOS/MS Windows @@ -26,5 +21,3 @@ setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dtd.vim b/ftplugin/dtd.vim index 26ad5061..d428a845 100644 --- a/ftplugin/dtd.vim +++ b/ftplugin/dtd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dtd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dtd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dtd') == -1 " Vim filetype plugin file " Language: dtd @@ -47,5 +42,3 @@ let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/dune.vim b/ftplugin/dune.vim index fde69ca6..4454e1d2 100644 --- a/ftplugin/dune.vim +++ b/ftplugin/dune.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dune.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:did_ftplugin") finish @@ -17,5 +12,3 @@ set lisp " Comment string setl commentstring=;\ %s setl comments=:; - -endif diff --git a/ftplugin/ecrystal.vim b/ftplugin/ecrystal.vim index d4854095..5057546d 100644 --- a/ftplugin/ecrystal.vim +++ b/ftplugin/ecrystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ecrystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Filetype plugin for https://crystal-lang.org/api/0.35.1/ECR.html if exists('b:did_ftplugin') @@ -104,5 +99,3 @@ let b:undo_ftplugin = 'setlocal comments< commentstring< shiftwidth<' . \ '| unlet! b:browsefilter b:match_words ' . \ '| unlet! b:AutoPairs ' . \ '| ' . s:undo_ftplugin - -endif diff --git a/ftplugin/eelixir.vim b/ftplugin/eelixir.vim index 764ded0d..914a5d70 100644 --- a/ftplugin/eelixir.vim +++ b/ftplugin/eelixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eelixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("b:did_ftplugin") finish @@ -114,5 +109,3 @@ let b:undo_ftplugin = "setl cms< " . \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo - -endif diff --git a/ftplugin/elinks.vim b/ftplugin/elinks.vim index ed6cdd68..ca68f847 100644 --- a/ftplugin/elinks.vim +++ b/ftplugin/elinks.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/elinks.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elinks', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elinks') == -1 " Vim filetype plugin file " Language: elinks(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim index db05c990..d16a45d8 100644 --- a/ftplugin/elixir.vim +++ b/ftplugin/elixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/elixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('b:did_ftplugin') finish @@ -58,5 +53,3 @@ onoremap <buffer> <silent> <expr> [] ':silent keeppatterns ?'.b:block_end .'<CR let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< path< inex< sua< def< fo<'. \ '| unlet! b:match_ignorecase b:match_words b:block_begin b:block_end' - -endif diff --git a/ftplugin/embeddedpuppet.vim b/ftplugin/embeddedpuppet.vim index c369e5c3..344e93ae 100644 --- a/ftplugin/embeddedpuppet.vim +++ b/ftplugin/embeddedpuppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/embeddedpuppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim filetype plugin " Language: embedded puppet @@ -82,5 +77,3 @@ let b:undo_ftplugin = "setl cms< " let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/ember-script.vim b/ftplugin/ember-script.vim index 41f53442..792e3886 100644 --- a/ftplugin/ember-script.vim +++ b/ftplugin/ember-script.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ember-script.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emberscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> @@ -28,5 +23,3 @@ else endif setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/emblem.vim b/ftplugin/emblem.vim index 655c843b..3351f533 100644 --- a/ftplugin/emblem.vim +++ b/ftplugin/emblem.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/emblem.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emblem', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> @@ -24,5 +19,3 @@ setlocal smartindent setlocal formatoptions=q setlocal comments=:/ setlocal commentstring=/\ %s - -endif diff --git a/ftplugin/eruby.vim b/ftplugin/eruby.vim index 3dc549ed..f6a8e659 100644 --- a/ftplugin/eruby.vim +++ b/ftplugin/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim filetype plugin " Language: eRuby @@ -138,5 +133,3 @@ function! ErubyAtCursor() abort endfunction " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/ftplugin/eterm.vim b/ftplugin/eterm.vim index 135d75f8..fc163ccf 100644 --- a/ftplugin/eterm.vim +++ b/ftplugin/eterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('eterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'eterm') == -1 " Vim filetype plugin file " Language: eterm(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/falcon.vim b/ftplugin/falcon.vim index d278f58c..5eeab00f 100644 --- a/ftplugin/falcon.vim +++ b/ftplugin/falcon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/falcon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('falcon', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'falcon') == -1 " Vim filetype plugin file " Language: Falcon @@ -56,5 +51,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/ftplugin/fennel.vim b/ftplugin/fennel.vim index 5fb9afb6..926bc879 100644 --- a/ftplugin/fennel.vim +++ b/ftplugin/fennel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fennel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fennel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1 " Vim filetype plugin file " Language: FENNEL @@ -33,5 +28,3 @@ setlocal comments=n:; setlocal commentstring=;\ %s let &cpo = s:cpo_save - -endif diff --git a/ftplugin/fetchmail.vim b/ftplugin/fetchmail.vim index a995bdfd..eaaf3e25 100644 --- a/ftplugin/fetchmail.vim +++ b/ftplugin/fetchmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fetchmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fetchmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fetchmail') == -1 " Vim filetype plugin file " Language: fetchmail(1) RC File @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/fish.vim b/ftplugin/fish.vim index e79c0669..8ead1ce3 100644 --- a/ftplugin/fish.vim +++ b/ftplugin/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 setlocal comments=:# setlocal commentstring=#%s @@ -45,5 +40,3 @@ let b:match_words = let b:endwise_addition = 'end' let b:endwise_words = 'begin,function,if,switch,while,for' let b:endwise_syngroups = 'fishKeyword,fishConditional,fishRepeat' - -endif diff --git a/ftplugin/fortran.vim b/ftplugin/fortran.vim index 4c7d7cdf..b951347c 100644 --- a/ftplugin/fortran.vim +++ b/ftplugin/fortran.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fortran.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fortran', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1 " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) @@ -140,5 +135,3 @@ let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 - -endif diff --git a/ftplugin/framescript.vim b/ftplugin/framescript.vim index 4ad99bf3..514f3c94 100644 --- a/ftplugin/framescript.vim +++ b/ftplugin/framescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/framescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('framescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'framescript') == -1 " Vim ftplugin file " Language: FrameScript @@ -37,5 +32,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/fvwm.vim b/ftplugin/fvwm.vim index 201a28b5..0f6de2db 100644 --- a/ftplugin/fvwm.vim +++ b/ftplugin/fvwm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fvwm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fvwm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fvwm') == -1 " Created : Tue 09 May 2006 02:07:31 PM CDT " Modified : Tue 09 May 2006 02:07:31 PM CDT @@ -21,5 +16,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql - -endif diff --git a/ftplugin/gdb.vim b/ftplugin/gdb.vim index 1f4ed1a8..03fe2565 100644 --- a/ftplugin/gdb.vim +++ b/ftplugin/gdb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gdb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdb') == -1 " Vim filetype plugin file " Language: gdb @@ -19,5 +14,3 @@ setlocal commentstring=#%s " Undo the stuff we changed. let b:undo_ftplugin = "setlocal cms<" - -endif diff --git a/ftplugin/git.vim b/ftplugin/git.vim index 78352e84..13ae96b6 100644 --- a/ftplugin/git.vim +++ b/ftplugin/git.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/git.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: generic git output @@ -48,5 +43,3 @@ endif setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" - -endif diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index cc5c4208..47f82b17 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git commit file @@ -74,5 +69,3 @@ function! s:gitdiffcached(bang,gitdir,...) nnoremap <buffer> <silent> q :q<CR> setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git endfunction - -endif diff --git a/ftplugin/gitconfig.vim b/ftplugin/gitconfig.vim index f9a935d9..44f66a29 100644 --- a/ftplugin/gitconfig.vim +++ b/ftplugin/gitconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git config file @@ -22,5 +17,3 @@ setlocal formatoptions-=t formatoptions+=croql setlocal comments=:#,:; commentstring=;\ %s let b:undo_ftplugin = "setl fo< com< cms<" - -endif diff --git a/ftplugin/gitignore.vim b/ftplugin/gitignore.vim index ce45c58f..48495472 100644 --- a/ftplugin/gitignore.vim +++ b/ftplugin/gitignore.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitignore.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitignore', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1 scriptencoding utf-8 @@ -23,5 +18,3 @@ setlocal commentstring=#\ %s let b:undo_ftplugin = 'setlocal commentstring<' " vim: ts=2 et sw=2 - -endif diff --git a/ftplugin/gitrebase.vim b/ftplugin/gitrebase.vim index 8e217806..c07554e0 100644 --- a/ftplugin/gitrebase.vim +++ b/ftplugin/gitrebase.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitrebase.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git rebase --interactive @@ -55,5 +50,3 @@ nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR> nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR> let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'" - -endif diff --git a/ftplugin/gitsendemail.vim b/ftplugin/gitsendemail.vim index 1ef62bd3..a8e26995 100644 --- a/ftplugin/gitsendemail.vim +++ b/ftplugin/gitsendemail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitsendemail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git send-email message @@ -13,5 +8,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Last Change: 2009 Dec 24 runtime! ftplugin/mail.vim - -endif diff --git a/ftplugin/gpg.vim b/ftplugin/gpg.vim index 8d142e8b..9089768c 100644 --- a/ftplugin/gpg.vim +++ b/ftplugin/gpg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gpg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gpg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gpg') == -1 " Vim filetype plugin file " Language: gpg(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/graphql.vim b/ftplugin/graphql.vim index 6a3cbf30..56b29f89 100644 --- a/ftplugin/graphql.vim +++ b/ftplugin/graphql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/graphql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -44,5 +39,3 @@ setlocal shiftwidth=2 setlocal expandtab let b:undo_ftplugin = 'setlocal com< cms< fo< isk< sts< sw< et<' - -endif diff --git a/ftplugin/groovy.vim b/ftplugin/groovy.vim index ae879781..cf78a14e 100644 --- a/ftplugin/groovy.vim +++ b/ftplugin/groovy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/groovy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('groovy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'groovy') == -1 " Vim filetype plugin file " Language: groovy @@ -26,5 +21,3 @@ setlocal commentstring=//%s let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/group.vim b/ftplugin/group.vim index 92aa848f..357f43cf 100644 --- a/ftplugin/group.vim +++ b/ftplugin/group.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/group.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('group', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'group') == -1 " Vim filetype plugin file " Language: group(5) user group file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/grub.vim b/ftplugin/grub.vim index fe1a3fbd..d707032b 100644 --- a/ftplugin/grub.vim +++ b/ftplugin/grub.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/grub.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('grub', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 " Vim filetype plugin file " Language: grub(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/haml.vim b/ftplugin/haml.vim index c262cc3a..95b57af6 100644 --- a/ftplugin/haml.vim +++ b/ftplugin/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim filetype plugin " Language: Haml @@ -78,5 +73,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:set sw=2: - -endif diff --git a/ftplugin/hamster.vim b/ftplugin/hamster.vim index 341a762d..78077433 100644 --- a/ftplugin/hamster.vim +++ b/ftplugin/hamster.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hamster.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hamster', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1 " Vim filetype plugin " Language: Hamster Script @@ -69,5 +64,3 @@ setlocal ignorecase let &cpo = s:cpo_save unlet s:cpo_save setlocal cpo+=M " makes \%( match \) - -endif diff --git a/ftplugin/handlebars.vim b/ftplugin/handlebars.vim index 2dfb1aeb..0ebcc9b7 100644 --- a/ftplugin/handlebars.vim +++ b/ftplugin/handlebars.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/handlebars.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 if exists('b:loaded_mustache_handlebars') finish @@ -130,5 +125,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nofoldenable - -endif diff --git a/ftplugin/hcl.vim b/ftplugin/hcl.vim index 1c5a830a..8c55f9a5 100644 --- a/ftplugin/hcl.vim +++ b/ftplugin/hcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 " File: ftplugin/hcl.vim " Author: BABAROT <b4b4r07@gmail.com> @@ -44,5 +39,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim: set et sw=4 ts=4: - -endif diff --git a/ftplugin/help.vim b/ftplugin/help.vim index b320d73a..dcb63826 100644 --- a/ftplugin/help.vim +++ b/ftplugin/help.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/help.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('help', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 " Vim filetype plugin file " Language: Vim help file @@ -104,5 +99,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hgcommit.vim b/ftplugin/hgcommit.vim index fbcf6143..d101a625 100644 --- a/ftplugin/hgcommit.vim +++ b/ftplugin/hgcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hgcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hgcommit', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hgcommit') == -1 " Vim filetype plugin file " Language: hg (Mercurial) commit file @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 setlocal nomodeline let b:undo_ftplugin = 'setl modeline<' - -endif diff --git a/ftplugin/hive.vim b/ftplugin/hive.vim index f5884dd8..e1fe2dff 100644 --- a/ftplugin/hive.vim +++ b/ftplugin/hive.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hive.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hive', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hive') == -1 setlocal comments=:-- setlocal commentstring=--\ %s - -endif diff --git a/ftplugin/hog.vim b/ftplugin/hog.vim index edceb700..4b198d70 100644 --- a/ftplugin/hog.vim +++ b/ftplugin/hog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hog') == -1 " Vim filetype plugin " Language: hog (snort.conf) @@ -46,5 +41,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hostconf.vim b/ftplugin/hostconf.vim index badef7ee..bb680b8e 100644 --- a/ftplugin/hostconf.vim +++ b/ftplugin/hostconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hostconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hostsaccess.vim b/ftplugin/hostsaccess.vim index 60216fac..1617577b 100644 --- a/ftplugin/hostsaccess.vim +++ b/ftplugin/hostsaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hostsaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostsaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostsaccess') == -1 " Vim filetype plugin file " Language: hosts_access(5) control file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/html.vim b/ftplugin/html.vim index df1e6a28..b48d0cd7 100644 --- a/ftplugin/html.vim +++ b/ftplugin/html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1 " Vim filetype plugin file " Language: html @@ -58,5 +53,3 @@ let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< f " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/htmldjango.vim b/ftplugin/htmldjango.vim index 3e512e67..6da812a4 100644 --- a/ftplugin/htmldjango.vim +++ b/ftplugin/htmldjango.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/htmldjango.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 " Vim filetype plugin file " Language: Django HTML template @@ -20,5 +15,3 @@ endif " Use HTML and Django template ftplugins. runtime! ftplugin/html.vim runtime! ftplugin/django.vim - -endif diff --git a/ftplugin/i3config.vim b/ftplugin/i3config.vim index 36b8b8f9..dc4182fb 100644 --- a/ftplugin/i3config.vim +++ b/ftplugin/i3config.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/i3config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('i3', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'i3') == -1 setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/idris.vim b/ftplugin/idris.vim index 9827033b..f3201a08 100644 --- a/ftplugin/idris.vim +++ b/ftplugin/idris.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/idris.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 if bufname('%') == "idris-response" finish @@ -349,5 +344,3 @@ menu Idris.Proof\ Search\ with\ hints <LocalLeader>p au BufHidden idris-response call IdrisHideResponseWin() au BufEnter idris-response call IdrisShowResponseWin() - -endif diff --git a/ftplugin/idris2.vim b/ftplugin/idris2.vim index 89395311..97337057 100644 --- a/ftplugin/idris2.vim +++ b/ftplugin/idris2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/idris2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 if bufname('%') == "idris-response" finish @@ -337,5 +332,3 @@ menu Idris.Proof\ Search\ with\ hints <LocalLeader>p au BufHidden idris-response call IdrisHideResponseWin() au BufEnter idris-response call IdrisShowResponseWin() - -endif diff --git a/ftplugin/indent.vim b/ftplugin/indent.vim index 5a0d6c35..d3ee4f74 100644 --- a/ftplugin/indent.vim +++ b/ftplugin/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'indent') == -1 " Vim filetype plugin file " Language: indent(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ion.vim b/ftplugin/ion.vim index 9db5c7a2..8835e291 100644 --- a/ftplugin/ion.vim +++ b/ftplugin/ion.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ion.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ion', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ion') == -1 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s - -endif diff --git a/ftplugin/j.vim b/ftplugin/j.vim index 577cbd9d..4b4669ff 100644 --- a/ftplugin/j.vim +++ b/ftplugin/j.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/j.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('j', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'j') == -1 " Vim filetype plugin " Language: J @@ -88,5 +83,3 @@ endif let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/java.vim b/ftplugin/java.vim index 82953812..5a7dc9e0 100644 --- a/ftplugin/java.vim +++ b/ftplugin/java.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/java.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('java', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'java') == -1 " Vim filetype plugin file " Language: Java @@ -58,5 +53,3 @@ let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/jproperties.vim b/ftplugin/jproperties.vim index 5839c997..b67a00c3 100644 --- a/ftplugin/jproperties.vim +++ b/ftplugin/jproperties.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jproperties.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jproperties', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jproperties') == -1 " Vim filetype plugin " Language: Java properties file @@ -22,5 +17,3 @@ setlocal comments=:#,:! setlocal commentstring=#\ %s let b:undo_ftplugin = "setl cms< com< fo<" - -endif diff --git a/ftplugin/jq.vim b/ftplugin/jq.vim index fab7f20f..ae05d442 100644 --- a/ftplugin/jq.vim +++ b/ftplugin/jq.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jq.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jq', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jq') == -1 setlocal commentstring=#%s - -endif diff --git a/ftplugin/json.vim b/ftplugin/json.vim index 9b2d9056..f55b4b0a 100644 --- a/ftplugin/json.vim +++ b/ftplugin/json.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/json.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('json', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json') == -1 " Vim syntax file " Language: JSON @@ -45,5 +40,3 @@ if has('conceal') "maybe g:vim_json_syntax_conceal could be settable to 0,1,2 to map "directly to vim's conceallevels? unsure if anyone cares endif - -endif diff --git a/ftplugin/jsonnet.vim b/ftplugin/jsonnet.vim index 4c35558e..00dcfb7c 100644 --- a/ftplugin/jsonnet.vim +++ b/ftplugin/jsonnet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jsonnet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsonnet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 @@ -16,5 +11,3 @@ command! -nargs=0 JsonnetFmt call jsonnet#Format() setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/jsp.vim b/ftplugin/jsp.vim index 9e186dc5..68e9e03b 100644 --- a/ftplugin/jsp.vim +++ b/ftplugin/jsp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jsp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsp') == -1 " Vim filetype plugin file " Language: jsp @@ -74,5 +69,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 48845421..cc353099 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/julia.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim filetype plugin file " Language: Julia @@ -122,5 +117,3 @@ let b:undo_ftplugin .= " | delcommand JuliaDoc | delcommand JuliaDocKeywordprg" let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/juliadoc.vim b/ftplugin/juliadoc.vim index 9212e287..d961f697 100644 --- a/ftplugin/juliadoc.vim +++ b/ftplugin/juliadoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/juliadoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim filetype plugin file " Language: Julia document @@ -37,5 +32,3 @@ let b:undo_ftplugin .= " | delcommand JuliaDoc | delcommand JuliaDocKeywordprg" let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/kconfig.vim b/ftplugin/kconfig.vim index 970e4abe..a02b473a 100644 --- a/ftplugin/kconfig.vim +++ b/ftplugin/kconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kconfig') == -1 " Vim filetype plugin file " Vim syntax file @@ -34,5 +29,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/kotlin.vim b/ftplugin/kotlin.vim index a9eb39cf..5e04d995 100644 --- a/ftplugin/kotlin.vim +++ b/ftplugin/kotlin.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kotlin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kotlin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1 if exists('b:did_ftplugin') | finish | endif let b:did_ftplugin = 1 setlocal comments=:// setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/kwt.vim b/ftplugin/kwt.vim index 49953976..2a546459 100644 --- a/ftplugin/kwt.vim +++ b/ftplugin/kwt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kwt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kwt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kwt') == -1 " Vim filetype plugin file " Language: Kimwitu++ @@ -39,5 +34,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ld.vim b/ftplugin/ld.vim index 1b9730d9..a748663c 100644 --- a/ftplugin/ld.vim +++ b/ftplugin/ld.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ld.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ld', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ld') == -1 " Vim filetype plugin file " Language: ld(1) script @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/less.vim b/ftplugin/less.vim index 1eabb7b3..87b66ecf 100644 --- a/ftplugin/less.vim +++ b/ftplugin/less.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/less.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('less', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 " Vim filetype plugin " Language: less @@ -27,5 +22,3 @@ setlocal comments=:// commentstring=//\ %s setlocal omnifunc=csscomplete#CompleteCSS setlocal suffixesadd=.less - -endif diff --git a/ftplugin/lftp.vim b/ftplugin/lftp.vim index 4f246ecd..0088fab0 100644 --- a/ftplugin/lftp.vim +++ b/ftplugin/lftp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lftp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lftp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lftp') == -1 " Vim filetype plugin file " Language: lftp(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/libao.vim b/ftplugin/libao.vim index 154ac0ce..9829dfa1 100644 --- a/ftplugin/libao.vim +++ b/ftplugin/libao.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/libao.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('libao', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'libao') == -1 " Vim filetype plugin file " Language: libao.conf(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/lilypond.vim b/ftplugin/lilypond.vim index 0f19b5cf..21b38497 100644 --- a/ftplugin/lilypond.vim +++ b/ftplugin/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond filetype plugin " Language: LilyPond (ft=ly) @@ -64,5 +59,3 @@ setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond setlocal complete-=k complete+=k " setlocal showmatch - -endif diff --git a/ftplugin/limits.vim b/ftplugin/limits.vim index 6990030f..82828bb2 100644 --- a/ftplugin/limits.vim +++ b/ftplugin/limits.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/limits.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('limits', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'limits') == -1 " Vim filetype plugin file " Language: limits(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/liquid.vim b/ftplugin/liquid.vim index 75b093b9..1b8a5d05 100644 --- a/ftplugin/liquid.vim +++ b/ftplugin/liquid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/liquid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('liquid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1 " Vim filetype plugin " Language: Liquid @@ -68,5 +63,3 @@ endif setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words' - -endif diff --git a/ftplugin/lisp.vim b/ftplugin/lisp.vim index d706128c..c6b097b1 100644 --- a/ftplugin/lisp.vim +++ b/ftplugin/lisp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lisp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lisp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lisp') == -1 " Vim filetype plugin " Language: Lisp @@ -33,5 +28,3 @@ setl commentstring=;%s setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" - -endif diff --git a/ftplugin/litcoffee.vim b/ftplugin/litcoffee.vim index 6b70fe8b..75af16cd 100644 --- a/ftplugin/litcoffee.vim +++ b/ftplugin/litcoffee.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/litcoffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 runtime ftplugin/coffee.vim - -endif diff --git a/ftplugin/llvm.vim b/ftplugin/llvm.vim index dcb43a4b..67da6358 100644 --- a/ftplugin/llvm.vim +++ b/ftplugin/llvm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/llvm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim filetype plugin file " Language: LLVM Assembly @@ -19,5 +14,3 @@ let b:did_ftplugin = 1 setlocal softtabstop=2 shiftwidth=2 setlocal expandtab setlocal comments+=:; - -endif diff --git a/ftplugin/logcheck.vim b/ftplugin/logcheck.vim index fb90af64..c69142ae 100644 --- a/ftplugin/logcheck.vim +++ b/ftplugin/logcheck.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logcheck.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logcheck', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logcheck') == -1 " Vim filetype plugin file " Language: Logcheck @@ -24,5 +19,3 @@ let b:undo_ftplugin = 'setl fo<' " Do not hard-wrap non-comment lines since each line is a self-contained " regular expression setlocal formatoptions-=t - -endif diff --git a/ftplugin/loginaccess.vim b/ftplugin/loginaccess.vim index c9834df2..5ad28b4c 100644 --- a/ftplugin/loginaccess.vim +++ b/ftplugin/loginaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/loginaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('loginaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'loginaccess') == -1 " Vim filetype plugin file " Language: login.access(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/logindefs.vim b/ftplugin/logindefs.vim index 97ba09fc..5c8f91d8 100644 --- a/ftplugin/logindefs.vim +++ b/ftplugin/logindefs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logindefs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logindefs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logindefs') == -1 " Vim filetype plugin file " Language: login.defs(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/logtalk.vim b/ftplugin/logtalk.vim index b4b58d36..2c75d4b5 100644 --- a/ftplugin/logtalk.vim +++ b/ftplugin/logtalk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logtalk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logtalk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logtalk') == -1 " Logtalk filetype plugin file " Language: Logtalk @@ -26,5 +21,3 @@ setlocal fdn=10 setlocal fdc=2 setlocal autoindent setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict - -endif diff --git a/ftplugin/lprolog.vim b/ftplugin/lprolog.vim index bdd1d5b1..ca24c8d5 100644 --- a/ftplugin/lprolog.vim +++ b/ftplugin/lprolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lprolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lprolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lprolog') == -1 " Vim settings file " Language: LambdaProlog (Teyjus) @@ -44,5 +39,3 @@ if !exists("no_plugin_maps") && !exists("no_lprolog_maps") vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`< vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< endif - -endif diff --git a/ftplugin/ls.vim b/ftplugin/ls.vim index eb3cc517..98542222 100644 --- a/ftplugin/ls.vim +++ b/ftplugin/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " Maintainer: George Zahariev @@ -211,5 +206,3 @@ command! -range=% -bar -nargs=* -complete=customlist,s:LiveScriptCompileComplete \ LiveScriptCompile call s:LiveScriptCompile(<line1>, <line2>, <q-args>) " Run some LiveScript. command! -range=% -bar LiveScriptRun <line1>,<line2>:w !lsc -sp - -endif diff --git a/ftplugin/m4.vim b/ftplugin/m4.vim index 7ead0f44..51c935ae 100644 --- a/ftplugin/m4.vim +++ b/ftplugin/m4.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/m4.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('m4', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 " Vim filetype plugin file " Language: m4 @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mail.vim b/ftplugin/mail.vim index 0fd2e39d..eb2bf8b4 100644 --- a/ftplugin/mail.vim +++ b/ftplugin/mail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mail') == -1 " Vim filetype plugin file " Language: Mail @@ -45,5 +40,3 @@ if !exists("no_plugin_maps") && !exists("no_mail_maps") vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>`` nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>`` endif - -endif diff --git a/ftplugin/mailaliases.vim b/ftplugin/mailaliases.vim index ed8ed24c..7fd68c4a 100644 --- a/ftplugin/mailaliases.vim +++ b/ftplugin/mailaliases.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mailaliases.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailaliases', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailaliases') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mailcap.vim b/ftplugin/mailcap.vim index c3f7d665..a47cf59c 100644 --- a/ftplugin/mailcap.vim +++ b/ftplugin/mailcap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mailcap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailcap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailcap') == -1 " Vim filetype plugin file " Language: Mailcap configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/make.vim b/ftplugin/make.vim index a077f521..02b0e320 100644 --- a/ftplugin/make.vim +++ b/ftplugin/make.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/make.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('make', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1 " Vim filetype plugin file " Language: Make @@ -40,5 +35,3 @@ let &l:include = '^\s*include' 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 diff --git a/ftplugin/mako.vim b/ftplugin/mako.vim index 48cc40a1..c68d6d67 100644 --- a/ftplugin/mako.vim +++ b/ftplugin/mako.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mako.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mako', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1 " Vim filetype plugin file " Language: Mako @@ -26,5 +21,3 @@ if exists("loaded_matchit") \ "<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>," . \ "<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>" endif - -endif diff --git a/ftplugin/manconf.vim b/ftplugin/manconf.vim index 34b0173b..51490f66 100644 --- a/ftplugin/manconf.vim +++ b/ftplugin/manconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/manconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('manconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'manconf') == -1 " Vim filetype plugin file " Language: man.conf(5) - man configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 4209f306..03530bc9 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/markdown.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('markdown', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 "TODO print messages when on visual mode. I only see VISUAL, not the messages. @@ -884,5 +879,3 @@ augroup Mkd autocmd InsertEnter,InsertLeave <buffer> call s:MarkdownRefreshSyntax(0) autocmd CursorHold,CursorHoldI <buffer> call s:MarkdownRefreshSyntax(0) augroup END - -endif diff --git a/ftplugin/meson.vim b/ftplugin/meson.vim index 41daf3ee..75c9d90d 100644 --- a/ftplugin/meson.vim +++ b/ftplugin/meson.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/meson.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('meson', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1 " Vim filetype plugin file " Language: meson @@ -26,5 +21,3 @@ setlocal softtabstop=2 let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/mf.vim b/ftplugin/mf.vim index 395ebe46..06af3469 100644 --- a/ftplugin/mf.vim +++ b/ftplugin/mf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mf') == -1 " Vim filetype plugin file " Language: METAFONT @@ -77,5 +72,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mma.vim b/ftplugin/mma.vim index c173a1a2..2dc9cd61 100644 --- a/ftplugin/mma.vim +++ b/ftplugin/mma.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mma.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mathematica', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1 "Vim filetype plugin " Language: Mathematica @@ -66,5 +61,3 @@ unlet s:cpo_save "} " vim: set foldmarker={,} foldlevel=0 foldmethod=marker: - -endif diff --git a/ftplugin/modconf.vim b/ftplugin/modconf.vim index 121cf3f8..26eb4a88 100644 --- a/ftplugin/modconf.vim +++ b/ftplugin/modconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/modconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('modconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'modconf') == -1 " Vim filetype plugin file " Language: modules.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/moon.vim b/ftplugin/moon.vim index 997facd7..a4c0140f 100644 --- a/ftplugin/moon.vim +++ b/ftplugin/moon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/moon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('moonscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 " Language: MoonScript " Maintainer: leafo <leafot@gmail.com> @@ -23,5 +18,3 @@ setlocal comments=:-- setlocal commentstring=--\ %s let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" - -endif diff --git a/ftplugin/mp.vim b/ftplugin/mp.vim index 18d539cb..d73c51ac 100644 --- a/ftplugin/mp.vim +++ b/ftplugin/mp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mp') == -1 " Vim filetype plugin file " Language: MetaPost @@ -89,5 +84,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mplayerconf.vim b/ftplugin/mplayerconf.vim index 0a9a5b97..34166238 100644 --- a/ftplugin/mplayerconf.vim +++ b/ftplugin/mplayerconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mplayerconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mplayerconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mplayerconf') == -1 " Vim filetype plugin file " Language: mplayer(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mrxvtrc.vim b/ftplugin/mrxvtrc.vim index 66ed311c..6af76527 100644 --- a/ftplugin/mrxvtrc.vim +++ b/ftplugin/mrxvtrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mrxvtrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mrxvtrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mrxvtrc') == -1 " Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Fri 28 Apr 2006 03:24:01 AM CDT @@ -29,5 +24,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:!,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql - -endif diff --git a/ftplugin/mustache.vim b/ftplugin/mustache.vim index c6d4b22d..c494c195 100644 --- a/ftplugin/mustache.vim +++ b/ftplugin/mustache.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mustache.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 runtime! ftplugin/handlebars*.vim ftplugin/handlebars/*.vim - -endif diff --git a/ftplugin/muttrc.vim b/ftplugin/muttrc.vim index 6efb6fe2..cd4321be 100644 --- a/ftplugin/muttrc.vim +++ b/ftplugin/muttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/muttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('muttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'muttrc') == -1 " Vim filetype plugin file " Language: mutt RC File @@ -29,5 +24,3 @@ let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/nanorc.vim b/ftplugin/nanorc.vim index d496dbe4..f558d671 100644 --- a/ftplugin/nanorc.vim +++ b/ftplugin/nanorc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nanorc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nanorc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nanorc') == -1 " Vim filetype plugin file " Language: nanorc(5) - GNU nano configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/neomuttrc.vim b/ftplugin/neomuttrc.vim index ef375cbd..a20c2c4d 100644 --- a/ftplugin/neomuttrc.vim +++ b/ftplugin/neomuttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/neomuttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('neomuttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'neomuttrc') == -1 " Vim filetype plugin file " Language: NeoMutt RC File @@ -30,5 +25,3 @@ let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/netrc.vim b/ftplugin/netrc.vim index 8f3ab865..73eeeee1 100644 --- a/ftplugin/netrc.vim +++ b/ftplugin/netrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/netrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('netrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'netrc') == -1 " Vim filetype plugin file " Language: netrc(5) configuration file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/nginx.vim b/ftplugin/nginx.vim index ac28682b..4befc51b 100644 --- a/ftplugin/nginx.vim +++ b/ftplugin/nginx.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nginx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nginx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1 setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/nix.vim b/ftplugin/nix.vim index c54c8234..9b998729 100644 --- a/ftplugin/nix.vim +++ b/ftplugin/nix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 " Vim filetype plugin " Language: Nix @@ -28,5 +23,3 @@ if get(g:, 'nix_recommended_style', 1) \ softtabstop=2 \ expandtab endif - -endif diff --git a/ftplugin/nroff.vim b/ftplugin/nroff.vim index 2487c431..1d56daa9 100644 --- a/ftplugin/nroff.vim +++ b/ftplugin/nroff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nroff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nroff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1 " Vim filetype plugin " Language: roff(7) @@ -18,5 +13,3 @@ endif let b:did_ftplugin = 1 setlocal commentstring=.\\\"%s - -endif diff --git a/ftplugin/nsis.vim b/ftplugin/nsis.vim index eecf536f..697f2d67 100644 --- a/ftplugin/nsis.vim +++ b/ftplugin/nsis.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nsis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nsis', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nsis') == -1 " Vim ftplugin file " Language: NSIS script @@ -50,5 +45,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/oasis.vim b/ftplugin/oasis.vim index d8f3988c..cfe932fe 100644 --- a/ftplugin/oasis.vim +++ b/ftplugin/oasis.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/oasis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/objc.vim b/ftplugin/objc.vim index 6f690a03..2d108e5b 100644 --- a/ftplugin/objc.vim +++ b/ftplugin/objc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/objc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('objc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 " Use C++ style comment strings with commentary.vim setl commentstring=//%s @@ -13,5 +8,3 @@ setl commentstring=//%s " Search for include files inside frameworks (used for gf etc.) setl includeexpr=substitute(v:fname,'\\([^/]\\+\\)/\\(.\\+\\)','/System/Library/Frameworks/\\1.framework/Headers/\\2','') - -endif diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim index c3d952de..d9e56533 100644 --- a/ftplugin/ocaml.vim +++ b/ftplugin/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Language: OCaml " Maintainer: David Baelde <firstname.name@ens-lyon.org> @@ -648,5 +643,3 @@ let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 fdm=indent - -endif diff --git a/ftplugin/ocamlbuild_tags.vim b/ftplugin/ocamlbuild_tags.vim index 75167bf7..cfe932fe 100644 --- a/ftplugin/ocamlbuild_tags.vim +++ b/ftplugin/ocamlbuild_tags.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ocamlbuild_tags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/occam.vim b/ftplugin/occam.vim index 4a6d6aa9..766c71fb 100644 --- a/ftplugin/occam.vim +++ b/ftplugin/occam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/occam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('occam', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'occam') == -1 " Vim filetype plugin file " Language: occam @@ -56,5 +51,3 @@ let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<" let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/omake.vim b/ftplugin/omake.vim index 7b04a99a..e75e09b3 100644 --- a/ftplugin/omake.vim +++ b/ftplugin/omake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/omake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim filetype plugin file " Language: OMake @@ -31,5 +26,3 @@ setlocal expandtab " Including files. let &l:include = '^\s*include' - -endif diff --git a/ftplugin/opencl.vim b/ftplugin/opencl.vim index 93132f10..ab894361 100644 --- a/ftplugin/opencl.vim +++ b/ftplugin/opencl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/opencl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('opencl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1 if exists("b:did_ftplugin") | finish | endif @@ -22,5 +17,3 @@ setlocal smarttab setlocal smartindent let b:did_ftplugin = 1 - -endif diff --git a/ftplugin/pamconf.vim b/ftplugin/pamconf.vim index 548c262a..09dada12 100644 --- a/ftplugin/pamconf.vim +++ b/ftplugin/pamconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pamconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pamconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pamconf') == -1 " Vim filetype plugin file " Language: pam(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pascal.vim b/ftplugin/pascal.vim index 828e8d1e..542343da 100644 --- a/ftplugin/pascal.vim +++ b/ftplugin/pascal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pascal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pascal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1 " Vim filetype plugin file " Language: pascal @@ -27,5 +22,3 @@ endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words" - -endif diff --git a/ftplugin/passwd.vim b/ftplugin/passwd.vim index 3116758c..70aa41c2 100644 --- a/ftplugin/passwd.vim +++ b/ftplugin/passwd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/passwd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('passwd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'passwd') == -1 " Vim filetype plugin file " Language: passwd(5) password file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pdf.vim b/ftplugin/pdf.vim index 97d77deb..bf637d0f 100644 --- a/ftplugin/pdf.vim +++ b/ftplugin/pdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pdf') == -1 " Vim filetype plugin file " Language: PDF @@ -96,5 +91,3 @@ function! s:notag() echo "E426: tag not found" echohl NONE endfunction - -endif diff --git a/ftplugin/perl.vim b/ftplugin/perl.vim index 5018676b..33475a85 100644 --- a/ftplugin/perl.vim +++ b/ftplugin/perl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/perl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim filetype plugin file " Language: Perl @@ -96,5 +91,3 @@ let b:match_words = '\<if\>:\<elsif\>:\<else\>' " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/pinfo.vim b/ftplugin/pinfo.vim index 86746f32..72ed6b95 100644 --- a/ftplugin/pinfo.vim +++ b/ftplugin/pinfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pinfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pinfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pinfo') == -1 " Vim filetype plugin file " Language: pinfo(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/plantuml.vim b/ftplugin/plantuml.vim index 1ab7da13..5146b243 100644 --- a/ftplugin/plantuml.vim +++ b/ftplugin/plantuml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/plantuml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plantuml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1 scriptencoding utf-8 " Vim filetype plugin file @@ -51,5 +46,3 @@ let b:endwise_syngroups = 'plantumlKeyword,plantumlPreProc' let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pony.vim b/ftplugin/pony.vim index dee95d8e..7d2d684e 100644 --- a/ftplugin/pony.vim +++ b/ftplugin/pony.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pony.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pony', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 " Vim filetype plugin file " Language: Pony @@ -47,5 +42,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:did_ftplugin = 1 - -endif diff --git a/ftplugin/postscr.vim b/ftplugin/postscr.vim index 66631393..e2926fb0 100644 --- a/ftplugin/postscr.vim +++ b/ftplugin/postscr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/postscr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('postscr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'postscr') == -1 " Vim filetype plugin file " Language: PostScript @@ -45,5 +40,3 @@ let b:undo_ftplugin = "setlocal comments< formatoptions<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/procmail.vim b/ftplugin/procmail.vim index 1c82967e..fed5e4d4 100644 --- a/ftplugin/procmail.vim +++ b/ftplugin/procmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/procmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('procmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'procmail') == -1 " Vim filetype plugin file " Language: procmail(1) configuration file @@ -28,5 +23,3 @@ let &l:include = '^\s*INCLUDERC\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/prolog.vim b/ftplugin/prolog.vim index a2a50602..0ed3fccf 100644 --- a/ftplugin/prolog.vim +++ b/ftplugin/prolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/prolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('prolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'prolog') == -1 " Vim filetype plugin file " Language: Prolog @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/protocols.vim b/ftplugin/protocols.vim index d8cd8f65..da0a6699 100644 --- a/ftplugin/protocols.vim +++ b/ftplugin/protocols.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/protocols.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('protocols', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protocols') == -1 " Vim filetype plugin file " Language: protocols(5) - Internet protocols definition file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ps1.vim b/ftplugin/ps1.vim index b6d98258..25c015cb 100644 --- a/ftplugin/ps1.vim +++ b/ftplugin/ps1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ps1.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim filetype plugin file " Language: Windows PowerShell @@ -63,5 +58,3 @@ setlocal keywordprg=:GetHelp let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" . \ " | unlet! b:browsefilter" - -endif diff --git a/ftplugin/ps1xml.vim b/ftplugin/ps1xml.vim index c9efc5ae..e8afcf6a 100644 --- a/ftplugin/ps1xml.vim +++ b/ftplugin/ps1xml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ps1xml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim filetype plugin file " Language: Windows PowerShell @@ -38,5 +33,3 @@ endif let b:undo_ftplugin = "setlocal tw< cms< fo<" . \ " | unlet! b:browsefilter" - -endif diff --git a/ftplugin/pug.vim b/ftplugin/pug.vim index 3237029c..4be43d55 100644 --- a/ftplugin/pug.vim +++ b/ftplugin/pug.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pug.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pug', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pug') == -1 " Vim filetype plugin " Language: Pug @@ -64,5 +59,3 @@ let b:undo_ftplugin = "setl cms< com< " let &cpo = s:save_cpo " vim:set sw=2: - -endif diff --git a/ftplugin/puppet.vim b/ftplugin/puppet.vim index 42737508..6c8ec633 100644 --- a/ftplugin/puppet.vim +++ b/ftplugin/puppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/puppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim filetype plugin " Language: Puppet @@ -35,5 +30,3 @@ let b:undo_ftplugin = " \| setlocal keywordprg< iskeyword< comments< commentstring< \| setlocal formatoptions< formatexpr< \" - -endif diff --git a/ftplugin/puppet_tagbar.vim b/ftplugin/puppet_tagbar.vim index 84751db1..6724b3a0 100644 --- a/ftplugin/puppet_tagbar.vim +++ b/ftplugin/puppet_tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/puppet_tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Puppet set up for Tagbar plugin " (https://github.com/majutsushi/tagbar). @@ -51,5 +46,3 @@ endif let g:tagbar_type_puppet.deffile = puppet#ctags#OptionFile() - -endif diff --git a/ftplugin/purescript.vim b/ftplugin/purescript.vim index b53af764..366b2da2 100644 --- a/ftplugin/purescript.vim +++ b/ftplugin/purescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/purescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('purescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1 setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--\ \|,:-- setlocal commentstring=--\ %s @@ -46,5 +41,3 @@ fun! InitPureScript() call add(s:PS, [dir, &l:path]) endfun call InitPureScript() - -endif diff --git a/ftplugin/pyrex.vim b/ftplugin/pyrex.vim index 6e275e3a..5c64042c 100644 --- a/ftplugin/pyrex.vim +++ b/ftplugin/pyrex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pyrex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pyrex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pyrex') == -1 " Vim filetype plugin file " Language: Pyrex @@ -34,5 +29,3 @@ endif let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/qml.vim b/ftplugin/qml.vim index 982b9ac7..ae94d461 100644 --- a/ftplugin/qml.vim +++ b/ftplugin/qml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/qml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('qml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1 " Vim filetype plugin file " Language: qml @@ -44,5 +39,3 @@ setlocal formatoptions+=croql let &cpoptions = s:cpoptions_save unlet s:cpoptions_save - -endif diff --git a/ftplugin/quake.vim b/ftplugin/quake.vim index e3601fc8..03b49c0a 100644 --- a/ftplugin/quake.vim +++ b/ftplugin/quake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/quake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('quake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'quake') == -1 " Vim filetype plugin file " Language: Quake[1-3] configuration file @@ -26,5 +21,3 @@ setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/racket.vim b/ftplugin/racket.vim index bc3d76c9..ad4be8c8 100644 --- a/ftplugin/racket.vim +++ b/ftplugin/racket.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/racket.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('racket', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1 " Language: Racket " Maintainer: Will Langstroth <will@langstroth.com> @@ -83,5 +78,3 @@ let b:undo_ftplugin = \. "| setl makeprg< commentstring<" \. "| nunmap <buffer> K" \. "| vunmap <buffer> K" - -endif diff --git a/ftplugin/raku.vim b/ftplugin/raku.vim index a56385d1..8f9a55ec 100644 --- a/ftplugin/raku.vim +++ b/ftplugin/raku.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/raku.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raku', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1 " Vim filetype plugin file " Language: Raku @@ -150,5 +145,3 @@ let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/raml.vim b/ftplugin/raml.vim index ec1a3c4a..fecbba66 100644 --- a/ftplugin/raml.vim +++ b/ftplugin/raml.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/raml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raml') == -1 set ts=2 sts=2 sw=2 et - -endif diff --git a/ftplugin/razor.vim b/ftplugin/razor.vim index 8b229622..4bd0bc4a 100644 --- a/ftplugin/razor.vim +++ b/ftplugin/razor.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/razor.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('razor', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'razor') == -1 if exists("b:did_ftplugin") finish @@ -13,5 +8,3 @@ endif let b:did_ftplugin = 1 " vim:set sw=2: - -endif diff --git a/ftplugin/readline.vim b/ftplugin/readline.vim index ea38cd55..b1a0a0bc 100644 --- a/ftplugin/readline.vim +++ b/ftplugin/readline.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/readline.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('readline', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'readline') == -1 " Vim filetype plugin file " Language: readline(3) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/reva.vim b/ftplugin/reva.vim index d82461dc..b5211a02 100644 --- a/ftplugin/reva.vim +++ b/ftplugin/reva.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/reva.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reva', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reva') == -1 " Vim ftplugin file " Language: Reva Forth @@ -32,5 +27,3 @@ setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 - -endif diff --git a/ftplugin/rmd.vim b/ftplugin/rmd.vim index b6a16c8c..f0e6ce6f 100644 --- a/ftplugin/rmd.vim +++ b/ftplugin/rmd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rmd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rmd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rmd') == -1 " Vim filetype plugin file " Language: R Markdown file @@ -70,5 +65,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rnc.vim b/ftplugin/rnc.vim index 4873a22d..86645ab4 100644 --- a/ftplugin/rnc.vim +++ b/ftplugin/rnc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rnc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnc') == -1 " Vim filetype plugin file " Language: Relax NG compact syntax @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/rnoweb.vim b/ftplugin/rnoweb.vim index 21efcbfe..44e4d0fc 100644 --- a/ftplugin/rnoweb.vim +++ b/ftplugin/rnoweb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rnoweb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnoweb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnoweb') == -1 " Vim filetype plugin file " Language: Rnoweb @@ -48,5 +43,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rpl.vim b/ftplugin/rpl.vim index af331849..3324ea9b 100644 --- a/ftplugin/rpl.vim +++ b/ftplugin/rpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rpl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1 " Vim filetype plugin file " Language: RPL/2 @@ -29,5 +24,3 @@ setlocal fo-=t fo+=croql setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// let b:undo_ftplugin = "setlocal fo< comments<" - -endif diff --git a/ftplugin/rrst.vim b/ftplugin/rrst.vim index 6c0d51d4..dd8b1238 100644 --- a/ftplugin/rrst.vim +++ b/ftplugin/rrst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rrst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rrst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rrst') == -1 " Vim filetype plugin file " Language: reStructuredText documentation format with R code @@ -61,5 +56,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rst.vim b/ftplugin/rst.vim index 791de7b9..10554403 100644 --- a/ftplugin/rst.vim +++ b/ftplugin/rst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " reStructuredText filetype plugin file " Language: reStructuredText documentation format @@ -54,5 +49,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim index 5a7c6e7d..d2bd231a 100644 --- a/ftplugin/ruby.vim +++ b/ftplugin/ruby.vim @@ -1,18 +1,13 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim filetype plugin " Language: Ruby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> - +loadedbad if (exists("b:did_ftplugin")) finish endif @@ -443,5 +438,3 @@ endfunction " " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim index 780baf39..b5e3b771 100644 --- a/ftplugin/rust.vim +++ b/ftplugin/rust.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rust.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Language: Rust " Description: Vim ftplugin for Rust @@ -207,5 +202,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/ftplugin/rust/tagbar.vim b/ftplugin/rust/tagbar.vim index 1301ca81..f8ccbf75 100644 --- a/ftplugin/rust/tagbar.vim +++ b/ftplugin/rust/tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rust/tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " " Support for Tagbar -- https://github.com/majutsushi/tagbar @@ -47,5 +42,3 @@ unlet s:save_cpo " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/ftplugin/sass.vim b/ftplugin/sass.vim index 3f4acf6e..ec303c12 100644 --- a/ftplugin/sass.vim +++ b/ftplugin/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim filetype plugin " Language: Sass @@ -44,5 +39,3 @@ function! SassIncludeExpr(file) abort endfunction " vim:set sw=2: - -endif diff --git a/ftplugin/sbt.vim b/ftplugin/sbt.vim index 260360c7..9d6b6429 100644 --- a/ftplugin/sbt.vim +++ b/ftplugin/sbt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sbt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sbt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1 " Vim filetype plugin file " Language: sbt @@ -22,5 +17,3 @@ let b:did_ftplugin = 1 runtime! ftplugin/scala.vim - -endif diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim index c80daabb..29bb9238 100644 --- a/ftplugin/scala.vim +++ b/ftplugin/scala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim filetype plugin " Language: Scala @@ -183,5 +178,3 @@ noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr> noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr> " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/ftplugin/scala.xpt.vim b/ftplugin/scala.xpt.vim index 9df57081..e18ced84 100644 --- a/ftplugin/scala.xpt.vim +++ b/ftplugin/scala.xpt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala.xpt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 XPTemplate priority=lang @@ -36,5 +31,3 @@ trait `derived^`trait^Component extends `trait^Component { `body2^ } } - -endif diff --git a/ftplugin/scala/tagbar.vim b/ftplugin/scala/tagbar.vim index 8236d737..c290af07 100644 --- a/ftplugin/scala/tagbar.vim +++ b/ftplugin/scala/tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala/tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " " Support for Tagbar -- https://github.com/majutsushi/tagbar @@ -38,5 +33,3 @@ let g:tagbar_type_scala = { if get(g:, 'scala_use_builtin_tagbar_defs', 1) let g:tagbar_type_scala.deffile = expand('<sfile>:p:h:h:h') . '/ctags/scala.ctags' endif - -endif diff --git a/ftplugin/scheme.vim b/ftplugin/scheme.vim index 68ad8c8b..edbcfa0c 100644 --- a/ftplugin/scheme.vim +++ b/ftplugin/scheme.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scheme.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scheme', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scheme') == -1 " Vim filetype plugin file " Language: Scheme (R7RS) @@ -64,5 +59,3 @@ unlet b:did_scheme_ftplugin let b:did_ftplugin = 1 let &cpo = s:cpo unlet s:cpo - -endif diff --git a/ftplugin/screen.vim b/ftplugin/screen.vim index 2acc4b87..d2da6398 100644 --- a/ftplugin/screen.vim +++ b/ftplugin/screen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/screen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('screen', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'screen') == -1 " Vim filetype plugin file " Language: screen(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/scss.vim b/ftplugin/scss.vim index abed20d5..78cbe958 100644 --- a/ftplugin/scss.vim +++ b/ftplugin/scss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1 if exists('b:did_indent') && b:did_indent " be kind. allow users to override this. Does it work? @@ -20,5 +15,3 @@ setlocal formatoptions+=ro " SCSS comments are either /* */ or // setlocal comments=s1:/*,mb:*,ex:*/,:// - -endif diff --git a/ftplugin/sensors.vim b/ftplugin/sensors.vim index dba05b65..3d9109ea 100644 --- a/ftplugin/sensors.vim +++ b/ftplugin/sensors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sensors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sensors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensors') == -1 " Vim filetype plugin file " Language: sensors.conf(5) - libsensors configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/services.vim b/ftplugin/services.vim index c4aaec81..84afa274 100644 --- a/ftplugin/services.vim +++ b/ftplugin/services.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/services.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('services', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'services') == -1 " Vim filetype plugin file " Language: services(5) - Internet network services list @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/setserial.vim b/ftplugin/setserial.vim index 4d588ae3..5bbe7182 100644 --- a/ftplugin/setserial.vim +++ b/ftplugin/setserial.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/setserial.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('setserial', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'setserial') == -1 " Vim filetype plugin file " Language: setserial(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/sexplib.vim b/ftplugin/sexplib.vim index 16af8a15..c019c9e4 100644 --- a/ftplugin/sexplib.vim +++ b/ftplugin/sexplib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sexplib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Language: Sexplib " Maintainer: Markus Mottl <markus.mottl@gmail.com> @@ -21,5 +16,3 @@ let b:did_ftplugin=1 " Comment string setl commentstring=;\ %s setl comments=:; - -endif diff --git a/ftplugin/sieve.vim b/ftplugin/sieve.vim index 9f59d80f..596fdd80 100644 --- a/ftplugin/sieve.vim +++ b/ftplugin/sieve.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sieve.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sieve', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sieve') == -1 " Vim filetype plugin file " Language: Sieve filtering language input file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slim.vim b/ftplugin/slim.vim index 184b54d3..46b72c08 100644 --- a/ftplugin/slim.vim +++ b/ftplugin/slim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slim') == -1 if exists("b:did_ftplugin") finish @@ -32,5 +27,3 @@ let b:undo_ftplugin = "setl isk<" . " | " . s:undo_ftplugin setlocal iskeyword+=- setlocal commentstring=/%s - -endif diff --git a/ftplugin/slpconf.vim b/ftplugin/slpconf.vim index 14fa5436..e036286c 100644 --- a/ftplugin/slpconf.vim +++ b/ftplugin/slpconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpconf') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slpreg.vim b/ftplugin/slpreg.vim index e4b4580e..f3b64456 100644 --- a/ftplugin/slpreg.vim +++ b/ftplugin/slpreg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpreg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpreg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpreg') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location registration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slpspi.vim b/ftplugin/slpspi.vim index 9a042d4f..5e6641ba 100644 --- a/ftplugin/slpspi.vim +++ b/ftplugin/slpspi.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpspi.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpspi', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpspi') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location SPI file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/smt2.vim b/ftplugin/smt2.vim index 86dfa720..03b5ba2b 100644 --- a/ftplugin/smt2.vim +++ b/ftplugin/smt2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/smt2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smt2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1 setlocal iskeyword+=-,:,#,',$ @@ -32,5 +27,3 @@ nnoremap <silent> <buffer> <localleader>v :call smt2#PrintSolverVersion()<cr> " Comment String setlocal commentstring=;%s - -endif diff --git a/ftplugin/solidity.vim b/ftplugin/solidity.vim index 43bfb3f4..1d52826e 100644 --- a/ftplugin/solidity.vim +++ b/ftplugin/solidity.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/solidity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('solidity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1 setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/spec.vim b/ftplugin/spec.vim index 772e218a..a7b9f9cd 100644 --- a/ftplugin/spec.vim +++ b/ftplugin/spec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/spec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spec', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spec') == -1 " Plugin to update the %changelog section of RPM spec files " Filename: spec.vim @@ -215,5 +210,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words" - -endif diff --git a/ftplugin/sql.vim b/ftplugin/sql.vim index bd49428a..3338aed8 100644 --- a/ftplugin/sql.vim +++ b/ftplugin/sql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1 " SQL filetype plugin file " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) @@ -555,5 +550,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:sw=4: - -endif diff --git a/ftplugin/sshconfig.vim b/ftplugin/sshconfig.vim index 3c7c13fc..b68be8b1 100644 --- a/ftplugin/sshconfig.vim +++ b/ftplugin/sshconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sshconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sshconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sshconfig') == -1 " Vim filetype plugin file " Language: OpenSSH client configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/stylus.vim b/ftplugin/stylus.vim index b5c8aaee..538a491a 100644 --- a/ftplugin/stylus.vim +++ b/ftplugin/stylus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/stylus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stylus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stylus') == -1 " Vim filetype plugin " Language: Stylus @@ -70,5 +65,3 @@ let &cpo = s:save_cpo command! Stylus !clear; cat % | stylus " vim:set sw=2: - -endif diff --git a/ftplugin/sudoers.vim b/ftplugin/sudoers.vim index 3a09305f..e085e5a6 100644 --- a/ftplugin/sudoers.vim +++ b/ftplugin/sudoers.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sudoers.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sudoers', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sudoers') == -1 " Vim filetype plugin file " Language: sudoers(5) configuration files @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/svelte.vim b/ftplugin/svelte.vim index a7037418..132e6bbe 100644 --- a/ftplugin/svelte.vim +++ b/ftplugin/svelte.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/svelte.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svelte', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 " Vim filetype plugin " Language: Svelte 3 (HTML/JavaScript) @@ -50,5 +45,3 @@ if exists('g:loaded_ale') let b:ale_linters = ['stylelint', 'eslint'] endif endif - -endif diff --git a/ftplugin/swift.vim b/ftplugin/swift.vim index 798a6b19..830acfb7 100644 --- a/ftplugin/swift.vim +++ b/ftplugin/swift.vim @@ -1,15 +1,8 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 setlocal commentstring=//\ %s " @-@ adds the literal @ to iskeyword for @IBAction and similar setlocal iskeyword+=@-@,# setlocal completefunc=syntaxcomplete#Complete - -endif diff --git a/ftplugin/swiftgyb.vim b/ftplugin/swiftgyb.vim index 87849112..6468b9cd 100644 --- a/ftplugin/swiftgyb.vim +++ b/ftplugin/swiftgyb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/swiftgyb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swiftgyb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swiftgyb') == -1 " This source file is part of the Swift.org open source project " @@ -18,5 +13,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swiftgyb') == - " Vim maintainer: Emir SARI <bitigchi@me.com> runtime! ftplugin/swift.vim - -endif diff --git a/ftplugin/sysctl.vim b/ftplugin/sysctl.vim index 87e08de2..efb8ce6b 100644 --- a/ftplugin/sysctl.vim +++ b/ftplugin/sysctl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sysctl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sysctl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sysctl') == -1 " Vim filetype plugin file " Language: sysctl.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/systemd.vim b/ftplugin/systemd.vim index a4ff2eb1..26adf612 100644 --- a/ftplugin/systemd.vim +++ b/ftplugin/systemd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/systemd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1 " Vim filetype plugin file " Language: systemd unit files @@ -29,5 +24,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/systemverilog.vim b/ftplugin/systemverilog.vim index 4a322e03..2f0a7244 100644 --- a/ftplugin/systemverilog.vim +++ b/ftplugin/systemverilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/systemverilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemverilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemverilog') == -1 " Vim filetype plugin file " Language: SystemVerilog @@ -18,5 +13,3 @@ endif " Behaves just like Verilog runtime! ftplugin/verilog.vim - -endif diff --git a/ftplugin/tablegen.vim b/ftplugin/tablegen.vim index 88516995..28bd6fdd 100644 --- a/ftplugin/tablegen.vim +++ b/ftplugin/tablegen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tablegen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim filetype plugin file " Language: LLVM TableGen @@ -19,5 +14,3 @@ let b:did_ftplugin = 1 setlocal matchpairs+=<:> setlocal softtabstop=2 shiftwidth=2 setlocal expandtab - -endif diff --git a/ftplugin/tcl.vim b/ftplugin/tcl.vim index e1a6bf3e..7ba25f7f 100644 --- a/ftplugin/tcl.vim +++ b/ftplugin/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim filetype plugin file " Language: Tcl @@ -44,5 +39,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set et ts=4 sw=4 tw=78: - -endif diff --git a/ftplugin/terminfo.vim b/ftplugin/terminfo.vim index 9150f8c9..a83ca282 100644 --- a/ftplugin/terminfo.vim +++ b/ftplugin/terminfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/terminfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terminfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terminfo') == -1 " Vim filetype plugin file " Language: terminfo(5) definition @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/terraform.vim b/ftplugin/terraform.vim index 2f6122c2..63e74df7 100644 --- a/ftplugin/terraform.vim +++ b/ftplugin/terraform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/terraform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terraform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 " terraform.vim - basic vim/terraform integration " Maintainer: HashiVim <https://github.com/hashivim> @@ -68,5 +63,3 @@ endif let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/tex.vim b/ftplugin/tex.vim index 308b859a..53b95e3f 100644 --- a/ftplugin/tex.vim +++ b/ftplugin/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " LaTeX filetype plugin " Language: LaTeX (ft=tex) @@ -53,5 +48,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: - -endif diff --git a/ftplugin/text.vim b/ftplugin/text.vim index 58f151a8..99d387f5 100644 --- a/ftplugin/text.vim +++ b/ftplugin/text.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/text.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('text', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'text') == -1 " Vim filetype plugin " Language: Text @@ -25,5 +20,3 @@ let b:undo_ftplugin = 'setlocal comments< commentstring<' " for Mail quoted text with '>'. setlocal comments=fb:-,fb:*,n:> setlocal commentstring= - -endif diff --git a/ftplugin/textile.vim b/ftplugin/textile.vim index 6799e23a..96828942 100644 --- a/ftplugin/textile.vim +++ b/ftplugin/textile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/textile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('textile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'textile') == -1 " textile.vim " @@ -66,5 +61,3 @@ function! TextileRenderBufferToTab() set syntax=html endfunction - -endif diff --git a/ftplugin/tmux.vim b/ftplugin/tmux.vim index 53aafc80..c598635f 100644 --- a/ftplugin/tmux.vim +++ b/ftplugin/tmux.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tmux.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tmux', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1 " Vim filetype plugin file " Language: tmux(1) configuration file @@ -22,5 +17,3 @@ let b:undo_ftplugin = "setlocal comments< commentstring<" setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/toml.vim b/ftplugin/toml.vim index 9d489fbc..fb12e87c 100644 --- a/ftplugin/toml.vim +++ b/ftplugin/toml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/toml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('toml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'toml') == -1 " File: ftplugin/toml.vim " Author: Kevin Ballard <kevin@sb.org> @@ -28,5 +23,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim: set et sw=4 ts=4: - -endif diff --git a/ftplugin/treetop.vim b/ftplugin/treetop.vim index 4069f641..65a43fb7 100644 --- a/ftplugin/treetop.vim +++ b/ftplugin/treetop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/treetop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('treetop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'treetop') == -1 " Vim filetype plugin file " Language: Treetop @@ -26,5 +21,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/tt2html.vim b/ftplugin/tt2html.vim index de8b6377..c1c47c56 100644 --- a/ftplugin/tt2html.vim +++ b/ftplugin/tt2html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tt2html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Language: TT2 embedded with HTML " Maintainer: vim-perl <vim-perl@googlegroups.com> @@ -20,5 +15,3 @@ endif " Just use the HTML plugin for now. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim - -endif diff --git a/ftplugin/twig.vim b/ftplugin/twig.vim index 52b14150..ac52d1b9 100644 --- a/ftplugin/twig.vim +++ b/ftplugin/twig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/twig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('twig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1 " Vim filetype plugin " Language: Twig @@ -47,5 +42,3 @@ else endif " vim:set sw=2: - -endif diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim index fa14101b..4eece320 100644 --- a/ftplugin/typescript.vim +++ b/ftplugin/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " set Vi-incompatible, compiler and commentstring @@ -89,5 +84,3 @@ let g:tagbar_type_typescript = { if get(g:, 'typescript_use_builtin_tagbar_defs', 1) let g:tagbar_type_typescript.deffile = expand('<sfile>:p:h:h') . '/ctags/typescript.ctags' endif - -endif diff --git a/ftplugin/typescriptreact.vim b/ftplugin/typescriptreact.vim index 159f91b0..7f60b3f9 100644 --- a/ftplugin/typescriptreact.vim +++ b/ftplugin/typescriptreact.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/typescriptreact.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " modified from mxw/vim-jsx from html.vim if exists("loaded_matchit") && !exists('b:tsx_match_words') @@ -22,5 +17,3 @@ setlocal comments=s1:/*,mb:*,ex:*/,:// setlocal formatoptions-=t formatoptions+=croql set suffixesadd+=.tsx - -endif diff --git a/ftplugin/udevconf.vim b/ftplugin/udevconf.vim index ccfd7155..d82aea9e 100644 --- a/ftplugin/udevconf.vim +++ b/ftplugin/udevconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/udevconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevconf') == -1 " Vim filetype plugin file " Language: udev(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/udevperm.vim b/ftplugin/udevperm.vim index 47e41555..bdafc586 100644 --- a/ftplugin/udevperm.vim +++ b/ftplugin/udevperm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/udevperm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevperm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevperm') == -1 " Vim filetype plugin file " Language: udev(8) permissions file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/updatedb.vim b/ftplugin/updatedb.vim index f3bf376b..48f24051 100644 --- a/ftplugin/updatedb.vim +++ b/ftplugin/updatedb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/updatedb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('updatedb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'updatedb') == -1 " Vim filetype plugin file " Language: updatedb.conf(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vala.vim b/ftplugin/vala.vim index 7c4fcddc..32d41d1b 100644 --- a/ftplugin/vala.vim +++ b/ftplugin/vala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1 if exists('b:did_ftplugin') finish @@ -54,5 +49,3 @@ if (has("browsefilter")) && !exists("b:browsefilter") \ "Vala Vapi Files (*.vapi)\t*.vapi\n" . \ "All Files (*.*)\t*.*\n" endif - -endif diff --git a/ftplugin/vb.vim b/ftplugin/vb.vim index 2989165c..23cbd0ac 100644 --- a/ftplugin/vb.vim +++ b/ftplugin/vb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('visual-basic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'visual-basic') == -1 " Vim filetype plugin file " Language: VisualBasic (ft=vb) @@ -52,5 +47,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/verilog.vim b/ftplugin/verilog.vim index ed2fd707..5b123335 100644 --- a/ftplugin/verilog.vim +++ b/ftplugin/verilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/verilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('verilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'verilog') == -1 " Vim filetype plugin file " Language: Verilog HDL @@ -73,5 +68,3 @@ endif " Reset 'cpoptions' back to the user's setting let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vhdl.vim b/ftplugin/vhdl.vim index 81c6cadf..0e98087c 100644 --- a/ftplugin/vhdl.vim +++ b/ftplugin/vhdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vhdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vhdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vhdl') == -1 " VHDL filetype plugin " Language: VHDL @@ -95,5 +90,3 @@ vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vlang.vim b/ftplugin/vlang.vim index 0a04d5ea..a3d3ceac 100644 --- a/ftplugin/vlang.vim +++ b/ftplugin/vlang.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('v', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1 setlocal commentstring=//\ %s setlocal makeprg=v\ % - -endif diff --git a/ftplugin/vroom.vim b/ftplugin/vroom.vim index d13b5fe5..b73c76f3 100644 --- a/ftplugin/vroom.vim +++ b/ftplugin/vroom.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vroom.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vroom', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vroom') == -1 " Vim filetype plugin file " Language: Vroom (vim testing and executable documentation) @@ -42,5 +37,3 @@ setlocal commentstring= let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vue.vim b/ftplugin/vue.vim index 36e5293c..6cc068c6 100644 --- a/ftplugin/vue.vim +++ b/ftplugin/vue.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vue.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vue', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1 " Vim filetype plugin " Language: Vue.js @@ -26,5 +21,3 @@ if !exists('g:no_plugin_maps') && !exists('g:no_vue_maps') nnoremap <silent> <buffer> [] :call search('^</\(template\<Bar>script\<Bar>style\)', 'bW')<CR> nnoremap <silent> <buffer> ][ :call search('^</\(template\<Bar>script\<Bar>style\)', 'W')<CR> endif - -endif diff --git a/ftplugin/wast.vim b/ftplugin/wast.vim index f6a103c7..8e8b16b2 100644 --- a/ftplugin/wast.vim +++ b/ftplugin/wast.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/wast.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wast', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wast') == -1 " Vim filetype plugin file " Language: WebAssembly @@ -24,5 +19,3 @@ setlocal formatoptions-=t setlocal iskeyword+=$,.,/ let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions< iskeyword<" - -endif diff --git a/ftplugin/xdefaults.vim b/ftplugin/xdefaults.vim index 9431ee40..9c7c7731 100644 --- a/ftplugin/xdefaults.vim +++ b/ftplugin/xdefaults.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xdefaults.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xdefaults', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xdefaults') == -1 " Vim filetype plugin file " Language: X resources files like ~/.Xdefaults (xrdb) @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xf86conf.vim b/ftplugin/xf86conf.vim index d44adb27..62e7e0e6 100644 --- a/ftplugin/xf86conf.vim +++ b/ftplugin/xf86conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xf86conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xf86conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1 " Vim filetype plugin file " Language: XFree86 Configuration File @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xhtml.vim b/ftplugin/xhtml.vim index 48c5ee71..a2f6a724 100644 --- a/ftplugin/xhtml.vim +++ b/ftplugin/xhtml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xhtml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xhtml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xhtml') == -1 " Vim filetype plugin file " Language: xhtml @@ -74,5 +69,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/xinetd.vim b/ftplugin/xinetd.vim index f0e459d5..c489135c 100644 --- a/ftplugin/xinetd.vim +++ b/ftplugin/xinetd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xinetd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xinetd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xinetd') == -1 " Vim filetype plugin file " Language: xinetd.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xmodmap.vim b/ftplugin/xmodmap.vim index 7a2216a2..c80fbd34 100644 --- a/ftplugin/xmodmap.vim +++ b/ftplugin/xmodmap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xmodmap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xmodmap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xmodmap') == -1 " Vim filetype plugin file " Language: xmodmap(1) definition file @@ -26,5 +21,3 @@ setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xs.vim b/ftplugin/xs.vim index 0ebb13da..a3f996a8 100644 --- a/ftplugin/xs.vim +++ b/ftplugin/xs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim filetype plugin file " Language: XS (Perl extension interface language) @@ -21,5 +16,3 @@ endif " Just use the C plugin for now. runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim - -endif diff --git a/ftplugin/xsd.vim b/ftplugin/xsd.vim index 6b58eb29..d4849682 100644 --- a/ftplugin/xsd.vim +++ b/ftplugin/xsd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xsd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsd') == -1 " Vim filetype plugin file " Language: xsd @@ -46,5 +41,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/xslt.vim b/ftplugin/xslt.vim index b4109e57..034cefbb 100644 --- a/ftplugin/xslt.vim +++ b/ftplugin/xslt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xslt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xslt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xslt') == -1 " Vim filetype plugin file " Language: xslt @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 if has("gui_win32") && exists("b:browsefilter") let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter endif - -endif diff --git a/ftplugin/yaml.vim b/ftplugin/yaml.vim index 5675a9e9..5ffdb31a 100644 --- a/ftplugin/yaml.vim +++ b/ftplugin/yaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/yaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 " Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) @@ -32,5 +27,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 79d177e2..7762b877 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/zig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -54,5 +49,3 @@ let b:undo_ftplugin = let &cpo = s:cpo_orig unlet s:cpo_orig " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab - -endif diff --git a/ftplugin/zimbu.vim b/ftplugin/zimbu.vim index d6299685..71575497 100644 --- a/ftplugin/zimbu.vim +++ b/ftplugin/zimbu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/zimbu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zimbu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zimbu') == -1 " Vim filetype plugin file " Language: Zimbu @@ -160,5 +155,3 @@ endfunc let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/Jenkinsfile.vim b/indent/Jenkinsfile.vim index 438d6991..74390b23 100644 --- a/indent/Jenkinsfile.vim +++ b/indent/Jenkinsfile.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/Jenkinsfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jenkins', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1 runtime indent/groovy.vim - -endif diff --git a/indent/aap.vim b/indent/aap.vim index 799112c8..fde2ebc4 100644 --- a/indent/aap.vim +++ b/indent/aap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/aap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 " Vim indent file " Language: Aap recipe @@ -19,5 +14,3 @@ endif " Works mostly like Python. runtime! indent/python.vim - -endif diff --git a/indent/ada.vim b/indent/ada.vim index 3240a795..6c924fbc 100644 --- a/indent/ada.vim +++ b/indent/ada.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ada.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ada', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 "------------------------------------------------------------------------------ " Description: Vim Ada indent file @@ -315,5 +310,3 @@ finish " 1}}} "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker - -endif diff --git a/indent/ansible.vim b/indent/ansible.vim index 6686d9ab..f6a9cbef 100644 --- a/indent/ansible.vim +++ b/indent/ansible.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ansible.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 let s:save_cpo = &cpo set cpo&vim @@ -66,5 +61,3 @@ function GetAnsibleIndent(lnum) endfunction let &cpo = s:save_cpo - -endif diff --git a/indent/ant.vim b/indent/ant.vim index d0af9c74..e6a46688 100644 --- a/indent/ant.vim +++ b/indent/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim indent file " Language: ANT files @@ -19,5 +14,3 @@ endif " Use XML formatting rules runtime! indent/xml.vim - -endif diff --git a/indent/applescript.vim b/indent/applescript.vim index 0e31d286..88fc6835 100644 --- a/indent/applescript.vim +++ b/indent/applescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/applescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('applescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'applescript') == -1 "Plugin Name: applescript indent file. "Author: mityu @@ -84,5 +79,3 @@ let &cpo=s:cpo_save unlet s:cpo_save " vim: foldmethod=marker - -endif diff --git a/indent/arduino.vim b/indent/arduino.vim index 90c72c7c..ede5e1e6 100644 --- a/indent/arduino.vim +++ b/indent/arduino.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/arduino.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('arduino', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1 " Vim indent file " Language: Arduino @@ -22,5 +17,3 @@ let b:did_indent = 1 setlocal cindent let b:undo_indent = "setl cin<" - -endif diff --git a/indent/autohotkey.vim b/indent/autohotkey.vim index 354ceeb9..99d8b6d5 100644 --- a/indent/autohotkey.vim +++ b/indent/autohotkey.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/autohotkey.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('autohotkey', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autohotkey') == -1 " Vim indent file " Language: AutoHotkey @@ -226,5 +221,3 @@ function! GetAutoHotkeyIndent() endfunction let b:did_indent = 1 - -endif diff --git a/indent/automake.vim b/indent/automake.vim index 4bded6f7..4fd489fa 100644 --- a/indent/automake.vim +++ b/indent/automake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/automake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('automake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 " Vim indent file " Language: automake @@ -18,5 +13,3 @@ endif " same as makefile indenting for now. runtime! indent/make.vim - -endif diff --git a/indent/awk.vim b/indent/awk.vim index 5e802ecd..ba18e12e 100644 --- a/indent/awk.vim +++ b/indent/awk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/awk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('awk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 " vim: set sw=3 sts=3: @@ -239,5 +234,3 @@ function! s:Safe_indent( base, wordlen, this_line ) endif return indent + a:wordlen endfunction - -endif diff --git a/indent/bib.vim b/indent/bib.vim index 619859fc..37622c70 100644 --- a/indent/bib.vim +++ b/indent/bib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/bib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bib', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bib') == -1 " Vim indent file " Language: BibTeX @@ -22,5 +17,3 @@ let b:did_indent = 1 setlocal cindent let b:undo_indent = "setl cin<" - -endif diff --git a/indent/blade.vim b/indent/blade.vim index efdecf32..a16266c1 100644 --- a/indent/blade.vim +++ b/indent/blade.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/blade.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('blade', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1 " Vim indent file " Language: Blade (Laravel) @@ -102,5 +97,3 @@ function! GetBladeIndent() return indent endfunction - -endif diff --git a/indent/bst.vim b/indent/bst.vim index adc852ae..29ae2961 100644 --- a/indent/bst.vim +++ b/indent/bst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/bst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bst') == -1 " Vim indent file " Language: bst @@ -82,5 +77,3 @@ function! GetBstIndent(lnum) abort let ind = ind - shiftwidth() * s:count(fakeline,'}') return ind endfunction - -endif diff --git a/indent/bzl.vim b/indent/bzl.vim index e41ba9c9..2ee9d707 100644 --- a/indent/bzl.vim +++ b/indent/bzl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/bzl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bzl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bzl') == -1 " Vim indent file " Language: Bazel (http://bazel.io) @@ -101,5 +96,3 @@ endfunction let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/indent/cabal.vim b/indent/cabal.vim index 1698e16d..e65eee71 100644 --- a/indent/cabal.vim +++ b/indent/cabal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cabal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 " indentation for cabal " @@ -38,5 +33,3 @@ function! GetCabalIndent() return match(l:prevline, '\S') endif endfunction - -endif diff --git a/indent/caddyfile.vim b/indent/caddyfile.vim index 11980473..1db00f22 100644 --- a/indent/caddyfile.vim +++ b/indent/caddyfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/caddyfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('caddyfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 if exists('b:did_indent') finish @@ -48,5 +43,3 @@ function! GetCaddyfileIndent(lnum) return ind endfunction - -endif diff --git a/indent/cdl.vim b/indent/cdl.vim index 3f69f349..e52b8082 100644 --- a/indent/cdl.vim +++ b/indent/cdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdl') == -1 " Description: Comshare Dimension Definition Language (CDL) " Author: Raul Segura Acevedo <raulseguraaceved@netscape.net> @@ -136,5 +131,3 @@ fun! CdlGetIndent(lnum) return ind endfun - -endif diff --git a/indent/ch.vim b/indent/ch.vim index 0b606769..bcee5c3c 100644 --- a/indent/ch.vim +++ b/indent/ch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ch') == -1 " Vim indent file " Language: Ch @@ -25,5 +20,3 @@ let b:did_indent = 1 " Ch indenting is built-in, thus this is very simple setlocal cindent - -endif diff --git a/indent/chaiscript.vim b/indent/chaiscript.vim index 967f4ce0..ba2908f9 100644 --- a/indent/chaiscript.vim +++ b/indent/chaiscript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/chaiscript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('chaiscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'chaiscript') == -1 " Vim indent file " Language: ChaiScript @@ -57,5 +52,3 @@ function! GetChaiScriptIndent() return ind endfunction - -endif diff --git a/indent/clojure.vim b/indent/clojure.vim index c2dd0cdc..72bff69f 100644 --- a/indent/clojure.vim +++ b/indent/clojure.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/clojure.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clojure', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 " Vim indent file " Language: Clojure @@ -410,5 +405,3 @@ let &cpo = s:save_cpo unlet! s:save_cpo " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/indent/cmake.vim b/indent/cmake.vim index 30af204e..49e8fd96 100644 --- a/indent/cmake.vim +++ b/indent/cmake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cmake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cmake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1 " Vim indent file " Language: CMake (ft=cmake) @@ -96,5 +91,3 @@ endfun let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/indent/cobol.vim b/indent/cobol.vim index e09bc85b..c962a0d0 100644 --- a/indent/cobol.vim +++ b/indent/cobol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cobol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cobol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cobol') == -1 " Vim indent file " Language: cobol @@ -230,5 +225,3 @@ function! GetCobolIndent(lnum) abort endif return ind < bshft ? bshft : ind endfunction - -endif diff --git a/indent/coffee.vim b/indent/coffee.vim index dca66e4e..6fc21afc 100644 --- a/indent/coffee.vim +++ b/indent/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -435,5 +430,3 @@ function! GetCoffeeIndent(curlnum) " No special rules applied, so use the default policy. exec 'return' s:GetDefaultPolicy(a:curlnum) endfunction - -endif diff --git a/indent/config.vim b/indent/config.vim index 4a500a02..096f5b40 100644 --- a/indent/config.vim +++ b/indent/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('config', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'config') == -1 " Vim indent file " Language: Autoconf configure.{ac,in} file @@ -89,5 +84,3 @@ function GetConfigIndent() return ind endfunction - -endif diff --git a/indent/crystal.vim b/indent/crystal.vim index c405f358..9b3a8d53 100644 --- a/indent/crystal.vim +++ b/indent/crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Initialization {{{1 " ============== @@ -117,5 +112,3 @@ endfunction " }}}1 " vim:sw=2 sts=2 ts=8 fdm=marker et: - -endif diff --git a/indent/cs.vim b/indent/cs.vim index dad26529..60e2a61d 100644 --- a/indent/cs.vim +++ b/indent/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim indent file " Language: C# @@ -80,5 +75,3 @@ let &cpoptions = s:save_cpo unlet s:save_cpo " vim:et:sw=2:sts=2 - -endif diff --git a/indent/css.vim b/indent/css.vim index 33131747..a831c77b 100644 --- a/indent/css.vim +++ b/indent/css.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/css.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('css', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css') == -1 " Vim indent file " Language: CSS @@ -91,5 +86,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/indent/cucumber.vim b/indent/cucumber.vim index 52fad848..72826cca 100644 --- a/indent/cucumber.vim +++ b/indent/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim indent file " Language: Cucumber @@ -82,5 +77,3 @@ function! GetCucumberIndent() endfunction " vim:set sts=2 sw=2: - -endif diff --git a/indent/cuda.vim b/indent/cuda.vim index c878c472..10c26fd6 100644 --- a/indent/cuda.vim +++ b/indent/cuda.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cuda.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cuda', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cuda') == -1 " Vim indent file " Language: CUDA @@ -22,5 +17,3 @@ let b:did_indent = 1 setlocal cindent let b:undo_indent = "setl cin<" - -endif diff --git a/indent/cython.vim b/indent/cython.vim index c8b0e997..5f13b77e 100644 --- a/indent/cython.vim +++ b/indent/cython.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/cython.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python-indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-indent') == -1 " PEP8 compatible Python indent file " Language: Python @@ -461,5 +456,3 @@ function! GetPythonPEPIndent(lnum) return s:indent_like_previous_line(a:lnum) endfunction - -endif diff --git a/indent/d.vim b/indent/d.vim index 7a0a195d..c121801b 100644 --- a/indent/d.vim +++ b/indent/d.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/d.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 " Vim indent file for the D programming language (version 1.076 and 2.063). " @@ -84,5 +79,3 @@ function GetDIndent() return cind endfunction - -endif diff --git a/indent/dart.vim b/indent/dart.vim index aa9d99f9..45bedcf8 100644 --- a/indent/dart.vim +++ b/indent/dart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 if exists('b:did_indent') finish @@ -42,5 +37,3 @@ function! DartIndent() return indentTo endfunction - -endif diff --git a/indent/dictconf.vim b/indent/dictconf.vim index 478d2b4c..c721105c 100644 --- a/indent/dictconf.vim +++ b/indent/dictconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dictconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictconf') == -1 " Vim indent file " Language: dict(1) configuration file @@ -20,5 +15,3 @@ let b:did_indent = 1 setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal nosmartindent inoremap <buffer> # X# - -endif diff --git a/indent/dictdconf.vim b/indent/dictdconf.vim index fc948939..68460d33 100644 --- a/indent/dictdconf.vim +++ b/indent/dictdconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dictdconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictdconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictdconf') == -1 " Vim indent file " Language: dictd(8) configuration file @@ -20,5 +15,3 @@ let b:did_indent = 1 setlocal indentkeys=0{,0},!^F,o,O cinwords= autoindent smartindent setlocal nosmartindent inoremap <buffer> # X# - -endif diff --git a/indent/dosbatch.vim b/indent/dosbatch.vim index 60949dda..0f7dec48 100644 --- a/indent/dosbatch.vim +++ b/indent/dosbatch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dosbatch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosbatch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosbatch') == -1 " Vim indent file " Language: MSDOS batch file (with NT command extensions) @@ -66,5 +61,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 sts=2 - -endif diff --git a/indent/dtd.vim b/indent/dtd.vim index 7dfe14db..0653c474 100644 --- a/indent/dtd.vim +++ b/indent/dtd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dtd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dtd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dtd') == -1 " Vim indent file " Language: DTD (Document Type Definition for XML) @@ -332,5 +327,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/dune.vim b/indent/dune.vim index 563ed198..f2c06615 100644 --- a/indent/dune.vim +++ b/indent/dune.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dune.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim indent file " Language: dune @@ -17,5 +12,3 @@ let b:did_indent = 1 " dune format-dune-file uses 1 space to indent set softtabstop=1 shiftwidth=1 expandtab - -endif diff --git a/indent/dylan.vim b/indent/dylan.vim index f5a9c835..da2e5bc0 100644 --- a/indent/dylan.vim +++ b/indent/dylan.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/dylan.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dylan', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dylan') == -1 " Vim indent file " Language: Dylan @@ -97,5 +92,3 @@ function DylanGetIndent() endfunction " vim:sw=2 tw=130 - -endif diff --git a/indent/ecrystal.vim b/indent/ecrystal.vim index 2bca7b1b..483f9d0c 100644 --- a/indent/ecrystal.vim +++ b/indent/ecrystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ecrystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Setup {{{1 " ===== @@ -483,5 +478,3 @@ endfunction " }}} " vim:fdm=marker - -endif diff --git a/indent/eelixir.vim b/indent/eelixir.vim index f45af493..56081e23 100644 --- a/indent/eelixir.vim +++ b/indent/eelixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/eelixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("b:did_indent") finish @@ -79,5 +74,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/elixir.vim b/indent/elixir.vim index a2854f17..4d135c2e 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/elixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("b:did_indent") finish @@ -22,5 +17,3 @@ setlocal indentkeys+=*<Return>,=->,=\|>,=<>,0},0],0) function! elixir#indent(lnum) return elixir#indent#indent(a:lnum) endfunction - -endif diff --git a/indent/elm.vim b/indent/elm.vim index 731f8f87..4a8a540a 100644 --- a/indent/elm.vim +++ b/indent/elm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/elm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elm') == -1 " indentation for Elm (https://elm-lang.org/) @@ -119,5 +114,3 @@ function! GetElmIndent() return l:ind endfunc - -endif diff --git a/indent/ember-script.vim b/indent/ember-script.vim index de519c34..0e9bdc93 100644 --- a/indent/ember-script.vim +++ b/indent/ember-script.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ember-script.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emberscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> @@ -21,5 +16,3 @@ endif runtime! indent/coffee.vim unlet! b:did_indent let b:did_indent = 1 - -endif diff --git a/indent/emblem.vim b/indent/emblem.vim index 7653e6fb..86937ed9 100644 --- a/indent/emblem.vim +++ b/indent/emblem.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/emblem.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emblem', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> @@ -13,5 +8,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Version: 2.0.1 " Last Change: 2016 Jul 6 " License: ISC - -endif diff --git a/indent/erlang.vim b/indent/erlang.vim index b66ccd59..2a35b1af 100644 --- a/indent/erlang.vim +++ b/indent/erlang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/erlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('erlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1 " Vim indent file " Language: Erlang (http://www.erlang.org) @@ -1490,5 +1485,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 et fdm=marker - -endif diff --git a/indent/eruby.vim b/indent/eruby.vim index 7ba4bf52..98e5b8a0 100644 --- a/indent/eruby.vim +++ b/indent/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim indent file " Language: eRuby @@ -117,5 +112,3 @@ let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:set sw=2 sts=2 ts=8 noet: - -endif diff --git a/indent/eterm.vim b/indent/eterm.vim index e0b391ef..d0a68a7c 100644 --- a/indent/eterm.vim +++ b/indent/eterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/eterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('eterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'eterm') == -1 " Vim indent file " Language: Eterm configuration file @@ -43,5 +38,3 @@ function GetEtermIndent() return ind endfunction - -endif diff --git a/indent/falcon.vim b/indent/falcon.vim index bdd716a2..a92a517b 100644 --- a/indent/falcon.vim +++ b/indent/falcon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/falcon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('falcon', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'falcon') == -1 " Vim indent file " Language: Falcon @@ -458,5 +453,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/indent/fennel.vim b/indent/fennel.vim index cddb5827..90ccd467 100644 --- a/indent/fennel.vim +++ b/indent/fennel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/fennel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fennel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1 " Vim filetype plugin file " Language: FENNEL @@ -333,5 +328,3 @@ endif let &cpo = s:save_cpo unlet! s:save_cpo - -endif diff --git a/indent/fish.vim b/indent/fish.vim index f62375fb..5b314c7f 100644 --- a/indent/fish.vim +++ b/indent/fish.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 setlocal indentexpr=fish#Indent() setlocal indentkeys+==end,=else,=case - -endif diff --git a/indent/fortran.vim b/indent/fortran.vim index cb00f26d..7aac6b5b 100644 --- a/indent/fortran.vim +++ b/indent/fortran.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/fortran.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fortran', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1 " Vim indent file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) @@ -226,5 +221,3 @@ let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 tw=130 - -endif diff --git a/indent/framescript.vim b/indent/framescript.vim index de80fd70..6371d8cb 100644 --- a/indent/framescript.vim +++ b/indent/framescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/framescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('framescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'framescript') == -1 " Vim indent file " Language: FrameScript @@ -48,5 +43,3 @@ function GetFrameScriptIndent() return ind endfunction - -endif diff --git a/indent/fsharp.vim b/indent/fsharp.vim index cb4af8cc..0ab8dfff 100644 --- a/indent/fsharp.vim +++ b/indent/fsharp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/fsharp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fsharp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 " Vim indent file " Language: FSharp @@ -256,5 +251,3 @@ function! GetFsharpIndent() endfunction " vim: sw=4 et sts=4 - -endif diff --git a/indent/gdscript3.vim b/indent/gdscript3.vim index 7fb7c84f..93f4c26e 100644 --- a/indent/gdscript3.vim +++ b/indent/gdscript3.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/gdscript3.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1 " Vim indent file " Language: Python @@ -207,5 +202,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 - -endif diff --git a/indent/gitconfig.vim b/indent/gitconfig.vim index 8155b3c7..5cdd4ce4 100644 --- a/indent/gitconfig.vim +++ b/indent/gitconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/gitconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim indent file " Language: git config file @@ -45,5 +40,3 @@ function! GetGitconfigIndent() return -1 endif endfunction - -endif diff --git a/indent/gitolite.vim b/indent/gitolite.vim index d0f3e820..c6517e79 100644 --- a/indent/gitolite.vim +++ b/indent/gitolite.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/gitolite.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitolite', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitolite') == -1 " Vim indent file " Language: gitolite configuration @@ -56,5 +51,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/glsl.vim b/indent/glsl.vim index 442db43d..db9b0ddb 100644 --- a/indent/glsl.vim +++ b/indent/glsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/glsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('glsl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1 " Language: OpenGL Shading Language " Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io> @@ -18,5 +13,3 @@ setlocal autoindent cindent setlocal formatoptions+=roq " vim:set sts=2 sw=2 : - -endif diff --git a/indent/go.vim b/indent/go.vim index a70243ad..f3ee7ef7 100644 --- a/indent/go.vim +++ b/indent/go.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/go.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " Copyright 2011 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -93,5 +88,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/indent/gohtmltmpl.vim b/indent/gohtmltmpl.vim index ca2ad060..f714d9df 100644 --- a/indent/gohtmltmpl.vim +++ b/indent/gohtmltmpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/gohtmltmpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:did_indent") finish @@ -61,5 +56,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/indent/graphql.vim b/indent/graphql.vim index 713381cb..a02b2885 100644 --- a/indent/graphql.vim +++ b/indent/graphql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/graphql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -114,5 +109,3 @@ endfunction let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/haml.vim b/indent/haml.vim index 8597f60d..9f5be96c 100644 --- a/indent/haml.vim +++ b/indent/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim indent file " Language: Haml @@ -81,5 +76,3 @@ function! GetHamlIndent() endfunction " vim:set sw=2: - -endif diff --git a/indent/hamster.vim b/indent/hamster.vim index 2edb2e73..43411745 100644 --- a/indent/hamster.vim +++ b/indent/hamster.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/hamster.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hamster', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1 " Vim indent file " Language: Hamster Script @@ -62,5 +57,3 @@ function HamGetFreeIndent() endfunction " vim:sw=2 tw=80 - -endif diff --git a/indent/handlebars.vim b/indent/handlebars.vim index a2a9e4e3..f58aa660 100644 --- a/indent/handlebars.vim +++ b/indent/handlebars.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/handlebars.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 " Mustache & Handlebars syntax " Language: Mustache, Handlebars @@ -132,5 +127,3 @@ function! GetHandlebarsIndent(...) return ind endfunction - -endif diff --git a/indent/haskell.vim b/indent/haskell.vim index 7f4d4a96..19f4e076 100644 --- a/indent/haskell.vim +++ b/indent/haskell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/haskell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 " indentation for haskell " @@ -516,5 +511,3 @@ function! GetHaskellIndent() return -1 endfunction - -endif diff --git a/indent/hcl.vim b/indent/hcl.vim index e193b83b..a0cd2b07 100644 --- a/indent/hcl.vim +++ b/indent/hcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/hcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 if exists('b:did_indent') finish @@ -18,5 +13,3 @@ setlocal cindent " don't de-indent comments (cindent treats them like preprocessor directives) setlocal cinkeys-=0# - -endif diff --git a/indent/hog.vim b/indent/hog.vim index 3280d67d..a7607314 100644 --- a/indent/hog.vim +++ b/indent/hog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/hog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hog') == -1 " Vim indent file " Language: hog (Snort.conf) @@ -84,5 +79,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/html.vim b/indent/html.vim index c8922278..b6ade453 100644 --- a/indent/html.vim +++ b/indent/html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1 " Vim indent script for HTML " Maintainer: Bram Moolenaar @@ -1087,5 +1082,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: fdm=marker ts=8 sw=2 tw=78 - -endif diff --git a/indent/htmldjango.vim b/indent/htmldjango.vim index 5e3b7fd1..27ba1b06 100644 --- a/indent/htmldjango.vim +++ b/indent/htmldjango.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/htmldjango.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 " Vim indent file " Language: Django HTML template @@ -19,5 +14,3 @@ endif " Use HTML formatting rules. runtime! indent/html.vim - -endif diff --git a/indent/idris.vim b/indent/idris.vim index f3884f12..ffa22afd 100644 --- a/indent/idris.vim +++ b/indent/idris.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/idris.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 " indentation for idris (idris-lang.org) " @@ -151,5 +146,3 @@ function! GetIdrisIndent() return match(prevline, '\S') endfunction - -endif diff --git a/indent/idris2.vim b/indent/idris2.vim index f2ea6e31..81b816f8 100644 --- a/indent/idris2.vim +++ b/indent/idris2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/idris2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 " indentation for idris (idris-lang.org) " @@ -151,5 +146,3 @@ function! GetIdrisIndent() return match(prevline, '\S') endfunction - -endif diff --git a/indent/j.vim b/indent/j.vim index dbea206c..1c51552a 100644 --- a/indent/j.vim +++ b/indent/j.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/j.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('j', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'j') == -1 " Vim indent file " Language: J @@ -57,5 +52,3 @@ function GetJIndent() abort endif return l:indent endfunction - -endif diff --git a/indent/java.vim b/indent/java.vim index 06a20d7a..c6190122 100644 --- a/indent/java.vim +++ b/indent/java.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/java.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('java', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'java') == -1 " Vim indent file " Language: Java @@ -157,5 +152,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vi: sw=2 et - -endif diff --git a/indent/javascript.vim b/indent/javascript.vim index 65acc8df..40a6bb5d 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/javascript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 " Vim indent file " Language: Javascript @@ -484,5 +479,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/json.vim b/indent/json.vim index 71b269e7..a2e0b6d6 100644 --- a/indent/json.vim +++ b/indent/json.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/json.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('json', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json') == -1 " Vim indent file " Language: JSON @@ -184,5 +179,3 @@ unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 noet: - -endif diff --git a/indent/jsp.vim b/indent/jsp.vim index 0cbfc2ee..4ff51051 100644 --- a/indent/jsp.vim +++ b/indent/jsp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/jsp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsp') == -1 " Vim filetype indent file " Language: JSP files @@ -24,5 +19,3 @@ endif runtime! indent/html.vim - -endif diff --git a/indent/jst.vim b/indent/jst.vim index 4920d6d7..507e8b56 100644 --- a/indent/jst.vim +++ b/indent/jst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/jst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jst') == -1 if exists("b:did_indent") finish @@ -82,5 +77,3 @@ endfunction " vim:set sw=2 sts=2 ts=8 noet: - -endif diff --git a/indent/julia.vim b/indent/julia.vim index 2db6faba..3ea209a1 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/julia.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim indent file " Language: Julia @@ -493,5 +488,3 @@ function GetJuliaIndent() return ind endfunction - -endif diff --git a/indent/kotlin.vim b/indent/kotlin.vim index fdb8891c..996b2fd7 100644 --- a/indent/kotlin.vim +++ b/indent/kotlin.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/kotlin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kotlin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1 " Vim indent file " Language: Kotlin @@ -63,5 +58,3 @@ function! GetKotlinIndent() return prev_indent endfunction - -endif diff --git a/indent/ld.vim b/indent/ld.vim index 9d671e54..550b7032 100644 --- a/indent/ld.vim +++ b/indent/ld.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ld.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ld', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ld') == -1 " Vim indent file " Language: ld(1) script @@ -91,5 +86,3 @@ function GetLDIndent() return ind endfunction - -endif diff --git a/indent/ledger.vim b/indent/ledger.vim index a79be9c1..11037610 100644 --- a/indent/ledger.vim +++ b/indent/ledger.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ledger.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ledger', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 " Vim filetype indent file " filetype: ledger @@ -55,5 +50,3 @@ function GetLedgerIndent(...) return 0 endif endf - -endif diff --git a/indent/less.vim b/indent/less.vim index 45276bea..6ce917af 100644 --- a/indent/less.vim +++ b/indent/less.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/less.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('less', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 " Vim indent file " Language: less @@ -20,5 +15,3 @@ endif runtime! indent/css.vim " vim:set sw=2: - -endif diff --git a/indent/lifelines.vim b/indent/lifelines.vim index 3da037d1..70f21aa2 100644 --- a/indent/lifelines.vim +++ b/indent/lifelines.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/lifelines.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lifelines', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lifelines') == -1 " Vim indent file " Language: LifeLines @@ -31,5 +26,3 @@ setlocal cinoptions+=*500 let b:undo_indent = "setl cin< cino< cinw<" " vim: ts=8 sw=4 - -endif diff --git a/indent/lilypond.vim b/indent/lilypond.vim index 792ffbbf..cdb418da 100644 --- a/indent/lilypond.vim +++ b/indent/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond indent file " Language: LilyPond @@ -67,5 +62,3 @@ endfunction " " " - -endif diff --git a/indent/liquid.vim b/indent/liquid.vim index 5c0ba020..f3fb43a9 100644 --- a/indent/liquid.vim +++ b/indent/liquid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/liquid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('liquid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1 " Vim indent file " Language: Liquid @@ -70,5 +65,3 @@ function! GetLiquidIndent(...) let ind -= sw * s:count(cline,'{%\s*end\w*$') return ind endfunction - -endif diff --git a/indent/lisp.vim b/indent/lisp.vim index d920cf9e..88a08b72 100644 --- a/indent/lisp.vim +++ b/indent/lisp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/lisp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lisp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lisp') == -1 " Vim indent file " Language: Lisp @@ -22,5 +17,3 @@ let b:did_indent = 1 setlocal ai nosi let b:undo_indent = "setl ai< si<" - -endif diff --git a/indent/litcoffee.vim b/indent/litcoffee.vim index c7d3d29b..0515201f 100644 --- a/indent/litcoffee.vim +++ b/indent/litcoffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/litcoffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 if exists('b:did_indent') finish @@ -29,5 +24,3 @@ function GetLitCoffeeIndent() endif endfunc - -endif diff --git a/indent/llvm.vim b/indent/llvm.vim index d57b3a12..53c6f999 100644 --- a/indent/llvm.vim +++ b/indent/llvm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/llvm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim indent file " Language: llvm @@ -79,5 +74,3 @@ function! GetLLVMIndent() return ind endfunction - -endif diff --git a/indent/logtalk.vim b/indent/logtalk.vim index 843dcc23..863afeda 100644 --- a/indent/logtalk.vim +++ b/indent/logtalk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/logtalk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logtalk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logtalk') == -1 " Maintainer: Paulo Moura <pmoura@logtalk.org> " Revised on: 2018.08.04 @@ -71,5 +66,3 @@ function! GetLogtalkIndent() endif return ind endfunction - -endif diff --git a/indent/ls.vim b/indent/ls.vim index 41ebcac5..591ccf76 100644 --- a/indent/ls.vim +++ b/indent/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " Maintainer: George Zahariev @@ -271,5 +266,3 @@ function! GetLiveScriptIndent(curlinenum) return indent endfunction - -endif diff --git a/indent/lua.vim b/indent/lua.vim index f4bc40f0..537a390c 100644 --- a/indent/lua.vim +++ b/indent/lua.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/lua.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lua', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lua') == -1 " Vim indent file " Language: Lua @@ -135,5 +130,3 @@ function GetLuaIndent() return indent(prev_line) + (shiftwidth() * i) endfunction - -endif diff --git a/indent/mail.vim b/indent/mail.vim index 462bd947..5899c2a4 100644 --- a/indent/mail.vim +++ b/indent/mail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/mail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mail') == -1 " Vim indent file " Language: Mail @@ -20,5 +15,3 @@ let b:did_indent = 1 " What works best is auto-indenting, disable other indenting. " For formatting see the ftplugin. setlocal autoindent nosmartindent nocindent indentexpr= - -endif diff --git a/indent/make.vim b/indent/make.vim index f7aabdc5..0fe68ecb 100644 --- a/indent/make.vim +++ b/indent/make.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/make.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('make', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1 " Vim indent file " Language: Makefile @@ -123,5 +118,3 @@ function GetMakeIndent() endif endif endfunction - -endif diff --git a/indent/mako.vim b/indent/mako.vim index 27a09b05..34d7dbf6 100644 --- a/indent/mako.vim +++ b/indent/mako.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/mako.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mako', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1 " Vim indent file " Language: Mako @@ -435,5 +430,3 @@ fun! <SID>HtmlIndentSum(lnum, style) endfun " vim: set ts=4 sw=4: - -endif diff --git a/indent/markdown.vim b/indent/markdown.vim index 0e0ff248..10c576d7 100644 --- a/indent/markdown.vim +++ b/indent/markdown.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/markdown.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('markdown', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 if exists("b:did_indent") | finish | endif let b:did_indent = 1 @@ -82,5 +77,3 @@ function GetMarkdownIndent() return ind endif endfunction - -endif diff --git a/indent/meson.vim b/indent/meson.vim index 6e055c7f..d2bd1663 100644 --- a/indent/meson.vim +++ b/indent/meson.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/meson.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('meson', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1 " Vim indent file " Language: Meson @@ -187,5 +182,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2 - -endif diff --git a/indent/mf.vim b/indent/mf.vim index a0158dd1..24c13c7b 100644 --- a/indent/mf.vim +++ b/indent/mf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/mf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mf') == -1 " METAFONT indent file " Language: METAFONT @@ -13,5 +8,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mf') == -1 " Last Change: 2016 Oct 1 runtime! indent/mp.vim - -endif diff --git a/indent/moon.vim b/indent/moon.vim index d5c55ec4..a71db55c 100644 --- a/indent/moon.vim +++ b/indent/moon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/moon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('moonscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 " Language: MoonScript " Maintainer: leafo <leafot@gmail.com> @@ -330,5 +325,3 @@ function! GetMoonIndent(curlinenum) return indent endfunction - -endif diff --git a/indent/mp.vim b/indent/mp.vim index 45f15f64..6dca244a 100644 --- a/indent/mp.vim +++ b/indent/mp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/mp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mp') == -1 " MetaPost indent file " Language: MetaPost @@ -367,5 +362,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:sw=2:fdm=marker - -endif diff --git a/indent/mustache.vim b/indent/mustache.vim index f546461c..a7a0d3c3 100644 --- a/indent/mustache.vim +++ b/indent/mustache.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/mustache.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 runtime! indent/handlebars.vim - -endif diff --git a/indent/nginx.vim b/indent/nginx.vim index c797da45..cd0af59f 100644 --- a/indent/nginx.vim +++ b/indent/nginx.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/nginx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nginx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1 if exists("b:did_indent") finish @@ -18,5 +13,3 @@ setlocal indentexpr= setlocal cindent " Just make sure that the comments are not reset as defs would be. setlocal cinkeys-=0# - -endif diff --git a/indent/nim.vim b/indent/nim.vim index 9a3e62f3..25747ec5 100644 --- a/indent/nim.vim +++ b/indent/nim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/nim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 " Only load this indent file when no other was loaded. if exists('b:did_indent') @@ -149,5 +144,3 @@ endfunction " vim:sw=2 - -endif diff --git a/indent/nix.vim b/indent/nix.vim index 15465a0e..24b19cdc 100644 --- a/indent/nix.vim +++ b/indent/nix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/nix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 " Vim indent file " Language: Nix @@ -110,5 +105,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/nsis.vim b/indent/nsis.vim index 61b29b4a..ed4bd161 100644 --- a/indent/nsis.vim +++ b/indent/nsis.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/nsis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nsis', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nsis') == -1 " Vim indent file " Language: NSIS script @@ -98,5 +93,3 @@ function! GetNsisIndent(lnum) endfunction " vim: ts=8 sw=2 sts=2 - -endif diff --git a/indent/ocaml.vim b/indent/ocaml.vim index d7a89a61..3a0e70cf 100644 --- a/indent/ocaml.vim +++ b/indent/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim indent file " Language: OCaml @@ -281,5 +276,3 @@ function! GetOCamlIndent() endfunction " vim:sw=2 - -endif diff --git a/indent/occam.vim b/indent/occam.vim index d6fefc76..fea8e44d 100644 --- a/indent/occam.vim +++ b/indent/occam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/occam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('occam', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'occam') == -1 " Vim indent file " Language: occam @@ -194,5 +189,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/indent/octave.vim b/indent/octave.vim index f15e6745..fbbf0314 100644 --- a/indent/octave.vim +++ b/indent/octave.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/octave.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('octave', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'octave') == -1 " Vim indent file " Language: Octave @@ -80,5 +75,3 @@ endfunction setlocal indentexpr=GetOctaveIndent() setlocal autoindent - -endif diff --git a/indent/odin.vim b/indent/odin.vim index 5c94c67d..50f247bd 100644 --- a/indent/odin.vim +++ b/indent/odin.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/odin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('odin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'odin') == -1 if exists("b:did_indent") finish @@ -44,5 +39,3 @@ function! GetOdinIndent(lnum) return ind endfunction - -endif diff --git a/indent/omake.vim b/indent/omake.vim index 87ace177..3f1e550d 100644 --- a/indent/omake.vim +++ b/indent/omake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/omake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim indent file " Language: OMakefile @@ -121,5 +116,3 @@ function GetMakeIndent() endif endif endfunction - -endif diff --git a/indent/opencl.vim b/indent/opencl.vim index 6914df5f..75d7059c 100644 --- a/indent/opencl.vim +++ b/indent/opencl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/opencl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('opencl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -17,5 +12,3 @@ if version > 600 endif let b:did_indent = 1 - -endif diff --git a/indent/pascal.vim b/indent/pascal.vim index f07cb0e4..a58cb87b 100644 --- a/indent/pascal.vim +++ b/indent/pascal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pascal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pascal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1 " Vim indent file " Language: Pascal @@ -235,5 +230,3 @@ function! GetPascalIndent( line_num ) return indnt endfunction - -endif diff --git a/indent/perl.vim b/indent/perl.vim index 4c671bc3..c0871db6 100644 --- a/indent/perl.vim +++ b/indent/perl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/perl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim indent file " Language: Perl 5 @@ -187,5 +182,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sts=4:sw=4:expandtab:ft=vim - -endif diff --git a/indent/pgsql.vim b/indent/pgsql.vim index ac967355..4a3e9144 100644 --- a/indent/pgsql.vim +++ b/indent/pgsql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pgsql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pgsql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pgsql') == -1 " Vim indent file " Language: SQL @@ -396,5 +391,3 @@ endfunction let &cpo= s:keepcpo unlet s:keepcpo " vim: ts=4 fdm=marker sw=4 - -endif diff --git a/indent/plantuml.vim b/indent/plantuml.vim index c0f3065b..1620a7c6 100644 --- a/indent/plantuml.vim +++ b/indent/plantuml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/plantuml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plantuml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1 scriptencoding utf-8 " Vim indent file @@ -92,5 +87,3 @@ function! s:getIncIndent() abort \ '^\s*skinparam\>.*{\s*$\|' . \ s:typeKeywordIncPattern() endfunction - -endif diff --git a/indent/pony.vim b/indent/pony.vim index 51f668de..7d1dc3d2 100644 --- a/indent/pony.vim +++ b/indent/pony.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pony.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pony', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 " Vim indent file " Language: Pony @@ -44,5 +39,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:did_indent = 1 - -endif diff --git a/indent/postscr.vim b/indent/postscr.vim index 89797648..ba7ce419 100644 --- a/indent/postscr.vim +++ b/indent/postscr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/postscr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('postscr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'postscr') == -1 " PostScript indent file " Language: PostScript @@ -75,5 +70,3 @@ function! PostscrIndentGet(lnum) endfunction " vim:sw=2 - -endif diff --git a/indent/pov.vim b/indent/pov.vim index 1964b7b8..13e0f96f 100644 --- a/indent/pov.vim +++ b/indent/pov.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pov.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pov', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pov') == -1 " Vim indent file " Language: PoV-Ray Scene Description Language @@ -91,5 +86,3 @@ function GetPoVRayIndent() return final < 0 ? 0 : final endfunction - -endif diff --git a/indent/prolog.vim b/indent/prolog.vim index cb97bf86..420edee7 100644 --- a/indent/prolog.vim +++ b/indent/prolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/prolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('prolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'prolog') == -1 " vim: set sw=4 sts=4: " Maintainer : Gergely Kontra <kgergely@mcl.hu> @@ -74,5 +69,3 @@ function! GetPrologIndent() endif return ind endfunction - -endif diff --git a/indent/proto.vim b/indent/proto.vim index 8bf58362..8fa33fd6 100644 --- a/indent/proto.vim +++ b/indent/proto.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/proto.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('protobuf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protobuf') == -1 " Vim indent file " Language: Protobuf @@ -24,5 +19,3 @@ setlocal expandtab setlocal shiftwidth=2 let b:undo_indent = "setl cin<" - -endif diff --git a/indent/ps1.vim b/indent/ps1.vim index 92222de8..ac6b83fe 100644 --- a/indent/ps1.vim +++ b/indent/ps1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ps1.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim indent file " Language: Windows PowerShell @@ -27,5 +22,3 @@ inoremap <buffer> # X# let b:undo_indent = "setl si<" - -endif diff --git a/indent/pug.vim b/indent/pug.vim index d0aadb62..20703d8c 100644 --- a/indent/pug.vim +++ b/indent/pug.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pug.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pug', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pug') == -1 " Vim indent file " Language: Pug @@ -77,5 +72,3 @@ function! GetPugIndent() endfunction " vim:set sw=2: - -endif diff --git a/indent/puppet.vim b/indent/puppet.vim index 321bf9f8..1f0a8e3c 100644 --- a/indent/puppet.vim +++ b/indent/puppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/puppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim indent file " Language: Puppet @@ -146,5 +141,3 @@ function! GetPuppetIndent(...) return ind endfunction - -endif diff --git a/indent/purescript.vim b/indent/purescript.vim index fc6e2a26..b040855a 100644 --- a/indent/purescript.vim +++ b/indent/purescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/purescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('purescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1 " indentation for purescript " @@ -283,5 +278,3 @@ function! GetPurescriptIndent() return match(prevline, '\S') endfunction - -endif diff --git a/indent/pyrex.vim b/indent/pyrex.vim index 061b71a8..9ffe4c12 100644 --- a/indent/pyrex.vim +++ b/indent/pyrex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/pyrex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pyrex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pyrex') == -1 " Vim indent file " Language: Pyrex @@ -20,5 +15,3 @@ endif " Use Python formatting rules runtime! indent/python.vim - -endif diff --git a/indent/python.vim b/indent/python.vim index 8e2ea0d7..5f13b77e 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/python.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python-indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-indent') == -1 " PEP8 compatible Python indent file " Language: Python @@ -461,5 +456,3 @@ function! GetPythonPEPIndent(lnum) return s:indent_like_previous_line(a:lnum) endfunction - -endif diff --git a/indent/qml.vim b/indent/qml.vim index 944e72f2..480e9d8f 100644 --- a/indent/qml.vim +++ b/indent/qml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/qml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('qml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1 " Vim indent file " Language: QML @@ -66,5 +61,3 @@ function! GetJsIndent() return ind endfunction - -endif diff --git a/indent/racket.vim b/indent/racket.vim index 626dde52..ceeec45c 100644 --- a/indent/racket.vim +++ b/indent/racket.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/racket.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('racket', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1 " Language: Racket " Maintainer: Will Langstroth <will@langstroth.com> @@ -19,5 +14,3 @@ let b:did_indent = 1 setlocal ai nosi let b:undo_indent = "setl ai< si<" - -endif diff --git a/indent/raku.vim b/indent/raku.vim index 052693cf..1c759b70 100644 --- a/indent/raku.vim +++ b/indent/raku.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/raku.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raku', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1 " Vim indent file " Language: Raku @@ -134,5 +129,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sts=4:sw=4:expandtab:ft=vim - -endif diff --git a/indent/razor.vim b/indent/razor.vim index e35688e4..2708d10e 100644 --- a/indent/razor.vim +++ b/indent/razor.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/razor.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('razor', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'razor') == -1 " Vim indent file " Language: Razor @@ -17,5 +12,3 @@ if exists("b:did_indent") endif runtime! indent/html.vim runtime! indent/javscript.vim - -endif diff --git a/indent/readline.vim b/indent/readline.vim index 53ef6f21..3c79245b 100644 --- a/indent/readline.vim +++ b/indent/readline.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/readline.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('readline', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'readline') == -1 " Vim indent file " Language: readline configuration file @@ -43,5 +38,3 @@ function GetReadlineIndent() return ind endfunction - -endif diff --git a/indent/reason.vim b/indent/reason.vim index 490cdeaf..4a5160bd 100644 --- a/indent/reason.vim +++ b/indent/reason.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/reason.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reason', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 " Vim indent file " Language: Reason (adapted from Rust) @@ -224,5 +219,3 @@ function GetReasonIndent(lnum) " Fall back on cindent, which does it mostly right return cindent(a:lnum) endfunction - -endif diff --git a/indent/rmd.vim b/indent/rmd.vim index d95e442a..a5c44090 100644 --- a/indent/rmd.vim +++ b/indent/rmd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rmd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rmd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rmd') == -1 " Vim indent file " Language: Rmd @@ -73,5 +68,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/indent/rnoweb.vim b/indent/rnoweb.vim index 4473d32d..350e6d9b 100644 --- a/indent/rnoweb.vim +++ b/indent/rnoweb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rnoweb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnoweb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnoweb') == -1 " Vim indent file " Language: Rnoweb @@ -54,5 +49,3 @@ function GetRnowebIndent() endfunction " vim: sw=2 - -endif diff --git a/indent/rpl.vim b/indent/rpl.vim index f5df9afb..3e11fabe 100644 --- a/indent/rpl.vim +++ b/indent/rpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rpl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1 " Vim indent file " Language: RPL/2 @@ -70,5 +65,3 @@ function RplGetFreeIndent() endfunction " vim:sw=2 tw=130 - -endif diff --git a/indent/rrst.vim b/indent/rrst.vim index 5b3187b6..3d31f1eb 100644 --- a/indent/rrst.vim +++ b/indent/rrst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rrst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rrst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rrst') == -1 " Vim indent file " Language: Rrst @@ -54,5 +49,3 @@ function GetRrstIndent() endfunction " vim: sw=2 - -endif diff --git a/indent/rst.vim b/indent/rst.vim index 2585df03..8fbb3d17 100644 --- a/indent/rst.vim +++ b/indent/rst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " Vim indent file " Vim reST indent file @@ -82,5 +77,3 @@ function GetRSTIndent() return ind endfunction - -endif diff --git a/indent/ruby.vim b/indent/ruby.vim index 56a348a7..2fe4a374 100644 --- a/indent/ruby.vim +++ b/indent/ruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim indent file " Language: Ruby @@ -971,5 +966,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/indent/rust.vim b/indent/rust.vim index 7f0fff27..395e7409 100644 --- a/indent/rust.vim +++ b/indent/rust.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/rust.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim indent file " Language: Rust @@ -291,5 +286,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/indent/sas.vim b/indent/sas.vim index 671e213c..eb2afdf1 100644 --- a/indent/sas.vim +++ b/indent/sas.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sas.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sas', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sas') == -1 " Vim indent file " Language: SAS @@ -145,5 +140,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/sass.vim b/indent/sass.vim index b3002bef..4f4971a0 100644 --- a/indent/sass.vim +++ b/indent/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim indent file " Language: Sass @@ -45,5 +40,3 @@ function! GetSassIndent() endfunction " vim:set sw=2: - -endif diff --git a/indent/scala.vim b/indent/scala.vim index 62d67720..adddc554 100644 --- a/indent/scala.vim +++ b/indent/scala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/scala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim indent file " Language : Scala (http://scala-lang.org/) @@ -613,5 +608,3 @@ endfunction " vim:set sw=2 sts=2 ts=8 et: " vim600:fdm=marker fdl=1 fdc=0: - -endif diff --git a/indent/scheme.vim b/indent/scheme.vim index 2e0c747b..475d9cd5 100644 --- a/indent/scheme.vim +++ b/indent/scheme.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/scheme.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scheme', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scheme') == -1 " Vim indent file " Language: Scheme @@ -21,5 +16,3 @@ endif " Use the Lisp indenting runtime! indent/lisp.vim - -endif diff --git a/indent/scss.vim b/indent/scss.vim index 8d302d30..80a43bd2 100644 --- a/indent/scss.vim +++ b/indent/scss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/scss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1 " Vim indent file " Language : SCSS (Sassy CSS) @@ -96,5 +91,3 @@ unlet s:keepcpo " vim:set et ts=2 sw=2: - -endif diff --git a/indent/sdl.vim b/indent/sdl.vim index 3083b048..470b7328 100644 --- a/indent/sdl.vim +++ b/indent/sdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sdl') == -1 " Vim indent file " Language: SDL @@ -100,5 +95,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2 - -endif diff --git a/indent/slim.vim b/indent/slim.vim index 742834e0..95eda92d 100644 --- a/indent/slim.vim +++ b/indent/slim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/slim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slim') == -1 " Vim indent file " Language: Slim @@ -82,5 +77,3 @@ function! GetSlimIndent() endfunction " vim:set sw=2: - -endif diff --git a/indent/slime.vim b/indent/slime.vim index 77b902a2..2ba345f1 100644 --- a/indent/slime.vim +++ b/indent/slime.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/slime.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slime', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slime') == -1 " Vim indent file " Language: Slime @@ -82,5 +77,3 @@ function! GetSlimeIndent() endfunction " vim:set sw=2: - -endif diff --git a/indent/sml.vim b/indent/sml.vim index f36bac6c..0bc7a389 100644 --- a/indent/sml.vim +++ b/indent/sml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sml') == -1 " Vim indent file " Language: SML @@ -224,5 +219,3 @@ function! GetSMLIndent() endfunction " vim:sw=2 - -endif diff --git a/indent/solidity.vim b/indent/solidity.vim index 638a3239..a7844596 100644 --- a/indent/solidity.vim +++ b/indent/solidity.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/solidity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('solidity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1 " Vim indent file " Language: Solidity @@ -446,5 +441,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/sql.vim b/indent/sql.vim index 82667f5a..34c74570 100644 --- a/indent/sql.vim +++ b/indent/sql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1 " Vim indent file loader " Language: SQL @@ -46,5 +41,3 @@ exec 'runtime indent/'.filename.'.vim' " vim:sw=4: - -endif diff --git a/indent/sshconfig.vim b/indent/sshconfig.vim index aedb0218..4d2b3d9b 100644 --- a/indent/sshconfig.vim +++ b/indent/sshconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/sshconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sshconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sshconfig') == -1 " Vim indent file " Language: ssh config file @@ -41,5 +36,3 @@ function GetSshconfigIndent(lnum) return indent(prev_lnum) endif endfunction - -endif diff --git a/indent/stylus.vim b/indent/stylus.vim index c89dafb3..3265e301 100644 --- a/indent/stylus.vim +++ b/indent/stylus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/stylus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stylus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stylus') == -1 " Vim indent file " Language: Stylus @@ -136,5 +131,3 @@ function! GetStylusIndent() endfunction " vim:set sw=2; - -endif diff --git a/indent/svelte.vim b/indent/svelte.vim index 599023a0..e8940f42 100644 --- a/indent/svelte.vim +++ b/indent/svelte.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/svelte.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svelte', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 " Vim indent file " Language: Svelte 3 (HTML/JavaScript) @@ -151,5 +146,3 @@ function! GetSvelteIndent() return indent endfunction - -endif diff --git a/indent/svg.vim b/indent/svg.vim index 2057c3ef..198efb46 100644 --- a/indent/svg.vim +++ b/indent/svg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/svg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svg-indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svg-indent') == -1 " Vim indent file " @@ -112,5 +107,3 @@ endfun let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/indent/swift.vim b/indent/swift.vim index 48efb354..5c17fc63 100644 --- a/indent/swift.vim +++ b/indent/swift.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 " File: swift.vim " Author: Keith Smiley @@ -301,5 +296,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/systemverilog.vim b/indent/systemverilog.vim index a5c423b2..43267f6d 100644 --- a/indent/systemverilog.vim +++ b/indent/systemverilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/systemverilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemverilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemverilog') == -1 " Vim indent file " Language: SystemVerilog @@ -236,5 +231,4 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save -" vim:sw=2 -endif +" vim:sw=2
\ No newline at end of file diff --git a/indent/tcl.vim b/indent/tcl.vim index 0eedaa29..8ea5dcc5 100644 --- a/indent/tcl.vim +++ b/indent/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim indent file " Language: Tcl @@ -108,5 +103,3 @@ function GetTclIndent() return ind endfunction - -endif diff --git a/indent/teraterm.vim b/indent/teraterm.vim index c0e6d131..66ad449f 100644 --- a/indent/teraterm.vim +++ b/indent/teraterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/teraterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('teraterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'teraterm') == -1 " Vim indent file " Language: Tera Term Language (TTL) @@ -62,5 +57,3 @@ function! GetTeraTermIndent(lnum) endfunction " vim: ts=8 sw=2 sts=2 - -endif diff --git a/indent/terraform.vim b/indent/terraform.vim index 9639d47c..ab932dab 100644 --- a/indent/terraform.vim +++ b/indent/terraform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/terraform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terraform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 " Only load this file if no other indent file was loaded if exists('b:did_indent') @@ -71,5 +66,3 @@ endfunction let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/tex.vim b/indent/tex.vim index 4da631a2..22184939 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " Vim indent file " Language: LaTeX @@ -430,5 +425,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 textwidth=80: - -endif diff --git a/indent/tf.vim b/indent/tf.vim index 096b1977..5c12f112 100644 --- a/indent/tf.vim +++ b/indent/tf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/tf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tf') == -1 " Vim indent file " Language: tf (TinyFugue) @@ -79,5 +74,3 @@ function GetTFIndent() return ind endfunction - -endif diff --git a/indent/tilde.vim b/indent/tilde.vim index b412a64b..8df3ede7 100644 --- a/indent/tilde.vim +++ b/indent/tilde.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/tilde.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tilde', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1 "Description: Indent scheme for the tilde weblanguage "Author: Tobias Rundström <tobi@tobi.nu> @@ -43,5 +38,3 @@ function GetTildeIndent(lnum) return -1 endif endfunction - -endif diff --git a/indent/treetop.vim b/indent/treetop.vim index 01b80d68..d54e6159 100644 --- a/indent/treetop.vim +++ b/indent/treetop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/treetop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('treetop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'treetop') == -1 " Vim indent file " Language: Treetop @@ -45,5 +40,3 @@ function GetTreetopIndent() retur ind endfunction - -endif diff --git a/indent/twig.vim b/indent/twig.vim index d9472ea4..82087c33 100644 --- a/indent/twig.vim +++ b/indent/twig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/twig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('twig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1 if exists("b:ran_once") finish @@ -83,5 +78,3 @@ fun! s:BuildStructures() endfun call s:BuildStructures() - -endif diff --git a/indent/typescript.vim b/indent/typescript.vim index a9577906..cc742b97 100644 --- a/indent/typescript.vim +++ b/indent/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " Vim indent file " Language: TypeScript @@ -508,5 +503,3 @@ function! Fixedgq(lnum, count) return 0 endfunction - -endif diff --git a/indent/typescriptreact.vim b/indent/typescriptreact.vim index a89ae88d..8253a288 100644 --- a/indent/typescriptreact.vim +++ b/indent/typescriptreact.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/typescriptreact.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 exe 'runtime! indent/typescript.vim' " Save the current JavaScript indentexpr. @@ -117,5 +112,4 @@ fu! GetTsxIndent() endif return ind -endfu -endif +endfu
\ No newline at end of file diff --git a/indent/vala.vim b/indent/vala.vim index cbcfbf2c..de3f0fd4 100644 --- a/indent/vala.vim +++ b/indent/vala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1 " Vim indent file " Language: Vala @@ -90,5 +85,3 @@ function GetValaIndent(lnum) " Fall back on cindent, which does it mostly right return cindent(a:lnum) endfunction - -endif diff --git a/indent/vb.vim b/indent/vb.vim index 5e37b74e..4eb977c8 100644 --- a/indent/vb.vim +++ b/indent/vb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('visual-basic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'visual-basic') == -1 " Vim indent file " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) @@ -85,5 +80,3 @@ fun! VbGetIndent(lnum) endfun " vim:sw=4 - -endif diff --git a/indent/velocity.vim b/indent/velocity.vim index ba1344bf..01af414b 100644 --- a/indent/velocity.vim +++ b/indent/velocity.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/velocity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('velocity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'velocity') == -1 if exists("b:did_indent") finish endif runtime! indent/html.vim - -endif diff --git a/indent/verilog.vim b/indent/verilog.vim index 02ed70a2..06d0a2fb 100644 --- a/indent/verilog.vim +++ b/indent/verilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/verilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('verilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'verilog') == -1 " Language: Verilog HDL " Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw> @@ -236,5 +231,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:sw=2 - -endif diff --git a/indent/vhdl.vim b/indent/vhdl.vim index c129a763..fd2c2f82 100644 --- a/indent/vhdl.vim +++ b/indent/vhdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vhdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vhdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vhdl') == -1 " VHDL indent ('93 syntax) " Language: VHDL @@ -442,5 +437,3 @@ function GetVHDLindent() " return leftover filtered indent return ind endfunction - -endif diff --git a/indent/vlang.vim b/indent/vlang.vim index c5b9660a..58680a45 100644 --- a/indent/vlang.vim +++ b/indent/vlang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('v', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1 " Based on the Go identation file. " @@ -73,5 +68,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/indent/vroom.vim b/indent/vroom.vim index 832019d3..47a68029 100644 --- a/indent/vroom.vim +++ b/indent/vroom.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vroom.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vroom', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vroom') == -1 " Vim indent file " Language: Vroom (vim testing and executable documentation) @@ -28,5 +23,3 @@ setlocal autoindent let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/indent/vue.vim b/indent/vue.vim index e53a528b..b4f37cc2 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/vue.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vue', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1 " Vim indent file " Language: Vue.js @@ -71,5 +66,3 @@ function! GetVueIndent() return indent endfunction - -endif diff --git a/indent/wast.vim b/indent/wast.vim index 52cb7ab6..97bd3c8d 100644 --- a/indent/wast.vim +++ b/indent/wast.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/wast.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wast', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wast') == -1 " Vim indent file " Language: WebAssembly @@ -24,5 +19,3 @@ setlocal indentexpr=lispindent('.') setlocal noautoindent nosmartindent let b:undo_indent = "setl lisp< indentexpr<" - -endif diff --git a/indent/xf86conf.vim b/indent/xf86conf.vim index 7932c428..287888c9 100644 --- a/indent/xf86conf.vim +++ b/indent/xf86conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/xf86conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xf86conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1 " Vim indent file " Language: XFree86 Configuration File @@ -44,5 +39,3 @@ function GetXF86ConfIndent() return ind endfunction - -endif diff --git a/indent/xhtml.vim b/indent/xhtml.vim index 7134ac81..4f4382b3 100644 --- a/indent/xhtml.vim +++ b/indent/xhtml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/xhtml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xhtml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xhtml') == -1 " Vim indent file " Language: XHTML @@ -19,5 +14,3 @@ endif " Handled like HTML for now. runtime! indent/html.vim - -endif diff --git a/indent/xinetd.vim b/indent/xinetd.vim index e2898b2d..0443b36e 100644 --- a/indent/xinetd.vim +++ b/indent/xinetd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/xinetd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xinetd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xinetd') == -1 " Vim indent file " Language: xinetd.conf(5) configuration file @@ -62,5 +57,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/indent/xsd.vim b/indent/xsd.vim index 685f44e1..9d0e095f 100644 --- a/indent/xsd.vim +++ b/indent/xsd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/xsd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsd') == -1 " Vim indent file " Language: .xsd files (XML Schema) @@ -20,5 +15,3 @@ endif " Use XML formatting rules runtime! indent/xml.vim - -endif diff --git a/indent/xslt.vim b/indent/xslt.vim index d111bfba..c1793e1b 100644 --- a/indent/xslt.vim +++ b/indent/xslt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/xslt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xslt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xslt') == -1 " Vim indent file " Language: XSLT .xslt files @@ -20,5 +15,3 @@ endif " Use XML formatting rules runtime! indent/xml.vim - -endif diff --git a/indent/yacc.vim b/indent/yacc.vim index c4b16402..37752e48 100644 --- a/indent/yacc.vim +++ b/indent/yacc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/yacc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yacc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yacc') == -1 " Vim indent file " Language: YACC input file @@ -48,5 +43,3 @@ function GetYaccIndent() return ind endfunction - -endif diff --git a/indent/yaml.vim b/indent/yaml.vim index 3fb7dcc9..274190da 100644 --- a/indent/yaml.vim +++ b/indent/yaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/yaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 " Vim indent file " Language: YAML @@ -162,5 +157,3 @@ function GetYAMLIndent(lnum) endfunction let &cpo = s:save_cpo - -endif diff --git a/indent/zig.vim b/indent/zig.vim index 3f9d590f..c8ff33db 100644 --- a/indent/zig.vim +++ b/indent/zig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/zig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " indent/zig.vim @@ -83,5 +78,3 @@ function! GetZigIndent(lnum) return cindent(a:lnum) endfunction - -endif diff --git a/indent/zimbu.vim b/indent/zimbu.vim index 987b4727..c6d99cc4 100644 --- a/indent/zimbu.vim +++ b/indent/zimbu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'indent/zimbu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zimbu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zimbu') == -1 " Vim indent file " Language: Zimbu @@ -135,5 +130,3 @@ endfunc let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim index bfd9c1a0..ac828475 100644 --- a/plugin/polyglot.vim +++ b/plugin/polyglot.vim @@ -17,7 +17,7 @@ endif " and (mostly comments) from https://github.com/sheerun/vimrc " " Only settings that matter for proper editing are left -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == -1 +if polyglot#util#IsEnabled('sensible', 'ftdetect') " Allow backspace in insert mode. if &backspace == "" set backspace=indent,eol,start diff --git a/scripts/build b/scripts/build index 86237647..7d069d94 100755 --- a/scripts/build +++ b/scripts/build @@ -293,33 +293,26 @@ def copy_file(name, src, dest) open(src, "r") do |input| open(dest, "w") do |output| - if dest.match?(/\.vim$/) && !dest.match('after/') + if dest.match?(/\.vim$/) output << <<~EOF - let s:base = expand("<sfile>:h:h") - let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } - let files = filter(globpath(&rtp, '#{dest}', 1, 1), Filter) - if len(files) > 0 - exec 'source ' . files[0] + if !polyglot#util#IsEnabled('#{name}', expand('<sfile>:p')) finish endif + EOF end - if name == "jsx" - output << "if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1)\n\n" - else - 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!(/set(local)? fileencoding=utf-8/, '') - contents.gsub!(/ fileencoding=utf-8/, '') - contents.gsub!('À-ÿ', '\u00ac-\uffff') + if dest.match?(/\.vim$/) + # 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!(/set(local)? fileencoding=utf-8/, '') + contents.gsub!(/ fileencoding=utf-8/, '') + contents.gsub!('À-ÿ', '\u00ac-\uffff') + end output << contents - output << "\nendif\n" end end end @@ -681,7 +674,7 @@ def generate_ftdetect(packages, heuristics) end if package_autocommands.flatten.size > 0 - output << "if !has_key(s:disabled_packages, '#{package["name"]}')\n" + output << "if polyglot#util#IsEnabled('#{package["name"]}', 'ftdetect')\n" output << indent(package_autocommands.map { |pc| pc.reverse.join("\n") }.join("\n\n"), 2) output << "\nendif\n\n" end diff --git a/syntax/8th.vim b/syntax/8th.vim index 64672696..1a32143f 100644 --- a/syntax/8th.vim +++ b/syntax/8th.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/8th.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('8th', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 " Vim syntax file " Language: 8th @@ -342,5 +337,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/Jenkinsfile.vim b/syntax/Jenkinsfile.vim index fbaa6133..b9c6b9c2 100644 --- a/syntax/Jenkinsfile.vim +++ b/syntax/Jenkinsfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/Jenkinsfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jenkins', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1 runtime syntax/groovy.vim syn keyword jenkinsfileBuiltInVariable currentBuild @@ -133,5 +128,3 @@ hi link jenkinsFileDockerKeyword jenkinsfilePipelineStep let b:current_syntax = 'Jenkinsfile' " vim:set et sw=0 ts=2 ft=vim tw=78: - -endif diff --git a/syntax/a2ps.vim b/syntax/a2ps.vim index 3616993d..b0f2b98a 100644 --- a/syntax/a2ps.vim +++ b/syntax/a2ps.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/a2ps.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('a2ps', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 " Vim syntax file " Language: a2ps(1) configuration file @@ -78,5 +73,3 @@ let b:current_syntax = "a2ps" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/a65.vim b/syntax/a65.vim index 0e85dfb9..5faf43f4 100644 --- a/syntax/a65.vim +++ b/syntax/a65.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/a65.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('a65', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a65') == -1 " Vim syntax file " Language: xa 6502 cross assembler @@ -160,5 +155,3 @@ hi def link a65HiLo Number let b:current_syntax = "a65" - -endif diff --git a/syntax/aap.vim b/syntax/aap.vim index c8a3183a..4b714ec7 100644 --- a/syntax/aap.vim +++ b/syntax/aap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 " Vim syntax file " Language: A-A-P recipe @@ -165,5 +160,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/abap.vim b/syntax/abap.vim index 49a06670..88e763c4 100644 --- a/syntax/abap.vim +++ b/syntax/abap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/abap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 " Vim ABAP syntax file " Language: SAP - ABAP/R4 @@ -202,5 +197,4 @@ hi def link abapHex Number let b:current_syntax = "abap" -" vim: ts=8 sw=2 -endif +" vim: ts=8 sw=2
\ No newline at end of file diff --git a/syntax/abaqus.vim b/syntax/abaqus.vim index 2ade8afb..6f4d7e11 100644 --- a/syntax/abaqus.vim +++ b/syntax/abaqus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/abaqus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abaqus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 " Vim syntax file " Language: Abaqus finite element input file (www.hks.com) @@ -42,5 +37,3 @@ hi def link abaqusBadLine Error let b:current_syntax = "abaqus" - -endif diff --git a/syntax/abc.vim b/syntax/abc.vim index 7bb3ddd0..8bbd911a 100644 --- a/syntax/abc.vim +++ b/syntax/abc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/abc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abc') == -1 " Vim syntax file " Language: abc music notation language @@ -58,5 +53,3 @@ hi def link abcNote Constant let b:current_syntax = "abc" " vim: ts=4 - -endif diff --git a/syntax/abel.vim b/syntax/abel.vim index a2bc783c..388a1727 100644 --- a/syntax/abel.vim +++ b/syntax/abel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/abel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abel') == -1 " Vim syntax file " Language: ABEL @@ -168,5 +163,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8 - -endif diff --git a/syntax/acedb.vim b/syntax/acedb.vim index 2f738269..7624743d 100644 --- a/syntax/acedb.vim +++ b/syntax/acedb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/acedb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('acedb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acedb') == -1 " Vim syntax file " Language: AceDB model files @@ -117,5 +112,3 @@ let b:current_syntax = "acedb" " The structure of the model.wrm file is sensitive to mixed tab and space " indentation and assumes tabs are 8 so... se ts=8 - -endif diff --git a/syntax/ada.vim b/syntax/ada.vim index 20e5d03c..1cfae129 100644 --- a/syntax/ada.vim +++ b/syntax/ada.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ada.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ada', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 "---------------------------------------------------------------------------- " Description: Vim Ada syntax file @@ -375,5 +370,3 @@ finish " 1}}} "------------------------------------------------------------------------------ "vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab "vim: foldmethod=marker - -endif diff --git a/syntax/ahdl.vim b/syntax/ahdl.vim index decba269..fb5786b0 100644 --- a/syntax/ahdl.vim +++ b/syntax/ahdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ahdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ahdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ahdl') == -1 " Vim syn file " Language: Altera AHDL @@ -88,5 +83,3 @@ hi def link ahdlTodo Todo let b:current_syntax = "ahdl" " vim:ts=8 - -endif diff --git a/syntax/aidl.vim b/syntax/aidl.vim index b40c09fe..edc857be 100644 --- a/syntax/aidl.vim +++ b/syntax/aidl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aidl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aidl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aidl') == -1 " Vim syntax file " Language: aidl (Android Interface Definition Language) @@ -30,5 +25,3 @@ hi def link aidlParamDir StorageClass hi def link aidlKeyword Keyword let b:current_syntax = "aidl" - -endif diff --git a/syntax/alsaconf.vim b/syntax/alsaconf.vim index 9c922ae3..ea944b58 100644 --- a/syntax/alsaconf.vim +++ b/syntax/alsaconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/alsaconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('alsaconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 " Vim syntax file " Language: alsaconf(8) configuration file @@ -56,5 +51,3 @@ let b:current_syntax = "alsaconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/aml.vim b/syntax/aml.vim index 03bb4726..8a4221d1 100644 --- a/syntax/aml.vim +++ b/syntax/aml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aml') == -1 " Vim syntax file " Language: AML (ARC/INFO Arc Macro Language) @@ -151,5 +146,3 @@ hi def link amlTab amlArcCmd let b:current_syntax = "aml" - -endif diff --git a/syntax/ampl.vim b/syntax/ampl.vim index c660def8..d67e209d 100644 --- a/syntax/ampl.vim +++ b/syntax/ampl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ampl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ampl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ampl') == -1 " Language: ampl (A Mathematical Programming Language) " Maintainer: Krief David <david.krief@etu.enseeiht.fr> or <david_krief@hotmail.com> @@ -147,5 +142,3 @@ let b:current_syntax = "ampl" " vim: ts=8 - -endif diff --git a/syntax/ansible.vim b/syntax/ansible.vim index 2fd53e7f..a66ad006 100644 --- a/syntax/ansible.vim +++ b/syntax/ansible.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ansible.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 " Vim syntax file " Language: Ansible YAML/Jinja templates @@ -118,5 +113,3 @@ else endif let b:current_syntax = "ansible" - -endif diff --git a/syntax/ansible_hosts.vim b/syntax/ansible_hosts.vim index 437de336..910ad315 100644 --- a/syntax/ansible_hosts.vim +++ b/syntax/ansible_hosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ansible_hosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 " Vim syntax file " Language: Ansible hosts files @@ -38,5 +33,3 @@ if exists("g:ansible_attribute_highlight") endif let b:current_syntax = "ansible_hosts" - -endif diff --git a/syntax/ant.vim b/syntax/ant.vim index 417ddcfe..31ac7d70 100644 --- a/syntax/ant.vim +++ b/syntax/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim syntax file " Language: ANT build file (xml) @@ -104,5 +99,3 @@ let &cpo = s:ant_cpo_save unlet s:ant_cpo_save " vim: ts=8 - -endif diff --git a/syntax/apache.vim b/syntax/apache.vim index 6df4cd92..cf2bc349 100644 --- a/syntax/apache.vim +++ b/syntax/apache.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/apache.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('apache', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apache') == -1 " Vim syntax file " Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess) @@ -210,5 +205,3 @@ hi def link apacheUserID Number let b:current_syntax = "apache" - -endif diff --git a/syntax/apachestyle.vim b/syntax/apachestyle.vim index 27c904ec..cfa084eb 100644 --- a/syntax/apachestyle.vim +++ b/syntax/apachestyle.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/apachestyle.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('apachestyle', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apachestyle') == -1 " Vim syntax file " Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) @@ -61,5 +56,3 @@ hi def link apTagError Error let b:current_syntax = "apachestyle" " vim: ts=8 - -endif diff --git a/syntax/apiblueprint.vim b/syntax/apiblueprint.vim index 7694fc1b..018d8e2b 100644 --- a/syntax/apiblueprint.vim +++ b/syntax/apiblueprint.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/apiblueprint.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('apiblueprint', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apiblueprint') == -1 runtime! syntax/markdown.vim unlet! b:current_syntax @@ -41,5 +36,3 @@ highlight default link apibActionRelationKey Identifier let b:current_syntax = 'apiblueprint' - -endif diff --git a/syntax/applescript.vim b/syntax/applescript.vim index 298c8c06..85af24c3 100644 --- a/syntax/applescript.vim +++ b/syntax/applescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/applescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('applescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'applescript') == -1 " Vim syntax file " Language: AppleScript @@ -252,5 +247,3 @@ hi def link scptTodo Todo let b:current_syntax = "applescript" - -endif diff --git a/syntax/aptconf.vim b/syntax/aptconf.vim index 9ff3cbee..083f2390 100644 --- a/syntax/aptconf.vim +++ b/syntax/aptconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aptconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aptconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aptconf') == -1 " Vim syntax file " Language: APT config file @@ -581,5 +576,3 @@ let b:current_syntax = "aptconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/arch.vim b/syntax/arch.vim index 5f553c56..93357958 100644 --- a/syntax/arch.vim +++ b/syntax/arch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/arch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('arch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 " Vim syntax file " Language: GNU Arch inventory file @@ -48,5 +43,3 @@ let b:current_syntax = "arch" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/arduino.vim b/syntax/arduino.vim index 508dc205..6106a8f7 100644 --- a/syntax/arduino.vim +++ b/syntax/arduino.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/arduino.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('arduino', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1 " Vim syntax file " Language: Arduino @@ -173,5 +168,3 @@ hi def link arduinoType Type hi def link arduinoConstant Constant hi def link arduinoFunc Function hi def link arduinoIdentifier Identifier - -endif diff --git a/syntax/art.vim b/syntax/art.vim index 21adc885..2845054f 100644 --- a/syntax/art.vim +++ b/syntax/art.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/art.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('art', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 " Vim syntax file " Language: ART-IM and ART*Enterprise @@ -57,5 +52,3 @@ let b:current_syntax = "art" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/asciidoc.vim b/syntax/asciidoc.vim index f82310b1..b6b41b0b 100644 --- a/syntax/asciidoc.vim +++ b/syntax/asciidoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/asciidoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('asciidoc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asciidoc') == -1 " Vim syntax file " Language: AsciiDoc @@ -190,5 +185,3 @@ hi def link asciidocURL Macro let b:current_syntax = "asciidoc" " vim: wrap et sw=2 sts=2: - -endif diff --git a/syntax/asl.vim b/syntax/asl.vim index 57a138c7..3e2840fe 100644 --- a/syntax/asl.vim +++ b/syntax/asl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/asl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('acpiasl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acpiasl') == -1 " Vim syntax file " Language: ACPI ASL files @@ -115,5 +110,3 @@ hi def link aslNumber Number let b:current_syntax = "asl" syn sync minlines=200 - -endif diff --git a/syntax/asn.vim b/syntax/asn.vim index 334ef9d6..e2bb53e0 100644 --- a/syntax/asn.vim +++ b/syntax/asn.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/asn.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('asn', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asn') == -1 " Vim syntax file " Language: ASN.1 @@ -80,5 +75,3 @@ unlet s:cpo_save let b:current_syntax = "asn" " vim: ts=8 - -endif diff --git a/syntax/aspperl.vim b/syntax/aspperl.vim index 1292a864..3509b1a2 100644 --- a/syntax/aspperl.vim +++ b/syntax/aspperl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aspperl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aspperl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspperl') == -1 " Vim syntax file " Language: Active State's PerlScript (ASP) @@ -32,5 +27,3 @@ syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\ syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=perlscript"\=[^>]*>+ end=+</script>+ contains=@AspPerlScript let b:current_syntax = "aspperl" - -endif diff --git a/syntax/aspvbs.vim b/syntax/aspvbs.vim index cbabc644..a6d2f335 100644 --- a/syntax/aspvbs.vim +++ b/syntax/aspvbs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/aspvbs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aspvbs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspvbs') == -1 " Vim syntax file " Language: Microsoft VBScript Web Content (ASP) @@ -189,5 +184,3 @@ if main_syntax == 'aspvbs' endif " vim: ts=8:sw=2:sts=0:noet - -endif diff --git a/syntax/asterisk.vim b/syntax/asterisk.vim index 672515f3..e412aa9f 100644 --- a/syntax/asterisk.vim +++ b/syntax/asterisk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/asterisk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('asterisk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asterisk') == -1 " Vim syntax file " Language: Asterisk config file @@ -95,5 +90,3 @@ hi def link asteriskError Error let b:current_syntax = "asterisk" " vim: ts=8 sw=2 - -endif diff --git a/syntax/asteriskvm.vim b/syntax/asteriskvm.vim index 9b8ffbc1..6e18807b 100644 --- a/syntax/asteriskvm.vim +++ b/syntax/asteriskvm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/asteriskvm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('asteriskvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asteriskvm') == -1 " Vim syntax file " Language: Asterisk voicemail config file @@ -58,5 +53,3 @@ let b:current_syntax = "asteriskvm" " vim: ts=8 sw=2 - -endif diff --git a/syntax/atlas.vim b/syntax/atlas.vim index 39ee5b90..30336eae 100644 --- a/syntax/atlas.vim +++ b/syntax/atlas.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/atlas.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('atlas', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'atlas') == -1 " Vim syntax file " Language: ATLAS @@ -92,5 +87,3 @@ hi def link atlasSpecial Special let b:current_syntax = "atlas" " vim: ts=8 - -endif diff --git a/syntax/autodoc.vim b/syntax/autodoc.vim index 5091322d..f386e3aa 100644 --- a/syntax/autodoc.vim +++ b/syntax/autodoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/autodoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('autodoc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autodoc') == -1 " Vim syntax file " Language: Autodoc @@ -108,5 +103,3 @@ let b:current_syntax = "autodoc" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/autoit.vim b/syntax/autoit.vim index 61faf132..80f921ad 100644 --- a/syntax/autoit.vim +++ b/syntax/autoit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/autoit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('autoit', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autoit') == -1 " Vim syntax file " @@ -1131,5 +1126,3 @@ syn sync minlines=50 let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/syntax/automake.vim b/syntax/automake.vim index 8012a051..62f7fa45 100644 --- a/syntax/automake.vim +++ b/syntax/automake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/automake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('automake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 " Vim syntax file " Language: automake Makefile.am @@ -84,5 +79,3 @@ hi def link automakeMakeBString makeBString let b:current_syntax = 'automake' " vi: ts=8 sw=4 sts=4 - -endif diff --git a/syntax/ave.vim b/syntax/ave.vim index 80c7e9c6..30084a91 100644 --- a/syntax/ave.vim +++ b/syntax/ave.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ave.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ave', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ave') == -1 " Vim syntax file " Copyright by Jan-Oliver Wagner @@ -86,5 +81,3 @@ hi def link aveTypos Error let b:current_syntax = "ave" - -endif diff --git a/syntax/awk.vim b/syntax/awk.vim index c4648b2d..d8a8c8c3 100644 --- a/syntax/awk.vim +++ b/syntax/awk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/awk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('awk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 " Vim syntax file " Language: awk, nawk, gawk, mawk @@ -223,5 +218,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/b.vim b/syntax/b.vim index b5eedb24..b0ddde41 100644 --- a/syntax/b.vim +++ b/syntax/b.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/b.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('b', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'b') == -1 " Vim syntax file " Language: B (A Formal Method with refinement and mathematical proof) @@ -121,5 +116,3 @@ hi def link bTodo Todo let b:current_syntax = "b" " vim: ts=8 - -endif diff --git a/syntax/basic.vim b/syntax/basic.vim index d444372c..056bbc17 100644 --- a/syntax/basic.vim +++ b/syntax/basic.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('basic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'basic') == -1 " Vim syntax file " Language: BASIC @@ -173,5 +168,3 @@ let b:current_syntax = "basic" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index 4fc03dcf..734df1ba 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/class.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 "don't add typescriptMembers to nextgroup, let outer scope match it " so we won't match abstract method outside abstract class @@ -72,5 +67,3 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets \ contained skipwhite syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl - -endif diff --git a/syntax/basic/cluster.vim b/syntax/basic/cluster.vim index 017c4ba9..c601ca43 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/cluster.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 "Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement syntax cluster typescriptStatement @@ -45,5 +40,3 @@ syntax cluster typescriptValue \ contains=@typescriptExpression,typescriptObjectLiteral syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion - -endif diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index fc4b7e4d..3eeb22a8 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/decorator.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments \ contains=@_semantic,typescriptDotNotation - -endif diff --git a/syntax/basic/doc.vim b/syntax/basic/doc.vim index 81af2a9a..54d827a6 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/doc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 "Syntax coloring for Node.js shebang line syntax match shellbang "^#!.*node\>" @@ -91,5 +86,3 @@ if exists("main_syntax") && main_syntax == "typescript" endif syntax case match - -endif diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index c4ffef90..9cda9e8d 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/function.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptAsyncFuncKeyword async \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef @@ -74,5 +69,3 @@ syntax region typescriptParamImpl matchgroup=typescriptParens \ contains=typescriptDecorator,@typescriptParameterList,@typescriptComments \ nextgroup=typescriptReturnAnnotation,typescriptBlock \ contained skipwhite skipnl - -endif diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim index ce733f3e..1f4d0a0b 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/identifiers.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax cluster afterIdentifier contains= \ typescriptDotNotation, @@ -86,5 +81,3 @@ syntax region typescriptObjectDestructure matchgroup=typescriptBraces \ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments \ nextgroup=typescriptTypeAnnotation,typescriptAssign \ transparent contained skipwhite skipempty fold - -endif diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index 45e45768..ec10ebdc 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/keyword.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 "Import syntax keyword typescriptImport from as @@ -103,5 +98,3 @@ syntax cluster typescriptAmbients contains= \ typescriptAbstract, \ typescriptEnumKeyword,typescriptEnum, \ typescriptModule - -endif diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim index 8458dcc6..c8e1ba2c 100644 --- a/syntax/basic/literal.vim +++ b/syntax/basic/literal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/literal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 "Syntax in the JavaScript code @@ -48,5 +43,3 @@ syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescrip syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ \ nextgroup=typescriptSymbols skipwhite skipempty - -endif diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 65366dac..27bf8496 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/members.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptConstructor contained constructor \ nextgroup=@typescriptCallSignature @@ -53,5 +48,3 @@ syntax region typescriptComputedMember contained matchgroup=typescriptPropert \ contains=@typescriptValue,typescriptMember,typescriptMappedIn \ nextgroup=@memberNextGroup \ skipwhite skipempty - -endif diff --git a/syntax/basic/object.vim b/syntax/basic/object.vim index 869cf063..86585e49 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/object.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax region typescriptObjectLiteral matchgroup=typescriptBraces \ start=/{/ end=/}/ @@ -37,5 +32,3 @@ syntax match typescriptRestOrSpread /\.\.\./ contained syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObjectLiteral,typescriptArray nextgroup=@typescriptValue syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty - -endif diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim index 9d97817c..669cd8e0 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/patch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " patch for generated code syntax keyword typescriptGlobal Promise \ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline syntax keyword typescriptGlobal Map WeakMap \ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline - -endif diff --git a/syntax/basic/reserved.vim b/syntax/basic/reserved.vim index 3ba5c8ec..0b2d88c9 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/reserved.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax cluster typescriptStrings contains=typescriptProp,typescriptString,typescriptTemplate,@typescriptComments,typescriptDocComment,typescriptRegexpString,typescriptPropertyName @@ -38,5 +33,3 @@ syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved volat syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved class syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved var syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved function - -endif diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim index bc8db0dc..58646064 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/symbols.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " + - ^ ~ syntax match typescriptUnaryOp /[+\-~!]/ @@ -47,5 +42,3 @@ syntax match typescriptBinaryOp contained /-\(-\|=\)\?/ nextgroup=@typescriptV syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword - -endif diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 9785545d..03fe8de8 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/basic/type.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " Types syntax match typescriptOptionalMark /?/ contained @@ -221,5 +216,3 @@ syntax region typescriptAliasDeclaration matchgroup=typescriptUnion syntax keyword typescriptReadonlyArrayKeyword readonly \ nextgroup=@typescriptPrimaryType \ skipwhite - -endif diff --git a/syntax/bc.vim b/syntax/bc.vim index 8e14e85f..fb135745 100644 --- a/syntax/bc.vim +++ b/syntax/bc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bc') == -1 " Vim syntax file " Language: bc - An arbitrary precision calculator language @@ -73,5 +68,3 @@ hi def link bcParenError Error let b:current_syntax = "bc" " vim: ts=8 - -endif diff --git a/syntax/bdf.vim b/syntax/bdf.vim index 8cd0d16e..86d931d3 100644 --- a/syntax/bdf.vim +++ b/syntax/bdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bdf') == -1 " Vim syntax file " Language: BDF font definition @@ -104,5 +99,3 @@ let b:current_syntax = "bdf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/bib.vim b/syntax/bib.vim index 6f24e016..844237a8 100644 --- a/syntax/bib.vim +++ b/syntax/bib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bib', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bib') == -1 " Vim syntax file " Language: BibTeX (bibliographic database format for (La)TeX) @@ -128,5 +123,3 @@ let b:current_syntax = "bib" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/bindzone.vim b/syntax/bindzone.vim index f66cd0f9..fd03e71a 100644 --- a/syntax/bindzone.vim +++ b/syntax/bindzone.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bindzone.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bindzone', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bindzone') == -1 " Vim syntax file " Language: BIND zone files (RFC 1035) @@ -104,5 +99,3 @@ hi def link zoneComment Comment let b:current_syntax = "bindzone" " vim:sts=2 sw=2 - -endif diff --git a/syntax/blade.vim b/syntax/blade.vim index 582df259..49abd937 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/blade.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('blade', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1 " Vim syntax file " Language: Blade (Laravel) @@ -80,5 +75,3 @@ let b:current_syntax = 'blade' if exists('main_syntax') && main_syntax == 'blade' unlet main_syntax endif - -endif diff --git a/syntax/blank.vim b/syntax/blank.vim index e686351c..81170873 100644 --- a/syntax/blank.vim +++ b/syntax/blank.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/blank.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('blank', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blank') == -1 " Vim syntax file " Language: Blank 1.4.1 @@ -46,5 +41,3 @@ let b:current_syntax = "blank" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/brewfile.vim b/syntax/brewfile.vim index 383c1810..0d1aea79 100644 --- a/syntax/brewfile.vim +++ b/syntax/brewfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/brewfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('brewfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'brewfile') == -1 " Vim syntax file " Language: Brewfile @@ -26,5 +21,3 @@ syn keyword brewfileDirective brew cask tap mas cask_args hi def link brewfileDirective Keyword let b:current_syntax = "brewfile" - -endif diff --git a/syntax/bsdl.vim b/syntax/bsdl.vim index 2d6b8475..e77d53ef 100644 --- a/syntax/bsdl.vim +++ b/syntax/bsdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bsdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bsdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bsdl') == -1 " Vim syntax file " Language: Boundary Scan Description Language (BSDL) @@ -24,5 +19,3 @@ unlet b:current_syntax let b:current_syntax = "bsdl" " vim: ts=8 - -endif diff --git a/syntax/bst.vim b/syntax/bst.vim index 3e7c815d..1a37e95c 100644 --- a/syntax/bst.vim +++ b/syntax/bst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bst') == -1 " Vim syntax file " Language: BibTeX Bibliography Style @@ -77,5 +72,3 @@ hi def link bstError Error let b:current_syntax = "bst" " vim:set ft=vim sts=4 sw=4: - -endif diff --git a/syntax/bzl.vim b/syntax/bzl.vim index f5080a81..0163a0e2 100644 --- a/syntax/bzl.vim +++ b/syntax/bzl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bzl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bzl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bzl') == -1 " Vim syntax file " Language: Bazel (http://bazel.io) @@ -23,5 +18,3 @@ let b:current_syntax = 'bzl' syn region bzlRule start='^\w\+($' end='^)\n*' transparent fold syn region bzlList start='\[' end='\]' transparent fold - -endif diff --git a/syntax/bzr.vim b/syntax/bzr.vim index 10cefb1e..07bc7fa1 100644 --- a/syntax/bzr.vim +++ b/syntax/bzr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/bzr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bzr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bzr') == -1 " Vim syntax file " Language: Bazaar (bzr) commit file @@ -57,5 +52,3 @@ hi def link bzrUnknown Special let b:current_syntax = "bzr" - -endif diff --git a/syntax/c.vim b/syntax/c.vim index 63c3494f..cbcb7086 100644 --- a/syntax/c.vim +++ b/syntax/c.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/c.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('c/c++', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 " Vim syntax file " Language: C @@ -517,5 +512,3 @@ unlet s:ft let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/cabal-1.vim b/syntax/cabal-1.vim index 45fa2bdf..d2192fd4 100644 --- a/syntax/cabal-1.vim +++ b/syntax/cabal-1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cabal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 " syntax highlighting for cabal " @@ -58,5 +53,3 @@ highlight def link cabalDocNewline Operator highlight def link cabalDocCode Macro let b:current_syntax = "cabal" - -endif diff --git a/syntax/cabal-2.vim b/syntax/cabal-2.vim index 8b9f1431..9e9d441c 100644 --- a/syntax/cabal-2.vim +++ b/syntax/cabal-2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cabal-2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cabal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cabal') == -1 " Vim syntax file " Language: Haskell Cabal Build file @@ -251,5 +246,3 @@ let &cpo = s:cpo_save unlet! s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/caddyfile.vim b/syntax/caddyfile.vim index 3b693065..93503a87 100644 --- a/syntax/caddyfile.vim +++ b/syntax/caddyfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/caddyfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('caddyfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 " Language: Caddyfile " Author: Josh Glendenning <josh@isobit.io> @@ -36,5 +31,3 @@ hi link caddyString String hi link caddyComment Comment let b:current_syntax = "caddyfile" - -endif diff --git a/syntax/calendar.vim b/syntax/calendar.vim index 0e6e5847..4b154111 100644 --- a/syntax/calendar.vim +++ b/syntax/calendar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/calendar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('calendar', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'calendar') == -1 " Vim syntax file " Language: calendar(1) input file @@ -117,5 +112,3 @@ let b:current_syntax = "calendar" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/carp.vim b/syntax/carp.vim index 5c99680d..9fdeef0a 100644 --- a/syntax/carp.vim +++ b/syntax/carp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/carp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('carp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'carp') == -1 " Vim syntax file " Language: Carp @@ -172,5 +167,3 @@ if version >= 508 || !exists("carp_syntax_init") endif let b:current_syntax = "carp" - -endif diff --git a/syntax/catalog.vim b/syntax/catalog.vim index 7fff5fda..f9054ef1 100644 --- a/syntax/catalog.vim +++ b/syntax/catalog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/catalog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('catalog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'catalog') == -1 " Vim syntax file " Language: sgml catalog file @@ -37,5 +32,3 @@ hi def link catalogTodo Todo hi def link catalogKeyword Statement let b:current_syntax = "catalog" - -endif diff --git a/syntax/cdl.vim b/syntax/cdl.vim index 409c1dc7..da8ef432 100644 --- a/syntax/cdl.vim +++ b/syntax/cdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdl') == -1 " Vim syntax file " Language: Comshare Dimension Definition Language @@ -85,5 +80,3 @@ hi def link cdlConditional Conditional let b:current_syntax = "cdl" " vim: ts=8 - -endif diff --git a/syntax/cdrdaoconf.vim b/syntax/cdrdaoconf.vim index b6f8b053..0a36a716 100644 --- a/syntax/cdrdaoconf.vim +++ b/syntax/cdrdaoconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cdrdaoconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdrdaoconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdrdaoconf') == -1 " Vim syntax file " Language: cdrdao(1) configuration file @@ -146,5 +141,3 @@ let b:current_syntax = "cdrdaoconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cdrtoc.vim b/syntax/cdrtoc.vim index 9cf118b4..52fc45fb 100644 --- a/syntax/cdrtoc.vim +++ b/syntax/cdrtoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cdrtoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdrtoc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdrtoc') == -1 " Vim syntax file " Language: cdrdao(1) TOC file @@ -544,5 +539,3 @@ let b:current_syntax = "cdrtoc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cf.vim b/syntax/cf.vim index 52b17987..4f093a9d 100644 --- a/syntax/cf.vim +++ b/syntax/cf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cf') == -1 " Vim syntax file " @@ -1025,5 +1020,3 @@ let b:current_syntax = "cfml" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cfg.vim b/syntax/cfg.vim index 550203e7..ce289bf3 100644 --- a/syntax/cfg.vim +++ b/syntax/cfg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cfg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cfg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cfg') == -1 " Vim syntax file " Language: Good old CFG files @@ -55,5 +50,3 @@ hi def link UncPath Directory let b:current_syntax = "cfg" " vim:ts=8 - -endif diff --git a/syntax/ch.vim b/syntax/ch.vim index fd97c7ce..389531e4 100644 --- a/syntax/ch.vim +++ b/syntax/ch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ch') == -1 " Vim syntax file " Language: Ch @@ -45,5 +40,3 @@ hi def link chStructure Structure let b:current_syntax = "ch" " vim: ts=8 - -endif diff --git a/syntax/chaiscript.vim b/syntax/chaiscript.vim index 609d35ff..7b4df282 100644 --- a/syntax/chaiscript.vim +++ b/syntax/chaiscript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/chaiscript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('chaiscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'chaiscript') == -1 " Vim syntax file " Language: ChaiScript @@ -101,5 +96,3 @@ hi def link chaiscriptEval Special let b:current_syntax = "chaiscript" " vim: nowrap sw=2 sts=2 ts=8 noet - -endif diff --git a/syntax/chaskell.vim b/syntax/chaskell.vim index 4ec9a93e..25691208 100644 --- a/syntax/chaskell.vim +++ b/syntax/chaskell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/chaskell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('chaskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'chaskell') == -1 " Vim syntax file " Language: Haskell supporting c2hs binding hooks @@ -21,5 +16,3 @@ let b:hs_chs=1 runtime! syntax/haskell.vim " vim: ts=8 - -endif diff --git a/syntax/chill.vim b/syntax/chill.vim index 18a706c6..313dc67a 100644 --- a/syntax/chill.vim +++ b/syntax/chill.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/chill.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('chill', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'chill') == -1 " Vim syntax file " Language: CHILL @@ -185,5 +180,3 @@ hi def link chillBracket Delimiter let b:current_syntax = "chill" " vim: ts=8 - -endif diff --git a/syntax/chordpro.vim b/syntax/chordpro.vim index 0ac02291..b3f5b5bd 100644 --- a/syntax/chordpro.vim +++ b/syntax/chordpro.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/chordpro.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('chordpro', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'chordpro') == -1 " Vim syntax file " Language: ChordPro (v. 3.6.2) @@ -74,5 +69,3 @@ let b:current_syntax = "chordpro" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cl.vim b/syntax/cl.vim index 6e5d0420..fa5c807c 100644 --- a/syntax/cl.vim +++ b/syntax/cl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cl') == -1 " Vim syntax file " Language: CL @@ -105,5 +100,3 @@ hi def link clStatement Statement let b:current_syntax = "cl" " vim: ts=8 sw=8 - -endif diff --git a/syntax/clean.vim b/syntax/clean.vim index 91df7e01..a5ffc6fc 100644 --- a/syntax/clean.vim +++ b/syntax/clean.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/clean.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clean', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clean') == -1 " Vim syntax file " Language: Clean @@ -97,5 +92,3 @@ let b:current_syntax = "clean" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=4 - -endif diff --git a/syntax/clojure.vim b/syntax/clojure.vim index be228596..eb118543 100644 --- a/syntax/clojure.vim +++ b/syntax/clojure.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/clojure.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clojure', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 " Vim syntax file " Language: Clojure @@ -230,5 +225,3 @@ let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/syntax/cmake.vim b/syntax/cmake.vim index cae10e0d..12c22895 100644 --- a/syntax/cmake.vim +++ b/syntax/cmake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cmake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cmake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1 " Vim syntax file " Program: CMake - Cross-Platform Makefile Generator @@ -3781,5 +3776,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim: set nowrap: - -endif diff --git a/syntax/cmod.vim b/syntax/cmod.vim index 41058a32..a0eeb3e6 100644 --- a/syntax/cmod.vim +++ b/syntax/cmod.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cmod.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cmod', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmod') == -1 " Vim syntax file " Language: Cmod @@ -151,5 +146,3 @@ let b:current_syntax = "cmod" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/cmusrc.vim b/syntax/cmusrc.vim index 8d9ff598..7dc2b94d 100644 --- a/syntax/cmusrc.vim +++ b/syntax/cmusrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cmusrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cmusrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmusrc') == -1 " Vim syntax file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -316,5 +311,3 @@ let b:current_syntax = "cmusrc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cobol.vim b/syntax/cobol.vim index 4f324728..8cf9fb43 100644 --- a/syntax/cobol.vim +++ b/syntax/cobol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cobol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cobol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cobol') == -1 " Vim syntax file " Language: COBOL @@ -267,5 +262,3 @@ hi def link cobolStart Comment let b:current_syntax = "cobol" " vim: ts=6 nowrap - -endif diff --git a/syntax/coco.vim b/syntax/coco.vim index bd8ff87d..1f01932f 100644 --- a/syntax/coco.vim +++ b/syntax/coco.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/coco.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coco', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coco') == -1 " Vim syntax file " Language: Coco/R @@ -39,5 +34,3 @@ hi def link cocoOperator Operator hi def link cocoProductionCode Statement hi def link cocoPragma Special - -endif diff --git a/syntax/coffee.vim b/syntax/coffee.vim index 893d85cc..837481ca 100644 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -228,5 +223,3 @@ syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional, if !exists('b:current_syntax') let b:current_syntax = 'coffee' endif - -endif diff --git a/syntax/common.vim b/syntax/common.vim index d7785ba6..73969625 100644 --- a/syntax/common.vim +++ b/syntax/common.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/common.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " Define the default highlighting. " For version 5.8 and later: only when an item doesn't have highlighting yet @@ -179,5 +174,3 @@ if exists("did_typescript_hilink") delcommand HiLink unlet did_typescript_hilink endif - -endif diff --git a/syntax/conaryrecipe.vim b/syntax/conaryrecipe.vim index c1e37f2c..4af5618c 100644 --- a/syntax/conaryrecipe.vim +++ b/syntax/conaryrecipe.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/conaryrecipe.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('conaryrecipe', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'conaryrecipe') == -1 " Vim syntax file " Language: Conary Recipe @@ -144,5 +139,3 @@ hi def link conaryUseFlag Typedef let b:current_syntax = "conaryrecipe" - -endif diff --git a/syntax/conf.vim b/syntax/conf.vim index a8c4b050..a5e43e32 100644 --- a/syntax/conf.vim +++ b/syntax/conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'conf') == -1 " Vim syntax file " Language: generic configure file @@ -33,5 +28,3 @@ hi def link confString String let b:current_syntax = "conf" " vim: ts=8 sw=2 - -endif diff --git a/syntax/config.vim b/syntax/config.vim index ea1d63ac..a034d772 100644 --- a/syntax/config.vim +++ b/syntax/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('config', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'config') == -1 " Vim syntax file " Language: configure.in script: M4 with sh @@ -61,5 +56,3 @@ hi def link configmsg String let b:current_syntax = "config" " vim: ts=4 - -endif diff --git a/syntax/cpp.vim b/syntax/cpp.vim index 0e51f1dd..90bed7a5 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cpp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('c/c++', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 " Vim syntax file " Language: C++ @@ -102,5 +97,3 @@ hi def link cppModule Include let b:current_syntax = "cpp" " vim: ts=8 - -endif diff --git a/syntax/cql.vim b/syntax/cql.vim index e575d2fc..e5124032 100644 --- a/syntax/cql.vim +++ b/syntax/cql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1 " Vim syntax file " Language: cql @@ -138,5 +133,3 @@ endif let b:current_syntax = "cql" - -endif diff --git a/syntax/crm.vim b/syntax/crm.vim index a110facb..1b6b8a66 100644 --- a/syntax/crm.vim +++ b/syntax/crm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/crm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crm') == -1 " Vim syntax file " Language: CRM114 @@ -48,5 +43,3 @@ let b:current_syntax = "crm" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/crontab.vim b/syntax/crontab.vim index 12cebc77..7bedcadc 100644 --- a/syntax/crontab.vim +++ b/syntax/crontab.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/crontab.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crontab', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crontab') == -1 " Vim syntax file " Language: crontab @@ -74,5 +69,3 @@ hi def link crontabCmnt Comment let b:current_syntax = "crontab" " vim: ts=8 - -endif diff --git a/syntax/cryptol.vim b/syntax/cryptol.vim index 6f098e8c..eb55af0a 100644 --- a/syntax/cryptol.vim +++ b/syntax/cryptol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cryptol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cryptol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 " Vim syntax file " Language: Cryptol @@ -120,5 +115,3 @@ endif let b:current_syntax = "cryptol" " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim - -endif diff --git a/syntax/crystal.vim b/syntax/crystal.vim index 4b322893..02aea438 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Language: Crystal " Maintainer: @@ -502,5 +497,3 @@ let b:current_syntax = 'crystal' delc SynFold " vim: sw=2 sts=2 et: - -endif diff --git a/syntax/cs.vim b/syntax/cs.vim index f9a8a6ae..e416cf7f 100644 --- a/syntax/cs.vim +++ b/syntax/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim syntax file " Language: C# @@ -228,5 +223,3 @@ let &cpoptions = s:save_cpo unlet s:save_cpo " vim: vts=16,28 - -endif diff --git a/syntax/csc.vim b/syntax/csc.vim index b9423727..dfddecc3 100644 --- a/syntax/csc.vim +++ b/syntax/csc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/csc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csc') == -1 " Vim syntax file " Language: Essbase script @@ -198,5 +193,3 @@ let b:current_syntax = "csc" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/csdl.vim b/syntax/csdl.vim index dd934766..5064bc77 100644 --- a/syntax/csdl.vim +++ b/syntax/csdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/csdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csdl') == -1 " Vim syntax file " Language: Curated Stream Definition Language (CSDL) @@ -543,5 +538,3 @@ highlight link csdlTarget Constant highlight link csdlComment Comment " let b:current_syntax = "csdl" - -endif diff --git a/syntax/csp.vim b/syntax/csp.vim index 70be4d47..341906b6 100644 --- a/syntax/csp.vim +++ b/syntax/csp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/csp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csp') == -1 " Vim syntax file " Language: CSP (Communication Sequential Processes, using FDR input syntax) @@ -189,5 +184,3 @@ hi def link cspReservedIdentifier Error let b:current_syntax = "csp" " vim: ts=8 - -endif diff --git a/syntax/css.vim b/syntax/css.vim index 3ef88695..95ee1e75 100644 --- a/syntax/css.vim +++ b/syntax/css.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/css.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('css', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css') == -1 " Vim syntax file " Language: Cascading Style Sheets @@ -660,5 +655,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/csv.vim b/syntax/csv.vim index a0dbfd96..138ae547 100644 --- a/syntax/csv.vim +++ b/syntax/csv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/csv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " A simple syntax highlighting, simply alternate colors between two " adjacent columns @@ -176,5 +171,3 @@ let b:current_syntax="csv" let &cpo = s:cpo_save unlet s:cpo_save " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/syntax/cterm.vim b/syntax/cterm.vim index f037590d..9f30bf5b 100644 --- a/syntax/cterm.vim +++ b/syntax/cterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cterm') == -1 " Vim syntax file " Language: Century Term Command Script @@ -184,5 +179,3 @@ hi def link ctermNumber Number let b:current_syntax = "cterm" " vim: ts=8 - -endif diff --git a/syntax/cucumber.vim b/syntax/cucumber.vim index 521332e2..26a236a6 100644 --- a/syntax/cucumber.vim +++ b/syntax/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim syntax file " Language: Cucumber @@ -149,5 +144,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:set sts=2 sw=2: - -endif diff --git a/syntax/cuda.vim b/syntax/cuda.vim index a65302b3..3296fec5 100644 --- a/syntax/cuda.vim +++ b/syntax/cuda.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cuda.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cuda', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cuda') == -1 " Vim syntax file " Language: CUDA (NVIDIA Compute Unified Device Architecture) @@ -72,5 +67,3 @@ hi def link cudaConstant Constant let b:current_syntax = "cuda" " vim: ts=8 - -endif diff --git a/syntax/cuesheet.vim b/syntax/cuesheet.vim index 9e5df7ce..380edb1e 100644 --- a/syntax/cuesheet.vim +++ b/syntax/cuesheet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cuesheet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cue', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cue') == -1 " Language: Cue sheet " Maintainer: Matěj Grabovský @@ -33,5 +28,3 @@ syn match Number /\<\d\+\%(:\d\{2}\)\{2}\>/ let b:current_syntax='cuesheet' " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/syntax/cupl.vim b/syntax/cupl.vim index 98655e3c..43488e56 100644 --- a/syntax/cupl.vim +++ b/syntax/cupl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cupl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cupl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cupl') == -1 " Vim syntax file " Language: CUPL @@ -131,5 +126,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8 - -endif diff --git a/syntax/cuplsim.vim b/syntax/cuplsim.vim index 304b311c..d4627870 100644 --- a/syntax/cuplsim.vim +++ b/syntax/cuplsim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cuplsim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cuplsim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cuplsim') == -1 " Vim syntax file " Language: CUPL simulation @@ -70,5 +65,3 @@ hi def link cuplsimOrderFormat cuplNumber let b:current_syntax = "cuplsim" " vim:ts=8 - -endif diff --git a/syntax/cvs.vim b/syntax/cvs.vim index b7a0fbf2..9a0b6e11 100644 --- a/syntax/cvs.vim +++ b/syntax/cvs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cvs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cvs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cvs') == -1 " Vim syntax file " Language: CVS commit file @@ -36,5 +31,3 @@ hi def link cvsCom Statement let b:current_syntax = "cvs" - -endif diff --git a/syntax/cvsrc.vim b/syntax/cvsrc.vim index 4856394e..13b2f417 100644 --- a/syntax/cvsrc.vim +++ b/syntax/cvsrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cvsrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cvsrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cvsrc') == -1 " Vim syntax file " Language: cvs(1) RC file @@ -46,5 +41,3 @@ let b:current_syntax = "cvsrc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/cynpp.vim b/syntax/cynpp.vim index f2e4da9c..395621b6 100644 --- a/syntax/cynpp.vim +++ b/syntax/cynpp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/cynpp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cynpp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cynpp') == -1 " Vim syntax file " Language: Cyn++ @@ -57,5 +52,3 @@ hi def link cynppMacro Statement let b:current_syntax = "cynpp" - -endif diff --git a/syntax/d.vim b/syntax/d.vim index 2e3de64a..3473a23a 100644 --- a/syntax/d.vim +++ b/syntax/d.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/d.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 " Vim syntax file for the D programming language (version 1.076 and 2.069). " @@ -580,5 +575,3 @@ syn keyword dAsmOpCode contained adc let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/dart.vim b/syntax/dart.vim index a2a1f8cf..ef17f0ed 100644 --- a/syntax/dart.vim +++ b/syntax/dart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 " Vim syntax file " Language: Dart " Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file @@ -149,5 +144,3 @@ let b:spell_options = 'contained' if g:main_syntax is# 'dart' unlet g:main_syntax endif - -endif diff --git a/syntax/datascript.vim b/syntax/datascript.vim index 68738394..e0138e6c 100644 --- a/syntax/datascript.vim +++ b/syntax/datascript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/datascript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('datascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'datascript') == -1 " Vim syntax file " Language: DataScript @@ -109,5 +104,3 @@ let b:current_syntax = "datascript" let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/syntax/dcd.vim b/syntax/dcd.vim index fd8cec39..f94b451a 100644 --- a/syntax/dcd.vim +++ b/syntax/dcd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dcd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dcd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dcd') == -1 " Vim syntax file " Language: WildPackets EtherPeek Decoder (.dcd) file @@ -58,5 +53,3 @@ hi def link dcdComment Comment let b:current_syntax = "dcd" - -endif diff --git a/syntax/dcov.vim b/syntax/dcov.vim index 1949e754..3d70df06 100644 --- a/syntax/dcov.vim +++ b/syntax/dcov.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dcov.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 " Vim syntax file for coverage information for the reference compiler (DMD) of " the D programming language. @@ -58,5 +53,3 @@ hi def link dcovLow Operator hi def link dcovPartial Structure let b:current_syntax = "dcov" - -endif diff --git a/syntax/dd.vim b/syntax/dd.vim index 9300e0d4..ca81f45b 100644 --- a/syntax/dd.vim +++ b/syntax/dd.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 runtime! /syntax/ddoc.vim - -endif diff --git a/syntax/ddoc.vim b/syntax/ddoc.vim index 189e5394..80bb2e2c 100644 --- a/syntax/ddoc.vim +++ b/syntax/ddoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ddoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 if &filetype == "ddoc" "ddoc file type @@ -89,5 +84,3 @@ elseif &filetype == "d" hi! def link ddocIdentifierNestedDecl Macro hi! def link ddocKeyword Macro endif - -endif diff --git a/syntax/debchangelog.vim b/syntax/debchangelog.vim index c22c95ab..36fc627d 100644 --- a/syntax/debchangelog.vim +++ b/syntax/debchangelog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/debchangelog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debchangelog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debchangelog') == -1 " Vim syntax file " Language: Debian changelog files @@ -83,5 +78,3 @@ hi def link debchangelogEmail Special let b:current_syntax = 'debchangelog' " vim: ts=8 sw=2 - -endif diff --git a/syntax/debcontrol.vim b/syntax/debcontrol.vim index 6c8758e4..76d6728f 100644 --- a/syntax/debcontrol.vim +++ b/syntax/debcontrol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/debcontrol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debcontrol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debcontrol') == -1 " Vim syntax file " Language: Debian control files @@ -150,5 +145,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/debcopyright.vim b/syntax/debcopyright.vim index 1bdcd5ff..674a3e00 100644 --- a/syntax/debcopyright.vim +++ b/syntax/debcopyright.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/debcopyright.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debcopyright', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debcopyright') == -1 " Vim syntax file " Language: Debian copyright file @@ -40,5 +35,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/debsources.vim b/syntax/debsources.vim index 3fce617b..69fde228 100644 --- a/syntax/debsources.vim +++ b/syntax/debsources.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/debsources.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debsources', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debsources') == -1 " Vim syntax file " Language: Debian sources.list @@ -63,5 +58,3 @@ hi def link debsourcesComment Comment hi def link debsourcesUri Constant let b:current_syntax = 'debsources' - -endif diff --git a/syntax/def.vim b/syntax/def.vim index f8535e5d..5c613817 100644 --- a/syntax/def.vim +++ b/syntax/def.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/def.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('def', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'def') == -1 " Vim syntax file " Language: Microsoft Module-Definition (.def) File @@ -51,5 +46,3 @@ hi def link defOrdinal Operator let b:current_syntax = "def" " vim: ts=8 - -endif diff --git a/syntax/denyhosts.vim b/syntax/denyhosts.vim index 8be39694..9372c53c 100644 --- a/syntax/denyhosts.vim +++ b/syntax/denyhosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/denyhosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('denyhosts', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'denyhosts') == -1 " Vim syntax file " Language: denyhosts configuration file @@ -296,5 +291,3 @@ let b:current_syntax = "denyhosts" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/desc.vim b/syntax/desc.vim index 943f87af..ba14a1e3 100644 --- a/syntax/desc.vim +++ b/syntax/desc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/desc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('desc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'desc') == -1 " Vim syntax file " Language: T2 / ROCK Linux .desc @@ -95,5 +90,3 @@ hi def link descText Comment let b:current_syntax = "desc" - -endif diff --git a/syntax/desktop.vim b/syntax/desktop.vim index 9e149339..c1d5a9ea 100644 --- a/syntax/desktop.vim +++ b/syntax/desktop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/desktop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('desktop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'desktop') == -1 " Vim syntax file " Language: XDG desktop entry @@ -274,5 +269,3 @@ let b:current_syntax = "desktop" let &cpo = s:cpo_save " vim:ts=8:sw=2:fdm=marker - -endif diff --git a/syntax/dhall.vim b/syntax/dhall.vim index 4c27d0fe..e5957507 100644 --- a/syntax/dhall.vim +++ b/syntax/dhall.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dhall.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dhall', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 scriptencoding utf-8 @@ -71,5 +66,3 @@ highlight link dhallMultilineComment Comment highlight link dhallHash Keyword let b:current_syntax = 'dhall' - -endif diff --git a/syntax/dictconf.vim b/syntax/dictconf.vim index c515cf56..44efc352 100644 --- a/syntax/dictconf.vim +++ b/syntax/dictconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dictconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictconf') == -1 " Vim syntax file " Language: dict(1) configuration file @@ -87,5 +82,3 @@ let b:current_syntax = "dictconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/dictdconf.vim b/syntax/dictdconf.vim index c30a900c..5fb5ebf3 100644 --- a/syntax/dictdconf.vim +++ b/syntax/dictdconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dictdconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictdconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictdconf') == -1 " Vim syntax file " Language: dictd(8) configuration file @@ -153,5 +148,3 @@ let b:current_syntax = "dictdconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/diff.vim b/syntax/diff.vim index 08b1f7dc..43f99fb1 100644 --- a/syntax/diff.vim +++ b/syntax/diff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/diff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('diff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'diff') == -1 " Vim syntax file " Language: Diff (context or unified) @@ -389,5 +384,3 @@ hi def link diffComment Comment let b:current_syntax = "diff" " vim: ts=8 sw=2 - -endif diff --git a/syntax/dircolors.vim b/syntax/dircolors.vim index 53297837..ce5d3cd4 100644 --- a/syntax/dircolors.vim +++ b/syntax/dircolors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dircolors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dircolors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dircolors') == -1 " Vim syntax file " Language: dircolors(1) input file @@ -229,5 +224,3 @@ let b:current_syntax = "dircolors" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/django.vim b/syntax/django.vim index dfe54082..9912b8c5 100644 --- a/syntax/django.vim +++ b/syntax/django.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/django.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 " Vim syntax file " Language: Django template @@ -90,5 +85,3 @@ hi def link djangoTodo Todo let b:current_syntax = "django" - -endif diff --git a/syntax/dnsmasq.vim b/syntax/dnsmasq.vim index 5373fea7..d523fe23 100644 --- a/syntax/dnsmasq.vim +++ b/syntax/dnsmasq.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dnsmasq.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dnsmasq', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dnsmasq') == -1 " Vim syntax file " Maintainer: Thilo Six @@ -249,5 +244,3 @@ let b:current_syntax = "dnsmasq" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/docker-compose.vim b/syntax/docker-compose.vim index 71648bbb..9290403d 100644 --- a/syntax/docker-compose.vim +++ b/syntax/docker-compose.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/docker-compose.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('docker-compose', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'docker-compose') == -1 " Vim syntax file " Language: Dockerfile @@ -87,5 +82,3 @@ hi link dockercomposeTodo Todo hi link bashStatement Function let b:current_syntax = "dockercompose" - -endif diff --git a/syntax/dockerfile.vim b/syntax/dockerfile.vim index 5bd4c9f9..7c2ff280 100644 --- a/syntax/dockerfile.vim +++ b/syntax/dockerfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dockerfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dockerfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 " dockerfile.vim - Syntax highlighting for Dockerfiles " Maintainer: Honza Pokorny <https://honza.ca> @@ -52,5 +47,3 @@ hi def link dockerfileComment Comment hi def link dockerfileOption Special let b:current_syntax = "dockerfile" - -endif diff --git a/syntax/dosbatch.vim b/syntax/dosbatch.vim index ee42764d..49d47314 100644 --- a/syntax/dosbatch.vim +++ b/syntax/dosbatch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dosbatch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosbatch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosbatch') == -1 " Vim syntax file " Language: MSDOS batch file (with NT command extensions) @@ -154,5 +149,3 @@ hi def link dosbatchCmd PreProc let b:current_syntax = "dosbatch" " vim: ts=8 - -endif diff --git a/syntax/dosini.vim b/syntax/dosini.vim index 48933236..fd8bb3a7 100644 --- a/syntax/dosini.vim +++ b/syntax/dosini.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dosini.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosini', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosini') == -1 " Vim syntax file " Language: Configuration File (ini file) for MSDOS/MS Windows @@ -47,5 +42,3 @@ hi def link dosiniValue String let b:current_syntax = "dosini" " vim: sts=2 sw=2 et - -endif diff --git a/syntax/dot.vim b/syntax/dot.vim index a2f442d3..57733404 100644 --- a/syntax/dot.vim +++ b/syntax/dot.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dot.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dot', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dot') == -1 " Vim syntax file " Language: Dot @@ -104,5 +99,3 @@ hi def link dotIdentifier Identifier let b:current_syntax = "dot" " vim: ts=8 - -endif diff --git a/syntax/dracula.vim b/syntax/dracula.vim index 14b29922..df90e153 100644 --- a/syntax/dracula.vim +++ b/syntax/dracula.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dracula.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dracula', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dracula') == -1 " Vim syntax file " Language: Dracula @@ -79,5 +74,3 @@ hi def link draculaPreProc PreProc let b:current_syntax = "dracula" " vim: ts=8 - -endif diff --git a/syntax/dsdl.vim b/syntax/dsdl.vim index bf6818f9..d66e483e 100644 --- a/syntax/dsdl.vim +++ b/syntax/dsdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dsdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 " Vim syntax file for DUB configurations." " @@ -97,5 +92,3 @@ hi def link dsdlStatement Statement hi def link dsdlAttribute Tag let b:current_syntax = "dsdl" - -endif diff --git a/syntax/dsl.vim b/syntax/dsl.vim index 03fa01c7..5b0972dd 100644 --- a/syntax/dsl.vim +++ b/syntax/dsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dsl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dsl') == -1 " Vim syntax file " Language: DSSSL @@ -45,5 +40,3 @@ hi def link dslComment Comment hi def link dslCondDelim Type let b:current_syntax = "dsl" - -endif diff --git a/syntax/dtd.vim b/syntax/dtd.vim index dfb0258e..f2510263 100644 --- a/syntax/dtd.vim +++ b/syntax/dtd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dtd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dtd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dtd') == -1 " Vim syntax file " Language: DTD (Document Type Definition for XML) @@ -168,5 +163,3 @@ unlet s:dtd_cpo_save let b:current_syntax = "dtd" " vim: ts=8 - -endif diff --git a/syntax/dts.vim b/syntax/dts.vim index e326fdef..66cfd370 100644 --- a/syntax/dts.vim +++ b/syntax/dts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dts', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dts') == -1 " Vim syntax file " Language: dts/dtsi (device tree files) @@ -37,5 +32,3 @@ hi def link dtsReference Macro hi def link dtsComment Comment hi def link dtsCommentInner Comment hi def link dtsCommentLine Comment - -endif diff --git a/syntax/dune.vim b/syntax/dune.vim index e4fdfd80..5fb01ff4 100644 --- a/syntax/dune.vim +++ b/syntax/dune.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dune.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:current_syntax") finish @@ -43,5 +38,3 @@ syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol hi def link duneVar Identifier let b:current_syntax = "dune" - -endif diff --git a/syntax/dylan.vim b/syntax/dylan.vim index 101cd301..81103918 100644 --- a/syntax/dylan.vim +++ b/syntax/dylan.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dylan.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dylan', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dylan') == -1 " Vim syntax file " Language: Dylan @@ -99,5 +94,3 @@ hi def link dylanVariable Identifier let b:current_syntax = "dylan" " vim:ts=8 - -endif diff --git a/syntax/dylanintr.vim b/syntax/dylanintr.vim index ed531a47..b01740c8 100644 --- a/syntax/dylanintr.vim +++ b/syntax/dylanintr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dylanintr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dylanintr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dylanintr') == -1 " Vim syntax file " Language: Dylan @@ -46,5 +41,3 @@ hi def link dylanintrInclude Include let b:current_syntax = "dylanintr" " vim:ts=8 - -endif diff --git a/syntax/dylanlid.vim b/syntax/dylanlid.vim index 0ad321d6..c847ab44 100644 --- a/syntax/dylanlid.vim +++ b/syntax/dylanlid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/dylanlid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dylanlid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dylanlid') == -1 " Vim syntax file " Language: Dylan Library Interface Files @@ -36,5 +31,3 @@ hi def link dylanlidEntry String let b:current_syntax = "dylanlid" " vim:ts=8 - -endif diff --git a/syntax/ecd.vim b/syntax/ecd.vim index eee18593..2a953b6c 100644 --- a/syntax/ecd.vim +++ b/syntax/ecd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ecd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ecd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ecd') == -1 " Vim syntax file " Language: ecd (Embedix Component Description) files @@ -51,5 +46,3 @@ hi def link ecdTagError Error let b:current_syntax = "ecd" " vim: ts=8 - -endif diff --git a/syntax/ecrystal.vim b/syntax/ecrystal.vim index bfcb07d8..84166ed9 100644 --- a/syntax/ecrystal.vim +++ b/syntax/ecrystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ecrystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 if &syntax !~# '\<ecrystal\>' || get(b:, 'current_syntax') =~# '\<ecrystal\>' finish @@ -40,5 +35,3 @@ let b:current_syntax = 'ecrystal' if exists('main_syntax') && main_syntax ==# 'ecrystal' unlet main_syntax endif - -endif diff --git a/syntax/edif.vim b/syntax/edif.vim index 4271733a..bbe99d1d 100644 --- a/syntax/edif.vim +++ b/syntax/edif.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/edif.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('edif', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'edif') == -1 " Vim syntax file " Language: EDIF (Electronic Design Interchange Format) @@ -52,5 +47,3 @@ hi def link edifError Error hi def link edifString String let b:current_syntax = "edif" - -endif diff --git a/syntax/eelixir.vim b/syntax/eelixir.vim index 906a1d2b..947a3cbe 100644 --- a/syntax/eelixir.vim +++ b/syntax/eelixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/eelixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("b:current_syntax") finish @@ -77,5 +72,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/elf.vim b/syntax/elf.vim index 5da19f96..e5532b7f 100644 --- a/syntax/elf.vim +++ b/syntax/elf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/elf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1 " Vim syntax file " Language: ELF @@ -89,5 +84,3 @@ hi def link elfPunct Delimiter let b:current_syntax = "elf" " vim:ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/elinks.vim b/syntax/elinks.vim index 41b91fb3..4b90f02b 100644 --- a/syntax/elinks.vim +++ b/syntax/elinks.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/elinks.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elinks', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elinks') == -1 " Vim syntax file " Language: elinks(1) configuration file @@ -195,5 +190,3 @@ let b:current_syntax = "elinks" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/elixir.vim b/syntax/elixir.vim index ce3d51da..70b76e3d 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/elixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if !exists("main_syntax") if exists("b:current_syntax") @@ -251,5 +246,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/elm.vim b/syntax/elm.vim index a7551514..ae095a1b 100644 --- a/syntax/elm.vim +++ b/syntax/elm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/elm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elm') == -1 " syntax highlighting for Elm (https://elm-lang.org/) @@ -106,5 +101,3 @@ hi def link elmModule Type syn sync minlines=500 let b:current_syntax = 'elm' - -endif diff --git a/syntax/elmfilt.vim b/syntax/elmfilt.vim index 22ca2d14..1a83f8e9 100644 --- a/syntax/elmfilt.vim +++ b/syntax/elmfilt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/elmfilt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elmfilt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elmfilt') == -1 " Vim syntax file " Language: Elm Filter rules @@ -65,5 +60,3 @@ endif let b:current_syntax = "elmfilt" " vim: ts=9 - -endif diff --git a/syntax/embeddedpuppet.vim b/syntax/embeddedpuppet.vim index 024f49af..1540cb02 100644 --- a/syntax/embeddedpuppet.vim +++ b/syntax/embeddedpuppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/embeddedpuppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim syntax plugin " Language: embedded puppet @@ -36,5 +31,3 @@ hi def link ePuppetComment Comment let b:current_syntax = "embeddedpuppet" - -endif diff --git a/syntax/ember-script.vim b/syntax/ember-script.vim index 8023bc72..e8221930 100644 --- a/syntax/ember-script.vim +++ b/syntax/ember-script.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ember-script.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emberscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> @@ -38,5 +33,3 @@ syn match emEach /\v\@each/ display hi def link emEach Special let b:current_syntax = 'ember-script' - -endif diff --git a/syntax/emblem.vim b/syntax/emblem.vim index 1c1971ff..08670626 100644 --- a/syntax/emblem.vim +++ b/syntax/emblem.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/emblem.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emblem', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> @@ -178,5 +173,3 @@ hi def link eblId Constant hi def link eblClass Identifier let b:current_syntax = 'emblem' - -endif diff --git a/syntax/erlang.vim b/syntax/erlang.vim index ad6cf13a..434aeb58 100644 --- a/syntax/erlang.vim +++ b/syntax/erlang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/erlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('erlang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1 " Vim syntax file " Language: Erlang (http://www.erlang.org) @@ -268,5 +263,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 et - -endif diff --git a/syntax/eruby.vim b/syntax/eruby.vim index bb48261d..b129bef7 100644 --- a/syntax/eruby.vim +++ b/syntax/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim syntax file " Language: eRuby @@ -87,5 +82,3 @@ if main_syntax == 'eruby' endif " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/syntax/esmtprc.vim b/syntax/esmtprc.vim index 50d7f384..13e6b5d7 100644 --- a/syntax/esmtprc.vim +++ b/syntax/esmtprc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/esmtprc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('esmtprc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'esmtprc') == -1 " Vim syntax file " Language: Esmtp setup file (based on esmtp 0.5.0) @@ -38,5 +33,3 @@ highlight link esmtprcIdentifier Identifier highlight link esmtprcFulladd Include let b:current_syntax = "esmtprc" - -endif diff --git a/syntax/esqlc.vim b/syntax/esqlc.vim index 90c757d8..038dd307 100644 --- a/syntax/esqlc.vim +++ b/syntax/esqlc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/esqlc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('esqlc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'esqlc') == -1 " Vim syntax file " Language: ESQL-C @@ -65,5 +60,3 @@ hi def link esqlcPreProc PreProc let b:current_syntax = "esqlc" - -endif diff --git a/syntax/esterel.vim b/syntax/esterel.vim index ac461884..69984e9b 100644 --- a/syntax/esterel.vim +++ b/syntax/esterel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/esterel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('esterel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'esterel') == -1 " Vim syntax file " Language: ESTEREL @@ -85,5 +80,3 @@ hi def link esterelSpecial Special let b:current_syntax = "esterel" - -endif diff --git a/syntax/eterm.vim b/syntax/eterm.vim index 4e8ba54d..306b19d7 100644 --- a/syntax/eterm.vim +++ b/syntax/eterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/eterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('eterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'eterm') == -1 " Vim syntax file " Language: eterm(1) configuration file @@ -436,5 +431,3 @@ let b:current_syntax = "eterm" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/exim.vim b/syntax/exim.vim index 8d73a662..cd6a0c65 100644 --- a/syntax/exim.vim +++ b/syntax/exim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/exim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('exim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'exim') == -1 " Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. @@ -112,5 +107,3 @@ hi def link eximTransport Identifier let b:current_syntax = "exim" - -endif diff --git a/syntax/expect.vim b/syntax/expect.vim index 28d3daf5..439d5d3e 100644 --- a/syntax/expect.vim +++ b/syntax/expect.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/expect.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('expect', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'expect') == -1 " Vim syntax file " Language: Expect @@ -110,5 +105,3 @@ hi def link expectTodo Todo let b:current_syntax = "expect" " vim: ts=8 - -endif diff --git a/syntax/exports.vim b/syntax/exports.vim index 6ec91b98..a47d6536 100644 --- a/syntax/exports.vim +++ b/syntax/exports.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/exports.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('exports', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'exports') == -1 " Vim syntax file " Language: exports @@ -65,5 +60,3 @@ endif let b:current_syntax = "exports" " vim: ts=10 - -endif diff --git a/syntax/falcon.vim b/syntax/falcon.vim index 500bb08e..b0018389 100644 --- a/syntax/falcon.vim +++ b/syntax/falcon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/falcon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('falcon', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'falcon') == -1 " Vim syntax file " Language: Falcon @@ -204,5 +199,3 @@ let b:current_syntax = "falcon" " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/syntax/fan.vim b/syntax/fan.vim index 929f1f91..0d1d733a 100644 --- a/syntax/fan.vim +++ b/syntax/fan.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fan.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fan', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fan') == -1 " Vim syntax file " Language: Fantom @@ -139,5 +134,3 @@ hi def link fanSpaceError Error let b:current_syntax = "fan" " vim: ts=8 - -endif diff --git a/syntax/fbs.vim b/syntax/fbs.vim index 76da1e0b..eca7d5d9 100644 --- a/syntax/fbs.vim +++ b/syntax/fbs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fbs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('flatbuffers', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'flatbuffers') == -1 if exists("b:current_syntax") finish @@ -59,5 +54,3 @@ if version >= 508 || !exists("did_proto_syn_inits") endif let b:current_syntax = "fbs" - -endif diff --git a/syntax/fennel.vim b/syntax/fennel.vim index 827abe04..918d2886 100644 --- a/syntax/fennel.vim +++ b/syntax/fennel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fennel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fennel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1 " Vim syntax file " Language: FENNEL @@ -290,5 +285,3 @@ let b:current_syntax = "fennel" let &cpo = s:cpo_sav unlet! s:cpo_sav - -endif diff --git a/syntax/ferm.vim b/syntax/ferm.vim index 55af4ac4..f3ed8809 100644 --- a/syntax/ferm.vim +++ b/syntax/ferm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ferm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ferm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ferm') == -1 "============================================================================ " ferm syntax highlighter @@ -210,5 +205,3 @@ endif " Autoconfigure vim indentation settings " vim:ts=4:sw=4:sts=4:fdm=marker:iskeyword+=- - -endif diff --git a/syntax/fetchmail.vim b/syntax/fetchmail.vim index 2fb401d5..e69130f7 100644 --- a/syntax/fetchmail.vim +++ b/syntax/fetchmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fetchmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fetchmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fetchmail') == -1 " Vim syntax file " Language: fetchmail(1) RC File @@ -82,5 +77,3 @@ let b:current_syntax = "fetchmail" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/fgl.vim b/syntax/fgl.vim index c115dd02..24cccde9 100644 --- a/syntax/fgl.vim +++ b/syntax/fgl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fgl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fgl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fgl') == -1 " Vim syntax file " Language: Informix 4GL @@ -141,5 +136,3 @@ hi def link fglType Type let b:current_syntax = "fgl" " vim: ts=8 - -endif diff --git a/syntax/fish.vim b/syntax/fish.vim index 9e39499f..c2ffeb1a 100644 --- a/syntax/fish.vim +++ b/syntax/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 if exists('b:current_syntax') finish @@ -44,5 +39,3 @@ highlight default link fishStatement Statement highlight default link fishCommandSub fishStatement let b:current_syntax = 'fish' - -endif diff --git a/syntax/flow.vim b/syntax/flow.vim index 12a2b4d2..ec6f583b 100644 --- a/syntax/flow.vim +++ b/syntax/flow.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/flow.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 runtime syntax/javascript.vim runtime extras/flow.vim - -endif diff --git a/syntax/focexec.vim b/syntax/focexec.vim index 3e195913..7bc93bac 100644 --- a/syntax/focexec.vim +++ b/syntax/focexec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/focexec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('focexec', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'focexec') == -1 " Vim syntax file " Language: Focus Executable @@ -95,5 +90,3 @@ hi def link focexecFuse Function let b:current_syntax = "focexec" " vim: ts=8 - -endif diff --git a/syntax/forth.vim b/syntax/forth.vim index c61b6a46..1bf4946f 100644 --- a/syntax/forth.vim +++ b/syntax/forth.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/forth.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('forth', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1 " Vim syntax file " Language: FORTH @@ -269,5 +264,3 @@ let b:current_syntax = "forth" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/fortran.vim b/syntax/fortran.vim index ea2ccfa5..5acdf58f 100644 --- a/syntax/fortran.vim +++ b/syntax/fortran.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fortran.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fortran', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1 " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) @@ -553,5 +548,3 @@ let b:current_syntax = "fortran" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 tw=132 - -endif diff --git a/syntax/framescript.vim b/syntax/framescript.vim index ae7e8033..59de43f5 100644 --- a/syntax/framescript.vim +++ b/syntax/framescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/framescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('framescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'framescript') == -1 " Vim syntax file " Language: FrameScript v4.0 @@ -498,5 +493,3 @@ let b:current_syntax = "framescript" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/freebasic.vim b/syntax/freebasic.vim index 955d03a1..42a16b14 100644 --- a/syntax/freebasic.vim +++ b/syntax/freebasic.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/freebasic.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('freebasic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'freebasic') == -1 " Vim syntax file " Language: FreeBasic @@ -264,5 +259,3 @@ hi def link freebasicTodo Todo let b:current_syntax = "freebasic" " vim: ts=8 - -endif diff --git a/syntax/fsharp.vim b/syntax/fsharp.vim index 811ee00a..209639b1 100644 --- a/syntax/fsharp.vim +++ b/syntax/fsharp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fsharp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fsharp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 " Vim syntax file " Language: F# @@ -281,5 +276,3 @@ endif let b:current_syntax = 'fsharp' " vim: sw=4 et sts=4 - -endif diff --git a/syntax/fstab.vim b/syntax/fstab.vim index 6c0539f6..a4c44bb4 100644 --- a/syntax/fstab.vim +++ b/syntax/fstab.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fstab.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fstab', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fstab') == -1 " Vim syntax file " Language: fstab file @@ -298,5 +293,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 ft=vim - -endif diff --git a/syntax/fvwm.vim b/syntax/fvwm.vim index e244f9d7..7ea554d2 100644 --- a/syntax/fvwm.vim +++ b/syntax/fvwm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/fvwm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fvwm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fvwm') == -1 " Vim syntax file for Fvwm-2.5.22 " Language: Fvwm{1,2} configuration file @@ -649,5 +644,3 @@ let b:current_syntax = "fvwm" let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/syntax/gdb.vim b/syntax/gdb.vim index 27aa26f5..31eceac0 100644 --- a/syntax/gdb.vim +++ b/syntax/gdb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gdb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdb') == -1 " Vim syntax file " Language: GDB command files @@ -110,5 +105,3 @@ let b:current_syntax = "gdb" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/gdmo.vim b/syntax/gdmo.vim index 01327e5c..86f827a6 100644 --- a/syntax/gdmo.vim +++ b/syntax/gdmo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gdmo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdmo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdmo') == -1 " Vim syntax file " Language: GDMO @@ -90,5 +85,3 @@ hi def link gdmoType Type let b:current_syntax = "gdmo" " vim: ts=8 - -endif diff --git a/syntax/gdscript3.vim b/syntax/gdscript3.vim index 2b943443..b7bc35b4 100644 --- a/syntax/gdscript3.vim +++ b/syntax/gdscript3.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gdscript3.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1 " Syntax file for GDScript @@ -104,5 +99,3 @@ hi def link gdTodo Todo let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/syntax/gedcom.vim b/syntax/gedcom.vim index 64868ecc..67609240 100644 --- a/syntax/gedcom.vim +++ b/syntax/gedcom.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gedcom.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gedcom', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gedcom') == -1 " Vim syntax file " Language: Gedcom @@ -60,5 +55,3 @@ hi def link gedcom_date Constant let b:current_syntax = "gedcom" - -endif diff --git a/syntax/git.vim b/syntax/git.vim index 13d5f5fb..73f7d44e 100644 --- a/syntax/git.vim +++ b/syntax/git.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/git.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim syntax file " Language: generic git output @@ -87,5 +82,3 @@ hi def link gitDiffAdded diffAdded hi def link gitDiffRemoved diffRemoved let b:current_syntax = "git" - -endif diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index 5b0d5e77..0ae05f81 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim syntax file " Language: git commit file @@ -100,5 +95,3 @@ hi def link gitcommitArrow gitcommitComment hi def link gitcommitBlank Error let b:current_syntax = "gitcommit" - -endif diff --git a/syntax/gitconfig.vim b/syntax/gitconfig.vim index 4aef73e3..e0a91a2c 100644 --- a/syntax/gitconfig.vim +++ b/syntax/gitconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim syntax file " Language: git config file @@ -43,5 +38,3 @@ hi def link gitconfigEscape Special hi def link gitconfigError Error let b:current_syntax = "gitconfig" - -endif diff --git a/syntax/gitignore.vim b/syntax/gitignore.vim index f946f6b7..177713f8 100644 --- a/syntax/gitignore.vim +++ b/syntax/gitignore.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitignore.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitignore', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1 scriptencoding utf-8 @@ -36,5 +31,3 @@ highlight default link gitignoreSet Character let b:current_syntax = 'gitignore' " vim: ts=2 et sw=2 - -endif diff --git a/syntax/gitolite.vim b/syntax/gitolite.vim index 56f9268d..286fa1b4 100644 --- a/syntax/gitolite.vim +++ b/syntax/gitolite.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitolite.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitolite', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitolite') == -1 " Vim syntax file " Language: gitolite configuration @@ -101,5 +96,3 @@ let b:current_syntax = "gitolite" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/gitrebase.vim b/syntax/gitrebase.vim index 5cbda44c..344a9269 100644 --- a/syntax/gitrebase.vim +++ b/syntax/gitrebase.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitrebase.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim syntax file " Language: git rebase --interactive @@ -64,5 +59,3 @@ hi def link gitrebaseMergeComment gitrebaseComment hi def link gitrebaseName Tag let b:current_syntax = "gitrebase" - -endif diff --git a/syntax/gitsendemail.vim b/syntax/gitsendemail.vim index d60e448a..41e0bec8 100644 --- a/syntax/gitsendemail.vim +++ b/syntax/gitsendemail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gitsendemail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim syntax file " Language: git send-email message @@ -30,5 +25,3 @@ syn match gitsendemailComment "^GIT:.*" hi def link gitsendemailComment Comment let b:current_syntax = "gitsendemail" - -endif diff --git a/syntax/gkrellmrc.vim b/syntax/gkrellmrc.vim index 1c981869..68ba85fb 100644 --- a/syntax/gkrellmrc.vim +++ b/syntax/gkrellmrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gkrellmrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gkrellmrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gkrellmrc') == -1 " Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. @@ -82,5 +77,3 @@ hi def link gkrellmrcStyleCmd Statement let b:current_syntax = "gkrellmrc" - -endif diff --git a/syntax/glsl.vim b/syntax/glsl.vim index a2bdb8b0..fa81f97a 100644 --- a/syntax/glsl.vim +++ b/syntax/glsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/glsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('glsl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1 " Language: OpenGL Shading Language " Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io> @@ -682,5 +677,3 @@ if !exists("b:current_syntax") endif " vim:set sts=2 sw=2 : - -endif diff --git a/syntax/gmpl.vim b/syntax/gmpl.vim index 2b866453..0b410ee8 100644 --- a/syntax/gmpl.vim +++ b/syntax/gmpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gmpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gmpl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gmpl') == -1 " Vim syntax file " Language: GMPL @@ -125,5 +120,3 @@ hi def link gmplType Type hi def link gmplLabel Keyword hi def link gmplString String hi def link gmplStringToken Special - -endif diff --git a/syntax/gnash.vim b/syntax/gnash.vim index 1adf335d..6109254b 100644 --- a/syntax/gnash.vim +++ b/syntax/gnash.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gnash.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gnash', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gnash') == -1 " Vim syntax file " Maintainer: Thilo Six @@ -103,5 +98,3 @@ hi def link GnashKeyword Keyword let b:current_syntax = "gnash" - -endif diff --git a/syntax/gnuplot.vim b/syntax/gnuplot.vim index 734dbbf7..ae42ab8a 100644 --- a/syntax/gnuplot.vim +++ b/syntax/gnuplot.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gnuplot.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gnuplot', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gnuplot') == -1 " Vim syntax file " Language: gnuplot 4.7.0 @@ -561,5 +556,3 @@ endif let b:current_syntax = "gnuplot" " vim: ts=8 - -endif diff --git a/syntax/go.vim b/syntax/go.vim index f546b91a..b28002ec 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/go.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " Copyright 2009 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -452,5 +447,3 @@ syn sync minlines=500 let b:current_syntax = "go" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugoutput.vim b/syntax/godebugoutput.vim index 483518bc..e02d8523 100644 --- a/syntax/godebugoutput.vim +++ b/syntax/godebugoutput.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/godebugoutput.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -20,5 +15,3 @@ hi def link godebugOutputErr Comment hi def link godebugOutputOut Normal " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugstacktrace.vim b/syntax/godebugstacktrace.vim index c3964205..0e25da3b 100644 --- a/syntax/godebugstacktrace.vim +++ b/syntax/godebugstacktrace.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/godebugstacktrace.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -18,5 +13,3 @@ let b:current_syntax = "godebugoutput" hi def link godebugStacktrace SpecialKey " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugvariables.vim b/syntax/godebugvariables.vim index 51d9fa3f..1148a534 100644 --- a/syntax/godebugvariables.vim +++ b/syntax/godebugvariables.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/godebugvariables.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -30,5 +25,3 @@ hi def link goType Type hi def link goBoolean Boolean " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godefstack.vim b/syntax/godefstack.vim index 228a8237..c20dd5a7 100644 --- a/syntax/godefstack.vim +++ b/syntax/godefstack.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/godefstack.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -27,5 +22,3 @@ hi def link godefStackFilename Directory hi def link godefStackEntryLocationNumber LineNr " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gohtmltmpl.vim b/syntax/gohtmltmpl.vim index f38d9532..86d59daa 100644 --- a/syntax/gohtmltmpl.vim +++ b/syntax/gohtmltmpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gohtmltmpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -24,5 +19,3 @@ syn cluster htmlPreproc add=gotplAction,goTplComment let b:current_syntax = "gohtmltmpl" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gomod.vim b/syntax/gomod.vim index 4e3cf484..56790034 100644 --- a/syntax/gomod.vim +++ b/syntax/gomod.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gomod.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " gomod.vim: Vim syntax file for go.mod file " @@ -99,5 +94,3 @@ syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\. highlight default link gomodVersion Identifier let b:current_syntax = "gomod" - -endif diff --git a/syntax/gotexttmpl.vim b/syntax/gotexttmpl.vim index a4af59a9..6accca5f 100644 --- a/syntax/gotexttmpl.vim +++ b/syntax/gotexttmpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gotexttmpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 " Copyright 2011 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -92,5 +87,3 @@ hi def link goTplComment Comment let b:current_syntax = "gotexttmpl" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gp.vim b/syntax/gp.vim index 634bbd59..b60abfd3 100644 --- a/syntax/gp.vim +++ b/syntax/gp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gp') == -1 " Vim syntax file " Language: gp (version 2.5) @@ -90,5 +85,3 @@ let b:current_syntax = "gp" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/gpg.vim b/syntax/gpg.vim index e227e22a..f02d6f94 100644 --- a/syntax/gpg.vim +++ b/syntax/gpg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gpg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gpg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gpg') == -1 " Vim syntax file " Language: gpg(1) configuration file @@ -112,5 +107,3 @@ let b:current_syntax = "gpg" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/grads.vim b/syntax/grads.vim index e9efe050..d733850e 100644 --- a/syntax/grads.vim +++ b/syntax/grads.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/grads.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('grads', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grads') == -1 " Vim syntax file " Language: grads (GrADS scripts) @@ -80,5 +75,3 @@ hi def link gradsTypos Error let b:current_syntax = "grads" - -endif diff --git a/syntax/graphql.vim b/syntax/graphql.vim index c3410528..58d7584a 100644 --- a/syntax/graphql.vim +++ b/syntax/graphql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/graphql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -102,5 +97,3 @@ hi def link graphqlVariable Identifier syn sync minlines=500 let b:current_syntax = 'graphql' - -endif diff --git a/syntax/gretl.vim b/syntax/gretl.vim index 1ff069d4..43a41a37 100644 --- a/syntax/gretl.vim +++ b/syntax/gretl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gretl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gretl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gretl') == -1 " Vim syntax file " Language: gretl (http://gretl.sf.net) @@ -92,5 +87,3 @@ hi def link gArrow Repeat let b:current_syntax="gretl" " vim: ts=8 sw=2 - -endif diff --git a/syntax/groovy.vim b/syntax/groovy.vim index 0ccf8d34..bfa9ab4c 100644 --- a/syntax/groovy.vim +++ b/syntax/groovy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/groovy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('groovy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'groovy') == -1 " Vim syntax file " Language: Groovy @@ -457,5 +452,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/group.vim b/syntax/group.vim index 4b06fc07..ca808bc8 100644 --- a/syntax/group.vim +++ b/syntax/group.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/group.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('group', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'group') == -1 " Vim syntax file " Language: group(5) user group file @@ -59,5 +54,3 @@ let b:current_syntax = "group" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/grub.vim b/syntax/grub.vim index fafa4637..ff980818 100644 --- a/syntax/grub.vim +++ b/syntax/grub.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/grub.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('grub', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 " Vim syntax file " Language: grub(8) configuration file @@ -100,5 +95,3 @@ let b:current_syntax = "grub" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/gsl.vim b/syntax/gsl.vim index 9590530c..fa65bfc3 100644 --- a/syntax/gsl.vim +++ b/syntax/gsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1 " Syntax file for Godot Shading Language @@ -66,5 +61,3 @@ hi def link gslTodo Todo let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/syntax/gsp.vim b/syntax/gsp.vim index 1bbf3c0e..fd7d3848 100644 --- a/syntax/gsp.vim +++ b/syntax/gsp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gsp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gsp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gsp') == -1 " Vim syntax file " Language: GSP - GNU Server Pages (v. 0.86) @@ -61,5 +56,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/gtkrc.vim b/syntax/gtkrc.vim index 1a6d86f4..4de03a65 100644 --- a/syntax/gtkrc.vim +++ b/syntax/gtkrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/gtkrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gtkrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gtkrc') == -1 " Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. @@ -133,5 +128,3 @@ hi def link gtkrcError Error let b:current_syntax = "gtkrc" - -endif diff --git a/syntax/haml.vim b/syntax/haml.vim index 32c6f794..5622da7d 100644 --- a/syntax/haml.vim +++ b/syntax/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim syntax file " Language: Haml @@ -116,5 +111,3 @@ if main_syntax == "haml" endif " vim:set sw=2: - -endif diff --git a/syntax/hamster.vim b/syntax/hamster.vim index df1d17bc..956e0aca 100644 --- a/syntax/hamster.vim +++ b/syntax/hamster.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hamster.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hamster', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1 " Vim syntax file " Language: Hamster Scripting Language @@ -377,5 +372,3 @@ hi def link hamsterFunction Function let b:current_syntax = "hamster" " vim:sw=4 - -endif diff --git a/syntax/handlebars.vim b/syntax/handlebars.vim index 1eba110a..e16e9a04 100644 --- a/syntax/handlebars.vim +++ b/syntax/handlebars.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/handlebars.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 " Mustache & Handlebars syntax " Language: Mustache, Handlebars @@ -113,5 +108,3 @@ syn region mustacheScriptTemplate start=+<script [^>]*type *=[^>]*text/\(mustach let b:current_syntax = "handlebars" delcommand HtmlHiLink - -endif diff --git a/syntax/haproxy.vim b/syntax/haproxy.vim index df9bfd90..4871305e 100644 --- a/syntax/haproxy.vim +++ b/syntax/haproxy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/haproxy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haproxy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haproxy') == -1 " Vim syntax file " Language: HAproxy @@ -363,5 +358,3 @@ delcommand HiLink let b:current_syntax = "haproxy" " vim: ts=8 - -endif diff --git a/syntax/haskell.vim b/syntax/haskell.vim index 4f25ed8b..0171244b 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/haskell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 " syntax highlighting for haskell " @@ -215,5 +210,3 @@ if get(g:, 'haskell_backpack', 0) highlight def link haskellBackpackDependency Include endif let b:current_syntax = "haskell" - -endif diff --git a/syntax/haste.vim b/syntax/haste.vim index 1f75c950..581c7b12 100644 --- a/syntax/haste.vim +++ b/syntax/haste.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/haste.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haste', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haste') == -1 " Vim syntax file " Language: HASTE - a language for VLSI IC programming @@ -149,5 +144,3 @@ hi def link hasteInclude Include let b:current_syntax = "haste" " vim: ts=8 - -endif diff --git a/syntax/hastepreproc.vim b/syntax/hastepreproc.vim index 3228740c..7d599def 100644 --- a/syntax/hastepreproc.vim +++ b/syntax/hastepreproc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hastepreproc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hastepreproc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hastepreproc') == -1 " Vim syntax file " Language: Haste preprocessor files @@ -45,5 +40,3 @@ hi def link hastepreprocError Error let b:current_syntax = "hastepreproc" " vim: ts=8 - -endif diff --git a/syntax/haxe.vim b/syntax/haxe.vim index 1ca9f40a..9e12de94 100644 --- a/syntax/haxe.vim +++ b/syntax/haxe.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/haxe.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haxe', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haxe') == -1 " Vim syntax file " Language: haxe @@ -434,5 +429,3 @@ if main_syntax == 'haxe' unlet main_syntax endif let b:spell_options="contained" - -endif diff --git a/syntax/hb.vim b/syntax/hb.vim index 524effc1..ffc392aa 100644 --- a/syntax/hb.vim +++ b/syntax/hb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hb') == -1 " Vim syntax file " Language: Hyper Builder @@ -96,5 +91,3 @@ let b:current_syntax = "hb" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/hcl.vim b/syntax/hcl.vim index b28e6d4f..ed2cef86 100644 --- a/syntax/hcl.vim +++ b/syntax/hcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 if exists("b:current_syntax") @@ -51,5 +46,3 @@ hi def link hclInterpolation String hi def link hclSimpleString PreProc let b:current_syntax = "hcl" - -endif diff --git a/syntax/helm.vim b/syntax/helm.vim index 012a44f8..6182cbd8 100644 --- a/syntax/helm.vim +++ b/syntax/helm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/helm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('helm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'helm') == -1 if exists("b:current_syntax") finish @@ -98,5 +93,3 @@ hi def link goTplComment Comment let b:current_syntax = "helm" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/help.vim b/syntax/help.vim index 53935fae..7bc7dac0 100644 --- a/syntax/help.vim +++ b/syntax/help.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/help.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('help', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 " Vim syntax file " Language: Vim help file @@ -220,5 +215,3 @@ let b:current_syntax = "help" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/hercules.vim b/syntax/hercules.vim index 37a35d4e..e3f429d1 100644 --- a/syntax/hercules.vim +++ b/syntax/hercules.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hercules.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hercules', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hercules') == -1 " Vim syntax file " Language: Hercules @@ -126,5 +121,3 @@ hi def link herculesError Error let b:current_syntax = "hercules" " vim: ts=8 - -endif diff --git a/syntax/hex.vim b/syntax/hex.vim index dcf932cd..d1d753a6 100644 --- a/syntax/hex.vim +++ b/syntax/hex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hex') == -1 " Vim syntax file " Language: Intel HEX @@ -96,5 +91,3 @@ hi def link hexChecksum DiffChange let b:current_syntax = "hex" " vim: ts=8 - -endif diff --git a/syntax/hgcommit.vim b/syntax/hgcommit.vim index 3c27e3b9..1326ef3b 100644 --- a/syntax/hgcommit.vim +++ b/syntax/hgcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hgcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hgcommit', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hgcommit') == -1 " Vim syntax file " Language: hg (Mercurial) commit file @@ -34,5 +29,3 @@ hi def link hgcommitChanged Special hi def link hgcommitRemoved Constant let b:current_syntax = "hgcommit" - -endif diff --git a/syntax/hive.vim b/syntax/hive.vim index 4c53ad7c..c03321d7 100644 --- a/syntax/hive.vim +++ b/syntax/hive.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hive.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hive', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hive') == -1 " Vim syntax file " Language: HIVE Query Language @@ -142,5 +137,3 @@ hi link hiveVar Special let b:current_syntax = "hive" " vim: ts=4 - -endif diff --git a/syntax/hog.vim b/syntax/hog.vim index 68b0b91f..96540cfa 100644 --- a/syntax/hog.vim +++ b/syntax/hog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hog') == -1 " Vim syntax file " Language: hog (Snort.conf + .rules) @@ -215,5 +210,3 @@ hi link HogFileTypeOpt HogRuleOption hi link NotASemiColn HogRuleChars let b:current_syntax = "hog" - -endif diff --git a/syntax/hollywood.vim b/syntax/hollywood.vim index 9ca2dea2..0ba407da 100644 --- a/syntax/hollywood.vim +++ b/syntax/hollywood.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hollywood.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hollywood', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hollywood') == -1 " Vim syntax file " Language: Hollywood 8.0 @@ -188,5 +183,3 @@ let b:current_syntax = "hollywood" let &cpo = s:cpo_save unlet s:cpo_save " vim: et ts=8 sw=2 - -endif diff --git a/syntax/hostconf.vim b/syntax/hostconf.vim index 2c912bc6..bf740b64 100644 --- a/syntax/hostconf.vim +++ b/syntax/hostconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hostconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostconf') == -1 " Vim syntax file " Language: host.conf(5) configuration file @@ -154,5 +149,3 @@ let b:current_syntax = "hostconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/hostsaccess.vim b/syntax/hostsaccess.vim index 4882840e..9e905ff9 100644 --- a/syntax/hostsaccess.vim +++ b/syntax/hostsaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/hostsaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostsaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostsaccess') == -1 " Vim syntax file " Language: hosts.deny, hosts.allow configuration files @@ -30,5 +25,3 @@ unlet b:current_syntax let b:current_syntax = "hostsaccess" " vim: ts=8 sw=2 - -endif diff --git a/syntax/html.vim b/syntax/html.vim index a505da2a..23d33446 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1 " Vim syntax file " Language: HTML @@ -345,5 +340,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/htmldjango.vim b/syntax/htmldjango.vim index 0282f30c..cd7e4660 100644 --- a/syntax/htmldjango.vim +++ b/syntax/htmldjango.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/htmldjango.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 " Vim syntax file " Language: Django HTML template @@ -33,5 +28,3 @@ syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomm syn region djangoComBlock start="{#" end="#}" contains=djangoTodo containedin=ALLBUT,@djangoBlocks let b:current_syntax = "htmldjango" - -endif diff --git a/syntax/htmlm4.vim b/syntax/htmlm4.vim index 834c86bf..6294526f 100644 --- a/syntax/htmlm4.vim +++ b/syntax/htmlm4.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/htmlm4.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmlm4', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmlm4') == -1 " Vim syntax file " Language: HTML and M4 @@ -38,5 +33,3 @@ let b:current_syntax = "htmlm4" if main_syntax == 'htmlm4' unlet main_syntax endif - -endif diff --git a/syntax/i3config.vim b/syntax/i3config.vim index 58dd81a0..c1c78ebb 100644 --- a/syntax/i3config.vim +++ b/syntax/i3config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/i3config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('i3', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'i3') == -1 " Vim syntax file " Language: i3 config file @@ -266,5 +261,3 @@ hi! def link i3ConfigVariable Statement hi! def link i3ConfigArbitraryCommand Type let b:current_syntax = "i3config" - -endif diff --git a/syntax/ibasic.vim b/syntax/ibasic.vim index 2959ff72..d80f9caa 100644 --- a/syntax/ibasic.vim +++ b/syntax/ibasic.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ibasic.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ibasic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ibasic') == -1 " Vim syntax file " Language: ibasic @@ -183,5 +178,3 @@ hi def link ibasicMathOperator Operator let b:current_syntax = "ibasic" " vim: ts=8 - -endif diff --git a/syntax/icalendar.vim b/syntax/icalendar.vim index 1912bad8..7815de41 100644 --- a/syntax/icalendar.vim +++ b/syntax/icalendar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/icalendar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('icalendar', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'icalendar') == -1 " Vim syntax file " Language: icalendar <http://www.ietf.org/rfc/rfc2445.txt> @@ -62,5 +57,3 @@ let b:current_syntax = "icalendar" "EOF vim: tw=78:ft=vim:ts=8 - -endif diff --git a/syntax/icemenu.vim b/syntax/icemenu.vim index 26efef5d..928e5c17 100644 --- a/syntax/icemenu.vim +++ b/syntax/icemenu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/icemenu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('icemenu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'icemenu') == -1 " Vim syntax file " Language: Icewm Menu @@ -41,5 +36,3 @@ highlight link _ids Type highlight link _icon Special let b:current_syntax = "IceMenu" - -endif diff --git a/syntax/icon.vim b/syntax/icon.vim index e5adba2b..4f538f3d 100644 --- a/syntax/icon.vim +++ b/syntax/icon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/icon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('icon', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'icon') == -1 " Vim syntax file " Language: Icon @@ -206,5 +201,3 @@ hi def link iconKeyword Operator let b:current_syntax = "icon" - -endif diff --git a/syntax/idris.vim b/syntax/idris.vim index 34a7dc57..2b6293a6 100644 --- a/syntax/idris.vim +++ b/syntax/idris.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/idris.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 " syntax highlighting for idris (idris-lang.org) " @@ -96,5 +91,3 @@ highlight def link idrisChar String highlight def link idrisBacktick Operator let b:current_syntax = "idris" - -endif diff --git a/syntax/idris2.vim b/syntax/idris2.vim index b580cc02..cf6babd9 100644 --- a/syntax/idris2.vim +++ b/syntax/idris2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/idris2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 " syntax highlighting for Idris 2 (idris-lang.org) " @@ -88,5 +83,3 @@ highlight def link idrisChar String highlight def link idrisBacktick Operator let b:current_syntax = "idris2" - -endif diff --git a/syntax/indent.vim b/syntax/indent.vim index bccbfa6b..d01a007c 100644 --- a/syntax/indent.vim +++ b/syntax/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'indent') == -1 " Vim syntax file " Language: indent(1) configuration file @@ -159,5 +154,3 @@ let b:current_syntax = "indent" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/inform.vim b/syntax/inform.vim index 86e56be4..29e3f80f 100644 --- a/syntax/inform.vim +++ b/syntax/inform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/inform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('inform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'inform') == -1 " Vim syntax file " Language: Inform @@ -399,5 +394,3 @@ hi def link informBadStrUnicode informError let b:current_syntax = "inform" " vim: ts=8 - -endif diff --git a/syntax/initng.vim b/syntax/initng.vim index 500d5570..4950ace9 100644 --- a/syntax/initng.vim +++ b/syntax/initng.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/initng.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('initng', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'initng') == -1 " Vim syntax file " Language: initng .i files @@ -98,5 +93,3 @@ hi def link initngSubstMacro Comment hi def link initngDefine Macro let b:current_syntax = "initng" - -endif diff --git a/syntax/inittab.vim b/syntax/inittab.vim index 0f661b8f..a024d4a2 100644 --- a/syntax/inittab.vim +++ b/syntax/inittab.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/inittab.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('inittab', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'inittab') == -1 " Vim syntax file " Language: SysV-compatible init process control file `inittab' @@ -69,5 +64,3 @@ hi def link inittabShCommand Statement let b:current_syntax = "inittab" - -endif diff --git a/syntax/ion.vim b/syntax/ion.vim index f8269815..0f1f82f1 100644 --- a/syntax/ion.vim +++ b/syntax/ion.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ion.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ion', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ion') == -1 if v:version < 600 syntax clear @@ -90,5 +85,3 @@ hi def link ionProcess PreProc hi def link ionComment Comment hi def link ionOperator Operator hi def link ionFlag Boolean - -endif diff --git a/syntax/ipfilter.vim b/syntax/ipfilter.vim index 342ea34d..a5db250a 100644 --- a/syntax/ipfilter.vim +++ b/syntax/ipfilter.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ipfilter.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ipfilter', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ipfilter') == -1 " ipfilter syntax file " Language: ipfilter configuration file @@ -61,5 +56,3 @@ hi def link IPFNetmask String hi def link IPFAny Statement hi def link IPFProto Identifier - -endif diff --git a/syntax/iss.vim b/syntax/iss.vim index 970ada33..a1051986 100644 --- a/syntax/iss.vim +++ b/syntax/iss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/iss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('iss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'iss') == -1 " Vim syntax file " Language: Inno Setup File (iss file) and My InnoSetup extension @@ -143,5 +138,3 @@ hi def link issTasksFlags Keyword let b:current_syntax = "iss" " vim:ts=8 - -endif diff --git a/syntax/ist.vim b/syntax/ist.vim index feb2206c..f6a2da1f 100644 --- a/syntax/ist.vim +++ b/syntax/ist.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ist.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ist', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ist') == -1 " Vim syntax file " Language: Makeindex style file, *.ist @@ -65,5 +60,3 @@ let b:current_syntax = "ist" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/j.vim b/syntax/j.vim index e9937a08..79478af8 100644 --- a/syntax/j.vim +++ b/syntax/j.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/j.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('j', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'j') == -1 " Vim syntax file " Language: J @@ -153,5 +148,3 @@ let b:current_syntax = 'j' let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/syntax/jal.vim b/syntax/jal.vim index b34af2d1..26600dd3 100644 --- a/syntax/jal.vim +++ b/syntax/jal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jal') == -1 " Vim syntax file " Language: JAL @@ -243,5 +238,3 @@ hi def link picIdentifier Identifier let b:current_syntax = "jal" " vim: ts=8 sw=2 - -endif diff --git a/syntax/jam.vim b/syntax/jam.vim index 2fd817fe..94dd8ca1 100644 --- a/syntax/jam.vim +++ b/syntax/jam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jam', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jam') == -1 " Vim syntax file " Language: JAM @@ -247,5 +242,3 @@ let b:current_syntax = "jam" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/java.vim b/syntax/java.vim index c7648f21..5ca7e105 100644 --- a/syntax/java.vim +++ b/syntax/java.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/java.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('java', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'java') == -1 " Vim syntax file " Language: Java @@ -362,5 +357,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/javacc.vim b/syntax/javacc.vim index e5c04192..2ffc3e93 100644 --- a/syntax/javacc.vim +++ b/syntax/javacc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/javacc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javacc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javacc') == -1 " Vim syntax file " Language: JavaCC, a Java Compiler Compiler written by JavaSoft @@ -72,5 +67,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 750ced5e..65b351a9 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/javascript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('javascript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 " Vim syntax file " Language: JavaScript @@ -400,5 +395,3 @@ let b:current_syntax = "javascript" if main_syntax == 'javascript' unlet main_syntax endif - -endif diff --git a/syntax/jess.vim b/syntax/jess.vim index 34ec059a..8897782a 100644 --- a/syntax/jess.vim +++ b/syntax/jess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jess') == -1 " Vim syntax file " Language: Jess @@ -151,5 +146,3 @@ hi def link jessVar Identifier let b:current_syntax = "jess" " vim: ts=18 - -endif diff --git a/syntax/jgraph.vim b/syntax/jgraph.vim index 9fcf50b6..e27f40b5 100644 --- a/syntax/jgraph.vim +++ b/syntax/jgraph.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jgraph.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jgraph', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jgraph') == -1 " Vim syntax file " Language: jgraph (graph plotting utility) @@ -52,5 +47,3 @@ hi def link jgraphNumber Number let b:current_syntax = "jgraph" - -endif diff --git a/syntax/jinja2.vim b/syntax/jinja2.vim index bb8a93fc..ccecd45c 100644 --- a/syntax/jinja2.vim +++ b/syntax/jinja2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jinja2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 " Vim syntax file " Language: Jinja2 - with special modifications for compound-filetype @@ -104,5 +99,3 @@ if !exists("did_jinja_syn_inits") endif let b:current_syntax = "jinja2" - -endif diff --git a/syntax/jovial.vim b/syntax/jovial.vim index fa07dd9c..7b34dea0 100644 --- a/syntax/jovial.vim +++ b/syntax/jovial.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jovial.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jovial', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jovial') == -1 " Vim syntax file " Language: JOVIAL J73 @@ -117,5 +112,3 @@ hi def link jovialTypedef Typedef let b:current_syntax = "jovial" " vim: ts=8 - -endif diff --git a/syntax/jproperties.vim b/syntax/jproperties.vim index bac79637..1b28bc00 100644 --- a/syntax/jproperties.vim +++ b/syntax/jproperties.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jproperties.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jproperties', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jproperties') == -1 " Vim syntax file " Language: Java Properties resource file (*.properties[_*]) @@ -142,5 +137,3 @@ hi def link jpropertiesError Error let b:current_syntax = "jproperties" " vim:ts=8 - -endif diff --git a/syntax/jq.vim b/syntax/jq.vim index 9cc0072f..11ec862e 100644 --- a/syntax/jq.vim +++ b/syntax/jq.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jq.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jq', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jq') == -1 " Vim syntax file " Language: jq @@ -137,5 +132,3 @@ hi link jqConditional Conditional "hi link jqInclude Include "hi link jqDecorator Define hi link jqNumber Number - -endif diff --git a/syntax/json.vim b/syntax/json.vim index fa2b446f..e6395aca 100644 --- a/syntax/json.vim +++ b/syntax/json.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/json.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('json', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json') == -1 " Vim syntax file " Language: JSON @@ -146,5 +141,3 @@ endif "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. "THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. "See https://twitter.com/elzr/status/294964017926119424 - -endif diff --git a/syntax/json5.vim b/syntax/json5.vim index 73d7fb5c..def6b747 100644 --- a/syntax/json5.vim +++ b/syntax/json5.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/json5.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('json5', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json5') == -1 " Modified from the original taken from https://github.com/gutenye/json5.vim @@ -74,5 +69,3 @@ if !exists('b:current_syntax') let b:current_syntax = 'json5' endif - -endif diff --git a/syntax/jsonnet.vim b/syntax/jsonnet.vim index d8d60a13..c2aa40cc 100644 --- a/syntax/jsonnet.vim +++ b/syntax/jsonnet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jsonnet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsonnet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 " Copyright 2014 Google Inc. All rights reserved. " @@ -141,5 +136,3 @@ syntax keyword Constant true false null syntax keyword Underlined error - -endif diff --git a/syntax/jsp.vim b/syntax/jsp.vim index cc51e14c..49436c2f 100644 --- a/syntax/jsp.vim +++ b/syntax/jsp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jsp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsp') == -1 " Vim syntax file " Language: JSP (Java Server Pages) @@ -75,5 +70,3 @@ endif let b:current_syntax = "jsp" " vim: ts=8 - -endif diff --git a/syntax/jst.vim b/syntax/jst.vim index 9715066e..ce4f1f0b 100644 --- a/syntax/jst.vim +++ b/syntax/jst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/jst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jst') == -1 if exists("b:current_syntax") finish @@ -94,5 +89,3 @@ if exists("loaded_matchit") endif " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/syntax/julia.vim b/syntax/julia.vim index 86c43f51..0cbe23ec 100644 --- a/syntax/julia.vim +++ b/syntax/julia.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/julia.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim syntax file " Language: julia @@ -502,5 +497,3 @@ hi def link juliaError Error syntax sync fromstart let b:current_syntax = "julia" - -endif diff --git a/syntax/juliadoc.vim b/syntax/juliadoc.vim index 03eb5942..5e2a32e3 100644 --- a/syntax/juliadoc.vim +++ b/syntax/juliadoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/juliadoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim syntax file for julia document view scriptencoding utf-8 @@ -72,5 +67,3 @@ highlight default link juliadocAdmonitionsType Todo highlight default link juliadocAdmonitionsTitle Title let b:current_syntax = "juliadoc" - -endif diff --git a/syntax/kconfig.vim b/syntax/kconfig.vim index ad3b03a7..9780aacd 100644 --- a/syntax/kconfig.vim +++ b/syntax/kconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kconfig') == -1 " Vim syntax file " Maintainer: Christian Brabandt <cb@256bit.org> @@ -746,5 +741,3 @@ let b:current_syntax = "kconfig" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/kivy.vim b/syntax/kivy.vim index 89ec7827..998f3692 100644 --- a/syntax/kivy.vim +++ b/syntax/kivy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kivy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kivy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kivy') == -1 " Vim syntax file " Language: Kivy @@ -43,5 +38,3 @@ hi def link kivyAttribute Label let b:current_syntax = "kivy" " vim: ts=8 - -endif diff --git a/syntax/kix.vim b/syntax/kix.vim index 74428bfa..182a3cb7 100644 --- a/syntax/kix.vim +++ b/syntax/kix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kix') == -1 " Vim syntax file " Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ @@ -177,5 +172,3 @@ hi def link kixForEachOK Conditional let b:current_syntax = "kix" " vim: ts=8 sw=2 - -endif diff --git a/syntax/kotlin.vim b/syntax/kotlin.vim index c3475323..268c9768 100644 --- a/syntax/kotlin.vim +++ b/syntax/kotlin.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kotlin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kotlin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1 " Vim syntax file " Language: Kotlin @@ -145,5 +140,3 @@ hi def link ktExclExcl Special hi def link ktArrow Structure let b:current_syntax = 'kotlin' - -endif diff --git a/syntax/kscript.vim b/syntax/kscript.vim index 605142bc..d460e152 100644 --- a/syntax/kscript.vim +++ b/syntax/kscript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kscript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kscript') == -1 " Vim syntax file " Language: kscript @@ -64,5 +59,3 @@ hi def link kscriptHardCoded Statement let b:current_syntax = "kscript" " vim: ts=8 - -endif diff --git a/syntax/kwt.vim b/syntax/kwt.vim index 68aa9e91..7e895159 100644 --- a/syntax/kwt.vim +++ b/syntax/kwt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/kwt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kwt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kwt') == -1 " Vim syntax file " Language: kimwitu++ @@ -77,5 +72,3 @@ syn sync lines=300 let b:current_syntax = "kwt" " vim: ts=8 - -endif diff --git a/syntax/lace.vim b/syntax/lace.vim index 2df0706d..87b35e6c 100644 --- a/syntax/lace.vim +++ b/syntax/lace.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lace.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lace', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lace') == -1 " Vim syntax file " Language: lace @@ -129,5 +124,3 @@ hi def link laceTodo Todo let b:current_syntax = "lace" " vim: ts=4 - -endif diff --git a/syntax/latte.vim b/syntax/latte.vim index d2c16ae2..ee4e34cd 100644 --- a/syntax/latte.vim +++ b/syntax/latte.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/latte.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('latte', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'latte') == -1 " Vim syntax file " Language: Latte @@ -88,5 +83,3 @@ hi def link latteError Error let b:current_syntax = "latte" - -endif diff --git a/syntax/ld.vim b/syntax/ld.vim index a4728d1b..b5293691 100644 --- a/syntax/ld.vim +++ b/syntax/ld.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ld.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ld', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ld') == -1 " Vim syntax file " Language: ld(1) script @@ -88,5 +83,3 @@ let b:current_syntax = "ld" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/ldif.vim b/syntax/ldif.vim index 6d6ef0a0..c5177feb 100644 --- a/syntax/ldif.vim +++ b/syntax/ldif.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ldif.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ldif', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ldif') == -1 " Vim syntax file " Language: LDAP LDIF @@ -40,5 +35,3 @@ hi def link ldifComment Comment let b:current_syntax = "ldif" - -endif diff --git a/syntax/ledger.vim b/syntax/ledger.vim index 2afccaad..9f523009 100644 --- a/syntax/ledger.vim +++ b/syntax/ledger.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ledger.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ledger', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 " Vim syntax file " filetype: ledger @@ -139,5 +134,3 @@ syn sync clear syn sync match ledgerSync grouphere ledgerTransaction "^[[:digit:]~=]" let b:current_syntax = b:is_hledger ? 'hledger' : 'ledger' - -endif diff --git a/syntax/less.vim b/syntax/less.vim index 27b556c0..a7224eaa 100644 --- a/syntax/less.vim +++ b/syntax/less.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/less.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('less', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 " Vim syntax file " Language: less @@ -85,5 +80,3 @@ hi def link lessMedia cssMedia let b:current_syntax = "less" " vim:set sw=2: - -endif diff --git a/syntax/lex.vim b/syntax/lex.vim index 94e84d37..517dc247 100644 --- a/syntax/lex.vim +++ b/syntax/lex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lex') == -1 " Vim syntax file " Language: Lex and Flex @@ -195,5 +190,3 @@ endif let b:current_syntax = "lex" " vim:ts=8 - -endif diff --git a/syntax/lftp.vim b/syntax/lftp.vim index 0845e2bb..92711ff5 100644 --- a/syntax/lftp.vim +++ b/syntax/lftp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lftp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lftp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lftp') == -1 " Vim syntax file " Language: lftp(1) configuration file @@ -159,5 +154,3 @@ let b:current_syntax = "lftp" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/lhaskell.vim b/syntax/lhaskell.vim index d40e915e..19319c19 100644 --- a/syntax/lhaskell.vim +++ b/syntax/lhaskell.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lhaskell.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lhaskell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lhaskell') == -1 " Vim syntax file " Language: Haskell with literate comments, Bird style, @@ -130,5 +125,3 @@ unlet s:oldcolumn let b:current_syntax = "lhaskell" " vim: ts=8 - -endif diff --git a/syntax/libao.vim b/syntax/libao.vim index 97896ee9..f41a9cf0 100644 --- a/syntax/libao.vim +++ b/syntax/libao.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/libao.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('libao', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'libao') == -1 " Vim syntax file " Language: libao.conf(5) configuration file @@ -34,5 +29,3 @@ let b:current_syntax = "libao" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/lidris.vim b/syntax/lidris.vim index b4219700..612b52e1 100644 --- a/syntax/lidris.vim +++ b/syntax/lidris.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lidris.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 " Vim syntax file " Language: Literate Idris @@ -29,5 +24,3 @@ syntax match lidrisBirdTrack "^>" contained hi def link lidrisBirdTrack Comment let b:current_syntax = "lidris" - -endif diff --git a/syntax/lidris2.vim b/syntax/lidris2.vim index c78a09c8..7b9b1a9c 100644 --- a/syntax/lidris2.vim +++ b/syntax/lidris2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lidris2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 " Vim syntax file " Language: Literate Idris 2 @@ -29,5 +24,3 @@ syntax match lidrisBirdTrack "^>" contained hi def link lidrisBirdTrack Comment let b:current_syntax = "lidris2" - -endif diff --git a/syntax/lifelines.vim b/syntax/lifelines.vim index 44eb0c6d..f7f50e09 100644 --- a/syntax/lifelines.vim +++ b/syntax/lifelines.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lifelines.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lifelines', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lifelines') == -1 " Vim syntax file " Language: LifeLines (v 3.0.62) <http://lifelines.sourceforge.net> @@ -161,5 +156,3 @@ hi def link lifelinesDecl PreProc let b:current_syntax = "lifelines" " vim: ts=8 sw=4 - -endif diff --git a/syntax/lilo.vim b/syntax/lilo.vim index ac46d02a..92d73e9d 100644 --- a/syntax/lilo.vim +++ b/syntax/lilo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lilo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilo') == -1 " Vim syntax file " Language: lilo configuration (lilo.conf) @@ -181,5 +176,3 @@ hi def link liloDisk Preproc let b:current_syntax = "lilo" - -endif diff --git a/syntax/lilypond-words.vim b/syntax/lilypond-words.vim index b1ec97a0..292dac27 100644 --- a/syntax/lilypond-words.vim +++ b/syntax/lilypond-words.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lilypond-words.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 syn match lilyKeyword "[-_^]\?\\\(xNotesOn\|xNotesOff\|xNote\|wordwrap-string-internal\|wordwrap-string\|wordwrap-lines\|wordwrap-internal\|wordwrap-field\|wordwrap\|withMusicProperty\|with-url\|with-link\|with-dimensions\|with-color\|with\|whiteout\|whiteTriangleMarkup\|walkerHeadsMinor\|walkerHeads\|vspace\|void\|voiceTwoStyle\|voiceTwo\|voiceThreeStyle\|voiceThree\|voiceOneStyle\|voiceOne\|voiceNeutralStyle\|voiceFourStyle\|voiceFour\|vocalName\|virgula\|virga\|verylongfermata\|versus\|version\|verbatim-file\|vcenter\|varcoda\|upright\|upprall\|upmordent\|upbow\|up\|unset\|unit\|unfoldRepeats\|undo\|underline\|unaCorda\|unHideNotes\|typewriter\|type\|tweak\|turn\|tupletUp\|tupletSpan\|tupletNeutral\|tupletDown\|tuplet\|trill\|triangle\|treCorde\|transposition\|transposedCueDuring\|transpose\|transparent\|translate-scaled\|translate\|topLevelAlignment\|tocTitleMarkup\|tocItemWithDotsMarkup\|tocItemMarkup\|tocItem\|tiny\|timing\|times\|timeSignatureSettings\|timeSignatureFraction\|time\|tied-lyric\|tieWaitForNote\|tieUp\|tieSolid\|tieNeutral\|tieHalfSolid\|tieHalfDashed\|tieDown\|tieDotted\|tieDashed\|tieDashPattern\|thumb\|textSpannerUp\|textSpannerNeutral\|textSpannerDown\|textLengthOn\|textLengthOff\|text\|tenuto\|temporary\|tempoWholesPerMinute\|tempo\|teeny\|tag\|table-of-contents\|tablatureFormat\|tabStaffLineLayoutFunction\|tabFullNotation\|systemStartDelimiter\|sustainOn\|sustainOff\|super\|subdivideBeams\|sub\|styledNoteHeads\|strut\|stropha\|strokeFingerOrientations\|stringTunings\|stringOneTopmost\|stringNumberOrientations\|stopped\|stopTrillSpan\|stopTextSpan\|stopStaff\|stopSlashedGraceMusic\|stopMeasureCount\|stopGroup\|stopGraceSlur\|stopGraceMusic\|stopAppoggiaturaMusic\|stopAcciaccaturaMusic\|stop\|stencil\|stemUp\|stemNeutral\|stemDown\|startTrillSpan\|startTextSpan\|startStaff\|startSlashedGraceMusic\|startRepeatType\|startMeasureCount\|startGroup\|startGraceSlur\|startGraceMusic\|startAppoggiaturaMusic\|startAcciaccaturaMusic\|start\|staccato\|staccatissimo\|squashedPosition\|spp\|spacingTweaks\|sp\|southernHarmonyHeadsMinor\|southernHarmonyHeads\|sostenutoOn\|sostenutoOff\|soloText\|soloIIText\|snappizzicato\|smaller\|smallCaps\|small\|slurUp\|slurSolid\|slurNeutral\|slurHalfSolid\|slurHalfDashed\|slurDown\|slurDotted\|slurDashed\|slurDashPattern\|slashedGrace\|slashed-digit\|slashChordSeparator\|skipTypesetting\|skip\|single\|simultaneous\|simple\|signumcongruentiae\|showStaffSwitch\|showSplitTiedTabNotes\|shortfermata\|shortVocalName\|shortInstrumentName\|shiftOnnn\|shiftOnn\|shiftOn\|shiftOff\|shiftDurations\|sharp\|shape\|sfz\|sfp\|sff\|sf\|settingsFrom\|setDefaultDurationToQuarter\|set\|sesquisharp\|sesquiflat\|sequential\|semisharp\|semiflat\|semicirculus\|semiGermanChords\|segno\|searchForVoice\|scriptDefinitions\|score\|scaleDurations\|scale\|sans\|sacredHarpHeadsMinor\|sacredHarpHeads\|rtoe\|rounded-box\|rotate\|roman\|rightHandFinger\|right-column\|right-brace\|right-align\|right\|rheel\|rfz\|revertTimeSignatureSettings\|revert\|reverseturn\|retrograde\|restrainOpenStrings\|rest-by-number\|rest\|responsum\|resetRelativeOctave\|replace\|repeatTie\|repeatCountVisibility\|repeat\|removeWithTag\|remove\|relative\|rehearsalMark\|raise\|quotedEventTypes\|quotedCueEventTypes\|quoteDuring\|quilisma\|put-adjacent\|pushToTag\|pt\|property-recursive\|printPartCombineTexts\|printKeyCancellation\|predefinedFretboardsOn\|predefinedFretboardsOff\|predefinedDiagramTable\|prallup\|prallprall\|prallmordent\|pralldown\|prall\|ppppp\|pppp\|ppp\|pp\|powerChords\|powerChordSymbol\|powerChordExceptions\|postscript\|portato\|pointAndClickTypes\|pointAndClickOn\|pointAndClickOff\|pitchedTrill\|phrygian\|phrasingSlurUp\|phrasingSlurSolid\|phrasingSlurNeutral\|phrasingSlurHalfSolid\|phrasingSlurHalfDashed\|phrasingSlurDown\|phrasingSlurDotted\|phrasingSlurDashed\|phrasingSlurDashPattern\|pes\|pedalUnaCordaStyle\|pedalUnaCordaStrings\|pedalSustainStyle\|pedalSustainStrings\|pedalSostenutoStyle\|pedalSostenutoStrings\|pattern\|path\|partialJazzMusic\|partialJazzExceptions\|partial\|partcombineUp\|partcombineUnisonoOnce\|partcombineUnisono\|partcombineSoloIOnce\|partcombineSoloIIOnce\|partcombineSoloII\|partcombineSoloI\|partcombineForce\|partcombineDown\|partcombineChordsOnce\|partcombineChords\|partcombineAutomaticOnce\|partcombineAutomatic\|partcombineApartOnce\|partcombineApart\|partcombine\|partCombineTextsOnNote\|partCombineListener\|parenthesize\|parallelMusic\|paper\|palmMuteOn\|palmMuteOff\|palmMute\|pageTurn\|pageBreak\|page-ref\|page-link\|pad-x\|pad-to-box\|pad-markup\|pad-around\|p\|overrideTimeSignatureSettings\|overrideProperty\|override-lines\|override\|oval\|ottava\|oriscus\|open\|oneVoice\|once\|on-the-fly\|omit\|offset\|octaveCheck\|numericTimeSignature\|number\|null\|notemode\|noteToFretFunction\|note-by-number\|note\|normalsize\|normal-text\|normal-size-super\|normal-size-sub\|noPageTurn\|noPageBreak\|noChordSymbol\|noBreak\|noBeam\|newSpacingSection\|new\|neumeDemoLayout\|natural\|name\|musicglyph\|musicMap\|mp\|mordent\|modalTranspose\|modalInversion\|mm\|mixolydian\|minorChordModifier\|minor\|midiInstrument\|midiChannelMapping\|midi\|middleCPosition\|middleCClefPosition\|mf\|metronomeMarkFormatter\|mergeDifferentlyHeadedOn\|mergeDifferentlyHeadedOff\|mergeDifferentlyDottedOn\|mergeDifferentlyDottedOff\|melismaEnd\|melismaBusyProperties\|melisma\|medium\|maxima\|markuplist\|markup\|markletter\|markalphabet\|markLengthOn\|markLengthOff\|markFormatter\|mark\|marcato\|map-markup-commands\|makeClusters\|majorSevenSymbol\|major\|maininput\|magnify\|lyricsto\|lyrics\|lyricmode\|lyricMelismaAlignment\|lydian\|ltoe\|lower\|lookup\|longfermata\|longa\|locrian\|localKeySignature\|lineprall\|linea\|line\|ligature\|lheel\|left-column\|left-brace\|left-align\|left\|layout\|larger\|large\|languageSaveAndChange\|languageRestore\|language\|laissezVibrer\|label\|killCues\|kievanOn\|kievanOff\|keyAlterationOrder\|key\|keepWithTag\|keepAliveInterfaces\|justify-string\|justify-field\|justify\|justified-lines\|italic\|italianChords\|ionian\|inversion\|interscoreline\|instrumentTransposition\|instrumentSwitch\|instrumentName\|instrumentEqualizer\|indent\|include\|inclinatum\|inStaffSegno\|in\|improvisationOn\|improvisationOff\|implicitTimeSignatureVisibility\|ij\|iij\|ignoreFiguredBassRest\|ignoreBarChecks\|ignatzekExceptions\|ignatzekExceptionMusic\|ictus\|huge\|hspace\|highStringOne\|hideStaffSwitch\|hideSplitTiedTabNotes\|hideNotes\|hide\|header\|hcenter-in\|hbracket\|harp-pedal\|harmonicsOn\|harmonicsOff\|harmonicNote\|harmonicByRatio\|harmonicByFret\|harmonicAccidentals\|harmonic\|handleNegativeFrets\|halign\|halfopen\|grobdescriptions\|graceSettings\|grace\|glissando\|germanChords\|general-align\|fz\|funkHeadsMinor\|funkHeads\|fullJazzExceptions\|fromproperty\|fret-diagram-verbose\|fret-diagram-terse\|fret-diagram\|frenchChords\|fraction\|fp\|footnote\|fontsize\|fontSize\|fontCaps\|flexa\|flat\|flageolet\|firstClef\|fingeringOrientations\|finger\|finalis\|filled-box\|fill-with-pattern\|fill-line\|figures\|figuremode\|figuredBassFormatter\|fffff\|ffff\|fff\|ff\|fermataMarkup\|fermata\|featherDurations\|f\|eyeglasses\|extraNatural\|explicitKeySignatureVisibility\|explicitCueClefVisibility\|explicitClefVisibility\|expandFullBarRests\|eventChords\|espressivo\|epsfile\|episemInitium\|episemFinis\|endincipit\|enddim\|enddecresc\|enddecr\|endcresc\|endcr\|endSpanners\|endRepeatType\|ellipse\|easyHeadsOn\|easyHeadsOff\|dynamicUp\|dynamicNeutral\|dynamicDown\|dynamicAbsoluteVolumeFunction\|dynamic\|drums\|drummode\|drumStyleTable\|drumPitchTable\|draw-line\|draw-hline\|draw-dotted-line\|draw-dashed-line\|draw-circle\|downprall\|downmordent\|downbow\|down\|doublesharp\|doubleflat\|doubleRepeatType\|dotsUp\|dotsNeutral\|dotsDown\|dorian\|divisioMinima\|divisioMaxima\|divisioMaior\|displayScheme\|displayMusic\|displayLilyMusic\|dir-column\|dimTextDim\|dimTextDecresc\|dimTextDecr\|dimHairpin\|dim\|description\|descendens\|deprecatedenddim\|deprecatedendcresc\|deprecateddim\|deprecatedcresc\|denies\|deminutum\|defineBarLine\|defaultchild\|defaultTimeSignature\|defaultNoteHeads\|defaultBarType\|default\|decrescendoSpanner\|decresc\|decr\|deadNotesOn\|deadNotesOff\|deadNote\|dashUnderscore\|dashPlus\|dashLarger\|dashHat\|dashDot\|dashDash\|dashBang\|cueDuringWithClef\|cueDuring\|cueClefUnset\|cueClefTranspositionFormatter\|cueClef\|crossStaff\|crescendoSpanner\|crescTextCresc\|crescHairpin\|cresc\|createSpacing\|cr\|context\|consists\|concat\|compressFullBarRests\|compoundMeter\|command-name\|combine\|column-lines\|column\|coda\|cm\|clefTranspositionFormatter\|clefTransposition\|clefPosition\|clefGlyph\|clef\|circulus\|circle\|chords\|chordmodifiers\|chordmode\|chordRootNamer\|chordPrefixSpacer\|chordNoteNamer\|chordNameSeparator\|chordNameLowercaseMinor\|chordNameFunction\|chordNameExceptionsPartial\|chordNameExceptionsFull\|chordNameExceptions\|char\|change\|center-column\|center-align\|center\|cavum\|caps\|caesura\|cadenzaOn\|cadenzaOff\|breve\|breathe\|breakDynamicSpan\|break\|bracket\|box\|bookpart\|bookOutputSuffix\|bookOutputName\|book\|bold\|blackTriangleMarkup\|bigger\|bendAfter\|beamHalfMeasure\|beam\|bassStaffProperties\|bassFigureStaffAlignmentUp\|bassFigureStaffAlignmentNeutral\|bassFigureStaffAlignmentDown\|bassFigureExtendersOn\|bassFigureExtendersOff\|barNumberVisibility\|barNumberFormatter\|barNumberCheck\|barCheckSynchronize\|barAlways\|bar\|balloonText\|balloonLengthOn\|balloonLengthOff\|balloonGrobText\|backslashed-digit\|automaticBars\|autochange\|autoCautionaries\|autoBeaming\|autoBeamOn\|autoBeamOff\|autoBeamCheck\|autoAccidentals\|auto-footnote\|augmentum\|auctum\|assertBeamSlope\|assertBeamQuant\|ascendens\|arrow-head\|arpeggioParenthesisDashed\|arpeggioParenthesis\|arpeggioNormal\|arpeggioBracket\|arpeggioArrowUp\|arpeggioArrowDown\|arpeggio\|appoggiatura\|applyOutput\|applyMusic\|applyContext\|appendToTag\|alternative\|alterBroken\|allowVoltaHook\|allowPageTurn\|alias\|aikenHeadsMinor\|aikenHeads\|afterGraceFraction\|afterGrace\|aeolian\|addlyrics\|additionalPitchPrefix\|addQuote\|addInstrumentDefinition\|accidentalStyle\|acciaccatura\|accepts\|accentus\|accent\|absolute\|abs-fontsize\|aDueText\|RemoveEmptyTabStaffContext\|RemoveEmptyStaffContext\|RemoveEmptyRhythmicStaffContext\|RemoveEmptyDrumStaffContext\|IJ\|IIJ\|C\|B\|AncientRemoveEmptyStaffContext\|A\|n\)\(\A\|\n\)"me=e-1 syn match lilyReservedWord "\(\A\|\n\)\(warnings\|staff\|spacing\|signature\|shift\|routine\|notes\|handler\|corrected\|beams\|arpeggios\|Volta_engraver\|Voice\|Vertical_align_engraver\|Vaticana_ligature_engraver\|VaticanaVoice\|VaticanaStaff\|Tweak_engraver\|Tuplet_engraver\|Trill_spanner_engraver\|Timing_translator\|Time_signature_performer\|Time_signature_engraver\|Tie_performer\|Tie_engraver\|Text_spanner_engraver\|Text_engraver\|Tempo_performer\|Tab_tie_follow_engraver\|Tab_staff_symbol_engraver\|Tab_note_heads_engraver\|TabVoice\|TabStaff\|System_start_delimiter_engraver\|Stem_engraver\|Stanza_number_engraver\|Stanza_number_align_engraver\|Staff_symbol_engraver\|Staff_performer\|Staff_collecting_engraver\|StaffGroup\|Staff\|Spanner_break_forbid_engraver\|Span_bar_stub_engraver\|Span_bar_engraver\|Span_arpeggio_engraver\|Spacing_engraver\|Slur_performer\|Slur_engraver\|Slash_repeat_engraver\|Separating_line_group_engraver\|Script_row_engraver\|Script_engraver\|Script_column_engraver\|Score\|Rhythmic_column_engraver\|RhythmicStaff\|Rest_engraver\|Rest_collision_engraver\|Repeat_tie_engraver\|Repeat_acknowledge_engraver\|Pure_from_neighbor_engraver\|Pitched_trill_engraver\|Pitch_squash_engraver\|Piano_pedal_performer\|Piano_pedal_engraver\|Piano_pedal_align_engraver\|PianoStaff\|Phrasing_slur_engraver\|PetrucciVoice\|PetrucciStaff\|Percent_repeat_engraver\|Part_combine_engraver\|Parenthesis_engraver\|Paper_column_engraver\|Output_property_engraver\|Ottava_spanner_engraver\|NullVoice\|Note_spacing_engraver\|Note_performer\|Note_name_engraver\|Note_heads_engraver\|Note_head_line_engraver\|NoteNames\|New_fingering_engraver\|Multi_measure_rest_engraver\|Midi_control_function_performer\|Metronome_mark_engraver\|Mensural_ligature_engraver\|MensuralVoice\|MensuralStaff\|Mark_engraver\|Lyrics\|Lyric_performer\|Lyric_engraver\|Ligature_bracket_engraver\|Ledger_line_engraver\|Laissez_vibrer_engraver\|Kievan_ligature_engraver\|KievanVoice\|KievanStaff\|Key_performer\|Key_engraver\|Keep_alive_together_engraver\|Instrument_switch_engraver\|Instrument_name_engraver\|Hyphen_engraver\|Grob_pq_engraver\|GregorianTranscriptionVoice\|GregorianTranscriptionStaff\|GrandStaff\|Grace_spacing_engraver\|Grace_engraver\|Grace_beam_engraver\|Grace_auto_beam_engraver\|Global\|Glissando_engraver\|Fretboard_engraver\|FretBoards\|Forbid_line_break_engraver\|Footnote_engraver\|Font_size_engraver\|Fingering_engraver\|Fingering_column_engraver\|Figured_bass_position_engraver\|Figured_bass_engraver\|FiguredBass\|Extender_engraver\|Episema_engraver\|Dynamics\|Dynamic_performer\|Dynamic_engraver\|Dynamic_align_engraver\|Drum_notes_engraver\|Drum_note_performer\|DrumVoice\|DrumStaff\|Double_percent_repeat_engraver\|Dots_engraver\|Dot_column_engraver\|Devnull\|Default_bar_line_engraver\|Custos_engraver\|Cue_clef_engraver\|CueVoice\|Control_track_performer\|Concurrent_hairpin_engraver\|Collision_engraver\|Cluster_spanner_engraver\|Clef_engraver\|Chord_tremolo_engraver\|Chord_name_engraver\|ChordNames\|ChordNameVoice\|ChoirStaff\|Breathing_sign_engraver\|Break_align_engraver\|Bend_engraver\|Beam_performer\|Beam_engraver\|Beam_collision_engraver\|Bar_number_engraver\|Bar_engraver\|Axis_group_engraver\|Auto_beam_engraver\|Arpeggio_engraver\|Accidental_engraver\|Score\)\(\A\|\n\)"ms=s+1,me=e-1 syn match lilyNote "\<\(\(\(solx\|soltcs\|soltcb\|solstqt\|solss\|solsqt\|solsd\|solsb\|sols\|solkk\|solk\|soldsd\|soldd\|sold\|solcs\|solcb\|solbtqt\|solbsb\|solbqt\|solbb\|solb\|sol\|six\|sitcs\|sitcb\|sistqt\|siss\|sisqt\|sisd\|sisb\|sis\|sikk\|sik\|sidsd\|sidd\|sid\|sics\|sicb\|sibtqt\|sibsb\|sibqt\|sibb\|sib\|si\|rex\|retcs\|retcb\|restqt\|ress\|resqt\|resd\|resb\|res\|rekk\|rek\|redsd\|redd\|red\|recs\|recb\|rebtqt\|rebsb\|rebqt\|rebb\|reb\|re\|mix\|mitcs\|mitcb\|mistqt\|miss\|misqt\|misd\|misb\|mis\|mikk\|mik\|midsd\|midd\|mid\|mics\|micb\|mibtqt\|mibsb\|mibqt\|mibb\|mib\|mi\|lax\|latcs\|latcb\|lastqt\|lass\|lasqt\|lasd\|lasb\|las\|lakk\|lak\|ladsd\|ladd\|lad\|lacs\|lacb\|labtqt\|labsb\|labqt\|labb\|lab\|la\|hississ\|hiss\|hisis\|hisih\|his\|hih\|hessess\|heses\|heseh\|h\|gx\|gtqs\|gtqf\|gss\|gsharpsharp\|gsharp\|gs\|gqs\|gqf\|gississ\|giss\|gisis\|gisih\|gis\|gih\|gflatflat\|gflat\|gff\|gf\|gessess\|gess\|geses\|geseh\|ges\|geh\|g\|fx\|ftqs\|ftqf\|fss\|fsharpsharp\|fsharp\|fs\|fqs\|fqf\|fississ\|fiss\|fisis\|fisih\|fis\|fih\|fflatflat\|fflat\|fff\|ff\|fessess\|fess\|feses\|feseh\|fes\|feh\|fax\|fatcs\|fatcb\|fastqt\|fass\|fasqt\|fasd\|fasb\|fas\|fakk\|fak\|fadsd\|fadd\|fad\|facs\|facb\|fabtqt\|fabsb\|fabqt\|fabb\|fab\|fa\|f\|ex\|etqs\|etqf\|essess\|ess\|esharpsharp\|esharp\|eses\|eseh\|es\|eqs\|eqf\|eississ\|eiss\|eisis\|eisih\|eis\|eih\|eflatflat\|eflat\|eff\|ef\|eessess\|eess\|eeses\|eeseh\|ees\|eeh\|e\|dx\|dtqs\|dtqf\|dss\|dsharpsharp\|dsharp\|ds\|dqs\|dqf\|dox\|dotcs\|dotcb\|dostqt\|doss\|dosqt\|dosd\|dosb\|dos\|dokk\|dok\|dodsd\|dodd\|dod\|docs\|docb\|dobtqt\|dobsb\|dobqt\|dobb\|dob\|do\|dississ\|diss\|disis\|disih\|dis\|dih\|dflatflat\|dflat\|dff\|df\|dessess\|dess\|deses\|deseh\|des\|deh\|d\|cx\|ctqs\|ctqf\|css\|csharpsharp\|csharp\|cs\|cqs\|cqf\|cississ\|ciss\|cisis\|cisih\|cis\|cih\|cflatflat\|cflat\|cff\|cf\|cessess\|cess\|ceses\|ceseh\|ces\|ceh\|c\|bx\|btqs\|btqf\|bss\|bsharpsharp\|bsharp\|bs\|bqs\|bqf\|bisis\|bisih\|bis\|bih\|bflatflat\|bflat\|bff\|bf\|bess\|beses\|beseh\|bes\|beh\|bb\|b\|ax\|atqs\|atqf\|assess\|ass\|asharpsharp\|asharp\|ases\|aseh\|asas\|asah\|as\|aqs\|aqf\|aississ\|aiss\|aisis\|aisih\|ais\|aih\|aflatflat\|aflat\|aff\|af\|aessess\|aess\|aeses\|aeseh\|aes\|aeh\|a\|a\)\([,']\)\{,4}\([?!]\)\?\)\|s\|r\|R\|q\)\(\(128\|64\|32\|16\|8\|4\|2\|1\|\\breve\|\\longa\|\\maxima\)[.]\{,8}\)\?\(\A\|\n\)"me=e-1 - -endif diff --git a/syntax/lilypond.vim b/syntax/lilypond.vim index 04a0f0e6..b0792abf 100644 --- a/syntax/lilypond.vim +++ b/syntax/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond syntax file " Language: LilyPond @@ -94,5 +89,3 @@ if version >= 508 || !exists("did_lily_syn_inits") endif let b:current_syntax = "lilypond" - -endif diff --git a/syntax/limits.vim b/syntax/limits.vim index 4ffd72aa..b1057fb7 100644 --- a/syntax/limits.vim +++ b/syntax/limits.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/limits.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('limits', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'limits') == -1 " Vim syntax file " Language: limits(5) configuration file @@ -51,5 +46,3 @@ let b:current_syntax = "limits" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/liquid.vim b/syntax/liquid.vim index 867e4a79..ad738fb5 100644 --- a/syntax/liquid.vim +++ b/syntax/liquid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/liquid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('liquid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1 " Vim syntax file " Language: Liquid @@ -145,5 +140,3 @@ let b:current_syntax = 'liquid' if exists('main_syntax') && main_syntax == 'liquid' unlet main_syntax endif - -endif diff --git a/syntax/lisp.vim b/syntax/lisp.vim index b4ecb439..501bd655 100644 --- a/syntax/lisp.vim +++ b/syntax/lisp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lisp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lisp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lisp') == -1 " Vim syntax file " Language: Lisp @@ -627,5 +622,3 @@ let b:current_syntax = "lisp" " --------------------------------------------------------------------- " vim: ts=8 nowrap fdm=marker - -endif diff --git a/syntax/litcoffee.vim b/syntax/litcoffee.vim index f29cf526..6ddfce8a 100644 --- a/syntax/litcoffee.vim +++ b/syntax/litcoffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/litcoffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: Literate CoffeeScript " Maintainer: Michael Smith <michael@diglumi.com> @@ -30,5 +25,3 @@ syn region inlineCoffee start='^ \|\t' end='$' contains=@coffee highlight default link notCoffee Comment let b:current_syntax = "litcoffee" - -endif diff --git a/syntax/lite.vim b/syntax/lite.vim index 5e43d1d7..73664c67 100644 --- a/syntax/lite.vim +++ b/syntax/lite.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lite.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lite', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lite') == -1 " Vim syntax file " Language: lite @@ -175,5 +170,3 @@ if main_syntax == 'lite' endif " vim: ts=8 - -endif diff --git a/syntax/litestep.vim b/syntax/litestep.vim index 72007dfb..eedf2730 100644 --- a/syntax/litestep.vim +++ b/syntax/litestep.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/litestep.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('litestep', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'litestep') == -1 " Vim syntax file " Language: LiteStep RC file @@ -276,5 +271,3 @@ let b:current_syntax = "litestep" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/llvm.vim b/syntax/llvm.vim index 8df88708..d98c255d 100644 --- a/syntax/llvm.vim +++ b/syntax/llvm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/llvm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim syntax file " Language: llvm @@ -243,5 +238,3 @@ if version >= 508 || !exists("did_c_syn_inits") endif let b:current_syntax = "llvm" - -endif diff --git a/syntax/log.vim b/syntax/log.vim index 9f025f6d..8c5b5ec2 100644 --- a/syntax/log.vim +++ b/syntax/log.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/log.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('log', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'log') == -1 " Vim syntax file " Language: Generic log file @@ -168,5 +163,3 @@ let b:current_syntax = 'log' let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/loginaccess.vim b/syntax/loginaccess.vim index 3588ed95..6dc8d6a9 100644 --- a/syntax/loginaccess.vim +++ b/syntax/loginaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/loginaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('loginaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'loginaccess') == -1 " Vim syntax file " Language: login.access(5) configuration file @@ -103,5 +98,3 @@ let b:current_syntax = "loginaccess" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/logindefs.vim b/syntax/logindefs.vim index 7b3fd00b..9773f12d 100644 --- a/syntax/logindefs.vim +++ b/syntax/logindefs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/logindefs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logindefs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logindefs') == -1 " Vim syntax file " Language: login.defs(5) configuration file @@ -181,5 +176,3 @@ let b:current_syntax = "logindefs" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/logtalk.vim b/syntax/logtalk.vim index e875c2d9..48c6621a 100644 --- a/syntax/logtalk.vim +++ b/syntax/logtalk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/logtalk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logtalk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logtalk') == -1 " Vim syntax file " @@ -461,5 +456,3 @@ let b:current_syntax = "logtalk" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/lotos.vim b/syntax/lotos.vim index fdd82b86..e66f1442 100644 --- a/syntax/lotos.vim +++ b/syntax/lotos.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lotos.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lotos', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lotos') == -1 " Vim syntax file " Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807) @@ -76,5 +71,3 @@ hi def link lotosDelimiter String let b:current_syntax = "lotos" " vim: ts=8 - -endif diff --git a/syntax/lout.vim b/syntax/lout.vim index b2ab49e5..9d7c28a9 100644 --- a/syntax/lout.vim +++ b/syntax/lout.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lout.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lout', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lout') == -1 " Vim syntax file " Language: Lout @@ -142,5 +137,3 @@ let &cpo=s:cpo_save unlet s:cpo_save " vim:ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/lpc.vim b/syntax/lpc.vim index e83fd6d2..de5bc3c7 100644 --- a/syntax/lpc.vim +++ b/syntax/lpc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lpc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lpc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lpc') == -1 " Vim syntax file " Language: LPC @@ -454,5 +449,3 @@ unlet s:cpo_save " vim:ts=8:nosta:sw=2:ai:si: " vim600:set fdm=marker: }}}1 - -endif diff --git a/syntax/lprolog.vim b/syntax/lprolog.vim index f3a9e06e..c8454ca6 100644 --- a/syntax/lprolog.vim +++ b/syntax/lprolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lprolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lprolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lprolog') == -1 " Vim syntax file " Language: LambdaProlog (Teyjus) @@ -131,5 +126,3 @@ hi def link lprologClause Type let b:current_syntax = "lprolog" " vim: ts=8 - -endif diff --git a/syntax/ls.vim b/syntax/ls.vim index 48d37a80..77055451 100644 --- a/syntax/ls.vim +++ b/syntax/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " " Maintainer: George Zahariev @@ -143,5 +138,3 @@ highlight default link lsSpaceError Error if !exists('b:current_syntax') let b:current_syntax = 'livescript' endif - -endif diff --git a/syntax/lsl.vim b/syntax/lsl.vim index f624d2a5..bede1c1e 100644 --- a/syntax/lsl.vim +++ b/syntax/lsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lsl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lsl') == -1 " Vim syntax file " Language: Linden Scripting Language @@ -284,5 +279,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim: ts=8 - -endif diff --git a/syntax/lss.vim b/syntax/lss.vim index 4384acdf..ce3a8c8e 100644 --- a/syntax/lss.vim +++ b/syntax/lss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lss') == -1 " Vim syntax file " Language: Lynx 2.7.1 style file @@ -130,5 +125,3 @@ hi def lssWhiteBg ctermbg=white ctermfg=black let b:current_syntax = "lss" " vim: ts=8 - -endif diff --git a/syntax/lua.vim b/syntax/lua.vim index 29d78de8..a88cda51 100644 --- a/syntax/lua.vim +++ b/syntax/lua.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lua.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lua', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lua') == -1 " Vim syntax file " Language: Lua @@ -268,5 +263,3 @@ let b:current_syntax = "lua" if main_syntax == 'lua' unlet main_syntax endif - -endif diff --git a/syntax/lynx.vim b/syntax/lynx.vim index fca7cc16..3f819319 100644 --- a/syntax/lynx.vim +++ b/syntax/lynx.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/lynx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lynx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lynx') == -1 " Vim syntax file " Language: Lynx configuration file (lynx.cfg) @@ -147,5 +142,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 fdm=marker: - -endif diff --git a/syntax/m4.vim b/syntax/m4.vim index 04ff28cd..9c872bb2 100644 --- a/syntax/m4.vim +++ b/syntax/m4.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/m4.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('m4', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 " Vim syntax file " Language: M4 @@ -67,5 +62,3 @@ if main_syntax == 'm4' endif " vim: ts=4 - -endif diff --git a/syntax/mail.vim b/syntax/mail.vim index ed88f97f..ff2bb797 100644 --- a/syntax/mail.vim +++ b/syntax/mail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mail') == -1 " Vim syntax file " Language: Mail file @@ -119,5 +114,3 @@ let b:current_syntax = "mail" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/mailaliases.vim b/syntax/mailaliases.vim index 6d2e9591..337eacea 100644 --- a/syntax/mailaliases.vim +++ b/syntax/mailaliases.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mailaliases.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailaliases', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailaliases') == -1 " Vim syntax file " Language: aliases(5) local alias database file @@ -78,5 +73,3 @@ let b:current_syntax = "mailaliases" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/mailcap.vim b/syntax/mailcap.vim index 0fa3da7c..1af4e0b9 100644 --- a/syntax/mailcap.vim +++ b/syntax/mailcap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mailcap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailcap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailcap') == -1 " Vim syntax file " Language: Mailcap configuration file @@ -42,5 +37,3 @@ hi def link mailcapString String let b:current_syntax = "mailcap" " vim: ts=8 - -endif diff --git a/syntax/make.vim b/syntax/make.vim index 3dc62458..b1e88274 100644 --- a/syntax/make.vim +++ b/syntax/make.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/make.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('make', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1 " Vim syntax file " Language: Makefile @@ -151,5 +146,3 @@ let b:current_syntax = "make" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/mako.vim b/syntax/mako.vim index aeaf4783..f1c75b87 100644 --- a/syntax/mako.vim +++ b/syntax/mako.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mako.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mako', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1 " Vim syntax file " Language: Mako @@ -110,5 +105,3 @@ if version >= 508 || !exists("did_mako_syn_inits") endif let b:current_syntax = b:mako_outer_lang - -endif diff --git a/syntax/mallard.vim b/syntax/mallard.vim index f6d5664b..bb4a789e 100644 --- a/syntax/mallard.vim +++ b/syntax/mallard.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mallard.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mallard', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mallard') == -1 " Vim syntax file " Language: Mallard @@ -44,5 +39,3 @@ hi def link mallardTitle Title hi def mallardEmphasis term=italic cterm=italic gui=italic let b:current_syntax = "mallard" - -endif diff --git a/syntax/manconf.vim b/syntax/manconf.vim index 09da2b34..d578fa6a 100644 --- a/syntax/manconf.vim +++ b/syntax/manconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/manconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('manconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'manconf') == -1 " Vim syntax file " Language: man.conf(5) - man configuration file @@ -124,5 +119,3 @@ let b:current_syntax = "manconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/maple.vim b/syntax/maple.vim index 2042ab04..5d72a609 100644 --- a/syntax/maple.vim +++ b/syntax/maple.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/maple.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('maple', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'maple') == -1 " Vim syntax file " Language: Maple V (based on release 4) @@ -629,5 +624,3 @@ endif " Current Syntax: {{{1 let b:current_syntax = "maple" " vim: ts=20 fdm=marker - -endif diff --git a/syntax/markdown.vim b/syntax/markdown.vim index 0cb4fa08..de27f7ab 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/markdown.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('markdown', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 " Vim syntax file " Language: Markdown @@ -191,5 +186,3 @@ let b:current_syntax = "mkd" delcommand HtmlHiLink " vim: ts=8 - -endif diff --git a/syntax/mason.vim b/syntax/mason.vim index 11b39c5d..8af033ac 100644 --- a/syntax/mason.vim +++ b/syntax/mason.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mason.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim syntax file " Language: Mason (Perl embedded in HTML) @@ -90,5 +85,3 @@ let b:current_syntax = "mason" if main_syntax == 'mason' unlet main_syntax endif - -endif diff --git a/syntax/master.vim b/syntax/master.vim index bd2a48a4..304c45a7 100644 --- a/syntax/master.vim +++ b/syntax/master.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/master.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('master', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'master') == -1 " Vim syntax file " Language: Focus Master File @@ -44,5 +39,3 @@ hi def link masterString String let b:current_syntax = "master" " vim: ts=8 - -endif diff --git a/syntax/mel.vim b/syntax/mel.vim index bfbcbdbc..88d2bd6c 100644 --- a/syntax/mel.vim +++ b/syntax/mel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mel') == -1 " Vim syntax file " Language: MEL (Maya Extension Language) @@ -115,5 +110,3 @@ hi def link melCommentError melError let b:current_syntax = "mel" - -endif diff --git a/syntax/merlin.vim b/syntax/merlin.vim index 8d6df186..99594704 100644 --- a/syntax/merlin.vim +++ b/syntax/merlin.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/merlin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reason', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 " Vim syntax file for editing merlin project files if exists("b:current_syntax") @@ -20,5 +15,3 @@ hi link merlinComment Comment let b:current_syntax = "merlin" - -endif diff --git a/syntax/meson.vim b/syntax/meson.vim index 593bc1b6..9f3e2a42 100644 --- a/syntax/meson.vim +++ b/syntax/meson.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/meson.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('meson', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1 " Vim syntax file " Language: Meson @@ -174,5 +169,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 noet: - -endif diff --git a/syntax/messages.vim b/syntax/messages.vim index e5fb6846..3a9f060c 100644 --- a/syntax/messages.vim +++ b/syntax/messages.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/messages.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('messages', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'messages') == -1 " Vim syntax file " Language: /var/log/messages file @@ -80,5 +75,3 @@ let b:current_syntax = "messages" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/mf.vim b/syntax/mf.vim index 120f502c..87960556 100644 --- a/syntax/mf.vim +++ b/syntax/mf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mf') == -1 " Vim syntax file " Language: METAFONT @@ -302,5 +297,3 @@ hi def link mfTodoComment Todo let b:current_syntax = "mf" " vim:sw=2 - -endif diff --git a/syntax/mgl.vim b/syntax/mgl.vim index dc82b690..21eb16c6 100644 --- a/syntax/mgl.vim +++ b/syntax/mgl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mgl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mgl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mgl') == -1 " Vim syntax file " Language: MGL @@ -124,5 +119,3 @@ hi def link mglType Type let b:current_syntax = "mgl" " vim: ts=8 sw=2 - -endif diff --git a/syntax/mgp.vim b/syntax/mgp.vim index 146370bb..dbcc965c 100644 --- a/syntax/mgp.vim +++ b/syntax/mgp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mgp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mgp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mgp') == -1 " Vim syntax file " Language: mgp - MaGic Point @@ -76,5 +71,3 @@ hi def link mgpDefine Define let b:current_syntax = "mgp" - -endif diff --git a/syntax/mib.vim b/syntax/mib.vim index 2427a6ff..67ca47bf 100644 --- a/syntax/mib.vim +++ b/syntax/mib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mib', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mib') == -1 " Vim syntax file " Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files @@ -64,5 +59,3 @@ hi def link mibEpilogue SpecialChar hi def link mibValue Structure let b:current_syntax = "mib" - -endif diff --git a/syntax/mix.vim b/syntax/mix.vim index df9b0951..1b14d6a5 100644 --- a/syntax/mix.vim +++ b/syntax/mix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mix') == -1 " Vim syntax file " Language: MIX (Donald Knuth's assembly language used in TAOCP) @@ -91,5 +86,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/mma.vim b/syntax/mma.vim index e51133c5..c9c0f6ee 100644 --- a/syntax/mma.vim +++ b/syntax/mma.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mma.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mathematica', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1 "Vim syntax file " Language: Mathematica @@ -1366,5 +1361,3 @@ let b:current_syntax = "mma" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/mmp.vim b/syntax/mmp.vim index d0d82746..55e946e4 100644 --- a/syntax/mmp.vim +++ b/syntax/mmp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mmp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mmp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mmp') == -1 " Vim syntax file " Language: Symbian meta-makefile definition (MMP) @@ -56,5 +51,3 @@ endif let b:current_syntax = "mmp" " vim: ts=8 - -endif diff --git a/syntax/modconf.vim b/syntax/modconf.vim index d94e9e11..dcf1ffa7 100644 --- a/syntax/modconf.vim +++ b/syntax/modconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/modconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('modconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'modconf') == -1 " Vim syntax file " Language: modules.conf(5) configuration file @@ -51,5 +46,3 @@ let b:current_syntax = "modconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/modula2.vim b/syntax/modula2.vim index 1d14c554..9a6d3d72 100644 --- a/syntax/modula2.vim +++ b/syntax/modula2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/modula2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('modula2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'modula2') == -1 " Vim syntax file " Language: Modula 2 @@ -80,5 +75,3 @@ hi def link modula2Set String let b:current_syntax = "modula2" " vim: ts=8 - -endif diff --git a/syntax/modula3.vim b/syntax/modula3.vim index 0b64b9aa..d27fb0e2 100644 --- a/syntax/modula3.vim +++ b/syntax/modula3.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/modula3.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('modula3', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'modula3') == -1 " Vim syntax file " Language: Modula-3 @@ -66,5 +61,3 @@ let b:current_syntax = "modula3" "I prefer to use this... "set ai "vim: ts=8 - -endif diff --git a/syntax/monk.vim b/syntax/monk.vim index 8f943899..ebea4a3d 100644 --- a/syntax/monk.vim +++ b/syntax/monk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/monk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('monk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'monk') == -1 " Vim syntax file " Language: Monk (See-Beyond Technologies) @@ -224,5 +219,3 @@ let b:current_syntax = "monk" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/moo.vim b/syntax/moo.vim index e36c587e..20461bf2 100644 --- a/syntax/moo.vim +++ b/syntax/moo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/moo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('moo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moo') == -1 " Vim syntax file " Language: MOO @@ -180,5 +175,3 @@ hi def link mooNonCode PreProc let b:current_syntax = "moo" " vim: ts=8 - -endif diff --git a/syntax/moon.vim b/syntax/moon.vim index dba1188d..d7503482 100644 --- a/syntax/moon.vim +++ b/syntax/moon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/moon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('moonscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 " Language: MoonScript " Maintainer: leafo <leafot@gmail.com> @@ -324,5 +319,3 @@ syn cluster moonAll contains=moonStatement,moonRepeat,moonConditional, if !exists('b:current_syntax') let b:current_syntax = 'moon' endif - -endif diff --git a/syntax/mp.vim b/syntax/mp.vim index 92e57fb3..95564a11 100644 --- a/syntax/mp.vim +++ b/syntax/mp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mp') == -1 " Vim syntax file " Language: MetaPost @@ -776,5 +771,3 @@ let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:sw=2 - -endif diff --git a/syntax/mplayerconf.vim b/syntax/mplayerconf.vim index dc50e1f4..6d8ca035 100644 --- a/syntax/mplayerconf.vim +++ b/syntax/mplayerconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mplayerconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mplayerconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mplayerconf') == -1 " Vim syntax file " Language: mplayer(1) configuration file @@ -135,5 +130,3 @@ let b:current_syntax = "mplayerconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/mrxvtrc.vim b/syntax/mrxvtrc.vim index c7fbdc96..61d773ae 100644 --- a/syntax/mrxvtrc.vim +++ b/syntax/mrxvtrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mrxvtrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mrxvtrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mrxvtrc') == -1 " Description : Vim syntax file for mrxvtrc (for mrxvt-0.5.0 and up) " Created : Wed 26 Apr 2006 01:20:53 AM CDT @@ -289,5 +284,3 @@ let b:current_syntax = "mrxvtrc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/msidl.vim b/syntax/msidl.vim index 2f779e26..1734105e 100644 --- a/syntax/msidl.vim +++ b/syntax/msidl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/msidl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('msidl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'msidl') == -1 " Vim syntax file " Language: MS IDL (Microsoft dialect of Interface Description Language) @@ -91,5 +86,3 @@ let b:current_syntax = "msidl" let &cpo = s:cpo_save unlet s:cpo_save " vi: set ts=8 sw=4: - -endif diff --git a/syntax/msql.vim b/syntax/msql.vim index aef3a3fd..b8f058e5 100644 --- a/syntax/msql.vim +++ b/syntax/msql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/msql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('msql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'msql') == -1 " Vim syntax file " Language: msql @@ -90,5 +85,3 @@ if main_syntax == 'msql' endif " vim: ts=8 - -endif diff --git a/syntax/mupad.vim b/syntax/mupad.vim index deafcb30..924d0806 100644 --- a/syntax/mupad.vim +++ b/syntax/mupad.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mupad.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mupad', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mupad') == -1 " Vim syntax file " Language: MuPAD source @@ -290,5 +285,3 @@ hi def link mupadIdentifier Identifier " TODO More comprehensive listing. - -endif diff --git a/syntax/murphi.vim b/syntax/murphi.vim index 04e6faba..ab38abf4 100644 --- a/syntax/murphi.vim +++ b/syntax/murphi.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/murphi.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('murphi', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'murphi') == -1 " Vim syntax file " Language: Murphi model checking language @@ -133,5 +128,3 @@ hi def link murphiError Error hi def link murphiTodo Todo let b:current_syntax = "murphi" - -endif diff --git a/syntax/mush.vim b/syntax/mush.vim index 902b0dbb..329cb5c3 100644 --- a/syntax/mush.vim +++ b/syntax/mush.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mush.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mush', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mush') == -1 " MUSHcode syntax file " Maintainer: Rick Bird <nveid@nveid.com> @@ -222,5 +217,3 @@ hi def link mushCommentString mushString let b:current_syntax = "mush" " mush: ts=17 - -endif diff --git a/syntax/mustache.vim b/syntax/mustache.vim index ebcc7f49..ece71e3c 100644 --- a/syntax/mustache.vim +++ b/syntax/mustache.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mustache.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 runtime! syntax/handlebars.vim - -endif diff --git a/syntax/muttrc.vim b/syntax/muttrc.vim index 7d317e47..c7c863dd 100644 --- a/syntax/muttrc.vim +++ b/syntax/muttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/muttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('muttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'muttrc') == -1 " Vim syntax file " Language: Mutt setup files @@ -828,5 +823,3 @@ let b:current_syntax = "muttrc" let &cpo = s:cpo_save unlet s:cpo_save "EOF vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim - -endif diff --git a/syntax/mysql.vim b/syntax/mysql.vim index 77de37a3..a90e8920 100644 --- a/syntax/mysql.vim +++ b/syntax/mysql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/mysql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mysql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mysql') == -1 " Vim syntax file " Language: mysql @@ -295,5 +290,3 @@ hi def link mysqlFunction Function let b:current_syntax = "mysql" - -endif diff --git a/syntax/n1ql.vim b/syntax/n1ql.vim index bf68e7b9..b2133f27 100644 --- a/syntax/n1ql.vim +++ b/syntax/n1ql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/n1ql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('n1ql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'n1ql') == -1 " Vim syntax file " Language: N1QL / Couchbase Server @@ -441,5 +436,3 @@ hi def link n1qlTODO Todo hi def link n1qlType Type let b:current_syntax = "n1ql" - -endif diff --git a/syntax/named.vim b/syntax/named.vim index 2ec365c3..f3997ee7 100644 --- a/syntax/named.vim +++ b/syntax/named.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/named.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('named', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'named') == -1 " Vim syntax file " Language: BIND configuration file @@ -236,5 +231,3 @@ unlet s:save_cpo let b:current_syntax = "named" " vim: ts=17 - -endif diff --git a/syntax/nanorc.vim b/syntax/nanorc.vim index ed33bf25..fa68d216 100644 --- a/syntax/nanorc.vim +++ b/syntax/nanorc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nanorc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nanorc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nanorc') == -1 " Vim syntax file " Language: nanorc(5) - GNU nano configuration file @@ -250,5 +245,3 @@ let b:current_syntax = "nanorc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/natural.vim b/syntax/natural.vim index 02d72fbb..b58c22f2 100644 --- a/syntax/natural.vim +++ b/syntax/natural.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/natural.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('natural', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'natural') == -1 " Vim syntax file " @@ -208,5 +203,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set ts=8 sw=8 noet ft=vim list: - -endif diff --git a/syntax/ncf.vim b/syntax/ncf.vim index 0ecd27b0..a4552f6f 100644 --- a/syntax/ncf.vim +++ b/syntax/ncf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ncf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ncf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ncf') == -1 " Vim syntax file " Language: Novell "NCF" Batch File @@ -254,5 +249,3 @@ hi def link ncfSetCommandsBindCon ncfSetCommands let b:current_syntax = "ncf" - -endif diff --git a/syntax/neomuttrc.vim b/syntax/neomuttrc.vim index 5e392906..afac90fc 100644 --- a/syntax/neomuttrc.vim +++ b/syntax/neomuttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/neomuttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('neomuttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'neomuttrc') == -1 " Vim syntax file " Language: NeoMutt setup files @@ -868,5 +863,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 noet tw=100 sw=8 sts=0 ft=vim isk+=- - -endif diff --git a/syntax/netrc.vim b/syntax/netrc.vim index 58726708..05ecbc0a 100644 --- a/syntax/netrc.vim +++ b/syntax/netrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/netrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('netrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'netrc') == -1 " Vim syntax file " Language: netrc(5) configuration file @@ -59,5 +54,3 @@ let b:current_syntax = "netrc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/nginx.vim b/syntax/nginx.vim index 2c68c9e7..565fe776 100644 --- a/syntax/nginx.vim +++ b/syntax/nginx.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nginx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nginx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1 " Vim syntax file " Language: nginx.conf @@ -2315,5 +2310,3 @@ hi link ngxGzipOn Error hi link ngxSSLCipherInsecure Error hi link ngxThirdPartyLuaBlock Function - -endif diff --git a/syntax/nim.vim b/syntax/nim.vim index 0286bea8..0ab2c10b 100644 --- a/syntax/nim.vim +++ b/syntax/nim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -211,5 +206,3 @@ endif let b:current_syntax = 'nim' - -endif diff --git a/syntax/ninja.vim b/syntax/ninja.vim index e8a1c623..77423ce7 100644 --- a/syntax/ninja.vim +++ b/syntax/ninja.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ninja.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ninja', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ninja') == -1 " ninja build file syntax. " Language: ninja build file as described at @@ -94,5 +89,3 @@ let b:current_syntax = "ninja" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/nix.vim b/syntax/nix.vim index 4b0557c6..1d4ba43d 100644 --- a/syntax/nix.vim +++ b/syntax/nix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 " Vim syntax file " Language: Nix @@ -204,5 +199,3 @@ hi def link nixWithExprKeyword Keyword syn sync fromstart let b:current_syntax = "nix" - -endif diff --git a/syntax/nqc.vim b/syntax/nqc.vim index 74424de6..7d7c8846 100644 --- a/syntax/nqc.vim +++ b/syntax/nqc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nqc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nqc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nqc') == -1 " Vim syntax file " Language: NQC - Not Quite C, for LEGO mindstorms @@ -372,5 +367,3 @@ hi def link nqcCppOut Comment let b:current_syntax = "nqc" " vim: ts=8 - -endif diff --git a/syntax/nroff.vim b/syntax/nroff.vim index bea5ddd1..f99eff57 100644 --- a/syntax/nroff.vim +++ b/syntax/nroff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nroff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nroff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1 " VIM syntax file " Language: nroff/groff @@ -256,5 +251,3 @@ let b:current_syntax = "nroff" let &cpo = s:cpo_save unlet s:cpo_save " vim600: set fdm=marker fdl=2: - -endif diff --git a/syntax/nsis.vim b/syntax/nsis.vim index 1577fd59..01c90244 100644 --- a/syntax/nsis.vim +++ b/syntax/nsis.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/nsis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nsis', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nsis') == -1 " Vim syntax file " Language: NSIS script, for version of NSIS 3.03 and later @@ -689,5 +684,3 @@ let b:current_syntax = "nsis" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/oasis.vim b/syntax/oasis.vim index 450cfade..0acafa83 100644 --- a/syntax/oasis.vim +++ b/syntax/oasis.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/oasis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:current_syntax") finish @@ -102,5 +97,3 @@ highlight link oasisString String highlight link oasisVersion Number let b:current_syntax = "oasis" - -endif diff --git a/syntax/obj.vim b/syntax/obj.vim index 9108089d..3c36958e 100644 --- a/syntax/obj.vim +++ b/syntax/obj.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/obj.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('obj', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'obj') == -1 " Vim syntax file " Language: 3D wavefront's obj file @@ -90,5 +85,3 @@ hi def link objKeywords Keyword let b:current_syntax = "obj" " vim: ts=8 - -endif diff --git a/syntax/ocaml.vim b/syntax/ocaml.vim index 3bdd77cd..8cf6fb67 100644 --- a/syntax/ocaml.vim +++ b/syntax/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim syntax file " Language: OCaml @@ -394,5 +389,3 @@ hi def link ocamlPpxEncl ocamlEncl let b:current_syntax = "ocaml" " vim: ts=8 - -endif diff --git a/syntax/ocamlbuild_tags.vim b/syntax/ocamlbuild_tags.vim index 34232425..d814c526 100644 --- a/syntax/ocamlbuild_tags.vim +++ b/syntax/ocamlbuild_tags.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ocamlbuild_tags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:current_syntax") finish @@ -47,5 +42,3 @@ hi! link ocamlbuild_tagsComment Comment hi link ocamlbuild_tagsFindlibPkg Identifier let b:current_syntax = "ocamlbuild_tags" - -endif diff --git a/syntax/occam.vim b/syntax/occam.vim index a69329fc..11c715eb 100644 --- a/syntax/occam.vim +++ b/syntax/occam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/occam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('occam', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'occam') == -1 " Vim syntax file " Language: occam @@ -123,5 +118,3 @@ hi def link occamParantheses Delimiter let b:current_syntax = "occam" - -endif diff --git a/syntax/ocpbuild.vim b/syntax/ocpbuild.vim index d3175eb1..ac30f6b3 100644 --- a/syntax/ocpbuild.vim +++ b/syntax/ocpbuild.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ocpbuild.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim syntax file " Language: ocp-build files @@ -57,5 +52,3 @@ hi def link ocpPreProc PreProc let b:current_syntax = "ocpbuild" - -endif diff --git a/syntax/ocpbuildroot.vim b/syntax/ocpbuildroot.vim index 94ff36a5..58a7dfa1 100644 --- a/syntax/ocpbuildroot.vim +++ b/syntax/ocpbuildroot.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ocpbuildroot.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim syntax file " Language: ocp-build.root files @@ -60,5 +55,3 @@ hi def link ocprNumber Number let b:current_syntax = "ocpbuildroot" - -endif diff --git a/syntax/octave.vim b/syntax/octave.vim index 331567c2..d92377a8 100644 --- a/syntax/octave.vim +++ b/syntax/octave.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/octave.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('octave', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'octave') == -1 " Vim syntax file " Language: Octave @@ -735,5 +730,3 @@ endif let b:current_syntax = "octave" "EOF vim: ts=2 et tw=80 sw=2 sts=0 - -endif diff --git a/syntax/odin.vim b/syntax/odin.vim index 16036e43..5600f7a4 100644 --- a/syntax/odin.vim +++ b/syntax/odin.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/odin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('odin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'odin') == -1 if exists("b:current_syntax") finish @@ -183,5 +178,3 @@ highlight link odinFloat Float highlight link odinHex Number let b:current_syntax = "odin" - -endif diff --git a/syntax/omake.vim b/syntax/omake.vim index 38953ff5..fb0f9a19 100644 --- a/syntax/omake.vim +++ b/syntax/omake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/omake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim syntax file " Language: OMakefile @@ -135,5 +130,3 @@ hi def link omakeRuleOption Type let b:current_syntax = "omake" " vim: ts=8 - -endif diff --git a/syntax/omnimark.vim b/syntax/omnimark.vim index dc6cb019..a27c2007 100644 --- a/syntax/omnimark.vim +++ b/syntax/omnimark.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/omnimark.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('omnimark', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'omnimark') == -1 " Vim syntax file " Language: Omnimark @@ -113,5 +108,3 @@ let b:current_syntax = "omnimark" " vim: ts=8 - -endif diff --git a/syntax/opam.vim b/syntax/opam.vim index f487e851..338d77be 100644 --- a/syntax/opam.vim +++ b/syntax/opam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/opam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:current_syntax") finish @@ -38,5 +33,3 @@ hi link opamInterpolate Identifier let b:current_syntax = "opam" " vim: ts=2 sw=2 - -endif diff --git a/syntax/opencl.vim b/syntax/opencl.vim index 6bcd63f3..db5cca84 100644 --- a/syntax/opencl.vim +++ b/syntax/opencl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/opencl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('opencl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1 " Vim syntax file " Language: OpenCL (Open Computing Language) @@ -164,5 +159,3 @@ hi def link clStatement Statement let b:current_syntax = "opencl" " vim: ts=8 - -endif diff --git a/syntax/openroad.vim b/syntax/openroad.vim index be96596c..af092703 100644 --- a/syntax/openroad.vim +++ b/syntax/openroad.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/openroad.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('openroad', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'openroad') == -1 " Vim syntax file " Language: CA-OpenROAD @@ -259,5 +254,3 @@ hi def link openroadTodo Todo let b:current_syntax = "openroad" - -endif diff --git a/syntax/opl.vim b/syntax/opl.vim index 4feffec9..1ba40a2e 100644 --- a/syntax/opl.vim +++ b/syntax/opl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/opl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('opl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opl') == -1 " Vim syntax file " Language: OPL @@ -96,5 +91,3 @@ let b:current_syntax = "opl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/ora.vim b/syntax/ora.vim index 87722362..96d91a30 100644 --- a/syntax/ora.vim +++ b/syntax/ora.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ora.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ora', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ora') == -1 " Vim syntax file " Language: Oracle config files (.ora) (Oracle 8i, ver. 8.1.5) @@ -471,5 +466,3 @@ if main_syntax == 'ora' endif " vim: ts=8 - -endif diff --git a/syntax/pamconf.vim b/syntax/pamconf.vim index 14c751ad..66c7d74f 100644 --- a/syntax/pamconf.vim +++ b/syntax/pamconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pamconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pamconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pamconf') == -1 " Vim syntax file " Language: pam(8) configuration file @@ -138,5 +133,3 @@ let b:current_syntax = "pamconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/pamenv.vim b/syntax/pamenv.vim index 2d158e4a..75a0c4eb 100644 --- a/syntax/pamenv.vim +++ b/syntax/pamenv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pamenv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pamenv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pamenv') == -1 " Vim syntax file " Language: pam_env.conf(5) configuration file @@ -35,5 +30,3 @@ hi def link pamenvValue String hi def link pamenvValueWithQuote String let b:current_syntax = "pamenv" - -endif diff --git a/syntax/papp.vim b/syntax/papp.vim index 220aeee9..d07ca3e4 100644 --- a/syntax/papp.vim +++ b/syntax/papp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/papp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('papp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'papp') == -1 " Vim syntax file for the "papp" file format (_p_erl _app_lication) " @@ -83,5 +78,3 @@ hi def link papp_prep preCondit hi def link papp_gettext String let b:current_syntax = "papp" - -endif diff --git a/syntax/pascal.vim b/syntax/pascal.vim index 038c5567..76344e18 100644 --- a/syntax/pascal.vim +++ b/syntax/pascal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pascal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pascal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1 " Vim syntax file " Language: Pascal @@ -367,5 +362,3 @@ hi def link pascalShowTab Error let b:current_syntax = "pascal" " vim: ts=8 sw=2 - -endif diff --git a/syntax/passwd.vim b/syntax/passwd.vim index ec8caae8..25ba4a09 100644 --- a/syntax/passwd.vim +++ b/syntax/passwd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/passwd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('passwd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'passwd') == -1 " Vim syntax file " Language: passwd(5) password file @@ -78,5 +73,3 @@ let b:current_syntax = "passwd" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/pccts.vim b/syntax/pccts.vim index f9594aa3..4f0fba7a 100644 --- a/syntax/pccts.vim +++ b/syntax/pccts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pccts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pccts', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pccts') == -1 " Vim syntax file " Language: PCCTS @@ -96,5 +91,3 @@ hi def link pcctsSpecialChar SpecialChar let b:current_syntax = "pccts" " vim: ts=8 - -endif diff --git a/syntax/pdf.vim b/syntax/pdf.vim index 4a0a1c95..a0012c31 100644 --- a/syntax/pdf.vim +++ b/syntax/pdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pdf') == -1 " Vim syntax file " Language: PDF @@ -80,5 +75,3 @@ hi def link pdfPreProc PreProc hi def link pdfComment Comment let b:current_syntax = "pdf" - -endif diff --git a/syntax/perl.vim b/syntax/perl.vim index f50a1dab..bea6df6b 100644 --- a/syntax/perl.vim +++ b/syntax/perl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/perl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim syntax file " Language: Perl 5 @@ -589,5 +584,3 @@ unlet s:cpo_save " XXX Change to sts=4:sw=4 " vim:ts=8:sts=2:sw=2:expandtab:ft=vim - -endif diff --git a/syntax/pf.vim b/syntax/pf.vim index 9c37cba3..8d8554a1 100644 --- a/syntax/pf.vim +++ b/syntax/pf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pf') == -1 " pf syntax file " Language: OpenBSD packet filter configuration (pf.conf) @@ -340,5 +335,3 @@ syn keyword pfService zabbix-agent syn keyword pfService zabbix-trapper syn keyword pfService zebra syn keyword pfService zebrasrv - -endif diff --git a/syntax/pfmain.vim b/syntax/pfmain.vim index 311ad05d..7ba7e62c 100644 --- a/syntax/pfmain.vim +++ b/syntax/pfmain.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pfmain.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pfmain', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pfmain') == -1 " Vim syntax file " Language: Postfix main.cf configuration @@ -1842,5 +1837,3 @@ hi def link pfmainSpecial Special let b:current_syntax = "pfmain" " vim: ts=8 sw=2 - -endif diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim index 108cc268..92163f6c 100644 --- a/syntax/pgsql.vim +++ b/syntax/pgsql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pgsql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pgsql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pgsql') == -1 " Vim syntax file " Language: SQL (PostgreSQL dialect), PL/pgSQL, PL/…, PostGIS, … @@ -2022,5 +2017,3 @@ hi def link sqlCreateTextSearchKeyword sqlKeyword let b:current_syntax = "sql" - -endif diff --git a/syntax/php.vim b/syntax/php.vim index 79302961..ffb5c64d 100644 --- a/syntax/php.vim +++ b/syntax/php.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/php.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('php', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'php') == -1 " Vim syntax file " Language: PHP 5.3 & up @@ -1055,5 +1050,3 @@ endif " }}} " vim: ts=8 sts=2 sw=2 fdm=marker expandtab - -endif diff --git a/syntax/pike.vim b/syntax/pike.vim index b089a3ff..2a4acce4 100644 --- a/syntax/pike.vim +++ b/syntax/pike.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pike.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pike', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pike') == -1 " Vim syntax file " Language: Pike @@ -393,5 +388,3 @@ let b:current_syntax = "pike" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/pilrc.vim b/syntax/pilrc.vim index a463c82a..fd6ecad6 100644 --- a/syntax/pilrc.vim +++ b/syntax/pilrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pilrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pilrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pilrc') == -1 " Vim syntax file " Language: pilrc - a resource compiler for Palm OS development @@ -143,5 +138,3 @@ hi def link pilrcIdentifier Number let b:current_syntax = "pilrc" - -endif diff --git a/syntax/pine.vim b/syntax/pine.vim index 647de9ff..344aa0f4 100644 --- a/syntax/pine.vim +++ b/syntax/pine.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pine.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pine', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pine') == -1 " Vim syntax file " Language: Pine (email program) run commands @@ -362,5 +357,3 @@ hi def link pineOption Macro let b:current_syntax = "pine" " vim: ts=8 - -endif diff --git a/syntax/pinfo.vim b/syntax/pinfo.vim index 09404137..6319ef5d 100644 --- a/syntax/pinfo.vim +++ b/syntax/pinfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pinfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pinfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pinfo') == -1 " Vim syntax file " Language: pinfo(1) configuration file @@ -117,5 +112,3 @@ let b:current_syntax = "pinfo" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/plantuml.vim b/syntax/plantuml.vim index d4185ffb..594a5615 100644 --- a/syntax/plantuml.vim +++ b/syntax/plantuml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/plantuml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plantuml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1 scriptencoding utf-8 " Vim syntax file @@ -415,5 +410,3 @@ highlight default link plantumlStereotype Type let &cpoptions=s:cpo_orig unlet s:cpo_orig - -endif diff --git a/syntax/pli.vim b/syntax/pli.vim index 72a075c0..9f935118 100644 --- a/syntax/pli.vim +++ b/syntax/pli.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pli.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pli', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pli') == -1 " Vim syntax file " Modified from http://plnet.org/files/vim/ @@ -273,5 +268,3 @@ hi def link pl1Todo Todo let b:current_syntax = "pl1" - -endif diff --git a/syntax/plm.vim b/syntax/plm.vim index d81672e9..9bce4e0c 100644 --- a/syntax/plm.vim +++ b/syntax/plm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/plm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plm') == -1 " Vim syntax file " Language: PL/M @@ -141,5 +136,3 @@ let b:current_syntax = "plm" " vim: ts=8 sw=2 - -endif diff --git a/syntax/plp.vim b/syntax/plp.vim index 29ac1503..34ab9290 100644 --- a/syntax/plp.vim +++ b/syntax/plp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/plp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plp') == -1 " Vim syntax file " Language: PLP (Perl in HTML) @@ -44,5 +39,3 @@ syn region PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+ let b:current_syntax = "plp" - -endif diff --git a/syntax/plsql.vim b/syntax/plsql.vim index c40575a8..ce0a7eb1 100644 --- a/syntax/plsql.vim +++ b/syntax/plsql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/plsql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plsql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plsql') == -1 " Vim syntax file " Language: Oracle Procedureal SQL (PL/SQL) @@ -271,5 +266,3 @@ hi def link plsqlTodo Todo let b:current_syntax = "plsql" " vim: ts=8 sw=2 - -endif diff --git a/syntax/po.vim b/syntax/po.vim index 217eebc3..c852b71c 100644 --- a/syntax/po.vim +++ b/syntax/po.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/po.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('po', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'po') == -1 " Vim syntax file " Language: po (gettext) @@ -140,5 +135,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:set ts=8 sts=2 sw=2 noet: - -endif diff --git a/syntax/pod.vim b/syntax/pod.vim index 68c55460..d67b15cc 100644 --- a/syntax/pod.vim +++ b/syntax/pod.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pod.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim syntax file " Language: Perl POD format @@ -182,5 +177,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/pony.vim b/syntax/pony.vim index a0d3d959..dcb3bc1a 100644 --- a/syntax/pony.vim +++ b/syntax/pony.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pony.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pony', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 " Vim syntax file " Language: Pony @@ -234,5 +229,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:current_syntax = 'pony' - -endif diff --git a/syntax/postscr.vim b/syntax/postscr.vim index 8aeea630..6053453a 100644 --- a/syntax/postscr.vim +++ b/syntax/postscr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/postscr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('postscr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'postscr') == -1 " Vim syntax file " Language: PostScript - all Levels, selectable @@ -787,5 +782,3 @@ endif let b:current_syntax = "postscr" " vim: ts=8 - -endif diff --git a/syntax/pov.vim b/syntax/pov.vim index 5873d934..79fe9210 100644 --- a/syntax/pov.vim +++ b/syntax/pov.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pov.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pov', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pov') == -1 " Vim syntax file " Language: PoV-Ray(tm) 3.7 Scene Description Language @@ -151,5 +146,3 @@ hi def link povCommentError povError hi def link povError Error let b:current_syntax = "pov" - -endif diff --git a/syntax/povini.vim b/syntax/povini.vim index 59942965..9dce65b3 100644 --- a/syntax/povini.vim +++ b/syntax/povini.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/povini.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('povini', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'povini') == -1 " Vim syntax file " Language: PoV-Ray(tm) 3.7 configuration/initialization files @@ -63,5 +58,3 @@ hi def link poviniBool Constant hi def link poviniNumber Number let b:current_syntax = "povini" - -endif diff --git a/syntax/ppd.vim b/syntax/ppd.vim index 7ba5a53c..d1dd040d 100644 --- a/syntax/ppd.vim +++ b/syntax/ppd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ppd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ppd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ppd') == -1 " Vim syntax file " Language: PPD (PostScript printer description) file @@ -42,5 +37,3 @@ hi def link ppdContraints Special let b:current_syntax = "ppd" " vim: ts=8 - -endif diff --git a/syntax/ppwiz.vim b/syntax/ppwiz.vim index 2cb20d70..c32b32d5 100644 --- a/syntax/ppwiz.vim +++ b/syntax/ppwiz.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ppwiz.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ppwiz', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ppwiz') == -1 " Vim syntax file " Language: PPWizard (preprocessor by Dennis Bareis) @@ -91,5 +86,3 @@ let b:current_syntax = "ppwiz" " vim: ts=4 - -endif diff --git a/syntax/privoxy.vim b/syntax/privoxy.vim index 31ffb85d..6dfe03b6 100644 --- a/syntax/privoxy.vim +++ b/syntax/privoxy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/privoxy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('privoxy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'privoxy') == -1 " Vim syntax file " Language: Privoxy actions file @@ -78,5 +73,3 @@ let b:current_syntax = "privoxy" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/procmail.vim b/syntax/procmail.vim index 137db9e4..f10d3eb1 100644 --- a/syntax/procmail.vim +++ b/syntax/procmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/procmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('procmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'procmail') == -1 " Vim syntax file " Language: Procmail definition file @@ -61,5 +56,3 @@ hi def link procmailString String let b:current_syntax = "procmail" " vim: ts=8 - -endif diff --git a/syntax/prolog.vim b/syntax/prolog.vim index 2ba79f43..a38a82b7 100644 --- a/syntax/prolog.vim +++ b/syntax/prolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/prolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('prolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'prolog') == -1 " Vim syntax file " Language: PROLOG @@ -125,5 +120,3 @@ endif let b:current_syntax = "prolog" " vim: ts=8 - -endif diff --git a/syntax/promela.vim b/syntax/promela.vim index f91e8588..60862860 100644 --- a/syntax/promela.vim +++ b/syntax/promela.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/promela.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('promela', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'promela') == -1 " Vim syntax file " Language: ProMeLa @@ -60,5 +55,3 @@ hi def link promelaString String hi def link promelaTodo Todo let b:current_syntax = "promela" - -endif diff --git a/syntax/proto.vim b/syntax/proto.vim index cc1e6f9d..95d604c1 100644 --- a/syntax/proto.vim +++ b/syntax/proto.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/proto.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('protobuf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protobuf') == -1 " Protocol Buffers - Google's data interchange format " Copyright 2008 Google Inc. All rights reserved. @@ -114,5 +109,3 @@ if version >= 508 || !exists("did_proto_syn_inits") endif let b:current_syntax = "proto" - -endif diff --git a/syntax/protocols.vim b/syntax/protocols.vim index 978f6810..0a53772c 100644 --- a/syntax/protocols.vim +++ b/syntax/protocols.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/protocols.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('protocols', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protocols') == -1 " Vim syntax file " Language: protocols(5) - Internet protocols definition file @@ -51,5 +46,3 @@ let b:current_syntax = "protocols" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/ps1.vim b/syntax/ps1.vim index 8a80cf38..d7c5ecda 100644 --- a/syntax/ps1.vim +++ b/syntax/ps1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ps1.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim syntax file " Language: Windows PowerShell @@ -200,5 +195,3 @@ if version >= 508 || !exists("did_ps1_syn_inits") endif let b:current_syntax = "ps1" - -endif diff --git a/syntax/ps1xml.vim b/syntax/ps1xml.vim index 3e341afd..06ff97da 100644 --- a/syntax/ps1xml.vim +++ b/syntax/ps1xml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ps1xml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim syntax file " Language: Windows PowerShell XML @@ -63,5 +58,3 @@ let b:current_syntax = "ps1xml" let &cpo = s:ps1xml_cpo_save unlet s:ps1xml_cpo_save - -endif diff --git a/syntax/psf.vim b/syntax/psf.vim index e5657e2c..25176c96 100644 --- a/syntax/psf.vim +++ b/syntax/psf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/psf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('psf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'psf') == -1 " Vim syntax file " Language: Software Distributor product specification file @@ -98,5 +93,3 @@ hi def link psfComment Comment syn sync lines=100 let b:current_syntax = "psf" - -endif diff --git a/syntax/pug.vim b/syntax/pug.vim index ceb6ebe2..94ee0dac 100644 --- a/syntax/pug.vim +++ b/syntax/pug.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pug.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pug', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pug') == -1 " Vim syntax file " Language: Pug @@ -121,5 +116,3 @@ let b:current_syntax = "pug" if main_syntax == "pug" unlet main_syntax endif - -endif diff --git a/syntax/puppet.vim b/syntax/puppet.vim index e6239a84..1df1015d 100644 --- a/syntax/puppet.vim +++ b/syntax/puppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/puppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Language: Puppet " Maintainer: Voxpupuli @@ -443,5 +438,3 @@ HiLink puppetComment Comment delcommand HiLink let b:current_syntax = "puppet" - -endif diff --git a/syntax/purescript.vim b/syntax/purescript.vim index 259dab78..d6ef897c 100644 --- a/syntax/purescript.vim +++ b/syntax/purescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/purescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('purescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1 " syntax highlighting for purescript " @@ -224,5 +219,3 @@ highlight def link purescriptType Type highlight def link purescriptComment Comment let b:current_syntax = "purescript" - -endif diff --git a/syntax/pyrex.vim b/syntax/pyrex.vim index 6ebb423b..8699c29a 100644 --- a/syntax/pyrex.vim +++ b/syntax/pyrex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/pyrex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pyrex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pyrex') == -1 " Vim syntax file " Language: Pyrex @@ -58,5 +53,3 @@ hi def link pyrexForFrom Statement let b:current_syntax = "pyrex" - -endif diff --git a/syntax/python.vim b/syntax/python.vim index 8ace6f03..35df5989 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/python.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('python', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python') == -1 " For version 5.x: Clear all syntax items " For versions greater than 6.x: Quit when a syntax file was already loaded @@ -515,5 +510,3 @@ if v:version >= 508 || !exists('did_python_syn_inits') endif let b:current_syntax = 'python' - -endif diff --git a/syntax/qmake.vim b/syntax/qmake.vim index 74708ece..6961bbc8 100644 --- a/syntax/qmake.vim +++ b/syntax/qmake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/qmake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('qmake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qmake') == -1 " qmake project syntax file " Language: qmake project @@ -306,5 +301,3 @@ hi def link qmakeQtConfiguration PreProc hi def link qmakeScope Conditional let b:current_syntax = "qmake" - -endif diff --git a/syntax/qml.vim b/syntax/qml.vim index e3006ebf..18b0799d 100644 --- a/syntax/qml.vim +++ b/syntax/qml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/qml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('qml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1 " Vim syntax file @@ -149,5 +144,3 @@ let b:current_syntax = "qml" if main_syntax == 'qml' unlet main_syntax endif - -endif diff --git a/syntax/quake.vim b/syntax/quake.vim index 413a1c56..ec467a5e 100644 --- a/syntax/quake.vim +++ b/syntax/quake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/quake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('quake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'quake') == -1 " Vim syntax file " Language: Quake[1-3] configuration file @@ -177,5 +172,3 @@ let b:current_syntax = "quake" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/racket.vim b/syntax/racket.vim index ecd4eda6..25483dea 100644 --- a/syntax/racket.vim +++ b/syntax/racket.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/racket.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('racket', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1 " Vim syntax file " Language: Racket @@ -668,5 +663,3 @@ if version >= 508 || !exists("did_racket_syntax_inits") endif let b:current_syntax = "racket" - -endif diff --git a/syntax/radiance.vim b/syntax/radiance.vim index e77f64e2..1e4d0631 100644 --- a/syntax/radiance.vim +++ b/syntax/radiance.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/radiance.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('radiance', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'radiance') == -1 " Vim syntax file " Language: Radiance Scene Description @@ -149,5 +144,3 @@ hi def link radianceTodo Todo let b:current_syntax = "radiance" " vim: ts=8 sw=2 - -endif diff --git a/syntax/ragel.vim b/syntax/ragel.vim index 37697ef7..496c6ad4 100644 --- a/syntax/ragel.vim +++ b/syntax/ragel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ragel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ragel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ragel') == -1 " Vim syntax file " @@ -171,5 +166,3 @@ hi link caseLabelKeyword Keyword hi link beginRL Type let b:current_syntax = "ragel" - -endif diff --git a/syntax/raku.vim b/syntax/raku.vim index 137fa7e0..d15f0307 100644 --- a/syntax/raku.vim +++ b/syntax/raku.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/raku.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raku', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1 " Vim syntax file " Language: Raku @@ -1977,5 +1972,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:ts=8:sts=4:sw=4:expandtab:ft=vim - -endif diff --git a/syntax/raml.vim b/syntax/raml.vim index a3684763..95f4955c 100644 --- a/syntax/raml.vim +++ b/syntax/raml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/raml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raml') == -1 " Vim syntax file " Language: RAML (RESTful API Modeling Language) @@ -113,5 +108,3 @@ let b:current_syntax = "raml" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/ratpoison.vim b/syntax/ratpoison.vim index b6e25067..8209610f 100644 --- a/syntax/ratpoison.vim +++ b/syntax/ratpoison.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ratpoison.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ratpoison', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ratpoison') == -1 " Vim syntax file " Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) @@ -274,5 +269,3 @@ hi def link ratpoisonWinListArg Constant let b:current_syntax = "ratpoison" " vim: ts=8 - -endif diff --git a/syntax/razor.vim b/syntax/razor.vim index de924761..5f97015a 100644 --- a/syntax/razor.vim +++ b/syntax/razor.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/razor.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('razor', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'razor') == -1 if exists("b:current_syntax") finish @@ -58,5 +53,3 @@ hi def link rUsing Preproc hi def link rNamespace Type let b:current_syntax = "razor" - -endif diff --git a/syntax/rc.vim b/syntax/rc.vim index d5b658c0..c93d123f 100644 --- a/syntax/rc.vim +++ b/syntax/rc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rc') == -1 " Vim syntax file " Language: M$ Resource files (*.rc) @@ -197,5 +192,3 @@ hi def rcCommonAttribute ctermfg=Brown guifg=Brown let b:current_syntax = "rc" " vim: ts=8 - -endif diff --git a/syntax/rcs.vim b/syntax/rcs.vim index 4dfab84a..6657b1d8 100644 --- a/syntax/rcs.vim +++ b/syntax/rcs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rcs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rcs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rcs') == -1 " Vim syntax file " Language: RCS file @@ -70,5 +65,3 @@ hi def link rcsEOFError Error let b:current_syntax = "rcs" - -endif diff --git a/syntax/readline.vim b/syntax/readline.vim index 33a733f3..3a98c71f 100644 --- a/syntax/readline.vim +++ b/syntax/readline.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/readline.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('readline', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'readline') == -1 " Vim syntax file " Language: readline(3) configuration file @@ -418,5 +413,3 @@ let b:current_syntax = 'readline' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/reason.vim b/syntax/reason.vim index 62b83c5f..6d791747 100644 --- a/syntax/reason.vim +++ b/syntax/reason.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/reason.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reason', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 " Vim syntax file " Language: Reason (Forked from Rust) @@ -257,5 +252,3 @@ syn sync minlines=200 syn sync maxlines=500 let b:current_syntax = "reason" - -endif diff --git a/syntax/rego.vim b/syntax/rego.vim index c34a9780..2c3eed95 100644 --- a/syntax/rego.vim +++ b/syntax/rego.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rego.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rego', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rego') == -1 " Vim syntax file " Language: rego policy language @@ -96,5 +91,3 @@ hi def link regoComment Comment hi def link regoTodo Todo let b:current_syntax = 'rego' - -endif diff --git a/syntax/remind.vim b/syntax/remind.vim index 9ca10b49..cf40268c 100644 --- a/syntax/remind.vim +++ b/syntax/remind.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/remind.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('remind', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'remind') == -1 " Vim syntax file " Language: Remind @@ -80,5 +75,3 @@ hi def link remindWarning Error let b:current_syntax = "remind" " vim: ts=8 sw=2 - -endif diff --git a/syntax/requirements.vim b/syntax/requirements.vim index 0167b41f..bf9b4a4f 100644 --- a/syntax/requirements.vim +++ b/syntax/requirements.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/requirements.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('requirements', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'requirements') == -1 " the Requirements File Format syntax support for Vim " Version: 1.5.3 @@ -60,5 +55,3 @@ hi link requirementsEnvironmentMarkers Macro let b:current_syntax = "requirements" " vim: et sw=4 ts=4 sts=4: - -endif diff --git a/syntax/resolv.vim b/syntax/resolv.vim index b151ecd2..c28ce3b6 100644 --- a/syntax/resolv.vim +++ b/syntax/resolv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/resolv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('resolv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'resolv') == -1 " Vim syntax file " Language: resolver configuration file @@ -126,5 +121,3 @@ hi def link resolvIPSpecial Special let b:current_syntax = "resolv" " vim: ts=8 ft=vim - -endif diff --git a/syntax/reva.vim b/syntax/reva.vim index 0cc6c60d..66b83f77 100644 --- a/syntax/reva.vim +++ b/syntax/reva.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/reva.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reva', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reva') == -1 " Vim syntax file " Language: Reva Forth @@ -198,5 +193,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/rexx.vim b/syntax/rexx.vim index fb9c6d55..9573bdd0 100644 --- a/syntax/rexx.vim +++ b/syntax/rexx.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rexx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rexx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rexx') == -1 " Vim syntax file " Language: Rexx @@ -325,5 +320,3 @@ hi def link rexxForward2 rexxForward let b:current_syntax = "rexx" "vim: ts=8 - -endif diff --git a/syntax/rhelp.vim b/syntax/rhelp.vim index 21c602d9..3801a371 100644 --- a/syntax/rhelp.vim +++ b/syntax/rhelp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rhelp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('r-lang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1 " Vim syntax file " Language: R Help File @@ -162,5 +157,3 @@ endif let b:current_syntax = "rhelp" " vim: foldmethod=marker: - -endif diff --git a/syntax/rib.vim b/syntax/rib.vim index 279377fb..522e283b 100644 --- a/syntax/rib.vim +++ b/syntax/rib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rib', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rib') == -1 " Vim syntax file " Language: Renderman Interface Bytestream @@ -69,5 +64,3 @@ hi def link ribFloat Float let b:current_syntax = "rib" " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim - -endif diff --git a/syntax/rmd.vim b/syntax/rmd.vim index 555f102a..b3b904f3 100644 --- a/syntax/rmd.vim +++ b/syntax/rmd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rmd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rmd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rmd') == -1 " markdown Text with R statements " Language: markdown with R code chunks @@ -125,5 +120,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/rnc.vim b/syntax/rnc.vim index 4226f53c..2a320837 100644 --- a/syntax/rnc.vim +++ b/syntax/rnc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rnc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnc') == -1 " Vim syntax file " Language: Relax NG compact syntax @@ -75,5 +70,3 @@ let b:current_syntax = "rnc" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/rng.vim b/syntax/rng.vim index 947f2436..64d93980 100644 --- a/syntax/rng.vim +++ b/syntax/rng.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rng.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rng', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rng') == -1 " Vim syntax file " Language: RELAX NG @@ -32,5 +27,3 @@ syn keyword rngTagName parentRef ref start text value zeroOrMore contained hi def link rngTagName Statement let b:current_syntax = 'rng' - -endif diff --git a/syntax/rnoweb-1.vim b/syntax/rnoweb-1.vim index 7e2f2a6f..bcc15f6d 100644 --- a/syntax/rnoweb-1.vim +++ b/syntax/rnoweb-1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rnoweb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('r-lang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1 " Vim syntax file " Language: R noweb Files @@ -63,5 +58,3 @@ hi def link rnowebChunkReference Delimiter let b:current_syntax = "rnoweb" " vim: foldmethod=marker: - -endif diff --git a/syntax/rnoweb-2.vim b/syntax/rnoweb-2.vim index f2c1b831..a3d4dc54 100644 --- a/syntax/rnoweb-2.vim +++ b/syntax/rnoweb-2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rnoweb-2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnoweb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnoweb') == -1 " Vim syntax file " Language: R noweb Files @@ -59,5 +54,3 @@ hi def link rnowebChunkReference Delimiter let b:current_syntax = "rnoweb" " vim: foldmethod=marker: - -endif diff --git a/syntax/robots.vim b/syntax/robots.vim index f6e428c0..acf8767f 100644 --- a/syntax/robots.vim +++ b/syntax/robots.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/robots.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('robots', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'robots') == -1 " Vim syntax file " Language: "Robots.txt" files @@ -64,5 +59,3 @@ let b:current_syntax = "robots" " vim: ts=8 sw=2 - -endif diff --git a/syntax/rpcgen.vim b/syntax/rpcgen.vim index 4deb9a5c..b93026bb 100644 --- a/syntax/rpcgen.vim +++ b/syntax/rpcgen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rpcgen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rpcgen', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpcgen') == -1 " Vim syntax file " Language: rpcgen @@ -53,5 +48,3 @@ endif let b:current_syntax = "rpcgen" " vim: ts=8 - -endif diff --git a/syntax/rpl.vim b/syntax/rpl.vim index 3ebd6347..a37b1bde 100644 --- a/syntax/rpl.vim +++ b/syntax/rpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rpl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1 " Vim syntax file " Language: RPL/2 @@ -490,5 +485,3 @@ let b:current_syntax = "rpl" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 tw=132 - -endif diff --git a/syntax/rrst.vim b/syntax/rrst.vim index fde794cc..76cb44cd 100644 --- a/syntax/rrst.vim +++ b/syntax/rrst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rrst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rrst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rrst') == -1 " reStructured Text with R statements " Language: reST with R code chunks @@ -50,5 +45,3 @@ hi def link rrstInlineDelim Special let b:current_syntax = "rrst" " vim: ts=8 sw=2 - -endif diff --git a/syntax/rst.vim b/syntax/rst.vim index 337ade93..a0988ff8 100644 --- a/syntax/rst.vim +++ b/syntax/rst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " Vim reST syntax file " Language: reStructuredText documentation format @@ -307,5 +302,3 @@ let b:current_syntax = "rst" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/rtf.vim b/syntax/rtf.vim index 24b12498..5fe3b6f5 100644 --- a/syntax/rtf.vim +++ b/syntax/rtf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rtf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rtf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rtf') == -1 " Vim syntax file " Language: Rich Text Format @@ -82,5 +77,3 @@ hi def link rtfBlue rtfBlue let b:current_syntax = "rtf" " vim:ts=8 - -endif diff --git a/syntax/ruby.vim b/syntax/ruby.vim index 8621075f..4342b896 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim syntax file " Language: Ruby @@ -602,5 +597,3 @@ unlet! s:cpo_sav delc SynFold " vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: - -endif diff --git a/syntax/rust.vim b/syntax/rust.vim index 0c712813..108dd3aa 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/rust.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Vim syntax file " Language: Rust @@ -394,5 +389,3 @@ syn sync maxlines=500 let b:current_syntax = "rust" " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/syntax/samba.vim b/syntax/samba.vim index 0f6910b6..2fe964f7 100644 --- a/syntax/samba.vim +++ b/syntax/samba.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/samba.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('samba', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'samba') == -1 " Vim syntax file " Language: samba configuration files (smb.conf) @@ -125,5 +120,3 @@ hi def link sambaBoolean Constant let b:current_syntax = "samba" " vim: ts=8 - -endif diff --git a/syntax/sas.vim b/syntax/sas.vim index 80490b6a..f828bc56 100644 --- a/syntax/sas.vim +++ b/syntax/sas.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sas.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sas', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sas') == -1 " Vim syntax file " Language: SAS @@ -272,5 +267,3 @@ let b:current_syntax = "sas" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/sass.vim b/syntax/sass.vim index 777a3b96..6f35d7a1 100644 --- a/syntax/sass.vim +++ b/syntax/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim syntax file " Language: Sass @@ -112,5 +107,3 @@ hi def link sassClass Type let b:current_syntax = "sass" " vim:set sw=2: - -endif diff --git a/syntax/sather.vim b/syntax/sather.vim index f610e92d..0cde99c4 100644 --- a/syntax/sather.vim +++ b/syntax/sather.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sather.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sather', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sather') == -1 " Vim syntax file " Language: Sather/pSather @@ -99,5 +94,3 @@ hi def link satherExternal PreCondit let b:current_syntax = "sather" " vim: ts=8 - -endif diff --git a/syntax/sbt.vim b/syntax/sbt.vim index 2a8d75fa..81d539a7 100644 --- a/syntax/sbt.vim +++ b/syntax/sbt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sbt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sbt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1 " Vim syntax file " Language: sbt @@ -39,5 +34,3 @@ hi link sbtComment Comment hi link sbtLineComment Comment hi link sbtDocComment Comment - -endif diff --git a/syntax/scala.vim b/syntax/scala.vim index f6f2df9a..fa97b867 100644 --- a/syntax/scala.vim +++ b/syntax/scala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/scala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim syntax file " Language: Scala @@ -238,5 +233,3 @@ if main_syntax ==# 'scala' endif " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/syntax/scheme.vim b/syntax/scheme.vim index ee9c1ea4..b86a766e 100644 --- a/syntax/scheme.vim +++ b/syntax/scheme.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/scheme.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scheme', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scheme') == -1 " Vim syntax file " Language: Scheme (R7RS) @@ -471,5 +466,3 @@ unlet b:did_scheme_syntax let b:current_syntax = 'scheme' let &cpo = s:cpo unlet s:cpo - -endif diff --git a/syntax/scilab.vim b/syntax/scilab.vim index a551b8a2..b11d57ac 100644 --- a/syntax/scilab.vim +++ b/syntax/scilab.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/scilab.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scilab', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scilab') == -1 " " Vim syntax file @@ -109,5 +104,3 @@ hi def link scilabOverload Special let b:current_syntax = "scilab" "EOF vim: ts=4 noet tw=100 sw=4 sts=0 - -endif diff --git a/syntax/screen.vim b/syntax/screen.vim index 11da09e2..c4cd11ec 100644 --- a/syntax/screen.vim +++ b/syntax/screen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/screen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('screen', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'screen') == -1 " Vim syntax file " Language: screen(1) configuration file @@ -267,5 +262,3 @@ let b:current_syntax = "screen" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/scss.vim b/syntax/scss.vim index 03f311b7..a4a9e0a3 100644 --- a/syntax/scss.vim +++ b/syntax/scss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/scss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1 " Vim syntax file " Language: SCSS (Sassy CSS) @@ -230,5 +225,3 @@ let b:current_syntax = "scss" if main_syntax == 'scss' unlet main_syntax endif - -endif diff --git a/syntax/sd.vim b/syntax/sd.vim index ddc1c0ec..5cd8917c 100644 --- a/syntax/sd.vim +++ b/syntax/sd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sd') == -1 " Language: streaming descriptor file " Maintainer: Puria Nafisi Azizi (pna) <pna@netstudent.polito.it> @@ -78,5 +73,3 @@ let b:current_syntax = "sd" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/sdc.vim b/syntax/sdc.vim index 82995462..79314578 100644 --- a/syntax/sdc.vim +++ b/syntax/sdc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sdc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sdc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sdc') == -1 " Vim syntax file " Language: SDC - Synopsys Design Constraints @@ -48,5 +43,3 @@ hi def link sdcFlags Special let b:current_syntax = "sdc" " vim: ts=8 - -endif diff --git a/syntax/sdl.vim b/syntax/sdl.vim index c8a2b38e..1551ccc5 100644 --- a/syntax/sdl.vim +++ b/syntax/sdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sdl') == -1 " Vim syntax file " Language: SDL @@ -160,5 +155,3 @@ delcommand Hi let b:current_syntax = "sdl" " vim: ts=8 - -endif diff --git a/syntax/sed.vim b/syntax/sed.vim index 854c3229..8d2349da 100644 --- a/syntax/sed.vim +++ b/syntax/sed.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sed.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sed', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sed') == -1 " Vim syntax file " Language: sed @@ -117,5 +112,3 @@ unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters let b:current_syntax = "sed" " vim: sts=4 sw=4 ts=8 - -endif diff --git a/syntax/sensors.vim b/syntax/sensors.vim index ae08c54c..c2411eed 100644 --- a/syntax/sensors.vim +++ b/syntax/sensors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sensors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sensors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensors') == -1 " Vim syntax file " Language: sensors.conf(5) - libsensors configuration file @@ -59,5 +54,3 @@ let b:current_syntax = "sensors" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/services.vim b/syntax/services.vim index a70be927..2b5b6f24 100644 --- a/syntax/services.vim +++ b/syntax/services.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/services.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('services', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'services') == -1 " Vim syntax file " Language: services(5) - Internet network services list @@ -61,5 +56,3 @@ let b:current_syntax = "services" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/setserial.vim b/syntax/setserial.vim index 27188699..ac7f9d70 100644 --- a/syntax/setserial.vim +++ b/syntax/setserial.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/setserial.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('setserial', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'setserial') == -1 " Vim syntax file " Language: setserial(8) configuration file @@ -127,5 +122,3 @@ let b:current_syntax = "setserial" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/sexplib.vim b/syntax/sexplib.vim index 65ae8b2b..2e338203 100644 --- a/syntax/sexplib.vim +++ b/syntax/sexplib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sexplib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim syntax file " Language: S-expressions as used in Sexplib @@ -95,5 +90,3 @@ endif let b:current_syntax = "sexplib" " vim: ts=8 - -endif diff --git a/syntax/sh.vim b/syntax/sh.vim index f7f49184..fc5810af 100644 --- a/syntax/sh.vim +++ b/syntax/sh.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sh.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sh', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sh') == -1 " Shebang syn match shShebang "^#!.*$" containedin=shComment @@ -63,5 +58,3 @@ hi def link shSemicolon Delimiter hi def link shShebang PreProc hi def link zshDelim Delimiter hi def link zshFlag Special - -endif diff --git a/syntax/sieve.vim b/syntax/sieve.vim index 1bf06c86..1374df78 100644 --- a/syntax/sieve.vim +++ b/syntax/sieve.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sieve.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sieve', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sieve') == -1 " Vim syntax file " Language: Sieve filtering language input file @@ -62,5 +57,3 @@ let b:current_syntax = "sieve" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/sil.vim b/syntax/sil.vim index 8f49c690..06bcda91 100644 --- a/syntax/sil.vim +++ b/syntax/sil.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sil.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sil', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sil') == -1 " This source file is part of the Swift.org open source project " @@ -185,5 +180,3 @@ let b:current_syntax = "sil" let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/syntax/simula.vim b/syntax/simula.vim index 95579e3b..f9fb68e7 100644 --- a/syntax/simula.vim +++ b/syntax/simula.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/simula.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('simula', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'simula') == -1 " Vim syntax file " Language: Simula @@ -94,5 +89,3 @@ hi def link simulaType Type let b:current_syntax = "simula" " vim: sts=4 sw=4 ts=8 - -endif diff --git a/syntax/sinda.vim b/syntax/sinda.vim index 6f257bbd..7d2a6cad 100644 --- a/syntax/sinda.vim +++ b/syntax/sinda.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sinda.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sinda', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sinda') == -1 " Vim syntax file " Language: sinda85, sinda/fluint input file @@ -136,5 +131,3 @@ hi def link sindaTodo Todo let b:current_syntax = "sinda" " vim: ts=8 sw=2 - -endif diff --git a/syntax/sisu.vim b/syntax/sisu.vim index 7d5bedba..a2aeeb3c 100644 --- a/syntax/sisu.vim +++ b/syntax/sisu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sisu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sisu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sisu') == -1 " SiSU Vim syntax file " SiSU Maintainer: Ralph Amissah <ralph.amissah@gmail.com> @@ -282,5 +277,3 @@ hi def link sisu_error Error let b:current_syntax = "sisu" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/skill.vim b/syntax/skill.vim index 61f1a2e9..5304a8dd 100644 --- a/syntax/skill.vim +++ b/syntax/skill.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/skill.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('skill', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'skill') == -1 " Vim syntax file " Language: SKILL @@ -556,5 +551,3 @@ hi def link skillCommentError Error let b:current_syntax = "skill" " vim: ts=4 - -endif diff --git a/syntax/slang.vim b/syntax/slang.vim index b92ac736..49e43635 100644 --- a/syntax/slang.vim +++ b/syntax/slang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slang', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slang') == -1 " Vim syntax file " Language: S-Lang @@ -96,5 +91,3 @@ hi def link slangDelim Delimiter let b:current_syntax = "slang" " vim: ts=8 - -endif diff --git a/syntax/slice.vim b/syntax/slice.vim index d9b16e64..a2264819 100644 --- a/syntax/slice.vim +++ b/syntax/slice.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slice.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slice', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slice') == -1 " Vim syntax file " Language: Slice (ZeroC's Specification Language for Ice) @@ -85,5 +80,3 @@ hi def link sliceNumberError Special let b:current_syntax = "slice" " vim: ts=8 - -endif diff --git a/syntax/slim.vim b/syntax/slim.vim index 4d6ee3d6..de32f92f 100644 --- a/syntax/slim.vim +++ b/syntax/slim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slim') == -1 " Vim syntax file " Language: Slim @@ -118,5 +113,3 @@ hi def link slimInlineTagChar Delimiter hi def link slimFilter PreProc let b:current_syntax = "slim" - -endif diff --git a/syntax/slime.vim b/syntax/slime.vim index 4420e95a..e00fd549 100644 --- a/syntax/slime.vim +++ b/syntax/slime.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slime.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slime', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slime') == -1 " Vim syntax file " Language: slime @@ -109,5 +104,3 @@ hi def link slimeWrappedAttrsDelimiter Delimiter hi def link slimeInlineTagChar Delimiter let b:current_syntax = "slime" - -endif diff --git a/syntax/slpconf.vim b/syntax/slpconf.vim index 93c081f5..20c4f639 100644 --- a/syntax/slpconf.vim +++ b/syntax/slpconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slpconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpconf') == -1 " Vim syntax file " Language: RFC 2614 - An API for Service Location configuration file @@ -280,5 +275,3 @@ let b:current_syntax = "slpconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/slpreg.vim b/syntax/slpreg.vim index 5aa34439..0c7f07a9 100644 --- a/syntax/slpreg.vim +++ b/syntax/slpreg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slpreg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpreg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpreg') == -1 " Vim syntax file " Language: RFC 2614 - An API for Service Location registration file @@ -129,5 +124,3 @@ let b:current_syntax = "slpreg" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/slpspi.vim b/syntax/slpspi.vim index 93607f48..83034fec 100644 --- a/syntax/slpspi.vim +++ b/syntax/slpspi.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slpspi.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpspi', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpspi') == -1 " Vim syntax file " Language: RFC 2614 - An API for Service Location SPI file @@ -46,5 +41,3 @@ let b:current_syntax = "slpspi" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/slrnrc.vim b/syntax/slrnrc.vim index f609aff8..1683be97 100644 --- a/syntax/slrnrc.vim +++ b/syntax/slrnrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slrnrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slrnrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slrnrc') == -1 " Vim syntax file " Language: Slrn setup file (based on slrn 0.9.8.1) @@ -188,5 +183,3 @@ hi def link slrnrcUnsetkey slrnrcSetkey let b:current_syntax = "slrnrc" "EOF vim: ts=8 noet tw=120 sw=8 sts=0 - -endif diff --git a/syntax/slrnsc.vim b/syntax/slrnsc.vim index fdc527e8..6cc62719 100644 --- a/syntax/slrnsc.vim +++ b/syntax/slrnsc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/slrnsc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slrnsc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slrnsc') == -1 " Vim syntax file " Language: Slrn score file (based on slrn 0.9.8.0) @@ -75,5 +70,3 @@ hi def link slrnscInclude Keyword let b:current_syntax = "slrnsc" "EOF vim: ts=8 noet tw=200 sw=8 sts=0 - -endif diff --git a/syntax/sm.vim b/syntax/sm.vim index 7187d484..a4b7379f 100644 --- a/syntax/sm.vim +++ b/syntax/sm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sm') == -1 " Vim syntax file " Language: sendmail @@ -87,5 +82,3 @@ hi def link smVar String let b:current_syntax = "sm" " vim: ts=18 - -endif diff --git a/syntax/smarty.vim b/syntax/smarty.vim index b6c245a3..30d82d06 100644 --- a/syntax/smarty.vim +++ b/syntax/smarty.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/smarty.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smarty', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smarty') == -1 " Vim syntax file " Language: Smarty Templates @@ -83,5 +78,3 @@ if main_syntax == 'smarty' endif " vim: ts=8 - -endif diff --git a/syntax/smcl.vim b/syntax/smcl.vim index 6c83bb89..50b657d4 100644 --- a/syntax/smcl.vim +++ b/syntax/smcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/smcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smcl') == -1 " smcl.vim -- Vim syntax file for smcl files. " Language: SMCL -- Stata Markup and Control Language @@ -314,5 +309,3 @@ hi def link smclString String let b:current_syntax = "smcl" " vim: ts=8 - -endif diff --git a/syntax/smhl.vim b/syntax/smhl.vim index 3dbbd9d3..7ab328a5 100644 --- a/syntax/smhl.vim +++ b/syntax/smhl.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/smhl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax cluster _semantic contains=_semantic1,_semantic2,_semantic3,_semantic4,_semantic5,_semantic6,_semantic7,_semantic8,_semantic9,_semantic10,_semantic11,_semantic12,_semantic13,_semantic14,_semantic15,_semantic16,_semantic17,_semantic18,_semantic19,_semantic20,_semantic21,_semantic22,_semantic23,_semantic24,_semantic25 - -endif diff --git a/syntax/smith.vim b/syntax/smith.vim index 09a7aa87..4dd4e513 100644 --- a/syntax/smith.vim +++ b/syntax/smith.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/smith.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smith', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smith') == -1 " Vim syntax file " Language: SMITH @@ -46,5 +41,3 @@ hi def link smithNumber Number let b:current_syntax = "smith" " vim: ts=2 - -endif diff --git a/syntax/sml.vim b/syntax/sml.vim index 7e74d168..5788d758 100644 --- a/syntax/sml.vim +++ b/syntax/sml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sml') == -1 " Vim syntax file " Language: SML @@ -224,5 +219,3 @@ hi def link smlEncl Keyword let b:current_syntax = "sml" " vim: ts=8 - -endif diff --git a/syntax/smt2.vim b/syntax/smt2.vim index adae886d..b70c95f4 100644 --- a/syntax/smt2.vim +++ b/syntax/smt2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/smt2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smt2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1 " Vim syntax file " " Language: SMT-LIB2 with Z3's extensions @@ -182,5 +177,3 @@ highlight def link smt2Binary Number highlight def link smt2Int Number highlight def link smt2Delimiter Delimiter highlight def link smt2Error Error - -endif diff --git a/syntax/snobol4.vim b/syntax/snobol4.vim index b24798a0..d100fb4a 100644 --- a/syntax/snobol4.vim +++ b/syntax/snobol4.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/snobol4.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('snobol4', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'snobol4') == -1 " Vim syntax file " Language: SNOBOL4 @@ -120,5 +115,3 @@ endif let b:current_syntax = "snobol4" " vim: ts=8 - -endif diff --git a/syntax/solidity.vim b/syntax/solidity.vim index 90f48dac..3bde3b8a 100644 --- a/syntax/solidity.vim +++ b/syntax/solidity.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/solidity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('solidity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1 " Vim syntax file " Language: Solidity @@ -155,5 +150,3 @@ syn region solComment start="/\*" end="\*/" contains=solCommentTodo, hi def link solCommentTodo Comment hi def link solLineComment Comment hi def link solComment Comment - -endif diff --git a/syntax/spec.vim b/syntax/spec.vim index 4dee097d..3a6772da 100644 --- a/syntax/spec.vim +++ b/syntax/spec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/spec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spec', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spec') == -1 " Filename: spec.vim " Purpose: Vim syntax file @@ -233,5 +228,3 @@ hi def link specListedFilesShare Statement let b:current_syntax = "spec" " vim: ts=8 - -endif diff --git a/syntax/spice.vim b/syntax/spice.vim index 92ebb5f9..becd3de9 100644 --- a/syntax/spice.vim +++ b/syntax/spice.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/spice.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spice', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spice') == -1 " Vim syntax file " Language: Spice circuit simulator input netlist @@ -82,5 +77,3 @@ let b:current_syntax = "spice" " so <sfile>:p:h/spice.vim " vim: ts=8 - -endif diff --git a/syntax/spup.vim b/syntax/spup.vim index 51c4bb53..b4f16b2f 100644 --- a/syntax/spup.vim +++ b/syntax/spup.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/spup.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spup', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spup') == -1 " Vim syntax file " Language: Speedup, plant simulator from AspenTech @@ -276,5 +271,3 @@ let b:current_syntax = "spup" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8 - -endif diff --git a/syntax/spyce.vim b/syntax/spyce.vim index e2a1a3d7..f5f5e092 100644 --- a/syntax/spyce.vim +++ b/syntax/spyce.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/spyce.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spyce', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spyce') == -1 " Vim syntax file " Language: SPYCE @@ -111,5 +106,3 @@ if main_syntax == 'spyce' unlet main_syntax endif - -endif diff --git a/syntax/sql.vim b/syntax/sql.vim index 46fc5d67..6ec02f7f 100644 --- a/syntax/sql.vim +++ b/syntax/sql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1 " Vim syntax file loader " Language: SQL @@ -43,5 +38,3 @@ endif exec 'runtime syntax/'.filename.'.vim' " vim:sw=4: - -endif diff --git a/syntax/sqlj.vim b/syntax/sqlj.vim index f2623dc4..bf3c0b74 100644 --- a/syntax/sqlj.vim +++ b/syntax/sqlj.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sqlj.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sqlj', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sqlj') == -1 " Vim syntax file " Language: sqlj @@ -98,5 +93,3 @@ hi def link sqljPre PreProc let b:current_syntax = "sqlj" - -endif diff --git a/syntax/sqloracle.vim b/syntax/sqloracle.vim index 7eacd6e6..f1fd838f 100644 --- a/syntax/sqloracle.vim +++ b/syntax/sqloracle.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sqloracle.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1 " Vim syntax file " Language: SQL, PL/SQL (Oracle 11g) @@ -157,5 +152,3 @@ hi def link sqlTodo Todo let b:current_syntax = "sql" " vim: ts=8 - -endif diff --git a/syntax/sqr.vim b/syntax/sqr.vim index 4524dea4..2ac1dbfb 100644 --- a/syntax/sqr.vim +++ b/syntax/sqr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sqr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sqr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sqr') == -1 " Vim syntax file " Language: Structured Query Report Writer (SQR) @@ -269,5 +264,3 @@ hi def link sqrError Error let b:current_syntax = "sqr" " vim: ts=8 sw=2 - -endif diff --git a/syntax/squid.vim b/syntax/squid.vim index d9c62015..f95957ba 100644 --- a/syntax/squid.vim +++ b/syntax/squid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/squid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('squid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'squid') == -1 " Vim syntax file " Language: Squid config file @@ -147,5 +142,3 @@ hi def link squidRegexOpt Special let b:current_syntax = "squid" " vim: ts=8 - -endif diff --git a/syntax/srec.vim b/syntax/srec.vim index 9c2b4ce3..20e2604d 100644 --- a/syntax/srec.vim +++ b/syntax/srec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/srec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('srec', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'srec') == -1 " Vim syntax file " Language: Motorola S-Record @@ -90,5 +85,3 @@ hi def link srecChecksum DiffChange let b:current_syntax = "srec" " vim: ts=8 - -endif diff --git a/syntax/sshconfig.vim b/syntax/sshconfig.vim index 5b6346f3..bebb7bb6 100644 --- a/syntax/sshconfig.vim +++ b/syntax/sshconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sshconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sshconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sshconfig') == -1 " Vim syntax file " Language: OpenSSH client configuration file (ssh_config) @@ -284,5 +279,3 @@ hi def link sshconfigDeprecated Error let b:current_syntax = "sshconfig" " vim:set ts=8 sw=2 sts=2: - -endif diff --git a/syntax/sshdconfig.vim b/syntax/sshdconfig.vim index 1c6b6db5..ef25dab0 100644 --- a/syntax/sshdconfig.vim +++ b/syntax/sshdconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sshdconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sshdconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sshdconfig') == -1 " Vim syntax file " Language: OpenSSH server configuration file (sshd_config) @@ -289,5 +284,3 @@ hi def link sshdconfigMatch Type let b:current_syntax = "sshdconfig" " vim:set ts=8 sw=2 sts=2: - -endif diff --git a/syntax/st.vim b/syntax/st.vim index 1b46c7b6..865af7d4 100644 --- a/syntax/st.vim +++ b/syntax/st.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/st.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('st', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'st') == -1 " Vim syntax file " Language: Smalltalk @@ -102,5 +97,3 @@ let b:current_syntax = "st" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/stata.vim b/syntax/stata.vim index be04f59c..27c7afcd 100644 --- a/syntax/stata.vim +++ b/syntax/stata.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/stata.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stata', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stata') == -1 " stata.vim -- Vim syntax file for Stata do, ado, and class files. " Language: Stata and/or Mata @@ -457,5 +452,3 @@ hi def link stataString String let b:current_syntax = "stata" " vim: ts=8 - -endif diff --git a/syntax/stp.vim b/syntax/stp.vim index bab05d2d..f43740b9 100644 --- a/syntax/stp.vim +++ b/syntax/stp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/stp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stp') == -1 " Vim syntax file " Language: Stored Procedures (STP) @@ -161,5 +156,3 @@ hi def link stpRepeat Repeat let b:current_syntax = "stp" " vim ts=8 sw=2 - -endif diff --git a/syntax/stylus.vim b/syntax/stylus.vim index a77c9fa1..bf826921 100644 --- a/syntax/stylus.vim +++ b/syntax/stylus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/stylus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stylus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stylus') == -1 " Vim syntax file " Language: CSS3 @@ -383,5 +378,3 @@ hi def link stylusIdChar Special let b:current_syntax = "stylus" " vim:set sw=2: - -endif diff --git a/syntax/sudoers.vim b/syntax/sudoers.vim index aa16986f..053dc1f9 100644 --- a/syntax/sudoers.vim +++ b/syntax/sudoers.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sudoers.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sudoers', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sudoers') == -1 " Vim syntax file " Language: sudoers(5) configuration files @@ -396,5 +391,3 @@ let b:current_syntax = "sudoers" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/svelte.vim b/syntax/svelte.vim index c452182f..d50f16c1 100644 --- a/syntax/svelte.vim +++ b/syntax/svelte.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/svelte.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svelte', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 " Vim syntax file " Language: Svelte 3 (HTML/JavaScript) @@ -127,5 +122,3 @@ let b:current_syntax = "svelte" " Sync from start because of the wacky nesting. syntax sync fromstart - -endif diff --git a/syntax/svg.vim b/syntax/svg.vim index 166e3e29..17302f79 100644 --- a/syntax/svg.vim +++ b/syntax/svg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/svg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svg') == -1 " Vim syntax file " Language: SVG @@ -152,5 +147,3 @@ if main_syntax == 'svg' endif " vim: ts=8 - -endif diff --git a/syntax/svn.vim b/syntax/svn.vim index 33340ea9..29c3b99e 100644 --- a/syntax/svn.vim +++ b/syntax/svn.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/svn.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svn', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svn') == -1 " Vim syntax file " Language: Subversion (svn) commit file @@ -63,5 +58,3 @@ hi def link svnRenamed Special let b:current_syntax = "svn" - -endif diff --git a/syntax/swift.vim b/syntax/swift.vim index b4207bb0..b4fa59e9 100644 --- a/syntax/swift.vim +++ b/syntax/swift.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 " File: swift.vim " Author: Keith Smiley @@ -312,5 +307,3 @@ highlight default link swiftLineDirective PreProc syn sync minlines=100 let b:current_syntax = "swift" - -endif diff --git a/syntax/swiftgyb.vim b/syntax/swiftgyb.vim index 39cad20d..f647c676 100644 --- a/syntax/swiftgyb.vim +++ b/syntax/swiftgyb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/swiftgyb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swiftgyb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swiftgyb') == -1 " This source file is part of the Swift.org open source project " @@ -31,5 +26,3 @@ hi def link gybPythonCode CursorLineNr let b:current_syntax = "swiftgyb" - -endif diff --git a/syntax/sxhkdrc.vim b/syntax/sxhkdrc.vim index cabfe498..f0c28fad 100644 --- a/syntax/sxhkdrc.vim +++ b/syntax/sxhkdrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sxhkdrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sxhkd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sxhkd') == -1 if exists("b:current_syntax") finish @@ -33,5 +28,3 @@ hi def link sxHotkeySep Delimiter hi def link sxSequenceSep Delimiter let b:current_syntax = "sxhkdrc" - -endif diff --git a/syntax/sysctl.vim b/syntax/sysctl.vim index 6e611f06..cd2e288a 100644 --- a/syntax/sysctl.vim +++ b/syntax/sysctl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/sysctl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sysctl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sysctl') == -1 " Vim syntax file " Language: sysctl.conf(5) configuration file @@ -46,5 +41,3 @@ let b:current_syntax = "sysctl" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/systemd.vim b/syntax/systemd.vim index eccf6c8f..035580e3 100644 --- a/syntax/systemd.vim +++ b/syntax/systemd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/systemd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1 " Filename: systemd.vim " Purpose: Vim syntax file @@ -391,5 +386,3 @@ hi def link sdCapFlags Identifier let b:current_syntax = "systemd" " vim: fdm=marker - -endif diff --git a/syntax/systemverilog.vim b/syntax/systemverilog.vim index dc27e532..8e79ae47 100644 --- a/syntax/systemverilog.vim +++ b/syntax/systemverilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/systemverilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemverilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemverilog') == -1 " Vim syntax file " Language: SystemVerilog @@ -92,5 +87,3 @@ hi def link systemverilogNumber Number let b:current_syntax = "systemverilog" " vim: ts=8 - -endif diff --git a/syntax/tablegen.vim b/syntax/tablegen.vim index 4cd21e32..6fda1acf 100644 --- a/syntax/tablegen.vim +++ b/syntax/tablegen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tablegen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim syntax file " Language: TableGen @@ -61,5 +56,3 @@ if version >= 508 || !exists("did_c_syn_inits") endif let b:current_syntax = "tablegen" - -endif diff --git a/syntax/tads.vim b/syntax/tads.vim index c38d4b57..68e35de8 100644 --- a/syntax/tads.vim +++ b/syntax/tads.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tads.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tads', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tads') == -1 " Vim syntax file " Language: TADS @@ -178,5 +173,3 @@ let b:current_syntax = "tads" " 10/22/99 Misspelled Moolenaar (sorry!), c_minlines to tads_minlines " " vim: ts=8 - -endif diff --git a/syntax/tags.vim b/syntax/tags.vim index eb121a78..e609bc4b 100644 --- a/syntax/tags.vim +++ b/syntax/tags.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tags', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tags') == -1 " Language: tags " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> @@ -38,5 +33,3 @@ if !exists("skip_drchip_tags_inits") endif let b:current_syntax = "tags" - -endif diff --git a/syntax/tak.vim b/syntax/tak.vim index 00b76ccb..1c1d259b 100644 --- a/syntax/tak.vim +++ b/syntax/tak.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tak.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tak', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tak') == -1 " Vim syntax file " Language: TAK2, TAK3, TAK2000 thermal modeling input file @@ -126,5 +121,3 @@ hi def link takTodo Todo let b:current_syntax = "tak" " vim: ts=8 sw=2 - -endif diff --git a/syntax/tap.vim b/syntax/tap.vim index d38b960b..404b4370 100644 --- a/syntax/tap.vim +++ b/syntax/tap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim syntax file " Language: Verbose TAP Output @@ -104,5 +99,3 @@ if !exists("did_tapverboseoutput_syntax_inits") endif let b:current_syntax="tapVerboseOutput" - -endif diff --git a/syntax/taskdata.vim b/syntax/taskdata.vim index ca3165f9..30a0e013 100644 --- a/syntax/taskdata.vim +++ b/syntax/taskdata.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/taskdata.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('taskdata', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'taskdata') == -1 " Vim syntax file " Language: task data @@ -52,5 +47,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:noexpandtab - -endif diff --git a/syntax/taskedit.vim b/syntax/taskedit.vim index 736805f6..54746438 100644 --- a/syntax/taskedit.vim +++ b/syntax/taskedit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/taskedit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('taskedit', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'taskedit') == -1 " Vim syntax file " Language: support for 'task 42 edit' @@ -44,5 +39,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:noexpandtab - -endif diff --git a/syntax/tcl.vim b/syntax/tcl.vim index 76bd5eb8..2066a1f9 100644 --- a/syntax/tcl.vim +++ b/syntax/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim syntax file " Language: Tcl/Tk @@ -281,5 +276,3 @@ hi def link tclVarRef Identifier let b:current_syntax = "tcl" " vim: ts=8 noet nolist - -endif diff --git a/syntax/template.vim b/syntax/template.vim index 477c8e04..02c7fd7d 100644 --- a/syntax/template.vim +++ b/syntax/template.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/template.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('template', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'template') == -1 " Vim syntax file " Language: Generic template @@ -22,5 +17,3 @@ endif " If you know how to recognize a more specific type for *.tmpl suggest a " change to runtime/scripts.vim. runtime! syntax/html.vim - -endif diff --git a/syntax/teraterm.vim b/syntax/teraterm.vim index 44d66ef6..195e933e 100644 --- a/syntax/teraterm.vim +++ b/syntax/teraterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/teraterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('teraterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'teraterm') == -1 " Vim syntax file " Language: Tera Term Language (TTL) @@ -147,5 +142,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim: ts=8 sw=2 sts=2 - -endif diff --git a/syntax/terminfo.vim b/syntax/terminfo.vim index 1933c734..fe90c4b0 100644 --- a/syntax/terminfo.vim +++ b/syntax/terminfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/terminfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terminfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terminfo') == -1 " Vim syntax file " Language: terminfo(5) definition @@ -100,5 +95,3 @@ let b:current_syntax = "terminfo" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/terraform.vim b/syntax/terraform.vim index e071ce8d..2c533caa 100644 --- a/syntax/terraform.vim +++ b/syntax/terraform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/terraform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terraform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 " Forked from Larry Gilbert's syntax file " github.com/L2G/vim-syntax-terraform @@ -78,5 +73,3 @@ let b:current_syntax = 'terraform' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/tex.vim b/syntax/tex.vim index 45d763cb..a1ecf32f 100644 --- a/syntax/tex.vim +++ b/syntax/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " Vim syntax file " Language: TeX @@ -1347,5 +1342,3 @@ let b:current_syntax = "tex" let &cpo = s:keepcpo unlet s:keepcpo " vim: ts=8 fdm=marker - -endif diff --git a/syntax/texinfo.vim b/syntax/texinfo.vim index f76c9b60..d863d6fe 100644 --- a/syntax/texinfo.vim +++ b/syntax/texinfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/texinfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('texinfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'texinfo') == -1 " Vim syntax file " Language: Texinfo (macro package for TeX) @@ -403,5 +398,3 @@ if main_syntax == 'texinfo' endif " vim: ts=8 - -endif diff --git a/syntax/texmf.vim b/syntax/texmf.vim index ae1cbe36..48445470 100644 --- a/syntax/texmf.vim +++ b/syntax/texmf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/texmf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('texmf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'texmf') == -1 " Vim syntax file " This is a GENERATED FILE. Please always refer to source file at the URI below. @@ -81,5 +76,3 @@ hi def link texmfError Error let b:current_syntax = "texmf" - -endif diff --git a/syntax/textile.vim b/syntax/textile.vim index 65a1953b..6c056026 100644 --- a/syntax/textile.vim +++ b/syntax/textile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/textile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('textile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'textile') == -1 " " You will have to restart vim for this to take effect. In any case @@ -98,5 +93,3 @@ if version >= 508 || !exists("did_txt_syn_inits") endif " vim: set ai et sw=4 : - -endif diff --git a/syntax/tf.vim b/syntax/tf.vim index b12663cb..d69fdf6d 100644 --- a/syntax/tf.vim +++ b/syntax/tf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tf') == -1 " Vim syntax file " Language: tf @@ -203,5 +198,3 @@ if main_syntax == 'tf' endif " vim: ts=8 - -endif diff --git a/syntax/thrift.vim b/syntax/thrift.vim index da97a715..c842878f 100644 --- a/syntax/thrift.vim +++ b/syntax/thrift.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/thrift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('thrift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'thrift') == -1 " Vim syntax file " Language: Thrift @@ -104,5 +99,3 @@ endif let b:current_syntax = "thrift" - -endif diff --git a/syntax/tidy.vim b/syntax/tidy.vim index 4ba65155..a10aeb94 100644 --- a/syntax/tidy.vim +++ b/syntax/tidy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tidy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tidy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tidy') == -1 " Vim syntax file " Language: HMTL Tidy configuration file (/etc/tidyrc ~/.tidyrc) @@ -142,5 +137,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/tilde.vim b/syntax/tilde.vim index 11012e95..8a25493b 100644 --- a/syntax/tilde.vim +++ b/syntax/tilde.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tilde.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tilde', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1 " Vim syntax file " This file works only for Vim6.x @@ -48,5 +43,3 @@ hi def link tildeSymtab Identifier hi def link tildeError Error let b:current_syntax = "tilde" - -endif diff --git a/syntax/tli.vim b/syntax/tli.vim index c177878a..e5ce202d 100644 --- a/syntax/tli.vim +++ b/syntax/tli.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tli.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tli', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tli') == -1 " Vim syntax file " Language: TealInfo source files (*.tli) @@ -65,5 +60,3 @@ hi def link tliStyle PreProc let b:current_syntax = "tli" " vim: ts=8 - -endif diff --git a/syntax/tmux.vim b/syntax/tmux.vim index 9d72c5f7..fbd7099d 100644 --- a/syntax/tmux.vim +++ b/syntax/tmux.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tmux.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tmux', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1 " Language: tmux(1) configuration file " Version: 3.1b (git-769ae106) @@ -126,5 +121,3 @@ syn keyword tmuxCommands let &cpo = s:original_cpo unlet! s:original_cpo s:bg s:i - -endif diff --git a/syntax/toml.vim b/syntax/toml.vim index 49d1141a..5428296f 100644 --- a/syntax/toml.vim +++ b/syntax/toml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/toml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('toml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'toml') == -1 " Language: TOML " Maintainer: Caleb Spare <cespare@gmail.com> @@ -83,5 +78,3 @@ hi def link tomlComment Comment syn sync minlines=500 let b:current_syntax = 'toml' - -endif diff --git a/syntax/tpp.vim b/syntax/tpp.vim index c728e23d..f0dc9902 100644 --- a/syntax/tpp.vim +++ b/syntax/tpp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tpp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tpp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tpp') == -1 " Vim syntax file " Language: tpp - Text Presentation Program @@ -90,5 +85,3 @@ hi def link tppTimeOption Error let b:current_syntax = 'tpp' " vim: ts=8 sw=2 - -endif diff --git a/syntax/tptp.vim b/syntax/tptp.vim index 81164ff5..089c37df 100644 --- a/syntax/tptp.vim +++ b/syntax/tptp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tptp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tptp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tptp') == -1 " Vim syntax file " Language: TPTP @@ -155,5 +150,3 @@ end let b:current_syntax = "tptp" " vim: ts=8 sw=8 - -endif diff --git a/syntax/trasys.vim b/syntax/trasys.vim index 23ce0587..ae48e83b 100644 --- a/syntax/trasys.vim +++ b/syntax/trasys.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/trasys.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('trasys', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'trasys') == -1 " Vim syntax file " Language: TRASYS input file @@ -167,5 +162,3 @@ hi def link trasysTodo Todo let b:current_syntax = "trasys" " vim: ts=8 sw=2 - -endif diff --git a/syntax/treetop.vim b/syntax/treetop.vim index b7dea563..aceec282 100644 --- a/syntax/treetop.vim +++ b/syntax/treetop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/treetop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('treetop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'treetop') == -1 " Vim syntax file " Language: Treetop @@ -117,5 +112,3 @@ let b:current_syntax = 'treetop' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/trustees.vim b/syntax/trustees.vim index f7514282..1e4826b1 100644 --- a/syntax/trustees.vim +++ b/syntax/trustees.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/trustees.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('trustees', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'trustees') == -1 " Vim syntax file " Language: trustees @@ -49,5 +44,3 @@ syntax match tfsRuleWho ~\(\*\|[+]\{0,1\}[a-zA-Z0-9/]\+\)~ contained contains=tf highlight link tfsRuleWho Identifier syntax match tfsRuleWhat ~[RWEBXODCU!]\+~ contained contains=tfsSpecialChar highlight link tfsRuleWhat Structure - -endif diff --git a/syntax/tsalt.vim b/syntax/tsalt.vim index b7fed635..62a0cc3b 100644 --- a/syntax/tsalt.vim +++ b/syntax/tsalt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tsalt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tsalt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tsalt') == -1 " Vim syntax file " Language: Telix (Modem Comm Program) SALT Script @@ -213,5 +208,3 @@ let b:current_syntax = "tsalt" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/tsscl.vim b/syntax/tsscl.vim index 33079116..37a166dc 100644 --- a/syntax/tsscl.vim +++ b/syntax/tsscl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tsscl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tsscl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tsscl') == -1 " Vim syntax file " Language: TSS (Thermal Synthesizer System) Command Line @@ -211,5 +206,3 @@ hi def link tssclScientific Number let b:current_syntax = "tsscl" " vim: ts=8 sw=2 - -endif diff --git a/syntax/tssgm.vim b/syntax/tssgm.vim index 69b10921..1d11bfdc 100644 --- a/syntax/tssgm.vim +++ b/syntax/tssgm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tssgm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tssgm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tssgm') == -1 " Vim syntax file " Language: TSS (Thermal Synthesizer System) Geometry @@ -105,5 +100,3 @@ hi def link tssgmScientific Float let b:current_syntax = "tssgm" " vim: ts=8 sw=2 - -endif diff --git a/syntax/tssop.vim b/syntax/tssop.vim index 771c4181..7ad29244 100644 --- a/syntax/tssop.vim +++ b/syntax/tssop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tssop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tssop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tssop') == -1 " Vim syntax file " Language: TSS (Thermal Synthesizer System) Optics @@ -81,5 +76,3 @@ hi def link tssopScientific Float let b:current_syntax = "tssop" " vim: ts=8 sw=2 - -endif diff --git a/syntax/tt2.vim b/syntax/tt2.vim index 5806a989..c5a0dcda 100644 --- a/syntax/tt2.vim +++ b/syntax/tt2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tt2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Language: TT2 (Perl Template Toolkit) " Maintainer: vim-perl <vim-perl@googlegroups.com> @@ -217,5 +212,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=4:sw=4 - -endif diff --git a/syntax/tt2html.vim b/syntax/tt2html.vim index bc614e00..28c2478e 100644 --- a/syntax/tt2html.vim +++ b/syntax/tt2html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tt2html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Language: TT2 embedded with HTML " Maintainer: vim-perl <vim-perl@googlegroups.com> @@ -27,5 +22,3 @@ unlet b:current_syntax syn cluster htmlPreProc add=@tt2_top_cluster let b:current_syntax = "tt2html" - -endif diff --git a/syntax/tt2js.vim b/syntax/tt2js.vim index 43055612..d85d72d8 100644 --- a/syntax/tt2js.vim +++ b/syntax/tt2js.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/tt2js.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Language: TT2 embedded with Javascript " Maintainer: Andy Lester <andy@petdance.com> @@ -27,5 +22,3 @@ unlet b:current_syntax syn cluster javascriptPreProc add=@tt2_top_cluster let b:current_syntax = "tt2js" - -endif diff --git a/syntax/twig.vim b/syntax/twig.vim index 79768066..13b44f11 100644 --- a/syntax/twig.vim +++ b/syntax/twig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/twig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('twig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1 " Vim syntax file " Language: Twig template @@ -121,5 +116,3 @@ if version >= 508 || !exists("did_twig_syn_inits") delcommand HiLink endif - -endif diff --git a/syntax/typescript.vim b/syntax/typescript.vim index 407a7b46..e8f98a13 100644 --- a/syntax/typescript.vim +++ b/syntax/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " Vim syntax file " Language: TypeScript @@ -39,5 +34,3 @@ let b:current_syntax = "typescript" if main_syntax == 'typescript' unlet main_syntax endif - -endif diff --git a/syntax/typescriptreact.vim b/syntax/typescriptreact.vim index 1adad053..c8b2af3f 100644 --- a/syntax/typescriptreact.vim +++ b/syntax/typescriptreact.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/typescriptreact.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 if !exists("main_syntax") if exists("b:current_syntax") @@ -148,5 +143,4 @@ highlight def link tsxCloseString Identifier let b:current_syntax = "typescriptreact" if main_syntax == 'typescriptreact' unlet main_syntax -endif -endif +endif
\ No newline at end of file diff --git a/syntax/uc.vim b/syntax/uc.vim index b820435b..068553b2 100644 --- a/syntax/uc.vim +++ b/syntax/uc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/uc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('uc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'uc') == -1 " Vim syntax file " Language: UnrealScript @@ -172,5 +167,3 @@ if main_syntax == 'uc' endif " vim: ts=8 - -endif diff --git a/syntax/udevconf.vim b/syntax/udevconf.vim index 2d7a5f72..5d8b5fca 100644 --- a/syntax/udevconf.vim +++ b/syntax/udevconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/udevconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevconf') == -1 " Vim syntax file " Language: udev(8) configuration file @@ -46,5 +41,3 @@ let b:current_syntax = "udevconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/udevperm.vim b/syntax/udevperm.vim index 760d665f..1725d9f9 100644 --- a/syntax/udevperm.vim +++ b/syntax/udevperm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/udevperm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevperm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevperm') == -1 " Vim syntax file " Language: udev(8) permissions file @@ -76,5 +71,3 @@ let b:current_syntax = "udevperm" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/uil.vim b/syntax/uil.vim index cd46ea18..a6ddf8c4 100644 --- a/syntax/uil.vim +++ b/syntax/uil.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/uil.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('uil', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'uil') == -1 " Vim syntax file " Language: Motif UIL (User Interface Language) @@ -82,5 +77,3 @@ hi def link uilTodo Todo let b:current_syntax = "uil" " vim: ts=8 - -endif diff --git a/syntax/unison.vim b/syntax/unison.vim index 90ca9c49..f069b99b 100644 --- a/syntax/unison.vim +++ b/syntax/unison.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/unison.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('unison', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'unison') == -1 " Vim syntax file, adapted from Haskell file by John Williams <jrw@pobox.com> " @@ -161,5 +156,3 @@ endif let b:current_syntax = "unison" " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim - -endif diff --git a/syntax/updatedb.vim b/syntax/updatedb.vim index b1a66d07..02233978 100644 --- a/syntax/updatedb.vim +++ b/syntax/updatedb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/updatedb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('updatedb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'updatedb') == -1 " Vim syntax file " Language: updatedb.conf(5) configuration file @@ -48,5 +43,3 @@ let b:current_syntax = "updatedb" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/upstart.vim b/syntax/upstart.vim index 66f233e3..4df94c19 100644 --- a/syntax/upstart.vim +++ b/syntax/upstart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/upstart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('upstart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'upstart') == -1 " Vim syntax file " Language: Upstart job files @@ -118,5 +113,3 @@ hi def link upstartOption Type hi def link upstartEvent Define let b:current_syntax = "upstart" - -endif diff --git a/syntax/upstreamdat.vim b/syntax/upstreamdat.vim index e05a0f8b..2239f33d 100644 --- a/syntax/upstreamdat.vim +++ b/syntax/upstreamdat.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/upstreamdat.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('upstreamdat', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'upstreamdat') == -1 " Vim syntax file " Language: Innovation Data Processing upstream.dat file @@ -312,5 +307,3 @@ hi def link upstreamdat_Parameter Type hi def link upstreamdat_Comment Comment let b:current_syntax = "upstreamdat" - -endif diff --git a/syntax/upstreaminstalllog.vim b/syntax/upstreaminstalllog.vim index 3e75d109..b6703103 100644 --- a/syntax/upstreaminstalllog.vim +++ b/syntax/upstreaminstalllog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/upstreaminstalllog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('upstreaminstalllog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'upstreaminstalllog') == -1 " Vim syntax file " Language: Innovation Data Processing UPSTREAMInstall.log file @@ -34,5 +29,3 @@ hi def link upstreaminstalllog_MsgW Constant hi def link upstreaminstalllog_IPaddr Identifier let b:current_syntax = "upstreaminstalllog" - -endif diff --git a/syntax/upstreamlog.vim b/syntax/upstreamlog.vim index b442718b..8a885654 100644 --- a/syntax/upstreamlog.vim +++ b/syntax/upstreamlog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/upstreamlog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('upstreamlog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'upstreamlog') == -1 " Vim syntax file " Language: Innovation Data Processing upstream.log file @@ -61,5 +56,3 @@ hi def link upstreamlog_Profile Identifier hi def link upstreamlog_Target Identifier let b:current_syntax = "upstreamlog" - -endif diff --git a/syntax/usserverlog.vim b/syntax/usserverlog.vim index c651909e..61b6a56a 100644 --- a/syntax/usserverlog.vim +++ b/syntax/usserverlog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/usserverlog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('usserverlog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'usserverlog') == -1 " Vim syntax file " Language: Innovation Data Processing usserver.log file @@ -67,5 +62,3 @@ hi def link usserverlog_Profile Identifier hi def link usserverlog_Target Identifier let b:current_syntax = "usserverlog" - -endif diff --git a/syntax/usw2kagtlog.vim b/syntax/usw2kagtlog.vim index 2467b8d9..f748b037 100644 --- a/syntax/usw2kagtlog.vim +++ b/syntax/usw2kagtlog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/usw2kagtlog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('usw2kagtlog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'usw2kagtlog') == -1 " Vim syntax file " Language: Innovation Data Processing USW2KAgt.log file @@ -61,5 +56,3 @@ hi def link usw2kagtlog_Target Identifier hi def link usw2kagtlog_Agentword Special let b:current_syntax = "usw2kagentlog" - -endif diff --git a/syntax/vala.vim b/syntax/vala.vim index c48851b3..36f035c7 100644 --- a/syntax/vala.vim +++ b/syntax/vala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1 " Vim syntax file " Language: Vala @@ -241,5 +236,3 @@ let &cpo = s:vala_cpo_save unlet s:vala_cpo_save " vim: ts=8 - -endif diff --git a/syntax/vb.vim b/syntax/vb.vim index 9269f59e..8edd7882 100644 --- a/syntax/vb.vim +++ b/syntax/vb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('visual-basic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'visual-basic') == -1 " Vim syntax file " Language: Visual Basic @@ -372,5 +367,3 @@ hi def link vbTypeSpecifier Type let b:current_syntax = "vb" " vim: ts=8 - -endif diff --git a/syntax/vbnet.vim b/syntax/vbnet.vim index 5a777649..cf94d7b5 100644 --- a/syntax/vbnet.vim +++ b/syntax/vbnet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vbnet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vbnet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vbnet') == -1 " Vim syntax file " Language: VB.NET @@ -438,5 +433,3 @@ endif let b:current_syntax = "vbnet" " vim:set ft=vim sts=4 sw=4: - -endif diff --git a/syntax/vcl.vim b/syntax/vcl.vim index 03ff7ee8..33aab04a 100644 --- a/syntax/vcl.vim +++ b/syntax/vcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vcl') == -1 " Vim syntax file " Filename: vcl.vim @@ -113,5 +108,3 @@ hi link vclModes Operator hi link vclOption Identifier hi link vclNumber Number hi link vclNumberTime Number - -endif diff --git a/syntax/velocity.vim b/syntax/velocity.vim index 65f37fd9..dffcd394 100644 --- a/syntax/velocity.vim +++ b/syntax/velocity.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/velocity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('velocity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'velocity') == -1 " Vim syntax file " Language: Velocity HTML template @@ -74,5 +69,3 @@ if version >= 508 || !exists("did_velocity_syn_inits") endif let b:current_syntax = "velocity" - -endif diff --git a/syntax/vera.vim b/syntax/vera.vim index 28ae65f3..45a07df1 100644 --- a/syntax/vera.vim +++ b/syntax/vera.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vera.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vera', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vera') == -1 " Vim syntax file " Language: Vera @@ -355,5 +350,3 @@ hi def link veraCppOut Comment let b:current_syntax = "vera" " vim: ts=8 - -endif diff --git a/syntax/verilog.vim b/syntax/verilog.vim index 92f8b68f..3898636f 100644 --- a/syntax/verilog.vim +++ b/syntax/verilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/verilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('verilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'verilog') == -1 " Vim syntax file " Language: Verilog @@ -126,5 +121,3 @@ hi def link verilogEscape Special let b:current_syntax = "verilog" " vim: ts=8 - -endif diff --git a/syntax/verilogams.vim b/syntax/verilogams.vim index dd2c5994..a77a3dcd 100644 --- a/syntax/verilogams.vim +++ b/syntax/verilogams.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/verilogams.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('verilogams', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'verilogams') == -1 " Vim syntax file " Language: Verilog-AMS @@ -139,5 +134,3 @@ hi def link verilogamsSystask Function let b:current_syntax = "verilogams" " vim: ts=8 - -endif diff --git a/syntax/vgrindefs.vim b/syntax/vgrindefs.vim index 42f72018..085f51ec 100644 --- a/syntax/vgrindefs.vim +++ b/syntax/vgrindefs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vgrindefs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vgrindefs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vgrindefs') == -1 " Vim syntax file " Language: Vgrindefs @@ -52,5 +47,3 @@ hi def link vgrindefsComment Comment let b:current_syntax = "vgrindefs" " vim: ts=8 - -endif diff --git a/syntax/vhdl.vim b/syntax/vhdl.vim index b5cbe9cd..4f4a19ec 100644 --- a/syntax/vhdl.vim +++ b/syntax/vhdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vhdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vhdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vhdl') == -1 " Vim syntax file " Language: VHDL [VHSIC (Very High Speed Integrated Circuit) Hardware Description Language] @@ -275,5 +270,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/vimgo.vim b/syntax/vimgo.vim index 5066c4cf..df82a709 100644 --- a/syntax/vimgo.vim +++ b/syntax/vimgo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vimgo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('go', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 if exists("b:current_syntax") finish @@ -20,5 +15,3 @@ hi def link goInterface Type hi def link goTitle Label " vim: sw=2 ts=2 et - -endif diff --git a/syntax/viminfo.vim b/syntax/viminfo.vim index 1c992da1..5d5c5454 100644 --- a/syntax/viminfo.vim +++ b/syntax/viminfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/viminfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('viminfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'viminfo') == -1 " Vim syntax file " Language: Vim .viminfo file @@ -55,5 +50,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/vlang.vim b/syntax/vlang.vim index b7b1ed4a..5c6e47fd 100644 --- a/syntax/vlang.vim +++ b/syntax/vlang.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('v', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1 " Vim syntax file " Language: V @@ -273,5 +268,3 @@ syn sync minlines=500 let b:current_syntax = 'vlang' " vim: sw=2 sts=2 et - -endif diff --git a/syntax/vmasm.vim b/syntax/vmasm.vim index 4c3176c3..486a3327 100644 --- a/syntax/vmasm.vim +++ b/syntax/vmasm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vmasm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vmasm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vmasm') == -1 " Vim syntax file " Language: (VAX) Macro Assembly @@ -245,5 +240,3 @@ hi def link vmasmLabel Type let b:current_syntax = "vmasm" " vim: ts=8 sw=2 - -endif diff --git a/syntax/voscm.vim b/syntax/voscm.vim index e7bd1257..dbc11b38 100644 --- a/syntax/voscm.vim +++ b/syntax/voscm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/voscm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('voscm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'voscm') == -1 " Vim syntax file " Language: VOS CM macro @@ -101,5 +96,3 @@ hi def link voscmError Error let b:current_syntax = "voscm" " vim: ts=8 - -endif diff --git a/syntax/vrml.vim b/syntax/vrml.vim index 6f73ff54..4447cf78 100644 --- a/syntax/vrml.vim +++ b/syntax/vrml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vrml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vrml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vrml') == -1 " Vim syntax file " Language: VRML97 @@ -229,5 +224,3 @@ hi def link VRMLTypes Identifier let b:current_syntax = "vrml" " vim: ts=8 - -endif diff --git a/syntax/vroom.vim b/syntax/vroom.vim index 9af1a992..ea22628c 100644 --- a/syntax/vroom.vim +++ b/syntax/vroom.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vroom.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vroom', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vroom') == -1 " Vim syntax file " Language: Vroom (vim testing and executable documentation) @@ -117,5 +112,3 @@ let b:current_syntax = 'vroom' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/vue.vim b/syntax/vue.vim index 26d6d3f4..126d9c82 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/vue.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vue', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1 " Vim syntax file " Language: Vue.js @@ -85,5 +80,3 @@ syn match htmlArg "[@v:][-:.0-9_a-z]*\>" contained syntax sync fromstart let b:current_syntax = "vue" - -endif diff --git a/syntax/wast.vim b/syntax/wast.vim index e76ad62c..ea2c6490 100644 --- a/syntax/wast.vim +++ b/syntax/wast.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wast.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wast', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wast') == -1 " Vim syntax file " Language: WebAssembly @@ -91,5 +86,3 @@ let b:current_syntax = "wast" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/webmacro.vim b/syntax/webmacro.vim index e994d5d3..0120c18a 100644 --- a/syntax/webmacro.vim +++ b/syntax/webmacro.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/webmacro.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('webmacro', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'webmacro') == -1 " WebMacro syntax file " Language: WebMacro @@ -74,5 +69,3 @@ let b:current_syntax = "webmacro" if main_syntax == 'webmacro' unlet main_syntax endif - -endif diff --git a/syntax/wget.vim b/syntax/wget.vim index 25b03c80..b5c41e92 100644 --- a/syntax/wget.vim +++ b/syntax/wget.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wget.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wget', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wget') == -1 " Vim syntax file " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc) @@ -196,5 +191,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 fdm=marker: - -endif diff --git a/syntax/winbatch.vim b/syntax/winbatch.vim index 82f717a9..5b7eff68 100644 --- a/syntax/winbatch.vim +++ b/syntax/winbatch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/winbatch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('winbatch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'winbatch') == -1 " Vim syntax file " Language: WinBatch/Webbatch (*.wbt, *.web) @@ -181,5 +176,3 @@ hi def link winbatchConstant StorageClass let b:current_syntax = "winbatch" " vim: ts=8 - -endif diff --git a/syntax/wml.vim b/syntax/wml.vim index e5c8ca50..462fefe5 100644 --- a/syntax/wml.vim +++ b/syntax/wml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wml') == -1 " Vim syntax file " Language: WML - Website MetaLanguage @@ -157,5 +152,3 @@ hi def link wmlSharpBang PreProc let b:current_syntax = "wml" - -endif diff --git a/syntax/wsh.vim b/syntax/wsh.vim index 019d9744..73243067 100644 --- a/syntax/wsh.vim +++ b/syntax/wsh.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wsh.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wsh', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wsh') == -1 " Vim syntax file " Language: Windows Scripting Host @@ -52,5 +47,3 @@ let b:current_syntax = "wsh" let &cpo = s:wsh_cpo_save unlet s:wsh_cpo_save - -endif diff --git a/syntax/wsml.vim b/syntax/wsml.vim index 7f38e798..e141292d 100644 --- a/syntax/wsml.vim +++ b/syntax/wsml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wsml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wsml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wsml') == -1 " Vim syntax file " Language: WSML @@ -120,5 +115,3 @@ hi def link wsmlCommentStar wsmlComment let b:current_syntax = "wsml" let b:spell_options="contained" - -endif diff --git a/syntax/wvdial.vim b/syntax/wvdial.vim index 71407cb4..eff51cb8 100644 --- a/syntax/wvdial.vim +++ b/syntax/wvdial.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/wvdial.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wvdial', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wvdial') == -1 " Vim syntax file " Language: Configuration file for WvDial @@ -35,5 +30,3 @@ hi def link wvdialEqual Statement let b:current_syntax = "wvdial" "EOF vim: tw=78:ft=vim:ts=8 - -endif diff --git a/syntax/xdc.vim b/syntax/xdc.vim index 8f06e618..b83415d3 100644 --- a/syntax/xdc.vim +++ b/syntax/xdc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xdc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xdc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xdc') == -1 " Vim syntax file " Language: XDC - Xilinx Design Constraints @@ -200,5 +195,3 @@ highligh default link xdcFlags Special let b:current_syntax = "xdc" " vim: fileformat=unix tabstop=2 shiftwidth=2 expandtab - -endif diff --git a/syntax/xdefaults.vim b/syntax/xdefaults.vim index a37e9a96..7bfedc24 100644 --- a/syntax/xdefaults.vim +++ b/syntax/xdefaults.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xdefaults.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xdefaults', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xdefaults') == -1 " Vim syntax file " Language: X resources files like ~/.Xdefaults (xrdb) @@ -139,5 +134,3 @@ hi def link xdefaultsTodo Todo let b:current_syntax = "xdefaults" " vim:ts=8 - -endif diff --git a/syntax/xf86conf.vim b/syntax/xf86conf.vim index 168962a9..7f3e3847 100644 --- a/syntax/xf86conf.vim +++ b/syntax/xf86conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xf86conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xf86conf', expand('<sfile>:p')) finish endif -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. @@ -212,5 +207,3 @@ hi def link xf86confString String hi def link xf86confValue Constant let b:current_syntax = "xf86conf" - -endif diff --git a/syntax/xhtml.vim b/syntax/xhtml.vim index eceec40e..72fc71df 100644 --- a/syntax/xhtml.vim +++ b/syntax/xhtml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xhtml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xhtml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xhtml') == -1 " Vim syntax file " Language: XHTML @@ -18,5 +13,3 @@ runtime! syntax/html.vim let b:current_syntax = "xhtml" " vim: ts=8 - -endif diff --git a/syntax/xinetd.vim b/syntax/xinetd.vim index 509f69eb..eb5a7127 100644 --- a/syntax/xinetd.vim +++ b/syntax/xinetd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xinetd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xinetd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xinetd') == -1 " Vim syntax file " Language: xinetd.conf(5) configuration file @@ -354,5 +349,3 @@ let b:current_syntax = "xinetd" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/xmath.vim b/syntax/xmath.vim index 24c59aa6..e4a55d26 100644 --- a/syntax/xmath.vim +++ b/syntax/xmath.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xmath.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xmath', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xmath') == -1 " Vim syntax file " Language: xmath (a simulation tool) @@ -232,5 +227,3 @@ endif let b:current_syntax = "xmath" " vim: ts=17 - -endif diff --git a/syntax/xml.vim b/syntax/xml.vim index 8491c7d7..e1244bfb 100644 --- a/syntax/xml.vim +++ b/syntax/xml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xml') == -1 " Vim syntax file " Language: XML @@ -355,5 +350,3 @@ let &cpo = s:xml_cpo_save unlet s:xml_cpo_save " vim: ts=8 - -endif diff --git a/syntax/xmodmap.vim b/syntax/xmodmap.vim index b63ab37e..81c42c5d 100644 --- a/syntax/xmodmap.vim +++ b/syntax/xmodmap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xmodmap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xmodmap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xmodmap') == -1 " Vim syntax file " Language: xmodmap(1) definition file @@ -684,5 +679,3 @@ let b:current_syntax = "xmodmap" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/xpm.vim b/syntax/xpm.vim index e3f38b30..d1a93f22 100644 --- a/syntax/xpm.vim +++ b/syntax/xpm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xpm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xpm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xpm') == -1 " Vim syntax file " Language: X Pixmap @@ -145,5 +140,3 @@ hi def link xpmPixelString String let b:current_syntax = "xpm" " vim: ts=8:sw=3:noet: - -endif diff --git a/syntax/xpm2.vim b/syntax/xpm2.vim index d31a248f..48ec5b56 100644 --- a/syntax/xpm2.vim +++ b/syntax/xpm2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xpm2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xpm2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xpm2') == -1 " Vim syntax file " Language: X Pixmap v2 @@ -160,5 +155,3 @@ let b:current_syntax = "xpm2" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8:sw=2:noet: - -endif diff --git a/syntax/xquery.vim b/syntax/xquery.vim index 607ea552..58039696 100644 --- a/syntax/xquery.vim +++ b/syntax/xquery.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xquery.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xquery', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xquery') == -1 " Vim syntax file " Language: XQuery @@ -89,5 +84,3 @@ hi def link xqExist Operator "hi link xmlEndTag Structure let b:current_syntax = "xquery" - -endif diff --git a/syntax/xs.vim b/syntax/xs.vim index cfeb65ca..9b7b2717 100644 --- a/syntax/xs.vim +++ b/syntax/xs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim syntax file " Language: XS (Perl extension interface language) @@ -3684,5 +3679,3 @@ hi def link xsMacro Macro let b:current_syntax = "xs" " vim: ts=8 - -endif diff --git a/syntax/xsd.vim b/syntax/xsd.vim index 2ffc9cb9..8f3a47cb 100644 --- a/syntax/xsd.vim +++ b/syntax/xsd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xsd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsd') == -1 " Vim syntax file " Language: XSD (XML Schema) @@ -68,5 +63,3 @@ syn match xsdElement '\%(xsd:\)\@<=unique' hi def link xsdElement Statement " vim: ts=8 - -endif diff --git a/syntax/xsl.vim b/syntax/xsl.vim index 23a1499b..8ca73411 100644 --- a/syntax/xsl.vim +++ b/syntax/xsl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xsl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsl') == -1 " Vim syntax file " Language: XSLT 1.0 @@ -544,5 +539,3 @@ let b:current_syntax = "xsl" "unlet s:xml_cpo_save " vim: ts=4:sw=4 - -endif diff --git a/syntax/xslt.vim b/syntax/xslt.vim index e5976009..ad0f37bb 100644 --- a/syntax/xslt.vim +++ b/syntax/xslt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/xslt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xslt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xslt') == -1 " Vim syntax file " Language: XSLT @@ -78,5 +73,3 @@ syn match xslElement '\%(xsl:\)\@<=with-param' hi def link xslElement Statement " vim: ts=8 - -endif diff --git a/syntax/yacc.vim b/syntax/yacc.vim index 70c63a4b..3dd9742a 100644 --- a/syntax/yacc.vim +++ b/syntax/yacc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yacc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yacc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yacc') == -1 " Vim syntax file " Language: Yacc @@ -127,5 +122,3 @@ let b:current_syntax = "yacc" " --------------------------------------------------------------------- " Modelines: {{{1 " vim: ts=15 fdm=marker - -endif diff --git a/syntax/yaml.vim b/syntax/yaml.vim index d40cdfca..8b82460c 100644 --- a/syntax/yaml.vim +++ b/syntax/yaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 " Vim syntax file " Language: YAML (YAML Ain't Markup Language) 1.2 @@ -250,5 +245,3 @@ delfunction s:SimplifyToAssumeAllPrintable let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/yats.vim b/syntax/yats.vim index 4475692f..f790a3fb 100644 --- a/syntax/yats.vim +++ b/syntax/yats.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 runtime syntax/yats/typescript.vim runtime syntax/yats/es6-number.vim @@ -53,5 +48,3 @@ runtime syntax/yats/css.vim let typescript_props = 1 runtime syntax/yats/event.vim - -endif diff --git a/syntax/yats/css.vim b/syntax/yats/css.vim index 043fe1ba..af9baf69 100644 --- a/syntax/yats/css.vim +++ b/syntax/yats/css.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/css.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMStyle contained alignContent alignItems alignSelf animation syntax keyword typescriptDOMStyle contained animationDelay animationDirection animationDuration @@ -78,5 +73,3 @@ syntax keyword typescriptDOMStyle contained whiteSpace width willChange wordBrea syntax keyword typescriptDOMStyle contained wordSpacing wordWrap writingMode zIndex if exists("did_typescript_hilink") | HiLink typescriptDOMStyle Keyword endif - -endif diff --git a/syntax/yats/dom-document.vim b/syntax/yats/dom-document.vim index 2063c522..0c506288 100644 --- a/syntax/yats/dom-document.vim +++ b/syntax/yats/dom-document.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-document.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMDocProp contained activeElement body cookie defaultView syntax keyword typescriptDOMDocProp contained designMode dir domain embeds forms head @@ -39,5 +34,3 @@ syntax keyword typescriptDOMDocMethod contained querySelectorAll write writeln n syntax cluster props add=typescriptDOMDocMethod if exists("did_typescript_hilink") | HiLink typescriptDOMDocMethod Keyword endif - -endif diff --git a/syntax/yats/dom-elem.vim b/syntax/yats/dom-elem.vim index 23317a8a..438d0fd5 100644 --- a/syntax/yats/dom-elem.vim +++ b/syntax/yats/dom-elem.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-elem.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMElemAttrs contained accessKey clientHeight clientLeft syntax keyword typescriptDOMElemAttrs contained clientTop clientWidth id innerHTML @@ -30,5 +25,3 @@ syntax keyword typescriptDOMElemFuncs contained setAttributeNodeNS setCapture su syntax keyword typescriptDOMElemFuncs contained getAttribute if exists("did_typescript_hilink") | HiLink typescriptDOMElemFuncs Keyword endif - -endif diff --git a/syntax/yats/dom-event.vim b/syntax/yats/dom-event.vim index be08f14a..15a9a79d 100644 --- a/syntax/yats/dom-event.vim +++ b/syntax/yats/dom-event.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-event.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMEventTargetMethod contained addEventListener removeEventListener nextgroup=typescriptEventFuncCallArg syntax keyword typescriptDOMEventTargetMethod contained dispatchEvent waitUntil nextgroup=typescriptEventFuncCallArg @@ -70,5 +65,3 @@ syntax keyword typescriptDOMEventMethod contained stopPropagation respondWith de syntax cluster props add=typescriptDOMEventMethod if exists("did_typescript_hilink") | HiLink typescriptDOMEventMethod Keyword endif - -endif diff --git a/syntax/yats/dom-form.vim b/syntax/yats/dom-form.vim index 8982bdfe..5ff6e88f 100644 --- a/syntax/yats/dom-form.vim +++ b/syntax/yats/dom-form.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-form.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMFormProp contained acceptCharset action elements encoding syntax keyword typescriptDOMFormProp contained enctype length method name target @@ -16,5 +11,3 @@ syntax keyword typescriptDOMFormMethod contained reportValidity reset submit nex syntax cluster props add=typescriptDOMFormMethod if exists("did_typescript_hilink") | HiLink typescriptDOMFormMethod Keyword endif - -endif diff --git a/syntax/yats/dom-node.vim b/syntax/yats/dom-node.vim index 1367fa6b..c6cd3283 100644 --- a/syntax/yats/dom-node.vim +++ b/syntax/yats/dom-node.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-node.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMNodeProp contained attributes baseURI baseURIObject childNodes syntax keyword typescriptDOMNodeProp contained firstChild lastChild localName namespaceURI @@ -32,5 +27,3 @@ syntax keyword typescriptDOMNodeType contained COMMENT_NODE DOCUMENT_NODE DOCUME syntax keyword typescriptDOMNodeType contained DOCUMENT_FRAGMENT_NODE NOTATION_NODE if exists("did_typescript_hilink") | HiLink typescriptDOMNodeType Keyword endif - -endif diff --git a/syntax/yats/dom-storage.vim b/syntax/yats/dom-storage.vim index 198df139..19719e5a 100644 --- a/syntax/yats/dom-storage.vim +++ b/syntax/yats/dom-storage.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/dom-storage.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptDOMStorage contained sessionStorage localStorage if exists("did_typescript_hilink") | HiLink typescriptDOMStorage Keyword @@ -19,5 +14,3 @@ syntax keyword typescriptDOMStorageMethod contained clear nextgroup=typescriptFu syntax cluster props add=typescriptDOMStorageMethod if exists("did_typescript_hilink") | HiLink typescriptDOMStorageMethod Keyword endif - -endif diff --git a/syntax/yats/ecma-402.vim b/syntax/yats/ecma-402.vim index d7d15ed6..fca87fdf 100644 --- a/syntax/yats/ecma-402.vim +++ b/syntax/yats/ecma-402.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/ecma-402.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Intl syntax keyword typescriptIntlMethod contained Collator DateTimeFormat NumberFormat nextgroup=typescriptFuncCallArg @@ -13,5 +8,3 @@ syntax keyword typescriptIntlMethod contained PluralRules nextgroup=typescriptFu syntax cluster props add=typescriptIntlMethod if exists("did_typescript_hilink") | HiLink typescriptIntlMethod Keyword endif - -endif diff --git a/syntax/yats/es6-array.vim b/syntax/yats/es6-array.vim index 7b91b44a..9ea46a11 100644 --- a/syntax/yats/es6-array.vim +++ b/syntax/yats/es6-array.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-array.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Array nextgroup=typescriptGlobalArrayDot,typescriptFuncCallArg syntax match typescriptGlobalArrayDot /\./ contained nextgroup=typescriptArrayStaticMethod,typescriptProp @@ -21,5 +16,3 @@ syntax keyword typescriptArrayMethod contained toSource toString unshift nextgro syntax cluster props add=typescriptArrayMethod if exists("did_typescript_hilink") | HiLink typescriptArrayMethod Keyword endif - -endif diff --git a/syntax/yats/es6-date.vim b/syntax/yats/es6-date.vim index 706d82ef..25403828 100644 --- a/syntax/yats/es6-date.vim +++ b/syntax/yats/es6-date.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-date.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Date nextgroup=typescriptGlobalDateDot,typescriptFuncCallArg syntax match typescriptGlobalDateDot /\./ contained nextgroup=typescriptDateStaticMethod,typescriptProp @@ -29,5 +24,3 @@ syntax keyword typescriptDateMethod contained valueOf nextgroup=typescriptFuncCa syntax cluster props add=typescriptDateMethod if exists("did_typescript_hilink") | HiLink typescriptDateMethod Keyword endif - -endif diff --git a/syntax/yats/es6-function.vim b/syntax/yats/es6-function.vim index 8c08aa3c..0f39d0be 100644 --- a/syntax/yats/es6-function.vim +++ b/syntax/yats/es6-function.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-function.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function syntax keyword typescriptFunctionMethod contained apply bind call nextgroup=typescriptFuncCallArg syntax cluster props add=typescriptFunctionMethod if exists("did_typescript_hilink") | HiLink typescriptFunctionMethod Keyword endif - -endif diff --git a/syntax/yats/es6-json.vim b/syntax/yats/es6-json.vim index 1950012d..f1d1d488 100644 --- a/syntax/yats/es6-json.vim +++ b/syntax/yats/es6-json.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-json.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName JSON nextgroup=typescriptGlobalJSONDot,typescriptFuncCallArg syntax match typescriptGlobalJSONDot /\./ contained nextgroup=typescriptJSONStaticMethod,typescriptProp syntax keyword typescriptJSONStaticMethod contained parse stringify nextgroup=typescriptFuncCallArg if exists("did_typescript_hilink") | HiLink typescriptJSONStaticMethod Keyword endif - -endif diff --git a/syntax/yats/es6-map.vim b/syntax/yats/es6-map.vim index 589b0ee0..97e2558d 100644 --- a/syntax/yats/es6-map.vim +++ b/syntax/yats/es6-map.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-map.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Map WeakMap syntax keyword typescriptES6MapProp contained size @@ -17,5 +12,3 @@ syntax keyword typescriptES6MapMethod contained keys set values nextgroup=typesc syntax cluster props add=typescriptES6MapMethod if exists("did_typescript_hilink") | HiLink typescriptES6MapMethod Keyword endif - -endif diff --git a/syntax/yats/es6-math.vim b/syntax/yats/es6-math.vim index 188a9b9a..0490f22e 100644 --- a/syntax/yats/es6-math.vim +++ b/syntax/yats/es6-math.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-math.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Math nextgroup=typescriptGlobalMathDot,typescriptFuncCallArg syntax match typescriptGlobalMathDot /\./ contained nextgroup=typescriptMathStaticProp,typescriptMathStaticMethod,typescriptProp @@ -21,5 +16,3 @@ syntax keyword typescriptMathStaticMethod contained min pow random round sign si syntax keyword typescriptMathStaticMethod contained sinh sqrt tan tanh trunc nextgroup=typescriptFuncCallArg if exists("did_typescript_hilink") | HiLink typescriptMathStaticMethod Keyword endif - -endif diff --git a/syntax/yats/es6-number.vim b/syntax/yats/es6-number.vim index f51e3c1e..1fb37cb6 100644 --- a/syntax/yats/es6-number.vim +++ b/syntax/yats/es6-number.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-number.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Number nextgroup=typescriptGlobalNumberDot,typescriptFuncCallArg syntax match typescriptGlobalNumberDot /\./ contained nextgroup=typescriptNumberStaticProp,typescriptNumberStaticMethod,typescriptProp @@ -23,5 +18,3 @@ syntax keyword typescriptNumberMethod contained toPrecision toSource toString va syntax cluster props add=typescriptNumberMethod if exists("did_typescript_hilink") | HiLink typescriptNumberMethod Keyword endif - -endif diff --git a/syntax/yats/es6-object.vim b/syntax/yats/es6-object.vim index 1b2f9c33..750571d7 100644 --- a/syntax/yats/es6-object.vim +++ b/syntax/yats/es6-object.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-object.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Object nextgroup=typescriptGlobalObjectDot,typescriptFuncCallArg syntax match typescriptGlobalObjectDot /\./ contained nextgroup=typescriptObjectStaticMethod,typescriptProp @@ -24,5 +19,3 @@ syntax keyword typescriptObjectMethod contained setPrototypeOf nextgroup=typescr syntax cluster props add=typescriptObjectMethod if exists("did_typescript_hilink") | HiLink typescriptObjectMethod Keyword endif - -endif diff --git a/syntax/yats/es6-promise.vim b/syntax/yats/es6-promise.vim index 6068cf94..5cb97747 100644 --- a/syntax/yats/es6-promise.vim +++ b/syntax/yats/es6-promise.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-promise.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Promise nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg syntax match typescriptGlobalPromiseDot /\./ contained nextgroup=typescriptPromiseStaticMethod,typescriptProp @@ -16,5 +11,3 @@ syntax keyword typescriptPromiseMethod contained then catch finally nextgroup=ty syntax cluster props add=typescriptPromiseMethod if exists("did_typescript_hilink") | HiLink typescriptPromiseMethod Keyword endif - -endif diff --git a/syntax/yats/es6-proxy.vim b/syntax/yats/es6-proxy.vim index 1c6398ec..6bfd693c 100644 --- a/syntax/yats/es6-proxy.vim +++ b/syntax/yats/es6-proxy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-proxy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Proxy syntax keyword typescriptProxyAPI contained getOwnPropertyDescriptor getOwnPropertyNames @@ -14,5 +9,3 @@ syntax keyword typescriptProxyAPI contained preventExtensions has hasOwn get set syntax keyword typescriptProxyAPI contained iterate ownKeys apply construct if exists("did_typescript_hilink") | HiLink typescriptProxyAPI Keyword endif - -endif diff --git a/syntax/yats/es6-reflect.vim b/syntax/yats/es6-reflect.vim index 6b3da9ff..9bc7c6be 100644 --- a/syntax/yats/es6-reflect.vim +++ b/syntax/yats/es6-reflect.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-reflect.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Reflect syntax keyword typescriptReflectMethod contained apply construct defineProperty deleteProperty nextgroup=typescriptFuncCallArg @@ -15,5 +10,3 @@ syntax keyword typescriptReflectMethod contained preventExtensions set setProtot syntax cluster props add=typescriptReflectMethod if exists("did_typescript_hilink") | HiLink typescriptReflectMethod Keyword endif - -endif diff --git a/syntax/yats/es6-regexp.vim b/syntax/yats/es6-regexp.vim index 9a8d8725..dfa4932b 100644 --- a/syntax/yats/es6-regexp.vim +++ b/syntax/yats/es6-regexp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-regexp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName RegExp nextgroup=typescriptGlobalRegExpDot,typescriptFuncCallArg syntax match typescriptGlobalRegExpDot /\./ contained nextgroup=typescriptRegExpStaticProp,typescriptProp @@ -20,5 +15,3 @@ syntax keyword typescriptRegExpMethod contained exec test nextgroup=typescriptFu syntax cluster props add=typescriptRegExpMethod if exists("did_typescript_hilink") | HiLink typescriptRegExpMethod Keyword endif - -endif diff --git a/syntax/yats/es6-set.vim b/syntax/yats/es6-set.vim index b116d4fb..c6ce4695 100644 --- a/syntax/yats/es6-set.vim +++ b/syntax/yats/es6-set.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-set.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Set WeakSet syntax keyword typescriptES6SetProp contained size @@ -17,5 +12,3 @@ syntax keyword typescriptES6SetMethod contained values nextgroup=typescriptFuncC syntax cluster props add=typescriptES6SetMethod if exists("did_typescript_hilink") | HiLink typescriptES6SetMethod Keyword endif - -endif diff --git a/syntax/yats/es6-string.vim b/syntax/yats/es6-string.vim index acb6d5a2..99ce6c77 100644 --- a/syntax/yats/es6-string.vim +++ b/syntax/yats/es6-string.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-string.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName String nextgroup=typescriptGlobalStringDot,typescriptFuncCallArg syntax match typescriptGlobalStringDot /\./ contained nextgroup=typescriptStringStaticMethod,typescriptProp @@ -23,5 +18,3 @@ syntax keyword typescriptStringMethod contained valueOf nextgroup=typescriptFunc syntax cluster props add=typescriptStringMethod if exists("did_typescript_hilink") | HiLink typescriptStringMethod Keyword endif - -endif diff --git a/syntax/yats/es6-symbol.vim b/syntax/yats/es6-symbol.vim index b0c2cb04..5935f5ef 100644 --- a/syntax/yats/es6-symbol.vim +++ b/syntax/yats/es6-symbol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/es6-symbol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Symbol nextgroup=typescriptGlobalSymbolDot,typescriptFuncCallArg syntax match typescriptGlobalSymbolDot /\./ contained nextgroup=typescriptSymbolStaticProp,typescriptSymbolStaticMethod,typescriptProp @@ -18,5 +13,3 @@ endif syntax keyword typescriptSymbolStaticMethod contained for keyFor nextgroup=typescriptFuncCallArg if exists("did_typescript_hilink") | HiLink typescriptSymbolStaticMethod Keyword endif - -endif diff --git a/syntax/yats/event.vim b/syntax/yats/event.vim index 4fb2ff6f..46c54913 100644 --- a/syntax/yats/event.vim +++ b/syntax/yats/event.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/event.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptAnimationEvent contained animationend animationiteration syntax keyword typescriptAnimationEvent contained animationstart beginEvent endEvent @@ -166,5 +161,3 @@ syntax keyword typescriptServiceWorkerEvent contained install activate fetch syntax cluster events add=typescriptServiceWorkerEvent if exists("did_typescript_hilink") | HiLink typescriptServiceWorkerEvent Title endif - -endif diff --git a/syntax/yats/node.vim b/syntax/yats/node.vim index 98f859fd..375f7dbd 100644 --- a/syntax/yats/node.vim +++ b/syntax/yats/node.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/node.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName global process syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName console Buffer @@ -16,5 +11,3 @@ syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName setInte syntax keyword typescriptNodeGlobal containedin=typescriptIdentifierName clearInterval if exists("did_typescript_hilink") | HiLink typescriptNodeGlobal Structure endif - -endif diff --git a/syntax/yats/test.vim b/syntax/yats/test.vim index 7044a06a..bb4a60cb 100644 --- a/syntax/yats/test.vim +++ b/syntax/yats/test.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/test.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName describe syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName it test before @@ -14,5 +9,3 @@ syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterEa syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName beforeAll syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName afterAll syntax keyword typescriptTestGlobal containedin=typescriptIdentifierName expect assert - -endif diff --git a/syntax/yats/typescript.vim b/syntax/yats/typescript.vim index 82a33ae1..5bdde783 100644 --- a/syntax/yats/typescript.vim +++ b/syntax/yats/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Function Boolean syntax keyword typescriptGlobal containedin=typescriptIdentifierName Error EvalError @@ -38,5 +33,3 @@ syntax keyword typescriptGlobalMethod containedin=typescriptIdentifierName encod syntax cluster props add=typescriptGlobalMethod if exists("did_typescript_hilink") | HiLink typescriptGlobalMethod Structure endif - -endif diff --git a/syntax/yats/web-blob.vim b/syntax/yats/web-blob.vim index 7ec46b3a..b9f4c78a 100644 --- a/syntax/yats/web-blob.vim +++ b/syntax/yats/web-blob.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-blob.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Blob BlobBuilder syntax keyword typescriptGlobal containedin=typescriptIdentifierName File FileReader @@ -44,5 +39,3 @@ endif syntax keyword typescriptURLStaticMethod contained createObjectURL revokeObjectURL nextgroup=typescriptFuncCallArg if exists("did_typescript_hilink") | HiLink typescriptURLStaticMethod Keyword endif - -endif diff --git a/syntax/yats/web-console.vim b/syntax/yats/web-console.vim index ad032579..ff40a3fa 100644 --- a/syntax/yats/web-console.vim +++ b/syntax/yats/web-console.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-console.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName console syntax keyword typescriptConsoleMethod contained count dir error group groupCollapsed nextgroup=typescriptFuncCallArg @@ -14,5 +9,3 @@ syntax keyword typescriptConsoleMethod contained warn nextgroup=typescriptFuncCa syntax cluster props add=typescriptConsoleMethod if exists("did_typescript_hilink") | HiLink typescriptConsoleMethod Keyword endif - -endif diff --git a/syntax/yats/web-crypto.vim b/syntax/yats/web-crypto.vim index f4647e26..0e2f38aa 100644 --- a/syntax/yats/web-crypto.vim +++ b/syntax/yats/web-crypto.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-crypto.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptCryptoGlobal containedin=typescriptIdentifierName crypto if exists("did_typescript_hilink") | HiLink typescriptCryptoGlobal Structure @@ -23,5 +18,3 @@ syntax keyword typescriptCryptoMethod contained getRandomValues nextgroup=typesc syntax cluster props add=typescriptCryptoMethod if exists("did_typescript_hilink") | HiLink typescriptCryptoMethod Keyword endif - -endif diff --git a/syntax/yats/web-encoding.vim b/syntax/yats/web-encoding.vim index 1ba7a34c..8728b5c2 100644 --- a/syntax/yats/web-encoding.vim +++ b/syntax/yats/web-encoding.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-encoding.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextEncoder syntax keyword typescriptEncodingGlobal containedin=typescriptIdentifierName TextDecoder @@ -19,5 +14,3 @@ syntax keyword typescriptEncodingMethod contained encode decode nextgroup=typesc syntax cluster props add=typescriptEncodingMethod if exists("did_typescript_hilink") | HiLink typescriptEncodingMethod Keyword endif - -endif diff --git a/syntax/yats/web-fetch.vim b/syntax/yats/web-fetch.vim index 370bc493..7a815e91 100644 --- a/syntax/yats/web-fetch.vim +++ b/syntax/yats/web-fetch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-fetch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Headers Request syntax keyword typescriptGlobal containedin=typescriptIdentifierName Response @@ -35,5 +30,3 @@ syntax keyword typescriptResponseMethod contained clone nextgroup=typescriptFunc syntax cluster props add=typescriptResponseMethod if exists("did_typescript_hilink") | HiLink typescriptResponseMethod Keyword endif - -endif diff --git a/syntax/yats/web-geo.vim b/syntax/yats/web-geo.vim index 0777b435..b3d5e85a 100644 --- a/syntax/yats/web-geo.vim +++ b/syntax/yats/web-geo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-geo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName Geolocation syntax keyword typescriptGeolocationMethod contained getCurrentPosition watchPosition nextgroup=typescriptFuncCallArg @@ -13,5 +8,3 @@ syntax keyword typescriptGeolocationMethod contained clearWatch nextgroup=typesc syntax cluster props add=typescriptGeolocationMethod if exists("did_typescript_hilink") | HiLink typescriptGeolocationMethod Keyword endif - -endif diff --git a/syntax/yats/web-history.vim b/syntax/yats/web-history.vim index 38001023..e4f05850 100644 --- a/syntax/yats/web-history.vim +++ b/syntax/yats/web-history.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-history.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptBOMHistoryProp contained length current next previous state syntax keyword typescriptBOMHistoryProp contained scrollRestoration @@ -16,5 +11,3 @@ syntax keyword typescriptBOMHistoryMethod contained back forward go pushState re syntax cluster props add=typescriptBOMHistoryMethod if exists("did_typescript_hilink") | HiLink typescriptBOMHistoryMethod Keyword endif - -endif diff --git a/syntax/yats/web-location.vim b/syntax/yats/web-location.vim index bac99ca1..6484f74b 100644 --- a/syntax/yats/web-location.vim +++ b/syntax/yats/web-location.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-location.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptBOMLocationProp contained href protocol host hostname port syntax keyword typescriptBOMLocationProp contained pathname search hash username password @@ -17,5 +12,3 @@ syntax keyword typescriptBOMLocationMethod contained assign reload replace toStr syntax cluster props add=typescriptBOMLocationMethod if exists("did_typescript_hilink") | HiLink typescriptBOMLocationMethod Keyword endif - -endif diff --git a/syntax/yats/web-navigator.vim b/syntax/yats/web-navigator.vim index 800f4296..020212d3 100644 --- a/syntax/yats/web-navigator.vim +++ b/syntax/yats/web-navigator.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-navigator.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptBOMNavigatorProp contained battery buildID connection cookieEnabled syntax keyword typescriptBOMNavigatorProp contained doNotTrack maxTouchPoints oscpu @@ -27,5 +22,3 @@ syntax keyword typescriptServiceWorkerMethod contained register nextgroup=typesc syntax cluster props add=typescriptServiceWorkerMethod if exists("did_typescript_hilink") | HiLink typescriptServiceWorkerMethod Keyword endif - -endif diff --git a/syntax/yats/web-network.vim b/syntax/yats/web-network.vim index 88969b0b..bffc3f52 100644 --- a/syntax/yats/web-network.vim +++ b/syntax/yats/web-network.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-network.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName NetworkInformation syntax keyword typescriptBOMNetworkProp contained downlink downlinkMax effectiveType @@ -13,5 +8,3 @@ syntax keyword typescriptBOMNetworkProp contained rtt type syntax cluster props add=typescriptBOMNetworkProp if exists("did_typescript_hilink") | HiLink typescriptBOMNetworkProp Keyword endif - -endif diff --git a/syntax/yats/web-payment.vim b/syntax/yats/web-payment.vim index ee41c25c..43b429db 100644 --- a/syntax/yats/web-payment.vim +++ b/syntax/yats/web-payment.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-payment.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptGlobal containedin=typescriptIdentifierName PaymentRequest syntax keyword typescriptPaymentMethod contained show abort canMakePayment nextgroup=typescriptFuncCallArg @@ -40,5 +35,3 @@ syntax keyword typescriptPaymentShippingOptionProp contained id label amount sel syntax cluster props add=typescriptPaymentShippingOptionProp if exists("did_typescript_hilink") | HiLink typescriptPaymentShippingOptionProp Keyword endif - -endif diff --git a/syntax/yats/web-service-worker.vim b/syntax/yats/web-service-worker.vim index 9f58e8ea..708a7b9d 100644 --- a/syntax/yats/web-service-worker.vim +++ b/syntax/yats/web-service-worker.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-service-worker.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptServiceWorkerProp contained controller ready syntax cluster props add=typescriptServiceWorkerProp @@ -21,5 +16,3 @@ syntax keyword typescriptCacheMethod contained keys nextgroup=typescriptFuncCall syntax cluster props add=typescriptCacheMethod if exists("did_typescript_hilink") | HiLink typescriptCacheMethod Keyword endif - -endif diff --git a/syntax/yats/web-window.vim b/syntax/yats/web-window.vim index 320aa37c..13a40f92 100644 --- a/syntax/yats/web-window.vim +++ b/syntax/yats/web-window.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-window.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName applicationCache syntax keyword typescriptBOMWindowProp containedin=typescriptIdentifierName closed @@ -116,5 +111,3 @@ syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName Quer syntax keyword typescriptBOMWindowCons containedin=typescriptIdentifierName XMLSerializer if exists("did_typescript_hilink") | HiLink typescriptBOMWindowCons Structure endif - -endif diff --git a/syntax/yats/web-xhr.vim b/syntax/yats/web-xhr.vim index 8a29191c..ef70d0b2 100644 --- a/syntax/yats/web-xhr.vim +++ b/syntax/yats/web-xhr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web-xhr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptXHRGlobal containedin=typescriptIdentifierName XMLHttpRequest if exists("did_typescript_hilink") | HiLink typescriptXHRGlobal Structure @@ -21,5 +16,3 @@ syntax keyword typescriptXHRMethod contained open overrideMimeType send setReque syntax cluster props add=typescriptXHRMethod if exists("did_typescript_hilink") | HiLink typescriptXHRMethod Keyword endif - -endif diff --git a/syntax/yats/web.vim b/syntax/yats/web.vim index 96050351..fa7d3693 100644 --- a/syntax/yats/web.vim +++ b/syntax/yats/web.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/yats/web.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 syntax keyword typescriptBOM containedin=typescriptIdentifierName AbortController syntax keyword typescriptBOM containedin=typescriptIdentifierName AbstractWorker AnalyserNode @@ -256,5 +251,3 @@ syntax keyword typescriptBOM containedin=typescriptIdentifierName XDomainRequest syntax keyword typescriptBOM containedin=typescriptIdentifierName XMLHttpRequestEventTarget if exists("did_typescript_hilink") | HiLink typescriptBOM Structure endif - -endif diff --git a/syntax/z8a.vim b/syntax/z8a.vim index 856ed092..c43253f1 100644 --- a/syntax/z8a.vim +++ b/syntax/z8a.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/z8a.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('z8a', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'z8a') == -1 " Vim syntax file " Language: Z80 assembler asz80 @@ -108,5 +103,3 @@ hi def link z8aString String let b:current_syntax = "z8a" " vim: ts=8 - -endif diff --git a/syntax/zephir.vim b/syntax/zephir.vim index 838b3cc9..54bfa05e 100644 --- a/syntax/zephir.vim +++ b/syntax/zephir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/zephir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zephir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zephir') == -1 " Copyright 2009 The Go Authors. All rights reserved. if exists("b:current_syntax") @@ -140,5 +135,3 @@ syn sync minlines=500 let b:current_syntax = "zephir" syn match zepTypeHits "<\w+>" contained display - -endif diff --git a/syntax/zig.vim b/syntax/zig.vim index f9d6fd5d..0790689d 100644 --- a/syntax/zig.vim +++ b/syntax/zig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/zig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Vim syntax file " Language: Zig @@ -111,5 +106,3 @@ hi def link zigStructure Structure hi def link zigStatement Statement hi def link zigConditional Conditional hi def link zigRepeat Repeat - -endif diff --git a/syntax/zimbu.vim b/syntax/zimbu.vim index e30c4496..3e193121 100644 --- a/syntax/zimbu.vim +++ b/syntax/zimbu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/zimbu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zimbu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zimbu') == -1 " Vim syntax file " Language: Zimbu @@ -167,5 +162,3 @@ hi def link zimbuError Error let b:current_syntax = "zimbu" " vim: ts=8 - -endif diff --git a/syntax/zir.vim b/syntax/zir.vim index be14a54b..10033967 100644 --- a/syntax/zir.vim +++ b/syntax/zir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/zir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Vim syntax file " Language: Zir @@ -57,5 +52,3 @@ hi def link zirBinNumber Constant hi def link zirGlobal Identifier hi def link zirLocal Identifier - -endif diff --git a/syntax/zsh.vim b/syntax/zsh.vim index ac44ba26..fc5810af 100644 --- a/syntax/zsh.vim +++ b/syntax/zsh.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'syntax/zsh.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sh', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sh') == -1 " Shebang syn match shShebang "^#!.*$" containedin=shComment @@ -63,5 +58,3 @@ hi def link shSemicolon Delimiter hi def link shShebang PreProc hi def link zshDelim Delimiter hi def link zshFlag Special - -endif |