From cbde2571d4f79770ac552fe75440de72893bc73a Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sun, 25 Oct 2020 03:19:58 +0100 Subject: Respect symlinks for resolving vim-polyglot as fallback, closes #605 --- after/ftplugin/cabal.vim | 6 +- after/ftplugin/coffee.vim | 6 +- after/ftplugin/haskell.vim | 6 +- after/ftplugin/html.vim | 6 +- after/ftplugin/idris.vim | 6 +- after/ftplugin/idris2.vim | 6 +- after/ftplugin/javascript-1.vim | 6 +- after/ftplugin/javascript-2.vim | 6 +- after/ftplugin/javascriptreact.vim | 6 +- after/ftplugin/jsx.vim | 6 +- after/ftplugin/llvm.vim | 6 +- after/ftplugin/puppet.vim | 6 +- after/ftplugin/tsx.vim | 6 +- after/ftplugin/typescriptreact.vim | 6 +- after/indent/html.vim | 6 +- after/indent/javascript-1.vim | 6 +- after/indent/javascript-2.vim | 6 +- after/indent/javascriptreact.vim | 6 +- after/indent/jsx.vim | 6 +- after/indent/objc.vim | 6 +- after/indent/tsx.vim | 6 +- after/indent/typescript.vim | 6 +- after/indent/typescriptreact.vim | 6 +- after/syntax/c.vim | 6 +- after/syntax/coffee.vim | 6 +- after/syntax/cpp.vim | 6 +- after/syntax/haskell.vim | 6 +- after/syntax/help.vim | 6 +- after/syntax/html.vim | 6 +- after/syntax/html/aria.vim | 6 +- after/syntax/html/electron.vim | 6 +- after/syntax/html/rdfa.vim | 6 +- after/syntax/idris.vim | 6 +- after/syntax/idris2.vim | 6 +- after/syntax/javascript.vim | 6 +- after/syntax/javascript/graphql.vim | 6 +- after/syntax/javascript/html5.vim | 6 +- after/syntax/javascript/sql.vim | 6 +- after/syntax/javascriptreact.vim | 6 +- after/syntax/javascriptreact/graphql.vim | 6 +- after/syntax/jsx.vim | 6 +- after/syntax/jsx_pretty.vim | 6 +- after/syntax/llvm.vim | 6 +- after/syntax/mdx.vim | 6 +- after/syntax/mma.vim | 6 +- after/syntax/objc.vim | 6 +- after/syntax/reason.vim | 6 +- after/syntax/reason/graphql.vim | 6 +- after/syntax/rspec.vim | 6 +- after/syntax/ruby.vim | 6 +- after/syntax/rust.vim | 6 +- after/syntax/tsx.vim | 6 +- after/syntax/typescript/graphql.vim | 6 +- after/syntax/typescriptreact.vim | 6 +- after/syntax/typescriptreact/graphql.vim | 6 +- after/syntax/vue/graphql.vim | 6 +- after/syntax/zsh.vim | 6 +- autoload/LaTeXtoUnicode.vim | 9 +- autoload/RstFold.vim | 9 +- autoload/ada.vim | 9 +- autoload/cargo.vim | 9 +- autoload/cargo/quickfix.vim | 9 +- autoload/clojurecomplete.vim | 9 +- autoload/coffee.vim | 9 +- autoload/crystal/indent.vim | 10 +- autoload/crystal_lang.vim | 9 +- autoload/csv.vim | 9 +- autoload/dart.vim | 9 +- autoload/db/adapter/ecto.vim | 9 +- autoload/ecrystal.vim | 9 +- autoload/elixir/indent.vim | 9 +- autoload/elixir/util.vim | 9 +- autoload/fish.vim | 9 +- autoload/fsharp.vim | 9 +- autoload/fzf_gitignore.vim | 9 +- autoload/go/config.vim | 9 +- autoload/graphql.vim | 9 +- autoload/htmlcomplete.vim | 9 +- autoload/jsonnet.vim | 9 +- autoload/jsx_pretty/comment.vim | 9 +- autoload/jsx_pretty/indent.vim | 9 +- autoload/julia.vim | 9 +- autoload/julia/doc.vim | 9 +- autoload/julia_blocks.vim | 9 +- autoload/julia_latex_symbols.vim | 9 +- autoload/ledger.vim | 9 +- autoload/nim.vim | 9 +- autoload/polyglot/util.vim | 64 ++ autoload/pony.vim | 9 +- autoload/puppet/align.vim | 9 +- autoload/puppet/ctags.vim | 9 +- autoload/puppet/format.vim | 9 +- autoload/python/utils.vim | 9 +- autoload/requirements.vim | 9 +- autoload/rubycomplete.vim | 9 +- autoload/rust.vim | 9 +- autoload/rust/debugging.vim | 9 +- autoload/rust/delimitmate.vim | 9 +- autoload/rust/tags.vim | 9 +- autoload/rustfmt.vim | 9 +- autoload/smt2.vim | 9 +- autoload/terraform.vim | 9 +- autoload/vital/_crystal.vim | 9 +- autoload/vital/_crystal/ColorEcho.vim | 9 +- autoload/vital/_crystal/Data/List.vim | 9 +- autoload/vital/_crystal/Data/String.vim | 9 +- autoload/vital/_crystal/Process.vim | 9 +- autoload/vital/_crystal/Web/JSON.vim | 9 +- autoload/vital/crystal.vim | 9 +- autoload/vital/crystal.vital | 4 - autoload/xml/aria.vim | 9 +- autoload/xml/html5.vim | 9 +- autoload/xml/xsd.vim | 9 +- autoload/zig/config.vim | 9 +- autoload/zig/fmt.vim | 9 +- autoload/zig/list.vim | 9 +- autoload/zig/util.vim | 9 +- compiler/ant.vim | 9 +- compiler/bdf.vim | 9 +- compiler/cake.vim | 9 +- compiler/cargo.vim | 9 +- compiler/coffee.vim | 9 +- compiler/credo.vim | 9 +- compiler/cryptol.vim | 9 +- compiler/cs.vim | 9 +- compiler/cucumber.vim | 9 +- compiler/dot.vim | 9 +- compiler/eruby.vim | 9 +- compiler/exunit.vim | 9 +- compiler/fish.vim | 9 +- compiler/go.vim | 9 +- compiler/gradle.vim | 9 +- compiler/gradlew.vim | 9 +- compiler/haml.vim | 9 +- compiler/ledger.vim | 9 +- compiler/lilypond.vim | 9 +- compiler/ls.vim | 9 +- compiler/mix.vim | 9 +- compiler/nim.vim | 9 +- compiler/nix-build.vim | 9 +- compiler/ocaml.vim | 9 +- compiler/powershell.vim | 9 +- compiler/python.vim | 9 +- compiler/rake.vim | 9 +- compiler/rspec.vim | 9 +- compiler/ruby.vim | 9 +- compiler/rubyunit.vim | 9 +- compiler/rustc.vim | 9 +- compiler/sass.vim | 9 +- compiler/sbt.vim | 9 +- compiler/swift.vim | 9 +- compiler/tcl.vim | 9 +- compiler/tex.vim | 9 +- compiler/tidy.vim | 9 +- compiler/typescript.vim | 9 +- ctags/puppet.ctags | 4 - ctags/puppet_u.ctags | 4 - ctags/rust.ctags | 4 - ctags/scala.ctags | 4 - ctags/typescript.ctags | 4 - extras/flow.vim | 9 +- extras/jsdoc.vim | 9 +- extras/ngdoc.vim | 9 +- ftdetect/polyglot.vim | 1214 +++++++++++++++--------------- ftplugin/8th.vim | 9 +- ftplugin/a2ps.vim | 9 +- ftplugin/aap.vim | 9 +- ftplugin/abap.vim | 9 +- ftplugin/abaqus.vim | 9 +- ftplugin/ada.vim | 9 +- ftplugin/alsaconf.vim | 9 +- ftplugin/ansible.vim | 9 +- ftplugin/ansible_hosts.vim | 9 +- ftplugin/ant.vim | 9 +- ftplugin/arch.vim | 9 +- ftplugin/art.vim | 9 +- ftplugin/aspvbs.vim | 9 +- ftplugin/automake.vim | 9 +- ftplugin/awk.vim | 9 +- ftplugin/bdf.vim | 9 +- ftplugin/blade.vim | 9 +- ftplugin/bst.vim | 9 +- ftplugin/bzl.vim | 9 +- ftplugin/caddyfile.vim | 9 +- ftplugin/calendar.vim | 9 +- ftplugin/cdrdaoconf.vim | 9 +- ftplugin/cfg.vim | 9 +- ftplugin/ch.vim | 9 +- ftplugin/clojure.vim | 9 +- ftplugin/cobol.vim | 9 +- ftplugin/coffee.vim | 9 +- ftplugin/conf.vim | 9 +- ftplugin/config.vim | 9 +- ftplugin/crm.vim | 9 +- ftplugin/cryptol/folding.vim | 9 +- ftplugin/crystal.vim | 9 +- ftplugin/cs.vim | 9 +- ftplugin/csc.vim | 9 +- ftplugin/css.vim | 9 +- ftplugin/csv.vim | 9 +- ftplugin/cucumber.vim | 9 +- ftplugin/cvsrc.vim | 9 +- ftplugin/dart.vim | 9 +- ftplugin/debchangelog.vim | 9 +- ftplugin/debcontrol.vim | 9 +- ftplugin/denyhosts.vim | 9 +- ftplugin/dhall.vim | 9 +- ftplugin/dictconf.vim | 9 +- ftplugin/dictdconf.vim | 9 +- ftplugin/diff.vim | 9 +- ftplugin/dircolors.vim | 9 +- ftplugin/docker-compose.vim | 9 +- ftplugin/dockerfile.vim | 9 +- ftplugin/dosbatch.vim | 9 +- ftplugin/dosini.vim | 9 +- ftplugin/dtd.vim | 9 +- ftplugin/dune.vim | 9 +- ftplugin/ecrystal.vim | 9 +- ftplugin/eelixir.vim | 9 +- ftplugin/elinks.vim | 9 +- ftplugin/elixir.vim | 9 +- ftplugin/embeddedpuppet.vim | 9 +- ftplugin/ember-script.vim | 9 +- ftplugin/emblem.vim | 9 +- ftplugin/eruby.vim | 9 +- ftplugin/eterm.vim | 9 +- ftplugin/falcon.vim | 9 +- ftplugin/fennel.vim | 9 +- ftplugin/fetchmail.vim | 9 +- ftplugin/fish.vim | 9 +- ftplugin/fortran.vim | 9 +- ftplugin/framescript.vim | 9 +- ftplugin/fvwm.vim | 9 +- ftplugin/gdb.vim | 9 +- ftplugin/git.vim | 9 +- ftplugin/gitcommit.vim | 9 +- ftplugin/gitconfig.vim | 9 +- ftplugin/gitignore.vim | 9 +- ftplugin/gitrebase.vim | 9 +- ftplugin/gitsendemail.vim | 9 +- ftplugin/gpg.vim | 9 +- ftplugin/graphql.vim | 9 +- ftplugin/groovy.vim | 9 +- ftplugin/group.vim | 9 +- ftplugin/grub.vim | 9 +- ftplugin/haml.vim | 9 +- ftplugin/hamster.vim | 9 +- ftplugin/handlebars.vim | 9 +- ftplugin/hcl.vim | 9 +- ftplugin/help.vim | 9 +- ftplugin/hgcommit.vim | 9 +- ftplugin/hive.vim | 9 +- ftplugin/hog.vim | 9 +- ftplugin/hostconf.vim | 9 +- ftplugin/hostsaccess.vim | 9 +- ftplugin/html.vim | 9 +- ftplugin/htmldjango.vim | 9 +- ftplugin/i3config.vim | 9 +- ftplugin/idris.vim | 9 +- ftplugin/idris2.vim | 9 +- ftplugin/indent.vim | 9 +- ftplugin/ion.vim | 9 +- ftplugin/j.vim | 9 +- ftplugin/java.vim | 9 +- ftplugin/jproperties.vim | 9 +- ftplugin/jq.vim | 9 +- ftplugin/json.vim | 9 +- ftplugin/jsonnet.vim | 9 +- ftplugin/jsp.vim | 9 +- ftplugin/julia.vim | 9 +- ftplugin/juliadoc.vim | 9 +- ftplugin/kconfig.vim | 9 +- ftplugin/kotlin.vim | 9 +- ftplugin/kwt.vim | 9 +- ftplugin/ld.vim | 9 +- ftplugin/less.vim | 9 +- ftplugin/lftp.vim | 9 +- ftplugin/libao.vim | 9 +- ftplugin/lilypond.vim | 9 +- ftplugin/limits.vim | 9 +- ftplugin/liquid.vim | 9 +- ftplugin/lisp.vim | 9 +- ftplugin/litcoffee.vim | 9 +- ftplugin/llvm.vim | 9 +- ftplugin/logcheck.vim | 9 +- ftplugin/loginaccess.vim | 9 +- ftplugin/logindefs.vim | 9 +- ftplugin/logtalk.vim | 9 +- ftplugin/lprolog.vim | 9 +- ftplugin/ls.vim | 9 +- ftplugin/m4.vim | 9 +- ftplugin/mail.vim | 9 +- ftplugin/mailaliases.vim | 9 +- ftplugin/mailcap.vim | 9 +- ftplugin/make.vim | 9 +- ftplugin/mako.vim | 9 +- ftplugin/manconf.vim | 9 +- ftplugin/markdown.vim | 9 +- ftplugin/meson.vim | 9 +- ftplugin/mf.vim | 9 +- ftplugin/mma.vim | 9 +- ftplugin/modconf.vim | 9 +- ftplugin/moon.vim | 9 +- ftplugin/mp.vim | 9 +- ftplugin/mplayerconf.vim | 9 +- ftplugin/mrxvtrc.vim | 9 +- ftplugin/mustache.vim | 9 +- ftplugin/muttrc.vim | 9 +- ftplugin/nanorc.vim | 9 +- ftplugin/neomuttrc.vim | 9 +- ftplugin/netrc.vim | 9 +- ftplugin/nginx.vim | 9 +- ftplugin/nix.vim | 9 +- ftplugin/nroff.vim | 9 +- ftplugin/nsis.vim | 9 +- ftplugin/oasis.vim | 9 +- ftplugin/objc.vim | 9 +- ftplugin/ocaml.vim | 9 +- ftplugin/ocamlbuild_tags.vim | 9 +- ftplugin/occam.vim | 9 +- ftplugin/omake.vim | 9 +- ftplugin/opencl.vim | 9 +- ftplugin/pamconf.vim | 9 +- ftplugin/pascal.vim | 9 +- ftplugin/passwd.vim | 9 +- ftplugin/pdf.vim | 9 +- ftplugin/perl.vim | 9 +- ftplugin/pinfo.vim | 9 +- ftplugin/plantuml.vim | 9 +- ftplugin/pony.vim | 9 +- ftplugin/postscr.vim | 9 +- ftplugin/procmail.vim | 9 +- ftplugin/prolog.vim | 9 +- ftplugin/protocols.vim | 9 +- ftplugin/ps1.vim | 9 +- ftplugin/ps1xml.vim | 9 +- ftplugin/pug.vim | 9 +- ftplugin/puppet.vim | 9 +- ftplugin/puppet_tagbar.vim | 9 +- ftplugin/purescript.vim | 9 +- ftplugin/pyrex.vim | 9 +- ftplugin/qml.vim | 9 +- ftplugin/quake.vim | 9 +- ftplugin/racket.vim | 9 +- ftplugin/raku.vim | 9 +- ftplugin/raml.vim | 9 +- ftplugin/razor.vim | 9 +- ftplugin/readline.vim | 9 +- ftplugin/reva.vim | 9 +- ftplugin/rmd.vim | 9 +- ftplugin/rnc.vim | 9 +- ftplugin/rnoweb.vim | 9 +- ftplugin/rpl.vim | 9 +- ftplugin/rrst.vim | 9 +- ftplugin/rst.vim | 9 +- ftplugin/ruby.vim | 11 +- ftplugin/rust.vim | 9 +- ftplugin/rust/tagbar.vim | 9 +- ftplugin/sass.vim | 9 +- ftplugin/sbt.vim | 9 +- ftplugin/scala.vim | 9 +- ftplugin/scala.xpt.vim | 9 +- ftplugin/scala/tagbar.vim | 9 +- ftplugin/scheme.vim | 9 +- ftplugin/screen.vim | 9 +- ftplugin/scss.vim | 9 +- ftplugin/sensors.vim | 9 +- ftplugin/services.vim | 9 +- ftplugin/setserial.vim | 9 +- ftplugin/sexplib.vim | 9 +- ftplugin/sieve.vim | 9 +- ftplugin/slim.vim | 9 +- ftplugin/slpconf.vim | 9 +- ftplugin/slpreg.vim | 9 +- ftplugin/slpspi.vim | 9 +- ftplugin/smt2.vim | 9 +- ftplugin/solidity.vim | 9 +- ftplugin/spec.vim | 9 +- ftplugin/sql.vim | 9 +- ftplugin/sshconfig.vim | 9 +- ftplugin/stylus.vim | 9 +- ftplugin/sudoers.vim | 9 +- ftplugin/svelte.vim | 9 +- ftplugin/swift.vim | 9 +- ftplugin/swiftgyb.vim | 9 +- ftplugin/sysctl.vim | 9 +- ftplugin/systemd.vim | 9 +- ftplugin/systemverilog.vim | 9 +- ftplugin/tablegen.vim | 9 +- ftplugin/tcl.vim | 9 +- ftplugin/terminfo.vim | 9 +- ftplugin/terraform.vim | 9 +- ftplugin/tex.vim | 9 +- ftplugin/text.vim | 9 +- ftplugin/textile.vim | 9 +- ftplugin/tmux.vim | 9 +- ftplugin/toml.vim | 9 +- ftplugin/treetop.vim | 9 +- ftplugin/tt2html.vim | 9 +- ftplugin/twig.vim | 9 +- ftplugin/typescript.vim | 9 +- ftplugin/typescriptreact.vim | 9 +- ftplugin/udevconf.vim | 9 +- ftplugin/udevperm.vim | 9 +- ftplugin/updatedb.vim | 9 +- ftplugin/vala.vim | 9 +- ftplugin/vb.vim | 9 +- ftplugin/verilog.vim | 9 +- ftplugin/vhdl.vim | 9 +- ftplugin/vlang.vim | 9 +- ftplugin/vroom.vim | 9 +- ftplugin/vue.vim | 9 +- ftplugin/wast.vim | 9 +- ftplugin/xdefaults.vim | 9 +- ftplugin/xf86conf.vim | 9 +- ftplugin/xhtml.vim | 9 +- ftplugin/xinetd.vim | 9 +- ftplugin/xmodmap.vim | 9 +- ftplugin/xs.vim | 9 +- ftplugin/xsd.vim | 9 +- ftplugin/xslt.vim | 9 +- ftplugin/yaml.vim | 9 +- ftplugin/zig.vim | 9 +- ftplugin/zimbu.vim | 9 +- indent/Jenkinsfile.vim | 9 +- indent/aap.vim | 9 +- indent/ada.vim | 9 +- indent/ansible.vim | 9 +- indent/ant.vim | 9 +- indent/applescript.vim | 9 +- indent/arduino.vim | 9 +- indent/autohotkey.vim | 9 +- indent/automake.vim | 9 +- indent/awk.vim | 9 +- indent/bib.vim | 9 +- indent/blade.vim | 9 +- indent/bst.vim | 9 +- indent/bzl.vim | 9 +- indent/cabal.vim | 9 +- indent/caddyfile.vim | 9 +- indent/cdl.vim | 9 +- indent/ch.vim | 9 +- indent/chaiscript.vim | 9 +- indent/clojure.vim | 9 +- indent/cmake.vim | 9 +- indent/cobol.vim | 9 +- indent/coffee.vim | 9 +- indent/config.vim | 9 +- indent/crystal.vim | 9 +- indent/cs.vim | 9 +- indent/css.vim | 9 +- indent/cucumber.vim | 9 +- indent/cuda.vim | 9 +- indent/cython.vim | 9 +- indent/d.vim | 9 +- indent/dart.vim | 9 +- indent/dictconf.vim | 9 +- indent/dictdconf.vim | 9 +- indent/dosbatch.vim | 9 +- indent/dtd.vim | 9 +- indent/dune.vim | 9 +- indent/dylan.vim | 9 +- indent/ecrystal.vim | 9 +- indent/eelixir.vim | 9 +- indent/elixir.vim | 9 +- indent/elm.vim | 9 +- indent/ember-script.vim | 9 +- indent/emblem.vim | 9 +- indent/erlang.vim | 9 +- indent/eruby.vim | 9 +- indent/eterm.vim | 9 +- indent/falcon.vim | 9 +- indent/fennel.vim | 9 +- indent/fish.vim | 9 +- indent/fortran.vim | 9 +- indent/framescript.vim | 9 +- indent/fsharp.vim | 9 +- indent/gdscript3.vim | 9 +- indent/gitconfig.vim | 9 +- indent/gitolite.vim | 9 +- indent/glsl.vim | 9 +- indent/go.vim | 9 +- indent/gohtmltmpl.vim | 9 +- indent/graphql.vim | 9 +- indent/haml.vim | 9 +- indent/hamster.vim | 9 +- indent/handlebars.vim | 9 +- indent/haskell.vim | 9 +- indent/hcl.vim | 9 +- indent/hog.vim | 9 +- indent/html.vim | 9 +- indent/htmldjango.vim | 9 +- indent/idris.vim | 9 +- indent/idris2.vim | 9 +- indent/j.vim | 9 +- indent/java.vim | 9 +- indent/javascript.vim | 9 +- indent/json.vim | 9 +- indent/jsp.vim | 9 +- indent/jst.vim | 9 +- indent/julia.vim | 9 +- indent/kotlin.vim | 9 +- indent/ld.vim | 9 +- indent/ledger.vim | 9 +- indent/less.vim | 9 +- indent/lifelines.vim | 9 +- indent/lilypond.vim | 9 +- indent/liquid.vim | 9 +- indent/lisp.vim | 9 +- indent/litcoffee.vim | 9 +- indent/llvm.vim | 9 +- indent/logtalk.vim | 9 +- indent/ls.vim | 9 +- indent/lua.vim | 9 +- indent/mail.vim | 9 +- indent/make.vim | 9 +- indent/mako.vim | 9 +- indent/markdown.vim | 9 +- indent/meson.vim | 9 +- indent/mf.vim | 9 +- indent/moon.vim | 9 +- indent/mp.vim | 9 +- indent/mustache.vim | 9 +- indent/nginx.vim | 9 +- indent/nim.vim | 9 +- indent/nix.vim | 9 +- indent/nsis.vim | 9 +- indent/ocaml.vim | 9 +- indent/occam.vim | 9 +- indent/octave.vim | 9 +- indent/odin.vim | 9 +- indent/omake.vim | 9 +- indent/opencl.vim | 9 +- indent/pascal.vim | 9 +- indent/perl.vim | 9 +- indent/pgsql.vim | 9 +- indent/plantuml.vim | 9 +- indent/pony.vim | 9 +- indent/postscr.vim | 9 +- indent/pov.vim | 9 +- indent/prolog.vim | 9 +- indent/proto.vim | 9 +- indent/ps1.vim | 9 +- indent/pug.vim | 9 +- indent/puppet.vim | 9 +- indent/purescript.vim | 9 +- indent/pyrex.vim | 9 +- indent/python.vim | 9 +- indent/qml.vim | 9 +- indent/racket.vim | 9 +- indent/raku.vim | 9 +- indent/razor.vim | 9 +- indent/readline.vim | 9 +- indent/reason.vim | 9 +- indent/rmd.vim | 9 +- indent/rnoweb.vim | 9 +- indent/rpl.vim | 9 +- indent/rrst.vim | 9 +- indent/rst.vim | 9 +- indent/ruby.vim | 9 +- indent/rust.vim | 9 +- indent/sas.vim | 9 +- indent/sass.vim | 9 +- indent/scala.vim | 9 +- indent/scheme.vim | 9 +- indent/scss.vim | 9 +- indent/sdl.vim | 9 +- indent/slim.vim | 9 +- indent/slime.vim | 9 +- indent/sml.vim | 9 +- indent/solidity.vim | 9 +- indent/sql.vim | 9 +- indent/sshconfig.vim | 9 +- indent/stylus.vim | 9 +- indent/svelte.vim | 9 +- indent/svg.vim | 9 +- indent/swift.vim | 9 +- indent/systemverilog.vim | 10 +- indent/tcl.vim | 9 +- indent/teraterm.vim | 9 +- indent/terraform.vim | 9 +- indent/tex.vim | 9 +- indent/tf.vim | 9 +- indent/tilde.vim | 9 +- indent/treetop.vim | 9 +- indent/twig.vim | 9 +- indent/typescript.vim | 9 +- indent/typescriptreact.vim | 10 +- indent/vala.vim | 9 +- indent/vb.vim | 9 +- indent/velocity.vim | 9 +- indent/verilog.vim | 9 +- indent/vhdl.vim | 9 +- indent/vlang.vim | 9 +- indent/vroom.vim | 9 +- indent/vue.vim | 9 +- indent/wast.vim | 9 +- indent/xf86conf.vim | 9 +- indent/xhtml.vim | 9 +- indent/xinetd.vim | 9 +- indent/xsd.vim | 9 +- indent/xslt.vim | 9 +- indent/yacc.vim | 9 +- indent/yaml.vim | 9 +- indent/zig.vim | 9 +- indent/zimbu.vim | 9 +- plugin/polyglot.vim | 2 +- scripts/build | 35 +- syntax/8th.vim | 9 +- syntax/Jenkinsfile.vim | 9 +- syntax/a2ps.vim | 9 +- syntax/a65.vim | 9 +- syntax/aap.vim | 9 +- syntax/abap.vim | 10 +- syntax/abaqus.vim | 9 +- syntax/abc.vim | 9 +- syntax/abel.vim | 9 +- syntax/acedb.vim | 9 +- syntax/ada.vim | 9 +- syntax/ahdl.vim | 9 +- syntax/aidl.vim | 9 +- syntax/alsaconf.vim | 9 +- syntax/aml.vim | 9 +- syntax/ampl.vim | 9 +- syntax/ansible.vim | 9 +- syntax/ansible_hosts.vim | 9 +- syntax/ant.vim | 9 +- syntax/apache.vim | 9 +- syntax/apachestyle.vim | 9 +- syntax/apiblueprint.vim | 9 +- syntax/applescript.vim | 9 +- syntax/aptconf.vim | 9 +- syntax/arch.vim | 9 +- syntax/arduino.vim | 9 +- syntax/art.vim | 9 +- syntax/asciidoc.vim | 9 +- syntax/asl.vim | 9 +- syntax/asn.vim | 9 +- syntax/aspperl.vim | 9 +- syntax/aspvbs.vim | 9 +- syntax/asterisk.vim | 9 +- syntax/asteriskvm.vim | 9 +- syntax/atlas.vim | 9 +- syntax/autodoc.vim | 9 +- syntax/autoit.vim | 9 +- syntax/automake.vim | 9 +- syntax/ave.vim | 9 +- syntax/awk.vim | 9 +- syntax/b.vim | 9 +- syntax/basic.vim | 9 +- syntax/basic/class.vim | 9 +- syntax/basic/cluster.vim | 9 +- syntax/basic/decorator.vim | 9 +- syntax/basic/doc.vim | 9 +- syntax/basic/function.vim | 9 +- syntax/basic/identifiers.vim | 9 +- syntax/basic/keyword.vim | 9 +- syntax/basic/literal.vim | 9 +- syntax/basic/members.vim | 9 +- syntax/basic/object.vim | 9 +- syntax/basic/patch.vim | 9 +- syntax/basic/reserved.vim | 9 +- syntax/basic/symbols.vim | 9 +- syntax/basic/type.vim | 9 +- syntax/bc.vim | 9 +- syntax/bdf.vim | 9 +- syntax/bib.vim | 9 +- syntax/bindzone.vim | 9 +- syntax/blade.vim | 9 +- syntax/blank.vim | 9 +- syntax/brewfile.vim | 9 +- syntax/bsdl.vim | 9 +- syntax/bst.vim | 9 +- syntax/bzl.vim | 9 +- syntax/bzr.vim | 9 +- syntax/c.vim | 9 +- syntax/cabal-1.vim | 9 +- syntax/cabal-2.vim | 9 +- syntax/caddyfile.vim | 9 +- syntax/calendar.vim | 9 +- syntax/carp.vim | 9 +- syntax/catalog.vim | 9 +- syntax/cdl.vim | 9 +- syntax/cdrdaoconf.vim | 9 +- syntax/cdrtoc.vim | 9 +- syntax/cf.vim | 9 +- syntax/cfg.vim | 9 +- syntax/ch.vim | 9 +- syntax/chaiscript.vim | 9 +- syntax/chaskell.vim | 9 +- syntax/chill.vim | 9 +- syntax/chordpro.vim | 9 +- syntax/cl.vim | 9 +- syntax/clean.vim | 9 +- syntax/clojure.vim | 9 +- syntax/cmake.vim | 9 +- syntax/cmod.vim | 9 +- syntax/cmusrc.vim | 9 +- syntax/cobol.vim | 9 +- syntax/coco.vim | 9 +- syntax/coffee.vim | 9 +- syntax/common.vim | 9 +- syntax/conaryrecipe.vim | 9 +- syntax/conf.vim | 9 +- syntax/config.vim | 9 +- syntax/cpp.vim | 9 +- syntax/cql.vim | 9 +- syntax/crm.vim | 9 +- syntax/crontab.vim | 9 +- syntax/cryptol.vim | 9 +- syntax/crystal.vim | 9 +- syntax/cs.vim | 9 +- syntax/csc.vim | 9 +- syntax/csdl.vim | 9 +- syntax/csp.vim | 9 +- syntax/css.vim | 9 +- syntax/csv.vim | 9 +- syntax/cterm.vim | 9 +- syntax/cucumber.vim | 9 +- syntax/cuda.vim | 9 +- syntax/cuesheet.vim | 9 +- syntax/cupl.vim | 9 +- syntax/cuplsim.vim | 9 +- syntax/cvs.vim | 9 +- syntax/cvsrc.vim | 9 +- syntax/cynpp.vim | 9 +- syntax/d.vim | 9 +- syntax/dart.vim | 9 +- syntax/datascript.vim | 9 +- syntax/dcd.vim | 9 +- syntax/dcov.vim | 9 +- syntax/dd.vim | 9 +- syntax/ddoc.vim | 9 +- syntax/debchangelog.vim | 9 +- syntax/debcontrol.vim | 9 +- syntax/debcopyright.vim | 9 +- syntax/debsources.vim | 9 +- syntax/def.vim | 9 +- syntax/denyhosts.vim | 9 +- syntax/desc.vim | 9 +- syntax/desktop.vim | 9 +- syntax/dhall.vim | 9 +- syntax/dictconf.vim | 9 +- syntax/dictdconf.vim | 9 +- syntax/diff.vim | 9 +- syntax/dircolors.vim | 9 +- syntax/django.vim | 9 +- syntax/dnsmasq.vim | 9 +- syntax/docker-compose.vim | 9 +- syntax/dockerfile.vim | 9 +- syntax/dosbatch.vim | 9 +- syntax/dosini.vim | 9 +- syntax/dot.vim | 9 +- syntax/dracula.vim | 9 +- syntax/dsdl.vim | 9 +- syntax/dsl.vim | 9 +- syntax/dtd.vim | 9 +- syntax/dts.vim | 9 +- syntax/dune.vim | 9 +- syntax/dylan.vim | 9 +- syntax/dylanintr.vim | 9 +- syntax/dylanlid.vim | 9 +- syntax/ecd.vim | 9 +- syntax/ecrystal.vim | 9 +- syntax/edif.vim | 9 +- syntax/eelixir.vim | 9 +- syntax/elf.vim | 9 +- syntax/elinks.vim | 9 +- syntax/elixir.vim | 9 +- syntax/elm.vim | 9 +- syntax/elmfilt.vim | 9 +- syntax/embeddedpuppet.vim | 9 +- syntax/ember-script.vim | 9 +- syntax/emblem.vim | 9 +- syntax/erlang.vim | 9 +- syntax/eruby.vim | 9 +- syntax/esmtprc.vim | 9 +- syntax/esqlc.vim | 9 +- syntax/esterel.vim | 9 +- syntax/eterm.vim | 9 +- syntax/exim.vim | 9 +- syntax/expect.vim | 9 +- syntax/exports.vim | 9 +- syntax/falcon.vim | 9 +- syntax/fan.vim | 9 +- syntax/fbs.vim | 9 +- syntax/fennel.vim | 9 +- syntax/ferm.vim | 9 +- syntax/fetchmail.vim | 9 +- syntax/fgl.vim | 9 +- syntax/fish.vim | 9 +- syntax/flow.vim | 9 +- syntax/focexec.vim | 9 +- syntax/forth.vim | 9 +- syntax/fortran.vim | 9 +- syntax/framescript.vim | 9 +- syntax/freebasic.vim | 9 +- syntax/fsharp.vim | 9 +- syntax/fstab.vim | 9 +- syntax/fvwm.vim | 9 +- syntax/gdb.vim | 9 +- syntax/gdmo.vim | 9 +- syntax/gdscript3.vim | 9 +- syntax/gedcom.vim | 9 +- syntax/git.vim | 9 +- syntax/gitcommit.vim | 9 +- syntax/gitconfig.vim | 9 +- syntax/gitignore.vim | 9 +- syntax/gitolite.vim | 9 +- syntax/gitrebase.vim | 9 +- syntax/gitsendemail.vim | 9 +- syntax/gkrellmrc.vim | 9 +- syntax/glsl.vim | 9 +- syntax/gmpl.vim | 9 +- syntax/gnash.vim | 9 +- syntax/gnuplot.vim | 9 +- syntax/go.vim | 9 +- syntax/godebugoutput.vim | 9 +- syntax/godebugstacktrace.vim | 9 +- syntax/godebugvariables.vim | 9 +- syntax/godefstack.vim | 9 +- syntax/gohtmltmpl.vim | 9 +- syntax/gomod.vim | 9 +- syntax/gotexttmpl.vim | 9 +- syntax/gp.vim | 9 +- syntax/gpg.vim | 9 +- syntax/grads.vim | 9 +- syntax/graphql.vim | 9 +- syntax/gretl.vim | 9 +- syntax/groovy.vim | 9 +- syntax/group.vim | 9 +- syntax/grub.vim | 9 +- syntax/gsl.vim | 9 +- syntax/gsp.vim | 9 +- syntax/gtkrc.vim | 9 +- syntax/haml.vim | 9 +- syntax/hamster.vim | 9 +- syntax/handlebars.vim | 9 +- syntax/haproxy.vim | 9 +- syntax/haskell.vim | 9 +- syntax/haste.vim | 9 +- syntax/hastepreproc.vim | 9 +- syntax/haxe.vim | 9 +- syntax/hb.vim | 9 +- syntax/hcl.vim | 9 +- syntax/helm.vim | 9 +- syntax/help.vim | 9 +- syntax/hercules.vim | 9 +- syntax/hex.vim | 9 +- syntax/hgcommit.vim | 9 +- syntax/hive.vim | 9 +- syntax/hog.vim | 9 +- syntax/hollywood.vim | 9 +- syntax/hostconf.vim | 9 +- syntax/hostsaccess.vim | 9 +- syntax/html.vim | 9 +- syntax/htmldjango.vim | 9 +- syntax/htmlm4.vim | 9 +- syntax/i3config.vim | 9 +- syntax/ibasic.vim | 9 +- syntax/icalendar.vim | 9 +- syntax/icemenu.vim | 9 +- syntax/icon.vim | 9 +- syntax/idris.vim | 9 +- syntax/idris2.vim | 9 +- syntax/indent.vim | 9 +- syntax/inform.vim | 9 +- syntax/initng.vim | 9 +- syntax/inittab.vim | 9 +- syntax/ion.vim | 9 +- syntax/ipfilter.vim | 9 +- syntax/iss.vim | 9 +- syntax/ist.vim | 9 +- syntax/j.vim | 9 +- syntax/jal.vim | 9 +- syntax/jam.vim | 9 +- syntax/java.vim | 9 +- syntax/javacc.vim | 9 +- syntax/javascript.vim | 9 +- syntax/jess.vim | 9 +- syntax/jgraph.vim | 9 +- syntax/jinja2.vim | 9 +- syntax/jovial.vim | 9 +- syntax/jproperties.vim | 9 +- syntax/jq.vim | 9 +- syntax/json.vim | 9 +- syntax/json5.vim | 9 +- syntax/jsonnet.vim | 9 +- syntax/jsp.vim | 9 +- syntax/jst.vim | 9 +- syntax/julia.vim | 9 +- syntax/juliadoc.vim | 9 +- syntax/kconfig.vim | 9 +- syntax/kivy.vim | 9 +- syntax/kix.vim | 9 +- syntax/kotlin.vim | 9 +- syntax/kscript.vim | 9 +- syntax/kwt.vim | 9 +- syntax/lace.vim | 9 +- syntax/latte.vim | 9 +- syntax/ld.vim | 9 +- syntax/ldif.vim | 9 +- syntax/ledger.vim | 9 +- syntax/less.vim | 9 +- syntax/lex.vim | 9 +- syntax/lftp.vim | 9 +- syntax/lhaskell.vim | 9 +- syntax/libao.vim | 9 +- syntax/lidris.vim | 9 +- syntax/lidris2.vim | 9 +- syntax/lifelines.vim | 9 +- syntax/lilo.vim | 9 +- syntax/lilypond-words.vim | 9 +- syntax/lilypond.vim | 9 +- syntax/limits.vim | 9 +- syntax/liquid.vim | 9 +- syntax/lisp.vim | 9 +- syntax/litcoffee.vim | 9 +- syntax/lite.vim | 9 +- syntax/litestep.vim | 9 +- syntax/llvm.vim | 9 +- syntax/log.vim | 9 +- syntax/loginaccess.vim | 9 +- syntax/logindefs.vim | 9 +- syntax/logtalk.vim | 9 +- syntax/lotos.vim | 9 +- syntax/lout.vim | 9 +- syntax/lpc.vim | 9 +- syntax/lprolog.vim | 9 +- syntax/ls.vim | 9 +- syntax/lsl.vim | 9 +- syntax/lss.vim | 9 +- syntax/lua.vim | 9 +- syntax/lynx.vim | 9 +- syntax/m4.vim | 9 +- syntax/mail.vim | 9 +- syntax/mailaliases.vim | 9 +- syntax/mailcap.vim | 9 +- syntax/make.vim | 9 +- syntax/mako.vim | 9 +- syntax/mallard.vim | 9 +- syntax/manconf.vim | 9 +- syntax/maple.vim | 9 +- syntax/markdown.vim | 9 +- syntax/mason.vim | 9 +- syntax/master.vim | 9 +- syntax/mel.vim | 9 +- syntax/merlin.vim | 9 +- syntax/meson.vim | 9 +- syntax/messages.vim | 9 +- syntax/mf.vim | 9 +- syntax/mgl.vim | 9 +- syntax/mgp.vim | 9 +- syntax/mib.vim | 9 +- syntax/mix.vim | 9 +- syntax/mma.vim | 9 +- syntax/mmp.vim | 9 +- syntax/modconf.vim | 9 +- syntax/modula2.vim | 9 +- syntax/modula3.vim | 9 +- syntax/monk.vim | 9 +- syntax/moo.vim | 9 +- syntax/moon.vim | 9 +- syntax/mp.vim | 9 +- syntax/mplayerconf.vim | 9 +- syntax/mrxvtrc.vim | 9 +- syntax/msidl.vim | 9 +- syntax/msql.vim | 9 +- syntax/mupad.vim | 9 +- syntax/murphi.vim | 9 +- syntax/mush.vim | 9 +- syntax/mustache.vim | 9 +- syntax/muttrc.vim | 9 +- syntax/mysql.vim | 9 +- syntax/n1ql.vim | 9 +- syntax/named.vim | 9 +- syntax/nanorc.vim | 9 +- syntax/natural.vim | 9 +- syntax/ncf.vim | 9 +- syntax/neomuttrc.vim | 9 +- syntax/netrc.vim | 9 +- syntax/nginx.vim | 9 +- syntax/nim.vim | 9 +- syntax/ninja.vim | 9 +- syntax/nix.vim | 9 +- syntax/nqc.vim | 9 +- syntax/nroff.vim | 9 +- syntax/nsis.vim | 9 +- syntax/oasis.vim | 9 +- syntax/obj.vim | 9 +- syntax/ocaml.vim | 9 +- syntax/ocamlbuild_tags.vim | 9 +- syntax/occam.vim | 9 +- syntax/ocpbuild.vim | 9 +- syntax/ocpbuildroot.vim | 9 +- syntax/octave.vim | 9 +- syntax/odin.vim | 9 +- syntax/omake.vim | 9 +- syntax/omnimark.vim | 9 +- syntax/opam.vim | 9 +- syntax/opencl.vim | 9 +- syntax/openroad.vim | 9 +- syntax/opl.vim | 9 +- syntax/ora.vim | 9 +- syntax/pamconf.vim | 9 +- syntax/pamenv.vim | 9 +- syntax/papp.vim | 9 +- syntax/pascal.vim | 9 +- syntax/passwd.vim | 9 +- syntax/pccts.vim | 9 +- syntax/pdf.vim | 9 +- syntax/perl.vim | 9 +- syntax/pf.vim | 9 +- syntax/pfmain.vim | 9 +- syntax/pgsql.vim | 9 +- syntax/php.vim | 9 +- syntax/pike.vim | 9 +- syntax/pilrc.vim | 9 +- syntax/pine.vim | 9 +- syntax/pinfo.vim | 9 +- syntax/plantuml.vim | 9 +- syntax/pli.vim | 9 +- syntax/plm.vim | 9 +- syntax/plp.vim | 9 +- syntax/plsql.vim | 9 +- syntax/po.vim | 9 +- syntax/pod.vim | 9 +- syntax/pony.vim | 9 +- syntax/postscr.vim | 9 +- syntax/pov.vim | 9 +- syntax/povini.vim | 9 +- syntax/ppd.vim | 9 +- syntax/ppwiz.vim | 9 +- syntax/privoxy.vim | 9 +- syntax/procmail.vim | 9 +- syntax/prolog.vim | 9 +- syntax/promela.vim | 9 +- syntax/proto.vim | 9 +- syntax/protocols.vim | 9 +- syntax/ps1.vim | 9 +- syntax/ps1xml.vim | 9 +- syntax/psf.vim | 9 +- syntax/pug.vim | 9 +- syntax/puppet.vim | 9 +- syntax/purescript.vim | 9 +- syntax/pyrex.vim | 9 +- syntax/python.vim | 9 +- syntax/qmake.vim | 9 +- syntax/qml.vim | 9 +- syntax/quake.vim | 9 +- syntax/racket.vim | 9 +- syntax/radiance.vim | 9 +- syntax/ragel.vim | 9 +- syntax/raku.vim | 9 +- syntax/raml.vim | 9 +- syntax/ratpoison.vim | 9 +- syntax/razor.vim | 9 +- syntax/rc.vim | 9 +- syntax/rcs.vim | 9 +- syntax/readline.vim | 9 +- syntax/reason.vim | 9 +- syntax/rego.vim | 9 +- syntax/remind.vim | 9 +- syntax/requirements.vim | 9 +- syntax/resolv.vim | 9 +- syntax/reva.vim | 9 +- syntax/rexx.vim | 9 +- syntax/rhelp.vim | 9 +- syntax/rib.vim | 9 +- syntax/rmd.vim | 9 +- syntax/rnc.vim | 9 +- syntax/rng.vim | 9 +- syntax/rnoweb-1.vim | 9 +- syntax/rnoweb-2.vim | 9 +- syntax/robots.vim | 9 +- syntax/rpcgen.vim | 9 +- syntax/rpl.vim | 9 +- syntax/rrst.vim | 9 +- syntax/rst.vim | 9 +- syntax/rtf.vim | 9 +- syntax/ruby.vim | 9 +- syntax/rust.vim | 9 +- syntax/samba.vim | 9 +- syntax/sas.vim | 9 +- syntax/sass.vim | 9 +- syntax/sather.vim | 9 +- syntax/sbt.vim | 9 +- syntax/scala.vim | 9 +- syntax/scheme.vim | 9 +- syntax/scilab.vim | 9 +- syntax/screen.vim | 9 +- syntax/scss.vim | 9 +- syntax/sd.vim | 9 +- syntax/sdc.vim | 9 +- syntax/sdl.vim | 9 +- syntax/sed.vim | 9 +- syntax/sensors.vim | 9 +- syntax/services.vim | 9 +- syntax/setserial.vim | 9 +- syntax/sexplib.vim | 9 +- syntax/sh.vim | 9 +- syntax/sieve.vim | 9 +- syntax/sil.vim | 9 +- syntax/simula.vim | 9 +- syntax/sinda.vim | 9 +- syntax/sisu.vim | 9 +- syntax/skill.vim | 9 +- syntax/slang.vim | 9 +- syntax/slice.vim | 9 +- syntax/slim.vim | 9 +- syntax/slime.vim | 9 +- syntax/slpconf.vim | 9 +- syntax/slpreg.vim | 9 +- syntax/slpspi.vim | 9 +- syntax/slrnrc.vim | 9 +- syntax/slrnsc.vim | 9 +- syntax/sm.vim | 9 +- syntax/smarty.vim | 9 +- syntax/smcl.vim | 9 +- syntax/smhl.vim | 9 +- syntax/smith.vim | 9 +- syntax/sml.vim | 9 +- syntax/smt2.vim | 9 +- syntax/snobol4.vim | 9 +- syntax/solidity.vim | 9 +- syntax/spec.vim | 9 +- syntax/spice.vim | 9 +- syntax/spup.vim | 9 +- syntax/spyce.vim | 9 +- syntax/sql.vim | 9 +- syntax/sqlj.vim | 9 +- syntax/sqloracle.vim | 9 +- syntax/sqr.vim | 9 +- syntax/squid.vim | 9 +- syntax/srec.vim | 9 +- syntax/sshconfig.vim | 9 +- syntax/sshdconfig.vim | 9 +- syntax/st.vim | 9 +- syntax/stata.vim | 9 +- syntax/stp.vim | 9 +- syntax/stylus.vim | 9 +- syntax/sudoers.vim | 9 +- syntax/svelte.vim | 9 +- syntax/svg.vim | 9 +- syntax/svn.vim | 9 +- syntax/swift.vim | 9 +- syntax/swiftgyb.vim | 9 +- syntax/sxhkdrc.vim | 9 +- syntax/sysctl.vim | 9 +- syntax/systemd.vim | 9 +- syntax/systemverilog.vim | 9 +- syntax/tablegen.vim | 9 +- syntax/tads.vim | 9 +- syntax/tags.vim | 9 +- syntax/tak.vim | 9 +- syntax/tap.vim | 9 +- syntax/taskdata.vim | 9 +- syntax/taskedit.vim | 9 +- syntax/tcl.vim | 9 +- syntax/template.vim | 9 +- syntax/teraterm.vim | 9 +- syntax/terminfo.vim | 9 +- syntax/terraform.vim | 9 +- syntax/tex.vim | 9 +- syntax/texinfo.vim | 9 +- syntax/texmf.vim | 9 +- syntax/textile.vim | 9 +- syntax/tf.vim | 9 +- syntax/thrift.vim | 9 +- syntax/tidy.vim | 9 +- syntax/tilde.vim | 9 +- syntax/tli.vim | 9 +- syntax/tmux.vim | 9 +- syntax/toml.vim | 9 +- syntax/tpp.vim | 9 +- syntax/tptp.vim | 9 +- syntax/trasys.vim | 9 +- syntax/treetop.vim | 9 +- syntax/trustees.vim | 9 +- syntax/tsalt.vim | 9 +- syntax/tsscl.vim | 9 +- syntax/tssgm.vim | 9 +- syntax/tssop.vim | 9 +- syntax/tt2.vim | 9 +- syntax/tt2html.vim | 9 +- syntax/tt2js.vim | 9 +- syntax/twig.vim | 9 +- syntax/typescript.vim | 9 +- syntax/typescriptreact.vim | 10 +- syntax/uc.vim | 9 +- syntax/udevconf.vim | 9 +- syntax/udevperm.vim | 9 +- syntax/uil.vim | 9 +- syntax/unison.vim | 9 +- syntax/updatedb.vim | 9 +- syntax/upstart.vim | 9 +- syntax/upstreamdat.vim | 9 +- syntax/upstreaminstalllog.vim | 9 +- syntax/upstreamlog.vim | 9 +- syntax/usserverlog.vim | 9 +- syntax/usw2kagtlog.vim | 9 +- syntax/vala.vim | 9 +- syntax/vb.vim | 9 +- syntax/vbnet.vim | 9 +- syntax/vcl.vim | 9 +- syntax/velocity.vim | 9 +- syntax/vera.vim | 9 +- syntax/verilog.vim | 9 +- syntax/verilogams.vim | 9 +- syntax/vgrindefs.vim | 9 +- syntax/vhdl.vim | 9 +- syntax/vimgo.vim | 9 +- syntax/viminfo.vim | 9 +- syntax/vlang.vim | 9 +- syntax/vmasm.vim | 9 +- syntax/voscm.vim | 9 +- syntax/vrml.vim | 9 +- syntax/vroom.vim | 9 +- syntax/vue.vim | 9 +- syntax/wast.vim | 9 +- syntax/webmacro.vim | 9 +- syntax/wget.vim | 9 +- syntax/winbatch.vim | 9 +- syntax/wml.vim | 9 +- syntax/wsh.vim | 9 +- syntax/wsml.vim | 9 +- syntax/wvdial.vim | 9 +- syntax/xdc.vim | 9 +- syntax/xdefaults.vim | 9 +- syntax/xf86conf.vim | 9 +- syntax/xhtml.vim | 9 +- syntax/xinetd.vim | 9 +- syntax/xmath.vim | 9 +- syntax/xml.vim | 9 +- syntax/xmodmap.vim | 9 +- syntax/xpm.vim | 9 +- syntax/xpm2.vim | 9 +- syntax/xquery.vim | 9 +- syntax/xs.vim | 9 +- syntax/xsd.vim | 9 +- syntax/xsl.vim | 9 +- syntax/xslt.vim | 9 +- syntax/yacc.vim | 9 +- syntax/yaml.vim | 9 +- syntax/yats.vim | 9 +- syntax/yats/css.vim | 9 +- syntax/yats/dom-document.vim | 9 +- syntax/yats/dom-elem.vim | 9 +- syntax/yats/dom-event.vim | 9 +- syntax/yats/dom-form.vim | 9 +- syntax/yats/dom-node.vim | 9 +- syntax/yats/dom-storage.vim | 9 +- syntax/yats/ecma-402.vim | 9 +- syntax/yats/es6-array.vim | 9 +- syntax/yats/es6-date.vim | 9 +- syntax/yats/es6-function.vim | 9 +- syntax/yats/es6-json.vim | 9 +- syntax/yats/es6-map.vim | 9 +- syntax/yats/es6-math.vim | 9 +- syntax/yats/es6-number.vim | 9 +- syntax/yats/es6-object.vim | 9 +- syntax/yats/es6-promise.vim | 9 +- syntax/yats/es6-proxy.vim | 9 +- syntax/yats/es6-reflect.vim | 9 +- syntax/yats/es6-regexp.vim | 9 +- syntax/yats/es6-set.vim | 9 +- syntax/yats/es6-string.vim | 9 +- syntax/yats/es6-symbol.vim | 9 +- syntax/yats/event.vim | 9 +- syntax/yats/node.vim | 9 +- syntax/yats/test.vim | 9 +- syntax/yats/typescript.vim | 9 +- syntax/yats/web-blob.vim | 9 +- syntax/yats/web-console.vim | 9 +- syntax/yats/web-crypto.vim | 9 +- syntax/yats/web-encoding.vim | 9 +- syntax/yats/web-fetch.vim | 9 +- syntax/yats/web-geo.vim | 9 +- syntax/yats/web-history.vim | 9 +- syntax/yats/web-location.vim | 9 +- syntax/yats/web-navigator.vim | 9 +- syntax/yats/web-network.vim | 9 +- syntax/yats/web-payment.vim | 9 +- syntax/yats/web-service-worker.vim | 9 +- syntax/yats/web-window.vim | 9 +- syntax/yats/web-xhr.vim | 9 +- syntax/yats/web.vim | 9 +- syntax/z8a.vim | 9 +- syntax/zephir.vim | 9 +- syntax/zig.vim | 9 +- syntax/zimbu.vim | 9 +- syntax/zir.vim | 9 +- syntax/zsh.vim | 9 +- 1293 files changed, 2073 insertions(+), 10649 deletions(-) create mode 100644 autoload/polyglot/util.vim 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(':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(':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(':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(':p')) + finish +endif " Maintainer: othree " 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= - -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(':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(':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(':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(':p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source :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(':p')) + finish +endif source :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(':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(':p')) + finish +endif " Copyright (c) 2018 rhysd " @@ -483,5 +485,3 @@ endfunction if !exists(':LLI') command! -buffer -nargs=? -bar -complete=file LLI call run_lli() 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(':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 => =>:call puppet#align#AlignHashrockets()$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(':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(':p')) + finish +endif source :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(':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(':p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source :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(':p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise " @@ -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(':p')) + finish +endif source :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(':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(':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(':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(':p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise " @@ -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(':p')) + finish +endif source :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(':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(':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(':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(':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(':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(':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=++ contains=@Spell syntax region htmlComment start=++ - -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(':p')) + finish +endif " Vim syntax file " Language: WAI-ARIA @@ -75,5 +77,3 @@ syn match htmlArg contained "\" syn match htmlArg contained "\" - -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(':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(':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(':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(':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(':p')) + finish +endif if get(g:, 'vim_jsx_pretty_disable_js', 0) finish endif source :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(':p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise " @@ -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(':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(':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(':p')) + finish +endif source :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(':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(':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(':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(':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(':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(':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(':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(':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(':p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise " @@ -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(':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(':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(':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(':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(':p')) + finish +endif " Copyright (c) 2016-2020 Jon Parise " @@ -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(':p')) + finish +endif source :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(':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(':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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " Author: Antony Lee " 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch @@ -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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt @@ -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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 let s:path = expand(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise " @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 let g:nim_log = [] let s:plugin_path = escape(expand(':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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Author: Stephen Sugden " @@ -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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:_plugin_name = expand(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 let s:plugin_name = expand(':t:r') let s:vital_base_dir = expand(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch @@ -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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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: 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(":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(':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(":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(':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(":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(':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(":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(':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(":r") | let b:mako_outer_lang = &filetype au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand(":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(":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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 " Language: Caddyfile " Author: Josh Glendenning @@ -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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdrdaoconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch @@ -412,5 +407,3 @@ command! -buffer -range=% -bar -nargs=* CoffeeRun \ call s:CoffeeRun(, , ) command! -buffer -range=% -bang -bar -nargs=* CoffeeLint \ call s:CoffeeLint(, , , ) - -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'denyhosts') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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 [] ':silent keeppatterns ?'.b:block_end .':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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov > @@ -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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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 q :q 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(":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(':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(":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(':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(":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(':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 :=v:count1Cycle nnoremap :=v:count1Cycle! let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap K'|exe 'nunmap '|exe 'nunmap '" - -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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise " @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 " File: ftplugin/hcl.vim " Author: BABAROT @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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 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(":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(':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 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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 BUncomOn :'<,'>`0i/*`>o0i*/`< vnoremap BUncomOff :'<,'>`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(":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(':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(, , ) " Run some LiveScript. command! -range=% -bar LiveScriptRun ,: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(":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(':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(":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(':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 MailQuote :s/^/> /:noh`` nnoremap MailQuote :.,$s/^/> /:noh`` 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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailaliases') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull @@ -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(":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(':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(":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(':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\>,\:\,^!\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(":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(':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(":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(':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(":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(':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 call s:MarkdownRefreshSyntax(0) autocmd CursorHold,CursorHoldI 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 " Language: MoonScript " Maintainer: leafo @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Language: OCaml " Maintainer: David Baelde @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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 = '\:\:\' " 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1 " Language: Racket " Maintainer: Will Langstroth @@ -83,5 +78,3 @@ let b:undo_ftplugin = \. "| setl makeprg< commentstring<" \. "| nunmap K" \. "| vunmap 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim filetype plugin " Language: Ruby " Maintainer: Tim Pope " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns - +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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim filetype plugin " Language: Scala @@ -183,5 +178,3 @@ noremap + 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 " Language: Caddyfile " Author: Josh Glendenning @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmusrc') == -1 " Vim syntax file " Previous Maintainer: Nikolai Weibull @@ -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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 " dockerfile.vim - Syntax highlighting for Dockerfiles " Maintainer: Honza Pokorny @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 if &syntax !~# '\' || get(b:, 'current_syntax') =~# '\' 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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov > @@ -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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1 " Language: OpenGL Shading Language " Maintainer: Sergey Tikhomirov @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise " @@ -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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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(":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(':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=+