diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-01 08:33:15 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-01 08:33:15 +0200 |
commit | e166f741ef054ea990aa6d1af85b97ceb82171bb (patch) | |
tree | 275e4f7660eaa181cc3e40f71ce72ba8864e6c71 | |
parent | d4fcef1aa835f20f4f9df41eceb406b66f446f70 (diff) | |
download | vim-polyglot-e166f741ef054ea990aa6d1af85b97ceb82171bb.tar.gz vim-polyglot-e166f741ef054ea990aa6d1af85b97ceb82171bb.zip |
Some major updates including heuristicsv4.6.0
- Allow to define heuristics in heuristics.yaml
- Migrate all filetypes from vim beginning with "a"
- Remove enhanced cpp syntax (it was too slow to load)
- Use setf instead of set ft for setting filetype (faster)
- Override native hauristics with au!
- Add globbing of files for packages
- Replace predefined dirs with extra_dirs and ignored_dirs
- Allow to define proper order of packages with topological sort
- Fix powershell detection
- Lint and fix many packages.yaml issues
- etc etd
77 files changed, 10775 insertions, 3920 deletions
@@ -1,7 +1,10 @@ -.PHONY: all +.PHONY: all test dev all: @ scripts/build test: @ scripts/test + +dev: + @ echo "packages.yaml\nheuristics.yaml\nscripts/test\nscripts/build\nscripts/test_extensions.vim" | DEV=1 entr bash -c 'make && make test' @@ -7,7 +7,7 @@ A collection of language packs for Vim. > One to rule them all, one to find them, one to bring them all and in the darkness bind them. - It **won't affect your startup time**, as scripts are loaded only on demand\*. -- It **installs and updates 120+ times faster** than the <!--Package Count-->155<!--/Package Count--> packages it consists of. +- It **installs and updates 120+ times faster** than the <!--Package Count-->190<!--/Package Count--> packages it consists of. - It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect). - Solid syntax and indentation support (other features skipped). Only the best language packs. - All unnecessary files are ignored (like enormous documentation from php support). @@ -43,161 +43,196 @@ If you need full functionality of any plugin, please use it directly with your p ## Language packs <!--Language Packs--> -- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (syntax) -- [ansible](https://github.com/pearofducks/ansible-vim) (syntax, indent, ftplugin) -- [apiblueprint](https://github.com/sheerun/apiblueprint.vim) (syntax, ctags) -- [applescript](https://github.com/mityu/vim-applescript) (syntax, indent) -- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent) -- [asciidoc](https://github.com/asciidoc/vim-asciidoc) (syntax) -- [autohotkey](https://github.com/hnamikaw/vim-autohotkey) (indent) -- [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftplugin) -- [brewfile](https://github.com/bfontaine/Brewfile.vim) (syntax) -- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax) -- [c/c++](https://github.com/vim-jp/vim-cpp) (syntax) -- [caddyfile](https://github.com/isobit/vim-caddyfile) (syntax, indent, ftplugin) -- [carp](https://github.com/hellerve/carp-vim) (syntax) -- [cjsx](https://github.com/mtscout6/vim-cjsx) (syntax, ftplugin) -- [clojure](https://github.com/guns/vim-clojure-static) (syntax, indent, doc, autoload, ftplugin) -- [cmake](https://github.com/pboettch/vim-cmake-syntax) (syntax, indent) -- [coffee-script](https://github.com/kchmck/vim-coffee-script) (syntax, indent, doc, compiler, autoload, ftplugin) -- [cql](https://github.com/elubow/cql-vim) (syntax) -- [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) (syntax, doc, compiler, ftplugin) -- [crystal](https://github.com/rhysd/vim-crystal) (syntax, indent, autoload, ftplugin) -- [csv](https://github.com/chrisbra/csv.vim) (syntax, doc, autoload, ftplugin) -- [cucumber](https://github.com/tpope/vim-cucumber) (syntax, indent, compiler, ftplugin) -- [cue](https://github.com/mgrabovsky/vim-cuesheet) (syntax) -- [dart](https://github.com/dart-lang/dart-vim-plugin) (syntax, indent, doc, autoload, ftplugin) -- [dhall](https://github.com/vmchale/dhall-vim) (syntax, doc, ftplugin) -- [dlang](https://github.com/JesseKPhillips/d.vim) (syntax, indent) -- [dockerfile](https://github.com/ekalinin/Dockerfile.vim) (syntax, indent, ftplugin) -- [elixir](https://github.com/elixir-lang/vim-elixir) (syntax, indent, doc, compiler, autoload, ftplugin) -- [elm](https://github.com/andys8/vim-elm-syntax) (syntax, indent) -- [emberscript](https://github.com/yalesov/vim-ember-script) (syntax, indent, ftplugin) -- [emblem](https://github.com/yalesov/vim-emblem) (syntax, indent, ftplugin) -- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (syntax, indent) -- [fennel](https://github.com/bakpakin/fennel.vim) (syntax, indent, ftplugin) -- [ferm](https://github.com/vim-scripts/ferm.vim) (syntax) -- [fish](https://github.com/georgewitteman/vim-fish) (syntax, indent, compiler, autoload, ftplugin) -- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (syntax) -- [fsharp](https://github.com/ionide/Ionide-vim) (syntax, indent, doc, autoload) -- [gdscript](https://github.com/calviken/vim-gdscript3) (syntax, indent) -- [git](https://github.com/tpope/vim-git) (syntax, indent, doc, ftplugin) -- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent) -- [gmpl](https://github.com/maelvalais/gmpl.vim) (syntax) -- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax) -- [go](https://github.com/fatih/vim-go) (syntax, indent, doc, compiler) -- [gradle](https://github.com/tfnico/vim-gradle) (compiler) -- [graphql](https://github.com/jparise/vim-graphql) (syntax, indent, autoload, ftplugin, after, doc) -- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin) -- [handlebars](https://github.com/sheerun/vim-mustache-handlebars) (syntax, indent, ftplugin) -- [haproxy](https://github.com/CH-DanReif/haproxy.vim) (syntax) -- [haskell](https://github.com/neovimhaskell/haskell-vim) (syntax, indent, doc, ftplugin) -- [haxe](https://github.com/yaymukund/vim-haxe) (syntax) -- [hcl](https://github.com/b4b4r07/vim-hcl) (syntax, indent, ftplugin) -- [helm](https://github.com/towolf/vim-helm) (syntax) -- [hive](https://github.com/zebradil/hive.vim) (syntax, ftplugin) -- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin) -- [i3](https://github.com/mboughaba/i3config.vim) (syntax, ftplugin) -- [icalendar](https://github.com/chutzpah/icalendar.vim) (syntax) -- [idris](https://github.com/idris-hackers/idris-vim) (syntax, indent, doc, ftplugin) -- [ion](https://github.com/vmchale/ion-vim) (syntax, ftplugin) -- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, ftplugin, extras) -- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (syntax, indent) -- [jinja](https://github.com/lepture/vim-jinja) (syntax, indent) -- [jq](https://github.com/vito-c/jq.vim) (syntax, ftplugin) -- [json5](https://github.com/GutenYe/json5.vim) (syntax) -- [json](https://github.com/elzr/vim-json) (syntax, indent, ftplugin) -- [jsonnet](https://github.com/google/vim-jsonnet) (syntax, doc, autoload, ftplugin) -- [jst](https://github.com/briancollins/vim-jst) (syntax, indent) -- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (autoload, after, doc) -- [julia](https://github.com/JuliaEditorSupport/julia-vim) (syntax, indent, doc, autoload, ftplugin) -- [kotlin](https://github.com/udalov/kotlin-vim) (syntax, indent, ftplugin) -- [ledger](https://github.com/ledger/vim-ledger) (syntax, indent, doc, compiler, autoload) -- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin) -- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (syntax, indent, compiler, ftplugin) -- [livescript](https://github.com/gkz/vim-ls) (syntax, indent, compiler, ftplugin) -- [llvm](https://github.com/rhysd/vim-llvm) (syntax, indent, ftplugin) -- [log](https://github.com/MTDL9/vim-log-highlighting) (syntax, doc) -- [lua](https://github.com/tbastos/vim-lua) (syntax, indent) -- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin) -- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent, doc, ftplugin) -- [mathematica](https://github.com/voldikss/vim-mma) (syntax, ftplugin) -- [mdx](https://github.com/jxnblk/vim-mdx-js) (syntax) -- [meson](https://github.com/mesonbuild/meson) (syntax, indent, ftplugin) -- [moonscript](https://github.com/leafo/moonscript-vim) (syntax, indent, ftplugin) -- [nginx](https://github.com/chr4/nginx.vim) (syntax, indent, ftplugin) -- [nim](https://github.com/zah/nim.vim) (syntax, indent, compiler, autoload) -- [nix](https://github.com/LnL7/vim-nix) (syntax, indent, compiler, ftplugin) -- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent) -- [ocaml](https://github.com/rgrinberg/vim-ocaml) (syntax, indent, doc, compiler, ftplugin) -- [octave](https://github.com/McSinyx/vim-octave) (syntax, indent) -- [opencl](https://github.com/petRUShka/vim-opencl) (syntax, indent, ftplugin) -- [perl](https://github.com/vim-perl/vim-perl) (syntax, indent, ftplugin) -- [pgsql](https://github.com/lifepillar/pgsql.vim) (syntax, indent, doc) -- [php](https://github.com/StanAngeloff/php.vim) (syntax) -- [plantuml](https://github.com/aklt/plantuml-syntax) (syntax, indent, ftplugin) -- [pony](https://github.com/jakwings/vim-pony) (syntax, indent, autoload, ftplugin) -- [powershell](https://github.com/PProvost/vim-ps1) (syntax, indent, doc, compiler, ftplugin) -- [protobuf](https://github.com/uarun/vim-protobuf) (syntax, indent) -- [pug](https://github.com/digitaltoad/vim-pug) (syntax, indent, ftplugin) -- [puppet](https://github.com/rodjek/vim-puppet) (syntax, indent, autoload, ftplugin, ctags) -- [purescript](https://github.com/purescript-contrib/purescript-vim) (syntax, indent, ftplugin) -- [python-compiler](https://github.com/aliev/vim-compiler-python) (compiler, autoload) -- [python-indent](https://github.com/Vimjas/vim-python-pep8-indent) (indent) -- [python](https://github.com/vim-python/python-syntax) (syntax, doc) -- [qmake](https://github.com/artoj/qmake-syntax-vim) (syntax) -- [qml](https://github.com/peterhoeg/vim-qml) (syntax, indent, ftplugin) -- [r-lang](https://github.com/vim-scripts/R.vim) (syntax) -- [racket](https://github.com/wlangstroth/vim-racket) (syntax, indent, ftplugin) -- [ragel](https://github.com/jneen/ragel.vim) (syntax) -- [raku](https://github.com/Raku/vim-raku) (syntax, indent, ftplugin) -- [raml](https://github.com/IN3D/vim-raml) (syntax, doc, ftplugin) -- [razor](https://github.com/adamclerk/vim-razor) (syntax, indent, ftplugin) -- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent, doc) -- [requirements](https://github.com/raimon49/requirements.txt.vim) (syntax, autoload) -- [rspec](https://github.com/keith/rspec.vim) (syntax) -- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, indent, autoload, ftplugin) -- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, doc, compiler, autoload, ftplugin) -- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, doc, compiler, autoload, ftplugin, ctags) -- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax) -- [scala](https://github.com/derekwyatt/vim-scala) (syntax, indent, doc, compiler, ftplugin, ctags) -- [scss](https://github.com/cakebaker/scss-syntax.vim) (syntax, indent, ftplugin) -- [sh](https://github.com/arzg/vim-sh) (syntax) -- [slim](https://github.com/slim-template/vim-slim) (syntax, indent, ftplugin) -- [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent) -- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin) -- [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin) -- [sql](https://github.com/shmup/vim-sql-syntax) (syntax) -- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin) -- [svelte](https://github.com/evanleck/vim-svelte) (syntax, indent, ftplugin) -- [svg-indent](https://github.com/jasonshell/vim-svg-indent) (indent) -- [svg](https://github.com/vim-scripts/svg.vim) (syntax) -- [swift](https://github.com/keith/swift.vim) (syntax, indent, compiler, ftplugin, ctags) -- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (syntax) -- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (syntax, ftplugin) -- [terraform](https://github.com/hashivim/vim-terraform) (syntax, indent, doc, autoload, ftplugin) -- [textile](https://github.com/timcharper/textile.vim) (syntax, doc, ftplugin) -- [thrift](https://github.com/solarnz/thrift.vim) (syntax) -- [tmux](https://github.com/ericpruitt/tmux.vim) (syntax, ftplugin) -- [toml](https://github.com/cespare/vim-toml) (syntax, ftplugin) -- [tptp](https://github.com/c-cube/vim-tptp) (syntax) -- [twig](https://github.com/lumiliet/vim-twig) (syntax, indent, ftplugin) -- [typescript](https://github.com/HerringtonDarkholme/yats.vim) (syntax, indent, compiler, ftplugin, ctags) -- [unison](https://github.com/unisonweb/unison) (syntax) -- [v](https://github.com/ollykel/v-vim) (syntax, indent, ftplugin) -- [vala](https://github.com/arrufat/vala.vim) (syntax, indent, ftplugin) -- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax) -- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax) -- [velocity](https://github.com/lepture/vim-velocity) (syntax, indent) -- [vue](https://github.com/posva/vim-vue) (syntax, indent, ftplugin) -- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (syntax) -- [xml](https://github.com/amadeus/vim-xml) (syntax) -- [xsl](https://github.com/vim-scripts/XSLT-syntax) (syntax) -- [yaml](https://github.com/stephpy/vim-yaml) (syntax, ftplugin) -- [yard](https://github.com/sheerun/vim-yardoc) (syntax) -- [zephir](https://github.com/xwsoul/vim-zephir) (syntax) -- [zig](https://github.com/ziglang/zig.vim) (syntax, indent, autoload, ftplugin) -- [zinit](https://github.com/zinit-zsh/zplugin-vim-syntax) (syntax) +- [8th](https://github.com/vim/vim/tree/master/runtime) +- [a2ps](https://github.com/vim/vim/tree/master/runtime) +- [a65](https://github.com/vim/vim/tree/master/runtime) +- [aap](https://github.com/vim/vim/tree/master/runtime) +- [abap](https://github.com/vim/vim/tree/master/runtime) +- [abaqus](https://github.com/vim/vim/tree/master/runtime) +- [abc](https://github.com/vim/vim/tree/master/runtime) +- [abel](https://github.com/vim/vim/tree/master/runtime) +- [acedb](https://github.com/vim/vim/tree/master/runtime) +- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) +- [ada](https://github.com/vim/vim/tree/master/runtime) +- [ahdl](https://github.com/vim/vim/tree/master/runtime) +- [aidl](https://github.com/vim/vim/tree/master/runtime) +- [alsaconf](https://github.com/vim/vim/tree/master/runtime) +- [aml](https://github.com/vim/vim/tree/master/runtime) +- [ampl](https://github.com/vim/vim/tree/master/runtime) +- [ansible](https://github.com/pearofducks/ansible-vim) +- [ant](https://github.com/vim/vim/tree/master/runtime) +- [apache](https://github.com/vim/vim/tree/master/runtime) +- [apiblueprint](https://github.com/sheerun/apiblueprint.vim) +- [applescript](https://github.com/mityu/vim-applescript) +- [aptconf](https://github.com/vim/vim/tree/master/runtime) +- [arch](https://github.com/vim/vim/tree/master/runtime) +- [arduino](https://github.com/sudar/vim-arduino-syntax) +- [art](https://github.com/vim/vim/tree/master/runtime) +- [asciidoc](https://github.com/asciidoc/vim-asciidoc) +- [asn](https://github.com/vim/vim/tree/master/runtime) +- [aspperl](https://github.com/vim/vim/tree/master/runtime) +- [aspvbs](https://github.com/vim/vim/tree/master/runtime) +- [atlas](https://github.com/vim/vim/tree/master/runtime) +- [autohotkey](https://github.com/hnamikaw/vim-autohotkey) +- [autoit](https://github.com/vim/vim/tree/master/runtime) +- [automake](https://github.com/vim/vim/tree/master/runtime) +- [ave](https://github.com/vim/vim/tree/master/runtime) +- [awk](https://github.com/vim/vim/tree/master/runtime) +- [blade](https://github.com/jwalton512/vim-blade) +- [brewfile](https://github.com/bfontaine/Brewfile.vim) +- [c/c++](https://github.com/vim-jp/vim-cpp) +- [caddyfile](https://github.com/isobit/vim-caddyfile) +- [carp](https://github.com/hellerve/carp-vim) +- [cjsx](https://github.com/mtscout6/vim-cjsx) +- [clojure](https://github.com/guns/vim-clojure-static) +- [cmake](https://github.com/pboettch/vim-cmake-syntax) +- [coffee-script](https://github.com/kchmck/vim-coffee-script) +- [cql](https://github.com/elubow/cql-vim) +- [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) +- [crystal](https://github.com/rhysd/vim-crystal) +- [csv](https://github.com/chrisbra/csv.vim) +- [cucumber](https://github.com/tpope/vim-cucumber) +- [cue](https://github.com/mgrabovsky/vim-cuesheet) +- [dart](https://github.com/dart-lang/dart-vim-plugin) +- [dhall](https://github.com/vmchale/dhall-vim) +- [dlang](https://github.com/JesseKPhillips/d.vim) +- [dockerfile](https://github.com/ekalinin/Dockerfile.vim) +- [elf](https://github.com/vim/vim/tree/master/runtime) +- [elixir](https://github.com/elixir-lang/vim-elixir) +- [elm](https://github.com/andys8/vim-elm-syntax) +- [emberscript](https://github.com/yalesov/vim-ember-script) +- [emblem](https://github.com/yalesov/vim-emblem) +- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) +- [fennel](https://github.com/bakpakin/fennel.vim) +- [ferm](https://github.com/vim-scripts/ferm.vim) +- [fish](https://github.com/georgewitteman/vim-fish) +- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) +- [forth](https://github.com/vim/vim/tree/master/runtime) +- [fsharp](https://github.com/ionide/Ionide-vim) +- [gdscript](https://github.com/calviken/vim-gdscript3) +- [git](https://github.com/tpope/vim-git) +- [glsl](https://github.com/tikhomirov/vim-glsl) +- [gmpl](https://github.com/maelvalais/gmpl.vim) +- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) +- [go](https://github.com/fatih/vim-go) +- [gradle](https://github.com/tfnico/vim-gradle) +- [graphql](https://github.com/jparise/vim-graphql) +- [grub](https://github.com/vim/vim/tree/master/runtime) +- [haml](https://github.com/sheerun/vim-haml) +- [handlebars](https://github.com/sheerun/vim-mustache-handlebars) +- [haproxy](https://github.com/CH-DanReif/haproxy.vim) +- [haskell](https://github.com/neovimhaskell/haskell-vim) +- [haxe](https://github.com/yaymukund/vim-haxe) +- [hcl](https://github.com/b4b4r07/vim-hcl) +- [helm](https://github.com/towolf/vim-helm) +- [help](https://github.com/vim/vim/tree/master/runtime) +- [hive](https://github.com/zebradil/hive.vim) +- [html5](https://github.com/othree/html5.vim) +- [i3](https://github.com/mboughaba/i3config.vim) +- [icalendar](https://github.com/chutzpah/icalendar.vim) +- [idris](https://github.com/idris-hackers/idris-vim) +- [ion](https://github.com/vmchale/ion-vim) +- [javascript](https://github.com/pangloss/vim-javascript) +- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) +- [jinja](https://github.com/lepture/vim-jinja) +- [jq](https://github.com/vito-c/jq.vim) +- [json5](https://github.com/GutenYe/json5.vim) +- [json](https://github.com/elzr/vim-json) +- [jsonnet](https://github.com/google/vim-jsonnet) +- [jst](https://github.com/briancollins/vim-jst) +- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) +- [julia](https://github.com/JuliaEditorSupport/julia-vim) +- [kotlin](https://github.com/udalov/kotlin-vim) +- [ledger](https://github.com/ledger/vim-ledger) +- [less](https://github.com/groenewege/vim-less) +- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) +- [livescript](https://github.com/gkz/vim-ls) +- [llvm](https://github.com/rhysd/vim-llvm) +- [log](https://github.com/MTDL9/vim-log-highlighting) +- [lua](https://github.com/tbastos/vim-lua) +- [m4](https://github.com/vim/vim/tree/master/runtime) +- [mako](https://github.com/sophacles/vim-bundle-mako) +- [markdown](https://github.com/plasticboy/vim-markdown) +- [mathematica](https://github.com/voldikss/vim-mma) +- [mdx](https://github.com/jxnblk/vim-mdx-js) +- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) +- [moonscript](https://github.com/leafo/moonscript-vim) +- [murphi](https://github.com/vim/vim/tree/master/runtime) +- [nginx](https://github.com/chr4/nginx.vim) +- [nim](https://github.com/zah/nim.vim) +- [nix](https://github.com/LnL7/vim-nix) +- [objc](https://github.com/b4winckler/vim-objc) +- [ocaml](https://github.com/rgrinberg/vim-ocaml) +- [octave](https://github.com/McSinyx/vim-octave) +- [opencl](https://github.com/petRUShka/vim-opencl) +- [perl](https://github.com/vim-perl/vim-perl) +- [pgsql](https://github.com/lifepillar/pgsql.vim) +- [php](https://github.com/StanAngeloff/php.vim) +- [plantuml](https://github.com/aklt/plantuml-syntax) +- [pony](https://github.com/jakwings/vim-pony) +- [powershell](https://github.com/PProvost/vim-ps1) +- [protobuf](https://github.com/uarun/vim-protobuf) +- [pug](https://github.com/digitaltoad/vim-pug) +- [puppet](https://github.com/rodjek/vim-puppet) +- [purescript](https://github.com/purescript-contrib/purescript-vim) +- [python-compiler](https://github.com/aliev/vim-compiler-python) +- [python-indent](https://github.com/Vimjas/vim-python-pep8-indent) +- [python](https://github.com/vim-python/python-syntax) +- [qmake](https://github.com/artoj/qmake-syntax-vim) +- [qml](https://github.com/peterhoeg/vim-qml) +- [r-lang](https://github.com/vim-scripts/R.vim) +- [racket](https://github.com/wlangstroth/vim-racket) +- [ragel](https://github.com/jneen/ragel.vim) +- [raku](https://github.com/Raku/vim-raku) +- [raml](https://github.com/IN3D/vim-raml) +- [razor](https://github.com/adamclerk/vim-razor) +- [reason](https://github.com/reasonml-editor/vim-reason-plus) +- [requirements](https://github.com/raimon49/requirements.txt.vim) +- [rspec](https://github.com/keith/rspec.vim) +- [rst](https://github.com/marshallward/vim-restructuredtext) +- [ruby](https://github.com/vim-ruby/vim-ruby) +- [rust](https://github.com/rust-lang/rust.vim) +- [sbt](https://github.com/derekwyatt/vim-sbt) +- [scala](https://github.com/derekwyatt/vim-scala) +- [scss](https://github.com/cakebaker/scss-syntax.vim) +- [sh](https://github.com/arzg/vim-sh) +- [slim](https://github.com/slim-template/vim-slim) +- [slime](https://github.com/slime-lang/vim-slime-syntax) +- [smt2](https://github.com/bohlender/vim-smt2) +- [solidity](https://github.com/tomlion/vim-solidity) +- [sql](https://github.com/shmup/vim-sql-syntax) +- [stylus](https://github.com/wavded/vim-stylus) +- [svelte](https://github.com/evanleck/vim-svelte/tree/main) +- [svg-indent](https://github.com/jasonshell/vim-svg-indent) +- [svg](https://github.com/vim-scripts/svg.vim) +- [swift](https://github.com/keith/swift.vim) +- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) +- [systemd](https://github.com/wgwoods/vim-systemd-syntax) +- [terraform](https://github.com/hashivim/vim-terraform) +- [textile](https://github.com/timcharper/textile.vim) +- [thrift](https://github.com/solarnz/thrift.vim) +- [tmux](https://github.com/ericpruitt/tmux.vim/tree/master/vim) +- [toml](https://github.com/cespare/vim-toml) +- [tptp](https://github.com/c-cube/vim-tptp) +- [trasys](https://github.com/vim/vim/tree/master/runtime) +- [twig](https://github.com/lumiliet/vim-twig) +- [typescript](https://github.com/HerringtonDarkholme/yats.vim) +- [unison](https://github.com/unisonweb/unison/tree/trunk/editor-support/vim) +- [v](https://github.com/ollykel/v-vim) +- [vala](https://github.com/arrufat/vala.vim) +- [vbnet](https://github.com/vim-scripts/vbnet.vim) +- [vcl](https://github.com/smerrill/vcl-vim-plugin) +- [velocity](https://github.com/lepture/vim-velocity) +- [vmasm](https://github.com/vim/vim/tree/master/runtime) +- [vue](https://github.com/posva/vim-vue) +- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) +- [xml](https://github.com/amadeus/vim-xml) +- [xsl](https://github.com/vim-scripts/XSLT-syntax) +- [yaml](https://github.com/stephpy/vim-yaml) +- [yard](https://github.com/sheerun/vim-yardoc) +- [zephir](https://github.com/xwsoul/vim-zephir) +- [zig](https://github.com/ziglang/zig.vim) +- [zinit](https://github.com/zinit-zsh/zplugin-vim-syntax) <!--/Language Packs--> ## Updating diff --git a/after/indent/javascript.vim b/after/indent/javascript.vim index 24b7f937..370e12d4 100644 --- a/after/indent/javascript.vim +++ b/after/indent/javascript.vim @@ -1,3 +1,50 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 + +" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. +" +" Language: GraphQL +" Maintainer: Jon Parise <jon@indelible.org> + +runtime! indent/graphql.vim + +" Don't redefine our function and also require the standard Javascript indent +" function to exist. +if exists('*GetJavascriptGraphQLIndent') || !exists('*GetJavascriptIndent') + finish +endif + +" Set the indentexpr with our own version that will call GetGraphQLIndent when +" we're inside of a GraphQL string and otherwise defer to GetJavascriptIndent. +setlocal indentexpr=GetJavascriptGraphQLIndent() + +function GetJavascriptGraphQLIndent() + let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val,'name')") + if !empty(l:stack) && l:stack[0] ==# 'graphqlTemplateString' + return GetGraphQLIndent() + endif + + return GetJavascriptIndent() +endfunction + +endif if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim new file mode 100644 index 00000000..968517c8 --- /dev/null +++ b/after/indent/typescript.vim @@ -0,0 +1,47 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 + +" Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to +" deal in the Software without restriction, including without limitation the +" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +" sell copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +" IN THE SOFTWARE. +" +" Language: GraphQL +" Maintainer: Jon Parise <jon@indelible.org> + +runtime! indent/graphql.vim + +" Don't redefine our function and also require the standard Typescript indent +" function to exist. +if exists('*GetTypescriptGraphQLIndent') || !exists('*GetTypescriptIndent') + finish +endif + +" Set the indentexpr with our own version that will call GetGraphQLIndent when +" we're inside of a GraphQL string and otherwise defer to GetTypescriptIndent. +setlocal indentexpr=GetTypescriptGraphQLIndent() + +function GetTypescriptGraphQLIndent() + let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val,'name')") + if !empty(l:stack) && l:stack[0] ==# 'graphqlTemplateString' + return GetGraphQLIndent() + endif + + return GetTypescriptIndent() +endfunction + +endif diff --git a/after/syntax/c.vim b/after/syntax/c.vim deleted file mode 100644 index 471ae6df..00000000 --- a/after/syntax/c.vim +++ /dev/null @@ -1,321 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 - -" Vim syntax file -" Language: C Additions -" Maintainer: Jon Haggblad <jon@haeggblad.com> -" Contributor: Mikhail Wolfson <mywolfson@gmail.com> -" URL: http://www.haeggblad.com -" Last Change: 6 Sep 2014 -" Version: 0.3 -" Changelog: -" 0.3 - integration of aftersyntaxc.vim -" 0.2 - Cleanup -" 0.1 - initial version. -" -" Syntax highlighting for functions in C. -" -" Based on: -" http://stackoverflow.com/questions/736701/class-function-names-highlighting-in-vim - -" ----------------------------------------------------------------------------- -" Highlight function names. -" ----------------------------------------------------------------------------- -if !exists('g:cpp_no_function_highlight') - syn match cCustomParen transparent "(" contains=cParen contains=cCppParen - syn match cCustomFunc "\w\+\s*(\@=" contains=cCustomParen - hi def link cCustomFunc Function -endif - -" ----------------------------------------------------------------------------- -" Highlight member variable names. -" ----------------------------------------------------------------------------- -if exists('g:cpp_member_variable_highlight') && g:cpp_member_variable_highlight - syn match cCustomDot "\." contained - syn match cCustomPtr "->" contained - syn match cCustomMemVar "\(\.\|->\)\h\w*" contains=cCustomDot,cCustomPtr - hi def link cCustomMemVar Function -endif - -" ----------------------------------------------------------------------------- -" Highlight POSIX functions. -" ----------------------------------------------------------------------------- -if exists('g:cpp_posix_standard') && g:cpp_posix_standard - syn keyword cPOSIXFunction socket accept bind connect getsockname - syn keyword cPOSIXFunction listen recv recvfrom recvmsg - syn keyword cPOSIXFunction send sendto sendmsg setsockopt socketpair - syn keyword cPOSIXFunction htonl htons ntohl ntohs - syn keyword cPOSIXFunction inet_ntop inet_pton getaddrinfo - syn keyword cPOSIXFunction poll select pselect - hi def link cPOSIXFunction Function -endif - -" ----------------------------------------------------------------------------- -" Source: aftersyntaxc.vim -" ----------------------------------------------------------------------------- - -" Common ANSI-standard functions -syn keyword cAnsiFunction MULU_ DIVU_ MODU_ MUL_ DIV_ MOD_ -syn keyword cAnsiFunction main typeof -syn keyword cAnsiFunction open close read write lseek dup dup2 -syn keyword cAnsiFunction fcntl ioctl -syn keyword cAnsiFunction wctrans towctrans towupper -syn keyword cAnsiFunction towlower wctype iswctype -syn keyword cAnsiFunction iswxdigit iswupper iswspace -syn keyword cAnsiFunction iswpunct iswprint iswlower -syn keyword cAnsiFunction iswgraph iswdigit iswcntrl -syn keyword cAnsiFunction iswalpha iswalnum wcsrtombs -syn keyword cAnsiFunction mbsrtowcs wcrtomb mbrtowc -syn keyword cAnsiFunction mbrlen mbsinit wctob -syn keyword cAnsiFunction btowc wcsfxtime wcsftime -syn keyword cAnsiFunction wmemset wmemmove wmemcpy -syn keyword cAnsiFunction wmemcmp wmemchr wcstok -syn keyword cAnsiFunction wcsstr wcsspn wcsrchr -syn keyword cAnsiFunction wcspbrk wcslen wcscspn -syn keyword cAnsiFunction wcschr wcsxfrm wcsncmp -syn keyword cAnsiFunction wcscoll wcscmp wcsncat -syn keyword cAnsiFunction wcscat wcsncpy wcscpy -syn keyword cAnsiFunction wcstoull wcstoul wcstoll -syn keyword cAnsiFunction wcstol wcstold wcstof -syn keyword cAnsiFunction wcstod ungetwc putwchar -syn keyword cAnsiFunction putwc getwchar getwc -syn keyword cAnsiFunction fwide fputws fputwc -syn keyword cAnsiFunction fgetws fgetwc wscanf -syn keyword cAnsiFunction wprintf vwscanf vwprintf -syn keyword cAnsiFunction vswscanf vswprintf vfwscanf -syn keyword cAnsiFunction vfwprintf swscanf swprintf -syn keyword cAnsiFunction fwscanf fwprintf zonetime -syn keyword cAnsiFunction strfxtime strftime localtime -syn keyword cAnsiFunction gmtime ctime asctime -syn keyword cAnsiFunction time mkxtime mktime -syn keyword cAnsiFunction difftime clock strlen -syn keyword cAnsiFunction strerror memset strtok -syn keyword cAnsiFunction strstr strspn strrchr -syn keyword cAnsiFunction strpbrk strcspn strchr -syn keyword cAnsiFunction memchr strxfrm strncmp -syn keyword cAnsiFunction strcoll strcmp memcmp -syn keyword cAnsiFunction strncat strcat strncpy -syn keyword cAnsiFunction strcpy memmove memcpy -syn keyword cAnsiFunction wcstombs mbstowcs wctomb -syn keyword cAnsiFunction mbtowc mblen lldiv -syn keyword cAnsiFunction ldiv div llabs -syn keyword cAnsiFunction labs abs qsort -"syn keyword cAnsiFunction bsearch system getenv -syn keyword cAnsiFunction bsearch getenv -syn keyword cAnsiFunction exit atexit abort -syn keyword cAnsiFunction realloc malloc free -syn keyword cAnsiFunction calloc srand rand -syn keyword cAnsiFunction strtoull strtoul strtoll -syn keyword cAnsiFunction strtol strtold strtof -syn keyword cAnsiFunction strtod atoll atol -syn keyword cAnsiFunction atoi atof perror -syn keyword cAnsiFunction ferror feof clearerr -syn keyword cAnsiFunction rewind ftell fsetpos -syn keyword cAnsiFunction fseek fgetpos fwrite -syn keyword cAnsiFunction fread ungetc puts -syn keyword cAnsiFunction putchar putc gets -syn keyword cAnsiFunction getchar getc fputs -syn keyword cAnsiFunction fputc fgets fgetc -syn keyword cAnsiFunction vsscanf vsprintf vsnprintf -syn keyword cAnsiFunction vscanf vprintf vfscanf -syn keyword cAnsiFunction vfprintf sscanf sprintf -syn keyword cAnsiFunction snprintf scanf printf -syn keyword cAnsiFunction fscanf fprintf setvbuf -syn keyword cAnsiFunction setbuf freopen fopen -syn keyword cAnsiFunction fflush fclose tmpnam -syn keyword cAnsiFunction tmpfile rename remove -syn keyword cAnsiFunction offsetof va_start va_end -syn keyword cAnsiFunction va_copy va_arg raise signal -syn keyword cAnsiFunction longjmp setjmp isunordered -syn keyword cAnsiFunction islessgreater islessequal isless -syn keyword cAnsiFunction isgreaterequal isgreater fmal -syn keyword cAnsiFunction fmaf fma fminl -syn keyword cAnsiFunction fminf fmin fmaxl -syn keyword cAnsiFunction fmaxf fmax fdiml -syn keyword cAnsiFunction fdimf fdim nextafterxl -syn keyword cAnsiFunction nextafterxf nextafterx nextafterl -syn keyword cAnsiFunction nextafterf nextafter nanl -syn keyword cAnsiFunction nanf nan copysignl -syn keyword cAnsiFunction copysignf copysign remquol -syn keyword cAnsiFunction remquof remquo remainderl -syn keyword cAnsiFunction remainderf remainder fmodl -syn keyword cAnsiFunction fmodf fmod truncl -syn keyword cAnsiFunction truncf trunc llroundl -syn keyword cAnsiFunction llroundf llround lroundl -syn keyword cAnsiFunction lroundf lround roundl -syn keyword cAnsiFunction roundf round llrintl -syn keyword cAnsiFunction llrintf llrint lrintl -syn keyword cAnsiFunction lrintf lrint rintl -syn keyword cAnsiFunction rintf rint nearbyintl -syn keyword cAnsiFunction nearbyintf nearbyint floorl -syn keyword cAnsiFunction floorf floor ceill -syn keyword cAnsiFunction ceilf ceil tgammal -syn keyword cAnsiFunction tgammaf tgamma lgammal -syn keyword cAnsiFunction lgammaf lgamma erfcl -syn keyword cAnsiFunction erfcf erfc erfl -syn keyword cAnsiFunction erff erf sqrtl -syn keyword cAnsiFunction sqrtf sqrt powl -syn keyword cAnsiFunction powf pow hypotl -syn keyword cAnsiFunction hypotf hypot fabsl -syn keyword cAnsiFunction fabsf fabs cbrtl -syn keyword cAnsiFunction cbrtf cbrt scalblnl -syn keyword cAnsiFunction scalblnf scalbln scalbnl -syn keyword cAnsiFunction scalbnf scalbn modfl -syn keyword cAnsiFunction modff modf logbl -syn keyword cAnsiFunction logbf logb log2l -syn keyword cAnsiFunction log2f log2 log1pl -syn keyword cAnsiFunction log1pf log1p log10l -syn keyword cAnsiFunction log10f log10 logl -syn keyword cAnsiFunction logf log ldexpl -syn keyword cAnsiFunction ldexpf ldexp ilogbl -syn keyword cAnsiFunction ilogbf ilogb frexpl -syn keyword cAnsiFunction frexpf frexp expm1l -syn keyword cAnsiFunction expm1f expm1 exp2l -syn keyword cAnsiFunction exp2f exp2 expl -syn keyword cAnsiFunction expf exp tanhl -syn keyword cAnsiFunction tanhf tanh sinhl -syn keyword cAnsiFunction sinhf sinh coshl -syn keyword cAnsiFunction coshf cosh atanhl -syn keyword cAnsiFunction atanhf atanh asinhl -syn keyword cAnsiFunction asinhf asinh acoshl -syn keyword cAnsiFunction acoshf acosh tanl -syn keyword cAnsiFunction tanf tan sinl -syn keyword cAnsiFunction sinf sin cosl -syn keyword cAnsiFunction cosf cos atan2l -syn keyword cAnsiFunction atan2f atan2 atanl -syn keyword cAnsiFunction atanf atan asinl -syn keyword cAnsiFunction asinf asin acosl -syn keyword cAnsiFunction acosf acos signbit -syn keyword cAnsiFunction isnormal isnan isinf -syn keyword cAnsiFunction isfinite fpclassify localeconv -syn keyword cAnsiFunction setlocale wcstoumax wcstoimax -syn keyword cAnsiFunction strtoumax strtoimax feupdateenv -syn keyword cAnsiFunction fesetenv feholdexcept fegetenv -syn keyword cAnsiFunction fesetround fegetround fetestexcept -syn keyword cAnsiFunction fesetexceptflag feraiseexcept fegetexceptflag -syn keyword cAnsiFunction feclearexcept toupper tolower -syn keyword cAnsiFunction isxdigit isupper isspace -syn keyword cAnsiFunction ispunct isprint islower -syn keyword cAnsiFunction isgraph isdigit iscntrl -syn keyword cAnsiFunction isalpha isalnum creall -syn keyword cAnsiFunction crealf creal cprojl -syn keyword cAnsiFunction cprojf cproj conjl -syn keyword cAnsiFunction conjf conj cimagl -syn keyword cAnsiFunction cimagf cimag cargl -syn keyword cAnsiFunction cargf carg csqrtl -syn keyword cAnsiFunction csqrtf csqrt cpowl -syn keyword cAnsiFunction cpowf cpow cabsl -syn keyword cAnsiFunction cabsf cabs clogl -syn keyword cAnsiFunction clogf clog cexpl -syn keyword cAnsiFunction cexpf cexp ctanhl -syn keyword cAnsiFunction ctanhf ctanh csinhl -syn keyword cAnsiFunction csinhf csinh ccoshl -syn keyword cAnsiFunction ccoshf ccosh catanhl -syn keyword cAnsiFunction catanhf catanh casinhl -syn keyword cAnsiFunction casinhf casinh cacoshl -syn keyword cAnsiFunction cacoshf cacosh ctanl -syn keyword cAnsiFunction ctanf ctan csinl -syn keyword cAnsiFunction csinf csin ccosl -syn keyword cAnsiFunction ccosf ccos catanl -syn keyword cAnsiFunction catanf catan casinl -syn keyword cAnsiFunction casinf casin cacosl -syn keyword cAnsiFunction cacosf cacos assert -syn keyword cAnsiFunction UINTMAX_C INTMAX_C UINT64_C -syn keyword cAnsiFunction UINT32_C UINT16_C UINT8_C -syn keyword cAnsiFunction INT64_C INT32_C INT16_C INT8_C - -" Common ANSI-standard Names -syn keyword cAnsiName PRId8 PRIi16 PRIo32 PRIu64 -syn keyword cAnsiName PRId16 PRIi32 PRIo64 PRIuLEAST8 -syn keyword cAnsiName PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16 -syn keyword cAnsiName PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32 -syn keyword cAnsiName PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64 -syn keyword cAnsiName PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8 -syn keyword cAnsiName PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16 -syn keyword cAnsiName PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32 -syn keyword cAnsiName PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64 -syn keyword cAnsiName PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX -syn keyword cAnsiName PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR -syn keyword cAnsiName PRIdFAST64 PRIiMAX PRIoPTR PRIx8 -syn keyword cAnsiName PRIdMAX PRIiPTR PRIu8 PRIx16 -syn keyword cAnsiName PRIdPTR PRIo8 PRIu16 PRIx32 -syn keyword cAnsiName PRIi8 PRIo16 PRIu32 PRIx64 - -syn keyword cAnsiName PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32 -syn keyword cAnsiName PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64 -syn keyword cAnsiName PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8 -syn keyword cAnsiName PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16 -syn keyword cAnsiName PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32 -syn keyword cAnsiName PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64 -syn keyword cAnsiName PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX -syn keyword cAnsiName PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR -syn keyword cAnsiName PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8 -syn keyword cAnsiName PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16 -syn keyword cAnsiName PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32 -syn keyword cAnsiName PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64 -syn keyword cAnsiName PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8 -syn keyword cAnsiName PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16 -syn keyword cAnsiName PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32 -syn keyword cAnsiName PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64 -syn keyword cAnsiName PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8 -syn keyword cAnsiName PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16 -syn keyword cAnsiName PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32 -syn keyword cAnsiName PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64 -syn keyword cAnsiName PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX -syn keyword cAnsiName PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR -syn keyword cAnsiName PRIXMAX SCNiFAST8 SCNuLEAST8 -syn keyword cAnsiName PRIXPTR SCNiFAST16 SCNuLEAST16 - -syn keyword cAnsiName errno environ - -syn keyword cAnsiName STDC CX_LIMITED_RANGE -syn keyword cAnsiName STDC FENV_ACCESS -syn keyword cAnsiName STDC FP_CONTRACT - -syn keyword cAnsiName and bitor not_eq xor -syn keyword cAnsiName and_eq compl or xor_eq -syn keyword cAnsiName bitand not or_eq - -hi def link cAnsiFunction cFunction -hi def link cAnsiName cIdentifier -hi def link cFunction Function -hi def link cIdentifier Identifier - -" Booleans -syn keyword cBoolean true false TRUE FALSE -hi def link cBoolean Boolean - -" ----------------------------------------------------------------------------- -" Additional optional highlighting -" ----------------------------------------------------------------------------- - -" Operators -"syn match cOperator "\(<<\|>>\|[-+*/%&^|<>!=]\)=" -"syn match cOperator "<<\|>>\|&&\|||\|++\|--\|->" -"syn match cOperator "[.!~*&%<>^|=,+-]" -"syn match cOperator "/[^/*=]"me=e-1 -"syn match cOperator "/$" -"syn match cOperator "&&\|||" -"syn match cOperator "[][]" -" -"" Preprocs -"syn keyword cDefined defined contained containedin=cDefine -"hi def link cDefined cDefine - -"" Functions -"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine -"syn match cUserFunctionPointer "(\s*\*\s*\h\w*\s*)\(\s\|\n\)*(" contains=cDelimiter,cOperator -" -"hi def link cUserFunction cFunction -"hi def link cUserFunctionPointer cFunction -" -"" Delimiters -"syn match cDelimiter "[();\\]" -"" foldmethod=syntax fix, courtesy of Ivan Freitas -"syn match cBraces display "[{}]" - -" Links -"hi def link cDelimiter Delimiter -" foldmethod=syntax fix, courtesy of Ivan Freitas -"hi def link cBraces Delimiter - -endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim deleted file mode 100644 index e88c8664..00000000 --- a/after/syntax/cpp.vim +++ /dev/null @@ -1,2297 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 - -" Vim syntax file -" Language: C++ Additions -" Maintainer: Jon Haggblad <jon@haeggblad.com> -" URL: http://www.haeggblad.com -" Last Change: 29 Jun 2019 -" Version: 0.6 -" Changelog: -" 0.1 - initial version. -" 0.2 - C++14 -" 0.3 - Incorporate lastest changes from Mizuchi/STL-Syntax -" 0.4 - Add template function highlight -" 0.5 - Redo template function highlight to be more robust. Add options. -" 0.6 - more C++14, C++17, library concepts -" -" Additional Vim syntax highlighting for C++ (including C++11/14/17) -" -" This file contains additional syntax highlighting that I use for C++11/14 -" development in Vim. Compared to the standard syntax highlighting for C++ it -" adds highlighting of (user defined) functions and the containers and types -" in the standard library / boost. -" -" Based on: -" http://stackoverflow.com/q/736701 -" http://www.vim.org/scripts/script.php?script_id=4293 -" http://www.vim.org/scripts/script.php?script_id=2224 -" http://www.vim.org/scripts/script.php?script_id=1640 -" http://www.vim.org/scripts/script.php?script_id=3064 - - -" ----------------------------------------------------------------------------- -" Highlight Class and Function names. -" -" Based on the discussion in: http://stackoverflow.com/q/736701 -" ----------------------------------------------------------------------------- - -" Functions -if !exists('g:cpp_no_function_highlight') - syn match cCustomParen transparent "(" contains=cParen contains=cCppParen - syn match cCustomFunc "\w\+\s*(\@=" - hi def link cCustomFunc Function -endif - -" Class and namespace scope -if exists('g:cpp_class_scope_highlight') && g:cpp_class_scope_highlight - syn match cCustomScope "::" - syn match cCustomClass "\w\+\s*::" - \ contains=cCustomScope - hi def link cCustomClass Function -endif - -" Clear cppStructure and replace "class" and/or "template" with matches -" based on user configuration -let s:needs_cppstructure_match = 0 -if exists('g:cpp_class_decl_highlight') && g:cpp_class_decl_highlight - let s:needs_cppstructure_match += 1 -endif -if exists('g:cpp_experimental_template_highlight') && g:cpp_experimental_template_highlight - let s:needs_cppstructure_match += 2 -endif - -syn clear cppStructure -if s:needs_cppstructure_match == 0 - syn keyword cppStructure typename namespace template class -elseif s:needs_cppstructure_match == 1 - syn keyword cppStructure typename namespace template -elseif s:needs_cppstructure_match == 2 - syn keyword cppStructure typename namespace class -elseif s:needs_cppstructure_match == 3 - syn keyword cppStructure typename namespace -endif -unlet s:needs_cppstructure_match - - -" Class name declaration -if exists('g:cpp_class_decl_highlight') && g:cpp_class_decl_highlight - syn match cCustomClassKey "\<class\>" - hi def link cCustomClassKey cppStructure - - " Clear cppAccess entirely and redefine as matches - syn clear cppAccess - syn match cCustomAccessKey "\<private\>" - syn match cCustomAccessKey "\<public\>" - syn match cCustomAccessKey "\<protected\>" - hi def link cCustomAccessKey cppAccess - - " Match the parts of a class declaration - syn match cCustomClassName "\<class\_s\+\w\+\>" - \ contains=cCustomClassKey - syn match cCustomClassName "\<private\_s\+\w\+\>" - \ contains=cCustomAccessKey - syn match cCustomClassName "\<public\_s\+\w\+\>" - \ contains=cCustomAccessKey - syn match cCustomClassName "\<protected\_s\+\w\+\>" - \ contains=cCustomAccessKey - hi def link cCustomClassName Function -endif -" Template functions. -" Naive implementation that sorta works in most cases. Should correctly -" highlight everything in test/color2.cpp -if exists('g:cpp_experimental_simple_template_highlight') && g:cpp_experimental_simple_template_highlight - syn region cCustomAngleBrackets matchgroup=AngleBracketContents start="\v%(<operator\_s*)@<!%(%(\_i|template\_s*)@<=\<[<=]@!|\<@<!\<[[:space:]<=]@!)" end='>' contains=@cppSTLgroup,cppStructure,cType,cCustomClass,cCustomAngleBrackets,cNumbers - syn match cCustomBrack "<\|>" contains=cCustomAngleBrackets - syn match cCustomTemplateFunc "\w\+\s*<.*>(\@=" contains=cCustomBrack,cCustomAngleBrackets - hi def link cCustomTemplateFunc Function - -" Template functions (alternative faster parsing). -" More sophisticated implementation that should be faster but doesn't always -" correctly highlight inside template arguments. Should correctly -" highlight everything in test/color.cpp -elseif exists('g:cpp_experimental_template_highlight') && g:cpp_experimental_template_highlight - - syn match cCustomAngleBracketStart "<\_[^;()]\{-}>" contained - \ contains=cCustomAngleBracketStart,cCustomAngleBracketEnd - hi def link cCustomAngleBracketStart cCustomAngleBracketContent - - syn match cCustomAngleBracketEnd ">\_[^<>;()]\{-}>" contained - \ contains=cCustomAngleBracketEnd - hi def link cCustomAngleBracketEnd cCustomAngleBracketContent - - syn match cCustomTemplateFunc "\<\l\w*\s*<\_[^;()]\{-}>(\@="hs=s,he=e-1 - \ contains=cCustomAngleBracketStart - hi def link cCustomTemplateFunc cCustomFunc - - syn match cCustomTemplateClass "\<\w\+\s*<\_[^;()]\{-}>" - \ contains=cCustomAngleBracketStart,cCustomTemplateFunc - hi def link cCustomTemplateClass cCustomClass - - syn match cCustomTemplate "\<template\>" - hi def link cCustomTemplate cppStructure - syn match cTemplateDeclare "\<template\_s*<\_[^;()]\{-}>" - \ contains=cppStructure,cCustomTemplate,cCustomClassKey,cCustomAngleBracketStart - - " Remove 'operator' from cppOperator and use a custom match - syn clear cppOperator - syn keyword cppOperator typeid - syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq - - syn match cCustomOperator "\<operator\>" - hi def link cCustomOperator cppStructure - syn match cTemplateOperatorDeclare "\<operator\_s*<\_[^;()]\{-}>[<>]=\?" - \ contains=cppOperator,cCustomOperator,cCustomAngleBracketStart -endif - -" Alternative syntax that is used in: -" http://www.vim.org/scripts/script.php?script_id=3064 -"syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cType,cDelimiter,cDefine -"hi def link cCustomFunc Function - -" Cluster for all the stdlib functions defined below -syn cluster cppSTLgroup contains=cppSTLfunction,cppSTLfunctional,cppSTLconstant,cppSTLnamespace,cppSTLtype,cppSTLexception,cppSTLiterator,cppSTLiterator_tag,cppSTLenum,cppSTLios,cppSTLcast - - -" ----------------------------------------------------------------------------- -" Standard library types and functions. -" -" Mainly based on the excellent STL Syntax vim script by -" Mizuchi <ytj000@gmail.com> -" http://www.vim.org/scripts/script.php?script_id=4293 -" which in turn is based on the scripts -" http://www.vim.org/scripts/script.php?script_id=2224 -" http://www.vim.org/scripts/script.php?script_id=1640 -" ----------------------------------------------------------------------------- - -syntax keyword cppSTLconstant badbit -syntax keyword cppSTLconstant cerr -syntax keyword cppSTLconstant cin -syntax keyword cppSTLconstant clog -syntax keyword cppSTLconstant cout -syntax keyword cppSTLconstant digits -syntax keyword cppSTLconstant digits10 -syntax keyword cppSTLconstant eofbit -syntax keyword cppSTLconstant failbit -syntax keyword cppSTLconstant goodbit -syntax keyword cppSTLconstant has_denorm -syntax keyword cppSTLconstant has_denorm_loss -syntax keyword cppSTLconstant has_infinity -syntax keyword cppSTLconstant has_quiet_NaN -syntax keyword cppSTLconstant has_signaling_NaN -syntax keyword cppSTLconstant is_bounded -syntax keyword cppSTLconstant is_exact -syntax keyword cppSTLconstant is_iec559 -syntax keyword cppSTLconstant is_integer -syntax keyword cppSTLconstant is_modulo -syntax keyword cppSTLconstant is_signed -syntax keyword cppSTLconstant is_specialized -syntax keyword cppSTLconstant max_digits10 -syntax keyword cppSTLconstant max_exponent -syntax keyword cppSTLconstant max_exponent10 -syntax keyword cppSTLconstant min_exponent -syntax keyword cppSTLconstant min_exponent10 -syntax keyword cppSTLconstant nothrow -syntax keyword cppSTLconstant npos -syntax keyword cppSTLconstant radix -syntax keyword cppSTLconstant round_style -syntax keyword cppSTLconstant tinyness_before -syntax keyword cppSTLconstant traps -syntax keyword cppSTLconstant wcerr -syntax keyword cppSTLconstant wcin -syntax keyword cppSTLconstant wclog -syntax keyword cppSTLconstant wcout -syntax keyword cppSTLexception bad_alloc -syntax keyword cppSTLexception bad_array_new_length -syntax keyword cppSTLexception bad_exception -syntax keyword cppSTLexception bad_typeid bad_cast -syntax keyword cppSTLexception domain_error -syntax keyword cppSTLexception exception -syntax keyword cppSTLexception invalid_argument -syntax keyword cppSTLexception length_error -syntax keyword cppSTLexception logic_error -syntax keyword cppSTLexception out_of_range -syntax keyword cppSTLexception overflow_error -syntax keyword cppSTLexception range_error -syntax keyword cppSTLexception runtime_error -syntax keyword cppSTLexception underflow_error -syntax keyword cppSTLfunction abort -syntax keyword cppSTLfunction abs -syntax keyword cppSTLfunction accumulate -syntax keyword cppSTLfunction acos -syntax keyword cppSTLfunction adjacent_difference -syntax keyword cppSTLfunction adjacent_find -syntax keyword cppSTLfunction adjacent_find_if -syntax keyword cppSTLfunction advance -syntax keyword cppSTLfunctional binary_function -syntax keyword cppSTLfunctional binary_negate -syntax keyword cppSTLfunctional bit_and -syntax keyword cppSTLfunctional bit_not -syntax keyword cppSTLfunctional bit_or -syntax keyword cppSTLfunctional bit_xor -syntax keyword cppSTLfunctional divides -syntax keyword cppSTLfunctional equal_to -syntax keyword cppSTLfunctional greater -syntax keyword cppSTLfunctional greater_equal -syntax keyword cppSTLfunctional less -syntax keyword cppSTLfunctional less_equal -syntax keyword cppSTLfunctional logical_and -syntax keyword cppSTLfunctional logical_not -syntax keyword cppSTLfunctional logical_or -syntax keyword cppSTLfunctional minus -syntax keyword cppSTLfunctional modulus -syntax keyword cppSTLfunctional multiplies -syntax keyword cppSTLfunctional negate -syntax keyword cppSTLfunctional not_equal_to -syntax keyword cppSTLfunctional plus -syntax keyword cppSTLfunctional unary_function -syntax keyword cppSTLfunctional unary_negate -"syntax keyword cppSTLfunction any -syntax keyword cppSTLfunction append -syntax keyword cppSTLfunction arg -syntax keyword cppSTLfunction asctime -syntax keyword cppSTLfunction asin -syntax keyword cppSTLfunction assert -syntax keyword cppSTLfunction assign -syntax keyword cppSTLfunction at -syntax keyword cppSTLfunction atan -syntax keyword cppSTLfunction atan2 -syntax keyword cppSTLfunction atexit -syntax keyword cppSTLfunction atof -syntax keyword cppSTLfunction atoi -syntax keyword cppSTLfunction atol -syntax keyword cppSTLfunction atoll -syntax keyword cppSTLfunction back -syntax keyword cppSTLfunction back_inserter -syntax keyword cppSTLfunction bad -syntax keyword cppSTLfunction beg -"syntax keyword cppSTLfunction begin -syntax keyword cppSTLfunction binary_compose -syntax keyword cppSTLfunction binary_negate -syntax keyword cppSTLfunction binary_search -syntax keyword cppSTLfunction bind1st -syntax keyword cppSTLfunction bind2nd -syntax keyword cppSTLfunction binder1st -syntax keyword cppSTLfunction binder2nd -syntax keyword cppSTLfunction bsearch -syntax keyword cppSTLfunction calloc -syntax keyword cppSTLfunction capacity -syntax keyword cppSTLfunction ceil -syntax keyword cppSTLfunction clear -syntax keyword cppSTLfunction clearerr -syntax keyword cppSTLfunction clock -syntax keyword cppSTLfunction close -syntax keyword cppSTLfunction compare -syntax keyword cppSTLfunction conj -syntax keyword cppSTLfunction construct -syntax keyword cppSTLfunction copy -syntax keyword cppSTLfunction copy_backward -syntax keyword cppSTLfunction cos -syntax keyword cppSTLfunction cosh -syntax keyword cppSTLfunction count -syntax keyword cppSTLfunction count_if -syntax keyword cppSTLfunction c_str -syntax keyword cppSTLfunction ctime -"syntax keyword cppSTLfunction data -syntax keyword cppSTLfunction denorm_min -syntax keyword cppSTLfunction destroy -syntax keyword cppSTLfunction difftime -syntax keyword cppSTLfunction distance -syntax keyword cppSTLfunction div -syntax keyword cppSTLfunction empty -"syntax keyword cppSTLfunction end -syntax keyword cppSTLfunction eof -syntax keyword cppSTLfunction epsilon -syntax keyword cppSTLfunction equal -syntax keyword cppSTLfunction equal_range -syntax keyword cppSTLfunction erase -syntax keyword cppSTLfunction exit -syntax keyword cppSTLfunction exp -syntax keyword cppSTLfunction fabs -syntax keyword cppSTLfunction fail -syntax keyword cppSTLfunction failure -syntax keyword cppSTLfunction fclose -syntax keyword cppSTLfunction feof -syntax keyword cppSTLfunction ferror -syntax keyword cppSTLfunction fflush -syntax keyword cppSTLfunction fgetc -syntax keyword cppSTLfunction fgetpos -syntax keyword cppSTLfunction fgets -syntax keyword cppSTLfunction fill -syntax keyword cppSTLfunction fill_n -syntax keyword cppSTLfunction find -syntax keyword cppSTLfunction find_end -syntax keyword cppSTLfunction find_first_not_of -syntax keyword cppSTLfunction find_first_of -syntax keyword cppSTLfunction find_if -syntax keyword cppSTLfunction find_last_not_of -syntax keyword cppSTLfunction find_last_of -syntax keyword cppSTLfunction first -syntax keyword cppSTLfunction flags -syntax keyword cppSTLfunction flip -syntax keyword cppSTLfunction floor -syntax keyword cppSTLfunction flush -syntax keyword cppSTLfunction fmod -syntax keyword cppSTLfunction fopen -syntax keyword cppSTLfunction for_each -syntax keyword cppSTLfunction fprintf -syntax keyword cppSTLfunction fputc -syntax keyword cppSTLfunction fputs -syntax keyword cppSTLfunction fread -syntax keyword cppSTLfunction free -syntax keyword cppSTLfunction freopen -syntax keyword cppSTLfunction frexp -syntax keyword cppSTLfunction front -syntax keyword cppSTLfunction fscanf -syntax keyword cppSTLfunction fseek -syntax keyword cppSTLfunction fsetpos -syntax keyword cppSTLfunction ftell -syntax keyword cppSTLfunction fwide -syntax keyword cppSTLfunction fwprintf -syntax keyword cppSTLfunction fwrite -syntax keyword cppSTLfunction fwscanf -syntax keyword cppSTLfunction gcount -syntax keyword cppSTLfunction generate -syntax keyword cppSTLfunction generate_n -syntax keyword cppSTLfunction get -syntax keyword cppSTLfunction get_allocator -syntax keyword cppSTLfunction getc -syntax keyword cppSTLfunction getchar -syntax keyword cppSTLfunction getenv -syntax keyword cppSTLfunction getline -syntax keyword cppSTLfunction gets -syntax keyword cppSTLfunction get_temporary_buffer -syntax keyword cppSTLfunction gmtime -syntax keyword cppSTLfunction good -syntax keyword cppSTLfunction ignore -syntax keyword cppSTLfunction imag -syntax keyword cppSTLfunction in -syntax keyword cppSTLfunction includes -syntax keyword cppSTLfunction infinity -syntax keyword cppSTLfunction inner_product -syntax keyword cppSTLfunction inplace_merge -syntax keyword cppSTLfunction insert -syntax keyword cppSTLfunction inserter -syntax keyword cppSTLfunction ios -syntax keyword cppSTLfunction ios_base -syntax keyword cppSTLfunction iostate -syntax keyword cppSTLfunction iota -syntax keyword cppSTLfunction isalnum -syntax keyword cppSTLfunction isalpha -syntax keyword cppSTLfunction iscntrl -syntax keyword cppSTLfunction isdigit -syntax keyword cppSTLfunction isgraph -syntax keyword cppSTLfunction is_heap -syntax keyword cppSTLfunction islower -syntax keyword cppSTLfunction is_open -syntax keyword cppSTLfunction isprint -syntax keyword cppSTLfunction ispunct -syntax keyword cppSTLfunction isspace -syntax keyword cppSTLfunction isupper -syntax keyword cppSTLfunction isxdigit -syntax keyword cppSTLfunction iterator_category -syntax keyword cppSTLfunction iter_swap -syntax keyword cppSTLfunction jmp_buf -syntax keyword cppSTLfunction key_comp -syntax keyword cppSTLfunction labs -syntax keyword cppSTLfunction ldexp -syntax keyword cppSTLfunction ldiv -syntax keyword cppSTLfunction length -syntax keyword cppSTLfunction lexicographical_compare -syntax keyword cppSTLfunction lexicographical_compare_3way -syntax keyword cppSTLfunction llabs -syntax keyword cppSTLfunction lldiv -syntax keyword cppSTLfunction localtime -syntax keyword cppSTLfunction log -syntax keyword cppSTLfunction log10 -syntax keyword cppSTLfunction longjmp -syntax keyword cppSTLfunction lower_bound -syntax keyword cppSTLfunction make_heap -syntax keyword cppSTLfunction make_pair -syntax keyword cppSTLfunction malloc -syntax keyword cppSTLfunction max -syntax keyword cppSTLfunction max_element -syntax keyword cppSTLfunction max_size -syntax keyword cppSTLfunction memchr -syntax keyword cppSTLfunction memcpy -syntax keyword cppSTLfunction mem_fun -syntax keyword cppSTLfunction mem_fun_ref -syntax keyword cppSTLfunction memmove -syntax keyword cppSTLfunction memset -syntax keyword cppSTLfunction merge -syntax keyword cppSTLfunction min -syntax keyword cppSTLfunction min_element -syntax keyword cppSTLfunction mismatch -syntax keyword cppSTLfunction mktime -syntax keyword cppSTLfunction modf -syntax keyword cppSTLfunction next_permutation -syntax keyword cppSTLfunction none -syntax keyword cppSTLfunction norm -syntax keyword cppSTLfunction not1 -syntax keyword cppSTLfunction not2 -syntax keyword cppSTLfunction nth_element -syntax keyword cppSTLtype numeric_limits -syntax keyword cppSTLfunction open -syntax keyword cppSTLfunction partial_sort -syntax keyword cppSTLfunction partial_sort_copy -syntax keyword cppSTLfunction partial_sum -syntax keyword cppSTLfunction partition -syntax keyword cppSTLfunction peek -syntax keyword cppSTLfunction perror -syntax keyword cppSTLfunction polar -syntax keyword cppSTLfunction pop -syntax keyword cppSTLfunction pop_back -syntax keyword cppSTLfunction pop_front -syntax keyword cppSTLfunction pop_heap -syntax keyword cppSTLfunction pow -syntax keyword cppSTLfunction power -syntax keyword cppSTLfunction precision -syntax keyword cppSTLfunction prev_permutation -syntax keyword cppSTLfunction printf -syntax keyword cppSTLfunction ptr_fun -syntax keyword cppSTLfunction push -syntax keyword cppSTLfunction push_back -syntax keyword cppSTLfunction push_front -syntax keyword cppSTLfunction push_heap -syntax keyword cppSTLfunction put -syntax keyword cppSTLfunction putback -syntax keyword cppSTLfunction putc -syntax keyword cppSTLfunction putchar -syntax keyword cppSTLfunction puts -syntax keyword cppSTLfunction qsort -syntax keyword cppSTLfunction quiet_NaN -syntax keyword cppSTLfunction raise -syntax keyword cppSTLfunction rand -syntax keyword cppSTLfunction random_sample -syntax keyword cppSTLfunction random_sample_n -syntax keyword cppSTLfunction random_shuffle -syntax keyword cppSTLfunction rbegin -syntax keyword cppSTLfunction rdbuf -syntax keyword cppSTLfunction rdstate -syntax keyword cppSTLfunction read -syntax keyword cppSTLfunction real -syntax keyword cppSTLfunction realloc -syntax keyword cppSTLfunction remove -syntax keyword cppSTLfunction remove_copy -syntax keyword cppSTLfunction remove_copy_if -syntax keyword cppSTLfunction remove_if -syntax keyword cppSTLfunction rename -syntax keyword cppSTLfunction rend -syntax keyword cppSTLfunction replace -syntax keyword cppSTLfunction replace_copy -syntax keyword cppSTLfunction replace_copy_if -syntax keyword cppSTLfunction replace_if -syntax keyword cppSTLfunction reserve -syntax keyword cppSTLfunction reset -syntax keyword cppSTLfunction resize -syntax keyword cppSTLfunction return_temporary_buffer -syntax keyword cppSTLfunction reverse -syntax keyword cppSTLfunction reverse_copy -syntax keyword cppSTLfunction rewind -syntax keyword cppSTLfunction rfind -syntax keyword cppSTLfunction rotate -syntax keyword cppSTLfunction rotate_copy -syntax keyword cppSTLfunction round_error -syntax keyword cppSTLfunction scanf -syntax keyword cppSTLfunction search -syntax keyword cppSTLfunction search_n -syntax keyword cppSTLfunction second -syntax keyword cppSTLfunction seekg -syntax keyword cppSTLfunction seekp -syntax keyword cppSTLfunction setbuf -syntax keyword cppSTLfunction set_difference -syntax keyword cppSTLfunction setf -syntax keyword cppSTLfunction set_intersection -syntax keyword cppSTLfunction setjmp -syntax keyword cppSTLfunction setlocale -syntax keyword cppSTLfunction set_new_handler -syntax keyword cppSTLfunction set_symmetric_difference -syntax keyword cppSTLfunction set_union -syntax keyword cppSTLfunction setvbuf -syntax keyword cppSTLfunction signal -syntax keyword cppSTLfunction signaling_NaN -syntax keyword cppSTLfunction sin -syntax keyword cppSTLfunction sinh -"syntax keyword cppSTLfunction size -syntax keyword cppSTLfunction sort -syntax keyword cppSTLfunction sort_heap -syntax keyword cppSTLfunction splice -syntax keyword cppSTLfunction sprintf -syntax keyword cppSTLfunction sqrt -syntax keyword cppSTLfunction srand -syntax keyword cppSTLfunction sscanf -syntax keyword cppSTLfunction stable_partition -syntax keyword cppSTLfunction stable_sort -syntax keyword cppSTLfunction str -syntax keyword cppSTLfunction strcat -syntax keyword cppSTLfunction strchr -syntax keyword cppSTLfunction strcmp -syntax keyword cppSTLfunction strcoll -syntax keyword cppSTLfunction strcpy -syntax keyword cppSTLfunction strcspn -syntax keyword cppSTLfunction strerror -syntax keyword cppSTLfunction strftime -syntax keyword cppSTLfunction string -syntax keyword cppSTLfunction strlen -syntax keyword cppSTLfunction strncat -syntax keyword cppSTLfunction strncmp -syntax keyword cppSTLfunction strncpy -syntax keyword cppSTLfunction strpbrk -syntax keyword cppSTLfunction strrchr -syntax keyword cppSTLfunction strspn -syntax keyword cppSTLfunction strstr -syntax keyword cppSTLfunction strtod -syntax keyword cppSTLfunction strtof -syntax keyword cppSTLfunction strtok -syntax keyword cppSTLfunction strtol -syntax keyword cppSTLfunction strtold -syntax keyword cppSTLfunction strtoll -syntax keyword cppSTLfunction strtoul -syntax keyword cppSTLfunction strxfrm -syntax keyword cppSTLfunction substr -syntax keyword cppSTLfunction swap -syntax keyword cppSTLfunction swap_ranges -syntax keyword cppSTLfunction swprintf -syntax keyword cppSTLfunction swscanf -syntax keyword cppSTLfunction sync_with_stdio -"syntax keyword cppSTLfunction system -syntax keyword cppSTLfunction tan -syntax keyword cppSTLfunction tanh -syntax keyword cppSTLfunction tellg -syntax keyword cppSTLfunction tellp -"syntax keyword cppSTLfunction test -"syntax keyword cppSTLfunction time -syntax keyword cppSTLfunction tmpfile -syntax keyword cppSTLfunction tmpnam -syntax keyword cppSTLfunction tolower -syntax keyword cppSTLfunction top -syntax keyword cppSTLfunction to_string -syntax keyword cppSTLfunction to_ulong -syntax keyword cppSTLfunction toupper -syntax keyword cppSTLfunction to_wstring -syntax keyword cppSTLfunction transform -syntax keyword cppSTLfunction unary_compose -syntax keyword cppSTLfunction unget -syntax keyword cppSTLfunction ungetc -syntax keyword cppSTLfunction uninitialized_copy -syntax keyword cppSTLfunction uninitialized_copy_n -syntax keyword cppSTLfunction uninitialized_fill -syntax keyword cppSTLfunction uninitialized_fill_n -syntax keyword cppSTLfunction unique -syntax keyword cppSTLfunction unique_copy -syntax keyword cppSTLfunction unsetf -syntax keyword cppSTLfunction upper_bound -syntax keyword cppSTLfunction va_arg -syntax keyword cppSTLfunction va_copy -syntax keyword cppSTLfunction va_end -syntax keyword cppSTLfunction value_comp -syntax keyword cppSTLfunction va_start -syntax keyword cppSTLfunction vfprintf -syntax keyword cppSTLfunction vfwprintf -syntax keyword cppSTLfunction vprintf -syntax keyword cppSTLfunction vsprintf -syntax keyword cppSTLfunction vswprintf -syntax keyword cppSTLfunction vwprintf -syntax keyword cppSTLfunction width -syntax keyword cppSTLfunction wprintf -syntax keyword cppSTLfunction write -syntax keyword cppSTLfunction wscanf -syntax keyword cppSTLios boolalpha -syntax keyword cppSTLios dec -syntax keyword cppSTLios defaultfloat -syntax keyword cppSTLios endl -syntax keyword cppSTLios ends -syntax keyword cppSTLios fixed -syntax keyword cppSTLios floatfield -syntax keyword cppSTLios flush -syntax keyword cppSTLios get_money -syntax keyword cppSTLios get_time -syntax keyword cppSTLios hex -syntax keyword cppSTLios hexfloat -syntax keyword cppSTLios internal -syntax keyword cppSTLios noboolalpha -syntax keyword cppSTLios noshowbase -syntax keyword cppSTLios noshowpoint -syntax keyword cppSTLios noshowpos -syntax keyword cppSTLios noskipws -syntax keyword cppSTLios nounitbuf -syntax keyword cppSTLios nouppercase -syntax keyword cppSTLios oct -syntax keyword cppSTLios put_money -syntax keyword cppSTLios put_time -syntax keyword cppSTLios resetiosflags -syntax keyword cppSTLios scientific -syntax keyword cppSTLios setbase -syntax keyword cppSTLios setfill -syntax keyword cppSTLios setiosflags -syntax keyword cppSTLios setprecision -syntax keyword cppSTLios setw -syntax keyword cppSTLios showbase -syntax keyword cppSTLios showpoint -syntax keyword cppSTLios showpos -syntax keyword cppSTLios skipws -syntax keyword cppSTLios unitbuf -syntax keyword cppSTLios uppercase -"syntax keyword cppSTLios ws -syntax keyword cppSTLiterator back_insert_iterator -syntax keyword cppSTLiterator const_iterator -syntax keyword cppSTLiterator const_reverse_iterator -syntax keyword cppSTLiterator front_insert_iterator -syntax keyword cppSTLiterator insert_iterator -syntax keyword cppSTLiterator istreambuf_iterator -syntax keyword cppSTLiterator istream_iterator -syntax keyword cppSTLiterator ostreambuf_iterator -syntax keyword cppSTLiterator ostream_iterator -syntax keyword cppSTLiterator iterator -syntax keyword cppSTLiterator ostream_iterator -syntax keyword cppSTLiterator output_iterator -syntax keyword cppSTLiterator raw_storage_iterator -syntax keyword cppSTLiterator move_iterator -syntax keyword cppSTLiterator reverse_iterator -syntax keyword cppSTLiterator_tag bidirectional_iterator_tag -syntax keyword cppSTLiterator_tag forward_iterator_tag -syntax keyword cppSTLiterator_tag input_iterator_tag -syntax keyword cppSTLiterator_tag output_iterator_tag -syntax keyword cppSTLiterator_tag random_access_iterator_tag -syntax keyword cppSTLnamespace rel_ops -syntax keyword cppSTLnamespace std -syntax keyword cppSTLnamespace experimental -syntax keyword cppSTLtype allocator -syntax keyword cppSTLtype auto_ptr -syntax keyword cppSTLtype basic_filebuf -syntax keyword cppSTLtype basic_fstream -syntax keyword cppSTLtype basic_ifstream -syntax keyword cppSTLtype basic_iostream -syntax keyword cppSTLtype basic_istream -syntax keyword cppSTLtype basic_istringstream -syntax keyword cppSTLtype basic_ofstream -syntax keyword cppSTLtype basic_ostream -syntax keyword cppSTLtype basic_ostringstream -syntax keyword cppSTLtype basic_streambuf -syntax keyword cppSTLtype basic_string -syntax keyword cppSTLtype basic_stringbuf -syntax keyword cppSTLtype basic_stringstream -syntax keyword cppSTLtype binary_compose -syntax keyword cppSTLtype binder1st -syntax keyword cppSTLtype binder2nd -syntax keyword cppSTLtype bitset -syntax keyword cppSTLtype char_traits -syntax keyword cppSTLtype char_type -syntax keyword cppSTLtype const_mem_fun1_t -syntax keyword cppSTLtype const_mem_fun_ref1_t -syntax keyword cppSTLtype const_mem_fun_ref_t -syntax keyword cppSTLtype const_mem_fun_t -syntax keyword cppSTLtype const_pointer -syntax keyword cppSTLtype const_reference -syntax keyword cppSTLtype container_type -syntax keyword cppSTLtype deque -syntax keyword cppSTLtype difference_type -syntax keyword cppSTLtype div_t -syntax keyword cppSTLtype double_t -syntax keyword cppSTLtype filebuf -syntax keyword cppSTLtype first_type -syntax keyword cppSTLtype float_denorm_style -syntax keyword cppSTLtype float_round_style -syntax keyword cppSTLtype float_t -syntax keyword cppSTLtype fstream -syntax keyword cppSTLtype gslice_array -syntax keyword cppSTLtype ifstream -syntax keyword cppSTLtype imaxdiv_t -syntax keyword cppSTLtype indirect_array -syntax keyword cppSTLtype int_type -syntax keyword cppSTLtype ios_base -syntax keyword cppSTLtype iostream -syntax keyword cppSTLtype istream -syntax keyword cppSTLtype istringstream -syntax keyword cppSTLtype istrstream -syntax keyword cppSTLtype iterator_traits -syntax keyword cppSTLtype key_compare -syntax keyword cppSTLtype key_type -syntax keyword cppSTLtype ldiv_t -syntax keyword cppSTLtype list -syntax keyword cppSTLtype lldiv_t -syntax keyword cppSTLtype map -syntax keyword cppSTLtype mapped_type -syntax keyword cppSTLtype mask_array -syntax keyword cppSTLtype mem_fun1_t -syntax keyword cppSTLtype mem_fun_ref1_t -syntax keyword cppSTLtype mem_fun_ref_t -syntax keyword cppSTLtype mem_fun_t -syntax keyword cppSTLtype multimap -syntax keyword cppSTLtype multiset -syntax keyword cppSTLtype nothrow_t -syntax keyword cppSTLtype off_type -syntax keyword cppSTLtype ofstream -syntax keyword cppSTLtype ostream -syntax keyword cppSTLtype ostringstream -syntax keyword cppSTLtype ostrstream -syntax keyword cppSTLtype pair -syntax keyword cppSTLtype pointer -syntax keyword cppSTLtype pointer_to_binary_function -syntax keyword cppSTLtype pointer_to_unary_function -syntax keyword cppSTLtype pos_type -syntax keyword cppSTLtype priority_queue -syntax keyword cppSTLtype queue -syntax keyword cppSTLtype reference -syntax keyword cppSTLtype second_type -syntax keyword cppSTLtype sequence_buffer -syntax keyword cppSTLtype set -syntax keyword cppSTLtype sig_atomic_t -syntax keyword cppSTLtype size_type -syntax keyword cppSTLtype slice_array -syntax keyword cppSTLtype stack -syntax keyword cppSTLtype stream -syntax keyword cppSTLtype streambuf -syntax keyword cppSTLtype streamsize -syntax keyword cppSTLtype string -syntax keyword cppSTLtype stringbuf -syntax keyword cppSTLtype stringstream -syntax keyword cppSTLtype strstream -syntax keyword cppSTLtype strstreambuf -syntax keyword cppSTLtype temporary_buffer -syntax keyword cppSTLtype test_type -syntax keyword cppSTLtype time_t -syntax keyword cppSTLtype tm -syntax keyword cppSTLtype traits_type -syntax keyword cppSTLtype type_info -syntax keyword cppSTLtype u16string -syntax keyword cppSTLtype u32string -syntax keyword cppSTLtype unary_compose -syntax keyword cppSTLtype unary_negate -syntax keyword cppSTLtype valarray -syntax keyword cppSTLtype value_compare -syntax keyword cppSTLtype value_type -syntax keyword cppSTLtype vector -syntax keyword cppSTLtype wfilebuf -syntax keyword cppSTLtype wfstream -syntax keyword cppSTLtype wifstream -syntax keyword cppSTLtype wiostream -syntax keyword cppSTLtype wistream -syntax keyword cppSTLtype wistringstream -syntax keyword cppSTLtype wofstream -syntax keyword cppSTLtype wostream -syntax keyword cppSTLtype wostringstream -syntax keyword cppSTLtype wstreambuf -syntax keyword cppSTLtype wstring -syntax keyword cppSTLtype wstringbuf -syntax keyword cppSTLtype wstringstream - -syntax keyword cppSTLfunction mblen -syntax keyword cppSTLfunction mbtowc -syntax keyword cppSTLfunction wctomb -syntax keyword cppSTLfunction mbstowcs -syntax keyword cppSTLfunction wcstombs -syntax keyword cppSTLfunction mbsinit -syntax keyword cppSTLfunction btowc -syntax keyword cppSTLfunction wctob -syntax keyword cppSTLfunction mbrlen -syntax keyword cppSTLfunction mbrtowc -syntax keyword cppSTLfunction wcrtomb -syntax keyword cppSTLfunction mbsrtowcs -syntax keyword cppSTLfunction wcsrtombs - -syntax keyword cppSTLtype mbstate_t - -syntax keyword cppSTLconstant MB_LEN_MAX -syntax keyword cppSTLconstant MB_CUR_MAX -syntax keyword cppSTLconstant __STDC_UTF_16__ -syntax keyword cppSTLconstant __STDC_UTF_32__ - -syntax keyword cppSTLfunction iswalnum -syntax keyword cppSTLfunction iswalpha -syntax keyword cppSTLfunction iswlower -syntax keyword cppSTLfunction iswupper -syntax keyword cppSTLfunction iswdigit -syntax keyword cppSTLfunction iswxdigit -syntax keyword cppSTLfunction iswcntrl -syntax keyword cppSTLfunction iswgraph -syntax keyword cppSTLfunction iswspace -syntax keyword cppSTLfunction iswprint -syntax keyword cppSTLfunction iswpunct -syntax keyword cppSTLfunction iswctype -syntax keyword cppSTLfunction wctype - -syntax keyword cppSTLfunction towlower -syntax keyword cppSTLfunction towupper -syntax keyword cppSTLfunction towctrans -syntax keyword cppSTLfunction wctrans - -syntax keyword cppSTLfunction wcstol -syntax keyword cppSTLfunction wcstoll -syntax keyword cppSTLfunction wcstoul -syntax keyword cppSTLfunction wcstoull -syntax keyword cppSTLfunction wcstof -syntax keyword cppSTLfunction wcstod -syntax keyword cppSTLfunction wcstold - -syntax keyword cppSTLfunction wcscpy -syntax keyword cppSTLfunction wcsncpy -syntax keyword cppSTLfunction wcscat -syntax keyword cppSTLfunction wcsncat -syntax keyword cppSTLfunction wcsxfrm -syntax keyword cppSTLfunction wcslen -syntax keyword cppSTLfunction wcscmp -syntax keyword cppSTLfunction wcsncmp -syntax keyword cppSTLfunction wcscoll -syntax keyword cppSTLfunction wcschr -syntax keyword cppSTLfunction wcsrchr -syntax keyword cppSTLfunction wcsspn -syntax keyword cppSTLfunction wcscspn -syntax keyword cppSTLfunction wcspbrk -syntax keyword cppSTLfunction wcsstr -syntax keyword cppSTLfunction wcstok -syntax keyword cppSTLfunction wmemcpy -syntax keyword cppSTLfunction wmemmove -syntax keyword cppSTLfunction wmemcmp -syntax keyword cppSTLfunction wmemchr -syntax keyword cppSTLfunction wmemset - -syntax keyword cppSTLtype wctrans_t -syntax keyword cppSTLtype wctype_t -syntax keyword cppSTLtype wint_t - -syntax keyword cppSTLconstant WEOF -syntax keyword cppSTLconstant WCHAR_MIN -syntax keyword cppSTLconstant WCHAR_MAX - -" locale -syntax keyword cppSTLtype locale -syntax keyword cppSTLtype ctype_base -syntax keyword cppSTLtype codecvt_base -syntax keyword cppSTLtype messages_base -syntax keyword cppSTLtype time_base -syntax keyword cppSTLtype money_base -syntax keyword cppSTLtype ctype -syntax keyword cppSTLtype codecvt -syntax keyword cppSTLtype collate -syntax keyword cppSTLtype messages -syntax keyword cppSTLtype time_get -syntax keyword cppSTLtype time_put -syntax keyword cppSTLtype num_get -syntax keyword cppSTLtype num_put -syntax keyword cppSTLtype numpunct -syntax keyword cppSTLtype money_get -syntax keyword cppSTLtype money_put -syntax keyword cppSTLtype moneypunct -syntax keyword cppSTLtype ctype_byname -syntax keyword cppSTLtype codecvt_byname -syntax keyword cppSTLtype messages_byname -syntax keyword cppSTLtype collate_byname -syntax keyword cppSTLtype time_get_byname -syntax keyword cppSTLtype time_put_byname -syntax keyword cppSTLtype numpunct_byname -syntax keyword cppSTLtype moneypunct_byname -syntax keyword cppSTLfunction use_facet -syntax keyword cppSTLfunction has_facet -syntax keyword cppSTLfunction isspace isblank iscntrl isupper islower isalpha -syntax keyword cppSTLfunction isdigit ispunct isxdigit isalnum isprint isgraph - -if !exists("cpp_no_cpp11") - syntax keyword cppSTLconstant nullptr - - " containers (array, vector, list, *map, *set, ...) - syntax keyword cppSTLtype array - syntax keyword cppSTLfunction cbegin cend - syntax keyword cppSTLfunction crbegin crend - syntax keyword cppSTLfunction shrink_to_fit - syntax keyword cppSTLfunction emplace - syntax keyword cppSTLfunction emplace_back - syntax keyword cppSTLfunction emplace_front - syntax keyword cppSTLfunction emplace_hint - - " algorithm - syntax keyword cppSTLfunction all_of any_of none_of - syntax keyword cppSTLfunction find_if_not - syntax keyword cppSTLfunction copy_if - syntax keyword cppSTLfunction copy_n - syntax keyword cppSTLfunction move - syntax keyword cppSTLfunction move_backward - syntax keyword cppSTLfunction shuffle - syntax keyword cppSTLfunction is_partitioned - syntax keyword cppSTLfunction partition_copy - syntax keyword cppSTLfunction partition_point - syntax keyword cppSTLfunction is_sorted - syntax keyword cppSTLfunction is_sorted_until - syntax keyword cppSTLfunction is_heap - syntax keyword cppSTLfunction is_heap_until - syntax keyword cppSTLfunction minmax - syntax keyword cppSTLfunction minmax_element - syntax keyword cppSTLfunction is_permutation - syntax keyword cppSTLfunction itoa - - " atomic - syntax keyword cppSTLtype atomic - syntax keyword cppSTLtype atomic_flag - syntax keyword cppSTLtype atomic_bool - syntax keyword cppSTLtype atomic_char - syntax keyword cppSTLtype atomic_schar - syntax keyword cppSTLtype atomic_uchar - syntax keyword cppSTLtype atomic_short - syntax keyword cppSTLtype atomic_ushort - syntax keyword cppSTLtype atomic_int - syntax keyword cppSTLtype atomic_uint - syntax keyword cppSTLtype atomic_long - syntax keyword cppSTLtype atomic_ulong - syntax keyword cppSTLtype atomic_llong - syntax keyword cppSTLtype atomic_ullong - syntax keyword cppSTLtype atomic_char16_t - syntax keyword cppSTLtype atomic_char32_t - syntax keyword cppSTLtype atomic_wchar_t - syntax keyword cppSTLtype atomic_int_least8_t - syntax keyword cppSTLtype atomic_uint_least8_t - syntax keyword cppSTLtype atomic_int_least16_t - syntax keyword cppSTLtype atomic_uint_least16_t - syntax keyword cppSTLtype atomic_int_least32_t - syntax keyword cppSTLtype atomic_uint_least32_t - syntax keyword cppSTLtype atomic_int_least64_t - syntax keyword cppSTLtype atomic_uint_least64_t - syntax keyword cppSTLtype atomic_int_fast8_t - syntax keyword cppSTLtype atomic_uint_fast8_t - syntax keyword cppSTLtype atomic_int_fast16_t - syntax keyword cppSTLtype atomic_uint_fast16_t - syntax keyword cppSTLtype atomic_int_fast32_t - syntax keyword cppSTLtype atomic_uint_fast32_t - syntax keyword cppSTLtype atomic_int_fast64_t - syntax keyword cppSTLtype atomic_uint_fast64_t - syntax keyword cppSTLtype atomic_intptr_t - syntax keyword cppSTLtype atomic_uintptr_t - syntax keyword cppSTLtype atomic_size_t - syntax keyword cppSTLtype atomic_ptrdiff_t - syntax keyword cppSTLtype atomic_intmax_t - syntax keyword cppSTLtype atomic_uintmax_t - syntax keyword cppSTLconstant ATOMIC_FLAG_INIT - syntax keyword cppSTLenum memory_order - syntax keyword cppSTLtype memory_order_relaxed - syntax keyword cppSTLtype memory_order_consume - syntax keyword cppSTLtype memory_order_acquire - syntax keyword cppSTLtype memory_order_release - syntax keyword cppSTLtype memory_order_acq_rel - syntax keyword cppSTLtype memory_order_seq_cst - syntax keyword cppSTLfunction is_lock_free - syntax keyword cppSTLfunction compare_exchange_weak - syntax keyword cppSTLfunction compare_exchange_strong - syntax keyword cppSTLfunction fetch_add - syntax keyword cppSTLfunction fetch_sub - syntax keyword cppSTLfunction fetch_and - syntax keyword cppSTLfunction fetch_or - syntax keyword cppSTLfunction fetch_xor - syntax keyword cppSTLfunction atomic_is_lock_free - syntax keyword cppSTLfunction atomic_store - syntax keyword cppSTLfunction atomic_store_explicit - syntax keyword cppSTLfunction atomic_load - syntax keyword cppSTLfunction atomic_load_explicit - syntax keyword cppSTLfunction atomic_exchange - syntax keyword cppSTLfunction atomic_exchange_explicit - syntax keyword cppSTLfunction atomic_compare_exchange_weak - syntax keyword cppSTLfunction atomic_compare_exchange_weak_explicit - syntax keyword cppSTLfunction atomic_compare_exchange_strong - syntax keyword cppSTLfunction atomic_compare_exchange_strong_explicit - syntax keyword cppSTLfunction atomic_fetch_add - syntax keyword cppSTLfunction atomic_fetch_add_explicit - syntax keyword cppSTLfunction atomic_fetch_sub - syntax keyword cppSTLfunction atomic_fetch_sub_explicit - syntax keyword cppSTLfunction atomic_fetch_and - syntax keyword cppSTLfunction atomic_fetch_and_explicit - syntax keyword cppSTLfunction atomic_fetch_or - syntax keyword cppSTLfunction atomic_fetch_or_explicit - syntax keyword cppSTLfunction atomic_fetch_xor - syntax keyword cppSTLfunction atomic_fetch_xor_explicit - syntax keyword cppSTLfunction atomic_flag_test_and_set - syntax keyword cppSTLfunction atomic_flag_test_and_set_explicit - syntax keyword cppSTLfunction atomic_flag_clear - syntax keyword cppSTLfunction atomic_flag_clear_explicit - syntax keyword cppSTLfunction atomic_init - syntax keyword cppSTLfunction ATOMIC_VAR_INIT - syntax keyword cppSTLfunction kill_dependency - syntax keyword cppSTLfunction atomic_thread_fence - syntax keyword cppSTLfunction atomic_signal_fence - syntax keyword cppSTLfunction exchange - " syntax keyword cppSTLfunction store - " syntax keyword cppSTLfunction load - - " bitset - syntax keyword cppSTLfunction to_ullong - " syntax keyword cppSTLfunction all - - " cinttypes - syntax keyword cppSTLfunction strtoimax - syntax keyword cppSTLfunction strtoumax - syntax keyword cppSTLfunction wcstoimax - syntax keyword cppSTLfunction wcstoumax - - " chrono - syntax keyword cppSTLnamespace chrono - syntax keyword cppSTLcast duration_cast - syntax keyword cppSTLcast time_point_cast - syntax keyword cppSTLtype duration - syntax keyword cppSTLtype system_clock - syntax keyword cppSTLtype steady_clock - syntax keyword cppSTLtype high_resolution_clock - syntax keyword cppSTLtype time_point - syntax keyword cppSTLtype nanoseconds - syntax keyword cppSTLtype microseconds - syntax keyword cppSTLtype milliseconds - syntax keyword cppSTLtype seconds - syntax keyword cppSTLtype minutes - syntax keyword cppSTLtype hours - syntax keyword cppSTLtype treat_as_floating_point - syntax keyword cppSTLtype duration_values - " syntax keyword cppSTLtype rep period - syntax keyword cppSTLfunction time_since_epoch - syntax keyword cppSTLfunction to_time_t - syntax keyword cppSTLfunction from_time_t - " syntax keyword cppSTLfunction zero - " syntax keyword cppSTLfunction now - - " complex - " syntax keyword cppSTLfunction proj - - " condition_variable - syntax keyword cppSTLtype condition_variable - syntax keyword cppSTLfunction notify_all - syntax keyword cppSTLfunction notify_one - - " cstddef - syntax keyword cppSTLtype nullptr_t max_align_t - - " cstdlib - syntax keyword cppSTLfunction quick_exit - syntax keyword cppSTLfunction _Exit - syntax keyword cppSTLfunction at_quick_exit - - " cuchar - syntax keyword cppSTLfunction mbrtoc16 - syntax keyword cppSTLfunction c16rtomb - syntax keyword cppSTLfunction mbrtoc32 - syntax keyword cppSTLfunction c32rtomb - - " exception - syntax keyword cppSTLtype exception_ptr - syntax keyword cppSTLtype nested_exception - syntax keyword cppSTLfunction get_terminate - syntax keyword cppSTLfunction make_exception_ptr - syntax keyword cppSTLfunction current_exception - syntax keyword cppSTLfunction rethrow_exception - syntax keyword cppSTLfunction throw_with_nested - syntax keyword cppSTLfunction rethrow_if_nested - syntax keyword cppSTLfunction rethrow_nested - - " forward_list - syntax keyword cppSTLtype forward_list - syntax keyword cppSTLfunction before_begin - syntax keyword cppSTLfunction cbefore_begin - syntax keyword cppSTLfunction insert_after - syntax keyword cppSTLfunction emplace_after - syntax keyword cppSTLfunction erase_after - syntax keyword cppSTLfunction splice_after - - " functional - syntax keyword cppSTLexception bad_function_call - syntax keyword cppSTLfunctional function - syntax keyword cppSTLconstant _1 _2 _3 _4 _5 _6 _7 _8 _9 - syntax keyword cppSTLtype hash - syntax keyword cppSTLtype is_bind_expression - syntax keyword cppSTLtype is_placeholder - syntax keyword cppSTLtype reference_wrapper - syntax keyword cppSTLfunction bind - syntax keyword cppSTLfunction mem_fn - syntax keyword cppSTLfunction ref cref - - " future - syntax keyword cppSTLtype future - syntax keyword cppSTLtype packaged_task - syntax keyword cppSTLtype promise - syntax keyword cppSTLtype shared_future - syntax keyword cppSTLenum future_status - syntax keyword cppSTLenum future_errc - syntax keyword cppSTLenum launch - syntax keyword cppSTLexception future_error - syntax keyword cppSTLfunction get_future - syntax keyword cppSTLfunction set_value - syntax keyword cppSTLfunction set_value_at_thread_exit - syntax keyword cppSTLfunction set_exception - syntax keyword cppSTLfunction set_exception_at_thread_exit - syntax keyword cppSTLfunction wait_for - syntax keyword cppSTLfunction wait_until - syntax keyword cppSTLfunction future_category - syntax keyword cppSTLfunction make_error_code - syntax keyword cppSTLfunction make_error_condition - syntax keyword cppSTLfunction make_ready_at_thread_exit - " syntax keyword cppSTLfunction async - " syntax keyword cppSTLfunction share - " syntax keyword cppSTLfunction valid - " syntax keyword cppSTLfunction wait - - " initializer_list - syntax keyword cppSTLtype initializer_list - - " io - syntax keyword cppSTLenum io_errc - syntax keyword cppSTLfunction iostream_category - syntax keyword cppSTLfunction vscanf vfscanf vsscanf - syntax keyword cppSTLfunction snprintf vsnprintf - syntax keyword cppSTLfunction vwscanf vfwscanf vswscanf - - " iterator - syntax keyword cppSTLiterator move_iterator - syntax keyword cppSTLfunction make_move_iterator - syntax keyword cppSTLfunction next prev - - " limits - syntax keyword cppSTLconstant max_digits10 - syntax keyword cppSTLfunction lowest - - " locale - syntax keyword cppSTLtype wstring_convert - syntax keyword cppSTLtype wbuffer_convert - syntax keyword cppSTLtype codecvt_utf8 - syntax keyword cppSTLtype codecvt_utf16 - syntax keyword cppSTLtype codecvt_utf8_utf16 - syntax keyword cppSTLtype codecvt_mode - syntax keyword cppSTLfunction isblank - syntax keyword cppSTLfunction iswblank - - " memory - syntax keyword cppSTLtype unique_ptr - syntax keyword cppSTLtype shared_ptr - syntax keyword cppSTLtype weak_ptr - syntax keyword cppSTLtype owner_less - syntax keyword cppSTLtype enable_shared_from_this - syntax keyword cppSTLtype default_delete - syntax keyword cppSTLtype allocator_traits - syntax keyword cppSTLtype allocator_type - syntax keyword cppSTLtype allocator_arg_t - syntax keyword cppSTLtype uses_allocator - syntax keyword cppSTLtype scoped_allocator_adaptor - syntax keyword cppSTLtype pointer_safety - syntax keyword cppSTLtype pointer_traits - syntax keyword cppSTLconstant allocator_arg - syntax keyword cppSTLexception bad_weak_ptr - syntax keyword cppSTLcast static_pointer_cast - syntax keyword cppSTLcast dynamic_pointer_cast - syntax keyword cppSTLcast const_pointer_cast - syntax keyword cppSTLfunction make_shared - syntax keyword cppSTLfunction declare_reachable - syntax keyword cppSTLfunction undeclare_reachable - syntax keyword cppSTLfunction declare_no_pointers - syntax keyword cppSTLfunction undeclare_no_pointers - syntax keyword cppSTLfunction get_pointer_safety - syntax keyword cppSTLfunction addressof - syntax keyword cppSTLfunction allocate_shared - syntax keyword cppSTLfunction get_deleter - " syntax keyword cppSTLfunction align - - " mutex - syntax keyword cppSTLtype mutex - syntax keyword cppSTLtype timed_mutex - syntax keyword cppSTLtype recursive_mutex - syntax keyword cppSTLtype recursive_timed_mutex - syntax keyword cppSTLtype lock_guard - syntax keyword cppSTLtype unique_lock - syntax keyword cppSTLtype defer_lock_t - syntax keyword cppSTLtype try_to_lock_t - syntax keyword cppSTLtype adopt_lock_t - syntax keyword cppSTLtype once_flag - syntax keyword cppSTLtype condition_variable_any - syntax keyword cppSTLenum cv_status - syntax keyword cppSTLconstant defer_lock try_to_lock adopt_lock - syntax keyword cppSTLfunction try_lock lock unlock try_lock_for try_lock_until - syntax keyword cppSTLfunction call_once - syntax keyword cppSTLfunction owns_lock - syntax keyword cppSTLfunction notify_all_at_thread_exit - syntax keyword cppSTLfunction release - " Note: unique_lock has method 'mutex()', but already set as cppSTLtype - " syntax keyword cppSTLfunction mutex - - " new - syntax keyword cppSTLexception bad_array_new_length - syntax keyword cppSTLfunction get_new_handler - - " numerics, cmath - syntax keyword cppSTLconstant HUGE_VALF - syntax keyword cppSTLconstant HUGE_VALL - syntax keyword cppSTLconstant INFINITY - syntax keyword cppSTLconstant NAN - syntax keyword cppSTLconstant math_errhandling - syntax keyword cppSTLconstant MATH_ERRNO - syntax keyword cppSTLconstant MATH_ERREXCEPT - syntax keyword cppSTLconstant FP_NORMAL - syntax keyword cppSTLconstant FP_SUBNORMAL - syntax keyword cppSTLconstant FP_ZERO - syntax keyword cppSTLconstant FP_INFINITY - syntax keyword cppSTLconstant FP_NAN - syntax keyword cppSTLconstant FLT_EVAL_METHOD - syntax keyword cppSTLfunction imaxabs - syntax keyword cppSTLfunction imaxdiv - syntax keyword cppSTLfunction remainder - syntax keyword cppSTLfunction remquo - syntax keyword cppSTLfunction fma - syntax keyword cppSTLfunction fmax - syntax keyword cppSTLfunction fmin - syntax keyword cppSTLfunction fdim - syntax keyword cppSTLfunction nan - syntax keyword cppSTLfunction nanf - syntax keyword cppSTLfunction nanl - syntax keyword cppSTLfunction exp2 - syntax keyword cppSTLfunction expm1 - syntax keyword cppSTLfunction log1p - syntax keyword cppSTLfunction log2 - syntax keyword cppSTLfunction cbrt - syntax keyword cppSTLfunction hypot - syntax keyword cppSTLfunction asinh - syntax keyword cppSTLfunction acosh - syntax keyword cppSTLfunction atanh - syntax keyword cppSTLfunction erf - syntax keyword cppSTLfunction erfc - syntax keyword cppSTLfunction lgamma - syntax keyword cppSTLfunction tgamma - syntax keyword cppSTLfunction trunc - syntax keyword cppSTLfunction round - syntax keyword cppSTLfunction lround - syntax keyword cppSTLfunction llround - syntax keyword cppSTLfunction nearbyint - syntax keyword cppSTLfunction rint - syntax keyword cppSTLfunction lrint - syntax keyword cppSTLfunction llrint - syntax keyword cppSTLfunction scalbn - syntax keyword cppSTLfunction scalbln - syntax keyword cppSTLfunction ilogb - syntax keyword cppSTLfunction logb - syntax keyword cppSTLfunction nextafter - syntax keyword cppSTLfunction nexttoward - syntax keyword cppSTLfunction copysign - syntax keyword cppSTLfunction fpclassify - syntax keyword cppSTLfunction isfinite - syntax keyword cppSTLfunction isinf - syntax keyword cppSTLfunction isnan - syntax keyword cppSTLfunction isnormal - syntax keyword cppSTLfunction signbit - - " random - syntax keyword cppSTLtype linear_congruential_engine - syntax keyword cppSTLtype mersenne_twister_engine - syntax keyword cppSTLtype subtract_with_carry_engine - syntax keyword cppSTLtype discard_block_engine - syntax keyword cppSTLtype independent_bits_engine - syntax keyword cppSTLtype shuffle_order_engine - syntax keyword cppSTLtype random_device - syntax keyword cppSTLtype default_random_engine - syntax keyword cppSTLtype minstd_rand0 - syntax keyword cppSTLtype minstd_rand - syntax keyword cppSTLtype mt19937 - syntax keyword cppSTLtype mt19937_64 - syntax keyword cppSTLtype ranlux24_base - syntax keyword cppSTLtype ranlux48_base - syntax keyword cppSTLtype ranlux24 - syntax keyword cppSTLtype ranlux48 - syntax keyword cppSTLtype knuth_b - syntax keyword cppSTLtype uniform_int_distribution - syntax keyword cppSTLtype uniform_real_distribution - syntax keyword cppSTLtype bernoulli_distribution - syntax keyword cppSTLtype binomial_distribution - syntax keyword cppSTLtype negative_binomial_distribution - syntax keyword cppSTLtype geometric_distribution - syntax keyword cppSTLtype poisson_distribution - syntax keyword cppSTLtype exponential_distribution - syntax keyword cppSTLtype gamma_distribution - syntax keyword cppSTLtype weibull_distribution - syntax keyword cppSTLtype extreme_value_distribution - syntax keyword cppSTLtype normal_distribution - syntax keyword cppSTLtype lognormal_distribution - syntax keyword cppSTLtype chi_squared_distribution - syntax keyword cppSTLtype cauchy_distribution - syntax keyword cppSTLtype fisher_f_distribution - syntax keyword cppSTLtype student_t_distribution - syntax keyword cppSTLtype discrete_distribution - syntax keyword cppSTLtype piecewise_constant_distribution - syntax keyword cppSTLtype piecewise_linear_distribution - syntax keyword cppSTLtype seed_seq - syntax keyword cppSTLfunction generate_canonical - - " ratio - syntax keyword cppSTLtype ratio - syntax keyword cppSTLtype yocto - syntax keyword cppSTLtype zepto - syntax keyword cppSTLtype atto - syntax keyword cppSTLtype femto - syntax keyword cppSTLtype pico - syntax keyword cppSTLtype nano - syntax keyword cppSTLtype micro - syntax keyword cppSTLtype milli - syntax keyword cppSTLtype centi - syntax keyword cppSTLtype deci - syntax keyword cppSTLtype deca - syntax keyword cppSTLtype hecto - syntax keyword cppSTLtype kilo - syntax keyword cppSTLtype mega - syntax keyword cppSTLtype giga - syntax keyword cppSTLtype tera - syntax keyword cppSTLtype peta - syntax keyword cppSTLtype exa - syntax keyword cppSTLtype zetta - syntax keyword cppSTLtype yotta - syntax keyword cppSTLtype ratio_add - syntax keyword cppSTLtype ratio_subtract - syntax keyword cppSTLtype ratio_multiply - syntax keyword cppSTLtype ratio_divide - syntax keyword cppSTLtype ratio_equal - syntax keyword cppSTLtype ratio_not_equal - syntax keyword cppSTLtype ratio_less - syntax keyword cppSTLtype ratio_less_equal - syntax keyword cppSTLtype ratio_greater - syntax keyword cppSTLtype ratio_greater_equal - - " regex - syntax keyword cppSTLtype basic_regex - syntax keyword cppSTLtype sub_match - syntax keyword cppSTLtype match_results - syntax keyword cppSTLtype regex_traits - syntax keyword cppSTLtype regex_match regex_search regex_replace - syntax keyword cppSTLiterator regex_iterator - syntax keyword cppSTLiterator regex_token_iterator - syntax keyword cppSTLexception regex_error - syntax keyword cppSTLtype syntax_option_type match_flag_type error_type - - " string - syntax keyword cppSTLfunction stoi - syntax keyword cppSTLfunction stol - syntax keyword cppSTLfunction stoll - syntax keyword cppSTLfunction stoul - syntax keyword cppSTLfunction stoull - syntax keyword cppSTLfunction stof - syntax keyword cppSTLfunction stod - syntax keyword cppSTLfunction stold - - " system_error - syntax keyword cppSTLenum errc - syntax keyword cppSTLtype system_error - syntax keyword cppSTLtype error_code - syntax keyword cppSTLtype error_condition - syntax keyword cppSTLtype error_category - syntax keyword cppSTLtype is_error_code_enum - syntax keyword cppSTLtype is_error_condition_enum - " syntax keyword cppSTLfunction default_error_condition - " syntax keyword cppSTLfunction generic_category - " syntax keyword cppSTLfunction system_category - " syntax keyword cppSTLfunction code - " syntax keyword cppSTLfunction category - " syntax keyword cppSTLfunction message - " syntax keyword cppSTLfunction equivalent - - " thread - syntax keyword cppSTLnamespace this_thread - syntax keyword cppSTLtype thread - syntax keyword cppSTLfunction get_id - syntax keyword cppSTLfunction sleep_for - syntax keyword cppSTLfunction sleep_until - syntax keyword cppSTLfunction joinable - syntax keyword cppSTLfunction native_handle - syntax keyword cppSTLfunction hardware_concurrency - " syntax keyword cppSTLfunction yield - " syntax keyword cppSTLfunction join - " syntax keyword cppSTLfunction detach - - " tuple - syntax keyword cppSTLtype tuple - syntax keyword cppSTLtype tuple_size - syntax keyword cppSTLtype tuple_element - syntax keyword cppSTLfunction make_tuple - syntax keyword cppSTLfunction tie - syntax keyword cppSTLfunction forward_as_tuple - syntax keyword cppSTLfunction tuple_cat - " Note: 'ignore' is already set as cppSTLfunction - " syntax keyword cppSTLconstant ignore - - " typeindex - syntax keyword cppSTLtype type_index - - " type_traits - syntax keyword cppSTLtype is_void - syntax keyword cppSTLtype is_integral - syntax keyword cppSTLtype is_floating_point - syntax keyword cppSTLtype is_array - syntax keyword cppSTLtype is_enum - syntax keyword cppSTLtype is_union - syntax keyword cppSTLtype is_class - syntax keyword cppSTLtype is_function - syntax keyword cppSTLtype is_pointer - syntax keyword cppSTLtype is_lvalue_reference - syntax keyword cppSTLtype is_rvalue_reference - syntax keyword cppSTLtype is_member_object_pointer - syntax keyword cppSTLtype is_member_function_pointer - syntax keyword cppSTLtype is_fundamental - syntax keyword cppSTLtype is_arithmetic - syntax keyword cppSTLtype is_scalar - syntax keyword cppSTLtype is_object - syntax keyword cppSTLtype is_compound - syntax keyword cppSTLtype is_reference - syntax keyword cppSTLtype is_member_pointer - syntax keyword cppSTLtype is_const - syntax keyword cppSTLtype is_volatile - syntax keyword cppSTLtype is_trivial - syntax keyword cppSTLtype is_trivially_copyable - syntax keyword cppSTLtype is_standard_layout - syntax keyword cppSTLtype is_pod - syntax keyword cppSTLtype is_literal_type - syntax keyword cppSTLtype is_empty - syntax keyword cppSTLtype is_polymorphic - syntax keyword cppSTLtype is_abstract - syntax keyword cppSTLtype is_signed - syntax keyword cppSTLtype is_unsigned - syntax keyword cppSTLtype is_constructible - syntax keyword cppSTLtype is_trivially_constructible - syntax keyword cppSTLtype is_nothrow_constructible - syntax keyword cppSTLtype is_default_constructible - syntax keyword cppSTLtype is_trivially_default_constructible - syntax keyword cppSTLtype is_nothrow_default_constructible - syntax keyword cppSTLtype is_copy_constructible - syntax keyword cppSTLtype is_trivially_copy_constructible - syntax keyword cppSTLtype is_nothrow_copy_constructible - syntax keyword cppSTLtype is_move_constructible - syntax keyword cppSTLtype is_trivially_move_constructible - syntax keyword cppSTLtype is_nothrow_move_constructible - syntax keyword cppSTLtype is_assignable - syntax keyword cppSTLtype is_trivially_assignable - syntax keyword cppSTLtype is_nothrow_assignable - syntax keyword cppSTLtype is_copy_assignable - syntax keyword cppSTLtype is_trivially_copy_assignable - syntax keyword cppSTLtype is_nothrow_copy_assignable - syntax keyword cppSTLtype is_move_assignable - syntax keyword cppSTLtype is_trivially_move_assignable - syntax keyword cppSTLtype is_nothrow_move_assignable - syntax keyword cppSTLtype is_destructible - syntax keyword cppSTLtype is_trivially_destructible - syntax keyword cppSTLtype is_nothrow_destructible - syntax keyword cppSTLtype has_virtual_destructor - syntax keyword cppSTLtype alignment_of - syntax keyword cppSTLtype rank - syntax keyword cppSTLtype extent - syntax keyword cppSTLtype is_same - syntax keyword cppSTLtype is_base_of - syntax keyword cppSTLtype is_convertible - syntax keyword cppSTLtype remove_cv - syntax keyword cppSTLtype remove_const - syntax keyword cppSTLtype remove_volatile - syntax keyword cppSTLtype add_cv - syntax keyword cppSTLtype add_const - syntax keyword cppSTLtype add_volatile - syntax keyword cppSTLtype remove_reference - syntax keyword cppSTLtype add_lvalue_reference - syntax keyword cppSTLtype add_rvalue_reference - syntax keyword cppSTLtype remove_pointer - syntax keyword cppSTLtype add_pointer - syntax keyword cppSTLtype make_signed - syntax keyword cppSTLtype make_unsigned - syntax keyword cppSTLtype remove_extent - syntax keyword cppSTLtype remove_all_extents - syntax keyword cppSTLtype aligned_storage - syntax keyword cppSTLtype aligned_union - syntax keyword cppSTLtype decay - syntax keyword cppSTLtype enable_if - syntax keyword cppSTLtype conditional - syntax keyword cppSTLtype common_type - syntax keyword cppSTLtype underlying_type - syntax keyword cppSTLtype result_of - syntax keyword cppSTLtype integral_constant - syntax keyword cppSTLtype true_type - syntax keyword cppSTLtype false_type - - " unordered_map, unordered_set, unordered_multimap, unordered_multiset - syntax keyword cppSTLtype unordered_map - syntax keyword cppSTLtype unordered_set - syntax keyword cppSTLtype unordered_multimap - syntax keyword cppSTLtype unordered_multiset - syntax keyword cppSTLtype hasher - syntax keyword cppSTLtype key_equal - syntax keyword cppSTLiterator local_iterator - syntax keyword cppSTLiterator const_local_iterator - syntax keyword cppSTLfunction bucket_count - syntax keyword cppSTLfunction max_bucket_count - syntax keyword cppSTLfunction bucket_size - syntax keyword cppSTLfunction bucket - syntax keyword cppSTLfunction load_factor - syntax keyword cppSTLfunction max_load_factor - syntax keyword cppSTLfunction rehash - syntax keyword cppSTLfunction reserve - syntax keyword cppSTLfunction hash_function - syntax keyword cppSTLfunction key_eq - - " utility - syntax keyword cppSTLtype piecewise_construct_t - syntax keyword cppSTLconstant piecewise_construct - syntax keyword cppSTLfunction declval - syntax keyword cppSTLfunction forward - syntax keyword cppSTLfunction move_if_noexcept - - " raw string literals - syntax region cppRawString matchgroup=cppRawDelimiter start=@\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(@ end=/)\z1"/ contains=@Spell - - syn match cNumber "0b[01]\+" -endif " C++11 - - -if !exists("cpp_no_cpp14") - " chrono - syntax keyword cppSTLnamespace literals - syntax keyword cppSTLnamespace chrono_literals - - " iterator - syntax keyword cppSTLfunction make_reverse_iterator - - " memory - syntax keyword cppSTLfunction make_unique - - " utility - syntax keyword cppSTLtype integer_sequence - syntax keyword cppSTLtype index_sequence - syntax keyword cppSTLtype make_integer_sequence - syntax keyword cppSTLtype make_index_sequence - syntax keyword cppSTLtype index_sequence_for - - " shared_mutex - syntax keyword cppSTLtype shared_timed_mutex - syntax keyword cppSTLtype shared_lock - syntax keyword cppSTLfunction lock_shared - syntax keyword cppSTLfunction unlock_shared - syntax keyword cppSTLfunction try_lock_shared - syntax keyword cppSTLfunction try_lock_shared_for - syntax keyword cppSTLfunction try_lock_shared_until - - " string - syntax keyword cppSTLnamespace string_literals - - " tuple - syntax keyword cppSTLtype tuple_element_t - - " type_traits - syntax keyword cppSTLtype is_null_pointer - syntax keyword cppSTLtype remove_cv_t - syntax keyword cppSTLtype remove_const_t - syntax keyword cppSTLtype remove_volatile_t - syntax keyword cppSTLtype add_cv_t - syntax keyword cppSTLtype add_const_t - syntax keyword cppSTLtype add_volatile_t - syntax keyword cppSTLtype remove_reference_t - syntax keyword cppSTLtype add_lvalue_reference_t - syntax keyword cppSTLtype add_rvalue_reference_t - syntax keyword cppSTLtype remove_pointer_t - syntax keyword cppSTLtype add_pointer_t - syntax keyword cppSTLtype make_signed_t - syntax keyword cppSTLtype make_unsigned_t - syntax keyword cppSTLtype remove_extent_t - syntax keyword cppSTLtype remove_all_extents_t - syntax keyword cppSTLtype aligned_storage_t - syntax keyword cppSTLtype aligned_union_t - syntax keyword cppSTLtype decay_t - syntax keyword cppSTLtype enable_if_t - syntax keyword cppSTLtype conditional_t - syntax keyword cppSTLtype common_type_t - syntax keyword cppSTLtype underlying_type_t - syntax keyword cppSTLtype result_of_t -endif " C++14 - - -if !exists("cpp_no_cpp17") - syntax keyword cppSTLnamespace pmr - - " algorithm - syntax keyword cppSTLfunction clamp - syntax keyword cppSTLfunction for_each_n - - " any - syntax keyword cppSTLtype any - syntax keyword cppSTLexception bad_any_cast - syntax keyword cppSTLcast any_cast - syntax keyword cppSTLfunction make_any - - " array - syntax keyword cppSTLfunction to_array - syntax keyword cppSTLfunction make_array - - " atomic - syntax keyword cppSTLconstant is_always_lock_free - - " chrono - syntax keyword cppSTLbool treat_as_floating_point_v - - " cmath - syntax keyword cppSTLfunction assoc_laguerre assoc_laguerref assoc_laguerrel - syntax keyword cppSTLfunction assoc_legendre assoc_legendref assoc_legendrel - syntax keyword cppSTLfunction beta betaf betal - syntax keyword cppSTLfunction comp_ellint_1 comp_ellint_1f comp_ellint_1l - syntax keyword cppSTLfunction comp_ellint_2 comp_ellint_2f comp_ellint_2l - syntax keyword cppSTLfunction comp_ellint_3 comp_ellint_3f comp_ellint_3l - syntax keyword cppSTLfunction cyl_bessel_i cyl_bessel_if cyl_bessel_il - syntax keyword cppSTLfunction cyl_bessel_j cyl_bessel_jf cyl_bessel_jl - syntax keyword cppSTLfunction cyl_bessel_k cyl_bessel_kf cyl_bessel_kl - syntax keyword cppSTLfunction cyl_neumann cyl_neumannf cyl_neumannl - syntax keyword cppSTLfunction ellint_1 ellint_1f ellint_1l - syntax keyword cppSTLfunction ellint_2 ellint_2f ellint_2l - syntax keyword cppSTLfunction ellint_3 ellint_3f ellint_3l - syntax keyword cppSTLfunction expint expintf expintl - syntax keyword cppSTLfunction hermite hermitef hermitel - syntax keyword cppSTLfunction legendre legendrefl egendrel - syntax keyword cppSTLfunction laguerre laguerref laguerrel - syntax keyword cppSTLfunction riemann_zeta riemann_zetaf riemann_zetal - syntax keyword cppSTLfunction sph_bessel sph_besself sph_bessell - syntax keyword cppSTLfunction sph_legendre sph_legendref sph_legendrel - syntax keyword cppSTLfunction sph_neumann sph_neumannf sph_neumannl - - " cstdlib - syntax keyword cppSTLfunction aligned_alloc - - " exception - syntax keyword cppSTLfunction uncaught_exceptions - - " execution - syntax keyword cppSTLnamespace execution - syntax keyword cppSTLconstant seq par par_unseq - syntax keyword cppSTLbool is_execution_policy_v - syntax keyword cppSTLtype sequenced_policy - syntax keyword cppSTLtype parallel_policy - syntax keyword cppSTLtype parallel_unsequenced_policy - syntax keyword cppSTLtype is_execution_policy - - " filesystem - syntax keyword cppSTLnamespace filesystem - syntax keyword cppSTLexception filesystem_error - syntax keyword cppSTLtype path - syntax keyword cppSTLtype directory_entry - syntax keyword cppSTLtype directory_iterator - syntax keyword cppSTLtype recursive_directory_iterator - syntax keyword cppSTLtype file_status - syntax keyword cppSTLtype space_info - syntax keyword cppSTLtype file_time_type - syntax keyword cppSTLenum file_type - syntax keyword cppSTLenum perms - syntax keyword cppSTLenum copy_options - syntax keyword cppSTLenum directory_options - syntax keyword cppSTLConstant preferred_separator - syntax keyword cppSTLconstant available - " Note: 'capacity' and 'free' are already set as cppSTLfunction - " syntax keyword cppSTLconstant capacity - " syntax keyword cppSTLconstant free - syntax keyword cppSTLfunction concat - syntax keyword cppSTLfunction make_preferred - syntax keyword cppSTLfunction remove_filename - syntax keyword cppSTLfunction replace_filename - syntax keyword cppSTLfunction replace_extension - syntax keyword cppSTLfunction native - syntax keyword cppSTLfunction string_type - " Note: wstring, u8string, u16string, u32string already set as cppSTLtype - " syntax keyword cppSTLfunction wstring - " syntax keyword cppSTLfunction u8string - " syntax keyword cppSTLfunction u16string - " syntax keyword cppSTLfunction u32string - syntax keyword cppSTLfunction generic_string - syntax keyword cppSTLfunction generic_wstring - syntax keyword cppSTLfunction generic_u8string - syntax keyword cppSTLfunction generic_u16string - syntax keyword cppSTLfunction generic_u32string - syntax keyword cppSTLfunction lexically_normal - syntax keyword cppSTLfunction lexically_relative - syntax keyword cppSTLfunction lexically_proximate - syntax keyword cppSTLfunction root_name - syntax keyword cppSTLfunction root_directory - syntax keyword cppSTLfunction root_path - syntax keyword cppSTLfunction relative_path - syntax keyword cppSTLfunction parent_path - " syntax keyword cppSTLfunction filename - syntax keyword cppSTLfunction stem - syntax keyword cppSTLfunction extension - syntax keyword cppSTLfunction has_root_name - syntax keyword cppSTLfunction has_root_directory - syntax keyword cppSTLfunction has_root_path - syntax keyword cppSTLfunction has_relative_path - syntax keyword cppSTLfunction has_parent_path - syntax keyword cppSTLfunction has_filename - syntax keyword cppSTLfunction has_stem - syntax keyword cppSTLfunction has_extension - syntax keyword cppSTLfunction is_absolute - syntax keyword cppSTLfunction is_relative - syntax keyword cppSTLfunction hash_value - syntax keyword cppSTLfunction u8path - syntax keyword cppSTLfunction path1 - syntax keyword cppSTLfunction path2 - " syntax keyword cppSTLfunction path - syntax keyword cppSTLfunction status - syntax keyword cppSTLfunction symlink_status - syntax keyword cppSTLfunction options - " syntax keyword cppSTLfunction depth - syntax keyword cppSTLfunction recursive_pending - syntax keyword cppSTLfunction disable_recursive_pending - " syntax keyword cppSTLfunction type - syntax keyword cppSTLfunction permissions - syntax keyword cppSTLfunction absolute - syntax keyword cppSTLfunction system_complete - syntax keyword cppSTLfunction canonical - syntax keyword cppSTLfunction weakly_canonical - syntax keyword cppSTLfunction relative - syntax keyword cppSTLfunction proximate - syntax keyword cppSTLfunction copy_file - syntax keyword cppSTLfunction copy_symlink - syntax keyword cppSTLfunction create_directory - syntax keyword cppSTLfunction create_directories - syntax keyword cppSTLfunction create_hard_link - syntax keyword cppSTLfunction create_symlink - syntax keyword cppSTLfunction create_directory_symlink - syntax keyword cppSTLfunction current_path - " syntax keyword cppSTLfunction exists - syntax keyword cppSTLfunction file_size - syntax keyword cppSTLfunction hard_link_count - syntax keyword cppSTLfunction last_write_time - syntax keyword cppSTLfunction read_symlink - syntax keyword cppSTLfunction remove_all - syntax keyword cppSTLfunction resize_file - syntax keyword cppSTLfunction space - syntax keyword cppSTLfunction temp_directory_path - syntax keyword cppSTLfunction is_block_file - syntax keyword cppSTLfunction is_character_file - syntax keyword cppSTLfunction is_directory - syntax keyword cppSTLfunction is_fifo - syntax keyword cppSTLfunction is_other - syntax keyword cppSTLfunction is_regular_file - syntax keyword cppSTLfunction is_socket - syntax keyword cppSTLfunction is_symlink - syntax keyword cppSTLfunction status_known - " Note: 'is_empty' already set as cppSTLtype - " syntax keyword cppSTLfunction is_empty - - " functional - syntax keyword cppSTLtype default_order - syntax keyword cppSTLtype default_order_t - syntax keyword cppSTLtype default_searcher - syntax keyword cppSTLtype boyer_moore_searcher - syntax keyword cppSTLtype boyer_moore_horspool_searcher - syntax keyword cppSTLbool is_bind_expression_v - syntax keyword cppSTLbool is_placeholder_v - syntax keyword cppSTLfunction not_fn - syntax keyword cppSTLfunction make_default_searcher - syntax keyword cppSTLfunction make_boyer_moore_searcher - syntax keyword cppSTLfunction make_boyer_moore_horspool_searcher - " syntax keyword cppSTLfunction invoke - - " memory - syntax keyword cppSTLcast reinterpret_pointer_cast - syntax keyword cppSTLfunction uninitialized_move - syntax keyword cppSTLfunction uninitialized_move_n - syntax keyword cppSTLfunction uninitialized_default_construct - syntax keyword cppSTLfunction uninitialized_default_construct_n - syntax keyword cppSTLfunction uninitialized_value_construct - syntax keyword cppSTLfunction uninitialized_value_construct_n - syntax keyword cppSTLfunction destroy_at - syntax keyword cppSTLfunction destroy_n - - " memory_resource - syntax keyword cppSTLtype polymorphic_allocator - syntax keyword cppSTLtype memory_resource - syntax keyword cppSTLtype synchronized_pool_resource - syntax keyword cppSTLtype unsynchronized_pool_resource - syntax keyword cppSTLtype pool_options - syntax keyword cppSTLtype monotonic_buffer_resource - syntax keyword cppSTLfunction upstream_resource - syntax keyword cppSTLfunction get_default_resource - syntax keyword cppSTLfunction new_default_resource - syntax keyword cppSTLfunction set_default_resource - syntax keyword cppSTLfunction null_memory_resource - syntax keyword cppSTLfunction allocate - syntax keyword cppSTLfunction deallocate - syntax keyword cppSTLfunction construct - syntax keyword cppSTLfunction destruct - syntax keyword cppSTLfunction resource - syntax keyword cppSTLfunction select_on_container_copy_construction - syntax keyword cppSTLfunction do_allocate - syntax keyword cppSTLfunction do_deallocate - syntax keyword cppSTLfunction do_is_equal - - " mutex - syntax keyword cppSTLtype scoped_lock - - " new - syntax keyword cppSTLconstant hardware_destructive_interference_size - syntax keyword cppSTLconstant hardware_constructive_interference_size - syntax keyword cppSTLfunction launder - - " numeric - syntax keyword cppSTLfunction gcd - syntax keyword cppSTLfunction lcm - syntax keyword cppSTLfunction exclusive_scan - syntax keyword cppSTLfunction inclusive_scan - syntax keyword cppSTLfunction transform_reduce - syntax keyword cppSTLfunction transform_exclusive_scan - syntax keyword cppSTLfunction transform_inclusive_scan - " syntax keyword cppSTLfunction reduce - - " optional - syntax keyword cppSTLtype optional - syntax keyword cppSTLtype nullopt_t - syntax keyword cppSTLexception bad_optional_access - syntax keyword cppSTLconstant nullopt - syntax keyword cppSTLfunction make_optional - syntax keyword cppSTLfunction value_or - syntax keyword cppSTLfunction has_value - " syntax keyword cppSTLfunction value - - " string_view - syntax keyword cppSTLtype basic_string_view - syntax keyword cppSTLtype string_view - syntax keyword cppSTLtype wstring_view - syntax keyword cppSTLtype u16string_view - syntax keyword cppSTLtype u32string_view - syntax keyword cppSTLfunction remove_prefix - syntax keyword cppSTLfunction remove_suffix - - " system_error - syntax keyword cppSTLbool is_error_code_enum_v - syntax keyword cppSTLbool is_error_condition_enum_v - - " shared_mutex - syntax keyword cppSTLtype shared_mutex - - " tuple - syntax keyword cppSTLconstant tuple_size_v - syntax keyword cppSTLfunction make_from_tuple - " syntax keyword cppSTLfunction apply - - " type_traits - syntax keyword cppSTLbool is_void_v - syntax keyword cppSTLbool is_null_pointer_v - syntax keyword cppSTLbool is_integral_v - syntax keyword cppSTLbool is_floating_point_v - syntax keyword cppSTLbool is_array_v - syntax keyword cppSTLbool is_enum_v - syntax keyword cppSTLbool is_union_v - syntax keyword cppSTLbool is_class_v - syntax keyword cppSTLbool is_function_v - syntax keyword cppSTLbool is_pointer_v - syntax keyword cppSTLbool is_lvalue_reference_v - syntax keyword cppSTLbool is_rvalue_reference_v - syntax keyword cppSTLbool is_member_object_pointer_v - syntax keyword cppSTLbool is_member_function_pointer_v - syntax keyword cppSTLbool is_fundamental_v - syntax keyword cppSTLbool is_arithmetic_v - syntax keyword cppSTLbool is_scalar_v - syntax keyword cppSTLbool is_object_v - syntax keyword cppSTLbool is_compound_v - syntax keyword cppSTLbool is_reference_v - syntax keyword cppSTLbool is_member_pointer_v - syntax keyword cppSTLbool is_const_v - syntax keyword cppSTLbool is_volatile_v - syntax keyword cppSTLbool is_trivial_v - syntax keyword cppSTLbool is_trivially_copyable_v - syntax keyword cppSTLbool is_standard_layout_v - syntax keyword cppSTLbool is_pod_v - syntax keyword cppSTLbool is_literal_type_v - syntax keyword cppSTLbool is_empty_v - syntax keyword cppSTLbool is_polymorphic_v - syntax keyword cppSTLbool is_abstract_v - syntax keyword cppSTLbool is_signed_v - syntax keyword cppSTLbool is_unsigned_v - syntax keyword cppSTLbool is_constructible_v - syntax keyword cppSTLbool is_trivially_constructible_v - syntax keyword cppSTLbool is_nothrow_constructible_v - syntax keyword cppSTLbool is_default_constructible_v - syntax keyword cppSTLbool is_trivially_default_constructible_v - syntax keyword cppSTLbool is_nothrow_default_constructible_v - syntax keyword cppSTLbool is_copy_constructible_v - syntax keyword cppSTLbool is_trivially_copy_constructible_v - syntax keyword cppSTLbool is_nothrow_copy_constructible_v - syntax keyword cppSTLbool is_move_constructible_v - syntax keyword cppSTLbool is_trivially_move_constructible_v - syntax keyword cppSTLbool is_nothrow_move_constructible_v - syntax keyword cppSTLbool is_assignable_v - syntax keyword cppSTLbool is_trivially_assignable_v - syntax keyword cppSTLbool is_nothrow_assignable_v - syntax keyword cppSTLbool is_copy_assignable_v - syntax keyword cppSTLbool is_trivially_copy_assignable_v - syntax keyword cppSTLbool is_nothrow_copy_assignable_v - syntax keyword cppSTLbool is_move_assignable_v - syntax keyword cppSTLbool is_trivially_move_assignable_v - syntax keyword cppSTLbool is_nothrow_move_assignable_v - syntax keyword cppSTLbool is_destructible_v - syntax keyword cppSTLbool is_trivially_destructible_v - syntax keyword cppSTLbool is_nothrow_destructible_v - syntax keyword cppSTLbool has_virtual_destructor_v - syntax keyword cppSTLbool is_same_v - syntax keyword cppSTLbool is_base_of_v - syntax keyword cppSTLbool is_convertible_v - syntax keyword cppSTLbool is_callable_v - syntax keyword cppSTLbool is_nowthrow_callable_v - syntax keyword cppSTLbool conjunction_v - syntax keyword cppSTLbool disjunction_v - syntax keyword cppSTLbool negation_v - syntax keyword cppSTLbool has_unique_object_representations_v - syntax keyword cppSTLbool is_swappable_v - syntax keyword cppSTLbool is_swappable_with_v - syntax keyword cppSTLbool is_nothrow_swappable_v - syntax keyword cppSTLbool is_nothrow_swappable_with_v - syntax keyword cppSTLbool is_invocable_v - syntax keyword cppSTLbool is_invocable_r_v - syntax keyword cppSTLbool is_nothrow_invocable_v - syntax keyword cppSTLbool is_nothrow_invocable_r_v - syntax keyword cppSTLbool is_aggregate_v - syntax keyword cppSTLconstant alignment_of_v - syntax keyword cppSTLconstant rank_v - syntax keyword cppSTLconstant extent_v - syntax keyword cppSTLtype bool_constant - syntax keyword cppSTLtype is_callable - syntax keyword cppSTLtype is_nowthrow_callable - syntax keyword cppSTLtype conjunction - syntax keyword cppSTLtype disjunction - syntax keyword cppSTLtype negation - syntax keyword cppSTLtype void_t - syntax keyword cppSTLtype has_unique_object_representations - syntax keyword cppSTLtype is_swappable - syntax keyword cppSTLtype is_swappable_with - syntax keyword cppSTLtype is_nothrow_swappable - syntax keyword cppSTLtype is_nothrow_swappable_with - syntax keyword cppSTLtype is_invocable - syntax keyword cppSTLtype is_invocable_r - syntax keyword cppSTLtype is_nothrow_invocable - syntax keyword cppSTLtype is_nothrow_invocable_r - syntax keyword cppSTLtype invoke_result - syntax keyword cppSTLtype invoke_result_t - syntax keyword cppSTLtype is_aggregate - - " unordered_map, unordered_set, unordered_multimap, unordered_multiset - syntax keyword cppSTLtype node_type - syntax keyword cppSTLtype insert_return_type - syntax keyword cppSTLfunction try_emplace - syntax keyword cppSTLfunction insert_or_assign - syntax keyword cppSTLfunction extract - - " utility - syntax keyword cppSTLtype in_place_tag - syntax keyword cppSTLtype in_place_t - syntax keyword cppSTLtype in_place_type_t - syntax keyword cppSTLtype in_place_index_t - syntax keyword cppSTLfunction in_place - syntax keyword cppSTLfunction as_const - - " variant - syntax keyword cppSTLtype variant - syntax keyword cppSTLtype monostate - syntax keyword cppSTLtype variant_size - syntax keyword cppSTLtype variant_alternative - syntax keyword cppSTLtype variant_alternative_t - syntax keyword cppSTLconstant variant_size_v - syntax keyword cppSTLconstant variant_npos - syntax keyword cppSTLexception bad_variant_access - syntax keyword cppSTLfunction valueless_by_exception - syntax keyword cppSTLfunction holds_alternative - syntax keyword cppSTLfunction get_if - syntax keyword cppSTLfunction visit - " syntax keyword cppSTLfunction index -endif " C++17 - - -if !exists("cpp_no_cpp20") - syntax keyword cppType char8_t - syntax keyword cppStatement co_yield co_return co_await - syntax keyword cppStorageClass consteval - syntax keyword cppSTLnamespace ranges - - " algorithm - syntax keyword cppSTLfunction shift_left - syntax keyword cppSTLfunction shift_right - syntax keyword cppSTLfunction lexicographical_compare_three_way - - " bit - syntax keyword cppSTLcast bit_cast - syntax keyword cppSTLfunction ispow2 - syntax keyword cppSTLfunction ceil2 - syntax keyword cppSTLfunction floor2 - syntax keyword cppSTLfunction log2p1 - syntax keyword cppSTLfunction rotl - syntax keyword cppSTLfunction rotr - syntax keyword cppSTLfunction countl_zero - syntax keyword cppSTLfunction countl_one - syntax keyword cppSTLfunction countr_zero - syntax keyword cppSTLfunction countr_one - syntax keyword cppSTLfunction popcount - syntax keyword cppSTLtype endian - - " compare - syntax keyword cppSTLtype weak_equality - syntax keyword cppSTLtype strong_equality - syntax keyword cppSTLtype partial_ordering - syntax keyword cppSTLtype weak_ordering - syntax keyword cppSTLtype strong_ordering - syntax keyword cppSTLtype common_comparison_category - syntax keyword cppSTLtype compare_three_way_result - syntax keyword cppSTLtype compare_three_way - syntax keyword cppSTLtype strong_order - syntax keyword cppSTLtype weak_order - syntax keyword cppSTLtype parital_order - syntax keyword cppSTLtype compare_strong_order_fallback - syntax keyword cppSTLtype compare_weak_order_fallback - syntax keyword cppSTLtype compare_parital_order_fallback - syntax keyword cppSTLfunction is_eq - syntax keyword cppSTLfunction is_neq - syntax keyword cppSTLfunction is_lt - syntax keyword cppSTLfunction is_lteq - syntax keyword cppSTLfunction is_gt - syntax keyword cppSTLfunction is_gteq - - " format - syntax keyword cppSTLtype formatter - syntax keyword cppSTLtype basic_format_parse_context - syntax keyword cppSTLtype format_parse_context - syntax keyword cppSTLtype wformat_parse_context - syntax keyword cppSTLtype basic_format_context - syntax keyword cppSTLtype format_context - syntax keyword cppSTLtype wformat_context - syntax keyword cppSTLtype basic_format_arg - syntax keyword cppSTLtype basic_format_args - syntax keyword cppSTLtype format_args - syntax keyword cppSTLtype wformat_args - syntax keyword cppSTLtype format_args_t - syntax keyword cppSTLtype format_error - syntax keyword cppSTLfuntion format - syntax keyword cppSTLfuntion format_to - syntax keyword cppSTLfuntion format_to_n - syntax keyword cppSTLfuntion formatted_size - syntax keyword cppSTLfuntion vformat - syntax keyword cppSTLfuntion vformat_to - syntax keyword cppSTLfuntion visit_format_arg - syntax keyword cppSTLfuntion make_format_args - syntax keyword cppSTLfuntion make_wformat_args - - " iterator - syntax keyword cppSTLtype default_sentinel_t unreachable_sentinel_t - syntax keyword cppSTLiterator common_iterator - syntax keyword cppSTLiterator counted_iterator - syntax keyword cppSTLiterator_tag contiguous_iterator_tag - - " memory - syntax keyword cppSTLfunction to_address - syntax keyword cppSTLfunction assume_aligned - syntax keyword cppSTLfunction make_unique_default_init - syntax keyword cppSTLfunction allocate_shared_default_init - - " source_location - syntax keyword cppSTLtype source_location - - " span - syntax keyword cppSTLtype span - syntax keyword cppSTLfunction as_bytes - syntax keyword cppSTLfunction as_writable_bytes - syntax keyword cppSTLconstant dynamic_extent - - " syncstream - syntax keyword cppSTLtype basic_syncbuf - syntax keyword cppSTLtype basic_osyncstream - syntax keyword cppSTLtype syncbuf - syntax keyword cppSTLtype wsyncbuf - syntax keyword cppSTLtype osyncstream - syntax keyword cppSTLtype wosyncstream - - " type_traits - syntax keyword cppSTLtype remove_cvref remove_cvref_t - syntax keyword cppSTLtype common_reference common_reference_t - syntax keyword cppSTLfunction is_constant_evaluated - syntax keyword cppSTLfunction is_pointer_interconvertible - syntax keyword cppSTLfunction is_corresponding_member - syntax keyword cppSTLtype is_nothrow_convertible - syntax keyword cppSTLbool is_nothrow_convertible_v - syntax keyword cppSTLtype is_layout_compatible - syntax keyword cppSTLbool is_layout_compatible_v - syntax keyword cppSTLtype is_bounded_array - syntax keyword cppSTLbool is_bounded_array_v - syntax keyword cppSTLtype is_unbounded_array - syntax keyword cppSTLbool is_unbounded_array_v - syntax keyword cppSTLtype is_pointer_interconvertible_base_of - syntax keyword cppSTLbool is_pointer_interconvertible_base_of_v - syntax keyword cppSTLtype has_strong_structural_equality - syntax keyword cppSTLbool has_strong_structural_equality_v - - " version - " TODO -endif - - -if exists('g:cpp_concepts_highlight') - syntax keyword cppStatement concept - syntax keyword cppStorageClass requires - - if g:cpp_concepts_highlight == 1 - syntax keyword cppSTLconcept DefaultConstructible - syntax keyword cppSTLconcept MoveConstructible - syntax keyword cppSTLconcept CopyConstructible - syntax keyword cppSTLconcept MoveAssignable - syntax keyword cppSTLconcept CopyAssignable - syntax keyword cppSTLconcept Destructible - syntax keyword cppSTLconcept TriviallyCopyable - syntax keyword cppSTLconcept TrivialType - syntax keyword cppSTLconcept StandardLayoutType - syntax keyword cppSTLconcept PODType - syntax keyword cppSTLconcept EqualityComparable - syntax keyword cppSTLconcept LessThanComparable - syntax keyword cppSTLconcept Swappable - syntax keyword cppSTLconcept ValueSwappable - syntax keyword cppSTLconcept NullablePointer - syntax keyword cppSTLconcept Hash - syntax keyword cppSTLconcept Allocator - syntax keyword cppSTLconcept FunctionObject - syntax keyword cppSTLconcept Callable - syntax keyword cppSTLconcept Predicate - syntax keyword cppSTLconcept BinaryPredicate - syntax keyword cppSTLconcept Compare - syntax keyword cppSTLconcept Container - syntax keyword cppSTLconcept ReversibleContainer - syntax keyword cppSTLconcept AllocatorAwareContainer - syntax keyword cppSTLconcept SequenceContainer - syntax keyword cppSTLconcept ContiguousContainer - syntax keyword cppSTLconcept AssociativeContainer - syntax keyword cppSTLconcept UnorderedAssociativeContainer - syntax keyword cppSTLconcept DefaultInsertable - syntax keyword cppSTLconcept CopyInsertable - syntax keyword cppSTLconcept CopyInsertable - syntax keyword cppSTLconcept MoveInsertable - syntax keyword cppSTLconcept EmplaceConstructible - syntax keyword cppSTLconcept Erasable - syntax keyword cppSTLconcept Iterator - syntax keyword cppSTLconcept InputIterator - syntax keyword cppSTLconcept OutputIterator - syntax keyword cppSTLconcept ForwardIterator - syntax keyword cppSTLconcept BidirectionalIterator - syntax keyword cppSTLconcept RandomAccessIterator - syntax keyword cppSTLconcept ContiguousIterator - syntax keyword cppSTLconcept UnformattedInputFunction - syntax keyword cppSTLconcept FormattedInputFunction - syntax keyword cppSTLconcept UnformattedOutputFunction - syntax keyword cppSTLconcept FormattedOutputFunction - syntax keyword cppSTLconcept SeedSequence - syntax keyword cppSTLconcept UniformRandomBitGenerator - syntax keyword cppSTLconcept RandomNumberEngine - syntax keyword cppSTLconcept RandomNumberEngineAdaptor - syntax keyword cppSTLconcept RandomNumberDistribution - syntax keyword cppSTLconcept BasicLockable - syntax keyword cppSTLconcept Lockable - syntax keyword cppSTLconcept TimedLockable - syntax keyword cppSTLconcept Mutex - syntax keyword cppSTLconcept TimedMutex - syntax keyword cppSTLconcept SharedMutex - syntax keyword cppSTLconcept SharedTimedMutex - syntax keyword cppSTLconcept UnaryTypeTrait - syntax keyword cppSTLconcept BinaryTypeTrait - syntax keyword cppSTLconcept TransformationTrait - syntax keyword cppSTLconcept Clock - syntax keyword cppSTLconcept TrivialClock - syntax keyword cppSTLconcept CharTraits - syntax keyword cppSTLconcept pos_type - syntax keyword cppSTLconcept off_type - syntax keyword cppSTLconcept BitmaskType - syntax keyword cppSTLconcept NumericType - syntax keyword cppSTLconcept RegexTraits - syntax keyword cppSTLconcept LiteralType - elseif g:cpp_concepts_highlight == 2 - syntax keyword cppSTLconcept same_as - syntax keyword cppSTLconcept derived_from - syntax keyword cppSTLconcept convertible_to - syntax keyword cppSTLconcept common_reference_with - syntax keyword cppSTLconcept common_with - syntax keyword cppSTLconcept integral - syntax keyword cppSTLconcept signed_integral - syntax keyword cppSTLconcept unsigned_integral - syntax keyword cppSTLconcept assignable_from - syntax keyword cppSTLconcept swappable - syntax keyword cppSTLconcept swappable_with - syntax keyword cppSTLconcept destructible - syntax keyword cppSTLconcept constructible_from - syntax keyword cppSTLconcept default_constructible - syntax keyword cppSTLconcept move_constructible - syntax keyword cppSTLconcept copy_constructible - syntax keyword cppSTLconcept boolean - syntax keyword cppSTLconcept equality_comparable - syntax keyword cppSTLconcept equality_comparable_with - syntax keyword cppSTLconcept totally_ordered - syntax keyword cppSTLconcept totally_ordered_with - syntax keyword cppSTLconcept movable - syntax keyword cppSTLconcept copyable - syntax keyword cppSTLconcept semiregular - syntax keyword cppSTLconcept regular - syntax keyword cppSTLconcept invocable - syntax keyword cppSTLconcept regular_invocable - syntax keyword cppSTLconcept predicate - syntax keyword cppSTLconcept relation - syntax keyword cppSTLconcept strict_weak_order - syntax keyword cppSTLconcept readable - syntax keyword cppSTLconcept writable - syntax keyword cppSTLconcept weakly_incrementable - syntax keyword cppSTLconcept incrementable - syntax keyword cppSTLconcept input_or_output_iterator - syntax keyword cppSTLconcept sentinal_for - syntax keyword cppSTLconcept sized_sentinal_for - syntax keyword cppSTLconcept input_iterator - syntax keyword cppSTLconcept output_iterator - syntax keyword cppSTLconcept forward_iterator - syntax keyword cppSTLconcept bidirectional_iterator - syntax keyword cppSTLconcept random_access_iterator - syntax keyword cppSTLconcept input_iterator - syntax keyword cppSTLconcept output_iterator - syntax keyword cppSTLconcept bidirectional_iterator - syntax keyword cppSTLconcept random_access_iterator - syntax keyword cppSTLconcept contiguous_iterator - syntax keyword cppSTLconcept indirectly_unary_invocable - syntax keyword cppSTLconcept indirectly_regular_unary_invocable - syntax keyword cppSTLconcept indirect_unary_predicate - syntax keyword cppSTLconcept indirect_relation - syntax keyword cppSTLconcept indirect_strict_weak_order - syntax keyword cppSTLconcept indirectly_movable - syntax keyword cppSTLconcept indirectly_movable_storable - syntax keyword cppSTLconcept indirectly_copyable - syntax keyword cppSTLconcept indirectly_copyable_storable - syntax keyword cppSTLconcept indirectly_swappable - syntax keyword cppSTLconcept indirectly_comparable - syntax keyword cppSTLconcept permutable - syntax keyword cppSTLconcept mergeable - syntax keyword cppSTLconcept sortable - syntax keyword cppSTLconcept range - syntax keyword cppSTLconcept sized_range - syntax keyword cppSTLconcept output_range - syntax keyword cppSTLconcept input_range - syntax keyword cppSTLconcept bidirectional_range - syntax keyword cppSTLconcept random_access_range - syntax keyword cppSTLconcept contiguous_range - syntax keyword cppSTLconcept common_range - syntax keyword cppSTLconcept viewable_range - syntax keyword cppSTLconcept uniform_random_bit_generator - endif -endif " C++ concepts - - -if !exists("cpp_no_boost") - syntax keyword cppSTLnamespace boost - syntax keyword cppSTLcast lexical_cast -endif " boost - - -" Default highlighting -if version >= 508 || !exists("did_cpp_syntax_inits") - if version < 508 - let did_cpp_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - HiLink cppSTLbool Boolean - HiLink cppStorageClass StorageClass - HiLink cppStatement Statement - HiLink cppSTLfunction Function - HiLink cppSTLfunctional Typedef - HiLink cppSTLconstant Constant - HiLink cppSTLnamespace Constant - HiLink cppSTLtype Typedef - HiLink cppSTLexception Exception - HiLink cppSTLiterator Typedef - HiLink cppSTLiterator_tag Typedef - HiLink cppSTLenum Typedef - HiLink cppSTLconcept Typedef - HiLink cppSTLios Function - HiLink cppSTLcast Statement " be consistent with official syntax - HiLink cppRawString String - HiLink cppRawDelimiter Delimiter - delcommand HiLink -endif - -endif diff --git a/autoload/ada.vim b/autoload/ada.vim new file mode 100644 index 00000000..efe5e717 --- /dev/null +++ b/autoload/ada.vim @@ -0,0 +1,641 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 + +"------------------------------------------------------------------------------ +" Description: Perform Ada specific completion & tagging. +" Language: Ada (2005) +" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +" Maintainer: Mathias Brousset <mathiasb17@gmail.com> +" Martin Krischik <krischik@users.sourceforge.net> +" Taylor Venable <taylor@metasyntax.net> +" Neil Bird <neil@fnxweb.com> +" Ned Okie <nokie@radford.edu> +" $Author: krischik $ +" $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK ' should not be in iskeyword. +" 16.07.2006 MK Ada-Mode as vim-ball +" 02.10.2006 MK Better folding. +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" 08.07.2007 TV fix mapleader problems. +" 09.05.2007 MK Session just won't work no matter how much +" tweaking is done +" 19.09.2007 NO still some mapleader problems +" 31.01.2017 MB fix more mapleader problems +" Help Page: ft-ada-functions +"------------------------------------------------------------------------------ + +if version < 700 + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" Section: Constants {{{1 +" +let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*' +let g:ada#WordRegex = '\a\w*' +let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*" +let g:ada#Keywords = [] + +" Section: g:ada#Keywords {{{1 +" +" Section: add Ada keywords {{{2 +" +for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'keyword', + \ 'info': 'Ada keyword.', + \ 'kind': 'k', + \ 'icase': 1}] +endfor + +" Section: GNAT Project Files {{{3 +" +if exists ('g:ada_with_gnat_project_files') + for Item in ['project'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'keyword', + \ 'info': 'GNAT projectfile keyword.', + \ 'kind': 'k', + \ 'icase': 1}] + endfor +endif + +" Section: add standart exception {{{2 +" +for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'exception', + \ 'info': 'Ada standart exception.', + \ 'kind': 'x', + \ 'icase': 1}] +endfor + +" Section: add GNAT exception {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Assert_Failure'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'exception', + \ 'info': 'GNAT exception.', + \ 'kind': 'x', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada buildin types {{{2 +" +for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'type', + \ 'info': 'Ada buildin type.', + \ 'kind': 't', + \ 'icase': 1}] +endfor + +" Section: add GNAT buildin types {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'type', + \ 'info': 'GNAT buildin type.', + \ 'kind': 't', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada Attributes {{{2 +" +for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'attribute', + \ 'info': 'Ada attribute.', + \ 'kind': 'a', + \ 'icase': 1}] +endfor + +" Section: add GNAT Attributes {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'attribute', + \ 'info': 'GNAT attribute.', + \ 'kind': 'a', + \ 'icase': 1}] + endfor +endif + +" Section: add Ada Pragmas {{{2 +" +for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'pragma', + \ 'info': 'Ada pragma.', + \ 'kind': 'p', + \ 'icase': 1}] +endfor + +" Section: add GNAT Pragmas {{{3 +" +if exists ('g:ada_gnat_extensions') + for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External'] + let g:ada#Keywords += [{ + \ 'word': Item, + \ 'menu': 'pragma', + \ 'info': 'GNAT pragma.', + \ 'kind': 'p', + \ 'icase': 1}] + endfor +endif +" 1}}} + +" Section: g:ada#Ctags_Kinds {{{1 +" +let g:ada#Ctags_Kinds = { + \ 'P': ["packspec", "package specifications"], + \ 'p': ["package", "packages"], + \ 'T': ["typespec", "type specifications"], + \ 't': ["type", "types"], + \ 'U': ["subspec", "subtype specifications"], + \ 'u': ["subtype", "subtypes"], + \ 'c': ["component", "record type components"], + \ 'l': ["literal", "enum type literals"], + \ 'V': ["varspec", "variable specifications"], + \ 'v': ["variable", "variables"], + \ 'f': ["formal", "generic formal parameters"], + \ 'n': ["constant", "constants"], + \ 'x': ["exception", "user defined exceptions"], + \ 'R': ["subprogspec", "subprogram specifications"], + \ 'r': ["subprogram", "subprograms"], + \ 'K': ["taskspec", "task specifications"], + \ 'k': ["task", "tasks"], + \ 'O': ["protectspec", "protected data specifications"], + \ 'o': ["protected", "protected data"], + \ 'E': ["entryspec", "task/protected data entry specifications"], + \ 'e': ["entry", "task/protected data entries"], + \ 'b': ["label", "labels"], + \ 'i': ["identifier", "loop/declare identifiers"], + \ 'a': ["autovar", "automatic variables"], + \ 'y': ["annon", "loops and blocks with no identifier"]} + +" Section: ada#Word (...) {{{1 +" +" Extract current Ada word across multiple lines +" AdaWord ([line, column])\ +" +function ada#Word (...) + if a:0 > 1 + let l:Line_Nr = a:1 + let l:Column_Nr = a:2 - 1 + else + let l:Line_Nr = line('.') + let l:Column_Nr = col('.') - 1 + endif + + let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) + + " Cope with tag searching for items in comments; if we are, don't loop + " backards looking for previous lines + if l:Column_Nr > strlen(l:Line) + " We were in a comment + let l:Line = getline(l:Line_Nr) + let l:Search_Prev_Lines = 0 + else + let l:Search_Prev_Lines = 1 + endif + + " Go backwards until we find a match (Ada ID) that *doesn't* include our + " location - i.e., the previous ID. This is because the current 'correct' + " match will toggle matching/not matching as we traverse characters + " backwards. Thus, we have to find the previous unrelated match, exclude + " it, then use the next full match (ours). + " Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)] + " ... but start, here, one after the required char. + let l:New_Column = l:Column_Nr + 1 + while 1 + let l:New_Column = l:New_Column - 1 + if l:New_Column < 0 + " Have to include previous l:Line from file + let l:Line_Nr = l:Line_Nr - 1 + if l:Line_Nr < 1 || !l:Search_Prev_Lines + " Start of file or matching in a comment + let l:Line_Nr = 1 + let l:New_Column = 0 + let l:Our_Match = match (l:Line, g:ada#WordRegex ) + break + endif + " Get previous l:Line, and prepend it to our search string + let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' ) + let l:New_Column = strlen (l:New_Line) - 1 + let l:Column_Nr = l:Column_Nr + l:New_Column + let l:Line = l:New_Line . l:Line + endif + " Check to see if this is a match excluding 'us' + let l:Match_End = l:New_Column + + \ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1 + if l:Match_End >= l:New_Column && + \ l:Match_End < l:Column_Nr + " Yes + let l:Our_Match = l:Match_End+1 + + \ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex ) + break + endif + endwhile + + " Got anything? + if l:Our_Match < 0 + return '' + else + let l:Line = strpart (l:Line, l:Our_Match) + endif + + " Now simply add further lines until the match gets no bigger + let l:Match_String = matchstr (l:Line, g:ada#WordRegex) + let l:Last_Line = line ('$') + let l:Line_Nr = line ('.') + 1 + while l:Line_Nr <= l:Last_Line + let l:Last_Match = l:Match_String + let l:Line = l:Line . + \ substitute (getline (l:Line_Nr), g:ada#Comment, '', '') + let l:Match_String = matchstr (l:Line, g:ada#WordRegex) + if l:Match_String == l:Last_Match + break + endif + endwhile + + " Strip whitespace & return + return substitute (l:Match_String, '\s\+', '', 'g') +endfunction ada#Word + +" Section: ada#List_Tag (...) {{{1 +" +" List tags in quickfix window +" +function ada#List_Tag (...) + if a:0 > 1 + let l:Tag_Word = ada#Word (a:1, a:2) + elseif a:0 > 0 + let l:Tag_Word = a:1 + else + let l:Tag_Word = ada#Word () + endif + + echo "Searching for" l:Tag_Word + + let l:Pattern = '^' . l:Tag_Word . '$' + let l:Tag_List = taglist (l:Pattern) + let l:Error_List = [] + " + " add symbols + " + for Tag_Item in l:Tag_List + if l:Tag_Item['kind'] == '' + let l:Tag_Item['kind'] = 's' + endif + + let l:Error_List += [ + \ l:Tag_Item['filename'] . '|' . + \ l:Tag_Item['cmd'] . '|' . + \ l:Tag_Item['kind'] . "\t" . + \ l:Tag_Item['name'] ] + endfor + set errorformat=%f\|%l\|%m + cexpr l:Error_List + cwindow +endfunction ada#List_Tag + +" Section: ada#Jump_Tag (Word, Mode) {{{1 +" +" Word tag - include '.' and if Ada make uppercase +" +function ada#Jump_Tag (Word, Mode) + if a:Word == '' + " Get current word + let l:Word = ada#Word() + if l:Word == '' + throw "NOT_FOUND: no identifier found." + endif + else + let l:Word = a:Word + endif + + echo "Searching for " . l:Word + + try + execute a:Mode l:Word + catch /.*:E426:.*/ + let ignorecase = &ignorecase + set ignorecase + execute a:Mode l:Word + let &ignorecase = ignorecase + endtry + + return +endfunction ada#Jump_Tag + +" Section: ada#Insert_Backspace () {{{1 +" +" Backspace at end of line after auto-inserted commentstring '-- ' wipes it +" +function ada#Insert_Backspace () + let l:Line = getline ('.') + if col ('.') > strlen (l:Line) && + \ match (l:Line, '-- $') != -1 && + \ match (&comments,'--') != -1 + return "\<bs>\<bs>\<bs>" + else + return "\<bs>" + endif + + return +endfunction ada#InsertBackspace + +" Section: Insert Completions {{{1 +" +" Section: ada#User_Complete(findstart, base) {{{2 +" +" This function is used for the 'complete' option. +" +function! ada#User_Complete(findstart, base) + if a:findstart == 1 + " + " locate the start of the word + " + let line = getline ('.') + let start = col ('.') - 1 + while start > 0 && line[start - 1] =~ '\i\|''' + let start -= 1 + endwhile + return start + else + " + " look up matches + " + let l:Pattern = '^' . a:base . '.*$' + " + " add keywords + " + for Tag_Item in g:ada#Keywords + if l:Tag_Item['word'] =~? l:Pattern + if complete_add (l:Tag_Item) == 0 + return [] + endif + if complete_check () + return [] + endif + endif + endfor + return [] + endif +endfunction ada#User_Complete + +" Section: ada#Completion (cmd) {{{2 +" +" Word completion (^N/^R/^X^]) - force '.' inclusion +function ada#Completion (cmd) + set iskeyword+=46 + return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>" +endfunction ada#Completion + +" Section: ada#Completion_End () {{{2 +" +function ada#Completion_End () + set iskeyword-=46 + return '' +endfunction ada#Completion_End + +" Section: ada#Create_Tags {{{1 +" +function ada#Create_Tags (option) + if a:option == 'file' + let l:Filename = fnamemodify (bufname ('%'), ':p') + elseif a:option == 'dir' + let l:Filename = + \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " . + \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " . + \ fnamemodify (bufname ('%'), ':p:h') . "*.ads" + else + let l:Filename = a:option + endif + execute '!ctags --excmd=number ' . l:Filename +endfunction ada#Create_Tags + +" Section: ada#Switch_Session {{{1 +" +function ada#Switch_Session (New_Session) + " + " you should not save to much date into the seession since they will + " be sourced + " + let l:sessionoptions=&sessionoptions + + try + set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize + + if a:New_Session != v:this_session + " + " We actually got a new session - otherwise there + " is nothing to do. + " + if strlen (v:this_session) > 0 + execute 'mksession! ' . v:this_session + endif + + let v:this_session = a:New_Session + + "if filereadable (v:this_session) + "execute 'source ' . v:this_session + "endif + + augroup ada_session + autocmd! + autocmd VimLeavePre * execute 'mksession! ' . v:this_session + augroup END + + "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open + "TlistOpen + "endif + + endif + finally + let &sessionoptions=l:sessionoptions + endtry + + return +endfunction ada#Switch_Session + +" Section: GNAT Pretty Printer folding {{{1 +" +if exists('g:ada_folding') && g:ada_folding[0] == 'g' + " + " Lines consisting only of ')' ';' are due to a gnat pretty bug and + " have the same level as the line above (can't happen in the first + " line). + " + let s:Fold_Collate = '^\([;)]*$\|' + + " + " some lone statements are folded with the line above + " + if stridx (g:ada_folding, 'i') >= 0 + let s:Fold_Collate .= '\s\+\<is\>$\|' + endif + if stridx (g:ada_folding, 'b') >= 0 + let s:Fold_Collate .= '\s\+\<begin\>$\|' + endif + if stridx (g:ada_folding, 'p') >= 0 + let s:Fold_Collate .= '\s\+\<private\>$\|' + endif + if stridx (g:ada_folding, 'x') >= 0 + let s:Fold_Collate .= '\s\+\<exception\>$\|' + endif + + " We also handle empty lines and + " comments here. + let s:Fold_Collate .= '--\)' + + function ada#Pretty_Print_Folding (Line) " {{{2 + let l:Text = getline (a:Line) + + if l:Text =~ s:Fold_Collate + " + " fold with line above + " + let l:Level = "=" + elseif l:Text =~ '^\s\+(' + " + " gnat outdents a line which stards with a ( by one characters so + " that parameters which follow are aligned. + " + let l:Level = (indent (a:Line) + 1) / &shiftwidth + else + let l:Level = indent (a:Line) / &shiftwidth + endif + + return l:Level + endfunction ada#Pretty_Print_Folding " }}}2 +endif + +" Section: Options and Menus {{{1 +" +" Section: ada#Switch_Syntax_Options {{{2 +" +function ada#Switch_Syntax_Option (option) + syntax off + if exists ('g:ada_' . a:option) + unlet g:ada_{a:option} + echo a:option . 'now off' + else + let g:ada_{a:option}=1 + echo a:option . 'now on' + endif + syntax on +endfunction ada#Switch_Syntax_Option + +" Section: ada#Map_Menu {{{2 +" +function ada#Map_Menu (Text, Keys, Command) + if a:Keys[0] == ':' + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "<Tab>" . a:Keys . + \ " :" . a:Command . "<CR>" + execute + \ "command -buffer " . + \ a:Keys[1:] . + \" :" . a:Command . "<CR>" + elseif a:Keys[0] == '<' + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "<Tab>" . a:Keys . + \ " :" . a:Command . "<CR>" + execute + \ "nnoremap <buffer> " . + \ a:Keys . + \" :" . a:Command . "<CR>" + execute + \ "inoremap <buffer> " . + \ a:Keys . + \" <C-O>:" . a:Command . "<CR>" + else + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif + execute + \ "50amenu " . + \ "Ada." . escape(a:Text, ' ') . + \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') . + \ " :" . a:Command . "<CR>" + execute + \ "nnoremap <buffer>" . + \ " <Leader>a" . a:Keys . + \" :" . a:Command + execute + \ "inoremap <buffer>" . + \ " <Leader>a" . a:Keys . + \" <C-O>:" . a:Command + endif + return +endfunction + +" Section: ada#Map_Popup {{{2 +" +function ada#Map_Popup (Text, Keys, Command) + if exists("g:mapleader") + let l:leader = g:mapleader + else + let l:leader = '\' + endif + execute + \ "50amenu " . + \ "PopUp." . escape(a:Text, ' ') . + \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') . + \ " :" . a:Command . "<CR>" + + call ada#Map_Menu (a:Text, a:Keys, a:Command) + return +endfunction ada#Map_Popup + +" }}}1 + +lockvar g:ada#WordRegex +lockvar g:ada#DotWordRegex +lockvar g:ada#Comment +lockvar! g:ada#Keywords +lockvar! g:ada#Ctags_Kinds + +let &cpo = s:keepcpo +unlet s:keepcpo + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker + +endif diff --git a/autoload/go/config.vim b/autoload/go/config.vim index 26d6de91..956da220 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -55,6 +55,10 @@ function! go#config#TermCloseOnExit() abort return get(g:, 'go_term_close_on_exit', 1) endfunction +function! go#config#TermReuse() abort + return get(g:, 'go_term_reuse', 0) +endfunction + function! go#config#SetTermCloseOnExit(value) abort let g:go_term_close_on_exit = a:value endfunction diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim new file mode 100644 index 00000000..7d5aa867 --- /dev/null +++ b/autoload/polyglot.vim @@ -0,0 +1,207 @@ +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +func! polyglot#Heuristics() + " Try to detect filetype from shebang + let l:filetype = polyglot#Shebang() + if l:filetype != "" + exec "setf " . l:filetype + return + endif +endfunc + +let s:interpreters = { + \ 'osascript': 'applescript', + \ 'tcc': 'c', + \ 'coffee': 'coffee', + \ 'crystal': 'crystal', + \ 'dart': 'dart', + \ 'elixir': 'elixir', + \ 'escript': 'erlang', + \ 'fish': 'fish', + \ 'gnuplot': 'gnuplot', + \ 'runhaskell': 'haskell', + \ 'chakra': 'javascript', + \ 'd8': 'javascript', + \ 'gjs': 'javascript', + \ 'js': 'javascript', + \ 'node': 'javascript', + \ 'nodejs': 'javascript', + \ 'qjs': 'javascript', + \ 'rhino': 'javascript', + \ 'v8': 'javascript', + \ 'v8-shell': 'javascript', + \ 'julia': 'julia', + \ 'lua': 'lua', + \ 'moon': 'moon', + \ 'ocaml': 'ocaml', + \ 'ocamlrun': 'ocaml', + \ 'ocamlscript': 'ocaml', + \ 'cperl': 'perl', + \ 'perl': 'perl', + \ 'php': 'php', + \ 'pwsh': 'ps1', + \ 'python': 'python', + \ 'python2': 'python', + \ 'python3': 'python', + \ 'qmake': 'qmake', + \ 'Rscript': 'r', + \ 'racket': 'racket', + \ 'perl6': 'raku', + \ 'raku': 'raku', + \ 'rakudo': 'raku', + \ 'ruby': 'ruby', + \ 'macruby': 'ruby', + \ 'rake': 'ruby', + \ 'jruby': 'ruby', + \ 'rbx': 'ruby', + \ 'scala': 'scala', + \ 'ash': 'sh', + \ 'bash': 'sh', + \ 'dash': 'sh', + \ 'ksh': 'sh', + \ 'mksh': 'sh', + \ 'pdksh': 'sh', + \ 'rc': 'sh', + \ 'sh': 'sh', + \ 'zsh': 'sh', + \ 'boolector': 'smt2', + \ 'cvc4': 'smt2', + \ 'mathsat5': 'smt2', + \ 'opensmt': 'smt2', + \ 'smtinterpol': 'smt2', + \ 'smt-rat': 'smt2', + \ 'stp': 'smt2', + \ 'verit': 'smt2', + \ 'yices2': 'smt2', + \ 'z3': 'smt2', + \ 'deno': 'typescript', + \ 'ts-node': 'typescript', + \ } + +let s:r_hashbang = '^#!\s*\(\S\+\)\s*\(.*\)\s*' +let s:r_envflag = '%(\S\+=\S\+\|-[iS]\|--ignore-environment\|--split-string\)' +let s:r_env = '^\%(\' . s:r_envflag . '\s\+\)*\(\S\+\)' + +func! polyglot#Shebang() + let l:line1 = getline(1) + + if l:line1 !~# "^#!" + return + endif + + let l:pathrest = matchlist(l:line1, s:r_hashbang) + + if len(l:pathrest) == 0 + return + endif + + let [_, l:path, l:rest; __] = l:pathrest + + let l:script = split(l:path, "/")[-1] + + if l:script == "env" + let l:argspath = matchlist(l:rest, s:r_env) + if len(l:argspath) == 0 + return + endif + + let l:script = l:argspath[1] + endif + + if has_key(s:interpreters, l:script) + return s:interpreters[l:script] + endif + + for interpreter in keys(s:interpreters) + if l:script =~# '^' . interpreter + return s:interpreters[interpreter] + endif + endfor +endfunc + +func! polyglot#DetectInpFiletype() + let line = getline(1) + if line =~# '^\*' + setf abaqus | return + endif + for lnum in range(1, min([line("$"), 500])) + let line = getline(lnum) + if line =~? '^header surface data' + setf trasys | return + endif + endfor +endfunc + +func! polyglot#DetectAsaFiletype() + if exists("g:filetype_asa") + exe "setf " . g:filetype_asa | return + endif + setf aspvbs | return +endfunc + +func! polyglot#DetectAspFiletype() + if exists("g:filetype_asp") + exe "setf " . g:filetype_asp | return + endif + for lnum in range(1, min([line("$"), 3])) + let line = getline(lnum) + if line =~? 'perlscript' + setf aspperl | return + endif + endfor + setf aspvbs | return +endfunc + +func! polyglot#DetectMFiletype() + let saw_comment = 0 + for lnum in range(1, min([line("$"), 100])) + let line = getline(lnum) + if line =~# '^\s*/\*' + let saw_comment = 1 + endif + if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)' + setf objc | return + endif + if line =~# '^\s*%' + setf octave | return + endif + if line =~# '^\s*(\*' + setf mma | return + endif + if line =~? '^\s*\(\(type\|var\)\(\<\|\>\)\|--\)' + setf murphi | return + endif + endfor + if saw_comment + setf objc | return + endif + if exists("g:filetype_m") + exe "setf " . g:filetype_m | return + endif + setf octave | return +endfunc + +func! polyglot#DetectFsFiletype() + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\(: \|new-device\)' + setf forth | return + endif + if line =~# '^\s*\(#light\|import\|let\|module\|namespace\|open\|type\)' + setf fsharp | return + endif + if line =~# '\s*\(#version\|precision\|uniform\|varying\|vec[234]\)' + setf glsl | return + endif + endfor + if exists("g:filetype_fs") + exe "setf " . g:filetype_fs | return + endif + setf forth | return +endfunc + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/compiler/ant.vim b/compiler/ant.vim new file mode 100644 index 00000000..ddb9e746 --- /dev/null +++ b/compiler/ant.vim @@ -0,0 +1,42 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 + +" Vim Compiler File +" Compiler: ant +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Mi, 13 Apr 2005 22:50:07 CEST + +if exists("current_compiler") + finish +endif +let current_compiler = "ant" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal <args> +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=ant + +" first line: +" ant with jikes +E, which assumes the following +" two property lines in your 'build.xml': +" +" <property name = "build.compiler" value = "jikes"/> +" <property name = "build.compiler.emacs" value = "true"/> +" +" second line: +" ant with javac +" +" note that this will work also for tasks like [wtkbuild] +" +CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, + \%A\ %#[%.%#]\ %f:%l:\ %m,%-Z\ %#[%.%#]\ %p^,%C\ %#[%.%#]\ %#%m + +" ,%-C%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/doc/vim-go.txt b/doc/vim-go.txt index 480b4848..e00dec9b 100644 --- a/doc/vim-go.txt +++ b/doc/vim-go.txt @@ -1719,6 +1719,13 @@ Applicable to Neovim and Vim with `terminal` feature only. > let g:go_term_mode = "vsplit" < + *'g:go_term_reuse'* + +Reuse the terminal window when |'g:go_term_enabled'| is set. By default it's +disabled. +> + let g:go_term_reuse = 0 +< *'g:go_term_height'* *'g:go_term_width'* @@ -2242,6 +2249,8 @@ The program will halt on the breakpoint, at which point you can inspect the program state. You can go to the next line with |:GoDebugNext| (<F10>) or step in with |:GoDebugStep| (<F11>). +The program can also be halted with `:GoDebugHalt` (<F6>). + The variable window in the bottom left (`GODEBUG_VARIABLES`) will display all local variables. Struct values are displayed as `{...}`, array/slices as `[4]`. Use <CR> on the variable name to expand the values. @@ -2258,10 +2267,21 @@ the `dlv` process, or |:GoDebugRestart| to recompile the code. *go-debug-commands* DEBUGGER COMMANDS~ -Only |:GoDebugStart|, `:GoDebugTest`, and |:GoDebugBreakpoint| are available -by default. `:GoDebugContinue` becomes available after running `:GoDebugStart` -or `:GoDebugTest`. The rest of the commands and mappings become available -after executing `:GoDebugContinue`. +Only |:GoDebugAttach|, |:GoDebugStart|, |:GoDebugTest|, and +|:GoDebugBreakpoint| are available by default. |:GoDebugContinue| becomes +available after running |:GoDebugAttach|, |:GoDebugStart| or |:GoDebugTest|. +The rest of the commands and mappings become available after executing +|:GoDebugContinue|. + + *:GoDebugAttach* +:GoDebugAttach pid + + Start the debug mode for pid; this does several things: + + * Setup the debug windows according to |'g:go_debug_windows'|. + * Make the `:GoDebug*` commands and `(go-debug-*)` mappings available. + + Use |:GoDebugStop| to stop `dlv` and exit debugging mode. *:GoDebugStart* :GoDebugStart [pkg] [program-args] @@ -2291,6 +2311,14 @@ after executing `:GoDebugContinue`. Stop the program (if running) and restart `dlv` to recompile the package. The current window layout and breakpoints will be left intact. + *:GoDebugHalt* + *(go-debug-halt)* +:GoDebugHalt + + Halt the program. + + Mapped to <F6> by default. + *:GoDebugStop* *(go-debug-stop)* :GoDebugStop diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index d69d31c9..b69036e6 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2,8 +2,17 @@ let s:cpo_save = &cpo set cpo&vim -if !exists('g:polyglot_disabled') - let g:polyglot_disabled = [] +" Disable all native vim ftdetect +if exists('g:polyglot_test') + autocmd! +endif + +let s:disabled_packages = {} + +if exists('g:polyglot_disabled') + for pkg in g:polyglot_disabled + let s:disabled_packages[pkg] = 1 + endfor endif function! s:SetDefault(name, value) @@ -47,1295 +56,1487 @@ if !exists('g:python_highlight_all') call s:SetDefault('g:python_highlight_file_headers_as_comments', 1) call s:SetDefault('g:python_slow_sync', 1) endif +if !has_key(s:disabled_packages, '8th') + au BufNewFile,BufRead *.8th setf 8th +endif + +if !has_key(s:disabled_packages, 'a2ps') + au BufNewFile,BufRead */etc/a2ps.cfg setf a2ps + au BufNewFile,BufRead */etc/a2ps/*.cfg setf a2ps + au BufNewFile,BufRead {.,}a2psrc setf a2ps + au BufNewFile,BufRead a2psrc setf a2ps +endif + +if !has_key(s:disabled_packages, 'a65') + au BufNewFile,BufRead *.a65 setf a65 +endif + +if !has_key(s:disabled_packages, 'aap') + au BufNewFile,BufRead *.aap setf aap +endif + +if !has_key(s:disabled_packages, 'abap') + au BufNewFile,BufRead *.abap setf abap +endif + +if !has_key(s:disabled_packages, 'abaqus') + au! BufNewFile,BufRead *.inp call polyglot#DetectInpFiletype() +endif + +if !has_key(s:disabled_packages, 'abc') + au BufNewFile,BufRead *.abc setf abc +endif + +if !has_key(s:disabled_packages, 'abel') + au BufNewFile,BufRead *.abl setf abel +endif + +if !has_key(s:disabled_packages, 'acedb') + au BufNewFile,BufRead *.wrm setf acedb +endif + +if !has_key(s:disabled_packages, 'acpiasl') + au BufNewFile,BufRead *.asl setf asl + au BufNewFile,BufRead *.dsl setf asl +endif + +if !has_key(s:disabled_packages, 'ada') + au BufNewFile,BufRead *.ada setf ada + au BufNewFile,BufRead *.adb setf ada + au BufNewFile,BufRead *.ads setf ada + au BufNewFile,BufRead *.gpr setf ada +endif + +if !has_key(s:disabled_packages, 'ahdl') + au BufNewFile,BufRead *.tdf setf ahdl +endif + +if !has_key(s:disabled_packages, 'aidl') + au BufNewFile,BufRead *.aidl setf aidl +endif + +if !has_key(s:disabled_packages, 'alsaconf') + au BufNewFile,BufRead */etc/asound.conf setf alsaconf + au BufNewFile,BufRead */usr/share/alsa/alsa.conf setf alsaconf + au BufNewFile,BufRead {.,}asoundrc setf alsaconf +endif + +if !has_key(s:disabled_packages, 'aml') + au BufNewFile,BufRead *.aml setf aml +endif -if index(g:polyglot_disabled, 'acpiasl') == -1 - au BufNewFile,BufRead *.asl set ft=asl - au BufNewFile,BufRead *.dsl set ft=asl +if !has_key(s:disabled_packages, 'ampl') + au BufNewFile,BufRead *.run setf ampl endif -if index(g:polyglot_disabled, 'apiblueprint') == -1 - au BufNewFile,BufRead *.apib set ft=apiblueprint +if !has_key(s:disabled_packages, 'ant') + au BufNewFile,BufRead build.xml setf ant endif -if index(g:polyglot_disabled, 'applescript') == -1 - au BufNewFile,BufRead *.applescript set ft=applescript - au BufNewFile,BufRead *.scpt set ft=applescript +if !has_key(s:disabled_packages, 'apache') + au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache + au BufNewFile,BufRead */etc/httpd/*.conf setf apache + au BufNewFile,BufRead {.,}htaccess setf apache endif -if index(g:polyglot_disabled, 'arduino') == -1 +if !has_key(s:disabled_packages, 'apiblueprint') + au BufNewFile,BufRead *.apib setf apiblueprint +endif + +if !has_key(s:disabled_packages, 'applescript') + au BufNewFile,BufRead *.applescript setf applescript + au BufNewFile,BufRead *.scpt setf applescript +endif + +if !has_key(s:disabled_packages, 'aptconf') + au BufNewFile,BufRead */.aptitude/config setf aptconf + au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} setf aptconf + au BufNewFile,BufRead apt.conf setf aptconf +endif + +if !has_key(s:disabled_packages, 'arch') + au BufNewFile,BufRead {.,}arch-inventory setf arch + au BufNewFile,BufRead =tagging-method setf arch +endif + +if !has_key(s:disabled_packages, 'arduino') au BufNewFile,BufRead *.ino setf arduino - au BufNewFile,BufRead *.pde set ft=arduino + au BufNewFile,BufRead *.pde setf arduino +endif + +if !has_key(s:disabled_packages, 'art') + au BufNewFile,BufRead *.art setf art endif -if index(g:polyglot_disabled, 'asciidoc') == -1 - au BufNewFile,BufRead *.adoc set ft=asciidoc - au BufNewFile,BufRead *.asc set ft=asciidoc - au BufNewFile,BufRead *.asciidoc set ft=asciidoc +if !has_key(s:disabled_packages, 'asciidoc') + au BufNewFile,BufRead *.adoc setf asciidoc + au BufNewFile,BufRead *.asc setf asciidoc + au BufNewFile,BufRead *.asciidoc setf asciidoc endif -if index(g:polyglot_disabled, 'autohotkey') == -1 - au BufNewFile,BufRead *.ahk set ft=autohotkey - au BufNewFile,BufRead *.ahkl set ft=autohotkey +if !has_key(s:disabled_packages, 'autohotkey') + au BufNewFile,BufRead *.ahk setf autohotkey + au BufNewFile,BufRead *.ahkl setf autohotkey endif -if index(g:polyglot_disabled, 'c/c++') == -1 - au BufNewFile,BufRead *.c set ft=c - au BufNewFile,BufRead *.cats set ft=c +if !has_key(s:disabled_packages, 'automake') + au BufNewFile,BufRead GNUmakefile.am setf automake + au BufNewFile,BufRead [Mm]akefile.am setf automake +endif + +if !has_key(s:disabled_packages, 'asn') + au BufNewFile,BufRead *.asn setf asn + au BufNewFile,BufRead *.asn1 setf asn +endif + +if !has_key(s:disabled_packages, 'aspvbs') + au! BufNewFile,BufRead *.asa call polyglot#DetectAsaFiletype() + au! BufNewFile,BufRead *.asp call polyglot#DetectAspFiletype() +endif + +if !has_key(s:disabled_packages, 'aspperl') + au! BufNewFile,BufRead *.asp call polyglot#DetectAspFiletype() +endif + +if !has_key(s:disabled_packages, 'atlas') + au BufNewFile,BufRead *.as setf atlas + au BufNewFile,BufRead *.atl setf atlas +endif + +if !has_key(s:disabled_packages, 'autoit') + au BufNewFile,BufRead *.au3 setf autoit +endif + +if !has_key(s:disabled_packages, 'ave') + au BufNewFile,BufRead *.ave setf ave +endif + +if !has_key(s:disabled_packages, 'awk') + au BufNewFile,BufRead *.awk setf awk +endif + +if !has_key(s:disabled_packages, 'c/c++') + au BufNewFile,BufRead *.c setf c + au BufNewFile,BufRead *.cats setf c au BufNewFile,BufRead *.h setf c - au BufNewFile,BufRead *.idc set ft=c - au BufNewFile,BufRead *.c++ set ft=cpp - au BufNewFile,BufRead *.cc set ft=cpp - au BufNewFile,BufRead *.cp set ft=cpp - au BufNewFile,BufRead *.cpp set ft=cpp - au BufNewFile,BufRead *.cxx set ft=cpp + au BufNewFile,BufRead *.idc setf c + au BufNewFile,BufRead *.c++ setf cpp + au BufNewFile,BufRead *.cc setf cpp + au BufNewFile,BufRead *.cp setf cpp + au BufNewFile,BufRead *.cpp setf cpp + au BufNewFile,BufRead *.cxx setf cpp au BufNewFile,BufRead *.h setf cpp - au BufNewFile,BufRead *.h++ set ft=cpp - au BufNewFile,BufRead *.hh set ft=cpp - au BufNewFile,BufRead *.hpp set ft=cpp - au BufNewFile,BufRead *.hxx set ft=cpp + au BufNewFile,BufRead *.h++ setf cpp + au BufNewFile,BufRead *.hh setf cpp + au BufNewFile,BufRead *.hpp setf cpp + au BufNewFile,BufRead *.hxx setf cpp au BufNewFile,BufRead *.inc setf cpp - au BufNewFile,BufRead *.inl set ft=cpp + au BufNewFile,BufRead *.inl setf cpp au BufNewFile,BufRead *.ino setf cpp - au BufNewFile,BufRead *.ipp set ft=cpp - au BufNewFile,BufRead *.tcc set ft=cpp - au BufNewFile,BufRead *.tpp set ft=cpp + au BufNewFile,BufRead *.ipp setf cpp + au BufNewFile,BufRead *.re setf cpp + au BufNewFile,BufRead *.tcc setf cpp + au BufNewFile,BufRead *.tpp setf cpp endif -if index(g:polyglot_disabled, 'c++11') == -1 +if !has_key(s:disabled_packages, 'caddyfile') + au BufNewFile,BufRead Caddyfile setf caddyfile endif -if index(g:polyglot_disabled, 'caddyfile') == -1 - au BufNewFile,BufRead Caddyfile set ft=caddyfile +if !has_key(s:disabled_packages, 'carp') + au BufNewFile,BufRead *.carp setf carp endif -if index(g:polyglot_disabled, 'carp') == -1 - au BufNewFile,BufRead *.carp set ft=carp +if !has_key(s:disabled_packages, 'clojure') + au BufNewFile,BufRead *.boot setf clojure + au BufNewFile,BufRead *.cl2 setf clojure + au BufNewFile,BufRead *.clj setf clojure + au BufNewFile,BufRead *.cljc setf clojure + au BufNewFile,BufRead *.cljs setf clojure + au BufNewFile,BufRead *.cljs.hl setf clojure + au BufNewFile,BufRead *.cljscm setf clojure + au BufNewFile,BufRead *.cljx setf clojure + au BufNewFile,BufRead *.edn setf clojure + au BufNewFile,BufRead *.hic setf clojure + au BufNewFile,BufRead build.boot setf clojure + au BufNewFile,BufRead profile.boot setf clojure + au BufNewFile,BufRead riemann.config setf clojure endif -if index(g:polyglot_disabled, 'clojure') == -1 - au BufNewFile,BufRead *.boot set ft=clojure - au BufNewFile,BufRead *.cl2 set ft=clojure - au BufNewFile,BufRead *.clj set ft=clojure - au BufNewFile,BufRead *.cljc set ft=clojure - au BufNewFile,BufRead *.cljs set ft=clojure - au BufNewFile,BufRead *.cljs.hl set ft=clojure - au BufNewFile,BufRead *.cljscm set ft=clojure - au BufNewFile,BufRead *.cljx set ft=clojure - au BufNewFile,BufRead *.edn set ft=clojure - au BufNewFile,BufRead *.hic set ft=clojure - au BufNewFile,BufRead build.boot set ft=clojure - au BufNewFile,BufRead profile.boot set ft=clojure - au BufNewFile,BufRead riemann.config set ft=clojure +if !has_key(s:disabled_packages, 'cmake') + au BufNewFile,BufRead *.cmake setf cmake + au BufNewFile,BufRead *.cmake.in setf cmake + au BufNewFile,BufRead CMakeLists.txt setf cmake endif -if index(g:polyglot_disabled, 'cmake') == -1 - au BufNewFile,BufRead *.cmake set ft=cmake - au BufNewFile,BufRead *.cmake.in set ft=cmake - au BufNewFile,BufRead CMakeLists.txt set ft=cmake +if !has_key(s:disabled_packages, 'coffee-script') + au BufNewFile,BufRead *._coffee setf coffee + au BufNewFile,BufRead *.cake setf coffee + au BufNewFile,BufRead *.cjsx setf coffee + au BufNewFile,BufRead *.coffee setf coffee + au BufNewFile,BufRead *.coffeekup setf coffee + au BufNewFile,BufRead *.iced setf coffee + au BufNewFile,BufRead Cakefile setf coffee + au BufNewFile,BufRead *.coffee.md setf litcoffee + au BufNewFile,BufRead *.litcoffee setf litcoffee endif -if index(g:polyglot_disabled, 'coffee-script') == -1 - au BufNewFile,BufRead *._coffee set ft=coffee - au BufNewFile,BufRead *.cake set ft=coffee - au BufNewFile,BufRead *.cjsx set ft=coffee - au BufNewFile,BufRead *.coffee set ft=coffee - au BufNewFile,BufRead *.coffeekup set ft=coffee - au BufNewFile,BufRead *.iced set ft=coffee - au BufNewFile,BufRead Cakefile set ft=coffee - au BufNewFile,BufRead *.coffee.md set ft=litcoffee - au BufNewFile,BufRead *.litcoffee set ft=litcoffee +if !has_key(s:disabled_packages, 'cjsx') endif -if index(g:polyglot_disabled, 'cjsx') == -1 +if !has_key(s:disabled_packages, 'cryptol') + au BufNewFile,BufRead *.cry setf cryptol + au BufNewFile,BufRead *.cyl setf cryptol + au BufNewFile,BufRead *.lcry setf cryptol + au BufNewFile,BufRead *.lcyl setf cryptol endif -if index(g:polyglot_disabled, 'cryptol') == -1 - au BufNewFile,BufRead *.cry set ft=cryptol - au BufNewFile,BufRead *.cyl set ft=cryptol - au BufNewFile,BufRead *.lcry set ft=cryptol - au BufNewFile,BufRead *.lcyl set ft=cryptol +if !has_key(s:disabled_packages, 'crystal') + au BufNewFile,BufRead *.cr setf crystal + au BufNewFile,BufRead Projectfile setf crystal + au BufNewFile,BufRead *.ecr setf ecrystal endif -if index(g:polyglot_disabled, 'crystal') == -1 - au BufNewFile,BufRead *.cr set ft=crystal - au BufNewFile,BufRead Projectfile set ft=crystal - au BufNewFile,BufRead *.ecr set ft=ecrystal +if !has_key(s:disabled_packages, 'csv') + au BufNewFile,BufRead *.csv setf csv + au BufNewFile,BufRead *.tab setf csv + au BufNewFile,BufRead *.tsv setf csv endif -if index(g:polyglot_disabled, 'csv') == -1 - au BufNewFile,BufRead *.csv set ft=csv - au BufNewFile,BufRead *.tab set ft=csv - au BufNewFile,BufRead *.tsv set ft=csv +if !has_key(s:disabled_packages, 'cucumber') + au BufNewFile,BufRead *.feature setf cucumber + au BufNewFile,BufRead *.story setf cucumber endif -if index(g:polyglot_disabled, 'cucumber') == -1 - au BufNewFile,BufRead *.feature set ft=cucumber - au BufNewFile,BufRead *.story set ft=cucumber +if !has_key(s:disabled_packages, 'cue') + au BufNewFile,BufRead *.cue setf cuesheet endif -if index(g:polyglot_disabled, 'cue') == -1 - au BufNewFile,BufRead *.cue set ft=cuesheet +if !has_key(s:disabled_packages, 'dart') + au BufNewFile,BufRead *.dart setf dart endif -if index(g:polyglot_disabled, 'dart') == -1 - au BufNewFile,BufRead *.dart set ft=dart +if !has_key(s:disabled_packages, 'dhall') + au BufNewFile,BufRead *.dhall setf dhall endif -if index(g:polyglot_disabled, 'dhall') == -1 - au BufNewFile,BufRead *.dhall set ft=dhall +if !has_key(s:disabled_packages, 'grub') + au BufNewFile,BufRead */boot/grub/grub.conf setf grub + au BufNewFile,BufRead */boot/grub/menu.lst setf grub + au BufNewFile,BufRead */etc/grub.conf setf grub endif -if index(g:polyglot_disabled, 'dlang') == -1 +if !has_key(s:disabled_packages, 'dlang') au BufNewFile,BufRead *.d setf d au BufNewFile,BufRead *.di setf d - au BufNewFile,BufRead *.lst set ft=dcov - au BufNewFile,BufRead *.dd set ft=dd - au BufNewFile,BufRead *.ddoc set ft=ddoc - au BufNewFile,BufRead *.sdl set ft=dsdl + au BufNewFile,BufRead *.lst setf dcov + au BufNewFile,BufRead *.dd setf dd + au BufNewFile,BufRead *.ddoc setf ddoc + au BufNewFile,BufRead *.sdl setf dsdl endif -if index(g:polyglot_disabled, 'dockerfile') == -1 - au BufNewFile,BufRead *.Dockerfile set ft=Dockerfile - au BufNewFile,BufRead *.dock set ft=Dockerfile - au BufNewFile,BufRead *.dockerfile set ft=Dockerfile - au BufNewFile,BufRead Dockerfile set ft=Dockerfile - au BufNewFile,BufRead Dockerfile* set ft=Dockerfile - au BufNewFile,BufRead dockerfile set ft=Dockerfile - au BufNewFile,BufRead docker-compose*.yaml set ft=yaml.docker-compose - au BufNewFile,BufRead docker-compose*.yml set ft=yaml.docker-compose +if !has_key(s:disabled_packages, 'dockerfile') + au BufNewFile,BufRead *.Dockerfile setf Dockerfile + au BufNewFile,BufRead *.dock setf Dockerfile + au BufNewFile,BufRead *.dockerfile setf Dockerfile + au BufNewFile,BufRead Dockerfile setf Dockerfile + au BufNewFile,BufRead Dockerfile* setf Dockerfile + au BufNewFile,BufRead dockerfile setf Dockerfile + au BufNewFile,BufRead docker-compose*.yaml setf yaml.docker-compose + au BufNewFile,BufRead docker-compose*.yml setf yaml.docker-compose endif -if index(g:polyglot_disabled, 'elixir') == -1 - au BufNewFile,BufRead *.ex set ft=elixir - au BufNewFile,BufRead *.exs set ft=elixir - au BufNewFile,BufRead mix.lock set ft=elixir - au BufNewFile,BufRead *.eex set ft=eelixir - au BufNewFile,BufRead *.leex set ft=eelixir +if !has_key(s:disabled_packages, 'elf') + au BufNewFile,BufRead *.am setf elf endif -if index(g:polyglot_disabled, 'elm') == -1 - au BufNewFile,BufRead *.elm set ft=elm +if !has_key(s:disabled_packages, 'elixir') + au BufNewFile,BufRead *.ex setf elixir + au BufNewFile,BufRead *.exs setf elixir + au BufNewFile,BufRead mix.lock setf elixir + au BufNewFile,BufRead *.eex setf eelixir + au BufNewFile,BufRead *.leex setf eelixir endif -if index(g:polyglot_disabled, 'emberscript') == -1 - au BufNewFile,BufRead *.em set ft=ember-script - au BufNewFile,BufRead *.emberscript set ft=ember-script +if !has_key(s:disabled_packages, 'elm') + au BufNewFile,BufRead *.elm setf elm endif -if index(g:polyglot_disabled, 'emblem') == -1 - au BufNewFile,BufRead *.em set ft=emblem - au BufNewFile,BufRead *.emblem set ft=emblem +if !has_key(s:disabled_packages, 'emberscript') + au BufNewFile,BufRead *.em setf ember-script + au BufNewFile,BufRead *.emberscript setf ember-script endif -if index(g:polyglot_disabled, 'erlang') == -1 - au BufNewFile,BufRead *.app set ft=erlang - au BufNewFile,BufRead *.app.src set ft=erlang - au BufNewFile,BufRead *.erl set ft=erlang +if !has_key(s:disabled_packages, 'emblem') + au BufNewFile,BufRead *.em setf emblem + au BufNewFile,BufRead *.emblem setf emblem +endif + +if !has_key(s:disabled_packages, 'erlang') + au BufNewFile,BufRead *.app setf erlang + au BufNewFile,BufRead *.app.src setf erlang + au BufNewFile,BufRead *.erl setf erlang au BufNewFile,BufRead *.es setf erlang - au BufNewFile,BufRead *.escript set ft=erlang - au BufNewFile,BufRead *.hrl set ft=erlang - au BufNewFile,BufRead *.xrl set ft=erlang - au BufNewFile,BufRead *.yaws set ft=erlang - au BufNewFile,BufRead *.yrl set ft=erlang - au BufNewFile,BufRead Emakefile set ft=erlang - au BufNewFile,BufRead rebar.config set ft=erlang - au BufNewFile,BufRead rebar.config.lock set ft=erlang - au BufNewFile,BufRead rebar.lock set ft=erlang + au BufNewFile,BufRead *.escript setf erlang + au BufNewFile,BufRead *.hrl setf erlang + au BufNewFile,BufRead *.xrl setf erlang + au BufNewFile,BufRead *.yaws setf erlang + au BufNewFile,BufRead *.yrl setf erlang + au BufNewFile,BufRead Emakefile setf erlang + au BufNewFile,BufRead rebar.config setf erlang + au BufNewFile,BufRead rebar.config.lock setf erlang + au BufNewFile,BufRead rebar.lock setf erlang endif -if index(g:polyglot_disabled, 'fennel') == -1 - au BufNewFile,BufRead *.fnl set ft=fennel +if !has_key(s:disabled_packages, 'fennel') + au BufNewFile,BufRead *.fnl setf fennel endif -if index(g:polyglot_disabled, 'ferm') == -1 - au BufNewFile,BufRead *.ferm set ft=ferm - au BufNewFile,BufRead ferm.conf set ft=ferm +if !has_key(s:disabled_packages, 'ferm') + au BufNewFile,BufRead *.ferm setf ferm + au BufNewFile,BufRead ferm.conf setf ferm endif -if index(g:polyglot_disabled, 'fish') == -1 - au BufNewFile,BufRead *.fish set ft=fish +if !has_key(s:disabled_packages, 'fish') + au BufNewFile,BufRead *.fish setf fish endif -if index(g:polyglot_disabled, 'flatbuffers') == -1 - au BufNewFile,BufRead *.fbs set ft=fbs +if !has_key(s:disabled_packages, 'flatbuffers') + au BufNewFile,BufRead *.fbs setf fbs endif -if index(g:polyglot_disabled, 'fsharp') == -1 - au BufNewFile,BufRead *.fs setf fsharp - au BufNewFile,BufRead *.fsi set ft=fsharp - au BufNewFile,BufRead *.fsx set ft=fsharp +if !has_key(s:disabled_packages, 'forth') + au BufNewFile,BufRead *.ft setf forth + au BufNewFile,BufRead *.fth setf forth + au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype() endif -if index(g:polyglot_disabled, 'gdscript') == -1 - au BufNewFile,BufRead *.gd set ft=gdscript3 +if !has_key(s:disabled_packages, 'fsharp') + au BufNewFile,BufRead *.fsi setf fsharp + au BufNewFile,BufRead *.fsx setf fsharp + au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype() endif -if index(g:polyglot_disabled, 'git') == -1 - au BufNewFile,BufRead *.gitconfig set ft=gitconfig - au BufNewFile,BufRead *.git/config set ft=gitconfig - au BufNewFile,BufRead *.git/modules/**/config set ft=gitconfig - au BufNewFile,BufRead */.config/git/config set ft=gitconfig - au BufNewFile,BufRead {.,}gitconfig set ft=gitconfig - au BufNewFile,BufRead {.,}gitmodules set ft=gitconfig - au BufNewFile,BufRead git-rebase-todo set ft=gitrebase - au BufNewFile,BufRead {.,}gitsendemail.* set ft=gitsendemail - au BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG set ft=gitcommit +if !has_key(s:disabled_packages, 'gdscript') + au BufNewFile,BufRead *.gd setf gdscript3 endif -if index(g:polyglot_disabled, 'glsl') == -1 - au BufNewFile,BufRead *.comp set ft=glsl - au BufNewFile,BufRead *.fp set ft=glsl - au BufNewFile,BufRead *.frag setf glsl - au BufNewFile,BufRead *.frg set ft=glsl - au BufNewFile,BufRead *.fs setf glsl - au BufNewFile,BufRead *.fsh set ft=glsl - au BufNewFile,BufRead *.fshader set ft=glsl - au BufNewFile,BufRead *.geo set ft=glsl - au BufNewFile,BufRead *.geom set ft=glsl - au BufNewFile,BufRead *.glsl set ft=glsl - au BufNewFile,BufRead *.glslf set ft=glsl - au BufNewFile,BufRead *.glslv set ft=glsl - au BufNewFile,BufRead *.gs setf glsl - au BufNewFile,BufRead *.gshader set ft=glsl - au BufNewFile,BufRead *.shader set ft=glsl - au BufNewFile,BufRead *.tesc set ft=glsl - au BufNewFile,BufRead *.tese set ft=glsl - au BufNewFile,BufRead *.vert set ft=glsl - au BufNewFile,BufRead *.vrx set ft=glsl - au BufNewFile,BufRead *.vsh set ft=glsl - au BufNewFile,BufRead *.vshader set ft=glsl +if !has_key(s:disabled_packages, 'git') + au BufNewFile,BufRead *.gitconfig setf gitconfig + au BufNewFile,BufRead *.git/config setf gitconfig + au BufNewFile,BufRead *.git/modules/**/config setf gitconfig + au BufNewFile,BufRead */.config/git/config setf gitconfig + au BufNewFile,BufRead {.,}gitconfig setf gitconfig + au BufNewFile,BufRead {.,}gitmodules setf gitconfig + au BufNewFile,BufRead git-rebase-todo setf gitrebase + au BufNewFile,BufRead {.,}gitsendemail.* setf gitsendemail + au BufNewFile,BufRead *.git/{,modules/**/,worktrees/*/}{COMMIT_EDIT,TAG_EDIT,MERGE_,}MSG setf gitcommit endif -if index(g:polyglot_disabled, 'gmpl') == -1 +if !has_key(s:disabled_packages, 'glsl') + au BufNewFile,BufRead *.comp setf glsl + au BufNewFile,BufRead *.fp setf glsl + au BufNewFile,BufRead *.frag setf glsl + au BufNewFile,BufRead *.frg setf glsl + au BufNewFile,BufRead *.fsh setf glsl + au BufNewFile,BufRead *.fshader setf glsl + au BufNewFile,BufRead *.geo setf glsl + au BufNewFile,BufRead *.geom setf glsl + au BufNewFile,BufRead *.glsl setf glsl + au BufNewFile,BufRead *.glslf setf glsl + au BufNewFile,BufRead *.glslv setf glsl + au BufNewFile,BufRead *.gs setf glsl + au BufNewFile,BufRead *.gshader setf glsl + au BufNewFile,BufRead *.shader setf glsl + au BufNewFile,BufRead *.tesc setf glsl + au BufNewFile,BufRead *.tese setf glsl + au BufNewFile,BufRead *.vert setf glsl + au BufNewFile,BufRead *.vrx setf glsl + au BufNewFile,BufRead *.vsh setf glsl + au BufNewFile,BufRead *.vshader setf glsl + au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype() +endif + +if !has_key(s:disabled_packages, 'gmpl') au BufNewFile,BufRead *.mod setf gmpl endif -if index(g:polyglot_disabled, 'gnuplot') == -1 - au BufNewFile,BufRead *.gnu set ft=gnuplot - au BufNewFile,BufRead *.gnuplot set ft=gnuplot - au BufNewFile,BufRead *.gp set ft=gnuplot +if !has_key(s:disabled_packages, 'gnuplot') + au BufNewFile,BufRead *.gnu setf gnuplot + au BufNewFile,BufRead *.gnuplot setf gnuplot + au BufNewFile,BufRead *.gp setf gnuplot au BufNewFile,BufRead *.p setf gnuplot - au BufNewFile,BufRead *.plot set ft=gnuplot - au BufNewFile,BufRead *.plt set ft=gnuplot + au BufNewFile,BufRead *.plot setf gnuplot + au BufNewFile,BufRead *.plt setf gnuplot endif -if index(g:polyglot_disabled, 'go') == -1 - au BufNewFile,BufRead *.go set ft=go - au BufNewFile,BufRead go.mod set ft=gomod - au BufNewFile,BufRead *.tmpl set ft=gohtmltmpl +if !has_key(s:disabled_packages, 'go') + au BufNewFile,BufRead *.go setf go + au BufNewFile,BufRead go.mod setf gomod + au BufNewFile,BufRead *.tmpl setf gohtmltmpl endif -if index(g:polyglot_disabled, 'graphql') == -1 - au BufNewFile,BufRead *.gql set ft=graphql - au BufNewFile,BufRead *.graphql set ft=graphql - au BufNewFile,BufRead *.graphqls set ft=graphql +if !has_key(s:disabled_packages, 'graphql') + au BufNewFile,BufRead *.gql setf graphql + au BufNewFile,BufRead *.graphql setf graphql + au BufNewFile,BufRead *.graphqls setf graphql endif -if index(g:polyglot_disabled, 'gradle') == -1 - au BufNewFile,BufRead *.gradle set ft=groovy +if !has_key(s:disabled_packages, 'gradle') + au BufNewFile,BufRead *.gradle setf groovy endif -if index(g:polyglot_disabled, 'haml') == -1 - au BufNewFile,BufRead *.haml set ft=haml - au BufNewFile,BufRead *.haml.deface set ft=haml - au BufNewFile,BufRead *.hamlbars set ft=haml - au BufNewFile,BufRead *.hamlc set ft=haml +if !has_key(s:disabled_packages, 'haml') + au BufNewFile,BufRead *.haml setf haml + au BufNewFile,BufRead *.haml.deface setf haml + au BufNewFile,BufRead *.hamlbars setf haml + au BufNewFile,BufRead *.hamlc setf haml endif -if index(g:polyglot_disabled, 'handlebars') == -1 - au BufNewFile,BufRead *.handlebars set ft=mustache - au BufNewFile,BufRead *.hb set ft=mustache - au BufNewFile,BufRead *.hbs set ft=mustache - au BufNewFile,BufRead *.hdbs set ft=mustache - au BufNewFile,BufRead *.hjs set ft=mustache - au BufNewFile,BufRead *.hogan set ft=mustache - au BufNewFile,BufRead *.hulk set ft=mustache - au BufNewFile,BufRead *.mustache set ft=mustache - au BufNewFile,BufRead *.njk set ft=mustache +if !has_key(s:disabled_packages, 'handlebars') + au BufNewFile,BufRead *.handlebars setf mustache + au BufNewFile,BufRead *.hb setf mustache + au BufNewFile,BufRead *.hbs setf mustache + au BufNewFile,BufRead *.hdbs setf mustache + au BufNewFile,BufRead *.hjs setf mustache + au BufNewFile,BufRead *.hogan setf mustache + au BufNewFile,BufRead *.hulk setf mustache + au BufNewFile,BufRead *.mustache setf mustache + au BufNewFile,BufRead *.njk setf mustache endif -if index(g:polyglot_disabled, 'haproxy') == -1 - au BufNewFile,BufRead *.cfg set ft=haproxy - au BufNewFile,BufRead haproxy*.c* set ft=haproxy - au BufNewFile,BufRead haproxy.cfg set ft=haproxy +if !has_key(s:disabled_packages, 'haproxy') + au BufNewFile,BufRead *.cfg setf haproxy + au BufNewFile,BufRead haproxy*.c* setf haproxy + au BufNewFile,BufRead haproxy.cfg setf haproxy endif -if index(g:polyglot_disabled, 'haskell') == -1 - au BufNewFile,BufRead *.bpk set ft=haskell - au BufNewFile,BufRead *.hs set ft=haskell - au BufNewFile,BufRead *.hs-boot set ft=haskell - au BufNewFile,BufRead *.hsc set ft=haskell - au BufNewFile,BufRead *.hsig set ft=haskell +if !has_key(s:disabled_packages, 'haskell') + au BufNewFile,BufRead *.bpk setf haskell + au BufNewFile,BufRead *.hs setf haskell + au BufNewFile,BufRead *.hs-boot setf haskell + au BufNewFile,BufRead *.hsc setf haskell + au BufNewFile,BufRead *.hsig setf haskell endif -if index(g:polyglot_disabled, 'haxe') == -1 - au BufNewFile,BufRead *.hx set ft=haxe - au BufNewFile,BufRead *.hxsl set ft=haxe +if !has_key(s:disabled_packages, 'haxe') + au BufNewFile,BufRead *.hx setf haxe + au BufNewFile,BufRead *.hxsl setf haxe endif -if index(g:polyglot_disabled, 'hcl') == -1 +if !has_key(s:disabled_packages, 'hcl') au BufNewFile,BufRead *.hcl setf hcl - au BufNewFile,BufRead *.nomad set ft=hcl + au BufNewFile,BufRead *.nomad setf hcl + au BufNewFile,BufRead *.tf setf hcl + au BufNewFile,BufRead *.tfvars setf hcl au BufNewFile,BufRead *.workflow setf hcl - au BufNewFile,BufRead Appfile set ft=hcl + au BufNewFile,BufRead Appfile setf hcl endif -if index(g:polyglot_disabled, 'hive') == -1 - au BufNewFile,BufRead *.hql set ft=hive - au BufNewFile,BufRead *.q set ft=hive - au BufNewFile,BufRead *.ql set ft=hive +if !has_key(s:disabled_packages, 'hive') + au BufNewFile,BufRead *.hql setf hive + au BufNewFile,BufRead *.q setf hive + au BufNewFile,BufRead *.ql setf hive endif -if index(g:polyglot_disabled, 'html5') == -1 - au BufNewFile,BufRead *.htm set ft=html - au BufNewFile,BufRead *.html set ft=html - au BufNewFile,BufRead *.html.hl set ft=html +if !has_key(s:disabled_packages, 'html5') + au BufNewFile,BufRead *.htm setf html + au BufNewFile,BufRead *.html setf html + au BufNewFile,BufRead *.html.hl setf html au BufNewFile,BufRead *.inc setf html - au BufNewFile,BufRead *.st set ft=html - au BufNewFile,BufRead *.xht set ft=html - au BufNewFile,BufRead *.xhtml set ft=html + au BufNewFile,BufRead *.st setf html + au BufNewFile,BufRead *.xht setf html + au BufNewFile,BufRead *.xhtml setf html endif -if index(g:polyglot_disabled, 'i3') == -1 - au BufNewFile,BufRead *.i3.config set ft=i3config - au BufNewFile,BufRead *.i3config set ft=i3config - au BufNewFile,BufRead {.,}i3.config set ft=i3config - au BufNewFile,BufRead {.,}i3config set ft=i3config - au BufNewFile,BufRead i3.config set ft=i3config - au BufNewFile,BufRead i3config set ft=i3config +if !has_key(s:disabled_packages, 'i3') + au BufNewFile,BufRead *.i3.config setf i3config + au BufNewFile,BufRead *.i3config setf i3config + au BufNewFile,BufRead {.,}i3.config setf i3config + au BufNewFile,BufRead {.,}i3config setf i3config + au BufNewFile,BufRead i3.config setf i3config + au BufNewFile,BufRead i3config setf i3config endif -if index(g:polyglot_disabled, 'icalendar') == -1 - au BufNewFile,BufRead *.ics set ft=icalendar +if !has_key(s:disabled_packages, 'icalendar') + au BufNewFile,BufRead *.ics setf icalendar endif -if index(g:polyglot_disabled, 'idris') == -1 - au BufNewFile,BufRead *.idr set ft=idris - au BufNewFile,BufRead *.lidr set ft=idris - au BufNewFile,BufRead idris-response set ft=idris +if !has_key(s:disabled_packages, 'idris') + au BufNewFile,BufRead *.idr setf idris + au BufNewFile,BufRead *.lidr setf idris + au BufNewFile,BufRead idris-response setf idris endif -if index(g:polyglot_disabled, 'ion') == -1 - au BufNewFile,BufRead *.ion set ft=ion - au BufNewFile,BufRead ~/.config/ion/initrc set ft=ion +if !has_key(s:disabled_packages, 'ion') + au BufNewFile,BufRead *.ion setf ion + au BufNewFile,BufRead ~/.config/ion/initrc setf ion endif -if index(g:polyglot_disabled, 'javascript') == -1 - au BufNewFile,BufRead *._js set ft=javascript - au BufNewFile,BufRead *.bones set ft=javascript - au BufNewFile,BufRead *.cjs set ft=javascript +if !has_key(s:disabled_packages, 'javascript') + au BufNewFile,BufRead *._js setf javascript + au BufNewFile,BufRead *.bones setf javascript + au BufNewFile,BufRead *.cjs setf javascript au BufNewFile,BufRead *.es setf javascript - au BufNewFile,BufRead *.es6 set ft=javascript + au BufNewFile,BufRead *.es6 setf javascript au BufNewFile,BufRead *.frag setf javascript au BufNewFile,BufRead *.gs setf javascript - au BufNewFile,BufRead *.jake set ft=javascript - au BufNewFile,BufRead *.js set ft=javascript - au BufNewFile,BufRead *.jsb set ft=javascript - au BufNewFile,BufRead *.jscad set ft=javascript - au BufNewFile,BufRead *.jsfl set ft=javascript - au BufNewFile,BufRead *.jsm set ft=javascript - au BufNewFile,BufRead *.jss set ft=javascript - au BufNewFile,BufRead *.mjs set ft=javascript - au BufNewFile,BufRead *.njs set ft=javascript - au BufNewFile,BufRead *.pac set ft=javascript - au BufNewFile,BufRead *.sjs set ft=javascript - au BufNewFile,BufRead *.ssjs set ft=javascript - au BufNewFile,BufRead *.xsjs set ft=javascript - au BufNewFile,BufRead *.xsjslib set ft=javascript - au BufNewFile,BufRead Jakefile set ft=javascript - au BufNewFile,BufRead *.flow set ft=flow + au BufNewFile,BufRead *.jake setf javascript + au BufNewFile,BufRead *.js setf javascript + au BufNewFile,BufRead *.jsb setf javascript + au BufNewFile,BufRead *.jscad setf javascript + au BufNewFile,BufRead *.jsfl setf javascript + au BufNewFile,BufRead *.jsm setf javascript + au BufNewFile,BufRead *.jss setf javascript + au BufNewFile,BufRead *.mjs setf javascript + au BufNewFile,BufRead *.njs setf javascript + au BufNewFile,BufRead *.pac setf javascript + au BufNewFile,BufRead *.sjs setf javascript + au BufNewFile,BufRead *.ssjs setf javascript + au BufNewFile,BufRead *.xsjs setf javascript + au BufNewFile,BufRead *.xsjslib setf javascript + au BufNewFile,BufRead Jakefile setf javascript + au BufNewFile,BufRead *.flow setf flow endif -if index(g:polyglot_disabled, 'jenkins') == -1 - au BufNewFile,BufRead *.Jenkinsfile set ft=Jenkinsfile - au BufNewFile,BufRead *.jenkinsfile set ft=Jenkinsfile - au BufNewFile,BufRead Jenkinsfile set ft=Jenkinsfile - au BufNewFile,BufRead Jenkinsfile* set ft=Jenkinsfile +if !has_key(s:disabled_packages, 'jenkins') + au BufNewFile,BufRead *.Jenkinsfile setf Jenkinsfile + au BufNewFile,BufRead *.jenkinsfile setf Jenkinsfile + au BufNewFile,BufRead Jenkinsfile setf Jenkinsfile + au BufNewFile,BufRead Jenkinsfile* setf Jenkinsfile endif -if index(g:polyglot_disabled, 'jinja') == -1 - au BufNewFile,BufRead *.j2 set ft=jinja.html - au BufNewFile,BufRead *.jinja set ft=jinja.html - au BufNewFile,BufRead *.jinja2 set ft=jinja.html +if !has_key(s:disabled_packages, 'jinja') + au BufNewFile,BufRead *.j2 setf jinja.html + au BufNewFile,BufRead *.jinja setf jinja.html + au BufNewFile,BufRead *.jinja2 setf jinja.html + au BufNewFile,BufRead *.mustache setf jinja.html + au BufNewFile,BufRead *.njk setf jinja.html endif -if index(g:polyglot_disabled, 'jq') == -1 - au BufNewFile,BufRead *.jq set ft=jq - au BufNewFile,BufRead {.,}jqrc set ft=jq +if !has_key(s:disabled_packages, 'jq') + au BufNewFile,BufRead *.jq setf jq + au BufNewFile,BufRead {.,}jqrc setf jq endif -if index(g:polyglot_disabled, 'json5') == -1 - au BufNewFile,BufRead *.json5 set ft=json5 +if !has_key(s:disabled_packages, 'json5') + au BufNewFile,BufRead *.json5 setf json5 endif -if index(g:polyglot_disabled, 'json') == -1 - au BufNewFile,BufRead *.JSON-tmLanguage set ft=json - au BufNewFile,BufRead *.avsc set ft=json - au BufNewFile,BufRead *.geojson set ft=json - au BufNewFile,BufRead *.gltf set ft=json - au BufNewFile,BufRead *.har set ft=json - au BufNewFile,BufRead *.ice set ft=json - au BufNewFile,BufRead *.json set ft=json - au BufNewFile,BufRead *.jsonl set ft=json - au BufNewFile,BufRead *.jsonp set ft=json - au BufNewFile,BufRead *.mcmeta set ft=json - au BufNewFile,BufRead *.template set ft=json - au BufNewFile,BufRead *.tfstate set ft=json - au BufNewFile,BufRead *.tfstate.backup set ft=json - au BufNewFile,BufRead *.topojson set ft=json - au BufNewFile,BufRead *.webapp set ft=json - au BufNewFile,BufRead *.webmanifest set ft=json - au BufNewFile,BufRead *.yy set ft=json - au BufNewFile,BufRead *.yyp set ft=json - au BufNewFile,BufRead {.,}arcconfig set ft=json - au BufNewFile,BufRead {.,}htmlhintrc set ft=json - au BufNewFile,BufRead {.,}tern-config set ft=json - au BufNewFile,BufRead {.,}tern-project set ft=json - au BufNewFile,BufRead {.,}watchmanconfig set ft=json - au BufNewFile,BufRead composer.lock set ft=json - au BufNewFile,BufRead mcmod.info set ft=json +if !has_key(s:disabled_packages, 'json') + au BufNewFile,BufRead *.JSON-tmLanguage setf json + au BufNewFile,BufRead *.avsc setf json + au BufNewFile,BufRead *.geojson setf json + au BufNewFile,BufRead *.gltf setf json + au BufNewFile,BufRead *.har setf json + au BufNewFile,BufRead *.ice setf json + au BufNewFile,BufRead *.json setf json + au BufNewFile,BufRead *.jsonl setf json + au BufNewFile,BufRead *.jsonp setf json + au BufNewFile,BufRead *.mcmeta setf json + au BufNewFile,BufRead *.template setf json + au BufNewFile,BufRead *.tfstate setf json + au BufNewFile,BufRead *.tfstate.backup setf json + au BufNewFile,BufRead *.topojson setf json + au BufNewFile,BufRead *.webapp setf json + au BufNewFile,BufRead *.webmanifest setf json + au BufNewFile,BufRead *.yy setf json + au BufNewFile,BufRead *.yyp setf json + au BufNewFile,BufRead {.,}arcconfig setf json + au BufNewFile,BufRead {.,}htmlhintrc setf json + au BufNewFile,BufRead {.,}tern-config setf json + au BufNewFile,BufRead {.,}tern-project setf json + au BufNewFile,BufRead {.,}watchmanconfig setf json + au BufNewFile,BufRead composer.lock setf json + au BufNewFile,BufRead mcmod.info setf json endif -if index(g:polyglot_disabled, 'jsonnet') == -1 - au BufNewFile,BufRead *.jsonnet set ft=jsonnet - au BufNewFile,BufRead *.libsonnet set ft=jsonnet +if !has_key(s:disabled_packages, 'jsonnet') + au BufNewFile,BufRead *.jsonnet setf jsonnet + au BufNewFile,BufRead *.libsonnet setf jsonnet endif -if index(g:polyglot_disabled, 'jst') == -1 - au BufNewFile,BufRead *.ect set ft=jst - au BufNewFile,BufRead *.ejs set ft=jst - au BufNewFile,BufRead *.jst set ft=jst +if !has_key(s:disabled_packages, 'jst') + au BufNewFile,BufRead *.ect setf jst + au BufNewFile,BufRead *.ejs setf jst + au BufNewFile,BufRead *.jst setf jst endif -if !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1) - au BufNewFile,BufRead *.jsx set ft=javascriptreact +if !has_key(s:disabled_packages, 'jsx') + au BufNewFile,BufRead *.jsx setf javascriptreact endif -if index(g:polyglot_disabled, 'julia') == -1 - au BufNewFile,BufRead *.jl set ft=julia +if !has_key(s:disabled_packages, 'julia') + au BufNewFile,BufRead *.jl setf julia endif -if index(g:polyglot_disabled, 'kotlin') == -1 - au BufNewFile,BufRead *.kt set ft=kotlin - au BufNewFile,BufRead *.ktm set ft=kotlin - au BufNewFile,BufRead *.kts set ft=kotlin +if !has_key(s:disabled_packages, 'kotlin') + au BufNewFile,BufRead *.kt setf kotlin + au BufNewFile,BufRead *.ktm setf kotlin + au BufNewFile,BufRead *.kts setf kotlin endif -if index(g:polyglot_disabled, 'ledger') == -1 - au BufNewFile,BufRead *.journal set ft=ledger - au BufNewFile,BufRead *.ldg set ft=ledger - au BufNewFile,BufRead *.ledger set ft=ledger +if !has_key(s:disabled_packages, 'ledger') + au BufNewFile,BufRead *.journal setf ledger + au BufNewFile,BufRead *.ldg setf ledger + au BufNewFile,BufRead *.ledger setf ledger endif -if index(g:polyglot_disabled, 'less') == -1 - au BufNewFile,BufRead *.less set ft=less +if !has_key(s:disabled_packages, 'less') + au BufNewFile,BufRead *.less setf less endif -if index(g:polyglot_disabled, 'lilypond') == -1 - au BufNewFile,BufRead *.ily set ft=lilypond - au BufNewFile,BufRead *.ly set ft=lilypond +if !has_key(s:disabled_packages, 'lilypond') + au BufNewFile,BufRead *.ily setf lilypond + au BufNewFile,BufRead *.ly setf lilypond endif -if index(g:polyglot_disabled, 'livescript') == -1 - au BufNewFile,BufRead *._ls set ft=livescript - au BufNewFile,BufRead *.ls set ft=livescript - au BufNewFile,BufRead Slakefile set ft=livescript +if !has_key(s:disabled_packages, 'livescript') + au BufNewFile,BufRead *._ls setf livescript + au BufNewFile,BufRead *.ls setf livescript + au BufNewFile,BufRead Slakefile setf livescript endif -if index(g:polyglot_disabled, 'llvm') == -1 - au BufNewFile,BufRead *.ll set ft=llvm - au BufNewFile,BufRead *.td set ft=tablegen +if !has_key(s:disabled_packages, 'llvm') + au BufNewFile,BufRead *.ll setf llvm + au BufNewFile,BufRead *.td setf tablegen endif -if index(g:polyglot_disabled, 'log') == -1 - au BufNewFile,BufRead *.log set ft=log - au BufNewFile,BufRead *_log set ft=log +if !has_key(s:disabled_packages, 'log') + au BufNewFile,BufRead *.LOG setf log + au BufNewFile,BufRead *.log setf log + au BufNewFile,BufRead *_LOG setf log + au BufNewFile,BufRead *_log setf log endif -if index(g:polyglot_disabled, 'lua') == -1 +if !has_key(s:disabled_packages, 'lua') au BufNewFile,BufRead *.fcgi setf lua - au BufNewFile,BufRead *.lua set ft=lua - au BufNewFile,BufRead *.nse set ft=lua - au BufNewFile,BufRead *.p8 set ft=lua - au BufNewFile,BufRead *.pd_lua set ft=lua - au BufNewFile,BufRead *.rbxs set ft=lua - au BufNewFile,BufRead *.rockspec set ft=lua - au BufNewFile,BufRead *.wlua set ft=lua - au BufNewFile,BufRead {.,}luacheckrc set ft=lua + au BufNewFile,BufRead *.lua setf lua + au BufNewFile,BufRead *.nse setf lua + au BufNewFile,BufRead *.p8 setf lua + au BufNewFile,BufRead *.pd_lua setf lua + au BufNewFile,BufRead *.rbxs setf lua + au BufNewFile,BufRead *.rockspec setf lua + au BufNewFile,BufRead *.wlua setf lua + au BufNewFile,BufRead {.,}luacheckrc setf lua +endif + +if !has_key(s:disabled_packages, 'm4') + au BufNewFile,BufRead *.at setf m4 + au BufNewFile,BufRead *.m4 setf m4 endif -if index(g:polyglot_disabled, 'mako') == -1 +if !has_key(s:disabled_packages, 'mako') au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype au BufReadPre *.*.mako execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype - au BufNewFile,BufRead *.mako set ft=mako + au BufNewFile,BufRead *.mako setf mako au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype au BufReadPre *.*.mao execute "do BufRead filetypedetect " . expand("<afile>:r") | let b:mako_outer_lang = &filetype - au BufNewFile,BufRead *.mao set ft=mako + au BufNewFile,BufRead *.mao setf mako +endif + +if !has_key(s:disabled_packages, 'octave') + au BufNewFile,BufRead *.oct setf octave + au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype() endif -if index(g:polyglot_disabled, 'mathematica') == -1 - au BufNewFile,BufRead *.cdf set ft=mma - au BufNewFile,BufRead *.m setf mma - au BufNewFile,BufRead *.ma set ft=mma - au BufNewFile,BufRead *.mathematica set ft=mma - au BufNewFile,BufRead *.mt set ft=mma - au BufNewFile,BufRead *.nb set ft=mma - au BufNewFile,BufRead *.nbp set ft=mma - au BufNewFile,BufRead *.wl set ft=mma - au BufNewFile,BufRead *.wls set ft=mma - au BufNewFile,BufRead *.wlt set ft=mma +if !has_key(s:disabled_packages, 'mathematica') + au BufNewFile,BufRead *.cdf setf mma + au BufNewFile,BufRead *.ma setf mma + au BufNewFile,BufRead *.mathematica setf mma + au BufNewFile,BufRead *.mt setf mma + au BufNewFile,BufRead *.nb setf mma + au BufNewFile,BufRead *.nbp setf mma + au BufNewFile,BufRead *.wl setf mma + au BufNewFile,BufRead *.wls setf mma + au BufNewFile,BufRead *.wlt setf mma + au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype() endif -if index(g:polyglot_disabled, 'markdown') == -1 - au BufNewFile,BufRead *.markdown set ft=markdown - au BufNewFile,BufRead *.md set ft=markdown - au BufNewFile,BufRead *.mdown set ft=markdown - au BufNewFile,BufRead *.mdwn set ft=markdown - au BufNewFile,BufRead *.mkd set ft=markdown - au BufNewFile,BufRead *.mkdn set ft=markdown - au BufNewFile,BufRead *.mkdown set ft=markdown - au BufNewFile,BufRead *.ronn set ft=markdown - au BufNewFile,BufRead *.workbook set ft=markdown - au BufNewFile,BufRead contents.lr set ft=markdown +if !has_key(s:disabled_packages, 'markdown') + au BufNewFile,BufRead *.markdown setf markdown + au BufNewFile,BufRead *.md setf markdown + au BufNewFile,BufRead *.mdown setf markdown + au BufNewFile,BufRead *.mdwn setf markdown + au BufNewFile,BufRead *.mdx setf markdown + au BufNewFile,BufRead *.mkd setf markdown + au BufNewFile,BufRead *.mkdn setf markdown + au BufNewFile,BufRead *.mkdown setf markdown + au BufNewFile,BufRead *.ronn setf markdown + au BufNewFile,BufRead *.workbook setf markdown + au BufNewFile,BufRead contents.lr setf markdown endif -if index(g:polyglot_disabled, 'mdx') == -1 - au BufNewFile,BufRead *.mdx set ft=markdown.mdx +if !has_key(s:disabled_packages, 'mdx') + au BufNewFile,BufRead *.mdx setf markdown.mdx endif -if index(g:polyglot_disabled, 'meson') == -1 - au BufNewFile,BufRead meson.build set ft=meson - au BufNewFile,BufRead meson_options.txt set ft=meson - au BufNewFile,BufRead *.wrap set ft=dosini +if !has_key(s:disabled_packages, 'meson') + au BufNewFile,BufRead meson.build setf meson + au BufNewFile,BufRead meson_options.txt setf meson + au BufNewFile,BufRead *.wrap setf dosini endif -if index(g:polyglot_disabled, 'moonscript') == -1 - au BufNewFile,BufRead *.moon set ft=moon +if !has_key(s:disabled_packages, 'moonscript') + au BufNewFile,BufRead *.moon setf moon endif -if index(g:polyglot_disabled, 'nginx') == -1 - au BufNewFile,BufRead *.nginx set ft=nginx - au BufNewFile,BufRead *.nginxconf set ft=nginx - au BufNewFile,BufRead *.vhost set ft=nginx - au BufNewFile,BufRead */etc/nginx/* set ft=nginx - au BufNewFile,BufRead */nginx/*.conf set ft=nginx - au BufNewFile,BufRead */usr/local/nginx/conf/* set ft=nginx - au BufNewFile,BufRead *nginx.conf set ft=nginx - au BufNewFile,BufRead nginx*.conf set ft=nginx - au BufNewFile,BufRead nginx.conf set ft=nginx +if !has_key(s:disabled_packages, 'murphi') + au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype() endif -if index(g:polyglot_disabled, 'nim') == -1 - au BufNewFile,BufRead *.nim set ft=nim - au BufNewFile,BufRead *.nim.cfg set ft=nim - au BufNewFile,BufRead *.nimble set ft=nim - au BufNewFile,BufRead *.nimrod set ft=nim - au BufNewFile,BufRead *.nims set ft=nim - au BufNewFile,BufRead nim.cfg set ft=nim +if !has_key(s:disabled_packages, 'nginx') + au BufNewFile,BufRead *.nginx setf nginx + au BufNewFile,BufRead *.nginxconf setf nginx + au BufNewFile,BufRead *.vhost setf nginx + au BufNewFile,BufRead */etc/nginx/* setf nginx + au BufNewFile,BufRead */nginx/*.conf setf nginx + au BufNewFile,BufRead */usr/local/nginx/conf/* setf nginx + au BufNewFile,BufRead *nginx.conf setf nginx + au BufNewFile,BufRead nginx*.conf setf nginx + au BufNewFile,BufRead nginx.conf setf nginx endif -if index(g:polyglot_disabled, 'nix') == -1 - au BufNewFile,BufRead *.nix set ft=nix +if !has_key(s:disabled_packages, 'nim') + au BufNewFile,BufRead *.nim setf nim + au BufNewFile,BufRead *.nim.cfg setf nim + au BufNewFile,BufRead *.nimble setf nim + au BufNewFile,BufRead *.nimrod setf nim + au BufNewFile,BufRead *.nims setf nim + au BufNewFile,BufRead nim.cfg setf nim endif -if index(g:polyglot_disabled, 'objc') == -1 +if !has_key(s:disabled_packages, 'nix') + au BufNewFile,BufRead *.nix setf nix +endif + +if !has_key(s:disabled_packages, 'objc') au BufNewFile,BufRead *.h setf objc - au BufNewFile,BufRead *.m setf objc -endif - -if index(g:polyglot_disabled, 'ocaml') == -1 - au BufNewFile,BufRead *.eliom set ft=ocaml - au BufNewFile,BufRead *.eliomi set ft=ocaml - au BufNewFile,BufRead *.ml set ft=ocaml - au BufNewFile,BufRead *.ml.cppo set ft=ocaml - au BufNewFile,BufRead *.ml4 set ft=ocaml - au BufNewFile,BufRead *.mli set ft=ocaml - au BufNewFile,BufRead *.mli.cppo set ft=ocaml - au BufNewFile,BufRead *.mlip set ft=ocaml - au BufNewFile,BufRead *.mll set ft=ocaml - au BufNewFile,BufRead *.mlp set ft=ocaml - au BufNewFile,BufRead *.mlt set ft=ocaml - au BufNewFile,BufRead *.mly set ft=ocaml - au BufNewFile,BufRead {.,}ocamlinit set ft=ocaml - au BufNewFile,BufRead *.om set ft=omake - au BufNewFile,BufRead OMakefile set ft=omake - au BufNewFile,BufRead OMakeroot set ft=omake - au BufNewFile,BufRead OMakeroot.in set ft=omake - au BufNewFile,BufRead *.opam set ft=opam - au BufNewFile,BufRead *.opam.template set ft=opam - au BufNewFile,BufRead opam set ft=opam - au BufNewFile,BufRead _oasis set ft=oasis - au BufNewFile,BufRead dune set ft=dune - au BufNewFile,BufRead dune-project set ft=dune - au BufNewFile,BufRead dune-workspace set ft=dune - au BufNewFile,BufRead jbuild set ft=dune - au BufNewFile,BufRead _tags set ft=ocamlbuild_tags - au BufNewFile,BufRead *.ocp set ft=ocpbuild - au BufNewFile,BufRead *.root set ft=ocpbuildroot - au BufNewFile,BufRead *.sexp set ft=sexplib -endif - -if index(g:polyglot_disabled, 'octave') == -1 - au BufNewFile,BufRead *.oct set ft=octave -endif - -if index(g:polyglot_disabled, 'opencl') == -1 - au BufNewFile,BufRead *.cl set ft=opencl - au BufNewFile,BufRead *.opencl set ft=opencl -endif - -if index(g:polyglot_disabled, 'perl') == -1 - au BufNewFile,BufRead *.al set ft=perl + au! BufNewFile,BufRead *.m call polyglot#DetectMFiletype() +endif + +if !has_key(s:disabled_packages, 'ocaml') + au BufNewFile,BufRead *.eliom setf ocaml + au BufNewFile,BufRead *.eliomi setf ocaml + au BufNewFile,BufRead *.ml setf ocaml + au BufNewFile,BufRead *.ml.cppo setf ocaml + au BufNewFile,BufRead *.ml4 setf ocaml + au BufNewFile,BufRead *.mli setf ocaml + au BufNewFile,BufRead *.mli.cppo setf ocaml + au BufNewFile,BufRead *.mlip setf ocaml + au BufNewFile,BufRead *.mll setf ocaml + au BufNewFile,BufRead *.mlp setf ocaml + au BufNewFile,BufRead *.mlt setf ocaml + au BufNewFile,BufRead *.mly setf ocaml + au BufNewFile,BufRead {.,}ocamlinit setf ocaml + au BufNewFile,BufRead *.om setf omake + au BufNewFile,BufRead OMakefile setf omake + au BufNewFile,BufRead OMakeroot setf omake + au BufNewFile,BufRead OMakeroot.in setf omake + au BufNewFile,BufRead *.opam setf opam + au BufNewFile,BufRead *.opam.template setf opam + au BufNewFile,BufRead opam setf opam + au BufNewFile,BufRead _oasis setf oasis + au BufNewFile,BufRead dune setf dune + au BufNewFile,BufRead dune-project setf dune + au BufNewFile,BufRead dune-workspace setf dune + au BufNewFile,BufRead jbuild setf dune + au BufNewFile,BufRead _tags setf ocamlbuild_tags + au BufNewFile,BufRead *.ocp setf ocpbuild + au BufNewFile,BufRead *.root setf ocpbuildroot + au BufNewFile,BufRead *.sexp setf sexplib +endif + +if !has_key(s:disabled_packages, 'opencl') + au BufNewFile,BufRead *.cl setf opencl + au BufNewFile,BufRead *.opencl setf opencl +endif + +if !has_key(s:disabled_packages, 'perl') + au BufNewFile,BufRead *.al setf perl au BufNewFile,BufRead *.cgi setf perl au BufNewFile,BufRead *.fcgi setf perl - au BufNewFile,BufRead *.perl set ft=perl - au BufNewFile,BufRead *.ph set ft=perl + au BufNewFile,BufRead *.perl setf perl + au BufNewFile,BufRead *.ph setf perl au BufNewFile,BufRead *.pl setf perl - au BufNewFile,BufRead *.plx set ft=perl + au BufNewFile,BufRead *.plx setf perl au BufNewFile,BufRead *.pm setf perl - au BufNewFile,BufRead *.psgi set ft=perl + au BufNewFile,BufRead *.psgi setf perl au BufNewFile,BufRead *.t setf perl - au BufNewFile,BufRead Makefile.PL set ft=perl - au BufNewFile,BufRead Rexfile set ft=perl - au BufNewFile,BufRead ack set ft=perl - au BufNewFile,BufRead cpanfile set ft=perl -endif - -if index(g:polyglot_disabled, 'sql') == -1 - au BufNewFile,BufRead *.bdy set ft=sql - au BufNewFile,BufRead *.ddl set ft=sql - au BufNewFile,BufRead *.fnc set ft=sql - au BufNewFile,BufRead *.pck set ft=sql - au BufNewFile,BufRead *.pkb set ft=sql - au BufNewFile,BufRead *.pks set ft=sql - au BufNewFile,BufRead *.plb set ft=sql - au BufNewFile,BufRead *.pls set ft=sql - au BufNewFile,BufRead *.plsql set ft=sql - au BufNewFile,BufRead *.prc set ft=sql - au BufNewFile,BufRead *.spc set ft=sql - au BufNewFile,BufRead *.sql set ft=sql - au BufNewFile,BufRead *.tpb set ft=sql - au BufNewFile,BufRead *.tps set ft=sql - au BufNewFile,BufRead *.trg set ft=sql - au BufNewFile,BufRead *.vw set ft=sql -endif - -if index(g:polyglot_disabled, 'pgsql') == -1 - au BufNewFile,BufRead *.pgsql set ft=sql -endif - -if index(g:polyglot_disabled, 'cql') == -1 - au BufNewFile,BufRead *.cql set ft=cql -endif - -if index(g:polyglot_disabled, 'php') == -1 - au BufNewFile,BufRead *.aw set ft=php - au BufNewFile,BufRead *.ctp set ft=php - au BufNewFile,BufRead *.fcgi setf php - au BufNewFile,BufRead *.inc setf php - au BufNewFile,BufRead *.php set ft=php - au BufNewFile,BufRead *.php3 set ft=php - au BufNewFile,BufRead *.php4 set ft=php - au BufNewFile,BufRead *.php5 set ft=php - au BufNewFile,BufRead *.phps set ft=php - au BufNewFile,BufRead *.phpt set ft=php - au BufNewFile,BufRead {.,}php set ft=php - au BufNewFile,BufRead {.,}php_cs set ft=php - au BufNewFile,BufRead {.,}php_cs.dist set ft=php - au BufNewFile,BufRead Phakefile set ft=php + au BufNewFile,BufRead Makefile.PL setf perl + au BufNewFile,BufRead Rexfile setf perl + au BufNewFile,BufRead ack setf perl + au BufNewFile,BufRead cpanfile setf perl +endif + +if !has_key(s:disabled_packages, 'sql') + au BufNewFile,BufRead *.bdy setf sql + au BufNewFile,BufRead *.ddl setf sql + au BufNewFile,BufRead *.fnc setf sql + au BufNewFile,BufRead *.pck setf sql + au BufNewFile,BufRead *.pkb setf sql + au BufNewFile,BufRead *.pks setf sql + au BufNewFile,BufRead *.plb setf sql + au BufNewFile,BufRead *.pls setf sql + au BufNewFile,BufRead *.plsql setf sql + au BufNewFile,BufRead *.prc setf sql + au BufNewFile,BufRead *.spc setf sql + au BufNewFile,BufRead *.sql setf sql + au BufNewFile,BufRead *.tpb setf sql + au BufNewFile,BufRead *.tps setf sql + au BufNewFile,BufRead *.trg setf sql + au BufNewFile,BufRead *.vw setf sql endif -if index(g:polyglot_disabled, 'blade') == -1 - au BufNewFile,BufRead *.blade set ft=blade - au BufNewFile,BufRead *.blade.php set ft=blade +if !has_key(s:disabled_packages, 'pgsql') + au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql + au BufNewFile,BufRead *.sql let b:sql_type_override='pgsql' | set ft=sql endif -if index(g:polyglot_disabled, 'plantuml') == -1 - au BufNewFile,BufRead *.iuml set ft=plantuml - au BufNewFile,BufRead *.plantuml set ft=plantuml - au BufNewFile,BufRead *.pu set ft=plantuml - au BufNewFile,BufRead *.puml set ft=plantuml - au BufNewFile,BufRead *.uml set ft=plantuml +if !has_key(s:disabled_packages, 'cql') + au BufNewFile,BufRead *.cql setf cql endif -if index(g:polyglot_disabled, 'pony') == -1 - au BufNewFile,BufRead *.pony set ft=pony +if !has_key(s:disabled_packages, 'blade') + au BufNewFile,BufRead *.blade setf blade + au BufNewFile,BufRead *.blade.php setf blade endif -if index(g:polyglot_disabled, 'powershell') == -1 - au BufNewFile,BufRead *.ps1 set ft=powershell - au BufNewFile,BufRead *.psd1 set ft=powershell - au BufNewFile,BufRead *.psm1 set ft=powershell - au BufNewFile,BufRead *.pssc set ft=powershell +if !has_key(s:disabled_packages, 'php') + au BufNewFile,BufRead *.aw setf php + au BufNewFile,BufRead *.ctp setf php + au BufNewFile,BufRead *.fcgi setf php + au BufNewFile,BufRead *.inc setf php + au BufNewFile,BufRead *.php setf php + au BufNewFile,BufRead *.php3 setf php + au BufNewFile,BufRead *.php4 setf php + au BufNewFile,BufRead *.php5 setf php + au BufNewFile,BufRead *.phps setf php + au BufNewFile,BufRead *.phpt setf php + au BufNewFile,BufRead {.,}php setf php + au BufNewFile,BufRead {.,}php_cs setf php + au BufNewFile,BufRead {.,}php_cs.dist setf php + au BufNewFile,BufRead Phakefile setf php +endif + +if !has_key(s:disabled_packages, 'plantuml') + au BufNewFile,BufRead *.iuml setf plantuml + au BufNewFile,BufRead *.plantuml setf plantuml + au BufNewFile,BufRead *.pu setf plantuml + au BufNewFile,BufRead *.puml setf plantuml + au BufNewFile,BufRead *.uml setf plantuml +endif + +if !has_key(s:disabled_packages, 'pony') + au BufNewFile,BufRead *.pony setf pony +endif + +if !has_key(s:disabled_packages, 'powershell') + au BufNewFile,BufRead *.ps1 setf ps1 + au BufNewFile,BufRead *.psd1 setf ps1 + au BufNewFile,BufRead *.psm1 setf ps1 + au BufNewFile,BufRead *.pssc setf ps1 au BufNewFile,BufRead *.ps1xml setf ps1xml endif -if index(g:polyglot_disabled, 'protobuf') == -1 - au BufNewFile,BufRead *.proto set ft=proto +if !has_key(s:disabled_packages, 'protobuf') + au BufNewFile,BufRead *.proto setf proto endif -if index(g:polyglot_disabled, 'pug') == -1 - au BufNewFile,BufRead *.jade set ft=pug - au BufNewFile,BufRead *.pug set ft=pug +if !has_key(s:disabled_packages, 'pug') + au BufNewFile,BufRead *.jade setf pug + au BufNewFile,BufRead *.pug setf pug endif -if index(g:polyglot_disabled, 'puppet') == -1 - au BufNewFile,BufRead *.pp set ft=puppet - au BufNewFile,BufRead Modulefile set ft=puppet - au BufNewFile,BufRead *.epp set ft=embeddedpuppet +if !has_key(s:disabled_packages, 'puppet') + au BufNewFile,BufRead *.pp setf puppet + au BufNewFile,BufRead Modulefile setf puppet + au BufNewFile,BufRead *.epp setf embeddedpuppet endif -if index(g:polyglot_disabled, 'purescript') == -1 - au BufNewFile,BufRead *.purs set ft=purescript +if !has_key(s:disabled_packages, 'purescript') + au BufNewFile,BufRead *.purs setf purescript endif -if index(g:polyglot_disabled, 'python') == -1 +if !has_key(s:disabled_packages, 'python') au BufNewFile,BufRead *.cgi setf python au BufNewFile,BufRead *.fcgi setf python - au BufNewFile,BufRead *.gyp set ft=python - au BufNewFile,BufRead *.gypi set ft=python - au BufNewFile,BufRead *.lmi set ft=python - au BufNewFile,BufRead *.py set ft=python - au BufNewFile,BufRead *.py3 set ft=python - au BufNewFile,BufRead *.pyde set ft=python - au BufNewFile,BufRead *.pyi set ft=python - au BufNewFile,BufRead *.pyp set ft=python - au BufNewFile,BufRead *.pyt set ft=python - au BufNewFile,BufRead *.pyw set ft=python - au BufNewFile,BufRead *.rpy set ft=python - au BufNewFile,BufRead *.smk set ft=python + au BufNewFile,BufRead *.gyp setf python + au BufNewFile,BufRead *.gypi setf python + au BufNewFile,BufRead *.lmi setf python + au BufNewFile,BufRead *.py setf python + au BufNewFile,BufRead *.py3 setf python + au BufNewFile,BufRead *.pyde setf python + au BufNewFile,BufRead *.pyi setf python + au BufNewFile,BufRead *.pyp setf python + au BufNewFile,BufRead *.pyt setf python + au BufNewFile,BufRead *.pyw setf python + au BufNewFile,BufRead *.rpy setf python + au BufNewFile,BufRead *.smk setf python au BufNewFile,BufRead *.spec setf python - au BufNewFile,BufRead *.tac set ft=python - au BufNewFile,BufRead *.wsgi set ft=python - au BufNewFile,BufRead *.xpy set ft=python - au BufNewFile,BufRead {.,}gclient set ft=python - au BufNewFile,BufRead DEPS set ft=python - au BufNewFile,BufRead SConscript set ft=python - au BufNewFile,BufRead SConstruct set ft=python - au BufNewFile,BufRead Snakefile set ft=python - au BufNewFile,BufRead wscript set ft=python + au BufNewFile,BufRead *.tac setf python + au BufNewFile,BufRead *.wsgi setf python + au BufNewFile,BufRead *.xpy setf python + au BufNewFile,BufRead {.,}gclient setf python + au BufNewFile,BufRead DEPS setf python + au BufNewFile,BufRead SConscript setf python + au BufNewFile,BufRead SConstruct setf python + au BufNewFile,BufRead Snakefile setf python + au BufNewFile,BufRead wscript setf python endif -if index(g:polyglot_disabled, 'python-indent') == -1 +if !has_key(s:disabled_packages, 'python-indent') endif -if index(g:polyglot_disabled, 'python-compiler') == -1 +if !has_key(s:disabled_packages, 'python-compiler') endif -if index(g:polyglot_disabled, 'requirements') == -1 - au BufNewFile,BufRead *.pip set ft=requirements - au BufNewFile,BufRead *require.{txt,in} set ft=requirements - au BufNewFile,BufRead *requirements.{txt,in} set ft=requirements - au BufNewFile,BufRead constraints.{txt,in} set ft=requirements +if !has_key(s:disabled_packages, 'requirements') + au BufNewFile,BufRead *.pip setf requirements + au BufNewFile,BufRead *require.{txt,in} setf requirements + au BufNewFile,BufRead *requirements.{txt,in} setf requirements + au BufNewFile,BufRead constraints.{txt,in} setf requirements endif -if index(g:polyglot_disabled, 'qmake') == -1 - au BufNewFile,BufRead *.pri set ft=qmake - au BufNewFile,BufRead *.pro set ft=qmake +if !has_key(s:disabled_packages, 'qmake') + au BufNewFile,BufRead *.pri setf qmake + au BufNewFile,BufRead *.pro setf qmake endif -if index(g:polyglot_disabled, 'qml') == -1 - au BufNewFile,BufRead *.qbs set ft=qml - au BufNewFile,BufRead *.qml set ft=qml +if !has_key(s:disabled_packages, 'qml') + au BufNewFile,BufRead *.qbs setf qml + au BufNewFile,BufRead *.qml setf qml endif -if index(g:polyglot_disabled, 'r-lang') == -1 - au BufNewFile,BufRead *.S set ft=r - au BufNewFile,BufRead *.r set ft=r - au BufNewFile,BufRead *.rsx set ft=r - au BufNewFile,BufRead *.s set ft=r - au BufNewFile,BufRead {.,}Rprofile set ft=r - au BufNewFile,BufRead expr-dist set ft=r - au BufNewFile,BufRead *.rd set ft=rhelp +if !has_key(s:disabled_packages, 'r-lang') + au BufNewFile,BufRead *.S setf r + au BufNewFile,BufRead *.r setf r + au BufNewFile,BufRead *.rd setf r + au BufNewFile,BufRead *.rsx setf r + au BufNewFile,BufRead *.s setf r + au BufNewFile,BufRead {.,}Rprofile setf r + au BufNewFile,BufRead expr-dist setf r + au BufNewFile,BufRead *.rd setf rhelp endif -if index(g:polyglot_disabled, 'racket') == -1 - au BufNewFile,BufRead *.rkt set ft=racket - au BufNewFile,BufRead *.rktd set ft=racket - au BufNewFile,BufRead *.rktl set ft=racket - au BufNewFile,BufRead *.scrbl set ft=racket +if !has_key(s:disabled_packages, 'racket') + au BufNewFile,BufRead *.rkt setf racket + au BufNewFile,BufRead *.rktd setf racket + au BufNewFile,BufRead *.rktl setf racket + au BufNewFile,BufRead *.scrbl setf racket endif -if index(g:polyglot_disabled, 'ragel') == -1 - au BufNewFile,BufRead *.rl set ft=ragel +if !has_key(s:disabled_packages, 'ragel') + au BufNewFile,BufRead *.rl setf ragel endif -if index(g:polyglot_disabled, 'raku') == -1 - au BufNewFile,BufRead *.6pl set ft=raku - au BufNewFile,BufRead *.6pm set ft=raku - au BufNewFile,BufRead *.nqp set ft=raku - au BufNewFile,BufRead *.p6 set ft=raku - au BufNewFile,BufRead *.p6l set ft=raku - au BufNewFile,BufRead *.p6m set ft=raku +if !has_key(s:disabled_packages, 'raku') + au BufNewFile,BufRead *.6pl setf raku + au BufNewFile,BufRead *.6pm setf raku + au BufNewFile,BufRead *.nqp setf raku + au BufNewFile,BufRead *.p6 setf raku + au BufNewFile,BufRead *.p6l setf raku + au BufNewFile,BufRead *.p6m setf raku au BufNewFile,BufRead *.pl setf raku - au BufNewFile,BufRead *.pl6 set ft=raku + au BufNewFile,BufRead *.pl6 setf raku au BufNewFile,BufRead *.pm setf raku - au BufNewFile,BufRead *.pm6 set ft=raku - au BufNewFile,BufRead *.pod6 set ft=raku - au BufNewFile,BufRead *.raku set ft=raku - au BufNewFile,BufRead *.rakudoc set ft=raku - au BufNewFile,BufRead *.rakumod set ft=raku - au BufNewFile,BufRead *.rakutest set ft=raku + au BufNewFile,BufRead *.pm6 setf raku + au BufNewFile,BufRead *.pod6 setf raku + au BufNewFile,BufRead *.raku setf raku + au BufNewFile,BufRead *.rakudoc setf raku + au BufNewFile,BufRead *.rakumod setf raku + au BufNewFile,BufRead *.rakutest setf raku au BufNewFile,BufRead *.t setf raku - au BufNewFile,BufRead *.t6 set ft=raku + au BufNewFile,BufRead *.t6 setf raku endif -if index(g:polyglot_disabled, 'raml') == -1 - au BufNewFile,BufRead *.raml set ft=raml +if !has_key(s:disabled_packages, 'raml') + au BufNewFile,BufRead *.raml setf raml endif -if index(g:polyglot_disabled, 'razor') == -1 - au BufNewFile,BufRead *.cshtml set ft=razor - au BufNewFile,BufRead *.razor set ft=razor +if !has_key(s:disabled_packages, 'razor') + au BufNewFile,BufRead *.cshtml setf razor + au BufNewFile,BufRead *.razor setf razor endif -if index(g:polyglot_disabled, 'reason') == -1 - au BufNewFile,BufRead *.re set ft=reason - au BufNewFile,BufRead *.rei set ft=reason +if !has_key(s:disabled_packages, 'reason') + au BufNewFile,BufRead *.re setf reason + au BufNewFile,BufRead *.rei setf reason endif -if index(g:polyglot_disabled, 'rst') == -1 - au BufNewFile,BufRead *.rest set ft=rst - au BufNewFile,BufRead *.rest.txt set ft=rst - au BufNewFile,BufRead *.rst set ft=rst - au BufNewFile,BufRead *.rst.txt set ft=rst +if !has_key(s:disabled_packages, 'rst') + au BufNewFile,BufRead *.rest setf rst + au BufNewFile,BufRead *.rest.txt setf rst + au BufNewFile,BufRead *.rst setf rst + au BufNewFile,BufRead *.rst.txt setf rst endif -if index(g:polyglot_disabled, 'ruby') == -1 - au BufNewFile,BufRead *.axlsx set ft=ruby - au BufNewFile,BufRead *.builder set ft=ruby - au BufNewFile,BufRead *.cap set ft=ruby - au BufNewFile,BufRead *.eye set ft=ruby +if !has_key(s:disabled_packages, 'ruby') + au BufNewFile,BufRead *.axlsx setf ruby + au BufNewFile,BufRead *.builder setf ruby + au BufNewFile,BufRead *.cap setf ruby + au BufNewFile,BufRead *.eye setf ruby au BufNewFile,BufRead *.fcgi setf ruby - au BufNewFile,BufRead *.gemspec set ft=ruby - au BufNewFile,BufRead *.god set ft=ruby - au BufNewFile,BufRead *.jbuilder set ft=ruby - au BufNewFile,BufRead *.mspec set ft=ruby - au BufNewFile,BufRead *.opal set ft=ruby + au BufNewFile,BufRead *.gemspec setf ruby + au BufNewFile,BufRead *.god setf ruby + au BufNewFile,BufRead *.jbuilder setf ruby + au BufNewFile,BufRead *.mspec setf ruby + au BufNewFile,BufRead *.opal setf ruby au BufNewFile,BufRead *.pluginspec setf ruby - au BufNewFile,BufRead *.podspec set ft=ruby - au BufNewFile,BufRead *.rabl set ft=ruby - au BufNewFile,BufRead *.rake set ft=ruby - au BufNewFile,BufRead *.rant set ft=ruby - au BufNewFile,BufRead *.rb set ft=ruby - au BufNewFile,BufRead *.rbi set ft=ruby - au BufNewFile,BufRead *.rbuild set ft=ruby - au BufNewFile,BufRead *.rbw set ft=ruby - au BufNewFile,BufRead *.rbx set ft=ruby - au BufNewFile,BufRead *.rjs set ft=ruby - au BufNewFile,BufRead *.ru set ft=ruby - au BufNewFile,BufRead *.ruby set ft=ruby - au BufNewFile,BufRead *.rxml set ft=ruby + au BufNewFile,BufRead *.podspec setf ruby + au BufNewFile,BufRead *.rabl setf ruby + au BufNewFile,BufRead *.rake setf ruby + au BufNewFile,BufRead *.rant setf ruby + au BufNewFile,BufRead *.rb setf ruby + au BufNewFile,BufRead *.rbi setf ruby + au BufNewFile,BufRead *.rbuild setf ruby + au BufNewFile,BufRead *.rbw setf ruby + au BufNewFile,BufRead *.rbx setf ruby + au BufNewFile,BufRead *.rjs setf ruby + au BufNewFile,BufRead *.ru setf ruby + au BufNewFile,BufRead *.ruby setf ruby + au BufNewFile,BufRead *.rxml setf ruby au BufNewFile,BufRead *.spec setf ruby - au BufNewFile,BufRead *.thor set ft=ruby - au BufNewFile,BufRead *.watchr set ft=ruby - au BufNewFile,BufRead {.,}Brewfile set ft=ruby - au BufNewFile,BufRead {.,}Guardfile set ft=ruby - au BufNewFile,BufRead {.,}autotest set ft=ruby - au BufNewFile,BufRead {.,}irbrc set ft=ruby - au BufNewFile,BufRead {.,}pryrc set ft=ruby - au BufNewFile,BufRead {.,}simplecov set ft=ruby - au BufNewFile,BufRead Appraisals set ft=ruby - au BufNewFile,BufRead Berksfile set ft=ruby - au BufNewFile,BufRead Buildfile set ft=ruby - au BufNewFile,BufRead Capfile set ft=ruby - au BufNewFile,BufRead Cheffile set ft=ruby - au BufNewFile,BufRead Dangerfile set ft=ruby - au BufNewFile,BufRead Deliverfile set ft=ruby - au BufNewFile,BufRead Fastfile set ft=ruby - au BufNewFile,BufRead Gemfile set ft=ruby - au BufNewFile,BufRead Gemfile.lock set ft=ruby - au BufNewFile,BufRead Guardfile set ft=ruby - au BufNewFile,BufRead Jarfile set ft=ruby - au BufNewFile,BufRead KitchenSink set ft=ruby - au BufNewFile,BufRead Mavenfile set ft=ruby - au BufNewFile,BufRead Podfile set ft=ruby - au BufNewFile,BufRead Puppetfile set ft=ruby - au BufNewFile,BufRead Rakefile set ft=ruby - au BufNewFile,BufRead Rantfile set ft=ruby - au BufNewFile,BufRead Routefile set ft=ruby - au BufNewFile,BufRead Snapfile set ft=ruby - au BufNewFile,BufRead Thorfile set ft=ruby - au BufNewFile,BufRead Vagrantfile set ft=ruby - au BufNewFile,BufRead [Rr]akefile* set ft=ruby - au BufNewFile,BufRead buildfile set ft=ruby - au BufNewFile,BufRead vagrantfile set ft=ruby - au BufNewFile,BufRead *.erb set ft=eruby - au BufNewFile,BufRead *.erb.deface set ft=eruby - au BufNewFile,BufRead *.rhtml set ft=eruby -endif - -if index(g:polyglot_disabled, 'rspec') == -1 - au BufNewFile,BufRead *_spec.rb set ft=ruby syntax=rspec -endif - -if index(g:polyglot_disabled, 'yard') == -1 -endif - -if index(g:polyglot_disabled, 'brewfile') == -1 - au BufNewFile,BufRead Brewfile set ft=brewfile -endif - -if index(g:polyglot_disabled, 'rust') == -1 - au BufNewFile,BufRead *.rs set ft=rust - au BufNewFile,BufRead *.rs.in set ft=rust -endif - -if index(g:polyglot_disabled, 'scala') == -1 - au BufNewFile,BufRead *.kojo set ft=scala - au BufNewFile,BufRead *.sc set ft=scala - au BufNewFile,BufRead *.scala set ft=scala -endif - -if index(g:polyglot_disabled, 'sbt') == -1 - au BufNewFile,BufRead *.sbt set ft=sbt.scala -endif - -if index(g:polyglot_disabled, 'scss') == -1 - au BufNewFile,BufRead *.scss set ft=scss -endif - -if index(g:polyglot_disabled, 'sh') == -1 - au BufNewFile,BufRead *.bash set ft=sh - au BufNewFile,BufRead *.bats set ft=sh + au BufNewFile,BufRead *.thor setf ruby + au BufNewFile,BufRead *.watchr setf ruby + au BufNewFile,BufRead {.,}Brewfile setf ruby + au BufNewFile,BufRead {.,}Guardfile setf ruby + au BufNewFile,BufRead {.,}autotest setf ruby + au BufNewFile,BufRead {.,}irbrc setf ruby + au BufNewFile,BufRead {.,}pryrc setf ruby + au BufNewFile,BufRead {.,}simplecov setf ruby + au BufNewFile,BufRead Appraisals setf ruby + au BufNewFile,BufRead Berksfile setf ruby + au BufNewFile,BufRead Brewfile setf ruby + au BufNewFile,BufRead Buildfile setf ruby + au BufNewFile,BufRead Capfile setf ruby + au BufNewFile,BufRead Cheffile setf ruby + au BufNewFile,BufRead Dangerfile setf ruby + au BufNewFile,BufRead Deliverfile setf ruby + au BufNewFile,BufRead Fastfile setf ruby + au BufNewFile,BufRead Gemfile setf ruby + au BufNewFile,BufRead Gemfile.lock setf ruby + au BufNewFile,BufRead Guardfile setf ruby + au BufNewFile,BufRead Jarfile setf ruby + au BufNewFile,BufRead KitchenSink setf ruby + au BufNewFile,BufRead Mavenfile setf ruby + au BufNewFile,BufRead Podfile setf ruby + au BufNewFile,BufRead Puppetfile setf ruby + au BufNewFile,BufRead Rakefile setf ruby + au BufNewFile,BufRead Rantfile setf ruby + au BufNewFile,BufRead Routefile setf ruby + au BufNewFile,BufRead Snapfile setf ruby + au BufNewFile,BufRead Thorfile setf ruby + au BufNewFile,BufRead Vagrantfile setf ruby + au BufNewFile,BufRead [Rr]akefile* setf ruby + au BufNewFile,BufRead buildfile setf ruby + au BufNewFile,BufRead vagrantfile setf ruby + au BufNewFile,BufRead *.erb setf eruby + au BufNewFile,BufRead *.erb.deface setf eruby + au BufNewFile,BufRead *.rhtml setf eruby +endif + +if !has_key(s:disabled_packages, 'rspec') + au BufNewFile,BufRead *_spec.rb if !did_filetype() | set ft=ruby syntax=rspec | endif +endif + +if !has_key(s:disabled_packages, 'yard') +endif + +if !has_key(s:disabled_packages, 'brewfile') + au BufNewFile,BufRead Brewfile setf brewfile +endif + +if !has_key(s:disabled_packages, 'rust') + au BufNewFile,BufRead *.rs setf rust + au BufNewFile,BufRead *.rs.in setf rust +endif + +if !has_key(s:disabled_packages, 'scala') + au BufNewFile,BufRead *.kojo setf scala + au BufNewFile,BufRead *.sbt setf scala + au BufNewFile,BufRead *.sc setf scala + au BufNewFile,BufRead *.scala setf scala +endif + +if !has_key(s:disabled_packages, 'sbt') + au BufNewFile,BufRead *.sbt setf sbt.scala +endif + +if !has_key(s:disabled_packages, 'scss') + au BufNewFile,BufRead *.scss setf scss +endif + +if !has_key(s:disabled_packages, 'sh') + au BufNewFile,BufRead *.bash setf sh + au BufNewFile,BufRead *.bats setf sh au BufNewFile,BufRead *.cgi setf sh - au BufNewFile,BufRead *.command set ft=sh - au BufNewFile,BufRead *.env set ft=sh + au BufNewFile,BufRead *.command setf sh + au BufNewFile,BufRead *.env setf sh au BufNewFile,BufRead *.fcgi setf sh - au BufNewFile,BufRead *.ksh set ft=sh - au BufNewFile,BufRead *.sh set ft=sh - au BufNewFile,BufRead *.sh.in set ft=sh - au BufNewFile,BufRead *.tmux set ft=sh - au BufNewFile,BufRead *.tool set ft=sh - au BufNewFile,BufRead {.,}bash_aliases set ft=sh - au BufNewFile,BufRead {.,}bash_history set ft=sh - au BufNewFile,BufRead {.,}bash_logout set ft=sh - au BufNewFile,BufRead {.,}bash_profile set ft=sh - au BufNewFile,BufRead {.,}bashrc set ft=sh - au BufNewFile,BufRead {.,}cshrc set ft=sh - au BufNewFile,BufRead {.,}env set ft=sh - au BufNewFile,BufRead {.,}env.example set ft=sh - au BufNewFile,BufRead {.,}flaskenv set ft=sh - au BufNewFile,BufRead {.,}login set ft=sh - au BufNewFile,BufRead {.,}profile set ft=sh - au BufNewFile,BufRead 9fs set ft=sh - au BufNewFile,BufRead PKGBUILD set ft=sh - au BufNewFile,BufRead bash_aliases set ft=sh - au BufNewFile,BufRead bash_logout set ft=sh - au BufNewFile,BufRead bash_profile set ft=sh - au BufNewFile,BufRead bashrc set ft=sh - au BufNewFile,BufRead cshrc set ft=sh - au BufNewFile,BufRead gradlew set ft=sh - au BufNewFile,BufRead login set ft=sh - au BufNewFile,BufRead man set ft=sh - au BufNewFile,BufRead profile set ft=sh - au BufNewFile,BufRead *.zsh set ft=zsh - au BufNewFile,BufRead {.,}zlogin set ft=zsh - au BufNewFile,BufRead {.,}zlogout set ft=zsh - au BufNewFile,BufRead {.,}zprofile set ft=zsh - au BufNewFile,BufRead {.,}zshenv set ft=zsh - au BufNewFile,BufRead {.,}zshrc set ft=zsh + au BufNewFile,BufRead *.ksh setf sh + au BufNewFile,BufRead *.sh setf sh + au BufNewFile,BufRead *.sh.in setf sh + au BufNewFile,BufRead *.tmux setf sh + au BufNewFile,BufRead *.tool setf sh + au BufNewFile,BufRead *.zsh setf sh + au BufNewFile,BufRead {.,}bash_aliases setf sh + au BufNewFile,BufRead {.,}bash_history setf sh + au BufNewFile,BufRead {.,}bash_logout setf sh + au BufNewFile,BufRead {.,}bash_profile setf sh + au BufNewFile,BufRead {.,}bashrc setf sh + au BufNewFile,BufRead {.,}cshrc setf sh + au BufNewFile,BufRead {.,}env setf sh + au BufNewFile,BufRead {.,}env.example setf sh + au BufNewFile,BufRead {.,}flaskenv setf sh + au BufNewFile,BufRead {.,}login setf sh + au BufNewFile,BufRead {.,}profile setf sh + au BufNewFile,BufRead {.,}zlogin setf sh + au BufNewFile,BufRead {.,}zlogout setf sh + au BufNewFile,BufRead {.,}zprofile setf sh + au BufNewFile,BufRead {.,}zshenv setf sh + au BufNewFile,BufRead {.,}zshrc setf sh + au BufNewFile,BufRead 9fs setf sh + au BufNewFile,BufRead PKGBUILD setf sh + au BufNewFile,BufRead bash_aliases setf sh + au BufNewFile,BufRead bash_logout setf sh + au BufNewFile,BufRead bash_profile setf sh + au BufNewFile,BufRead bashrc setf sh + au BufNewFile,BufRead cshrc setf sh + au BufNewFile,BufRead gradlew setf sh + au BufNewFile,BufRead login setf sh + au BufNewFile,BufRead man setf sh + au BufNewFile,BufRead profile setf sh + au BufNewFile,BufRead zlogin setf sh + au BufNewFile,BufRead zlogout setf sh + au BufNewFile,BufRead zprofile setf sh + au BufNewFile,BufRead zshenv setf sh + au BufNewFile,BufRead zshrc setf sh + au BufNewFile,BufRead *.zsh setf zsh + au BufNewFile,BufRead {.,}zlogin setf zsh + au BufNewFile,BufRead {.,}zlogout setf zsh + au BufNewFile,BufRead {.,}zprofile setf zsh + au BufNewFile,BufRead {.,}zshenv setf zsh + au BufNewFile,BufRead {.,}zshrc setf zsh endif -if index(g:polyglot_disabled, 'zinit') == -1 +if !has_key(s:disabled_packages, 'zinit') endif -if index(g:polyglot_disabled, 'slim') == -1 - au BufNewFile,BufRead *.slim set ft=slim +if !has_key(s:disabled_packages, 'slim') + au BufNewFile,BufRead *.slim setf slim endif -if index(g:polyglot_disabled, 'slime') == -1 - au BufNewFile,BufRead *.slime set ft=slime +if !has_key(s:disabled_packages, 'slime') + au BufNewFile,BufRead *.slime setf slime endif -if index(g:polyglot_disabled, 'smt2') == -1 - au BufNewFile,BufRead *.smt set ft=smt2 - au BufNewFile,BufRead *.smt2 set ft=smt2 +if !has_key(s:disabled_packages, 'smt2') + au BufNewFile,BufRead *.smt setf smt2 + au BufNewFile,BufRead *.smt2 setf smt2 endif -if index(g:polyglot_disabled, 'solidity') == -1 - au BufNewFile,BufRead *.sol set ft=solidity +if !has_key(s:disabled_packages, 'solidity') + au BufNewFile,BufRead *.sol setf solidity endif -if index(g:polyglot_disabled, 'stylus') == -1 - au BufNewFile,BufRead *.styl set ft=stylus - au BufNewFile,BufRead *.stylus set ft=stylus +if !has_key(s:disabled_packages, 'stylus') + au BufNewFile,BufRead *.styl setf stylus + au BufNewFile,BufRead *.stylus setf stylus endif -if index(g:polyglot_disabled, 'svelte') == -1 - au BufNewFile,BufRead *.svelte set ft=svelte +if !has_key(s:disabled_packages, 'svelte') + au BufNewFile,BufRead *.svelte setf svelte endif -if index(g:polyglot_disabled, 'svg') == -1 - au BufNewFile,BufRead *.svg set ft=svg +if !has_key(s:disabled_packages, 'svg') + au BufNewFile,BufRead *.svg setf svg endif -if index(g:polyglot_disabled, 'svg-indent') == -1 +if !has_key(s:disabled_packages, 'svg-indent') endif -if index(g:polyglot_disabled, 'swift') == -1 - au BufNewFile,BufRead *.swift set ft=swift +if !has_key(s:disabled_packages, 'swift') + au BufNewFile,BufRead *.swift setf swift endif -if index(g:polyglot_disabled, 'sxhkd') == -1 - au BufNewFile,BufRead *.sxhkdrc set ft=sxhkdrc - au BufNewFile,BufRead sxhkdrc set ft=sxhkdrc +if !has_key(s:disabled_packages, 'sxhkd') + au BufNewFile,BufRead *.sxhkdrc setf sxhkdrc + au BufNewFile,BufRead sxhkdrc setf sxhkdrc endif -if index(g:polyglot_disabled, 'systemd') == -1 - au BufNewFile,BufRead *.automount set ft=systemd - au BufNewFile,BufRead *.mount set ft=systemd - au BufNewFile,BufRead *.path set ft=systemd - au BufNewFile,BufRead *.service set ft=systemd - au BufNewFile,BufRead *.socket set ft=systemd - au BufNewFile,BufRead *.swap set ft=systemd - au BufNewFile,BufRead *.target set ft=systemd - au BufNewFile,BufRead *.timer set ft=systemd +if !has_key(s:disabled_packages, 'systemd') + au BufNewFile,BufRead *.automount setf systemd + au BufNewFile,BufRead *.mount setf systemd + au BufNewFile,BufRead *.path setf systemd + au BufNewFile,BufRead *.service setf systemd + au BufNewFile,BufRead *.socket setf systemd + au BufNewFile,BufRead *.swap setf systemd + au BufNewFile,BufRead *.target setf systemd + au BufNewFile,BufRead *.timer setf systemd endif -if index(g:polyglot_disabled, 'terraform') == -1 +if !has_key(s:disabled_packages, 'terraform') au BufNewFile,BufRead *.hcl setf terraform - au BufNewFile,BufRead *.tf set ft=terraform - au BufNewFile,BufRead *.tfvars set ft=terraform + au BufNewFile,BufRead *.tf setf terraform + au BufNewFile,BufRead *.tfvars setf terraform au BufNewFile,BufRead *.workflow setf terraform endif -if index(g:polyglot_disabled, 'textile') == -1 - au BufNewFile,BufRead *.textile set ft=textile +if !has_key(s:disabled_packages, 'textile') + au BufNewFile,BufRead *.textile setf textile endif -if index(g:polyglot_disabled, 'thrift') == -1 - au BufNewFile,BufRead *.thrift set ft=thrift +if !has_key(s:disabled_packages, 'thrift') + au BufNewFile,BufRead *.thrift setf thrift endif -if index(g:polyglot_disabled, 'tmux') == -1 - au BufNewFile,BufRead {.,}tmux.conf set ft=tmux +if !has_key(s:disabled_packages, 'tmux') + au BufNewFile,BufRead {.,}tmux.conf setf tmux endif -if index(g:polyglot_disabled, 'toml') == -1 - au BufNewFile,BufRead *.toml set ft=toml - au BufNewFile,BufRead */.cargo/config set ft=toml - au BufNewFile,BufRead */.cargo/credentials set ft=toml - au BufNewFile,BufRead Cargo.lock set ft=toml - au BufNewFile,BufRead Gopkg.lock set ft=toml - au BufNewFile,BufRead Pipfile set ft=toml - au BufNewFile,BufRead poetry.lock set ft=toml +if !has_key(s:disabled_packages, 'toml') + au BufNewFile,BufRead *.toml setf toml + au BufNewFile,BufRead */.cargo/config setf toml + au BufNewFile,BufRead */.cargo/credentials setf toml + au BufNewFile,BufRead Cargo.lock setf toml + au BufNewFile,BufRead Gopkg.lock setf toml + au BufNewFile,BufRead Pipfile setf toml + au BufNewFile,BufRead poetry.lock setf toml endif -if index(g:polyglot_disabled, 'tptp') == -1 - au BufNewFile,BufRead *.ax set ft=tptp +if !has_key(s:disabled_packages, 'tptp') + au BufNewFile,BufRead *.ax setf tptp au BufNewFile,BufRead *.p setf tptp - au BufNewFile,BufRead *.tptp set ft=tptp + au BufNewFile,BufRead *.tptp setf tptp +endif + +if !has_key(s:disabled_packages, 'twig') + au BufNewFile,BufRead *.twig setf html.twig + au BufNewFile,BufRead *.xml.twig setf xml.twig endif -if index(g:polyglot_disabled, 'twig') == -1 - au BufNewFile,BufRead *.twig set ft=html.twig - au BufNewFile,BufRead *.xml.twig set ft=xml.twig +if !has_key(s:disabled_packages, 'typescript') + au BufNewFile,BufRead *.ts setf typescript + au BufNewFile,BufRead *.tsx setf typescriptreact endif -if index(g:polyglot_disabled, 'typescript') == -1 - au BufNewFile,BufRead *.ts set ft=typescript - au BufNewFile,BufRead *.tsx set ft=typescriptreact +if !has_key(s:disabled_packages, 'unison') + au BufNewFile,BufRead *.u setf unison + au BufNewFile,BufRead *.uu setf unison endif -if index(g:polyglot_disabled, 'unison') == -1 - au BufNewFile,BufRead *.u set ft=unison - au BufNewFile,BufRead *.uu set ft=unison +if !has_key(s:disabled_packages, 'v') + au BufNewFile,BufRead *.v setf v endif -if index(g:polyglot_disabled, 'v') == -1 - au BufNewFile,BufRead *.v set ft=v +if !has_key(s:disabled_packages, 'vala') + au BufNewFile,BufRead *.vala setf vala + au BufNewFile,BufRead *.valadoc setf vala + au BufNewFile,BufRead *.vapi setf vala endif -if index(g:polyglot_disabled, 'vala') == -1 - au BufNewFile,BufRead *.vala set ft=vala - au BufNewFile,BufRead *.valadoc set ft=vala - au BufNewFile,BufRead *.vapi set ft=vala +if !has_key(s:disabled_packages, 'vbnet') + au BufNewFile,BufRead *.vb setf vbnet + au BufNewFile,BufRead *.vbhtml setf vbnet endif -if index(g:polyglot_disabled, 'vbnet') == -1 - au BufNewFile,BufRead *.vb set ft=vbnet - au BufNewFile,BufRead *.vbhtml set ft=vbnet +if !has_key(s:disabled_packages, 'vcl') + au BufNewFile,BufRead *.vcl setf vcl endif -if index(g:polyglot_disabled, 'vcl') == -1 - au BufNewFile,BufRead *.vcl set ft=vcl +if !has_key(s:disabled_packages, 'velocity') + au BufNewFile,BufRead *.vm setf velocity endif -if index(g:polyglot_disabled, 'velocity') == -1 - au BufNewFile,BufRead *.vm set ft=velocity +if !has_key(s:disabled_packages, 'vmasm') + au BufNewFile,BufRead *.mar setf vmasm endif -if index(g:polyglot_disabled, 'vue') == -1 - au BufNewFile,BufRead *.vue set ft=vue - au BufNewFile,BufRead *.wpy set ft=vue +if !has_key(s:disabled_packages, 'vue') + au BufNewFile,BufRead *.vue setf vue + au BufNewFile,BufRead *.wpy setf vue endif -if index(g:polyglot_disabled, 'xdc') == -1 - au BufNewFile,BufRead *.xdc set ft=xdc +if !has_key(s:disabled_packages, 'xdc') + au BufNewFile,BufRead *.xdc setf xdc endif -if index(g:polyglot_disabled, 'xml') == -1 - au BufNewFile,BufRead *.adml set ft=xml - au BufNewFile,BufRead *.admx set ft=xml - au BufNewFile,BufRead *.ant set ft=xml - au BufNewFile,BufRead *.axml set ft=xml - au BufNewFile,BufRead *.builds set ft=xml - au BufNewFile,BufRead *.ccproj set ft=xml - au BufNewFile,BufRead *.ccxml set ft=xml - au BufNewFile,BufRead *.cdxml set ft=xml - au BufNewFile,BufRead *.clixml set ft=xml - au BufNewFile,BufRead *.cproject set ft=xml - au BufNewFile,BufRead *.cscfg set ft=xml - au BufNewFile,BufRead *.csdef set ft=xml - au BufNewFile,BufRead *.csl set ft=xml - au BufNewFile,BufRead *.csproj set ft=xml - au BufNewFile,BufRead *.ct set ft=xml - au BufNewFile,BufRead *.depproj set ft=xml - au BufNewFile,BufRead *.dita set ft=xml - au BufNewFile,BufRead *.ditamap set ft=xml - au BufNewFile,BufRead *.ditaval set ft=xml - au BufNewFile,BufRead *.dll.config set ft=xml - au BufNewFile,BufRead *.dotsettings set ft=xml - au BufNewFile,BufRead *.filters set ft=xml - au BufNewFile,BufRead *.fsproj set ft=xml - au BufNewFile,BufRead *.fxml set ft=xml - au BufNewFile,BufRead *.glade set ft=xml - au BufNewFile,BufRead *.gml set ft=xml - au BufNewFile,BufRead *.gmx set ft=xml - au BufNewFile,BufRead *.grxml set ft=xml - au BufNewFile,BufRead *.iml set ft=xml - au BufNewFile,BufRead *.ivy set ft=xml - au BufNewFile,BufRead *.jelly set ft=xml - au BufNewFile,BufRead *.jsproj set ft=xml - au BufNewFile,BufRead *.kml set ft=xml - au BufNewFile,BufRead *.launch set ft=xml - au BufNewFile,BufRead *.mdpolicy set ft=xml - au BufNewFile,BufRead *.mjml set ft=xml - au BufNewFile,BufRead *.mm set ft=xml +if !has_key(s:disabled_packages, 'xml') + au BufNewFile,BufRead *.adml setf xml + au BufNewFile,BufRead *.admx setf xml + au BufNewFile,BufRead *.ant setf xml + au BufNewFile,BufRead *.axml setf xml + au BufNewFile,BufRead *.builds setf xml + au BufNewFile,BufRead *.ccproj setf xml + au BufNewFile,BufRead *.ccxml setf xml + au BufNewFile,BufRead *.cdxml setf xml + au BufNewFile,BufRead *.clixml setf xml + au BufNewFile,BufRead *.cproject setf xml + au BufNewFile,BufRead *.cscfg setf xml + au BufNewFile,BufRead *.csdef setf xml + au BufNewFile,BufRead *.csl setf xml + au BufNewFile,BufRead *.csproj setf xml + au BufNewFile,BufRead *.ct setf xml + au BufNewFile,BufRead *.depproj setf xml + au BufNewFile,BufRead *.dita setf xml + au BufNewFile,BufRead *.ditamap setf xml + au BufNewFile,BufRead *.ditaval setf xml + au BufNewFile,BufRead *.dll.config setf xml + au BufNewFile,BufRead *.dotsettings setf xml + au BufNewFile,BufRead *.filters setf xml + au BufNewFile,BufRead *.fsproj setf xml + au BufNewFile,BufRead *.fxml setf xml + au BufNewFile,BufRead *.glade setf xml + au BufNewFile,BufRead *.gml setf xml + au BufNewFile,BufRead *.gmx setf xml + au BufNewFile,BufRead *.grxml setf xml + au BufNewFile,BufRead *.iml setf xml + au BufNewFile,BufRead *.ivy setf xml + au BufNewFile,BufRead *.jelly setf xml + au BufNewFile,BufRead *.jsproj setf xml + au BufNewFile,BufRead *.kml setf xml + au BufNewFile,BufRead *.launch setf xml + au BufNewFile,BufRead *.mdpolicy setf xml + au BufNewFile,BufRead *.mjml setf xml + au BufNewFile,BufRead *.mm setf xml au BufNewFile,BufRead *.mod setf xml - au BufNewFile,BufRead *.mxml set ft=xml - au BufNewFile,BufRead *.natvis set ft=xml - au BufNewFile,BufRead *.ncl set ft=xml - au BufNewFile,BufRead *.ndproj set ft=xml - au BufNewFile,BufRead *.nproj set ft=xml - au BufNewFile,BufRead *.nuspec set ft=xml - au BufNewFile,BufRead *.odd set ft=xml - au BufNewFile,BufRead *.osm set ft=xml - au BufNewFile,BufRead *.pkgproj set ft=xml + au BufNewFile,BufRead *.mxml setf xml + au BufNewFile,BufRead *.natvis setf xml + au BufNewFile,BufRead *.ncl setf xml + au BufNewFile,BufRead *.ndproj setf xml + au BufNewFile,BufRead *.nproj setf xml + au BufNewFile,BufRead *.nuspec setf xml + au BufNewFile,BufRead *.odd setf xml + au BufNewFile,BufRead *.osm setf xml + au BufNewFile,BufRead *.pkgproj setf xml au BufNewFile,BufRead *.pluginspec setf xml - au BufNewFile,BufRead *.proj set ft=xml - au BufNewFile,BufRead *.props set ft=xml + au BufNewFile,BufRead *.proj setf xml + au BufNewFile,BufRead *.props setf xml au BufNewFile,BufRead *.ps1xml setf xml - au BufNewFile,BufRead *.psc1 set ft=xml - au BufNewFile,BufRead *.pt set ft=xml - au BufNewFile,BufRead *.rdf set ft=xml - au BufNewFile,BufRead *.resx set ft=xml - au BufNewFile,BufRead *.rss set ft=xml - au BufNewFile,BufRead *.sch set ft=xml - au BufNewFile,BufRead *.scxml set ft=xml - au BufNewFile,BufRead *.sfproj set ft=xml - au BufNewFile,BufRead *.shproj set ft=xml - au BufNewFile,BufRead *.srdf set ft=xml - au BufNewFile,BufRead *.storyboard set ft=xml - au BufNewFile,BufRead *.sublime-snippet set ft=xml - au BufNewFile,BufRead *.targets set ft=xml - au BufNewFile,BufRead *.tml set ft=xml - au BufNewFile,BufRead *.ui set ft=xml - au BufNewFile,BufRead *.urdf set ft=xml - au BufNewFile,BufRead *.ux set ft=xml - au BufNewFile,BufRead *.vbproj set ft=xml - au BufNewFile,BufRead *.vcxproj set ft=xml - au BufNewFile,BufRead *.vsixmanifest set ft=xml - au BufNewFile,BufRead *.vssettings set ft=xml - au BufNewFile,BufRead *.vstemplate set ft=xml - au BufNewFile,BufRead *.vxml set ft=xml - au BufNewFile,BufRead *.wixproj set ft=xml + au BufNewFile,BufRead *.psc1 setf xml + au BufNewFile,BufRead *.pt setf xml + au BufNewFile,BufRead *.rdf setf xml + au BufNewFile,BufRead *.resx setf xml + au BufNewFile,BufRead *.rss setf xml + au BufNewFile,BufRead *.sch setf xml + au BufNewFile,BufRead *.scxml setf xml + au BufNewFile,BufRead *.sfproj setf xml + au BufNewFile,BufRead *.shproj setf xml + au BufNewFile,BufRead *.srdf setf xml + au BufNewFile,BufRead *.storyboard setf xml + au BufNewFile,BufRead *.sublime-snippet setf xml + au BufNewFile,BufRead *.targets setf xml + au BufNewFile,BufRead *.tml setf xml + au BufNewFile,BufRead *.ts setf xml + au BufNewFile,BufRead *.tsx setf xml + au BufNewFile,BufRead *.ui setf xml + au BufNewFile,BufRead *.urdf setf xml + au BufNewFile,BufRead *.ux setf xml + au BufNewFile,BufRead *.vbproj setf xml + au BufNewFile,BufRead *.vcxproj setf xml + au BufNewFile,BufRead *.vsixmanifest setf xml + au BufNewFile,BufRead *.vssettings setf xml + au BufNewFile,BufRead *.vstemplate setf xml + au BufNewFile,BufRead *.vxml setf xml + au BufNewFile,BufRead *.wixproj setf xml au BufNewFile,BufRead *.workflow setf xml - au BufNewFile,BufRead *.wsdl set ft=xml - au BufNewFile,BufRead *.wsf set ft=xml - au BufNewFile,BufRead *.wxi set ft=xml - au BufNewFile,BufRead *.wxl set ft=xml - au BufNewFile,BufRead *.wxs set ft=xml - au BufNewFile,BufRead *.x3d set ft=xml - au BufNewFile,BufRead *.xacro set ft=xml - au BufNewFile,BufRead *.xaml set ft=xml - au BufNewFile,BufRead *.xib set ft=xml - au BufNewFile,BufRead *.xlf set ft=xml - au BufNewFile,BufRead *.xliff set ft=xml - au BufNewFile,BufRead *.xmi set ft=xml - au BufNewFile,BufRead *.xml set ft=xml - au BufNewFile,BufRead *.xml.dist set ft=xml - au BufNewFile,BufRead *.xproj set ft=xml - au BufNewFile,BufRead *.xsd set ft=xml - au BufNewFile,BufRead *.xspec set ft=xml - au BufNewFile,BufRead *.xul set ft=xml - au BufNewFile,BufRead *.zcml set ft=xml - au BufNewFile,BufRead {.,}classpath set ft=xml - au BufNewFile,BufRead {.,}cproject set ft=xml - au BufNewFile,BufRead {.,}project set ft=xml - au BufNewFile,BufRead App.config set ft=xml - au BufNewFile,BufRead NuGet.config set ft=xml - au BufNewFile,BufRead Settings.StyleCop set ft=xml - au BufNewFile,BufRead Web.Debug.config set ft=xml - au BufNewFile,BufRead Web.Release.config set ft=xml - au BufNewFile,BufRead Web.config set ft=xml - au BufNewFile,BufRead packages.config set ft=xml -endif - -if index(g:polyglot_disabled, 'xsl') == -1 - au BufNewFile,BufRead *.xsl set ft=xsl - au BufNewFile,BufRead *.xslt set ft=xsl -endif - -if index(g:polyglot_disabled, 'yaml') == -1 - au BufNewFile,BufRead *.mir set ft=yaml - au BufNewFile,BufRead *.reek set ft=yaml - au BufNewFile,BufRead *.rviz set ft=yaml - au BufNewFile,BufRead *.sublime-syntax set ft=yaml - au BufNewFile,BufRead *.syntax set ft=yaml - au BufNewFile,BufRead *.yaml set ft=yaml - au BufNewFile,BufRead *.yaml-tmlanguage set ft=yaml - au BufNewFile,BufRead *.yaml.sed set ft=yaml - au BufNewFile,BufRead *.yml set ft=yaml - au BufNewFile,BufRead *.yml.mysql set ft=yaml - au BufNewFile,BufRead {.,}clang-format set ft=yaml - au BufNewFile,BufRead {.,}clang-tidy set ft=yaml - au BufNewFile,BufRead {.,}gemrc set ft=yaml - au BufNewFile,BufRead fish_history set ft=yaml - au BufNewFile,BufRead fish_read_history set ft=yaml - au BufNewFile,BufRead glide.lock set ft=yaml - au BufNewFile,BufRead yarn.lock set ft=yaml -endif - -if index(g:polyglot_disabled, 'ansible') == -1 - au BufNewFile,BufRead group_vars/* set ft=yaml.ansible - au BufNewFile,BufRead handlers.*.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead host_vars/* set ft=yaml.ansible - au BufNewFile,BufRead local.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead main.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead playbook.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead requirements.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead roles.*.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead site.y{a,}ml set ft=yaml.ansible - au BufNewFile,BufRead tasks.*.y{a,}ml set ft=yaml.ansible -endif - -if index(g:polyglot_disabled, 'helm') == -1 - au BufNewFile,BufRead */templates/*.tpl set ft=helm - au BufNewFile,BufRead */templates/*.yaml set ft=helm -endif - -if index(g:polyglot_disabled, 'zephir') == -1 - au BufNewFile,BufRead *.zep set ft=zephir -endif - -if index(g:polyglot_disabled, 'zig') == -1 - au BufNewFile,BufRead *.zig set ft=zig - au BufNewFile,BufRead *.zir setf zig + au BufNewFile,BufRead *.wsdl setf xml + au BufNewFile,BufRead *.wsf setf xml + au BufNewFile,BufRead *.wxi setf xml + au BufNewFile,BufRead *.wxl setf xml + au BufNewFile,BufRead *.wxs setf xml + au BufNewFile,BufRead *.x3d setf xml + au BufNewFile,BufRead *.xacro setf xml + au BufNewFile,BufRead *.xaml setf xml + au BufNewFile,BufRead *.xib setf xml + au BufNewFile,BufRead *.xlf setf xml + au BufNewFile,BufRead *.xliff setf xml + au BufNewFile,BufRead *.xmi setf xml + au BufNewFile,BufRead *.xml setf xml + au BufNewFile,BufRead *.xml.dist setf xml + au BufNewFile,BufRead *.xproj setf xml + au BufNewFile,BufRead *.xsd setf xml + au BufNewFile,BufRead *.xspec setf xml + au BufNewFile,BufRead *.xul setf xml + au BufNewFile,BufRead *.zcml setf xml + au BufNewFile,BufRead {.,}classpath setf xml + au BufNewFile,BufRead {.,}cproject setf xml + au BufNewFile,BufRead {.,}project setf xml + au BufNewFile,BufRead App.config setf xml + au BufNewFile,BufRead NuGet.config setf xml + au BufNewFile,BufRead Settings.StyleCop setf xml + au BufNewFile,BufRead Web.Debug.config setf xml + au BufNewFile,BufRead Web.Release.config setf xml + au BufNewFile,BufRead Web.config setf xml + au BufNewFile,BufRead packages.config setf xml +endif + +if !has_key(s:disabled_packages, 'xsl') + au BufNewFile,BufRead *.xsl setf xsl + au BufNewFile,BufRead *.xslt setf xsl +endif + +if !has_key(s:disabled_packages, 'ansible') + au BufNewFile,BufRead group_vars/* setf yaml.ansible + au BufNewFile,BufRead handlers.*.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead host_vars/* setf yaml.ansible + au BufNewFile,BufRead local.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead main.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead playbook.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead requirements.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead roles.*.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead site.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead tasks.*.y{a,}ml setf yaml.ansible +endif + +if !has_key(s:disabled_packages, 'yaml') + au BufNewFile,BufRead *.mir setf yaml + au BufNewFile,BufRead *.reek setf yaml + au BufNewFile,BufRead *.rviz setf yaml + au BufNewFile,BufRead *.sublime-syntax setf yaml + au BufNewFile,BufRead *.syntax setf yaml + au BufNewFile,BufRead *.yaml setf yaml + au BufNewFile,BufRead *.yaml-tmlanguage setf yaml + au BufNewFile,BufRead *.yaml.sed setf yaml + au BufNewFile,BufRead *.yml setf yaml + au BufNewFile,BufRead *.yml.mysql setf yaml + au BufNewFile,BufRead {.,}clang-format setf yaml + au BufNewFile,BufRead {.,}clang-tidy setf yaml + au BufNewFile,BufRead {.,}gemrc setf yaml + au BufNewFile,BufRead fish_history setf yaml + au BufNewFile,BufRead fish_read_history setf yaml + au BufNewFile,BufRead glide.lock setf yaml + au BufNewFile,BufRead yarn.lock setf yaml +endif + +if !has_key(s:disabled_packages, 'helm') + au BufNewFile,BufRead */templates/*.tpl setf helm + au BufNewFile,BufRead */templates/*.yaml setf helm +endif + +if !has_key(s:disabled_packages, 'help') + au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help +endif + +if !has_key(s:disabled_packages, 'zephir') + au BufNewFile,BufRead *.zep setf zephir +endif + +if !has_key(s:disabled_packages, 'zig') au BufNewFile,BufRead *.zir setf zir + au BufNewFile,BufRead *.zig setf zig + au BufNewFile,BufRead *.zir setf zig endif +if !has_key(s:disabled_packages, 'trasys') + au! BufNewFile,BufRead *.inp call polyglot#DetectInpFiletype() +endif + +au BufNewFile,BufRead,StdinReadPost * + \ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat + \ | call polyglot#Heuristics() | endif + " restore Vi compatibility settings let &cpo = s:cpo_save unlet s:cpo_save diff --git a/ftplugin/8th.vim b/ftplugin/8th.vim new file mode 100644 index 00000000..29c08c5e --- /dev/null +++ b/ftplugin/8th.vim @@ -0,0 +1,29 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 + +" Vim ftplugin file +" Language: 8th +" Version: any +" Last Change: 2015/11/08 +" Maintainer: Ron Aaron <ron@aaron-tech.com> +" URL: https://8th-dev.com/ +" Filetypes: *.8th +" NOTE: 8th allows any non-whitespace in a name, so you need to do: +" setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +" This goes with the syntax/8th.vim file. + +" Only do this when not done yet for this buffer +if exists("b:did_8thplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_8thplugin = 1 + +setlocal ts=2 sts=2 sw=2 et +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 +setlocal suffixesadd=.8th + +endif diff --git a/ftplugin/a2ps.vim b/ftplugin/a2ps.vim new file mode 100644 index 00000000..1274e83a --- /dev/null +++ b/ftplugin/a2ps.vim @@ -0,0 +1,24 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 + +" Vim filetype plugin file +" Language: a2ps(1) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< inc< fo<" + +setlocal comments=:# commentstring=#\ %s include=^\\s*Include: +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 new file mode 100644 index 00000000..d163c5bb --- /dev/null +++ b/ftplugin/aap.vim @@ -0,0 +1,29 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 + +" Vim filetype plugin file +" Language: Aap recipe +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2013 Apr 05 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Reset 'formatoptions', 'comments' and 'expandtab' to undo this plugin. +let b:undo_ftplugin = "setl fo< com< et<" + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting <CR> or using "o". +setlocal fo-=t fo+=croql + +" Set 'comments' to format dashed lists in comments. +setlocal 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 new file mode 100644 index 00000000..1c1631c0 --- /dev/null +++ b/ftplugin/abap.vim @@ -0,0 +1,33 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 + +" Vim filetype plugin file +" Language: ABAP +" Author: Steven Oliver <oliver.steven@gmail.com> +" Copyright: Copyright (c) 2013 Steven Oliver +" License: You may redistribute this under the same terms as Vim itself +" -------------------------------------------------------------------------- + +" Only do this when not done yet for this buffer +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +setlocal softtabstop=2 shiftwidth=2 +setlocal suffixesadd=.abap + +" Windows allows you to filter the open file dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "ABAP Source Files (*.abap)\t*.abap\n" . + \ "All Files (*.*)\t*.*\n" +endif + +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 new file mode 100644 index 00000000..efa42dda --- /dev/null +++ b/ftplugin/abaqus.vim @@ -0,0 +1,101 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 + +" Vim filetype plugin file +" Language: Abaqus finite element input file (www.abaqus.com) +" Maintainer: Carl Osterwisch <osterwischc@asme.org> +" Last Change: 2012 Apr 30 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") | finish | endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Save the compatibility options and temporarily switch to vim defaults +let s:cpo_save = &cpoptions +set cpoptions&vim + +" Set the format of the include file specification for Abaqus +" Used in :check gf ^wf [i and other commands +setlocal include=\\<\\cINPUT\\s*= + +" Remove characters up to the first = when evaluating filenames +setlocal includeexpr=substitute(v:fname,'.\\{-}=','','') + +" Remove comma from valid filename characters since it is used to +" separate keyword parameters +setlocal isfname-=, + +" Define format of comment lines (see 'formatoptions' for uses) +setlocal comments=:** +setlocal commentstring=**%s + +" Definitions start with a * and assign a NAME, NSET, or ELSET +" Used in [d ^wd and other commands +setlocal define=^\\*\\a.*\\c\\(NAME\\\|NSET\\\|ELSET\\)\\s*= + +" Abaqus keywords and identifiers may include a - character +setlocal iskeyword+=- + +let b:undo_ftplugin = "setlocal include< includeexpr< isfname<" + \ . " comments< commentstring< define< iskeyword<" + +if has("folding") + " Fold all lines that do not begin with * + setlocal foldexpr=getline(v:lnum)[0]!=\"\*\" + setlocal foldmethod=expr + let b:undo_ftplugin .= " foldexpr< foldmethod<" +endif + +" Set the file browse filter (currently only supported under Win32 gui) +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "Abaqus Input Files (*.inp *.inc)\t*.inp;*.inc\n" . + \ "Abaqus Results (*.dat)\t*.dat\n" . + \ "Abaqus Messages (*.pre *.msg *.sta)\t*.pre;*.msg;*.sta\n" . + \ "All Files (*.*)\t*.*\n" + let b:undo_ftplugin .= "|unlet! b:browsefilter" +endif + +" Define patterns for the matchit plugin +if exists("loaded_matchit") && !exists("b:match_words") + let b:match_ignorecase = 1 + let b:match_words = + \ '\*part:\*end\s*part,' . + \ '\*assembly:\*end\s*assembly,' . + \ '\*instance:\*end\s*instance,' . + \ '\*step:\*end\s*step' + let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words" +endif + +" Define keys used to move [count] keywords backward or forward. +noremap <silent><buffer> [[ ?^\*\a<CR>:nohlsearch<CR> +noremap <silent><buffer> ]] /^\*\a<CR>:nohlsearch<CR> + +" Define key to toggle commenting of the current line or range +noremap <silent><buffer> <LocalLeader><LocalLeader> + \ :call <SID>Abaqus_ToggleComment()<CR>j +function! <SID>Abaqus_ToggleComment() range + if strpart(getline(a:firstline), 0, 2) == "**" + " Un-comment all lines in range + silent execute a:firstline . ',' . a:lastline . 's/^\*\*//' + else + " Comment all lines in range + silent execute a:firstline . ',' . a:lastline . 's/^/**/' + endif +endfunction + +let b:undo_ftplugin .= "|unmap <buffer> [[|unmap <buffer> ]]" + \ . "|unmap <buffer> <LocalLeader><LocalLeader>" + +" Undo must be done in nocompatible mode for <LocalLeader>. +let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" + \ . "set cpoptions&vim|" + \ . b:undo_ftplugin + \ . "|let &cpoptions = s:cpo_save" + \ . "|unlet s:cpo_save" + +" Restore saved compatibility options +let &cpoptions = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/ada.vim b/ftplugin/ada.vim new file mode 100644 index 00000000..59bde0a5 --- /dev/null +++ b/ftplugin/ada.vim @@ -0,0 +1,214 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 + +"------------------------------------------------------------------------------ +" Description: Perform Ada specific completion & tagging. +" Language: Ada (2005) +" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +" Maintainer: Martin Krischik <krischik@users.sourceforge.net> +" Taylor Venable <taylor@metasyntax.net> +" Neil Bird <neil@fnxweb.com> +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 with patch from David Bürgin +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/ftplugin/ada.vim $ +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK ' should not be in iskeyword. +" 16.07.2006 MK Ada-Mode as vim-ball +" 02.10.2006 MK Better folding. +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested not to use include protection for +" autoload +" 05.11.2006 MK Bram suggested to save on spaces +" 08.07.2007 TV fix default compiler problems. +" Help Page: ft-ada-plugin +"------------------------------------------------------------------------------ +" Provides mapping overrides for tag jumping that figure out the current +" Ada object and tag jump to that, not the 'simple' vim word. +" Similarly allows <Ctrl-N> matching of full-length ada entities from tags. +"------------------------------------------------------------------------------ + +" Only do this when not done yet for this buffer +if exists ("b:did_ftplugin") || version < 700 + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 45 + +" +" Temporarily set cpoptions to ensure the script loads OK +" +let s:cpoptions = &cpoptions +set cpoptions-=C + +" Section: Comments {{{1 +" +setlocal comments=O:--,:--\ \ +setlocal commentstring=--\ \ %s +setlocal complete=.,w,b,u,t,i + +" Section: case {{{1 +" +setlocal nosmartcase +setlocal ignorecase + +" Section: formatoptions {{{1 +" +setlocal formatoptions+=ron + +" Section: Tagging {{{1 +" +if exists ("g:ada_extended_tagging") + " Make local tag mappings for this buffer (if not already set) + if g:ada_extended_tagging == 'jump' + if mapcheck('<C-]>','n') == '' + nnoremap <unique> <buffer> <C-]> :call ada#Jump_Tag ('', 'tjump')<cr> + endif + if mapcheck('g<C-]>','n') == '' + nnoremap <unique> <buffer> g<C-]> :call ada#Jump_Tag ('','stjump')<cr> + endif + elseif g:ada_extended_tagging == 'list' + if mapcheck('<C-]>','n') == '' + nnoremap <unique> <buffer> <C-]> :call ada#List_Tag ()<cr> + endif + if mapcheck('g<C-]>','n') == '' + nnoremap <unique> <buffer> g<C-]> :call ada#List_Tag ()<cr> + endif + endif +endif + +" Section: Completion {{{1 +" +setlocal completefunc=ada#User_Complete +setlocal omnifunc=adacomplete#Complete + +if exists ("g:ada_extended_completion") + if mapcheck ('<C-N>','i') == '' + inoremap <unique> <buffer> <C-N> <C-R>=ada#Completion("\<lt>C-N>")<cr> + endif + if mapcheck ('<C-P>','i') == '' + inoremap <unique> <buffer> <C-P> <C-R>=ada#Completion("\<lt>C-P>")<cr> + endif + if mapcheck ('<C-X><C-]>','i') == '' + inoremap <unique> <buffer> <C-X><C-]> <C-R>=<SID>ada#Completion("\<lt>C-X>\<lt>C-]>")<cr> + endif + if mapcheck ('<bs>','i') == '' + inoremap <silent> <unique> <buffer> <bs> <C-R>=ada#Insert_Backspace ()<cr> + endif +endif + +" Section: Matchit {{{1 +" +" Only do this when not done yet for this buffer & matchit is used +" +if !exists ("b:match_words") && + \ exists ("loaded_matchit") + " + " The following lines enable the macros/matchit.vim plugin for + " Ada-specific extended matching with the % key. + " + let s:notend = '\%(\<end\s\+\)\@<!' + let b:match_words = + \ s:notend . '\<if\>:\<elsif\>:\<else\>:\<end\>\s\+\<if\>,' . + \ s:notend . '\<case\>:\<when\>:\<end\>\s\+\<case\>,' . + \ '\%(\<while\>.*\|\<for\>.*\|'.s:notend.'\)\<loop\>:\<end\>\s\+\<loop\>,' . + \ '\%(\<do\>\|\<begin\>\):\<exception\>:\<end\>\s*\%($\|[;A-Z]\),' . + \ s:notend . '\<record\>:\<end\>\s\+\<record\>' +endif + + +" Section: Compiler {{{1 +" +if ! exists("g:ada_default_compiler") + if has("vms") + let g:ada_default_compiler = 'decada' + else + let g:ada_default_compiler = 'gnat' + endif +endif + +if ! exists("current_compiler") || + \ current_compiler != g:ada_default_compiler + execute "compiler " . g:ada_default_compiler +endif + +" Section: Folding {{{1 +" +if exists("g:ada_folding") + if g:ada_folding[0] == 'i' + setlocal foldmethod=indent + setlocal foldignore=-- + setlocal foldnestmax=5 + elseif g:ada_folding[0] == 'g' + setlocal foldmethod=expr + setlocal foldexpr=ada#Pretty_Print_Folding(v:lnum) + elseif g:ada_folding[0] == 's' + setlocal foldmethod=syntax + endif + setlocal tabstop=8 + setlocal softtabstop=3 + setlocal shiftwidth=3 +endif + +" Section: Abbrev {{{1 +" +if exists("g:ada_abbrev") + iabbrev ret return + iabbrev proc procedure + iabbrev pack package + iabbrev func function +endif + +" Section: Commands, Mapping, Menus {{{1 +" +call ada#Map_Popup ( + \ 'Tag.List', + \ 'l', + \ 'call ada#List_Tag ()') +call ada#Map_Popup ( + \'Tag.Jump', + \'j', + \'call ada#Jump_Tag ()') +call ada#Map_Menu ( + \'Tag.Create File', + \':AdaTagFile', + \'call ada#Create_Tags (''file'')') +call ada#Map_Menu ( + \'Tag.Create Dir', + \':AdaTagDir', + \'call ada#Create_Tags (''dir'')') + +call ada#Map_Menu ( + \'Highlight.Toggle Space Errors', + \ ':AdaSpaces', + \'call ada#Switch_Syntax_Option (''space_errors'')') +call ada#Map_Menu ( + \'Highlight.Toggle Lines Errors', + \ ':AdaLines', + \'call ada#Switch_Syntax_Option (''line_errors'')') +call ada#Map_Menu ( + \'Highlight.Toggle Rainbow Color', + \ ':AdaRainbow', + \'call ada#Switch_Syntax_Option (''rainbow_color'')') +call ada#Map_Menu ( + \'Highlight.Toggle Standard Types', + \ ':AdaTypes', + \'call ada#Switch_Syntax_Option (''standard_types'')') + +" 1}}} +" Reset cpoptions +let &cpoptions = s:cpoptions +unlet s:cpoptions + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" 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 new file mode 100644 index 00000000..68ce4a30 --- /dev/null +++ b/ftplugin/alsaconf.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 + +" Vim filetype plugin file +" Language: alsaconf(8) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/ant.vim b/ftplugin/ant.vim new file mode 100644 index 00000000..565815bd --- /dev/null +++ b/ftplugin/ant.vim @@ -0,0 +1,48 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 + +" Vim filetype plugin file +" Language: ant +" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> +" Last Changed: 20 Jan 2009 +" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin + +if exists("b:did_ftplugin") | finish | endif + +" Make sure the continuation lines below do not cause problems in +" compatibility mode. +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "XML Files (*.xml)\t*.xml\n" . + \ "All Files (*.*)\t*.*\n" + +runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim +let b:did_ftplugin = 1 + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter +endif + +" Change the :browse e filter to primarily show Ant-related files. +if has("gui_win32") + let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" . + \ "Java Files (*.java)\t*.java\n" . + \ "Properties Files (*.prop*)\t*.prop*\n" . + \ "Manifest Files (*.mf)\t*.mf\n" . + \ s:browsefilter +endif + +" Undo the stuff we changed. +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 new file mode 100644 index 00000000..c9e018bc --- /dev/null +++ b/ftplugin/arch.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 + +" Vim filetype plugin file +" Language: GNU Arch inventory file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/art.vim b/ftplugin/art.vim new file mode 100644 index 00000000..ce63ba52 --- /dev/null +++ b/ftplugin/art.vim @@ -0,0 +1,19 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 + +" Vim filetype plugin +" Language: ART-IM and ART*Enterprise +" Maintainer: Dorai Sitaram <ds26@gte.com> +" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html +" Last Change: Apr 2, 2003 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +run ftplugin/lisp.vim + +setl lw-=if +setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while + +endif diff --git a/ftplugin/automake.vim b/ftplugin/automake.vim new file mode 100644 index 00000000..0e853843 --- /dev/null +++ b/ftplugin/automake.vim @@ -0,0 +1,20 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 + +" Vim filetype plugin file +" Language: Automake +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +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 new file mode 100644 index 00000000..fbccec1c --- /dev/null +++ b/ftplugin/awk.vim @@ -0,0 +1,22 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 + +" Vim filetype plugin +" Language: awk, nawk, gawk, mawk +" Maintainer: Antonio Colombo <azc100@gmail.com> +" Last Change: 2017 Feb 17 + +" This plugin was prepared by Mark Sikora + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +let b:undo_ftplugin = "setl commentstring<" + +setlocal commentstring=#\ %s + +endif diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index c74901f0..0a206003 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -37,8 +37,9 @@ nnoremap <buffer><Plug>(crystal-spec-run-all) :<C-u>CrystalSpecRunAll<CR> nnoremap <buffer><Plug>(crystal-spec-run-current) :<C-u>CrystalSpecRunCurrent<CR> nnoremap <buffer><Plug>(crystal-format) :<C-u>CrystalFormat<CR> +" autocmd is setup per buffer. Please do not use :autocmd!. It refreshes +" augroup hence removes autocmds for other buffers (#105) augroup plugin-ft-crystal - autocmd! autocmd BufWritePre <buffer> if g:crystal_auto_format && &filetype ==# 'crystal' | call crystal_lang#format('', 1) | endif augroup END diff --git a/ftplugin/grub.vim b/ftplugin/grub.vim new file mode 100644 index 00000000..03df3729 --- /dev/null +++ b/ftplugin/grub.vim @@ -0,0 +1,23 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 + +" Vim filetype plugin file +" Language: grub(8) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/help.vim b/ftplugin/help.vim new file mode 100644 index 00000000..5e9a4aa0 --- /dev/null +++ b/ftplugin/help.vim @@ -0,0 +1,26 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 + +" Vim filetype plugin file +" Language: Vim help file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2018-12-29 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl fo< tw< cole< cocu< keywordprg<" + +setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help +if has("conceal") + setlocal cole=2 cocu=nc +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/m4.vim b/ftplugin/m4.vim new file mode 100644 index 00000000..16479d43 --- /dev/null +++ b/ftplugin/m4.vim @@ -0,0 +1,24 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 + +" Vim filetype plugin file +" Language: m4 +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2008-07-09 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:#,:dnl commentstring=dnl\ %s +setlocal formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 663ec875..1675d20c 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -1,24 +1,34 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Only do this when not done yet for this buffer -if (exists("b:did_ftplugin")) +if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 +let s:cpo_orig = &cpo +set cpo&vim + +" Recomended code style, no tabs and 4-space indentation setlocal expandtab -setlocal tabstop=4 +setlocal tabstop=8 +setlocal softtabstop=4 setlocal shiftwidth=4 -setlocal suffixesadd=.zig -setlocal suffixesadd=.zir -setlocal commentstring=//\ %s +setlocal formatoptions-=t formatoptions+=croql + +setlocal suffixesadd=.zig,.zir setlocal makeprg=zig\ build -if (has("comments")) - set comments=:///,://,:\\\\ - set formatoptions=tcqor +if has("comments") + setlocal comments=:///,://!,://,:\\\\ + setlocal commentstring=//\ %s endif +let b:undo_ftplugin = "setl et< ts< sts< sw< fo< sua< mp< com< cms<" + +let &cpo = s:cpo_orig +unlet s:cpo_orig + endif diff --git a/heuristics.yaml b/heuristics.yaml new file mode 100644 index 00000000..28dff4ce --- /dev/null +++ b/heuristics.yaml @@ -0,0 +1,57 @@ +--- +extensions: [inp] +rules: +- lines: 1 + pattern: '^\*' + filetype: abaqus +- lines: 500 + pattern: '^header surface data' + ignore_case: true + filetype: trasys +--- +extensions: [asa] +rules: +- override: "g:filetype_asa" +- filetype: aspvbs +--- +extensions: [asp] +rules: +- override: "g:filetype_asp" +- lines: 3 + pattern: 'perlscript' + ignore_case: true + filetype: aspperl +- filetype: aspvbs +--- +extensions: [m] +rules: +- lines: 100 + rules: + - pattern: '^\s*/\*' + set: 'saw_comment' + - pattern: '^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])' + filetype: objc + - pattern: '^\s*%' + filetype: octave + - pattern: '^\s*\(\*' + filetype: mma + - pattern: '^\s*((type|var)\b|--)' + ignore_case: true + filetype: murphi +- if_set: "saw_comment" + filetype: objc +- override: "g:filetype_m" +- filetype: octave +--- +extensions: [fs] +rules: +- lines: 50 + rules: + - pattern: '^(: |new-device)' + filetype: forth + - pattern: '^\s*(#light|import|let|module|namespace|open|type)' + filetype: fsharp + - pattern: '\s*(#version|precision|uniform|varying|vec[234])' + filetype: glsl +- override: "g:filetype_fs" +- filetype: forth diff --git a/indent/aap.vim b/indent/aap.vim new file mode 100644 index 00000000..9e7573df --- /dev/null +++ b/indent/aap.vim @@ -0,0 +1,16 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 + +" Vim indent file +" Language: Aap recipe +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2005 Jun 24 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Works mostly like Python. +runtime! indent/python.vim + +endif diff --git a/indent/ada.vim b/indent/ada.vim new file mode 100644 index 00000000..77000842 --- /dev/null +++ b/indent/ada.vim @@ -0,0 +1,312 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 + +"------------------------------------------------------------------------------ +" Description: Vim Ada indent file +" Language: Ada (2005) +" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik <krischik@users.sourceforge.net> +" Neil Bird <neil@fnxweb.com> +" Ned Okie <nokie@radford.edu> +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/indent/ada.vim $ +" History: 24.05.2006 MK Unified Headers +" 16.07.2006 MK Ada-Mode as vim-ball +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Bram suggested to save on spaces +" 19.09.2007 NO g: missing before ada#Comment +" Help Page: ft-vim-indent +"------------------------------------------------------------------------------ +" ToDo: +" Verify handling of multi-line exprs. and recovery upon the final ';'. +" Correctly find comments given '"' and "" ==> " syntax. +" Combine the two large block-indent functions into one? +"------------------------------------------------------------------------------ + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") || version < 700 + finish +endif + +let b:did_indent = 45 + +setlocal indentexpr=GetAdaIndent() +setlocal indentkeys-=0{,0} +setlocal indentkeys+=0=~then,0=~end,0=~elsif,0=~when,0=~exception,0=~begin,0=~is,0=~record + +" Only define the functions once. +if exists("*GetAdaIndent") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +if exists("g:ada_with_gnat_project_files") + let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<\(loop\|use\)\>\|declare\>\|begin\>\|type\>.*\<is\>[^;]*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|project\>\|then\>\|when\>\|is\>\)' +else + let s:AdaBlockStart = '^\s*\(if\>\|while\>\|else\>\|elsif\>\|loop\>\|for\>.*\<\(loop\|use\)\>\|declare\>\|begin\>\|type\>.*\<is\>[^;]*$\|\(type\>.*\)\=\<record\>\|procedure\>\|function\>\|accept\>\|do\>\|task\>\|package\>\|then\>\|when\>\|is\>\)' +endif + +" Section: s:MainBlockIndent {{{1 +" +" Try to find indent of the block we're in +" prev_indent = the previous line's indent +" prev_lnum = previous line (to start looking on) +" blockstart = expr. that indicates a possible start of this block +" stop_at = if non-null, if a matching line is found, gives up! +" No recursive previous block analysis: simply look for a valid line +" with a lesser or equal indent than we currently (on prev_lnum) have. +" This shouldn't work as well as it appears to with lines that are currently +" nowhere near the correct indent (e.g., start of line)! +" Seems to work OK as it 'starts' with the indent of the /previous/ line. +function s:MainBlockIndent (prev_indent, prev_lnum, blockstart, stop_at) + let lnum = a:prev_lnum + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) + while lnum > 1 + if a:stop_at != '' && line =~ '^\s*' . a:stop_at && indent(lnum) < a:prev_indent + return a:prev_indent + elseif line =~ '^\s*' . a:blockstart + let ind = indent(lnum) + if ind < a:prev_indent + return ind + endif + endif + + let lnum = prevnonblank(lnum - 1) + " Get previous non-blank/non-comment-only line + while 1 + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) + if line !~ '^\s*$' && line !~ '^\s*#' + break + endif + let lnum = prevnonblank(lnum - 1) + if lnum <= 0 + return a:prev_indent + endif + endwhile + endwhile + " Fallback - just move back one + return a:prev_indent - shiftwidth() +endfunction MainBlockIndent + +" Section: s:EndBlockIndent {{{1 +" +" Try to find indent of the block we're in (and about to complete), +" including handling of nested blocks. Works on the 'end' of a block. +" prev_indent = the previous line's indent +" prev_lnum = previous line (to start looking on) +" blockstart = expr. that indicates a possible start of this block +" blockend = expr. that indicates a possible end of this block +function s:EndBlockIndent( prev_indent, prev_lnum, blockstart, blockend ) + let lnum = a:prev_lnum + let line = getline(lnum) + let ends = 0 + while lnum > 1 + if getline(lnum) =~ '^\s*' . a:blockstart + let ind = indent(lnum) + if ends <= 0 + if ind < a:prev_indent + return ind + endif + else + let ends = ends - 1 + endif + elseif getline(lnum) =~ '^\s*' . a:blockend + let ends = ends + 1 + endif + + let lnum = prevnonblank(lnum - 1) + " Get previous non-blank/non-comment-only line + while 1 + let line = getline(lnum) + let line = substitute( line, g:ada#Comment, '', '' ) + if line !~ '^\s*$' + break + endif + let lnum = prevnonblank(lnum - 1) + if lnum <= 0 + return a:prev_indent + endif + endwhile + endwhile + " Fallback - just move back one + return a:prev_indent - shiftwidth() +endfunction EndBlockIndent + +" Section: s:StatementIndent {{{1 +" +" Return indent of previous statement-start +" (after we've indented due to multi-line statements). +" This time, we start searching on the line *before* the one given (which is +" the end of a statement - we want the previous beginning). +function s:StatementIndent( current_indent, prev_lnum ) + let lnum = a:prev_lnum + while lnum > 0 + let prev_lnum = lnum + let lnum = prevnonblank(lnum - 1) + " Get previous non-blank/non-comment-only line + while 1 + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) + + if line !~ '^\s*$' && line !~ '^\s*#' + break + endif + let lnum = prevnonblank(lnum - 1) + if lnum <= 0 + return a:current_indent + endif + endwhile + " Leave indent alone if our ';' line is part of a ';'-delineated + " aggregate (e.g., procedure args.) or first line after a block start. + if line =~ s:AdaBlockStart || line =~ '(\s*$' + return a:current_indent + endif + if line !~ '[.=(]\s*$' + let ind = indent(prev_lnum) + if ind < a:current_indent + return ind + endif + endif + endwhile + " Fallback - just use current one + return a:current_indent +endfunction StatementIndent + + +" Section: GetAdaIndent {{{1 +" +" Find correct indent of a new line based upon what went before +" +function GetAdaIndent() + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + let ind = indent(lnum) + let package_line = 0 + + " Get previous non-blank/non-comment-only/non-cpp line + while 1 + let line = substitute( getline(lnum), g:ada#Comment, '', '' ) + if line !~ '^\s*$' && line !~ '^\s*#' + break + endif + let lnum = prevnonblank(lnum - 1) + if lnum <= 0 + return ind + endif + endwhile + + " Get default indent (from prev. line) + let ind = indent(lnum) + let initind = ind + + " Now check what's on the previous line + if line =~ s:AdaBlockStart || line =~ '(\s*$' + " Check for false matches to AdaBlockStart + let false_match = 0 + if line =~ '^\s*\(procedure\|function\|package\)\>.*\<is\s*new\>' + " Generic instantiation + let false_match = 1 + elseif line =~ ')\s*;\s*$' || line =~ '^\([^(]*([^)]*)\)*[^(]*;\s*$' + " forward declaration + let false_match = 1 + endif + " Move indent in + if ! false_match + let ind = ind + shiftwidth() + endif + elseif line =~ '^\s*\(case\|exception\)\>' + " Move indent in twice (next 'when' will move back) + let ind = ind + 2 * shiftwidth() + elseif line =~ '^\s*end\s*record\>' + " Move indent back to tallying 'type' preceeding the 'record'. + " Allow indent to be equal to 'end record's. + let ind = s:MainBlockIndent( ind+shiftwidth(), lnum, 'type\>', '' ) + elseif line =~ '\(^\s*new\>.*\)\@<!)\s*[;,]\s*$' + " Revert to indent of line that started this parenthesis pair + exe lnum + exe 'normal! $F)%' + if getline('.') =~ '^\s*(' + " Dire layout - use previous indent (could check for g:ada#Comment here) + let ind = indent( prevnonblank( line('.')-1 ) ) + else + let ind = indent('.') + endif + exe v:lnum + elseif line =~ '[.=(]\s*$' + " A statement continuation - move in one + let ind = ind + shiftwidth() + elseif line =~ '^\s*new\>' + " Multiple line generic instantiation ('package blah is\nnew thingy') + let ind = s:StatementIndent( ind - shiftwidth(), lnum ) + elseif line =~ ';\s*$' + " Statement end (but not 'end' ) - try to find current statement-start indent + let ind = s:StatementIndent( ind, lnum ) + endif + + " Check for potential argument list on next line + let continuation = (line =~ '[A-Za-z0-9_]\s*$') + + + " Check current line; search for simplistic matching start-of-block + let line = getline(v:lnum) + if line =~ '^\s*#' + " Start of line for ada-pp + let ind = 0 + elseif continuation && line =~ '^\s*(' + " Don't do this if we've already indented due to the previous line + if ind == initind + let ind = ind + shiftwidth() + endif + elseif line =~ '^\s*\(begin\|is\)\>' + let ind = s:MainBlockIndent( ind, lnum, '\(procedure\|function\|declare\|package\|task\)\>', 'begin\>' ) + elseif line =~ '^\s*record\>' + let ind = s:MainBlockIndent( ind, lnum, 'type\>\|for\>.*\<use\>', '' ) + shiftwidth() + elseif line =~ '^\s*\(else\|elsif\)\>' + let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' ) + elseif line =~ '^\s*when\>' + " Align 'when' one /in/ from matching block start + let ind = s:MainBlockIndent( ind, lnum, '\(case\|exception\)\>', '' ) + shiftwidth() + elseif line =~ '^\s*end\>\s*\<if\>' + " End of if statements + let ind = s:EndBlockIndent( ind, lnum, 'if\>', 'end\>\s*\<if\>' ) + elseif line =~ '^\s*end\>\s*\<loop\>' + " End of loops + let ind = s:EndBlockIndent( ind, lnum, '\(\(while\|for\)\>.*\)\?\<loop\>', 'end\>\s*\<loop\>' ) + elseif line =~ '^\s*end\>\s*\<record\>' + " End of records + let ind = s:EndBlockIndent( ind, lnum, '\(type\>.*\)\=\<record\>', 'end\>\s*\<record\>' ) + elseif line =~ '^\s*end\>\s*\<procedure\>' + " End of procedures + let ind = s:EndBlockIndent( ind, lnum, 'procedure\>.*\<is\>', 'end\>\s*\<procedure\>' ) + elseif line =~ '^\s*end\>\s*\<case\>' + " End of case statement + let ind = s:EndBlockIndent( ind, lnum, 'case\>.*\<is\>', 'end\>\s*\<case\>' ) + elseif line =~ '^\s*end\>' + " General case for end + let ind = s:MainBlockIndent( ind, lnum, '\(if\|while\|for\|loop\|accept\|begin\|record\|case\|exception\|package\)\>', '' ) + elseif line =~ '^\s*exception\>' + let ind = s:MainBlockIndent( ind, lnum, 'begin\>', '' ) + elseif line =~ '^\s*then\>' + let ind = s:MainBlockIndent( ind, lnum, 'if\>', '' ) + endif + + return ind +endfunction GetAdaIndent + +let &cpo = s:keepcpo +unlet s:keepcpo + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +" vim: foldmethod=marker + +endif diff --git a/indent/ant.vim b/indent/ant.vim new file mode 100644 index 00000000..22d344db --- /dev/null +++ b/indent/ant.vim @@ -0,0 +1,16 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 + +" Vim indent file +" Language: ANT files +" Maintainer: David Fishburn <fishburn@ianywhere.com> +" Last Change: Thu May 15 2003 10:02:54 PM + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +" Use XML formatting rules +runtime! indent/xml.vim + +endif diff --git a/indent/automake.vim b/indent/automake.vim new file mode 100644 index 00000000..a9f67f7c --- /dev/null +++ b/indent/automake.vim @@ -0,0 +1,15 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 + +" Vim indent file +" Language: automake +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 + +if exists("b:did_indent") + finish +endif + +" same as makefile indenting for now. +runtime! indent/make.vim + +endif diff --git a/indent/awk.vim b/indent/awk.vim new file mode 100644 index 00000000..7d2bae32 --- /dev/null +++ b/indent/awk.vim @@ -0,0 +1,236 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 + +" vim: set sw=3 sts=3: + +" Awk indent script. It can handle multi-line statements and expressions. +" It works up to the point where the distinction between correct/incorrect +" and personal taste gets fuzzy. Drop me an e-mail for bug reports and +" reasonable style suggestions. +" +" Bugs: +" ===== +" - Some syntax errors may cause erratic indentation. +" - Same for very unusual but syntacticly correct use of { } +" - In some cases it's confused by the use of ( and { in strings constants +" - This version likes the closing brace of a multiline pattern-action be on +" character position 1 before the following pattern-action combination is +" formatted + +" Author: +" ======= +" Erik Janssen, ejanssen@itmatters.nl +" +" History: +" ======== +" 26-04-2002 Got initial version working reasonably well +" 29-04-2002 Fixed problems in function headers and max line width +" Added support for two-line if's without curly braces +" Fixed hang: 2011 Aug 31 + +" Only load this indent file when no other was loaded. +if exists("b:did_indent") + finish +endif + +let b:did_indent = 1 + +setlocal indentexpr=GetAwkIndent() +" Mmm, copied from the tcl indent program. Is this okay? +setlocal indentkeys-=:,0# + +" Only define the function once. +if exists("*GetAwkIndent") + finish +endif + +" This function contains a lot of exit points. It checks for simple cases +" first to get out of the function as soon as possible, thereby reducing the +" number of possibilities later on in the difficult parts + +function! GetAwkIndent() + + " Find previous line and get its indentation + let prev_lineno = s:Get_prev_line( v:lnum ) + if prev_lineno == 0 + return 0 + endif + let prev_data = getline( prev_lineno ) + let ind = indent( prev_lineno ) + + " Increase indent if the previous line contains an opening brace. Search + " for this brace the hard way to prevent errors if the previous line is a + " 'pattern { action }' (simple check match on /{/ increases the indent then) + + if s:Get_brace_balance( prev_data, '{', '}' ) > 0 + return ind + shiftwidth() + endif + + let brace_balance = s:Get_brace_balance( prev_data, '(', ')' ) + + " If prev line has positive brace_balance and starts with a word (keyword + " or function name), align the current line on the first '(' of the prev + " line + + if brace_balance > 0 && s:Starts_with_word( prev_data ) + return s:Safe_indent( ind, s:First_word_len(prev_data), getline(v:lnum)) + endif + + " If this line starts with an open brace bail out now before the line + " continuation checks. + + if getline( v:lnum ) =~ '^\s*{' + return ind + endif + + " If prev line seems to be part of multiline statement: + " 1. Prev line is first line of a multiline statement + " -> attempt to indent on first ' ' or '(' of prev line, just like we + " indented the positive brace balance case above + " 2. Prev line is not first line of a multiline statement + " -> copy indent of prev line + + let continue_mode = s:Seems_continuing( prev_data ) + if continue_mode > 0 + if s:Seems_continuing( getline(s:Get_prev_line( prev_lineno )) ) + " Case 2 + return ind + else + " Case 1 + if continue_mode == 1 + " Need continuation due to comma, backslash, etc + return s:Safe_indent( ind, s:First_word_len(prev_data), getline(v:lnum)) + else + " if/for/while without '{' + return ind + shiftwidth() + endif + endif + endif + + " If the previous line doesn't need continuation on the current line we are + " on the start of a new statement. We have to make sure we align with the + " previous statement instead of just the previous line. This is a bit + " complicated because the previous statement might be multi-line. + " + " The start of a multiline statement can be found by: + " + " 1 If the previous line contains closing braces and has negative brace + " balance, search backwards until cumulative brace balance becomes zero, + " take indent of that line + " 2 If the line before the previous needs continuation search backward + " until that's not the case anymore. Take indent of one line down. + + " Case 1 + if prev_data =~ ')' && brace_balance < 0 + while brace_balance != 0 && prev_lineno > 0 + let prev_lineno = s:Get_prev_line( prev_lineno ) + let prev_data = getline( prev_lineno ) + let brace_balance=brace_balance+s:Get_brace_balance(prev_data,'(',')' ) + endwhile + let ind = indent( prev_lineno ) + else + " Case 2 + if s:Seems_continuing( getline( prev_lineno - 1 ) ) + let prev_lineno = prev_lineno - 2 + let prev_data = getline( prev_lineno ) + while prev_lineno > 0 && (s:Seems_continuing( prev_data ) > 0) + let prev_lineno = s:Get_prev_line( prev_lineno ) + let prev_data = getline( prev_lineno ) + endwhile + let ind = indent( prev_lineno + 1 ) + endif + endif + + " Decrease indent if this line contains a '}'. + if getline(v:lnum) =~ '^\s*}' + let ind = ind - shiftwidth() + endif + + return ind +endfunction + +" Find the open and close braces in this line and return how many more open- +" than close braces there are. It's also used to determine cumulative balance +" across multiple lines. + +function! s:Get_brace_balance( line, b_open, b_close ) + let line2 = substitute( a:line, a:b_open, "", "g" ) + let openb = strlen( a:line ) - strlen( line2 ) + let line3 = substitute( line2, a:b_close, "", "g" ) + let closeb = strlen( line2 ) - strlen( line3 ) + return openb - closeb +endfunction + +" Find out whether the line starts with a word (i.e. keyword or function +" call). Might need enhancements here. + +function! s:Starts_with_word( line ) + if a:line =~ '^\s*[a-zA-Z_0-9]\+\s*(' + return 1 + endif + return 0 +endfunction + +" Find the length of the first word in a line. This is used to be able to +" align a line relative to the 'print ' or 'if (' on the previous line in case +" such a statement spans multiple lines. +" Precondition: only to be used on lines where 'Starts_with_word' returns 1. + +function! s:First_word_len( line ) + let white_end = matchend( a:line, '^\s*' ) + if match( a:line, '^\s*func' ) != -1 + let word_end = matchend( a:line, '[a-z]\+\s\+[a-zA-Z_0-9]\+[ (]*' ) + else + let word_end = matchend( a:line, '[a-zA-Z_0-9]\+[ (]*' ) + endif + return word_end - white_end +endfunction + +" Determine if 'line' completes a statement or is continued on the next line. +" This one is far from complete and accepts illegal code. Not important for +" indenting, however. + +function! s:Seems_continuing( line ) + " Unfinished lines + if a:line =~ '\(--\|++\)\s*$' + return 0 + endif + if a:line =~ '[\\,\|\&\+\-\*\%\^]\s*$' + return 1 + endif + " if/for/while (cond) eol + if a:line =~ '^\s*\(if\|while\|for\)\s*(.*)\s*$' || a:line =~ '^\s*else\s*' + return 2 + endif + return 0 +endfunction + +" Get previous relevant line. Search back until a line is that is no +" comment or blank and return the line number + +function! s:Get_prev_line( lineno ) + let lnum = a:lineno - 1 + let data = getline( lnum ) + while lnum > 0 && (data =~ '^\s*#' || data =~ '^\s*$') + let lnum = lnum - 1 + let data = getline( lnum ) + endwhile + return lnum +endfunction + +" This function checks whether an indented line exceeds a maximum linewidth +" (hardcoded 80). If so and it is possible to stay within 80 positions (or +" limit num of characters beyond linewidth) by decreasing the indent (keeping +" it > base_indent), do so. + +function! s:Safe_indent( base, wordlen, this_line ) + let line_base = matchend( a:this_line, '^\s*' ) + let line_len = strlen( a:this_line ) - line_base + let indent = a:base + if (indent + a:wordlen + line_len) > 80 + " Simple implementation good enough for the time being + let indent = indent + 3 + endif + return indent + a:wordlen +endfunction + +endif diff --git a/indent/graphql.vim b/indent/graphql.vim index 3aae6acb..7b601957 100644 --- a/indent/graphql.vim +++ b/indent/graphql.vim @@ -23,18 +23,19 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Language: GraphQL " Maintainer: Jon Parise <jon@indelible.org> -if exists('b:did_indent') - finish +" Set our local options if indentation hasn't already been set up. +" This generally means we've been detected as the primary filetype. +if !exists('b:did_indent') + setlocal autoindent + setlocal nocindent + setlocal nolisp + setlocal nosmartindent + + setlocal indentexpr=GetGraphQLIndent() + setlocal indentkeys=0{,0},0),0[,0],0#,!^F,o,O + + let b:did_indent = 1 endif -let b:did_indent = 1 - -setlocal autoindent -setlocal nocindent -setlocal nolisp -setlocal nosmartindent - -setlocal indentexpr=GetGraphQLIndent() -setlocal indentkeys=0{,0},0),0[,0],0#,!^F,o,O " If our indentation function already exists, we have nothing more to do. if exists('*GetGraphQLIndent') @@ -46,7 +47,7 @@ set cpoptions&vim " Check if the character at lnum:col is inside a string. function s:InString(lnum, col) - return synIDattr(synID(a:lnum, a:col, 1), 'name') is# 'graphqlString' + return synIDattr(synID(a:lnum, a:col, 1), 'name') ==# 'graphqlString' endfunction function GetGraphQLIndent() diff --git a/packages.yaml b/packages.yaml index 3a3c5327..75181dc9 100644 --- a/packages.yaml +++ b/packages.yaml @@ -1,4 +1,81 @@ --- +name: 8th +remote: vim/vim:runtime +glob: '**/8th.vim' +filetypes: +- name: 8th + extensions: + - 8th +--- +name: a2ps +remote: vim/vim:runtime +glob: '**/a2ps.vim' +after: +- haproxy +filetypes: +- name: a2ps + filenames: + - '*/etc/a2ps.cfg' + - '*/etc/a2ps/*.cfg' + - a2psrc + - .a2psrc +--- +name: a65 +remote: vim/vim:runtime +glob: '**/a65.vim' +filetypes: +- name: a65 + extensions: + - a65 +--- +name: aap +remote: vim/vim:runtime +glob: '**/aap.vim' +filetypes: +- name: aap + extensions: + - aap +--- +name: abap +remote: vim/vim:runtime +glob: '**/abap.vim' +filetypes: +- name: abap + extensions: + - abap +--- +name: abaqus +remote: vim/vim:runtime +glob: '**/abaqus.vim' +filetypes: +- name: abaqus + extensions: + - inp +--- +name: abc +remote: vim/vim:runtime +glob: '**/abc.vim' +filetypes: +- name: abc + extensions: + - abc +--- +name: abel +remote: vim/vim:runtime +glob: '**/abel.vim' +filetypes: +- name: abel + extensions: + - abl +--- +name: acedb +remote: vim/vim:runtime +glob: '**/acedb.vim' +filetypes: +- name: acedb + extensions: + - wrm +--- name: acpiasl remote: martinlroth/vim-acpi-asl filetypes: @@ -7,6 +84,78 @@ filetypes: - asl - dsl --- +name: ada +remote: vim/vim:runtime +glob: '**/ada.vim' +filetypes: +- name: ada + extensions: + - adb + - ads + - ada + - gpr +--- +name: ahdl +remote: vim/vim:runtime +glob: '**/ahdl.vim' +filetypes: +- name: ahdl + extensions: + - tdf +--- +name: aidl +remote: vim/vim:runtime +glob: '**/aidl.vim' +filetypes: +- name: aidl + extensions: + - aidl +--- +name: alsaconf +remote: vim/vim:runtime +glob: '**/alsaconf.vim' +filetypes: +- name: alsaconf + filenames: + - .asoundrc + - '*/usr/share/alsa/alsa.conf' + - '*/etc/asound.conf' +--- +name: aml +remote: vim/vim:runtime +glob: '**/aml.vim' +filetypes: +- name: aml + extensions: + - aml +--- +name: ampl +remote: vim/vim:runtime +glob: '**/ampl.vim' +filetypes: +- name: ampl + extensions: + - run +--- +name: ant +remote: vim/vim:runtime +glob: '**/ant.vim' +after: xml +filetypes: +- name: ant + filenames: + - build.xml +--- +name: apache +remote: vim/vim:runtime +glob: '**/apache.vim' +filetypes: +- name: apache + filenames: + - .htaccess + - '*/etc/httpd/*.conf' + - '*/etc/apache2/sites-*/*.com' +--- name: apiblueprint remote: sheerun/apiblueprint.vim filetypes: @@ -15,19 +164,49 @@ filetypes: --- name: applescript remote: mityu/vim-applescript -dirs: :syntax +dirs: +- syntax +- indent filetypes: - name: applescript linguist: AppleScript --- +name: aptconf +remote: vim/vim:runtime +glob: '**/aptconf.vim' +filetypes: +- name: aptconf + filenames: + - apt.conf + - '*/.aptitude/config' + - '*/etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf}' +--- +name: arch +remote: vim/vim:runtime +glob: '**/arch.vim' +filetypes: +- name: arch + filenames: + - .arch-inventory + - =tagging-method +--- name: arduino remote: sudar/vim-arduino-syntax +after: c/c++ filetypes: - name: arduino linguist: Processing extra_extensions: - ino --- +name: art +remote: vim/vim:runtime +glob: '**/art.vim' +filetypes: +- name: art + extensions: + - art +--- name: asciidoc remote: asciidoc/vim-asciidoc filetypes: @@ -40,6 +219,79 @@ filetypes: - name: autohotkey linguist: AutoHotkey --- +name: automake +remote: vim/vim:runtime +glob: '**/automake.vim' +after: elf +filetypes: +- name: automake + filenames: + - '[Mm]akefile.am' + - GNUmakefile.am +--- +name: asn +remote: vim/vim:runtime +glob: '**/asn.vim' +filetypes: +- name: asn + extensions: + - asn + - asn1 +--- +name: aspvbs +remote: vim/vim:runtime +globs: +- '**/aspvbs.vim' +dependencies: +filetypes: +- name: aspvbs + extensions: + - asa + - asp +--- +name: aspperl +remote: vim/vim:runtime +globs: +- '**/aspperl.vim' +dependencies: +filetypes: +- name: aspperl + extensions: + - asp +--- +name: atlas +remote: vim/vim:runtime +glob: '**/atlas.vim' +filetypes: +- name: atlas + extensions: + - atl + - as +--- +name: autoit +remote: vim/vim:runtime +glob: '**/autoit.vim' +filetypes: +- name: autoit + extensions: + - au3 +--- +name: ave +remote: vim/vim:runtime +glob: '**/ave.vim' +filetypes: +- name: ave + extensions: + - ave +--- +name: awk +remote: vim/vim:runtime +glob: '**/awk.vim' +filetypes: +- name: awk + extensions: + - awk +--- name: c/c++ remote: vim-jp/vim-cpp filetypes: @@ -51,11 +303,6 @@ filetypes: # conflicts with more popular reason, remove after heuristics work - re --- -name: c++11 -remote: octol/vim-cpp-enhanced-highlight -# It just adds after files for c / c++ -filetypes: [] ---- name: caddyfile remote: isobit/vim-caddyfile filetypes: @@ -183,19 +430,15 @@ filetypes: - name: d linguist: D - name: dcov - linguist: D extensions: - lst - name: dd - linguist: D extensions: - dd - name: ddoc - linguist: D extensions: - ddoc - name: dsdl - linguist: D extensions: - sdl --- @@ -219,6 +462,14 @@ filetypes: - 'docker-compose*.yaml*' - 'docker-compose*.yml*' --- +name: elf +remote: vim/vim:runtime +glob: '**/elf.vim' +filetypes: +- name: elf + extensions: + - am +--- name: elixir remote: elixir-lang/vim-elixir filetypes: @@ -247,8 +498,7 @@ filetypes: - name: emblem extensions: - emblem - extra_extensions: - - em + - em --- name: erlang remote: vim-erlang/vim-erlang-runtime @@ -288,17 +538,30 @@ filetypes: extensions: - fbs --- +name: forth +remote: vim/vim:runtime +glob: '**/forth.vim' +filetypes: +- name: forth + extensions: + - fs + - ft + - fth +--- name: fsharp remote: ionide/Ionide-vim ignored_dirs: - ftplugin +after: glsl filetypes: - name: fsharp linguist: F# --- name: gdscript remote: calviken/vim-gdscript3 -dirs: :syntax +dirs: +- syntax +- indent filetypes: - name: gdscript3 linguist: GDScript @@ -366,7 +629,6 @@ filetypes: --- name: graphql remote: jparise/vim-graphql -dirs: :all filetypes: - name: graphql linguist: GraphQL @@ -377,6 +639,17 @@ filetypes: - name: groovy linguist: Gradle --- +name: grub +remote: vim/vim:runtime +glob: '**/grub.vim' +after: dlang +filetypes: +- name: grub + filenames: + - '*/boot/grub/menu.lst' + - '*/boot/grub/grub.conf' + - '*/etc/grub.conf' +--- name: haml remote: sheerun/vim-haml filetypes: @@ -493,9 +766,6 @@ remote: pangloss/vim-javascript ignored_dirs: # we don't want eslint compiler, see #521 - compiler -extra_dirs: -# Used by ftplugins there -- extras filetypes: - name: javascript linguist: JavaScript @@ -571,7 +841,6 @@ filetypes: --- name: jsx remote: MaxMEllon/vim-jsx-pretty -dirs: :all filetypes: - name: javascriptreact linguist: JSX @@ -635,8 +904,10 @@ filetypes: - name: log extensions: - log + - LOG filenames: - '*_log' + - '*_LOG' --- name: lua remote: tbastos/vim-lua @@ -644,6 +915,16 @@ filetypes: - name: lua linguist: Lua --- +name: m4 +remote: vim/vim:runtime +glob: '**/m4.vim' +filetypes: + - name: m4 + linguist: M4 + extra_extensions: + # Autotest .at files are actually m4 + - at +--- name: mako remote: sophacles/vim-bundle-mako filetypes: @@ -681,7 +962,6 @@ filetypes: --- name: meson remote: mesonbuild/meson:data/syntax-highlighting/vim -dirs: :all filetypes: - name: meson linguist: Meson @@ -695,6 +975,14 @@ filetypes: - name: moon linguist: MoonScript --- +name: murphi +remote: vim/vim:runtime +glob: '**/murphi.vim' +filetypes: +- name: murphi + extensions: + - m +--- name: nginx remote: chr4/nginx.vim filetypes: @@ -779,10 +1067,12 @@ filetypes: --- name: octave remote: McSinyx/vim-octave +after: mathematica filetypes: - name: octave extensions: - oct + - m --- name: opencl remote: petRUShka/vim-opencl @@ -832,6 +1122,7 @@ filetypes: --- name: blade remote: jwalton512/vim-blade +after: php filetypes: - name: blade linguist: Blade @@ -853,8 +1144,9 @@ filetypes: --- name: powershell remote: PProvost/vim-ps1 +after: xml filetypes: -- name: powershell +- name: ps1 linguist: PowerShell extra_extensions: - pssc @@ -1217,7 +1509,6 @@ filetypes: --- name: tmux remote: ericpruitt/tmux.vim:vim -dirs: :all filetypes: - name: tmux filenames: @@ -1266,7 +1557,6 @@ filetypes: --- name: unison remote: unisonweb/unison@trunk:editor-support/vim -dirs: :all filetypes: - name: unison extensions: @@ -1306,6 +1596,14 @@ filetypes: extensions: - vm --- +name: vmasm +remote: vim/vim:runtime +glob: '**/vmasm.vim' +filetypes: +- name: vmasm + extensions: + - mar +--- name: vue remote: posva/vim-vue filetypes: @@ -1352,6 +1650,7 @@ filetypes: --- name: ansible remote: pearofducks/ansible-vim +after: yaml filetypes: - name: yaml.ansible filenames: @@ -1375,6 +1674,14 @@ filetypes: - "*/templates/*.yaml" - "*/templates/*.tpl" --- +name: help +remote: vim/vim:runtime +glob: '**/help.vim' +filetypes: +- name: help + filenames: + - '$VIMRUNTIME/doc/*.txt' +--- name: zephir remote: xwsoul/vim-zephir filetypes: @@ -1384,10 +1691,18 @@ filetypes: name: zig remote: ziglang/zig.vim filetypes: +- name: zir + extensions: + - zir - name: zig linguist: Zig extra_extensions: - zir -- name: zir +--- +name: trasys +remote: vim/vim:runtime +glob: '**/trasys.vim' +filetypes: +- name: trasys extensions: - - zir + - inp diff --git a/scripts/build b/scripts/build index f26fb511..150f45c2 100755 --- a/scripts/build +++ b/scripts/build @@ -6,18 +6,82 @@ require 'yaml' require 'fileutils' require 'set' require 'json' +require 'tsort' Dir.chdir(File.dirname(__dir__)) -PACKAGES = YAML.load_stream(File.read('packages.yaml')) - BASE_URL = 'https://raw.githubusercontent.com/github/linguist/master' -DIRS = { - default: %w(syntax indent doc compiler autoload ftplugin ctags after/syntax after/indent after/ftplugin), - all: %w(syntax indent compiler autoload ftplugin after extras ctags doc), - syntax: %w(syntax indent after/syntax after/indent) -} +def camelize(str) + str.split(/[-_\.]/).map { |a| a.capitalize }.join("") +end + +def except(hash, *keys) + h = hash.dup + keys.each { |k| h.delete(k) } + h +end + +def load_data() + packages = Hash[YAML.load_stream(File.read('packages.yaml')) + .group_by { |a| a.fetch("name") } + .map { |a, b| [a, b.first] }] + + deps = Hash.new { |h, k| h[k] = [] } + + for package in packages.values + for name in [package.fetch("after", [])].flatten + packages[name] or raise "#{package["name"]} depends on unknown package: #{name}" + deps[name] << package["name"] + end + end + + each_node = lambda {|&b| packages.keys.each(&b) } + each_child = lambda {|n, &b| deps[n].each(&b) } + + languages = load_languages + + # Reason can have ocaml as interpreter but let's not depend on it... + languages["Reason"]["interpreters"] -= ["ocaml"] + + packages = TSort.tsort(each_node, each_child).map { |a| packages[a] } + + for package in packages + for filetype in package["filetypes"] + if filetype["linguist"] + if filetype["extensions"] + raise "#{package["name"]} #{filetype["name"]}: extensions can't be set when linguist is defined" + end + + if filetype["filenames"] + raise "#{package["name"]} #{filetype["name"]}: filenames can't be set when linguist is defined" + end + + linguist = languages.fetch(filetype["linguist"]) + + filetype["extensions"] = (linguist["extensions"] || []).map { |e| e[1..-1] } | + filetype.fetch("extra_extensions", []) - + filetype.fetch("ignored_extensions", []).uniq + + filetype["filenames"] = (linguist["filenames"] || []) | + filetype.fetch("extra_filenames", []) - + filetype.fetch("ignored_filenames", []).uniq + + filetype["interpreters"] = (linguist["interpreters"] || []) | + filetype.fetch("extra_interpreters", []) - + filetype.fetch("ignored_interpreters", []).uniq + else + filetype["extensions"] ||= [] + filetype["filenames"] ||= [] + filetype["interpreters"] ||= [] + end + end + end + + heuristics = YAML.load_stream(File.read('heuristics.yaml')) + + [packages, transform_patterns(heuristics)] +end def parallel(*procs) threads = procs.map { |p| Thread.new { method(p).call } } @@ -38,17 +102,12 @@ def read_strings(data, keys, print=false) end end -def transform_with(data, keys, transfrom=false, &block) - if data.is_a?(Hash) - Hash[data.map do |key, val| - [key, transform_with(val, keys, keys.include?(key), &block)] - end] - elsif data.is_a?(Array) - data.map { |d| transform_with(d, keys, transfrom, &block) } - elsif data.is_a?(String) - transfrom ? yield(data) : data - else - data +def patterns_to_vim_patterns(patterns) + stdin, stdout, stderr = Open3.popen3('vim', '-V', '--clean', '/dev/stdin', '-es', '-c', "echo expand('%:p:h') | source #{__dir__}/eregex.vim", '-c', "for line in range(0, line('$')) | call setline(line, ExtendedRegex2VimRegex(getline(line))) | endfor", '-c', ':wq! /dev/stdout', chdir: __dir__) + stdin.write(patterns.join("\n")) + stdin.close + stdout.readlines.map(&:chomp).map do |r| + r.gsub('\b', '\(\<\|\>\)') end end @@ -63,29 +122,21 @@ def each_hash(data, &block) end end -def patterns_to_vim_patterns(patterns) - stdin, stdout, stderr = Open3.popen3('vim', '-V', '--clean', '/dev/stdin', '-es', '-c', "echo expand('%:p:h') | source #{__dir__}/scripts/eregex.vim", '-c', "for line in range(0, line('$')) | call setline(line, ExtendedRegex2VimRegex(getline(line))) | endfor", '-c', ':wq! /dev/stdout', chdir: __dir__) - stdin.write(patterns.join("\n")) - stdin.close - stdout.readlines -end -def transform_patterns(data) - patterns = read_strings(data, ["pattern", "patterns"]) +def transform_patterns(heuristics) + patterns = [] + each_hash(heuristics) do |h| + if h.has_key?("pattern") + patterns << h["pattern"] + end + end patterns_mapping = Hash[patterns.zip(patterns_to_vim_patterns(patterns))] - transform_with(data, ["pattern", "patterns"]) { |a| patterns_mapping[a] } -end - -def load_heuristics - url = "#{BASE_URL}/lib/linguist/heuristics.yml" - data = URI.open(url) { |io| YAML.load(io.read) } - each_hash(data["disambiguations"]) do |h| - if h.has_key?("named_pattern") - h["pattern"] = data["named_patterns"].fetch(h["named_pattern"]) - h.delete("named_pattern") + each_hash(heuristics) do |h| + if h.has_key?("pattern") + h["pattern"] = patterns_mapping.fetch(h["pattern"]) end end - transform_patterns(data["disambiguations"]) + heuristics end def load_languages @@ -99,7 +150,6 @@ def parse_remote(remote) end def copy_file(package, src, dest) - return unless [".vim", ".ctags", ".vital", ".txt"].include?(File.extname(src)) FileUtils.mkdir_p(File.dirname(dest)) name = package.fetch("name") @@ -116,17 +166,17 @@ def copy_file(package, src, dest) end end -def download - FileUtils.rm_rf('tmp') - - PACKAGES.each_slice(20) do |batch| - batch.map do |package| +def download(packages) + packages.map { |p| p["remote"] or raise "No remote for: " + p["name"] }.uniq.each_slice(20) do |remotes| + remotes.map do |remote| Thread.new do - repo, branch, path = parse_remote(package.fetch("remote")) - dir = "tmp/" + repo.split('/')[1] - FileUtils.mkdir_p(dir) - url = "https://codeload.github.com/#{repo}/tar.gz/#{branch}" - `curl --silent -fL #{url} | tar -zx -C "#{dir}" --strip 1` + repo, branch, path = parse_remote(remote) + dir = "tmp/" + repo + unless File.exist?(dir) + FileUtils.mkdir_p(dir) + url = "https://codeload.github.com/#{repo}/tar.gz/#{branch}" + `curl --silent -fL #{url} | tar -zx -C "#{dir}" --strip 1` + end progress end end.map(&:join) @@ -147,15 +197,116 @@ def progress end end -def extract - FileUtils.rm_rf(DIRS[:all]) +def indent(str, amount) + str.gsub(/^(?!$)/, " " * amount).gsub(/\s+$/, "").gsub(/^ +\n/, "") +end + +def pattern_to_condition(rule) + operator = (rule["negative"] ? "!" : "=") + "~" + (rule["ignore_case"] ? "?" : "#") + + "line #{operator} '#{rule["pattern"]}'" +end + +def rules_to_code(rules) + output = "" + + vars = [] + each_hash(rules) do |h| + if h.has_key?("set") + vars << h["set"] + end + end + + + if vars.size > 0 + output << vars.uniq.sort.map do |var| + "let #{var} = 0" + end.join("\n") + "\n" + end + + output << rule_to_code(rules) +end + +def rule_to_code(rule) + if rule.has_key?("lines") + if rule["lines"] == 1 + return <<~EOS + let line = getline(1) + + #{indent(rule_to_code(except(rule, "lines")), 0)} + EOS + else + return <<~EOS + for lnum in range(1, min([line("$"), #{rule["lines"]}])) + let line = getline(lnum) + + #{indent(rule_to_code(except(rule, "lines")), 2)} + endfor + EOS + end + end + + if rule.has_key?("rules") + return rule["rules"].map { |r| indent(rule_to_code(r), 0) }.join("\n") + end + + if rule.has_key?("pattern") + return <<~EOS + if #{pattern_to_condition(rule)} + #{indent(rule_to_code(except(rule, "pattern", "ignore_case", "negative")), 2)} + endif + EOS + end + + if rule.has_key?("if_set") + return <<~EOS + if #{rule["negative"] ? "!" : ""}#{rule["if_set"]} + #{indent(rule_to_code(except(rule, "if_set", "negative")), 2)} + endif + EOS + end + + if rule.has_key?("set") + return <<~EOS + let #{rule["set"]} = 1 + #{indent(rule_to_code(except(rule, "set")), 0)} + EOS + end + + if (rule.keys - ["filetype", "override", "set"]).size > 0 + raise "Unknown rule: #{JSON.generate(rule)}" + end + + if rule.has_key?("override") + return <<~EOS + if exists("#{rule["override"]}") + exe "setf " . #{rule["override"]} | return + endif + EOS + end + + if rule.has_key?("filetype") + return "setf #{rule["filetype"]} | return" + end + + return "" +end + +def extract(packages) + all_dirs = %w(syntax indent doc compiler autoload ftplugin ctags extras after) + + default_dirs = %w( + syntax indent doc compiler autoload ftplugin ctags extras + after/syntax after/indent after/ftplugin + ) + + FileUtils.rm_rf(all_dirs) output = [] - PACKAGES.map do |package| + packages.map do |package| repo, branch, path = parse_remote(package["remote"]) - dir = "tmp/" + repo.split('/')[1] - subdirs = [] - dirs = DIRS.fetch(package.fetch("dirs", "default").to_sym) + dir = "tmp/" + repo + dirs = package.fetch("dirs", default_dirs) ignored_dirs = package.fetch("ignored_dirs", []) if ignored_dirs.size > 0 dirs = dirs.reject { |d| ignored_dirs.any? { |id| d.start_with?(id) } } @@ -165,18 +316,31 @@ def extract subtree = "#{dir}/#{path ? path + "/" : ""}" subpath = "#{subtree}#{subdir}" if FileTest.directory?(subpath) - Dir.glob("#{subdir}/**/*", base: subtree).each do |p| + if repo == "vim/vim" && (["glob", "globs"] & package.keys).size == 0 + raise "Package from vim/vim should define glob or globs: #{package["name"]}" + end + glob = package.fetch("glob", package.fetch('globs', '**/*.{vim,ctags,vital,txt}')) + Dir.glob("#{subdir}/#{glob}", base: subtree).each do |p| next unless File.file?("#{subtree}/#{p}") + if p.include?("samba") + raise package["name"] + end copy_file(package, "#{subtree}/#{p}", p) end - - subdirs << subdir.split("/").last elsif File.exist?(subpath) copy_file(package, subpath, subdir) end end - output << "- [#{package["name"]}](https://github.com/#{repo}) (#{subdirs.uniq.join(", ")})" + if branch != "master" || path + if path + output << "- [#{package["name"]}](https://github.com/#{repo}/tree/#{branch}/#{path})" + else + output << "- [#{package["name"]}](https://github.com/#{repo}/tree/#{branch})" + end + else + output << "- [#{package["name"]}](https://github.com/#{repo})" + end progress end @@ -195,16 +359,23 @@ def extract File.write('README.md', readme) end -def generate_ftdetect - heuristics, languages = parallel(:load_heuristics, :load_languages) - +def generate_ftdetect(packages, heuristics) output = <<~EOS " don't spam the user when Vim is started in Vi compatibility mode let s:cpo_save = &cpo set cpo&vim - if !exists('g:polyglot_disabled') - let g:polyglot_disabled = [] + " Disable all native vim ftdetect + if exists('g:polyglot_test') + autocmd! + endif + + let s:disabled_packages = {} + + if exists('g:polyglot_disabled') + for pkg in g:polyglot_disabled + let s:disabled_packages[pkg] = 1 + endfor endif function! s:SetDefault(name, value) @@ -248,47 +419,55 @@ def generate_ftdetect call s:SetDefault('g:python_highlight_file_headers_as_comments', 1) call s:SetDefault('g:python_slow_sync', 1) endif - EOS - ambiguous_extensions = PACKAGES.flat_map { |e| e["filetypes"] }.flat_map do |e| - if e["linguist"] - ((languages[e["linguist"]]["extensions"] || []).map { |e| e[1..-1] } | e.fetch("extra_extensions", [])) - e.fetch("ignored_extensions", []) - else - e.fetch("extensions", []) + extensions = Hash.new { |h, k| h[k] = [] } + + for package in packages + for filetype in package["filetypes"] + for ext in filetype["extensions"] + extensions[ext] << filetype["name"] + end end - end.group_by(&:itself).transform_values(&:count).select { |a, b| b > 1 }.keys.to_set + end + + ambiguous_extensions = extensions + .select { |a, b| b.uniq.size > 1 }.keys.sort expected_filetypes = detect_filetypes - for package in PACKAGES + for package in packages name = package.fetch("name") - output << if name == "jsx" - "if !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)\n" - else - "if index(g:polyglot_disabled, '#{name}') == -1\n" - end + + output << "if !has_key(s:disabled_packages, '#{name}')\n" filetypes = package["filetypes"] or raise "Unknown filetype for: #{package["name"]}" + package_heuristics = [] + for filetype in filetypes name = filetype.fetch("name") - syntax = filetype["syntax"] ? " syntax=#{filetype["syntax"]}" : "" - set_command = package.fetch("custom_set", "set ft=#{name}#{syntax}") + syntax = filetype["syntax"] ? " | set syntax=#{filetype["syntax"]}" : "" - linguist = filetype["linguist"] ? languages.fetch(filetype["linguist"]) : {} - extensions = filetype["extensions"] || linguist.fetch("extensions", []).map { |e| e[1..] } - extensions = (extensions | filetype.fetch("extra_extensions", [])) - filetype.fetch("ignored_extensions", []) + set_command = "setf #{name}" - filenames = filetype["filenames"] || linguist.fetch("filenames", []) - filenames = (filenames | filetype.fetch("extra_filenames", [])) - filetype.fetch("ignored_filenames", []) + if filetype["syntax"] + set_command = "if !did_filetype() | set ft=#{name} syntax=#{filetype["syntax"]} | endif" + end + + if filetype["custom_set"] + set_command = filetype["custom_set"] + end + + extensions = filetype["extensions"] + filenames = filetype["filenames"] if expected_filetypes[name] && !filetype["syntax"] for e in expected_filetypes.fetch(name)[:extensions] - extensions - expand_all(filetype.fetch("ignored_extensions", [])) puts "Probable missing extension for #{name}: #{e}" end - for e in expand_all(expected_filetypes.fetch(name)[:filenames]) - expand_all(filenames).flat_map { |e| [e, e.gsub(/^\./, '')] } - expand_all(filetype.fetch("ignored_filenames", [])) - ['*'] + for e in expected_filetypes.fetch(name)[:filenames] - expand_all(filenames).flat_map { |e| [e, e.gsub(/^\./, '')] } - expand_all(filetype.fetch("ignored_filenames", [])) - ['*'] puts "Probable missing filename for #{name}: #{e}" end end @@ -300,9 +479,14 @@ def generate_ftdetect output << " au BufReadPre *.*.#{extension} execute \"do BufRead filetypedetect \" . expand(\"<afile>:r\") | #{outer_filetype}\n" end - if ambiguous_extensions.include?(extension) - output << " au BufNewFile,BufRead *.#{extension} setf #{filetype["name"]}\n" + heuristic = heuristics.find { |h| h["extensions"].include?(extension) } + if heuristic + package_heuristics << heuristic else + # if ambiguous_extensions.include?(extension) + # puts "Ambiguous extension without heuristic: #{extension} => #{filetype["name"]}" + # end + # output << " au BufNewFile,BufRead *.#{extension} #{set_command}\n" end end @@ -315,25 +499,114 @@ def generate_ftdetect end end + for heuristic in package_heuristics.uniq + extensions = heuristic["extensions"].map { |e| "*.#{e}" } + output << " au! BufNewFile,BufRead #{extensions.join(",")} call polyglot#Detect#{camelize(heuristic["extensions"].first)}Filetype()\n" + end + output << "endif\n\n" end output << <<~EOS + au BufNewFile,BufRead,StdinReadPost * + \\ if !did_filetype() && expand("<amatch>") !~ g:ft_ignore_pat + \\ | call polyglot#Heuristics() | endif + " restore Vi compatibility settings let &cpo = s:cpo_save unlet s:cpo_save EOS - # filetypes = detect_filetypes - # - # for filetype in filetypes - # - # end - File.write('ftdetect/polyglot.vim', output) + + output = <<~EOS + " Line continuation is used here, remove 'C' from 'cpoptions' + let s:cpo_save = &cpo + set cpo&vim + + func! polyglot#Heuristics() + " Try to detect filetype from shebang + let l:filetype = polyglot#Shebang() + if l:filetype != "" + exec "setf " . l:filetype + return + endif + endfunc + + let s:interpreters = { + EOS + + for filetype in packages.flat_map { |p| p.fetch("filetypes", []) }.sort_by { |a| a["name"] } + for interpreter in filetype["interpreters"] + output << " \\ '#{interpreter}': '#{filetype["name"]}',\n" + end + end + + output << <<~EOS + \\ } + + let s:r_hashbang = '^#!\\s*\\(\\S\\+\\)\\s*\\(.*\\)\\s*' + let s:r_envflag = '%(\\S\\+=\\S\\+\\|-[iS]\\|--ignore-environment\\|--split-string\\)' + let s:r_env = '^\\%(\\' . s:r_envflag . '\\s\\+\\)*\\(\\S\\+\\)' + + func! polyglot#Shebang() + let l:line1 = getline(1) + + if l:line1 !~# "^#!" + return + endif + + let l:pathrest = matchlist(l:line1, s:r_hashbang) + + if len(l:pathrest) == 0 + return + endif + + let [_, l:path, l:rest; __] = l:pathrest + + let l:script = split(l:path, "/")[-1] + + if l:script == "env" + let l:argspath = matchlist(l:rest, s:r_env) + if len(l:argspath) == 0 + return + endif + + let l:script = l:argspath[1] + endif + + if has_key(s:interpreters, l:script) + return s:interpreters[l:script] + endif + + for interpreter in keys(s:interpreters) + if l:script =~# '^' . interpreter + return s:interpreters[interpreter] + endif + endfor + endfunc + + EOS + + for heuristic in heuristics + output << <<~EOS + func! polyglot#Detect#{camelize(heuristic["extensions"].first)}Filetype() + #{indent(rules_to_code(heuristic), 2)} + endfunc + + EOS + end + + output << <<~EOS + " Restore 'cpoptions' + let &cpo = s:cpo_save + unlet s:cpo_save + EOS + + File.write('autoload/polyglot.vim', output) end -def generate_tests +def generate_tests(packages) output = <<~EOS function! TestFiletype(filetype) try @@ -349,7 +622,7 @@ def generate_tests EOS - for package in PACKAGES + for package in packages for filetype in package.fetch("filetypes", []) output << "call TestFiletype('#{filetype["name"]}')\n" end @@ -407,7 +680,7 @@ def expand_all(pattern) end def detect_filetypes - filetypes = Dir['tmp/*/ftdetect/*.vim'].flat_map do |file| + filetypes = Dir['tmp/**/ftdetect/*.vim'].flat_map do |file| contents = File.read(file).gsub(/^\s*au(tocmd)?!?\s*$/, '') results = contents.scan(/^\s*(?:au!|au|au[^g][^ ]*) +(?:\S+)\s+(\S+)[\s\\]+([^\n]+)/) results = results.map do |a, b| @@ -427,14 +700,24 @@ def detect_filetypes end.group_by { |a, b| a }.map { |a, b| [a, b.map { |c, d| d }] }.map { |a, b| [a, { extensions: b.select { |x| x.match(/^\*\.[^\/]+$/) }.map { |a| a.strip[2..] }, - filenames: b.select { |x| !x.match(/^\*\.[^\/]+$/) } + filenames: expand_all(b.select { |x| !x.match(/^\*\.[^\/]+$/) }) }] }] end -download -extract -generate_ftdetect -generate_tests -puts(" Bye! Have a wonderful time!") -FileUtils.rm_rf("tmp") +if __FILE__ == $0 + if !ENV["DEV"] + FileUtils.rm_rf("tmp") + end + + packages, heuristics = load_data() + download(packages) + extract(packages) + generate_ftdetect(packages, heuristics) + generate_tests(packages) + puts(" Bye! Have a wonderful time!") + + if !ENV["DEV"] + FileUtils.rm_rf("tmp") + end +end diff --git a/scripts/test b/scripts/test index 88a2e973..97480439 100755 --- a/scripts/test +++ b/scripts/test @@ -2,12 +2,10 @@ set -e -vim --clean -N --cmd " - filetype plugin indent on - syntax enable +vim --clean -N -u <(echo " let &rtp='$PWD,'.&rtp - source ftdetect/polyglot.vim + let g:polyglot_test = 1 source scripts/test_extensions.vim - source scripts/test_filetypes.vim - exec ':q!' -" + \"source scripts/test_filetypes.vim + qa! +") diff --git a/scripts/test_extensions.vim b/scripts/test_extensions.vim index c7a22025..cb52bef8 100644 --- a/scripts/test_extensions.vim +++ b/scripts/test_extensions.vim @@ -1,16 +1,209 @@ function! TestExtension(filetype, filename, content) try - exec "e " . a:filename + let g:message = "" + exec "noautocmd n " . a:filename + put =a:content + 1delete _ + filetype detect exec "if &filetype != '" . a:filetype . "' \nthrow &filetype\nendif" + exec ":bw!" catch + echo g:message echo 'Filename "' . a:filename . '" does not resolve to extension "' . a:filetype . '"' echo ' instead received: "' . v:exception . '"' exec ':cq!' endtry endfunction +call TestExtension('sh', 'bash1', "#!/bin/bash") +call TestExtension('sh', 'bash2', "#! /bin/bash") +call TestExtension('sh', 'bash3', "#! /bin/bash2.3") +call TestExtension('sh', 'bash4', "#!/usr/bin/env bash") +call TestExtension('sh', 'bash6', "#!/usr/bin/env -i -=split-string foo=bar bash -l foo") +call TestExtension('sh', 'bash1', "#!/bin/bash") + +" Vim help file +call TestExtension('help', $VIMRUNTIME . '/doc/foobar.txt', '') + +" Abaqus or Trasys +call TestExtension('abaqus', 'foobar.inp', "*HEADING\nFoobar") +call TestExtension('trasys', 'foobar.inp', "MSC PATRAN\n* foobar\nHEADER SURFACE DATA\nBSC ENCLO1") + +" 8th (Firth-derivative) +call TestExtension('8th', 'foobar.8th', '') +call TestExtension('8th', 'foobar.8th', '') + +" A-A-P recipe +call TestExtension('aap', 'foobar.aap', '') + + +" A2ps printing utility +call TestExtension('a2ps', '/etc/a2ps.cfg', '') +call TestExtension('a2ps', '/usr/local/etc/a2ps.cfg', '') +call TestExtension('a2ps', '/etc/a2ps/foobar.cfg', '') +call TestExtension('a2ps', '/usr/local/etc/a2ps/foobar.cfg', '') +call TestExtension('a2ps', '/tmp/a2psrc', '') +call TestExtension('a2ps', '/tmp/.a2psrc', '') + +" ABAB/4 +call TestExtension('abap', 'foobar.abap', '') + +" ABC music notation +call TestExtension('abc', 'foobar.abc', '') + +" ABEL +call TestExtension('abel', 'foobar.abl', '') + +" AceDB +call TestExtension('acedb', 'foobar.wrm', '') + +" Ada (83, 9X, 95) +call TestExtension('ada', 'foobar.adb', '') +call TestExtension('ada', 'foobar.ads', '') +call TestExtension('ada', 'foobar.ada', '') +call TestExtension('ada', 'foobar.gpr', '') + +" AHDL +call TestExtension('ahdl', 'foobar.tdf', '') + +" AIDL +call TestExtension('aidl', 'foobar.aidl', '') + +" AMPL +call TestExtension('ampl', 'foobar.run', '') + +" Ant +call TestExtension('ant', 'build.xml', '') + +" Arduino +call TestExtension('arduino', 'foobar.ino', '') +call TestExtension('arduino', 'foobar.pde', '') + +" Apache config file +call TestExtension('apache', '.htaccess', '') +call TestExtension('apache', '/etc/httpd/foobar.conf', '') +call TestExtension('apache', '/etc/apache2/sites-foobar/foobar.com', '') +call TestExtension('apache', '/usr/local/etc/httpd/foobar.conf', '') +call TestExtension('apache', '/usr/local/etc/apache2/sites-foobar/foobar.com', '') + +" XA65 MOS6510 cross assembler +call TestExtension('a65', 'foobar.a65', '') + +" Applescript +call TestExtension('applescript', 'foobar.scpt', '') + +" Applix ELF +call TestExtension('elf', 'foobar.am', '') +call TestExtension('automake', 'Makefile.am', '') +call TestExtension('automake', 'makefile.am', '') + +" ALSA configuration +call TestExtension('alsaconf', '.asoundrc', '') +call TestExtension('alsaconf', '/usr/share/alsa/alsa.conf', '') +call TestExtension('alsaconf', '/media/foo/usr/share/alsa/alsa.conf', '') +call TestExtension('alsaconf', '/etc/asound.conf', '') +call TestExtension('alsaconf', '/media/foo/etc/asound.conf', '') + +" Arc Macro Language +call TestExtension('aml', 'foobar.aml', '') + +" APT config file +call TestExtension('aptconf', 'apt.conf', '') +call TestExtension('aptconf', '/root/.aptitude/config', '') +call TestExtension('aptconf', '/etc/apt/apt.conf.d/foo_bar-12', '') +call TestExtension('aptconf', '/etc/apt/apt.conf.d/foo_bar-12.conf', '') +call TestExtension('', '/etc/apt/apt.conf.d/.gsdf', '') + +" Arch Inventory file +call TestExtension('arch', '.arch-inventory', '') +call TestExtension('arch', '=tagging-method', '') + +" ART*Enterprise (formerly ART-IM) +call TestExtension('art', 'foobar.art', '') + +" AsciiDoc +call TestExtension('asciidoc', 'foobar.asciidoc', '') +call TestExtension('asciidoc', 'foobar.adoc', '') + +" ASN.1 +call TestExtension('asn', 'foobar.asn', '') +call TestExtension('asn', 'foobar.asn1', '') + +" Active Server Pages (with Visual Basic Script) +call TestExtension('aspvbs', 'foobar.asa', '') +let g:filetype_asa = 'fizfuz' +call TestExtension('fizfuz', 'foobar.asa', '') + +" Active Server Pages (with Perl or Visual Basic Script) +call TestExtension('aspvbs', 'vbs.asp', "") +call TestExtension('aspperl', 'perl.asp', "<Job ID=\"DropFiles\">\n<script language=\"PerlScript\">\n</script>\n</Job>") +let g:filetype_asp = 'fizfuz' +call TestExtension('fizfuz', 'fizfuz.asp', '') + + +" Grub (must be before catch *.lst) +call TestExtension('grub', '/boot/grub/menu.lst', '') +call TestExtension('grub', '/media/foobar/boot/grub/menu.lst', '') +call TestExtension('grub', '/boot/grub/grub.conf', '') +call TestExtension('grub', '/media/foobar/boot/grub/grub.conf', '') +call TestExtension('grub', '/etc/grub.conf', '') +call TestExtension('grub', '/media/foobar/etc/grub.conf', '') + +" Assembly (all kinds) +" *.lst is not pure assembly, it has two extra columns (address, byte codes) + +au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() + +" Macro (VAX) +call TestExtension('vmasm', 'foobar.mar', '') + +" Atlas +call TestExtension('atlas', 'foobar.atl', '') +call TestExtension('atlas', 'foobar.as', '') + +" Autoit v3 +call TestExtension('autoit', 'foobar.au3', '') + +" Autohotkey +call TestExtension('autohotkey', 'foobar.ahk', '') + +" Automake +call TestExtension('automake', 'Makefile.am', '') +call TestExtension('automake', 'makefile.am', '') +call TestExtension('automake', 'GNUmakefile.am', '') + +" Autotest .at files are actually m4 +call TestExtension('m4', 'foobar.at', '') + +" Avenue +call TestExtension('ave', 'foobar.ave', '') + +" Awk +call TestExtension('awk', 'foobar.awk', '') + +" vim-polyglot only call TestExtension('blade', 'test.blade.php', '') call TestExtension('yaml.ansible', 'playbook.yml', '') call TestExtension('yaml.ansible', 'host_vars/foobar', '') -call TestExtension('yaml.ansible', 'handlers.foo.yaml', '') +call TestExtension('yaml.ansible', 'handlers.foobar.yaml', '') call TestExtension('yaml.ansible', 'requirements.yaml', '') +call TestExtension('ps1xml', 'foobar.ps1xml', '') + +" .m extension +call TestExtension('octave', 'matlab.m', '') +call TestExtension('objc', 'objc.m', "\n\n #import <Foundation/Foundation.h>") +call TestExtension('octave', 'objc.m', "results_ub_times=zeros(2,2,M);\n%results pour la lower bound") +call TestExtension('mma', 'mathematica.m', "newcase[ \"00003\" ];\n (* Hello world *)") +call TestExtension('murphi', 'murphi.m', "type\n square: 1 .. 9") +call TestExtension('murphi', 'murphi.m', "something\n--foobar") +call TestExtension('octave', 'percentcomment.m', "hello world\n%foobar") +call TestExtension('objc', 'comment.m', "\n/* Hello world */") +let g:filetype_m = 'fizfuz' +call TestExtension('fizfuz', 'fizfuz.m', '') + +" .fs extension +call TestExtension('forth', 'empty.fs', '') +call TestExtension('fsharp', 'fsharp.fs', "let myInt = 5") +call TestExtension('glsl', 'glsl.fs', "//#version 120\nvoid main() {}") +let g:filetype_fs = 'fizfuz' +call TestExtension('fizfuz', 'fizfuz.fs', '') diff --git a/scripts/test_filetypes.vim b/scripts/test_filetypes.vim index 53a21af4..a9bae396 100644 --- a/scripts/test_filetypes.vim +++ b/scripts/test_filetypes.vim @@ -10,12 +10,40 @@ function! TestFiletype(filetype) endtry endfunction +call TestFiletype('8th') +call TestFiletype('a2ps') +call TestFiletype('a65') +call TestFiletype('aap') +call TestFiletype('abap') +call TestFiletype('abaqus') +call TestFiletype('abc') +call TestFiletype('abel') +call TestFiletype('acedb') call TestFiletype('asl') +call TestFiletype('ada') +call TestFiletype('ahdl') +call TestFiletype('aidl') +call TestFiletype('alsaconf') +call TestFiletype('aml') +call TestFiletype('ampl') +call TestFiletype('ant') +call TestFiletype('apache') call TestFiletype('apiblueprint') call TestFiletype('applescript') +call TestFiletype('aptconf') +call TestFiletype('arch') call TestFiletype('arduino') +call TestFiletype('art') call TestFiletype('asciidoc') call TestFiletype('autohotkey') +call TestFiletype('automake') +call TestFiletype('asn') +call TestFiletype('aspvbs') +call TestFiletype('aspperl') +call TestFiletype('atlas') +call TestFiletype('autoit') +call TestFiletype('ave') +call TestFiletype('awk') call TestFiletype('c') call TestFiletype('cpp') call TestFiletype('caddyfile') @@ -32,6 +60,7 @@ call TestFiletype('cucumber') call TestFiletype('cuesheet') call TestFiletype('dart') call TestFiletype('dhall') +call TestFiletype('grub') call TestFiletype('d') call TestFiletype('dcov') call TestFiletype('dd') @@ -39,6 +68,7 @@ call TestFiletype('ddoc') call TestFiletype('dsdl') call TestFiletype('Dockerfile') call TestFiletype('yaml.docker-compose') +call TestFiletype('elf') call TestFiletype('elixir') call TestFiletype('eelixir') call TestFiletype('elm') @@ -49,6 +79,7 @@ call TestFiletype('fennel') call TestFiletype('ferm') call TestFiletype('fish') call TestFiletype('fbs') +call TestFiletype('forth') call TestFiletype('fsharp') call TestFiletype('gdscript3') call TestFiletype('gitconfig') @@ -95,13 +126,16 @@ call TestFiletype('llvm') call TestFiletype('tablegen') call TestFiletype('log') call TestFiletype('lua') +call TestFiletype('m4') call TestFiletype('mako') +call TestFiletype('octave') call TestFiletype('mma') call TestFiletype('markdown') call TestFiletype('markdown.mdx') call TestFiletype('meson') call TestFiletype('dosini') call TestFiletype('moon') +call TestFiletype('murphi') call TestFiletype('nginx') call TestFiletype('nim') call TestFiletype('nix') @@ -115,17 +149,16 @@ call TestFiletype('ocamlbuild_tags') call TestFiletype('ocpbuild') call TestFiletype('ocpbuildroot') call TestFiletype('sexplib') -call TestFiletype('octave') call TestFiletype('opencl') call TestFiletype('perl') call TestFiletype('sql') call TestFiletype('sql') call TestFiletype('cql') -call TestFiletype('php') call TestFiletype('blade') +call TestFiletype('php') call TestFiletype('plantuml') call TestFiletype('pony') -call TestFiletype('powershell') +call TestFiletype('ps1') call TestFiletype('ps1xml') call TestFiletype('proto') call TestFiletype('pug') @@ -181,13 +214,16 @@ call TestFiletype('vala') call TestFiletype('vbnet') call TestFiletype('vcl') call TestFiletype('velocity') +call TestFiletype('vmasm') call TestFiletype('vue') call TestFiletype('xdc') call TestFiletype('xml') call TestFiletype('xsl') -call TestFiletype('yaml') call TestFiletype('yaml.ansible') +call TestFiletype('yaml') call TestFiletype('helm') +call TestFiletype('help') call TestFiletype('zephir') -call TestFiletype('zig') call TestFiletype('zir') +call TestFiletype('zig') +call TestFiletype('trasys') diff --git a/syntax/8th.vim b/syntax/8th.vim new file mode 100644 index 00000000..9eae523f --- /dev/null +++ b/syntax/8th.vim @@ -0,0 +1,339 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 + +" Vim syntax file +" Language: 8th +" Version: 19.01d +" Maintainer: Ron Aaron <ron@aaron-tech.com> +" URL: https://8th-dev.com/ +" Filetypes: *.8th +" NOTE: You should also have the ftplugin/8th.vim file to set 'isk' + +if version < 600 + syntax clear + finish +elseif exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim +syn clear +" Synchronization method +syn sync ccomment +syn sync maxlines=100 +syn case match +syn match eighthColonName "\S\+" contained +syn match eighthColonDef ":\s\+\S\+" contains=eighthColonName + +" new words +syn match eighthClasses "\<\S\+:" contained +syn match eighthClassWord "\<\S\+:.\+" contains=eighthClasses + +syn keyword eighthEndOfColonDef ; i; +syn keyword eighthDefine var var, + +" Built in words +com! -nargs=+ Builtin syn keyword eighthBuiltin <args> +"Builtin ^ < <# <#> = > - -- ,# ; ;; ! ??? / . .# ' () @ * */ \ + +Builtin ! G:! #! G:#! ## G:## #> G:#> #if G:#if ' G:' ( G:( (* G:(* (:) G:(:) (code) G:(code) (getc) G:(getc) +Builtin (gets) G:(gets) (interp) G:(interp) (needs) G:(needs) (putc) G:(putc) (puts) G:(puts) (putslim) G:(putslim) +Builtin (say) G:(say) (stat) G:(stat) ) G:) +listener G:+listener +ref G:+ref ,# G:,# -- G:-- -----BEGIN G:-----BEGIN +Builtin -Inf G:-Inf -Inf? G:-Inf? -listener G:-listener -ref G:-ref -rot G:-rot . G:. .# G:.# .needs G:.needs +Builtin .r G:.r .s G:.s .stats G:.stats .ver G:.ver .with G:.with 0; G:0; 2dip G:2dip 2drop G:2drop +Builtin 2dup G:2dup 2over G:2over 2swap G:2swap 3drop G:3drop 4drop G:4drop 8thdt? G:8thdt? 8thver? G:8thver? +Builtin : G:: ; G:; ;; G:;; ;;; G:;;; ;then G:;then ;with G:;with <# G:<# <#> G:<#> >clip G:>clip >json G:>json +Builtin >kind G:>kind >n G:>n >r G:>r >s G:>s ?: G:?: ??? G:??? @ G:@ Inf G:Inf Inf? G:Inf? NaN G:NaN +Builtin NaN? G:NaN? SED-CHECK G:SED-CHECK SED: G:SED: SED: G:SED: \ G:\ ` G:` `` G:`` actor: G:actor: +Builtin again G:again ahead G:ahead and G:and appname G:appname apropos G:apropos argc G:argc args G:args +Builtin array? G:array? assert G:assert base G:base bi G:bi bits G:bits break G:break break? G:break? +Builtin build? G:build? buildver? G:buildver? bye G:bye c# G:c# c/does G:c/does case G:case caseof G:caseof +Builtin chdir G:chdir clip> G:clip> clone G:clone clone-shallow G:clone-shallow cold G:cold compat-level G:compat-level +Builtin compile G:compile compile? G:compile? conflict G:conflict const G:const container? G:container? +Builtin cr G:cr curlang G:curlang curry G:curry curry: G:curry: decimal G:decimal defer: G:defer: deg>rad G:deg>rad +Builtin depth G:depth die G:die dip G:dip drop G:drop dstack G:dstack dump G:dump dup G:dup dup? G:dup? +Builtin else G:else enum: G:enum: eval G:eval eval! G:eval! eval0 G:eval0 execnull G:execnull expect G:expect +Builtin extra! G:extra! extra@ G:extra@ false G:false fnv G:fnv fourth G:fourth free G:free func: G:func: +Builtin getc G:getc getcwd G:getcwd getenv G:getenv gets G:gets handler G:handler header G:header help G:help +Builtin hex G:hex i: G:i: i; G:i; if G:if if; G:if; isa? G:isa? items-used G:items-used jcall G:jcall +Builtin jclass G:jclass jmethod G:jmethod json-nesting G:json-nesting json-pretty G:json-pretty json-throw G:json-throw +Builtin json> G:json> k32 G:k32 keep G:keep l: G:l: last G:last lib G:lib libbin G:libbin libc G:libc +Builtin listener@ G:listener@ literal G:literal locals: G:locals: lock G:lock lock-to G:lock-to locked? G:locked? +Builtin log G:log log-async G:log-async log-task G:log-task log-time G:log-time log-time-local G:log-time-local +Builtin long-days G:long-days long-months G:long-months loop G:loop loop- G:loop- map? G:map? mark G:mark +Builtin mark? G:mark? memfree G:memfree mobile? G:mobile? n# G:n# name>os G:name>os name>sem G:name>sem +Builtin ndrop G:ndrop needs G:needs new G:new next-arg G:next-arg nip G:nip noop G:noop not G:not ns G:ns +Builtin ns: G:ns: ns>ls G:ns>ls ns>s G:ns>s ns? G:ns? null G:null null; G:null; null? G:null? number? G:number? +Builtin off G:off on G:on onexit G:onexit only G:only op! G:op! or G:or os G:os os-names G:os-names +Builtin os>long-name G:os>long-name os>name G:os>name over G:over p: G:p: pack G:pack parse G:parse +Builtin parsech G:parsech parseln G:parseln parsews G:parsews pick G:pick poke G:poke pool-clear G:pool-clear +Builtin prior G:prior private G:private process-args G:process-args prompt G:prompt public G:public +Builtin putc G:putc puts G:puts putslim G:putslim quote G:quote r! G:r! r> G:r> r@ G:r@ rad>deg G:rad>deg +Builtin rand G:rand rand-pcg G:rand-pcg rand-pcg-seed G:rand-pcg-seed randbuf G:randbuf randbuf-pcg G:randbuf-pcg +Builtin rdrop G:rdrop recurse G:recurse recurse-stack G:recurse-stack ref@ G:ref@ reg! G:reg! reg@ G:reg@ +Builtin regbin@ G:regbin@ remaining-args G:remaining-args repeat G:repeat reset G:reset roll G:roll +Builtin rop! G:rop! rot G:rot rpick G:rpick rroll G:rroll rstack G:rstack rswap G:rswap rusage G:rusage +Builtin s>ns G:s>ns same? G:same? scriptdir G:scriptdir scriptfile G:scriptfile sem G:sem sem-post G:sem-post +Builtin sem-rm G:sem-rm sem-wait G:sem-wait sem-wait? G:sem-wait? sem>name G:sem>name semi-throw G:semi-throw +Builtin set-wipe G:set-wipe setenv G:setenv settings! G:settings! settings![] G:settings![] settings@ G:settings@ +Builtin settings@? G:settings@? settings@[] G:settings@[] sh G:sh sh$ G:sh$ short-days G:short-days +Builtin short-months G:short-months sleep G:sleep space G:space stack-check G:stack-check stack-size G:stack-size +Builtin step G:step string? G:string? struct: G:struct: swap G:swap syslang G:syslang sysregion G:sysregion +Builtin tab-hook G:tab-hook tell-conflict G:tell-conflict tempdir G:tempdir tempfilename G:tempfilename +Builtin then G:then third G:third throw G:throw thrownull G:thrownull times G:times tlog G:tlog tri G:tri +Builtin true G:true tuck G:tuck type-check G:type-check typeassert G:typeassert unlock G:unlock unpack G:unpack +Builtin until G:until until! G:until! var G:var var, G:var, while G:while while! G:while! with: G:with: +Builtin words G:words words-like G:words-like words/ G:words/ xchg G:xchg xor G:xor >auth HTTP:>auth +Builtin sh I:sh tpush I:tpush trace-word I:trace-word call JSONRPC:call auth-string OAuth:auth-string +Builtin gen-nonce OAuth:gen-nonce params OAuth:params call SOAP:call ! a:! + a:+ - a:- 2each a:2each +Builtin 2map a:2map 2map+ a:2map+ 2map= a:2map= = a:= >map a:>map @ a:@ @@ a:@@ bsearch a:bsearch clear a:clear +Builtin close a:close diff a:diff dot a:dot each a:each each-slice a:each-slice exists? a:exists? filter a:filter +Builtin generate a:generate group a:group indexof a:indexof insert a:insert intersect a:intersect join a:join +Builtin len a:len map a:map map+ a:map+ map= a:map= mean a:mean mean&variance a:mean&variance new a:new +Builtin op a:op op! a:op! op= a:op= open a:open pop a:pop push a:push qsort a:qsort randeach a:randeach +Builtin reduce a:reduce reduce+ a:reduce+ rev a:rev shift a:shift shuffle a:shuffle slice a:slice slice+ a:slice+ +Builtin slide a:slide sort a:sort union a:union when a:when when! a:when! x a:x x-each a:x-each xchg a:xchg +Builtin y a:y zip a:zip 8thdir app:8thdir asset app:asset atrun app:atrun atrun app:atrun atrun app:atrun +Builtin basedir app:basedir current app:current datadir app:datadir exename app:exename isgui app:isgui +Builtin main app:main oncrash app:oncrash orientation app:orientation pid app:pid restart app:restart +Builtin resumed app:resumed shared? app:shared? standalone app:standalone subdir app:subdir suspended app:suspended +Builtin sysquit app:sysquit (here) asm:(here) >n asm:>n avail asm:avail c, asm:c, here! asm:here! n> asm:n> +Builtin used asm:used w, asm:w, ! b:! + b:+ / b:/ = b:= >base64 b:>base64 >hex b:>hex >mpack b:>mpack +Builtin @ b:@ append b:append base64> b:base64> bit! b:bit! bit@ b:bit@ clear b:clear compress b:compress +Builtin conv b:conv each b:each each-slice b:each-slice expand b:expand fill b:fill getb b:getb hex> b:hex> +Builtin len b:len mem> b:mem> move b:move mpack-date b:mpack-date mpack-ignore b:mpack-ignore mpack> b:mpack> +Builtin new b:new op b:op rev b:rev search b:search shmem b:shmem slice b:slice splice b:splice ungetb b:ungetb +Builtin writable b:writable xor b:xor +block bc:+block .blocks bc:.blocks add-block bc:add-block block-hash bc:block-hash +Builtin block@ bc:block@ first-block bc:first-block hash bc:hash last-block bc:last-block load bc:load +Builtin new bc:new save bc:save set-sql bc:set-sql validate bc:validate validate-block bc:validate-block +Builtin add bloom:add filter bloom:filter in? bloom:in? accept bt:accept ch! bt:ch! ch@ bt:ch@ connect bt:connect +Builtin disconnect bt:disconnect err? bt:err? leconnect bt:leconnect lescan bt:lescan listen bt:listen +Builtin on? bt:on? read bt:read scan bt:scan service? bt:service? services? bt:services? write bt:write +Builtin * c:* * c:* + c:+ + c:+ = c:= = c:= >ri c:>ri >ri c:>ri abs c:abs abs c:abs arg c:arg arg c:arg +Builtin conj c:conj conj c:conj im c:im n> c:n> new c:new new c:new re c:re >aes128gcm cr:>aes128gcm +Builtin >aes256gcm cr:>aes256gcm >cp cr:>cp >cpe cr:>cpe >decrypt cr:>decrypt >edbox cr:>edbox >encrypt cr:>encrypt +Builtin >nbuf cr:>nbuf >rsabox cr:>rsabox >uuid cr:>uuid CBC cr:CBC CFB cr:CFB CTR cr:CTR ECB cr:ECB +Builtin GCM cr:GCM OFB cr:OFB aad? cr:aad? aes128box-sig cr:aes128box-sig aes128gcm> cr:aes128gcm> +Builtin aes256box-sig cr:aes256box-sig aes256gcm> cr:aes256gcm> aesgcm cr:aesgcm blakehash cr:blakehash +Builtin chacha20box-sig cr:chacha20box-sig chachapoly cr:chachapoly cipher! cr:cipher! cipher@ cr:cipher@ +Builtin cp> cr:cp> cpe> cr:cpe> decrypt cr:decrypt decrypt+ cr:decrypt+ decrypt> cr:decrypt> dh-genkey cr:dh-genkey +Builtin dh-secret cr:dh-secret dh-sign cr:dh-sign dh-verify cr:dh-verify ebox-sig cr:ebox-sig ecc-genkey cr:ecc-genkey +Builtin ecc-secret cr:ecc-secret ecc-sign cr:ecc-sign ecc-verify cr:ecc-verify edbox-sig cr:edbox-sig +Builtin edbox> cr:edbox> encrypt cr:encrypt encrypt+ cr:encrypt+ encrypt> cr:encrypt> ensurekey cr:ensurekey +Builtin err? cr:err? gcm-tag-size cr:gcm-tag-size genkey cr:genkey hash cr:hash hash! cr:hash! hash+ cr:hash+ +Builtin hash>b cr:hash>b hash>s cr:hash>s hash@ cr:hash@ hmac cr:hmac hotp cr:hotp iv? cr:iv? mode cr:mode +Builtin mode@ cr:mode@ randkey cr:randkey restore cr:restore root-certs cr:root-certs rsa_decrypt cr:rsa_decrypt +Builtin rsa_encrypt cr:rsa_encrypt rsa_sign cr:rsa_sign rsa_verify cr:rsa_verify rsabox-sig cr:rsabox-sig +Builtin rsabox> cr:rsabox> rsagenkey cr:rsagenkey save cr:save sbox-sig cr:sbox-sig sha1-hmac cr:sha1-hmac +Builtin shard cr:shard tag? cr:tag? totp cr:totp totp-epoch cr:totp-epoch totp-time-step cr:totp-time-step +Builtin unshard cr:unshard uuid cr:uuid uuid> cr:uuid> validate-pgp-sig cr:validate-pgp-sig (.hebrew) d:(.hebrew) +Builtin (.islamic) d:(.islamic) + d:+ +day d:+day +hour d:+hour +min d:+min +msec d:+msec - d:- .hebrew d:.hebrew +Builtin .islamic d:.islamic .time d:.time / d:/ = d:= >fixed d:>fixed >hebepoch d:>hebepoch >msec d:>msec +Builtin >unix d:>unix >ymd d:>ymd Adar d:Adar Adar2 d:Adar2 Adar2 d:Adar2 Av d:Av Elul d:Elul Fri d:Fri +Builtin Heshvan d:Heshvan Iyar d:Iyar Kislev d:Kislev Mon d:Mon Nissan d:Nissan Sat d:Sat Shevat d:Shevat +Builtin Sivan d:Sivan Sun d:Sun Tammuz d:Tammuz Tevet d:Tevet Thu d:Thu Tishrei d:Tishrei Tue d:Tue +Builtin Wed d:Wed adjust-dst d:adjust-dst between d:between d. d:d. dawn d:dawn days-in-hebrew-year d:days-in-hebrew-year +Builtin displaying-hebrew d:displaying-hebrew do-dawn d:do-dawn do-dusk d:do-dusk do-rise d:do-rise +Builtin doy d:doy dst? d:dst? dstquery d:dstquery dstzones? d:dstzones? dusk d:dusk elapsed-timer d:elapsed-timer +Builtin elapsed-timer-seconds d:elapsed-timer-seconds first-dow d:first-dow fixed> d:fixed> fixed>dow d:fixed>dow +Builtin fixed>hebrew d:fixed>hebrew fixed>islamic d:fixed>islamic format d:format hanukkah d:hanukkah +Builtin hebrew-epoch d:hebrew-epoch hebrew>fixed d:hebrew>fixed hebrewtoday d:hebrewtoday hmonth-name d:hmonth-name +Builtin islamic.epoch d:islamic.epoch islamic>fixed d:islamic>fixed islamictoday d:islamictoday join d:join +Builtin last-day-of-hebrew-month d:last-day-of-hebrew-month last-dow d:last-dow last-month d:last-month +Builtin last-week d:last-week last-year d:last-year latitude d:latitude longitude d:longitude longitude d:longitude +Builtin msec d:msec msec> d:msec> new d:new next-dow d:next-dow next-month d:next-month next-week d:next-week +Builtin next-year d:next-year number>hebrew d:number>hebrew omer d:omer parse d:parse pesach d:pesach +Builtin prev-dow d:prev-dow purim d:purim rosh-chodesh? d:rosh-chodesh? rosh-hashanah d:rosh-hashanah +Builtin shavuot d:shavuot start-timer d:start-timer sunrise d:sunrise taanit-esther d:taanit-esther +Builtin ticks d:ticks ticks/sec d:ticks/sec timer d:timer tisha-beav d:tisha-beav tzadjust d:tzadjust +Builtin unix> d:unix> updatetz d:updatetz year@ d:year@ ymd d:ymd ymd> d:ymd> yom-haatsmaut d:yom-haatsmaut +Builtin yom-kippur d:yom-kippur add-func db:add-func bind db:bind close db:close col db:col col[] db:col[] +Builtin col{} db:col{} err? db:err? errmsg db:errmsg exec db:exec exec-cb db:exec-cb key db:key mysql? db:mysql? +Builtin odbc? db:odbc? open db:open open? db:open? prepare db:prepare query db:query query-all db:query-all +Builtin rekey db:rekey sqlerrmsg db:sqlerrmsg bp dbg:bp except-task@ dbg:except-task@ go dbg:go line-info dbg:line-info +Builtin prompt dbg:prompt stop dbg:stop trace dbg:trace trace-enter dbg:trace-enter trace-leave dbg:trace-leave +Builtin abspath f:abspath append f:append associate f:associate atime f:atime canwrite? f:canwrite? +Builtin chmod f:chmod close f:close copy f:copy copydir f:copydir create f:create ctime f:ctime dir? f:dir? +Builtin dname f:dname eachbuf f:eachbuf eachline f:eachline enssep f:enssep eof? f:eof? err? f:err? +Builtin exists? f:exists? flush f:flush fname f:fname getb f:getb getc f:getc getline f:getline getmod f:getmod +Builtin glob f:glob glob-nocase f:glob-nocase include f:include launch f:launch link f:link link> f:link> +Builtin link? f:link? mkdir f:mkdir mmap f:mmap mmap-range f:mmap-range mmap-range? f:mmap-range? mtime f:mtime +Builtin mv f:mv open f:open open-ro f:open-ro popen f:popen print f:print read f:read relpath f:relpath +Builtin rglob f:rglob rm f:rm rmdir f:rmdir seek f:seek sep f:sep show f:show size f:size slurp f:slurp +Builtin stderr f:stderr stdin f:stdin stdout f:stdout tell f:tell times f:times trash f:trash ungetb f:ungetb +Builtin ungetc f:ungetc unzip f:unzip unzip-entry f:unzip-entry watch f:watch write f:write writen f:writen +Builtin zip+ f:zip+ zip@ f:zip@ zipentry f:zipentry zipnew f:zipnew zipopen f:zipopen zipsave f:zipsave +Builtin bold font:bold face? font:face? glyph-path font:glyph-path glyph-pos font:glyph-pos info font:info +Builtin italic font:italic ls font:ls measure font:measure new font:new pixels font:pixels pixels? font:pixels? +Builtin points font:points points? font:points? styles font:styles styles? font:styles? underline font:underline +Builtin +child g:+child +kind g:+kind +path g:+path -child g:-child /path g:/path >img g:>img >progress g:>progress +Builtin add-items g:add-items adjustwidth g:adjustwidth allow-orient g:allow-orient arc g:arc arc2 g:arc2 +Builtin autohide g:autohide back g:back bezier g:bezier bg g:bg bg? g:bg? bounds g:bounds bounds? g:bounds? +Builtin box-label g:box-label btn-font g:btn-font bubble g:bubble button-size g:button-size buttons-visible g:buttons-visible +Builtin c-text g:c-text callout g:callout center g:center child g:child clear g:clear clearpath g:clearpath +Builtin clr>n g:clr>n coleven g:coleven colordlg g:colordlg colwidth g:colwidth connectededges g:connectededges +Builtin contrasting g:contrasting cp g:cp curmouse? g:curmouse? default-font g:default-font deselect-row g:deselect-row +Builtin dismiss g:dismiss do g:do draw-fitted-text g:draw-fitted-text draw-text g:draw-text draw-text-at g:draw-text-at +Builtin each g:each edit-on-double-click g:edit-on-double-click editable g:editable editdlg g:editdlg +Builtin empty-text g:empty-text enable g:enable enabled? g:enabled? fade g:fade fb-files g:fb-files +Builtin fcolor g:fcolor fg g:fg fg? g:fg? file-filter g:file-filter file-name g:file-name filedlg g:filedlg +Builtin fill g:fill fillall g:fillall fit-text g:fit-text flex! g:flex! focus g:focus fontdlg g:fontdlg +Builtin forward g:forward fullscreen g:fullscreen get-lasso-items g:get-lasso-items get-tab g:get-tab +Builtin getclr g:getclr getfont g:getfont getimage g:getimage getpath g:getpath getroot g:getroot gradient g:gradient +Builtin gui? g:gui? handle g:handle headerheight g:headerheight hide g:hide image g:image image-at g:image-at +Builtin invalidate g:invalidate ix? g:ix? justify g:justify keyinfo g:keyinfo l-text g:l-text laf g:laf +Builtin laf! g:laf! laf? g:laf? len g:len line-width g:line-width lineto g:lineto list+ g:list+ list- g:list- +Builtin loadcontent g:loadcontent localize g:localize m! g:m! m@ g:m@ menu-font g:menu-font menu-update g:menu-update +Builtin menuenabled g:menuenabled mouse? g:mouse? mousepos? g:mousepos? moveto g:moveto msgdlg g:msgdlg +Builtin multi g:multi name g:name named-skin g:named-skin new g:new new-laf g:new-laf next g:next obj g:obj +Builtin on g:on on? g:on? ontop g:ontop oshandle g:oshandle outlinethickness g:outlinethickness panel-size g:panel-size +Builtin panel-size? g:panel-size? parent g:parent path g:path path>s g:path>s pie g:pie pix! g:pix! +Builtin pop g:pop popmenu g:popmenu pos? g:pos? prev g:prev propval! g:propval! propval@ g:propval@ +Builtin push g:push qbezier g:qbezier quit g:quit r-text g:r-text readonly g:readonly rect g:rect refresh g:refresh +Builtin restore g:restore root g:root root-item-visible g:root-item-visible rotate g:rotate rowheight g:rowheight +Builtin rrect g:rrect s>path g:s>path save g:save say g:say scale g:scale scolor g:scolor scrollthickness g:scrollthickness +Builtin sectionenable g:sectionenable select! g:select! select@ g:select@ selected-rows g:selected-rows +Builtin set-lasso g:set-lasso set-long-press g:set-long-press set-popup-font g:set-popup-font set-range g:set-range +Builtin set-swipe g:set-swipe set-value g:set-value setcursor g:setcursor setfont g:setfont setheader g:setheader +Builtin sethtml g:sethtml setimage g:setimage setname g:setname setroot g:setroot settab g:settab show g:show +Builtin show-line-numbers g:show-line-numbers show-pct g:show-pct showmenu g:showmenu showtooltip g:showtooltip +Builtin size g:size size? g:size? skin g:skin skin-class g:skin-class stackix g:stackix state g:state +Builtin state? g:state? stepsize g:stepsize stroke g:stroke stroke-fill g:stroke-fill style g:style +Builtin tabname g:tabname text g:text text-box-style g:text-box-style text? g:text? textcolor g:textcolor +Builtin textsize g:textsize timer! g:timer! timer@ g:timer@ toback g:toback tofront g:tofront toggle-row g:toggle-row +Builtin tooltip g:tooltip top g:top transition g:transition translate g:translate tree-open g:tree-open +Builtin triangle g:triangle update g:update updateitems g:updateitems url g:url user g:user user! g:user! +Builtin vertical g:vertical view g:view visible? g:visible? vpos! g:vpos! vpos@ g:vpos@ waitcursor g:waitcursor +Builtin winding g:winding xy g:xy xy? g:xy? +edge gr:+edge +edge+w gr:+edge+w +node gr:+node connect gr:connect +Builtin edges gr:edges m! gr:m! m@ gr:m@ neighbors gr:neighbors new gr:new node-edges gr:node-edges +Builtin nodes gr:nodes traverse gr:traverse + h:+ clear h:clear len h:len new h:new peek h:peek pop h:pop +Builtin push h:push unique h:unique arm? hw:arm? camera hw:camera camera-fmt hw:camera-fmt camera-img hw:camera-img +Builtin camera? hw:camera? cpu? hw:cpu? device? hw:device? displays? hw:displays? displaysize? hw:displaysize? +Builtin err? hw:err? gpio hw:gpio gpio! hw:gpio! gpio-mmap hw:gpio-mmap gpio@ hw:gpio@ i2c hw:i2c i2c! hw:i2c! +Builtin i2c!reg hw:i2c!reg i2c@ hw:i2c@ i2c@reg hw:i2c@reg isround? hw:isround? iswatch? hw:iswatch? +Builtin mac? hw:mac? mem? hw:mem? poll hw:poll sensor hw:sensor start hw:start stop hw:stop fetch-full imap:fetch-full +Builtin fetch-uid-mail imap:fetch-uid-mail login imap:login new imap:new select-inbox imap:select-inbox +Builtin >file img:>file copy img:copy crop img:crop data img:data desat img:desat fill img:fill filter img:filter +Builtin flip img:flip from-svg img:from-svg new img:new pix! img:pix! pix@ img:pix@ qr-gen img:qr-gen +Builtin qr-parse img:qr-parse rotate img:rotate scale img:scale scroll img:scroll size img:size countries iso:countries +Builtin find loc:find sort loc:sort ! m:! !? m:!? + m:+ +? m:+? - m:- @ m:@ @? m:@? @@ m:@@ clear m:clear +Builtin data m:data each m:each exists? m:exists? iter m:iter iter-all m:iter-all keys m:keys len m:len +Builtin map m:map new m:new op! m:op! open m:open vals m:vals xchg m:xchg ! mat:! * mat:* + mat:+ = mat:= +Builtin @ mat:@ col mat:col data mat:data det mat:det dim? mat:dim? get-n mat:get-n ident mat:ident +Builtin m. mat:m. minor mat:minor n* mat:n* new mat:new row mat:row same-size? mat:same-size? trans mat:trans +Builtin ! n:! * n:* */ n:*/ + n:+ +! n:+! - n:- / n:/ /mod n:/mod 1+ n:1+ 1- n:1- < n:< = n:= > n:> +Builtin BIGE n:BIGE BIGPI n:BIGPI E n:E PI n:PI ^ n:^ abs n:abs acos n:acos acos n:acos asin n:asin +Builtin asin n:asin atan n:atan atan n:atan atan2 n:atan2 band n:band between n:between bfloat n:bfloat +Builtin bic n:bic bint n:bint binv n:binv bnot n:bnot bor n:bor bxor n:bxor ceil n:ceil clamp n:clamp +Builtin cmp n:cmp comb n:comb cos n:cos cosd n:cosd exp n:exp expmod n:expmod float n:float floor n:floor +Builtin fmod n:fmod frac n:frac gcd n:gcd int n:int invmod n:invmod kind? n:kind? lcm n:lcm ln n:ln +Builtin max n:max median n:median min n:min mod n:mod neg n:neg odd? n:odd? perm n:perm prime? n:prime? +Builtin quantize n:quantize quantize! n:quantize! r+ n:r+ range n:range rot32l n:rot32l rot32r n:rot32r +Builtin round n:round round2 n:round2 running-variance n:running-variance running-variance-finalize n:running-variance-finalize +Builtin sgn n:sgn shl n:shl shr n:shr sin n:sin sind n:sind sqr n:sqr sqrt n:sqrt tan n:tan tand n:tand +Builtin trunc n:trunc ~= n:~= ! net:! >url net:>url @ net:@ DGRAM net:DGRAM INET4 net:INET4 INET6 net:INET6 +Builtin PROTO_TCP net:PROTO_TCP PROTO_UDP net:PROTO_UDP STREAM net:STREAM accept net:accept addrinfo>o net:addrinfo>o +Builtin again? net:again? alloc-and-read net:alloc-and-read alloc-buf net:alloc-buf bind net:bind browse net:browse +Builtin close net:close connect net:connect err>s net:err>s err? net:err? get net:get getaddrinfo net:getaddrinfo +Builtin getpeername net:getpeername head net:head ifaces? net:ifaces? listen net:listen net-socket net:net-socket +Builtin opts net:opts port-is-ssl? net:port-is-ssl? post net:post proxy! net:proxy! read net:read recvfrom net:recvfrom +Builtin s>url net:s>url sendto net:sendto server net:server setsockopt net:setsockopt socket net:socket +Builtin tlshello net:tlshello url> net:url> user-agent net:user-agent wait net:wait write net:write +Builtin MAX ns:MAX cast ptr:cast len ptr:len pack ptr:pack unpack ptr:unpack unpack_orig ptr:unpack_orig +Builtin + q:+ clear q:clear len q:len new q:new notify q:notify overwrite q:overwrite peek q:peek pick q:pick +Builtin pop q:pop push q:push shift q:shift size q:size slide q:slide throwing q:throwing wait q:wait +Builtin ++match r:++match +/ r:+/ +match r:+match / r:/ @ r:@ err? r:err? len r:len match r:match new r:new +Builtin rx r:rx str r:str ! s:! * s:* + s:+ - s:- / s:/ /scripts s:/scripts <+ s:<+ = s:= =ic s:=ic +Builtin >base64 s:>base64 >ucs2 s:>ucs2 @ s:@ append s:append base64> s:base64> clear s:clear cmp s:cmp +Builtin cmpi s:cmpi compress s:compress days! s:days! each s:each eachline s:eachline expand s:expand +Builtin fill s:fill fmt s:fmt gershayim s:gershayim globmatch s:globmatch hexupr s:hexupr insert s:insert +Builtin intl s:intl intl! s:intl! lang s:lang lc s:lc len s:len lsub s:lsub ltrim s:ltrim map s:map +Builtin months! s:months! new s:new replace s:replace replace! s:replace! rev s:rev rsearch s:rsearch +Builtin rsub s:rsub rtrim s:rtrim script? s:script? search s:search size s:size slice s:slice strfmap s:strfmap +Builtin strfmt s:strfmt trim s:trim tsub s:tsub uc s:uc ucs2> s:ucs2> utf8? s:utf8? zt s:zt close sio:close +Builtin enum sio:enum open sio:open opts! sio:opts! opts@ sio:opts@ read sio:read write sio:write new smtp:new +Builtin send smtp:send apply-filter snd:apply-filter devices? snd:devices? end-record snd:end-record +Builtin filter snd:filter formats? snd:formats? freq snd:freq gain snd:gain gain? snd:gain? len snd:len +Builtin loop snd:loop mix snd:mix new snd:new pause snd:pause play snd:play played snd:played rate snd:rate +Builtin record snd:record seek snd:seek stop snd:stop stopall snd:stopall unmix snd:unmix volume snd:volume +Builtin volume? snd:volume? + st:+ . st:. clear st:clear len st:len ndrop st:ndrop new st:new op! st:op! +Builtin peek st:peek pick st:pick pop st:pop push st:push roll st:roll shift st:shift size st:size +Builtin slide st:slide swap st:swap throwing st:throwing >buf struct:>buf arr> struct:arr> buf struct:buf +Builtin buf> struct:buf> byte struct:byte double struct:double field! struct:field! field@ struct:field@ +Builtin float struct:float ignore struct:ignore int struct:int long struct:long struct; struct:struct; +Builtin word struct:word ! t:! @ t:@ assign t:assign curtask t:curtask def-queue t:def-queue def-stack t:def-stack +Builtin done? t:done? err! t:err! err? t:err? getq t:getq guitask t:guitask handler t:handler kill t:kill +Builtin list t:list main t:main name! t:name! name@ t:name@ notify t:notify pop t:pop priority t:priority +Builtin push t:push push< t:push< q-notify t:q-notify q-wait t:q-wait qlen t:qlen result t:result task t:task +Builtin task-n t:task-n task-stop t:task-stop wait t:wait ! w:! @ w:@ alias: w:alias: cb w:cb deprecate w:deprecate +Builtin exec w:exec exec? w:exec? ffifail w:ffifail find w:find forget w:forget is w:is undo w:undo +Builtin >s xml:>s >txt xml:>txt parse xml:parse parse-html xml:parse-html parse-stream xml:parse-stream +Builtin getmsg[] zmq:getmsg[] sendmsg[] zmq:sendmsg[] +" numbers +syn keyword eighthMath decimal hex base@ base! +syn match eighthInteger '\<-\=[0-9.]*[0-9.]\+\>' +" recognize hex and binary numbers, the '$' and '%' notation is for eighth +syn match eighthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess +syn match eighthInteger '\<\x*\d\x*\>' " *2* --- this order! +syn match eighthInteger '\<%[0-1]*[0-1]\+\>' +syn match eighthInteger "\<'.\>" + +" Strings +syn region eighthString start=+\.\?\"+ skip=+"+ end=+$+ +syn keyword jsonNull null +syn keyword jsonBool /\(true\|false\)/ + syn region eighthString start=/\<"/ end=/"\>/ +syn match jsonObjEntry /"\"[^"]\+\"\ze\s*:/ + +"syn region jsonObject start=/{/ end=/}/ contained contains=jsonObjEntry,jsonArray,jsonObject, jsonBool, eighthString +"syn region jsonArray start=/\[/ end=/\]/ contained contains=jsonArray,jsonObject, jsonBool, eighthString + +" Include files +" syn match eighthInclude '\<\(libinclude\|include\|needs\)\s\+\S\+' +syn region eighthComment start="\zs\\" end="$" contains=eighthTodo + +" Define the default highlighting. +if !exists("did_eighth_syntax_inits") + let did_eighth_syntax_inits=1 + " The default methods for highlighting. Can be overriden later. + hi def link eighthTodo Todo + hi def link eighthOperators Operator + hi def link eighthMath Number + hi def link eighthInteger Number + hi def link eighthStack Special + hi def link eighthFStack Special + hi def link eighthSP Special + hi def link eighthColonDef Define + hi def link eighthColonName Operator + hi def link eighthEndOfColonDef Define + hi def link eighthDefine Define + hi def link eighthDebug Debug + hi def link eighthCharOps Character + hi def link eighthConversion String + hi def link eighthForth Statement + hi def link eighthVocs Statement + hi def link eighthString String + hi def link eighthComment Comment + hi def link eighthClassDef Define + hi def link eighthEndOfClassDef Define + hi def link eighthObjectDef Define + hi def link eighthEndOfObjectDef Define + hi def link eighthInclude Include + hi def link eighthBuiltin Define + hi def link eighthClasses Define + hi def link eighthClassWord Keyword + + hi def link jsonObject Delimiter + hi def link jsonObjEntry Label + hi def link jsonArray Special + hi def link jsonNull Function + hi def link jsonBool Boolean +endif + +let b:current_syntax = "8th" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8:sw=4:nocindent:smartindent: + +endif diff --git a/syntax/a2ps.vim b/syntax/a2ps.vim new file mode 100644 index 00000000..3c0900e9 --- /dev/null +++ b/syntax/a2ps.vim @@ -0,0 +1,75 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 + +" Vim syntax file +" Language: a2ps(1) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword a2psPreProc Include + \ nextgroup=a2psKeywordColon + +syn keyword a2psMacro UserOption + \ nextgroup=a2psKeywordColon + +syn keyword a2psKeyword LibraryPath AppendLibraryPath PrependLibraryPath + \ Options Medium Printer UnknownPrinter + \ DefaultPrinter OutputFirstLine + \ PageLabelFormat Delegation FileCommand + \ nextgroup=a2psKeywordColon + +syn match a2psKeywordColon contained display ':' + +syn keyword a2psKeyword Variable nextgroup=a2psVariableColon + +syn match a2psVariableColon contained display ':' + \ nextgroup=a2psVariable skipwhite + +syn match a2psVariable contained display '[^ \t:(){}]\+' + \ contains=a2psVarPrefix + +syn match a2psVarPrefix contained display + \ '\<\%(del\|pro\|ps\|pl\|toc\|user\|\)\ze\.' + +syn match a2psLineCont display '\\$' + +syn match a2psSubst display '$\%(-\=.\=\d\+\)\=\h\d\=' +syn match a2psSubst display '#[?!]\=\w\d\=' +syn match a2psSubst display '#{[^}]\+}' + +syn region a2psString display oneline start=+'+ end=+'+ + \ contains=a2psSubst + +syn region a2psString display oneline start=+"+ end=+"+ + \ contains=a2psSubst + +syn keyword a2psTodo contained TODO FIXME XXX NOTE + +syn region a2psComment display oneline start='^\s*#' end='$' + \ contains=a2psTodo,@Spell + +hi def link a2psTodo Todo +hi def link a2psComment Comment +hi def link a2psPreProc PreProc +hi def link a2psMacro Macro +hi def link a2psKeyword Keyword +hi def link a2psKeywordColon Delimiter +hi def link a2psVariableColon Delimiter +hi def link a2psVariable Identifier +hi def link a2psVarPrefix Type +hi def link a2psLineCont Special +hi def link a2psSubst PreProc +hi def link a2psString String + +let b:current_syntax = "a2ps" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/a65.vim b/syntax/a65.vim new file mode 100644 index 00000000..01215767 --- /dev/null +++ b/syntax/a65.vim @@ -0,0 +1,157 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a65') == -1 + +" Vim syntax file +" Language: xa 6502 cross assembler +" Maintainer: Clemens Kirchgatterer <clemens@1541.org> +" Last Change: 2016 Aug 31 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" Opcodes +syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address + +" Addresses +syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)" + +" Numbers +syn match a65Number "#\=[0-9]*\>" +syn match a65Number "#\=$[0-9A-F]*\>" +syn match a65Number "#\=&[0-7]*\>" +syn match a65Number "#\=%[01]*\>" + +syn case match + +" Types +syn match a65Type "\(^\|\s\)\.byt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.word\($\|\s\)" +syn match a65Type "\(^\|\s\)\.asc\($\|\s\)" +syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)" +syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.text\($\|\s\)" +syn match a65Type "\(^\|\s\)\.data\($\|\s\)" +syn match a65Type "\(^\|\s\)\.bss\($\|\s\)" +syn match a65Type "\(^\|\s\)\.zero\($\|\s\)" +syn match a65Type "\(^\|\s\)\.align\($\|\s\)" + +" Blocks +syn match a65Section "\(^\|\s\)\.(\($\|\s\)" +syn match a65Section "\(^\|\s\)\.)\($\|\s\)" + +" Strings +syn match a65String "\".*\"" + +" Programm Counter +syn region a65PC start="\*=" end="\>" keepend + +" HI/LO Byte +syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend + +" Comments +syn keyword a65Todo TODO XXX FIXME BUG contained +syn match a65Comment ";.*"hs=s+1 contains=a65Todo +syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment + +" Preprocessor +syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue +syn match a65End excludenl /end$/ contained +syn match a65Continue "\\$" contained + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link a65Section Special +hi def link a65Address Special +hi def link a65Comment Comment +hi def link a65PreProc PreProc +hi def link a65Number Number +hi def link a65String String +hi def link a65Type Statement +hi def link a65Opcode Type +hi def link a65PC Error +hi def link a65Todo Todo +hi def link a65HiLo Number + + +let b:current_syntax = "a65" + +endif diff --git a/syntax/aap.vim b/syntax/aap.vim new file mode 100644 index 00000000..7c443ac2 --- /dev/null +++ b/syntax/aap.vim @@ -0,0 +1,162 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 + +" Vim syntax file +" Language: A-A-P recipe +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2004 Jun 13 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn include @aapPythonScript syntax/python.vim + +syn match aapVariable /$[-+?*="'\\!]*[a-zA-Z0-9_.]*/ +syn match aapVariable /$[-+?*="'\\!]*([a-zA-Z0-9_.]*)/ +syn keyword aapTodo contained TODO Todo +syn match aapString +'[^']\{-}'+ +syn match aapString +"[^"]\{-}"+ + +syn match aapCommand '^\s*:action\>' +syn match aapCommand '^\s*:add\>' +syn match aapCommand '^\s*:addall\>' +syn match aapCommand '^\s*:asroot\>' +syn match aapCommand '^\s*:assertpkg\>' +syn match aapCommand '^\s*:attr\>' +syn match aapCommand '^\s*:attribute\>' +syn match aapCommand '^\s*:autodepend\>' +syn match aapCommand '^\s*:buildcheck\>' +syn match aapCommand '^\s*:cd\>' +syn match aapCommand '^\s*:chdir\>' +syn match aapCommand '^\s*:checkin\>' +syn match aapCommand '^\s*:checkout\>' +syn match aapCommand '^\s*:child\>' +syn match aapCommand '^\s*:chmod\>' +syn match aapCommand '^\s*:commit\>' +syn match aapCommand '^\s*:commitall\>' +syn match aapCommand '^\s*:conf\>' +syn match aapCommand '^\s*:copy\>' +syn match aapCommand '^\s*:del\>' +syn match aapCommand '^\s*:deldir\>' +syn match aapCommand '^\s*:delete\>' +syn match aapCommand '^\s*:delrule\>' +syn match aapCommand '^\s*:dll\>' +syn match aapCommand '^\s*:do\>' +syn match aapCommand '^\s*:error\>' +syn match aapCommand '^\s*:execute\>' +syn match aapCommand '^\s*:exit\>' +syn match aapCommand '^\s*:export\>' +syn match aapCommand '^\s*:fetch\>' +syn match aapCommand '^\s*:fetchall\>' +syn match aapCommand '^\s*:filetype\>' +syn match aapCommand '^\s*:finish\>' +syn match aapCommand '^\s*:global\>' +syn match aapCommand '^\s*:import\>' +syn match aapCommand '^\s*:include\>' +syn match aapCommand '^\s*:installpkg\>' +syn match aapCommand '^\s*:lib\>' +syn match aapCommand '^\s*:local\>' +syn match aapCommand '^\s*:log\>' +syn match aapCommand '^\s*:ltlib\>' +syn match aapCommand '^\s*:mkdir\>' +syn match aapCommand '^\s*:mkdownload\>' +syn match aapCommand '^\s*:move\>' +syn match aapCommand '^\s*:pass\>' +syn match aapCommand '^\s*:popdir\>' +syn match aapCommand '^\s*:produce\>' +syn match aapCommand '^\s*:program\>' +syn match aapCommand '^\s*:progsearch\>' +syn match aapCommand '^\s*:publish\>' +syn match aapCommand '^\s*:publishall\>' +syn match aapCommand '^\s*:pushdir\>' +syn match aapCommand '^\s*:quit\>' +syn match aapCommand '^\s*:recipe\>' +syn match aapCommand '^\s*:refresh\>' +syn match aapCommand '^\s*:remove\>' +syn match aapCommand '^\s*:removeall\>' +syn match aapCommand '^\s*:require\>' +syn match aapCommand '^\s*:revise\>' +syn match aapCommand '^\s*:reviseall\>' +syn match aapCommand '^\s*:route\>' +syn match aapCommand '^\s*:rule\>' +syn match aapCommand '^\s*:start\>' +syn match aapCommand '^\s*:symlink\>' +syn match aapCommand '^\s*:sys\>' +syn match aapCommand '^\s*:sysdepend\>' +syn match aapCommand '^\s*:syspath\>' +syn match aapCommand '^\s*:system\>' +syn match aapCommand '^\s*:tag\>' +syn match aapCommand '^\s*:tagall\>' +syn match aapCommand '^\s*:toolsearch\>' +syn match aapCommand '^\s*:totype\>' +syn match aapCommand '^\s*:touch\>' +syn match aapCommand '^\s*:tree\>' +syn match aapCommand '^\s*:unlock\>' +syn match aapCommand '^\s*:update\>' +syn match aapCommand '^\s*:usetool\>' +syn match aapCommand '^\s*:variant\>' +syn match aapCommand '^\s*:verscont\>' + +syn match aapCommand '^\s*:print\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:print\>' nextgroup=aapPipeEnd contained +syn match aapCommand '^\s*:cat\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:cat\>' nextgroup=aapPipeEnd contained +syn match aapCommand '^\s*:syseval\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:syseval\>' nextgroup=aapPipeEnd contained +syn match aapPipeCmd '\s*:assign\>' contained +syn match aapCommand '^\s*:eval\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:eval\>' nextgroup=aapPipeEndPy contained +syn match aapPipeCmd '\s*:tee\>' nextgroup=aapPipeEnd contained +syn match aapPipeCmd '\s*:log\>' nextgroup=aapPipeEnd contained +syn match aapPipeEnd '[^|]*|' nextgroup=aapPipeCmd contained skipnl +syn match aapPipeEndPy '[^|]*|' nextgroup=aapPipeCmd contained skipnl contains=@aapPythonScript +syn match aapPipeStart '^\s*|' nextgroup=aapPipeCmd + +" +" A Python line starts with @. Can be continued with a trailing backslash. +syn region aapPythonRegion start="\s*@" skip='\\$' end=+$+ contains=@aapPythonScript keepend +" +" A Python block starts with ":python" and continues so long as the indent is +" bigger. +syn region aapPythonRegion matchgroup=aapCommand start="\z(\s*\):python" skip='\n\z1\s\|\n\s*\n' end=+$+ contains=@aapPythonScript + +" A Python expression is enclosed in backticks. +syn region aapPythonRegion start="`" skip="``" end="`" contains=@aapPythonScript + +" TODO: There is something wrong with line continuation. +syn match aapComment '#.*' contains=aapTodo +syn match aapComment '#.*\(\\\n.*\)' contains=aapTodo + +syn match aapSpecial '$#' +syn match aapSpecial '$\$' +syn match aapSpecial '$(.)' + +" A heredoc assignment. +syn region aapHeredoc start="^\s*\k\+\s*$\=+\=?\=<<\s*\z(\S*\)"hs=e+1 end="^\s*\z1\s*$"he=s-1 + +" Syncing is needed for ":python" and "VAR << EOF". Don't use Python syncing +syn sync clear +syn sync fromstart + +" The default highlighting. +hi def link aapTodo Todo +hi def link aapString String +hi def link aapComment Comment +hi def link aapSpecial Special +hi def link aapVariable Identifier +hi def link aapPipeCmd aapCommand +hi def link aapCommand Statement +hi def link aapHeredoc Constant + +let b:current_syntax = "aap" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 + +endif diff --git a/syntax/abap.vim b/syntax/abap.vim new file mode 100644 index 00000000..7115c3d8 --- /dev/null +++ b/syntax/abap.vim @@ -0,0 +1,199 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 + +" Vim ABAP syntax file +" Language: SAP - ABAP/R4 +" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com> +" Last Change: 2018 Dec 12 +" Comment: Thanks to EPI-USE Labs for all your assistance. :) + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Always ignore case +syn case ignore + +" Symbol Operators (space delimited) +syn match abapSymbolOperator "\W+\W" +syn match abapSymbolOperator "\W-\W" +syn match abapSymbolOperator "\W/\W" +syn match abapSymbolOperator "\W%\W" +syn match abapSymbolOperator "\W=\W" +syn match abapSymbolOperator "\W<\W" +syn match abapSymbolOperator "\W>\W" +syn match abapSymbolOperator "\W\*\W" +syn match abapSymbolOperator "\W[<>]=\W" +syn match abapSymbolOperator "\W<>\W" +syn match abapSymbolOperator "\W\*\*\W" +syn match abapSymbolOperator "\[\]" +syn match abapSymbolOperator "->\*\?" +syn match abapSymbolOperator "=>" +syn match abapSymbolOperator "[()~:,\.&$]" + +" Literals +syn region abapCharString matchgroup=abapCharString start="'" end="'" contains=abapCharStringEscape +syn match abapCharStringEscape contained "''" + +syn region abapString matchgroup=abapString start="`" end="`" contains=abapStringEscape +syn match abapStringEscape contained "``" + +syn match abapNumber "\-\=\<\d\+\>" +syn region abapHex matchgroup=abapHex start="X'" end="'" + +setlocal iskeyword=48-57,_,A-Z,a-z,/ + +syn match abapNamespace "\</\w\+/" + +" multi-word statements +syn match abapComplexStatement "\<\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\>" +syn match abapComplexStatement "\<NO\W\+STANDARD\W\+PAGE\W\+HEADING\>" +syn match abapComplexStatement "\<\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\>" +syn match abapComplexStatement "\<\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\>" +syn match abapComplexStatement "\<\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\>" +syn match abapComplexStatement "\<NO\W\+INTERVALS\>" +syn match abapComplexStatement "\<RESPECTING\W\+BLANKS\>" +syn match abapComplexStatement "\<SEPARATED\W\+BY\>" +syn match abapComplexStatement "\<USING\(\W\+EDIT\W\+MASK\)\?\>" +syn match abapComplexStatement "\<WHERE\(\W\+LINE\)\?\>" +syn match abapComplexStatement "\<GET\W\+\(TIME\(\W\+STAMP\)\?\(\W\+FIELD\)\?\|PF-STATUS\|BADI\|BIT\|CONNECTION\|CURSOR\|REFERENCE\W\+OF\)\>" +syn match abapComplexStatement "\<RADIOBUTTON\W\+GROUP\>" +syn match abapComplexStatement "\<REF\W\+TO\>" +syn match abapComplexStatement "\<\(PUBLIC\|PRIVATE\|PROTECTED\)\(\W\+SECTION\)\?\>" +syn match abapComplexStatement "\<DELETING\W\+\(TRAILING\|LEADING\)\>" +syn match abapComplexStatement "\<\(ALL\W\+OCCURRENCES\)\|\(\(FIRST\|LAST\)\W\+OCCURRENCE\)\>" +syn match abapComplexStatement "\<INHERITING\W\+FROM\>" +syn match abapComplexStatement "\<\(UP\W\+\)\?TO\>" + +" hyphenated-word statements +syn match abapComplexStatement "\<LINE-COUNT\>" +syn match abapComplexStatement "\<ADD-CORRESPONDING\>" +syn match abapComplexStatement "\<AUTHORITY-CHECK\>" +syn match abapComplexStatement "\<BREAK-POINT\>" +syn match abapComplexStatement "\<CLASS-DATA\>" +syn match abapComplexStatement "\<CLASS-METHODS\>" +syn match abapComplexStatement "\<CLASS-METHOD\>" +syn match abapComplexStatement "\<DIVIDE-CORRESPONDING\>" +syn match abapComplexStatement "\<EDITOR-CALL\>" +syn match abapComplexStatement "\<END-OF-DEFINITION\>" +syn match abapComplexStatement "\<END-OF-PAGE\>" +syn match abapComplexStatement "\<END-OF-SELECTION\>" +syn match abapComplexStatement "\<FIELD-GROUPS\>" +syn match abapComplexStatement "\<FIELD-SYMBOLS\>" +syn match abapComplexStatement "\<FUNCTION-POOL\>" +syn match abapComplexStatement "\<IS\W\+\(NOT\W\+\)\?\(ASSIGNED\|BOUND\|INITIAL\|SUPPLIED\)\>" +syn match abapComplexStatement "\<MOVE-CORRESPONDING\>" +syn match abapComplexStatement "\<MULTIPLY-CORRESPONDING\>" +syn match abapComplexStatement "\<NEW-LINE\>" +syn match abapComplexStatement "\<NEW-PAGE\>" +syn match abapComplexStatement "\<NEW-SECTION\>" +syn match abapComplexStatement "\<PRINT-CONTROL\>" +syn match abapComplexStatement "\<RP-PROVIDE-FROM-LAST\>" +syn match abapComplexStatement "\<SELECT-OPTIONS\>" +syn match abapComplexStatement "\<SELECTION-SCREEN\>" +syn match abapComplexStatement "\<START-OF-SELECTION\>" +syn match abapComplexStatement "\<SUBTRACT-CORRESPONDING\>" +syn match abapComplexStatement "\<SYNTAX-CHECK\>" +syn match abapComplexStatement "\<SYNTAX-TRACE\>" +syn match abapComplexStatement "\<TOP-OF-PAGE\>" +syn match abapComplexStatement "\<TYPE-POOL\>" +syn match abapComplexStatement "\<TYPE-POOLS\>" +syn match abapComplexStatement "\<LINE-SIZE\>" +syn match abapComplexStatement "\<LINE-COUNT\>" +syn match abapComplexStatement "\<MESSAGE-ID\>" +syn match abapComplexStatement "\<DISPLAY-MODE\>" +syn match abapComplexStatement "\<READ\(-ONLY\)\?\>" + +" ABAP statements +syn keyword abapStatement ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT +syn keyword abapStatement BACK +syn keyword abapStatement CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY +syn keyword abapStatement DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO +syn keyword abapStatement ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT +syn keyword abapStatement FETCH FIELDS FORM FORMAT FREE FROM FUNCTION +syn keyword abapStatement GENERATE +syn keyword abapStatement HIDE +syn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION +syn keyword abapStatement LEAVE LIKE LINE LOAD LOCAL LOOP +syn keyword abapStatement MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY +syn keyword abapStatement ON OVERLAY OPTIONAL OTHERS +syn keyword abapStatement PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT +syn keyword abapStatement RAISE RANGES RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK +syn keyword abapStatement SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS +syn keyword abapStatement TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES +syn keyword abapStatement UNASSIGN ULINE UNPACK UPDATE +syn keyword abapStatement WHEN WHILE WINDOW WRITE + +" More statemets +syn keyword abapStatement LINES +syn keyword abapStatement INTO GROUP BY HAVING ORDER BY SINGLE +syn keyword abapStatement APPENDING CORRESPONDING FIELDS OF TABLE +syn keyword abapStatement LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER ROWS CONNECTING +syn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTY +syn keyword abapStatement CASTING APPEND RAISING VALUE COLOR +syn keyword abapStatement CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT +syn keyword abapStatement ID NUMBER FOR TITLE OUTPUT + +" Special ABAP specific tables: +syn match abapSpecialTables "\<\(sy\|\(hrp\|p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 contained +syn match abapStructure "\<\w\+-[^\>]"me=e-2 contains=abapSpecialTables,abapStatement,abapComplexStatement +syn match abapField "-\w\+"ms=s+1 + +" Pointer +syn match abapSpecial "<\w\+>" + +" Abap common constants: +syn keyword abapSpecial TRUE FALSE NULL SPACE + +" Includes +syn region abapInclude start="include" end="." contains=abapComment + +" Types +syn keyword abapTypes c n i int8 p f d t x string xstring decfloat16 decfloat34 + +" Atritmitic operators +syn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tan +syn keyword abapOperator cosh sinh tanh exp log log10 sqrt + +" String operators +syn keyword abapStatement strlen xstrlen charlen numofchar dbmaxlen + +syn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN + +" An error? Not strictly... but cannot think of reason this is intended. +syn match abapError "\.\." + +" Comments +syn region abapComment start="^\*" end="$" contains=abapTodo +syn match abapComment "\".*" contains=abapTodo +syn keyword abapTodo contained TODO NOTE +syn match abapTodo "\#EC\W\+\w\+" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link abapError Error +hi def link abapComment Comment +hi def link abapInclude Include +hi def link abapStatement Statement +hi def link abapComplexStatement Statement +hi def link abapSpecial Special +hi def link abapNamespace Special +hi def link abapSpecialTables Special +hi def link abapSymbolOperator abapOperator +hi def link abapOperator Operator +hi def link abapCharString String +hi def link abapString String +hi def link abapFloat Float +hi def link abapTypes Type +hi def link abapSymbol Structure +hi def link abapStructure Structure +hi def link abapField Variable +hi def link abapNumber Number +hi def link abapHex Number + + +let b:current_syntax = "abap" + +" vim: ts=8 sw=2 +endif diff --git a/syntax/abaqus.vim b/syntax/abaqus.vim new file mode 100644 index 00000000..a54e9fe8 --- /dev/null +++ b/syntax/abaqus.vim @@ -0,0 +1,39 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 + +" Vim syntax file +" Language: Abaqus finite element input file (www.hks.com) +" Maintainer: Carl Osterwisch <osterwischc@asme.org> +" Last Change: 2002 Feb 24 +" Remark: Huge improvement in folding performance--see filetype plugin + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Abaqus comment lines +syn match abaqusComment "^\*\*.*$" + +" Abaqus keyword lines +syn match abaqusKeywordLine "^\*\h.*" contains=abaqusKeyword,abaqusParameter,abaqusValue display +syn match abaqusKeyword "^\*\h[^,]*" contained display +syn match abaqusParameter ",[^,=]\+"lc=1 contained display +syn match abaqusValue "=\s*[^,]*"lc=1 contained display + +" Illegal syntax +syn match abaqusBadLine "^\s\+\*.*" display + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +hi def link abaqusComment Comment +hi def link abaqusKeyword Statement +hi def link abaqusParameter Identifier +hi def link abaqusValue Constant +hi def link abaqusBadLine Error + + +let b:current_syntax = "abaqus" + +endif diff --git a/syntax/abc.vim b/syntax/abc.vim new file mode 100644 index 00000000..a44a929d --- /dev/null +++ b/syntax/abc.vim @@ -0,0 +1,55 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abc') == -1 + +" Vim syntax file +" Language: abc music notation language +" Maintainer: James Allwright <J.R.Allwright@westminster.ac.uk> +" URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim +" Last Change: 27th April 2001 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" tags +syn region abcGuitarChord start=+"[A-G]+ end=+"+ contained +syn match abcNote "z[1-9]*[0-9]*" contained +syn match abcNote "z[1-9]*[0-9]*/[248]\=" contained +syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*" contained +syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*/[248]\=" contained +syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*" contained +syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*/[248]\=" contained +syn match abcBar "|" contained +syn match abcBar "[:|][:|]" contained +syn match abcBar ":|2" contained +syn match abcBar "|1" contained +syn match abcBar "\[[12]" contained +syn match abcTuple "([1-9]\+:\=[0-9]*:\=[0-9]*" contained +syn match abcBroken "<\|<<\|<<<\|>\|>>\|>>>" contained +syn match abcTie "-" +syn match abcHeadField "^[A-EGHIK-TVWXZ]:.*$" contained +syn match abcBodyField "^[KLMPQWVw]:.*$" contained +syn region abcHeader start="^X:" end="^K:.*$" contained contains=abcHeadField,abcComment keepend +syn region abcTune start="^X:" end="^ *$" contains=abcHeader,abcComment,abcBar,abcNote,abcBodyField,abcGuitarChord,abcTuple,abcBroken,abcTie +syn match abcComment "%.*$" + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link abcComment Comment +hi def link abcHeadField Type +hi def link abcBodyField Special +hi def link abcBar Statement +hi def link abcTuple Statement +hi def link abcBroken Statement +hi def link abcTie Statement +hi def link abcGuitarChord Identifier +hi def link abcNote Constant + + +let b:current_syntax = "abc" + +" vim: ts=4 + +endif diff --git a/syntax/abel.vim b/syntax/abel.vim new file mode 100644 index 00000000..4cd9e35f --- /dev/null +++ b/syntax/abel.vim @@ -0,0 +1,165 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abel') == -1 + +" Vim syntax file +" Language: ABEL +" Maintainer: John Cook <johncook3@gmail.com> +" Last Change: 2011 Dec 27 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" this language is oblivious to case +syn case ignore + +" A bunch of keywords +syn keyword abelHeader module title device options +syn keyword abelSection declarations equations test_vectors end +syn keyword abelDeclaration state truth_table state_diagram property +syn keyword abelType pin node attribute constant macro library + +syn keyword abelTypeId com reg neg pos buffer dc reg_d reg_t contained +syn keyword abelTypeId reg_sr reg_jk reg_g retain xor invert contained + +syn keyword abelStatement when then else if with endwith case endcase +syn keyword abelStatement fuses expr trace + +" option to omit obsolete statements +if exists("abel_obsolete_ok") + syn keyword abelStatement enable flag in +else + syn keyword abelError enable flag in +endif + +" directives +syn match abelDirective "@alternate" +syn match abelDirective "@standard" +syn match abelDirective "@const" +syn match abelDirective "@dcset" +syn match abelDirective "@include" +syn match abelDirective "@page" +syn match abelDirective "@radix" +syn match abelDirective "@repeat" +syn match abelDirective "@irp" +syn match abelDirective "@expr" +syn match abelDirective "@if" +syn match abelDirective "@ifb" +syn match abelDirective "@ifnb" +syn match abelDirective "@ifdef" +syn match abelDirective "@ifndef" +syn match abelDirective "@ifiden" +syn match abelDirective "@ifniden" + +syn keyword abelTodo contained TODO XXX FIXME + +" wrap up type identifiers to differentiate them from normal strings +syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelTypeId,abelTypeIdEnd keepend +syn match abelTypeIdChar "[,']" contained +syn match abelTypeIdEnd ";" contained + +" string contstants and special characters within them +syn match abelSpecial contained "\\['\\]" +syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial + +" valid integer number formats (decimal, binary, octal, hex) +syn match abelNumber "\<[-+]\=[0-9]\+\>" +syn match abelNumber "\^d[0-9]\+\>" +syn match abelNumber "\^b[01]\+\>" +syn match abelNumber "\^o[0-7]\+\>" +syn match abelNumber "\^h[0-9a-f]\+\>" + +" special characters +" (define these after abelOperator so ?= overrides ?) +syn match abelSpecialChar "[\[\](){},;:?]" + +" operators +syn match abelLogicalOperator "[!#&$]" +syn match abelRangeOperator "\.\." +syn match abelAlternateOperator "[/*+]" +syn match abelAlternateOperator ":[+*]:" +syn match abelArithmeticOperator "[-%]" +syn match abelArithmeticOperator "<<" +syn match abelArithmeticOperator ">>" +syn match abelRelationalOperator "[<>!=]=" +syn match abelRelationalOperator "[<>]" +syn match abelAssignmentOperator "[:?]\==" +syn match abelAssignmentOperator "?:=" +syn match abelTruthTableOperator "->" + +" signal extensions +syn match abelExtension "\.aclr\>" +syn match abelExtension "\.aset\>" +syn match abelExtension "\.clk\>" +syn match abelExtension "\.clr\>" +syn match abelExtension "\.com\>" +syn match abelExtension "\.fb\>" +syn match abelExtension "\.[co]e\>" +syn match abelExtension "\.l[eh]\>" +syn match abelExtension "\.fc\>" +syn match abelExtension "\.pin\>" +syn match abelExtension "\.set\>" +syn match abelExtension "\.[djksrtq]\>" +syn match abelExtension "\.pr\>" +syn match abelExtension "\.re\>" +syn match abelExtension "\.a[pr]\>" +syn match abelExtension "\.s[pr]\>" + +" special constants +syn match abelConstant "\.[ckudfpxz]\." +syn match abelConstant "\.sv[2-9]\." + +" one-line comments +syn region abelComment start=+"+ end=+"\|$+ contains=abelNumber,abelTodo +" option to prevent C++ style comments +if !exists("abel_cpp_comments_illegal") + syn region abelComment start=+//+ end=+$+ contains=abelNumber,abelTodo +endif + +syn sync minlines=1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link abelHeader abelStatement +hi def link abelSection abelStatement +hi def link abelDeclaration abelStatement +hi def link abelLogicalOperator abelOperator +hi def link abelRangeOperator abelOperator +hi def link abelAlternateOperator abelOperator +hi def link abelArithmeticOperator abelOperator +hi def link abelRelationalOperator abelOperator +hi def link abelAssignmentOperator abelOperator +hi def link abelTruthTableOperator abelOperator +hi def link abelSpecifier abelStatement +hi def link abelOperator abelStatement +hi def link abelStatement Statement +hi def link abelIdentifier Identifier +hi def link abelTypeId abelType +hi def link abelTypeIdChar abelType +hi def link abelType Type +hi def link abelNumber abelString +hi def link abelString String +hi def link abelConstant Constant +hi def link abelComment Comment +hi def link abelExtension abelSpecial +hi def link abelSpecialChar abelSpecial +hi def link abelTypeIdEnd abelSpecial +hi def link abelSpecial Special +hi def link abelDirective PreProc +hi def link abelTodo Todo +hi def link abelError Error + + +let b:current_syntax = "abel" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:ts=8 + +endif diff --git a/syntax/acedb.vim b/syntax/acedb.vim new file mode 100644 index 00000000..b382bdd3 --- /dev/null +++ b/syntax/acedb.vim @@ -0,0 +1,114 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acedb') == -1 + +" Vim syntax file +" Language: AceDB model files +" Maintainer: Stewart Morris (Stewart.Morris@ed.ac.uk) +" Last change: Thu Apr 26 10:38:01 BST 2001 +" URL: http://www.ed.ac.uk/~swmorris/vim/acedb.vim + +" Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm +" AceDB software is available from http://www.acedb.org + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn keyword acedbXref XREF +syn keyword acedbModifier UNIQUE REPEAT + +syn case ignore +syn keyword acedbModifier Constraints +syn keyword acedbType DateType Int Text Float + +" Magic tags from: http://genome.cornell.edu/acedocs/magic/summary.html +syn keyword acedbMagic pick_me_to_call No_cache Non_graphic Title +syn keyword acedbMagic Flipped Centre Extent View Default_view +syn keyword acedbMagic From_map Minimal_view Main_Marker Map Includes +syn keyword acedbMagic Mapping_data More_data Position Ends Left Right +syn keyword acedbMagic Multi_Position Multi_Ends With Error Relative +syn keyword acedbMagic Min Anchor Gmap Grid_map Grid Submenus Cambridge +syn keyword acedbMagic No_buttons Columns Colour Surround_colour Tag +syn keyword acedbMagic Scale_unit Cursor Cursor_on Cursor_unit +syn keyword acedbMagic Locator Magnification Projection_lines_on +syn keyword acedbMagic Marker_points Marker_intervals Contigs +syn keyword acedbMagic Physical_genes Two_point Multi_point Likelihood +syn keyword acedbMagic Point_query Point_yellow Point_width +syn keyword acedbMagic Point_pne Point_pe Point_nne Point_ne +syn keyword acedbMagic Derived_tags DT_query DT_width DT_no_duplicates +syn keyword acedbMagic RH_data RH_query RH_spacing RH_show_all +syn keyword acedbMagic Names_on Width Symbol Colours Pne Pe Nne pMap +syn keyword acedbMagic Sequence Gridded FingerPrint In_Situ Cosmid_grid +syn keyword acedbMagic Layout Lines_at Space_at No_stagger A1_labelling +syn keyword acedbMagic DNA Structure From Source Source_Exons +syn keyword acedbMagic Coding CDS Transcript Assembly_tags Allele +syn keyword acedbMagic Display Colour Frame_sensitive Strand_sensitive +syn keyword acedbMagic Score_bounds Percent Bumpable Width Symbol +syn keyword acedbMagic Blixem_N Address E_mail Paper Reference Title +syn keyword acedbMagic Point_1 Point_2 Calculation Full One_recombinant +syn keyword acedbMagic Tested Selected_trans Backcross Back_one +syn keyword acedbMagic Dom_semi Dom_let Direct Complex_mixed Calc +syn keyword acedbMagic Calc_upper_conf Item_1 Item_2 Results A_non_B +syn keyword acedbMagic Score Score_by_offset Score_by_width +syn keyword acedbMagic Right_priority Blastn Blixem Blixem_X +syn keyword acedbMagic Journal Year Volume Page Author +syn keyword acedbMagic Selected One_all Recs_all One_let +syn keyword acedbMagic Sex_full Sex_one Sex_cis Dom_one Dom_selected +syn keyword acedbMagic Calc_distance Calc_lower_conf Canon_for_cosmid +syn keyword acedbMagic Reversed_physical Points Positive Negative +syn keyword acedbMagic Point_error_scale Point_segregate_ordered +syn keyword acedbMagic Point_symbol Interval_JTM Interval_RD +syn keyword acedbMagic EMBL_feature Homol Feature +syn keyword acedbMagic DT_tag Spacer Spacer_colour Spacer_width +syn keyword acedbMagic RH_positive RH_negative RH_contradictory Query +syn keyword acedbMagic Clone Y_remark PCR_remark Hybridizes_to +syn keyword acedbMagic Row Virtual_row Mixed In_pool Subpool B_non_A +syn keyword acedbMagic Interval_SRK Point_show_marginal Subsequence +syn keyword acedbMagic Visible Properties Transposon + +syn match acedbClass "^?\w\+\|^#\w\+" +syn match acedbComment "//.*" +syn region acedbComment start="/\*" end="\*/" +syn match acedbComment "^#\W.*" +syn match acedbHelp "^\*\*\w\+$" +syn match acedbTag "[^^]?\w\+\|[^^]#\w\+" +syn match acedbBlock "//#.\+#$" +syn match acedbOption "^_[DVH]\S\+" +syn match acedbFlag "\s\+-\h\+" +syn match acedbSubclass "^Class" +syn match acedbSubtag "^Visible\|^Is_a_subclass_of\|^Filter\|^Hidden" +syn match acedbNumber "\<\d\+\>" +syn match acedbNumber "\<\d\+\.\d\+\>" +syn match acedbHyb "\<Positive_\w\+\>\|\<Negative\w\+\>" +syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline + +" Rest of syntax highlighting rules start here + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link acedbMagic Special +hi def link acedbHyb Special +hi def link acedbType Type +hi def link acedbOption Type +hi def link acedbSubclass Type +hi def link acedbSubtag Include +hi def link acedbFlag Include +hi def link acedbTag Include +hi def link acedbClass Todo +hi def link acedbHelp Todo +hi def link acedbXref Identifier +hi def link acedbModifier Label +hi def link acedbComment Comment +hi def link acedbBlock ModeMsg +hi def link acedbNumber Number +hi def link acedbString String + + +let b:current_syntax = "acedb" + +" The structure of the model.wrm file is sensitive to mixed tab and space +" indentation and assumes tabs are 8 so... +se ts=8 + +endif diff --git a/syntax/ada.vim b/syntax/ada.vim new file mode 100644 index 00000000..f8093d8a --- /dev/null +++ b/syntax/ada.vim @@ -0,0 +1,372 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 + +"---------------------------------------------------------------------------- +" Description: Vim Ada syntax file +" Language: Ada (2005) +" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik +" David A. Wheeler <dwheeler@dwheeler.com> +" Simon Bradley <simon.bradley@pitechnology.com> +" Contributors: Preben Randhol. +" $Author: krischik $ +" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $ +" Version: 4.6 +" $Revision: 887 $ +" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/syntax/ada.vim $ +" http://www.dwheeler.com/vim +" History: 24.05.2006 MK Unified Headers +" 26.05.2006 MK ' should not be in iskeyword. +" 16.07.2006 MK Ada-Mode as vim-ball +" 02.10.2006 MK Better folding. +" 15.10.2006 MK Bram's suggestion for runtime integration +" 05.11.2006 MK Spell check for comments and strings only +" 05.11.2006 MK Bram suggested to save on spaces +" Help Page: help ft-ada-syntax +"------------------------------------------------------------------------------ +" The formal spec of Ada 2005 (ARM) is the "Ada 2005 Reference Manual". +" For more Ada 2005 info, see http://www.gnuada.org and http://www.adapower.com. +" +" This vim syntax file works on vim 7.0 only and makes use of most of Voim 7.0 +" advanced features. +"------------------------------------------------------------------------------ + +if exists("b:current_syntax") || version < 700 + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +let b:current_syntax = "ada" + +" Section: Ada is entirely case-insensitive. {{{1 +" +syntax case ignore + +" Section: Highlighting commands {{{1 +" +" There are 72 reserved words in total in Ada2005. Some keywords are +" used in more than one way. For example: +" 1. "end" is a general keyword, but "end if" ends a Conditional. +" 2. "then" is a conditional, but "and then" is an operator. +" +for b:Item in g:ada#Keywords + " Standard Exceptions (including I/O). + " We'll highlight the standard exceptions, similar to vim's Python mode. + " It's possible to redefine the standard exceptions as something else, + " but doing so is very bad practice, so simply highlighting them makes sense. + if b:Item['kind'] == "x" + execute "syntax keyword adaException " . b:Item['word'] + endif + if b:Item['kind'] == "a" + execute 'syntax match adaAttribute "\V' . b:Item['word'] . '"' + endif + " We don't normally highlight types in package Standard + " (Integer, Character, Float, etc.). I don't think it looks good + " with the other type keywords, and many Ada programs define + " so many of their own types that it looks inconsistent. + " However, if you want this highlighting, turn on "ada_standard_types". + " For package Standard's definition, see ARM section A.1. + if b:Item['kind'] == "t" && exists ("g:ada_standard_types") + execute "syntax keyword adaBuiltinType " . b:Item['word'] + endif +endfor + +" Section: others {{{1 +" +syntax keyword adaLabel others + +" Section: Operatoren {{{1 +" +syntax keyword adaOperator abs mod not rem xor +syntax match adaOperator "\<and\>" +syntax match adaOperator "\<and\s\+then\>" +syntax match adaOperator "\<or\>" +syntax match adaOperator "\<or\s\+else\>" +syntax match adaOperator "[-+*/<>&]" +syntax keyword adaOperator ** +syntax match adaOperator "[/<>]=" +syntax keyword adaOperator => +syntax match adaOperator "\.\." +syntax match adaOperator "=" + +" Section: <> {{{1 +" +" Handle the box, <>, specially: +" +syntax keyword adaSpecial <> + +" Section: rainbow color {{{1 +" +if exists("g:ada_rainbow_color") + syntax match adaSpecial "[:;.,]" + call rainbow_parenthsis#LoadRound () + call rainbow_parenthsis#Activate () +else + syntax match adaSpecial "[:;().,]" +endif + +" Section: := {{{1 +" +" We won't map "adaAssignment" by default, but we need to map ":=" to +" something or the "=" inside it will be mislabelled as an operator. +" Note that in Ada, assignment (:=) is not considered an operator. +" +syntax match adaAssignment ":=" + +" Section: Numbers, including floating point, exponents, and alternate bases. {{{1 +" +syntax match adaNumber "\<\d[0-9_]*\(\.\d[0-9_]*\)\=\([Ee][+-]\=\d[0-9_]*\)\=\>" +syntax match adaNumber "\<\d\d\=#\x[0-9A-Fa-f_]*\(\.\x[0-9A-Fa-f_]*\)\=#\([Ee][+-]\=\d[0-9_]*\)\=" + +" Section: Identify leading numeric signs {{{1 +" +" In "A-5" the "-" is an operator, " but in "A:=-5" the "-" is a sign. This +" handles "A3+-5" (etc.) correctly. " This assumes that if you put a +" don't put a space after +/- when it's used " as an operator, you won't +" put a space before it either -- which is true " in code I've seen. +" +syntax match adaSign "[[:space:]<>=(,|:;&*/+-][+-]\d"lc=1,hs=s+1,he=e-1,me=e-1 + +" Section: Labels for the goto statement. {{{1 +" +syntax region adaLabel start="<<" end=">>" + +" Section: Boolean Constants {{{1 +" Boolean Constants. +syntax keyword adaBoolean true false + +" Section: Warn C/C++ {{{1 +" +" Warn people who try to use C/C++ notation erroneously: +" +syntax match adaError "//" +syntax match adaError "/\*" +syntax match adaError "==" + + +" Section: Space Errors {{{1 +" +if exists("g:ada_space_errors") + if !exists("g:ada_no_trail_space_error") + syntax match adaSpaceError excludenl "\s\+$" + endif + if !exists("g:ada_no_tab_space_error") + syntax match adaSpaceError " \+\t"me=e-1 + endif + if !exists("g:ada_all_tab_usage") + syntax match adaSpecial "\t" + endif +endif + +" Section: end {{{1 +" Unless special ("end loop", "end if", etc.), "end" marks the end of a +" begin, package, task etc. Assiging it to adaEnd. +syntax match adaEnd /\<end\>/ + +syntax keyword adaPreproc pragma + +syntax keyword adaRepeat exit for loop reverse while +syntax match adaRepeat "\<end\s\+loop\>" + +syntax keyword adaStatement accept delay goto raise requeue return +syntax keyword adaStatement terminate +syntax match adaStatement "\<abort\>" + +" Section: Handle Ada's record keywords. {{{1 +" +" 'record' usually starts a structure, but "with null record;" does not, +" and 'end record;' ends a structure. The ordering here is critical - +" 'record;' matches a "with null record", so make it a keyword (this can +" match when the 'with' or 'null' is on a previous line). +" We see the "end" in "end record" before the word record, so we match that +" pattern as adaStructure (and it won't match the "record;" pattern). +" +syntax match adaStructure "\<record\>" contains=adaRecord +syntax match adaStructure "\<end\s\+record\>" contains=adaRecord +syntax match adaKeyword "\<record;"me=e-1 + +" Section: type classes {{{1 +" +syntax keyword adaStorageClass abstract access aliased array at constant delta +syntax keyword adaStorageClass digits limited of private range tagged +syntax keyword adaStorageClass interface synchronized +syntax keyword adaTypedef subtype type + +" Section: Conditionals {{{1 +" +" "abort" after "then" is a conditional of its own. +" +syntax match adaConditional "\<then\>" +syntax match adaConditional "\<then\s\+abort\>" +syntax match adaConditional "\<else\>" +syntax match adaConditional "\<end\s\+if\>" +syntax match adaConditional "\<end\s\+case\>" +syntax match adaConditional "\<end\s\+select\>" +syntax keyword adaConditional if case select +syntax keyword adaConditional elsif when + +" Section: other keywords {{{1 +syntax match adaKeyword "\<is\>" contains=adaRecord +syntax keyword adaKeyword all do exception in new null out +syntax keyword adaKeyword separate until overriding + +" Section: begin keywords {{{1 +" +" These keywords begin various constructs, and you _might_ want to +" highlight them differently. +" +syntax keyword adaBegin begin body declare entry generic +syntax keyword adaBegin protected renames task + +syntax match adaBegin "\<function\>" contains=adaFunction +syntax match adaBegin "\<procedure\>" contains=adaProcedure +syntax match adaBegin "\<package\>" contains=adaPackage + +if exists("ada_with_gnat_project_files") + syntax keyword adaBegin project +endif + +" Section: with, use {{{1 +" +if exists("ada_withuse_ordinary") + " Don't be fancy. Display "with" and "use" as ordinary keywords in all cases. + syntax keyword adaKeyword with use +else + " Highlight "with" and "use" clauses like C's "#include" when they're used + " to reference other compilation units; otherwise they're ordinary keywords. + " If we have vim 6.0 or later, we'll use its advanced pattern-matching + " capabilities so that we won't match leading spaces. + syntax match adaKeyword "\<with\>" + syntax match adaKeyword "\<use\>" + syntax match adaBeginWith "^\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc + syntax match adaSemiWith ";\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc + syntax match adaInc "\<with\>" contained contains=NONE + syntax match adaInc "\<with\s\+type\>" contained contains=NONE + syntax match adaInc "\<use\>" contained contains=NONE + " Recognize "with null record" as a keyword (even the "record"). + syntax match adaKeyword "\<with\s\+null\s\+record\>" + " Consider generic formal parameters of subprograms and packages as keywords. + syntax match adaKeyword ";\s*\zswith\s\+\(function\|procedure\|package\)\>" + syntax match adaKeyword "^\s*\zswith\s\+\(function\|procedure\|package\)\>" +endif + +" Section: String and character constants. {{{1 +" +syntax region adaString contains=@Spell start=+"+ skip=+""+ end=+"+ +syntax match adaCharacter "'.'" + +" Section: Todo (only highlighted in comments) {{{1 +" +syntax keyword adaTodo contained TODO FIXME XXX NOTE + +" Section: Comments. {{{1 +" +syntax region adaComment + \ oneline + \ contains=adaTodo,adaLineError,@Spell + \ start="--" + \ end="$" + +" Section: line errors {{{1 +" +" Note: Line errors have become quite slow with Vim 7.0 +" +if exists("g:ada_line_errors") + syntax match adaLineError "\(^.\{79}\)\@<=." contains=ALL containedin=ALL +endif + +" Section: syntax folding {{{1 +" +" Syntax folding is very tricky - for now I still suggest to use +" indent folding +" +if exists("g:ada_folding") && g:ada_folding[0] == 's' + if stridx (g:ada_folding, 'p') >= 0 + syntax region adaPackage + \ start="\(\<package\s\+body\>\|\<package\>\)\s*\z(\k*\)" + \ end="end\s\+\z1\s*;" + \ keepend extend transparent fold contains=ALL + endif + if stridx (g:ada_folding, 'f') >= 0 + syntax region adaProcedure + \ start="\<procedure\>\s*\z(\k*\)" + \ end="\<end\>\s\+\z1\s*;" + \ keepend extend transparent fold contains=ALL + syntax region adaFunction + \ start="\<procedure\>\s*\z(\k*\)" + \ end="end\s\+\z1\s*;" + \ keepend extend transparent fold contains=ALL + endif + if stridx (g:ada_folding, 'f') >= 0 + syntax region adaRecord + \ start="\<is\s\+record\>" + \ end="\<end\s\+record\>" + \ keepend extend transparent fold contains=ALL + endif +endif + +" Section: The default methods for highlighting. Can be overridden later. {{{1 +" +highlight def link adaCharacter Character +highlight def link adaComment Comment +highlight def link adaConditional Conditional +highlight def link adaKeyword Keyword +highlight def link adaLabel Label +highlight def link adaNumber Number +highlight def link adaSign Number +highlight def link adaOperator Operator +highlight def link adaPreproc PreProc +highlight def link adaRepeat Repeat +highlight def link adaSpecial Special +highlight def link adaStatement Statement +highlight def link adaString String +highlight def link adaStructure Structure +highlight def link adaTodo Todo +highlight def link adaType Type +highlight def link adaTypedef Typedef +highlight def link adaStorageClass StorageClass +highlight def link adaBoolean Boolean +highlight def link adaException Exception +highlight def link adaAttribute Tag +highlight def link adaInc Include +highlight def link adaError Error +highlight def link adaSpaceError Error +highlight def link adaLineError Error +highlight def link adaBuiltinType Type +highlight def link adaAssignment Special + +" Subsection: Begin, End {{{2 +" +if exists ("ada_begin_preproc") + " This is the old default display: + highlight def link adaBegin PreProc + highlight def link adaEnd PreProc +else + " This is the new default display: + highlight def link adaBegin Keyword + highlight def link adaEnd Keyword +endif + + + +" Section: sync {{{1 +" +" We don't need to look backwards to highlight correctly; +" this speeds things up greatly. +syntax sync minlines=1 maxlines=1 + +let &cpo = s:keepcpo +unlet s:keepcpo + +finish " 1}}} + +"------------------------------------------------------------------------------ +" Copyright (C) 2006 Martin Krischik +" +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +"vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab +"vim: foldmethod=marker + +endif diff --git a/syntax/ahdl.vim b/syntax/ahdl.vim new file mode 100644 index 00000000..1457255e --- /dev/null +++ b/syntax/ahdl.vim @@ -0,0 +1,85 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ahdl') == -1 + +" Vim syn file +" Language: Altera AHDL +" Maintainer: John Cook <john.cook@kla-tencor.com> +" Last Change: 2001 Apr 25 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +"this language is oblivious to case. +syn case ignore + +" a bunch of keywords +syn keyword ahdlKeyword assert begin bidir bits buried case clique +syn keyword ahdlKeyword connected_pins constant defaults define design +syn keyword ahdlKeyword device else elsif end for function generate +syn keyword ahdlKeyword gnd help_id if in include input is machine +syn keyword ahdlKeyword node of options others output parameters +syn keyword ahdlKeyword returns states subdesign table then title to +syn keyword ahdlKeyword tri_state_node variable vcc when with + +" a bunch of types +syn keyword ahdlIdentifier carry cascade dffe dff exp global +syn keyword ahdlIdentifier jkffe jkff latch lcell mcell memory opendrn +syn keyword ahdlIdentifier soft srffe srff tffe tff tri wire x + +syn keyword ahdlMegafunction lpm_and lpm_bustri lpm_clshift lpm_constant +syn keyword ahdlMegafunction lpm_decode lpm_inv lpm_mux lpm_or lpm_xor +syn keyword ahdlMegafunction busmux mux + +syn keyword ahdlMegafunction divide lpm_abs lpm_add_sub lpm_compare +syn keyword ahdlMegafunction lpm_counter lpm_mult + +syn keyword ahdlMegafunction altdpram csfifo dcfifo scfifo csdpram lpm_ff +syn keyword ahdlMegafunction lpm_latch lpm_shiftreg lpm_ram_dq lpm_ram_io +syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc + +syn keyword ahdlTodo contained TODO + +" String contstants +syn region ahdlString start=+"+ skip=+\\"+ end=+"+ + +" valid integer number formats (decimal, binary, octal, hex) +syn match ahdlNumber '\<\d\+\>' +syn match ahdlNumber '\<b"\(0\|1\|x\)\+"' +syn match ahdlNumber '\<\(o\|q\)"\o\+"' +syn match ahdlNumber '\<\(h\|x\)"\x\+"' + +" operators +syn match ahdlOperator "[!&#$+\-<>=?:\^]" +syn keyword ahdlOperator not and nand or nor xor xnor +syn keyword ahdlOperator mod div log2 used ceil floor + +" one line and multi-line comments +" (define these after ahdlOperator so -- overrides -) +syn match ahdlComment "--.*" contains=ahdlNumber,ahdlTodo +syn region ahdlComment start="%" end="%" contains=ahdlNumber,ahdlTodo + +" other special characters +syn match ahdlSpecialChar "[\[\]().,;]" + +syn sync minlines=1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link ahdlNumber ahdlString +hi def link ahdlMegafunction ahdlIdentifier +hi def link ahdlSpecialChar SpecialChar +hi def link ahdlKeyword Statement +hi def link ahdlString String +hi def link ahdlComment Comment +hi def link ahdlIdentifier Identifier +hi def link ahdlOperator Operator +hi def link ahdlTodo Todo + + +let b:current_syntax = "ahdl" +" vim:ts=8 + +endif diff --git a/syntax/aidl.vim b/syntax/aidl.vim new file mode 100644 index 00000000..d9c88ab4 --- /dev/null +++ b/syntax/aidl.vim @@ -0,0 +1,27 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aidl') == -1 + +" Vim syntax file +" Language: aidl (Android Interface Definition Language) +" https://developer.android.com/guide/components/aidl +" Maintainer: Dominique Pelle <dominique.pelle@tomtom.com> +" LastChange: 2020/07/25 + +" Quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +source <sfile>:p:h/java.vim + +syn keyword aidlParamDir in out inout +syn keyword aidlKeyword oneway parcelable + +" Needed for the 'in', 'out', 'inout' keywords to be highlighted. +syn cluster javaTop add=aidlParamDir + +hi def link aidlParamDir StorageClass +hi def link aidlKeyword Keyword + +let b:current_syntax = "aidl" + +endif diff --git a/syntax/alsaconf.vim b/syntax/alsaconf.vim new file mode 100644 index 00000000..152c2c9f --- /dev/null +++ b/syntax/alsaconf.vim @@ -0,0 +1,53 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 + +" Vim syntax file +" Language: alsaconf(8) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword alsoconfTodo contained FIXME TODO XXX NOTE + +syn region alsaconfComment display oneline + \ start='#' end='$' + \ contains=alsaconfTodo,@Spell + +syn match alsaconfSpecialChar contained display '\\[ntvbrf]' +syn match alsaconfSpecialChar contained display '\\\o\+' + +syn region alsaconfString start=+"+ skip=+\\$+ end=+"\|$+ + \ contains=alsaconfSpecialChar + +syn match alsaconfSpecial contained display 'confdir:' + +syn region alsaconfPreProc start='<' end='>' contains=alsaconfSpecial + +syn match alsaconfMode display '[+?!-]' + +syn keyword alsaconfKeyword card default device errors files func strings +syn keyword alsaconfKeyword subdevice type vars + +syn match alsaconfVariables display '@\(hooks\|func\|args\)' + +hi def link alsoconfTodo Todo +hi def link alsaconfComment Comment +hi def link alsaconfSpecialChar SpecialChar +hi def link alsaconfString String +hi def link alsaconfSpecial Special +hi def link alsaconfPreProc PreProc +hi def link alsaconfMode Special +hi def link alsaconfKeyword Keyword +hi def link alsaconfVariables Identifier + +let b:current_syntax = "alsaconf" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/aml.vim b/syntax/aml.vim new file mode 100644 index 00000000..44f62fac --- /dev/null +++ b/syntax/aml.vim @@ -0,0 +1,148 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aml') == -1 + +" Vim syntax file +" Language: AML (ARC/INFO Arc Macro Language) +" Written By: Nikki Knuit <Nikki.Knuit@gems3.gov.bc.ca> +" Maintainer: Todd Glover <todd.glover@gems9.gov.bc.ca> +" Last Change: 2001 May 10 + +" FUTURE CODING: Bold application commands after &sys, &tty +" Only highlight aml Functions at the beginning +" of [], in order to avoid -read highlighted, +" or [quote] strings highlighted + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" ARC, ARCEDIT, ARCPLOT, LIBRARIAN, GRID, SCHEMAEDIT reserved words, +" defined as keywords. + +syn keyword amlArcCmd contained 2button abb abb[reviations] abs ac acos acosh add addc[ogoatt] addcogoatt addf[eatureclass] addh[istory] addi addim[age] addindexatt addit[em] additem addressb[uild] addressc[reate] addresse[rrors] addressedit addressm[atch] addressp[arse] addresst[est] addro[utemeasure] addroutemeasure addte[xt] addto[stack] addw[orktable] addx[y] adj[ust] adm[inlicense] adr[ggrid] ads adsa[rc] ae af ag[gregate] ai ai[request] airequest al alia[s] alig[n] alt[erarchive] am[sarc] and annoa[lignment] annoadd annocapture annocl[ip] annoco[verage] annocurve annoe[dit] annoedit annof annofeature annofit annoitem annola[yer] annole[vel] annolevel annoline annooffset annop[osition] annoplace annos[ize] annoselectfeatur annoset annosum annosymbol annot annot[ext] annotext annotype ao ap apm[ode] app[end] arc arcad[s] arcar[rows] arcc[ogo] arcdf[ad] arcdi[me] arcdl[g] arcdx[f] arced[it] arcedit arcen[dtext] arcf[ont] arcigd[s] arcige[s] arcla[bel] arcli[nes] arcma[rkers] arcmo[ss] +syn keyword amlArcCmd contained arcpl[ot] arcplot arcpo[int] arcr[oute] arcs arcsc[itex] arcse[ction] arcsh[ape] arcsl[f] arcsn[ap] arcsp[ot] arcte[xt] arctig[er] arctin arcto[ols] arctools arcty[pe] area areaq[uery] arm arrow arrows[ize] arrowt[ype] as asc asciig[rid] asciih[elp] asciihelp asco[nnect] asconnect asd asda[tabase] asdi[sconnect] asdisconnect asel[ect] asex[ecute] asf asin asinh asp[ect] asr[eadlocks] ast[race] at atan atan2 atanh atusage aud[ittrail] autoi[ncrement] autol[ink] axis axish[atch] axisl[abels] axisr[uler] axist[ext] bac[klocksymbol] backcoverage backenvironment backnodeangleite backsymbolitem backtextitem base[select] basi[n] bat[ch] bc be be[lls] blackout blockmaj[ority] blockmax blockmea[n] blockmed[ian] blockmin blockmino[rity] blockr[ange] blockst[d] blocksu[m] blockv[ariety] bnai bou[ndaryclean] box br[ief] bsi bti buf[fer] bug[form] bugform build builds[ta] buildv[at] calco[mp] calcomp calcu[late] cali[brateroutes] calibrateroutes can[d] cartr[ead] cartread +syn keyword amlArcCmd contained cartw[rite] cartwrite cei[l] cel[lvalue] cen[troidlabels] cgm cgme[scape] cha[nge] checkin checkinrel checkout checkoutrel chm[od] chown chownt[ransaction] chowntran chowntransaction ci ci[rcle] cir class classp[rob] classs[ig] classsample clean clear clears[elect] clip clipg[raphextent] clipm[apextent] clo[sedatabase] cntvrt co cod[efind] cog[oinverse] cogocom cogoenv cogomenu coll[ocate] color color2b[lue] color2g[reen] color2h[ue] color2r[ed] color2s[at] color2v[al] colorchart coloredit colorh[cbs] colorhcbs colu[mns] comb[ine] comm[ands] commands con connect connectu[ser] cons[ist] conto[ur] contr[olpoints] convertd[oc] convertdoc converti[mage] convertla[yer] convertli[brary] convertr[emap] convertw[orkspace] coo[rdinate] coordinate coordinates copy copyf[eatures] copyi[nfo] copyl[ayer] copyo copyo[ut] copyout copys[tack] copyw[orkspace] copyworkspace cor corr[idor] correlation cos cosh costa[llocation] costb[acklink] costd[istance] costp[ath] cou[ntvertices] +syn keyword amlArcCmd contained countvertices cpw cr create create2[dindex] createa[ttributes] createca[talog] createco[go] createcogo createf[eature] createind[ex] createinf[otable] createlab[els] createlay[er] createli[brary] createn[etindex] creater[emap] creates[ystables] createta[blespace] createti[n] createw[orkspace] createworkspace cs culdesac curs[or] curv[ature] curve3pt cut[fill] cutoff cw cx[or] da dar[cyflow] dat[aset] dba[seinfo] dbmsc dbmsc[ursor] dbmscursor dbmse[xecute] dbmsi[nfo] dbmss[et] de delete deletea[rrows] deletet[ic] deletew[orkspace] deleteworkspace demg[rid] deml[attice] dend[rogram] densify densifya[rc] describe describea[rchive] describel[attice] describeti[n] describetr[ans] describetrans dev df[adarc] dg dif[f] digi[tizer] digt[est] dim[earc] dir dir[ectory] directory disa[blepanzoom] disconnect disconnectu[ser] disp disp[lay] display dissolve dissolvee[vents] dissolveevents dista[nce] distr[ibutebuild] div dl[garc] do doce[ll] docu[ment] document dogroup drag +syn keyword amlArcCmd contained draw drawenvironment draworder draws[ig] drawselect drawt[raverses] drawz[oneshape] drop2[dindex] dropa[rchive] dropfeaturec[lass] dropfeatures dropfr[omstack] dropgroup droph[istory] dropind[ex] dropinf[otable] dropit[em] dropla[yer] droplib[rary] droplin[e] dropline dropn[etindex] dropt[ablespace] dropw[orktable] ds dt[edgrid] dtrans du[plicate] duplicatearcs dw dxf dxfa[rc] dxfi[nfo] dynamicpan dynpan ebe ec ed edg[esnap] edgematch editboundaryerro edit[coverage] editdistance editf editfeature editp[lot] editplot edits[ig] editsymbol ef el[iminate] em[f] en[d] envrst envsav ep[s] eq equ[alto] er[ase] es et et[akarc] euca[llocation] eucdir[ection] eucdis[tance] eval eventa[rc] evente[nds] eventh[atch] eventi[nfo] eventlinee[ndtext] eventlines eventlinet[ext] eventlis[t] eventma[rkers] eventme[nu] eventmenu eventpoint eventpointt[ext] eventse[ction] eventso[urce] eventt[ransform] eventtransform exi[t] exp exp1[0] exp2 expa[nd] expo[rt] exten[d] external externala[ll] +syn keyword amlArcCmd contained fd[convert] featuregroup fg fie[lddata] file fill filt[er] fix[ownership] flip flipa[ngle] float floatg[rid] floo[r] flowa[ccumulation] flowd[irection] flowl[ength] fm[od] focalf[low] focalmaj[ority] focalmax focalmea[n] focalmed[ian] focalmin focalmino[rity] focalr[ange] focalst[d] focalsu[m] focalv[ariety] fonta[rc] fontco[py] fontcr[eate] fontd[elete] fontdump fontl[oad] fontload forc[e] form[edit] formedit forms fr[equency] ge geary general[ize] generat[e] gerbera[rc] gerberr[ead] gerberread gerberw[rite] gerberwrite get getz[factor] gi gi[rasarc] gnds grai[n] graphb[ar] graphe[xtent] graphi[cs] graphicimage graphicview graphlim[its] graphlin[e] graphp[oint] graphs[hade] gray[shade] gre[aterthan] grid grida[scii] gridcl[ip] gridclip gridco[mposite] griddesk[ew] griddesp[eckle] griddi[rection] gride[dit] gridfli[p] gridflo[at] gridim[age] gridin[sert] gridl[ine] gridma[jority] gridmi[rror] gridmo[ss] gridn[et] gridnodatasymbol gridpa[int] gridpoi[nt] gridpol[y] +syn keyword amlArcCmd contained gridq[uery] gridr[otate] gridshad[es] gridshap[e] gridshi[ft] gridw[arp] group groupb[y] gt gv gv[tolerance] ha[rdcopy] he[lp] help hid[densymbol] hig[hlow] hil[lshade] his[togram] historicalview ho[ldadjust] hpgl hpgl2 hsv2b[lue] hsv2g[reen] hsv2r[ed] ht[ml] hview ia ided[it] identif[y] identit[y] idw if igdsa[rc] igdsi[nfo] ige[sarc] il[lustrator] illustrator image imageg[rid] imagep[lot] imageplot imageview imp[ort] in index indexi[tem] info infodba[se] infodbm[s] infof[ile] init90[00] init9100 init9100b init91[00] init95[00] int intersect intersectarcs intersecte[rr] isn[ull] iso[cluster] it[ems] iview j[oinitem] join keeps keepselect keyan[gle] keyar[ea] keyb[ox] keyf[orms] keyl[ine] keym keym[arker] keymap keyp[osition] keyse[paration] keysh[ade] keyspot kill killm[ap] kr[iging] la labela[ngle] labele[rrors] labelm[arkers] labels labelsc[ale] labelsp[ot] labelt[ext] lal latticecl[ip] latticeco[ntour] latticed[em] latticem[erge] latticemarkers latticeo[perate] +syn keyword amlArcCmd contained latticep[oly] latticerep[lace] latticeres[ample] lattices[pot] latticet[in] latticetext layer layera[nno] layerca[lculate] layerco[lumns] layerde[lete] layerdo[ts] layerdr[aw] layere[xport] layerf[ilter] layerid[entify] layerim[port] layerio[mode] layerli[st] layerloc[k] layerlog[file] layerq[uery] layerse[arch] layersp[ot] layert[ext] lc ldbmst le leadera[rrows] leaders leadersy[mbol] leadert[olerance] len[gth] les[sthan] lf lg lh li lib librari[an] library limitadjust limitautolink line line2pt linea[djustment] linecl[osureangle] linecolor linecolorr[amp] linecopy linecopyl[ayer] linedelete linedeletel[ayer] lineden[sity] linedir[ection] linedis[t] lineedit lineg[rid] lineh[ollow] lineinf[o] lineint[erval] linel[ayer] linelist linem[iterangle] lineo[ffset] linepa[ttern] linepe[n] linepu[t] linesa[ve] linesc[ale] linese[t] linesi[ze] linest[ats] linesy[mbol] linete[mplate] +syn keyword amlArcCmd contained linety[pe] link[s] linkfeatures list listarchives listatt listc[overages] listcoverages listdbmstables listg[rids] listgrids listhistory listi[mages] listimages listinfotables listlayers listlibraries listo[utput] listse[lect] listst[acks] liststacks listtablespaces listti[ns] listtins listtr[averses] listtran listtransactions listw[orkspaces] listworkspaces lit ll ll[sfit] lla lm ln load loada[djacent] loadcolormap locko[nly] locks[ymbol] log log1[0] log2 logf[ile] logg[ing] loo[kup] lot[area] lp[os] lstk lt lts lw madditem majority majorityf[ilter] makere[gion] makero[ute] makese[ction] makest[ack] mal[ign] map mapa[ngle] mape[xtent] mapextent mapi[nfo] mapj[oin] mapl[imits] mappo[sition] mappr[ojection] mapsc[ale] mapsh[ift] mapu[nits] mapw[arp] mapz[oom] marker markera[ngle] markercolor markercolorr[amp] markercopy markercopyl[ayer] markerdelete markerdeletel[aye] markeredit markerf[ont] markeri[nfo] markerl[ayer] markerlist markerm[ask] markero[ffset] +syn keyword amlArcCmd contained markerpa[ttern] markerpe[n] markerpu[t] markersa[ve] markersc[ale] markerse[t] markersi[ze] markersy[mbol] mas[elect] matchc[over] matchn[ode] max mb[egin] mc[opy] md[elete] me mean measure measurer[oute] measureroute med mend menu[cover] menuedit menv[ironment] merge mergeh[istory] mergev[at] mfi[t] mfr[esh] mg[roup] miadsa[rc] miadsr[ead] miadsread min minf[o] mino[rity] mir[ror] mitems mjoin ml[classify] mma[sk] mmo[ve] mn[select] mod mor[der] moran mosa[ic] mossa[rc] mossg[rid] move movee[nd] movei[tem] mp[osition] mr mr[otate] msc[ale] mse[lect] mselect mt[olerance] mu[nselect] multcurve multinv multipleadditem multipleitems multiplejoin multipleselect multprop mw[ho] nai ne near neatline neatlineg[rid] neatlineh[atch] neatlinel[abels] neatlinet[ics] new next ni[bble] nodeangleitem nodec[olor] nodee[rrors] nodem[arkers] nodep[oint] nodes nodesi[ze] nodesn[ap] nodesp[ot] nodet[ext] nor[mal] not ns[elect] oe ogrid ogridt[ool] oldwindow oo[ps] op[endatabase] or +syn keyword amlArcCmd contained osymbol over overflow overflowa[rea] overflowp[osition] overflows[eparati] overl[ayevents] overlapsymbol overlayevents overp[ost] pagee[xtent] pages[ize] pageu[nits] pal[info] pan panview par[ticletrack] patc[h] path[distance] pe[nsize] pi[ck] pli[st] plot plotcopy plotg[erber] ploti[con] plotmany plotpanel plotsc[itex] plotsi[f] pointde[nsity] pointdist pointdista[nce] pointdo[ts] pointg[rid] pointi[nterp] pointm[arkers] pointn[ode] points pointsp[ot] pointst[ats] pointt[ext] polygonb[ordertex] polygond[ots] polygone[vents] polygonevents polygonl[ines] polygons polygonsh[ades] polygonsi[zelimit] polygonsp[ot] polygont[ext] polygr[id] polyr[egion] pop[ularity] por[ouspuff] pos pos[tscript] positions postscript pow prec[ision] prep[are] princ[omp] print product producti[nfo] project projectcom[pare] projectcop[y] projectd[efine] pul[litems] pur[gehistory] put pv q q[uit] quit rand rang[e] rank rb rc re readg[raphic] reads[elect] reb[ox] recl[ass] recoverdb rect[ify] +syn keyword amlArcCmd contained red[o] refreshview regionb[uffer] regioncla[ss] regioncle[an] regiondi[ssolve] regiondo[ts] regione[rrors] regiong[roup] regionj[oin] regionl[ines] regionpoly regionpolyc[ount] regionpolycount regionpolyl[ist] regionpolylist regionq[uery] regions regionse[lect] regionsh[ades] regionsp[ot] regiont[ext] regionxa[rea] regionxarea regionxt[ab] regionxtab register registerd[bms] regr[ession] reindex rej[ects] rela[te] rele[ase] rem remapgrid reme[asure] remo[vescalar] remove removeback removecover removeedit removesnap removetransfer rename renamew[orkspace] renameworkspace reno[de] rep[lace] reposition resa[mple] resel[ect] reset resh[ape] restore restorearce[dit] restorearch[ive] resu[me] rgb2h[ue] rgb2s[at] rgb2v[al] rotate rotatep[lot] routea[rc] routeends routeendt[ext] routeer[rors] routeev[entspot] routeh[atch] routel[ines] routes routesp[ot] routest[ats] routet[ext] rp rs rt rt[l] rtl rv rw sa sai sample samples[ig] sav[e] savecolormap sc scal[ar] scat[tergram] +syn keyword amlArcCmd contained scenefog sceneformat scenehaze sceneoversample sceneroll scenesave scenesize scenesky scitexl[ine] scitexpoi[nt] scitexpol[y] scitexr[ead] scitexread scitexw[rite] scitexwrite sco screenr[estore] screens[ave] sd sds sdtse[xport] sdtsim[port] sdtsin[fo] sdtsl[ist] se sea[rchtolerance] sectiona[rc] sectionends sectionendt[ext] sectionh[atch] sectionl[ines] sections sectionsn[ap] sectionsp[ot] sectiont[ext] sel select selectb[ox] selectc[ircle] selectg[et] selectm[ask] selectmode selectpoi[nt] selectpol[ygon] selectpu[t] selectt[ype] selectw[ithin] semivariogram sep[arator] separator ser[verstatus] setan[gle] setar[row] setce[ll] setcoa[lesce] setcon[nectinfo] setd[bmscheckin] setdrawsymbol sete[ditmode] setincrement setm[ask] setn[ull] setools setreference setsymbol setturn setw[indow] sext sf sfmt sfo sha shade shadea[ngle] shadeb[ackcolor] shadecolor shadecolorr[amp] shadecopy shadecopyl[ayer] shadedelete shadedeletel[ayer] shadeedit shadegrid shadei[nfo] shadela[yer] +syn keyword amlArcCmd contained shadeli[nepattern] shadelist shadeo[ffset] shadepa[ttern] shadepe[n] shadepu[t] shadesa[ve] shadesc[ale] shadesep[aration] shadeset shadesi[ze] shadesy[mbol] shadet[ype] shapea[rc] shapef[ile] shapeg[rid] shi[ft] show showconstants showe[ditmode] shr[ink] si sin sinfo sing[leuser] sinh sink sit[e] sl slf[arc] sli[ce] slo[pe] sm smartanno snap snapc[over] snapcover snapcoverage snapenvironment snapfeatures snapitems snapo[rder] snappi[ng] snappo[ur] so[rt] sobs sos spi[der] spiraltrans spline splinem[ethod] split spot spoto[ffset] spots[ize] sproj sqr sqrt sra sre srl ss ssc ssh ssi ssky ssz sta stackh[istogram] stackprofile stacksc[attergram] stackshade stackst[ats] stati[stics] statu[s] statuscogo std stra[ighten] streamline streamlink streamo[rder] stri[pmap] subm[it] subs[elect] sum surface surfaceabbrev surfacecontours surfacedefaults surfacedrape surfaceextent surfaceinfo surfacel[ength] surfacelimits surfacemarker surfacemenu surfaceobserver surfaceprofile +syn keyword amlArcCmd contained surfaceprojectio surfacerange surfaceresolutio surfacesave surfacescene surfaceshade surfacesighting surfacetarget surfacevalue surfaceviewfield surfaceviewshed surfacevisibility surfacexsection surfacezoom surfacezscale sv svfd svs sxs symboldump symboli[tem] symbolsa[ve] symbolsc[ale] symbolse[t] symbolset sz tab[les] tal[ly] tan tanh tc te tes[t] text textal[ignment] textan[gle] textcolor textcolorr[amp] textcop[y] textde[lete] textdi[rection] textedit textfil[e] textfit textfo[nt] textin[fo] textit[em] textj[ustificatio] textlist textm[ask] texto[ffset] textpe[n] textpr[ecision] textpu[t] textq[uality] textsa[ve] textsc[ale] textse[t] textset textsi[ze] textsl[ant] textspa[cing] textspl[ine] textst[yle] textsy[mbol] tf th thie[ssen] thin ti tics tict[ext] tigera[rc] tigert[ool] tigertool til[es] timped tin tina[rc] tinc[ontour] tinerrors tinhull tinl[attice] tinlines tinmarkers tins[pot] tinshades tintext tinv[rml] tl tm tol[erance] top[ogrid] topogridtool +syn keyword amlArcCmd contained transa[ction] transfe[r] transfercoverage transferfeature transferitems transfersymbol transfo[rm] travrst travsav tre[nd] ts tsy tt tur[ntable] turnimpedance tut[orial] una[ry] unde[lete] undo ungenerate ungeneratet[in] unio[n] unit[s] unr[egisterdbms] unse[lect] unsp[lit] update updatei[nfoschema] updatel[abels] upo[s] us[age] v va[riety] vcgl vcgl2 veri[fy] vers[ion] vertex viewrst viewsav vip visd[ecode] visdecode vise[ncode] visencode visi[bility] vo[lume] vpfe[xport] vpfi[mport] vpfl[ist] vpft[ile] w war[p] wat[ershed] weedd[raw] weedo[perator] weedt[olerance] weedtolerance whe[re] whi[le] who wi[ndows] wm[f] wo[rkspace] workspace writec[andidates] writeg[raphic] writes[elect] wt x[or] ze[ta] zeta zi zo zonala[rea] zonalc[entroid] zonalf[ill] zonalg[eometry] zonalmaj[ority] zonalmax zonalmea[n] zonalmed[ian] zonalmin zonalmino[rity] zonalp[erimeter] zonalr[ange] zonalsta[ts] zonalstd zonalsu[m] zonalt[hickness] zonalv[ariety] zoomview zv + +" FORMEDIT reserved words, defined as keywords. + +syn keyword amlFormedCmd contained button choice display help input slider text + +" TABLES reserved words, defined as keywords. + +syn keyword amlTabCmd contained add additem alter asciihelp aselect at calc calculate change commands commit copy define directory dropindex dropitem erase external get help indexitem items kill list move nselect purge quit redefine rename reselect rollback save select show sort statistics unload update usagecontained + +" INFO reserved words, defined as keywords. + +syn keyword amlInfoCmd contained accept add adir alter dialog alter alt directory aret arithmetic expressions aselect automatic return calculate cchr change options change comi cominput commands list como comoutput compile concatenate controlling defaults copy cursor data delete data entry data manipulate data retrieval data update date format datafile create datafile management decode define delimiter dfmt directory management directory display do doend documentation done end environment erase execute exiting expand export external fc files first format forms control get goto help import input form ipf internal item types items label lchar list logical expressions log merge modify options modify move next nselect output password prif print programming program protect purge query quit recase redefine relate relate release notes remark rename report options reporting report reselect reserved words restrictions run save security select set sleep sort special form spool stop items system variables take terminal types terminal time topics list type update upf + +" VTRACE reserved words, defined as keywords. + +syn keyword amlVtrCmd contained add al arcscan arrowlength arrowwidth as aw backtrack branch bt cj clearjunction commands cs dash endofline endofsession eol eos fan fg foreground gap generalizetolerance gtol help hole js junctionsensitivity linesymbol linevariation linewidth ls lv lw markersymbol mode ms raster regionofinterest reset restore retrace roi save searchradius skip sr sta status stc std str straightenangle straightencorner straightendistance straightenrange vt vtrace + +" The AML reserved words, defined as keywords. + +syn keyword amlFunction contained abs access acos after angrad asin atan before calc close copy cos cover coverage cvtdistance date delete dignum dir directory entryname exist[s] exp extract file filelist format formatdate full getchar getchoice getcover getdatabase getdeflayers getfile getgrid getimage getitem getlayercols getlibrary getstack getsymbol gettin getunique iacclose iacconnect iacdisconnect iacopen iacrequest index indexed info invangle invdistance iteminfo joinfile keyword length listfile listitem listunique locase log max menu min mod noecho null okangle okdistance open pathname prefix query quote quoteexists r radang random read rename response round scratchname search show sin sort sqrt subst substr suffix tan task token translate trim truncate type unquote upcase username value variable verify write + +syn keyword amlDir contained abbreviations above all aml amlpath append arc args atool brief by call canvas cc center cl codepage commands conv_watch_to_aml coordinates cr create current cursor cwta dalines data date_format delete delvar describe dfmt digitizer display do doend dv echo else enable encode encrypt end error expansion fail file flushpoints force form format frame fullscreen function getlastpoint getpoint goto iacreturn if ignore info inform key keypad label lc left lf lg list listchar listfiles listglobal listheader listlocal listprogram listvar ll lp lr lv map matrix menu menupath menutype mess message[s] modal mouse nopaging off on others page pause pinaction popup position pt pulldown push pushpoint r repeat return right routine run runwatch rw screen seconds select self setchar severity show sidebar single size staggered station stop stripe sys system tablet tb terminal test then thread to top translate tty ty type uc ul until ur usage w warning watch when while window workspace + +syn keyword amlDir2 contained delvar dv s set setvar sv + +syn keyword amlOutput contained inform warning error pause stop tty ty type + + +" AML Directives: +syn match amlDirSym "&" +syn match amlDirective "&[a-zA-Z]*" contains=amlDir,amlDir2,amlDirSym + +" AML Functions +syn region amlFunc start="\[ *[a-zA-Z]*" end="\]" contains=amlFunction,amlVar +syn match amlFunc2 "\[.*\[.*\].*\]" contains=amlFunction,amlVar + +" Numbers: +"syn match amlNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Quoted Strings: +syn region amlQuote start=+"+ skip=+\\"+ end=+"+ contains=amlVar +syn region amlQuote start=+'+ skip=+\\'+ end=+'+ + +" ARC Application Commands only selected at the beginning of the line, +" or after a one line &if &then statement +syn match amlAppCmd "^ *[a-zA-Z]*" contains=amlArcCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFormedCmd +syn region amlAppCmd start="&then" end="$" contains=amlArcCmd,amlFormedCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFunction,amlDirective,amlVar2,amlSkip,amlVar,amlComment + +" Variables +syn region amlVar start="%" end="%" +syn region amlVar start="%" end="%" contained +syn match amlVar2 "&s [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&sv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&set [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&setvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&dv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&delvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym + +" Formedit 2 word commands +syn match amlFormed "^ *check box" +syn match amlFormed "^ *data list" +syn match amlFormed "^ *symbol list" + +" Tables 2 word commands +syn match amlTab "^ *q stop" +syn match amlTab "^ *quit stop" + +" Comments: +syn match amlComment "/\*.*" + +" Regions for skipping over (not highlighting) program output strings: +syn region amlSkip matchgroup=amlOutput start="&call" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&routine" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&inform" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &inform" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &warning" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &error" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&pause" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&stop" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&tty" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&ty" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link amlComment Comment +hi def link amlNumber Number +hi def link amlQuote String +hi def link amlVar Identifier +hi def link amlVar2 Identifier +hi def link amlFunction PreProc +hi def link amlDir Statement +hi def link amlDir2 Statement +hi def link amlDirSym Statement +hi def link amlOutput Statement +hi def link amlArcCmd ModeMsg +hi def link amlFormedCmd amlArcCmd +hi def link amlTabCmd amlArcCmd +hi def link amlInfoCmd amlArcCmd +hi def link amlVtrCmd amlArcCmd +hi def link amlFormed amlArcCmd +hi def link amlTab amlArcCmd + + +let b:current_syntax = "aml" + +endif diff --git a/syntax/ampl.vim b/syntax/ampl.vim new file mode 100644 index 00000000..699d33dc --- /dev/null +++ b/syntax/ampl.vim @@ -0,0 +1,144 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ampl') == -1 + +" Language: ampl (A Mathematical Programming Language) +" Maintainer: Krief David <david.krief@etu.enseeiht.fr> or <david_krief@hotmail.com> +" Last Change: 2003 May 11 + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + + + + +"-- +syn match amplEntityKeyword "\(subject to\)\|\(subj to\)\|\(s\.t\.\)" +syn keyword amplEntityKeyword minimize maximize objective + +syn keyword amplEntityKeyword coeff coef cover obj default +syn keyword amplEntityKeyword from to to_come net_in net_out +syn keyword amplEntityKeyword dimen dimension + + + +"-- +syn keyword amplType integer binary set param var +syn keyword amplType node ordered circular reversed symbolic +syn keyword amplType arc + + + +"-- +syn keyword amplStatement check close \display drop include +syn keyword amplStatement print printf quit reset restore +syn keyword amplStatement solve update write shell model +syn keyword amplStatement data option let solution fix +syn keyword amplStatement unfix end function pipe format + + + +"-- +syn keyword amplConditional if then else and or +syn keyword amplConditional exists forall in not within + + + +"-- +syn keyword amplRepeat while repeat for + + + +"-- +syn keyword amplOperators union diff difference symdiff sum +syn keyword amplOperators inter intersect intersection cross setof +syn keyword amplOperators by less mod div product +"syn keyword amplOperators min max +"conflict between functions max, min and operators max, min + +syn match amplBasicOperators "||\|<=\|==\|\^\|<\|=\|!\|-\|\.\.\|:=" +syn match amplBasicOperators "&&\|>=\|!=\|\*\|>\|:\|/\|+\|\*\*" + + + + +"-- +syn match amplComment "\#.*" +syn region amplComment start=+\/\*+ end=+\*\/+ + +syn region amplStrings start=+\'+ skip=+\\'+ end=+\'+ +syn region amplStrings start=+\"+ skip=+\\"+ end=+\"+ + +syn match amplNumerics "[+-]\=\<\d\+\(\.\d\+\)\=\([dDeE][-+]\=\d\+\)\=\>" +syn match amplNumerics "[+-]\=Infinity" + + +"-- +syn keyword amplSetFunction card next nextw prev prevw +syn keyword amplSetFunction first last member ord ord0 + +syn keyword amplBuiltInFunction abs acos acosh alias asin +syn keyword amplBuiltInFunction asinh atan atan2 atanh ceil +syn keyword amplBuiltInFunction cos exp floor log log10 +syn keyword amplBuiltInFunction max min precision round sin +syn keyword amplBuiltInFunction sinh sqrt tan tanh trunc + +syn keyword amplRandomGenerator Beta Cauchy Exponential Gamma Irand224 +syn keyword amplRandomGenerator Normal Poisson Uniform Uniform01 + + + +"-- to highlight the 'dot-suffixes' +syn match amplDotSuffix "\h\w*\.\(lb\|ub\)"hs=e-2 +syn match amplDotSuffix "\h\w*\.\(lb0\|lb1\|lb2\|lrc\|ub0\)"hs=e-3 +syn match amplDotSuffix "\h\w*\.\(ub1\|ub2\|urc\|val\|lbs\|ubs\)"hs=e-3 +syn match amplDotSuffix "\h\w*\.\(init\|body\|dinit\|dual\)"hs=e-4 +syn match amplDotSuffix "\h\w*\.\(init0\|ldual\|slack\|udual\)"hs=e-5 +syn match amplDotSuffix "\h\w*\.\(lslack\|uslack\|dinit0\)"hs=e-6 + + + +"-- +syn match amplPiecewise "<<\|>>" + + + +"-- Todo. +syn keyword amplTodo contained TODO FIXME XXX + + + + + + + + + + + +" The default methods for highlighting. Can be overridden later. +hi def link amplEntityKeyword Keyword +hi def link amplType Type +hi def link amplStatement Statement +hi def link amplOperators Operator +hi def link amplBasicOperators Operator +hi def link amplConditional Conditional +hi def link amplRepeat Repeat +hi def link amplStrings String +hi def link amplNumerics Number +hi def link amplSetFunction Function +hi def link amplBuiltInFunction Function +hi def link amplRandomGenerator Function +hi def link amplComment Comment +hi def link amplDotSuffix Special +hi def link amplPiecewise Special + + +let b:current_syntax = "ampl" + +" vim: ts=8 + + + +endif diff --git a/syntax/ant.vim b/syntax/ant.vim new file mode 100644 index 00000000..0930401a --- /dev/null +++ b/syntax/ant.vim @@ -0,0 +1,101 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 + +" Vim syntax file +" Language: ANT build file (xml) +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue Apr 27 13:05:59 CEST 2004 +" Filenames: build.xml +" $Id: ant.vim,v 1.1 2004/06/13 18:13:18 vimboss Exp $ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:ant_cpo_save = &cpo +set cpo&vim + +runtime! syntax/xml.vim + +syn case ignore + +if !exists('*AntSyntaxScript') + fun AntSyntaxScript(tagname, synfilename) + unlet b:current_syntax + let s:include = expand("<sfile>:p:h").'/'.a:synfilename + if filereadable(s:include) + exe 'syn include @ant'.a:tagname.' '.s:include + else + exe 'syn include @ant'.a:tagname." $VIMRUNTIME/syntax/".a:synfilename + endif + + exe 'syn region ant'.a:tagname + \." start=#<script[^>]\\{-}language\\s*=\\s*['\"]".a:tagname."['\"]\\(>\\|[^>]*[^/>]>\\)#" + \.' end=#</script>#' + \.' fold' + \.' contains=@ant'.a:tagname.',xmlCdataStart,xmlCdataEnd,xmlTag,xmlEndTag' + \.' keepend' + exe 'syn cluster xmlRegionHook add=ant'.a:tagname + endfun +endif + +" TODO: add more script languages here ? +call AntSyntaxScript('javascript', 'javascript.vim') +call AntSyntaxScript('jpython', 'python.vim') + + +syn cluster xmlTagHook add=antElement + +syn keyword antElement display WsdlToDotnet addfiles and ant antcall antstructure apply archives arg argument +syn keyword antElement display assertions attrib attribute available basename bcc blgenclient bootclasspath +syn keyword antElement display borland bottom buildnumber buildpath buildpathelement bunzip2 bzip2 cab +syn keyword antElement display catalogpath cc cccheckin cccheckout cclock ccmcheckin ccmcheckintask ccmcheckout +syn keyword antElement display ccmcreatetask ccmkattr ccmkbl ccmkdir ccmkelem ccmklabel ccmklbtype +syn keyword antElement display ccmreconfigure ccrmtype ccuncheckout ccunlock ccupdate checksum chgrp chmod +syn keyword antElement display chown classconstants classes classfileset classpath commandline comment +syn keyword antElement display compilerarg compilerclasspath concat concatfilter condition copy copydir +syn keyword antElement display copyfile coveragepath csc custom cvs cvschangelog cvspass cvstagdiff cvsversion +syn keyword antElement display daemons date defaultexcludes define delete deletecharacters deltree depend +syn keyword antElement display depends dependset depth description different dirname dirset disable dname +syn keyword antElement display doclet doctitle dtd ear echo echoproperties ejbjar element enable entity entry +syn keyword antElement display env equals escapeunicode exclude excludepackage excludesfile exec execon +syn keyword antElement display existing expandproperties extdirs extension extensionSet extensionset factory +syn keyword antElement display fail filelist filename filepath fileset filesmatch filetokenizer filter +syn keyword antElement display filterchain filterreader filters filterset filtersfile fixcrlf footer format +syn keyword antElement display from ftp generic genkey get gjdoc grant group gunzip gzip header headfilter http +syn keyword antElement display ignoreblank ilasm ildasm import importtypelib include includesfile input iplanet +syn keyword antElement display iplanet-ejbc isfalse isreference isset istrue jar jarlib-available +syn keyword antElement display jarlib-manifest jarlib-resolve java javac javacc javadoc javadoc2 jboss jdepend +syn keyword antElement display jjdoc jjtree jlink jonas jpcoverage jpcovmerge jpcovreport jsharpc jspc +syn keyword antElement display junitreport jvmarg lib libfileset linetokenizer link loadfile loadproperties +syn keyword antElement display location macrodef mail majority manifest map mapper marker mergefiles message +syn keyword antElement display metainf method mimemail mkdir mmetrics modified move mparse none not options or +syn keyword antElement display os outputproperty package packageset parallel param patch path pathconvert +syn keyword antElement display pathelement patternset permissions prefixlines present presetdef project +syn keyword antElement display property propertyfile propertyref propertyset pvcs pvcsproject record reference +syn keyword antElement display regexp rename renameext replace replacefilter replaceregex replaceregexp +syn keyword antElement display replacestring replacetoken replacetokens replacevalue replyto report resource +syn keyword antElement display revoke rmic root rootfileset rpm scp section selector sequential serverdeploy +syn keyword antElement display setproxy signjar size sleep socket soscheckin soscheckout sosget soslabel source +syn keyword antElement display sourcepath sql src srcfile srcfilelist srcfiles srcfileset sshexec stcheckin +syn keyword antElement display stcheckout stlabel stlist stringtokenizer stripjavacomments striplinebreaks +syn keyword antElement display striplinecomments style subant substitution support symlink sync sysproperty +syn keyword antElement display syspropertyset tabstospaces tag taglet tailfilter tar tarfileset target +syn keyword antElement display targetfile targetfilelist targetfileset taskdef tempfile test testlet text title +syn keyword antElement display to token tokenfilter touch transaction translate triggers trim tstamp type +syn keyword antElement display typedef unjar untar unwar unzip uptodate url user vbc vssadd vsscheckin +syn keyword antElement display vsscheckout vsscp vsscreate vssget vsshistory vsslabel waitfor war wasclasspath +syn keyword antElement display webapp webinf weblogic weblogictoplink websphere whichresource wlclasspath +syn keyword antElement display wljspc wsdltodotnet xmlcatalog xmlproperty xmlvalidate xslt zip zipfileset +syn keyword antElement display zipgroupfileset + +hi def link antElement Statement + +let b:current_syntax = "ant" + +let &cpo = s:ant_cpo_save +unlet s:ant_cpo_save + +" vim: ts=8 + +endif diff --git a/syntax/apache.vim b/syntax/apache.vim new file mode 100644 index 00000000..b515c411 --- /dev/null +++ b/syntax/apache.vim @@ -0,0 +1,205 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apache') == -1 + +" Vim syntax file +" Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess) +" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> +" License: This file can be redistribued and/or modified under the same terms +" as Vim itself. +" Last Change: 2018-12-06 +" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported +" TODO: see particular FIXME's scattered through the file +" make it really linewise? +" + add `display' where appropriate + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" Base constructs +syn match apacheComment "^\s*#.*$" contains=apacheFixme +syn match apacheUserID "#-\?\d\+\>" +syn case match +syn keyword apacheFixme FIXME TODO XXX NOT +syn case ignore +syn match apacheAnything "\s[^>]*" contained +syn match apacheError "\w\+" contained +syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+ oneline + +" Following is to prevent escaped quotes from being parsed as strings. +syn match apacheSkipQuote +\\"+ + +" Core and mpm +syn keyword apacheDeclaration AccessFileName AddDefaultCharset AllowOverride AuthName AuthType ContentDigest DefaultType DocumentRoot ErrorDocument ErrorLog HostNameLookups IdentityCheck Include KeepAlive KeepAliveTimeout LimitRequestBody LimitRequestFields LimitRequestFieldsize LimitRequestLine LogLevel MaxKeepAliveRequests NameVirtualHost Options Require RLimitCPU RLimitMEM RLimitNPROC Satisfy ScriptInterpreterSource ServerAdmin ServerAlias ServerName ServerPath ServerRoot ServerSignature ServerTokens TimeOut UseCanonicalName +syn keyword apacheDeclaration AcceptPathInfo CGIMapExtension EnableMMAP FileETag ForceType LimitXMLRequestBody SetHandler SetInputFilter SetOutputFilter +syn keyword apacheDeclaration AcceptFilter AllowEncodedSlashes EnableSendfile LimitInternalRecursion TraceEnable +syn keyword apacheOption INode MTime Size +syn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Full +syn keyword apacheOption emerg alert crit error warn notice info debug +syn keyword apacheOption registry script inetd standalone +syn match apacheOptionOption "[+-]\?\<\(ExecCGI\|FollowSymLinks\|Includes\|IncludesNoExec\|Indexes\|MultiViews\|SymLinksIfOwnerMatch\)\>" +syn keyword apacheOption user group +syn match apacheOption "\<valid-user\>" +syn case match +syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained +syn case ignore +syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything +syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError +syn keyword apacheLimitSectionKeyword Limit LimitExcept contained +syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue +syn keyword apacheAuthTypeValue Basic Digest +syn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheComment +syn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained +syn keyword apacheDeclaration CoreDumpDirectory EnableExceptionHook GracefulShutdownTimeout Group Listen ListenBacklog LockFile MaxClients MaxMemFree MaxRequestsPerChild MaxSpareThreads MaxSpareThreadsPerChild MinSpareThreads NumServers PidFile ScoreBoardFile SendBufferSize ServerLimit StartServers StartThreads ThreadLimit ThreadsPerChild User +syn keyword apacheDeclaration MaxThreads ThreadStackSize +syn keyword apacheDeclaration Win32DisableAcceptEx +syn keyword apacheDeclaration AssignUserId ChildPerUserId +syn keyword apacheDeclaration AcceptMutex MaxSpareServers MinSpareServers +syn keyword apacheOption flock fcntl sysvsem pthread + +" Modules +syn keyword apacheDeclaration Action Script +syn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatch +syn keyword apacheOption permanent temp seeother gone +syn keyword apacheDeclaration AuthAuthoritative AuthGroupFile AuthUserFile +syn keyword apacheDeclaration AuthBasicAuthoritative AuthBasicProvider +syn keyword apacheDeclaration AuthDigestAlgorithm AuthDigestDomain AuthDigestNcCheck AuthDigestNonceFormat AuthDigestNonceLifetime AuthDigestProvider AuthDigestQop AuthDigestShmemSize +syn keyword apacheOption none auth auth-int MD5 MD5-sess +syn match apacheSection "<\/\=\(<AuthnProviderAlias\)[^>]*>" contains=apacheAnything +syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail +syn keyword apacheDeclaration AuthDBDUserPWQuery AuthDBDUserRealmQuery +syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMAuthoritative +syn keyword apacheDeclaration AuthDBM TypeAuthDBMUserFile +syn keyword apacheOption default SDBM GDBM NDBM DB +syn keyword apacheDeclaration AuthDefaultAuthoritative +syn keyword apacheDeclaration AuthUserFile +syn keyword apacheDeclaration AuthLDAPBindON AuthLDAPEnabled AuthLDAPFrontPageHack AuthLDAPStartTLS +syn keyword apacheDeclaration AuthLDAPBindDN AuthLDAPBindPassword AuthLDAPCharsetConfig AuthLDAPCompareDNOnServer AuthLDAPDereferenceAliases AuthLDAPGroupAttribute AuthLDAPGroupAttributeIsDN AuthLDAPRemoteUserIsDN AuthLDAPUrl AuthzLDAPAuthoritative +syn keyword apacheOption always never searching finding +syn keyword apacheOption ldap-user ldap-group ldap-dn ldap-attribute ldap-filter +syn keyword apacheDeclaration AuthDBMGroupFile AuthzDBMAuthoritative AuthzDBMType +syn keyword apacheDeclaration AuthzDefaultAuthoritative +syn keyword apacheDeclaration AuthGroupFile AuthzGroupFileAuthoritative +syn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheComment +syn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheComment +syn keyword apacheAllowDenyValue All None contained +syn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheComment +syn keyword apacheOrderValue Deny Allow contained +syn keyword apacheDeclaration AuthzOwnerAuthoritative +syn keyword apacheDeclaration AuthzUserAuthoritative +syn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeName +syn keyword apacheDeclaration IndexStyleSheet +syn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSize TrackModified +syn keyword apacheOption Ascending Descending Name Date Size Description +syn keyword apacheOption HTMLTable SuppressIcon SuppressRules VersionSort XHTML +syn keyword apacheOption IgnoreClient IgnoreCase ShowForbidden SuppresRules +syn keyword apacheDeclaration CacheForceCompletion CacheMaxStreamingBuffer +syn keyword apacheDeclaration CacheDefaultExpire CacheDisable CacheEnable CacheIgnoreCacheControl CacheIgnoreHeaders CacheIgnoreNoLastMod CacheLastModifiedFactor CacheMaxExpire CacheStoreNoStore CacheStorePrivate +syn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix +syn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer +syn keyword apacheDeclaration ScriptStock +syn keyword apacheDeclaration CharsetDefault CharsetOptions CharsetSourceEnc +syn keyword apacheOption DebugLevel ImplicitAdd NoImplicitAdd +syn keyword apacheDeclaration Dav DavDepthInfinity DavMinTimeout +syn keyword apacheDeclaration DavLockDB +syn keyword apacheDeclaration DavGenericLockDB +syn keyword apacheDeclaration DBDExptime DBDKeep DBDMax DBDMin DBDParams DBDPersist DBDPrepareSQL DBDriver +syn keyword apacheDeclaration DeflateCompressionLevel DeflateBufferSize DeflateFilterNote DeflateMemLevel DeflateWindowSize +syn keyword apacheDeclaration DirectoryIndex DirectorySlash +syn keyword apacheDeclaration CacheExpiryCheck CacheGcClean CacheGcDaily CacheGcInterval CacheGcMemUsage CacheGcUnused CacheSize CacheTimeMargin +syn keyword apacheDeclaration CacheDirLength CacheDirLevels CacheMaxFileSize CacheMinFileSize CacheRoot +syn keyword apacheDeclaration DumpIOInput DumpIOOutput +syn keyword apacheDeclaration ProtocolEcho +syn keyword apacheDeclaration PassEnv SetEnv UnsetEnv +syn keyword apacheDeclaration Example +syn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault +syn keyword apacheDeclaration ExtFilterDefine ExtFilterOptions +syn keyword apacheOption PreservesContentLength DebugLevel LogStderr NoLogStderr +syn match apacheOption "\<\(cmd\|mode\|intype\|outtype\|ftype\|disableenv\|enableenv\)\ze=" +syn keyword apacheDeclaration CacheFile MMapFile +syn keyword apacheDeclaration FilterChain FilterDeclare FilterProtocol FilterProvider FilterTrace +syn keyword apacheDeclaration Header +syn keyword apacheDeclaration RequestHeader +syn keyword apacheOption set unset append add +syn keyword apacheDeclaration IdentityCheck IdentityCheckTimeout +syn keyword apacheDeclaration ImapMenu ImapDefault ImapBase +syn keyword apacheOption none formatted semiformatted unformatted +syn keyword apacheOption nocontent referer error map +syn keyword apacheDeclaration SSIEndTag SSIErrorMsg SSIStartTag SSITimeFormat SSIUndefinedEcho XBitHack +syn keyword apacheOption on off full +syn keyword apacheDeclaration AddModuleInfo +syn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery +syn keyword apacheDeclaration ISAPICacheFile ISAIPFakeAsync +syn keyword apacheDeclaration LDAPCertDBPath +syn keyword apacheDeclaration LDAPCacheEntries LDAPCacheTTL LDAPConnectionTimeout LDAPOpCacheEntries LDAPOpCacheTTL LDAPSharedCacheFile LDAPSharedCacheSize LDAPTrustedClientCert LDAPTrustedGlobalCert LDAPTrustedMode LDAPVerifyServerCert +syn keyword apacheOption CA_DER CA_BASE64 CA_CERT7_DB CA_SECMOD CERT_DER CERT_BASE64 CERT_KEY3_DB CERT_NICKNAME CERT_PFX KEY_DER KEY_BASE64 KEY_PFX +syn keyword apacheDeclaration BufferedLogs CookieLog CustomLog LogFormat TransferLog +syn keyword apacheDeclaration ForensicLog +syn keyword apacheDeclaration MCacheMaxObjectCount MCacheMaxObjectSize MCacheMaxStreamingBuffer MCacheMinObjectSize MCacheRemovalAlgorithm MCacheSize +syn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage RemoveEncoding RemoveHandler RemoveType TypesConfig +syn keyword apacheDeclaration AddInputFilter AddOutputFilter ModMimeUsePathInfo MultiviewsMatch RemoveInputFilter RemoveOutputFilter RemoveCharset +syn keyword apacheOption NegotiatedOnly Filters Handlers +syn keyword apacheDeclaration MimeMagicFile +syn keyword apacheDeclaration MMapFile +syn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority ForceLanguagePriority +syn keyword apacheDeclaration NWSSLTrustedCerts NWSSLUpgradeable SecureListen +syn keyword apacheDeclaration PerlModule PerlRequire PerlTaintCheck PerlWarn +syn keyword apacheDeclaration PerlSetVar PerlSetEnv PerlPassEnv PerlSetupEnv +syn keyword apacheDeclaration PerlInitHandler PerlPostReadRequestHandler PerlHeaderParserHandler +syn keyword apacheDeclaration PerlTransHandler PerlAccessHandler PerlAuthenHandler PerlAuthzHandler +syn keyword apacheDeclaration PerlTypeHandler PerlFixupHandler PerlHandler PerlLogHandler +syn keyword apacheDeclaration PerlCleanupHandler PerlChildInitHandler PerlChildExitHandler +syn keyword apacheDeclaration PerlRestartHandler PerlDispatchHandler +syn keyword apacheDeclaration PerlFreshRestart PerlSendHeader +syn keyword apacheDeclaration php_value php_flag php_admin_value php_admin_flag +syn match apacheSection "<\/\=\(Proxy\|ProxyMatch\)[^>]*>" contains=apacheAnything +syn keyword apacheDeclaration AllowCONNECT NoProxy ProxyBadHeader ProxyBlock ProxyDomain ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards ProxyPass ProxyPassMatch ProxyPassReverse ProxyPassReverseCookieDomain ProxyPassReverseCookiePath ProxyPreserveHost ProxyReceiveBufferSize ProxyRemote ProxyRemoteMatch ProxyRequests ProxyTimeout ProxyVia +syn keyword apacheDeclaration RewriteBase RewriteCond RewriteEngine RewriteLock RewriteLog RewriteLogLevel RewriteMap RewriteOptions RewriteRule +syn keyword apacheOption inherit +syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase +syn keyword apacheDeclaration LoadFile LoadModule +syn keyword apacheDeclaration CheckSpelling CheckCaseOnly +syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth +syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>" +syn keyword apacheOption builtin sem +syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):" +syn match apacheOption "[+-]\?\<\(SSLv2\|SSLv3\|TLSv1\|kRSA\|kHDr\|kDHd\|kEDH\|aNULL\|aRSA\|aDSS\|aRH\|eNULL\|DES\|3DES\|RC2\|RC4\|IDEA\|MD5\|SHA1\|SHA\|EXP\|EXPORT40\|EXPORT56\|LOW\|MEDIUM\|HIGH\|RSA\|DH\|EDH\|ADH\|DSS\|NULL\)\>" +syn keyword apacheOption optional optional_no_ca +syn keyword apacheDeclaration ExtendedStatus +syn keyword apacheDeclaration SuexecUserGroup +syn keyword apacheDeclaration UserDir +syn keyword apacheDeclaration CookieDomain CookieExpires CookieName CookieStyle CookieTracking +syn keyword apacheOption Netscape Cookie Cookie2 RFC2109 RFC2965 +syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything +syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP + +" Define the default highlighting + +hi def link apacheAllowOverride apacheDeclaration +hi def link apacheAllowOverrideValue apacheOption +hi def link apacheAuthType apacheDeclaration +hi def link apacheAuthTypeValue apacheOption +hi def link apacheOptionOption apacheOption +hi def link apacheDeclaration Function +hi def link apacheAnything apacheOption +hi def link apacheOption Number +hi def link apacheComment Comment +hi def link apacheFixme Todo +hi def link apacheLimitSectionKeyword apacheLimitSection +hi def link apacheLimitSection apacheSection +hi def link apacheSection Label +hi def link apacheMethodOption Type +hi def link apacheAllowDeny Include +hi def link apacheAllowDenyValue Identifier +hi def link apacheOrder Special +hi def link apacheOrderValue String +hi def link apacheString String +hi def link apacheError Error +hi def link apacheUserID Number + + +let b:current_syntax = "apache" + +endif diff --git a/syntax/aptconf.vim b/syntax/aptconf.vim new file mode 100644 index 00000000..4d88ce65 --- /dev/null +++ b/syntax/aptconf.vim @@ -0,0 +1,578 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aptconf') == -1 + +" Vim syntax file +" Language: APT config file +" Maintainer: Yann Amar <quidame@poivron.org> +" Last Change: 2015 Dec 22 + +" quit when a syntax file was already loaded +if !exists("main_syntax") + if exists("b:current_syntax") + finish + endif + let main_syntax = 'aptconf' +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Errors: +" Catch all that is not overridden by next rules/items: +syn match aptconfError display '[^[:blank:]]' +syn match aptconfError display '^[^[:blank:]][^:{]*' + +" Options: +" Define a general regular expression for the options that are not defined +" later as keywords. Following apt.conf(5), we know that options are case +" insensitive, and can contain alphanumeric characters and '/-:._+'; we +" assume that there can not be consecutive colons (::) which is used as +" syntax operator; we also assume that an option name can not start or end +" by a colon. +syn case ignore +syn match aptconfRegexpOpt '[-[:alnum:]/.+_]\+\(:[-[:alnum:]/.+_]\+\)*' contained display + +" Keywords: +setlocal iskeyword+=/,-,.,_,+ +"setlocal iskeyword+=: is problematic, because of the '::' separator + +" Incomplete keywords will be treated differently than completely bad strings: +syn keyword aptconfGroupIncomplete + \ a[cquire] a[dequate] a[ptitude] a[ptlistbugs] d[ebtags] d[ebug] + \ d[ir] d[pkg] d[select] o[rderlist] p[ackagemanager] p[kgcachegen] + \ q[uiet] r[pm] s[ynaptic] u[nattended-upgrade] w[hatmaps] + +" Only the following keywords can be used at toplevel (to begin an option): +syn keyword aptconfGroup + \ acquire adequate apt aptitude aptlistbugs debtags debug + \ dir dpkg dselect orderlist packagemanager pkgcachegen + \ quiet rpm synaptic unattended-upgrade whatmaps + +" Possible options for each group: +" Acquire: {{{ +syn keyword aptconfAcquire contained + \ cdrom Check-Valid-Until CompressionTypes ForceHash ForceIPv4 + \ ForceIPv6 ftp gpgv GzipIndexes http https Languages Max-ValidTime + \ Min-ValidTime PDiffs Queue-Mode Retries Source-Symlinks + +syn keyword aptconfAcquireCDROM contained + \ AutoDetect CdromOnly Mount UMount + +syn keyword aptconfAcquireCompressionTypes contained + \ bz2 lzma gz Order + +syn keyword aptconfAcquireFTP contained + \ ForceExtended Passive Proxy ProxyLogin Timeout + +syn keyword aptconfAcquireHTTP contained + \ AllowRedirect Dl-Limit Max-Age No-Cache No-Store Pipeline-Depth + \ Proxy ProxyAutoDetect Proxy-Auto-Detect Timeout User-Agent + +syn keyword aptconfAcquireHTTPS contained + \ AllowRedirect CaInfo CaPath CrlFile Dl-Limit IssuerCert Max-Age + \ No-Cache No-Store Proxy SslCert SslForceVersion SslKey Timeout + \ Verify-Host Verify-Peer + +syn keyword aptconfAcquireMaxValidTime contained + \ Debian Debian-Security + +syn keyword aptconfAcquirePDiffs contained + \ FileLimit SizeLimit + +syn cluster aptconfAcquire_ contains=aptconfAcquire, + \ aptconfAcquireCDROM,aptconfAcquireCompressionTypes,aptconfAcquireFTP, + \ aptconfAcquireHTTP,aptconfAcquireHTTPS,aptconfAcquireMaxValidTime, + \ aptconfAcquirePDiffs +" }}} +" Adequate: {{{ +syn keyword aptconfAdequate contained + \ Enabled + +syn cluster aptconfAdequate_ contains=aptconfAdequate +" }}} +" Apt: {{{ +syn keyword aptconfApt contained + \ Architecture Architectures Archive Authentication AutoRemove + \ Build-Essential Build-Profiles Cache Cache-Grow Cache-Limit + \ Cache-Start CDROM Changelogs Clean-Installed Compressor + \ Default-Release Force-LoopBreak Get Ignore-Hold Immediate-Configure + \ Install-Recommends Install-Suggests Keep-Fds List-Cleanup + \ Move-Autobit-Sections NeverAutoRemove Never-MarkAuto-Sections + \ Periodic Status-Fd Update VersionedKernelPackages + +syn keyword aptconfAptAuthentication contained + \ TrustCDROM + +syn keyword aptconfAptAutoRemove contained + \ RecommendsImportant SuggestsImportant + +syn keyword aptconfAptCache contained + \ AllNames AllVersions Generate GivenOnly Important Installed NamesOnly + \ RecurseDepends ShowFull + +syn keyword aptconfAptCDROM contained + \ Fast NoAct NoMount Rename + +syn keyword aptconfAptChangelogs contained + \ Server + +syn keyword aptconfAptCompressor contained + \ bzip2 gzip lzma xz + +syn keyword aptconfAptCompressorAll contained + \ Binary CompressArg Cost Extension Name UncompressArg + +syn keyword aptconfAptGet contained + \ AllowUnauthenticated Arch-Only Assume-No Assume-Yes AutomaticRemove + \ Build-Dep-Automatic Compile Diff-Only Download Download-Only Dsc-Only + \ Fix-Broken Fix-Missing Force-Yes HideAutoRemove Host-Architecture + \ List-Cleanup Only-Source Print-URIs Purge ReInstall Remove + \ Show-Upgraded Show-User-Simulation-Note Show-Versions Simulate + \ Tar-Only Trivial-Only Upgrade + +syn keyword aptconfAptPeriodic contained + \ AutocleanInterval BackupArchiveInterval BackupLevel + \ Download-Upgradeable-Packages Download-Upgradeable-Packages-Debdelta + \ Enable MaxAge MaxSize MinAge Unattended-Upgrade Update-Package-Lists + \ Verbose + +syn keyword aptconfAptUpdate contained + \ List-Refresh Pre-Invoke Post-Invoke Post-Invoke-Success + +syn cluster aptconfApt_ contains=aptconfApt, + \ aptconfAptAuthentication,aptconfAptAutoRemove,aptconfAptCache, + \ aptconfAptCDROM,aptconfAptChangelogs,aptconfAptCompressor, + \ aptconfAptCompressorAll,aptconfAptGet,aptconfAptPeriodic, + \ aptconfAptUpdate +" }}} +" Aptitude: {{{ +syn keyword aptconfAptitude contained + \ Allow-Null-Upgrade Always-Use-Safe-Resolver Autoclean-After-Update + \ Auto-Install Auto-Fix-Broken Cmdline Debtags-Binary + \ Debtags-Update-Options Delete-Unused Delete-Unused-Pattern + \ Display-Planned-Action Forget-New-On-Install Forget-New-On-Update + \ Get-Root-Command Ignore-Old-Tmp Ignore-Recommends-Important + \ Keep-Recommends Keep-Suggests Keep-Unused-Pattern LockFile Log + \ Logging Parse-Description-Bullets Pkg-Display-Limit ProblemResolver + \ Purge-Unused Recommends-Important Safe-Resolver Screenshot Sections + \ Simulate Spin-Interval Suggests-Important Suppress-Read-Only-Warning + \ Theme Track-Dselect-State UI Warn-Not-Root + +syn keyword aptconfAptitudeCmdline contained + \ Always-Prompt Assume-Yes Disable-Columns Download-Only Fix-Broken + \ Ignore-Trust-Violations Package-Display-Format Package-Display-Width + \ Progress Request-Strictness Resolver-Debug Resolver-Dump + \ Resolver-Show-Steps Safe-Upgrade Show-Deps Show-Size-Changes + \ Show-Versions Show-Why Simulate Verbose Version-Display-Format + \ Versions-Group-By Versions-Show-Package-Names Visual-Preview + \ Why-Display-Mode + +syn keyword aptconfAptitudeCmdlineProgress contained + \ Percent-On-Right Retain-Completed + +syn keyword aptconfAptitudeCmdlineSafeUpgrade contained + \ No-New-Installs + +syn keyword aptconfAptitudeLogging contained + \ File Levels + +syn keyword aptconfAptitudeProblemResolver contained + \ Allow-Break-Holds BreakHoldScore Break-Hold-Level BrokenScore + \ DefaultResolutionScore Discard-Null-Solution + \ EssentialRemoveScore ExtraScore FullReplacementScore FutureHorizon + \ Hints ImportantScore Infinity InstallScore Keep-All-Level KeepScore + \ NonDefaultScore Non-Default-Level OptionalScore PreserveAutoScore + \ PreserveManualScore RemoveScore Remove-Essential-Level Remove-Level + \ RequiredScore ResolutionScore Safe-Level SolutionCost StandardScore + \ StepLimit StepScore Trace-Directory Trace-File + \ UndoFullReplacementScore UnfixedSoftScore UpgradeScore + +syn keyword aptconfAptitudeSafeResolver contained + \ No-New-Installs No-New-Upgrades Show-Resolver-Actions + +syn keyword aptconfAptitudeScreenshot contained + \ Cache-Max IncrementalLoadLimit + +syn keyword aptconfAptitudeSections contained + \ Descriptions Top-Sections + +syn keyword aptconfAptitudeUI contained + \ Advance-On-Action Auto-Show-Reasons Default-Grouping + \ Default-Package-View Default-Preview-Grouping Default-Sorting + \ Description-Visible-By-Default Exit-On-Last-Close Fill-Text + \ Flat-View-As-First-View HelpBar Incremental-Search InfoAreaTabs + \ KeyBindings MenuBar-Autohide Minibuf-Download-Bar Minibuf-Prompts + \ New-package-Commands Package-Display-Format Package-Header-Format + \ Package-Status-Format Pause-After-Download Preview-Limit + \ Prompt-On-Exit Styles ViewTabs + +syn keyword aptconfAptitudeUIKeyBindings contained + \ ApplySolution Begin BugReport Cancel Changelog ChangePkgTreeGrouping + \ ChangePkgTreeLimit ChangePkgTreeSorting ClearAuto CollapseAll + \ CollapseTree Commit Confirm Cycle CycleNext CycleOrder CyclePrev + \ DelBOL DelBack DelEOL DelForward Dependencies DescriptionCycle + \ DescriptionDown DescriptionUp DoInstallRun Down DpkgReconfigure + \ DumpResolver EditHier End ExamineSolution ExpandAll ExpandTree + \ FirstSolution ForbidUpgrade ForgetNewPackages Help HistoryNext + \ HistoryPrev Hold Install InstallSingle Keep LastSolution Left + \ LevelDown LevelUp MarkUpgradable MineFlagSquare MineLoadGame + \ MineSaveGame MineSweepSquare MineUncoverSquare MineUncoverSweepSquare + \ NextPage NextSolution No Parent PrevPage PrevSolution Purge + \ PushButton Quit QuitProgram RejectBreakHolds Refresh Remove + \ ReInstall RepeatSearchBack ReSearch ReverseDependencies Right + \ SaveHier Search SearchBack SearchBroken SetAuto ShowHideDescription + \ SolutionActionApprove SolutionActionReject ToggleExpanded + \ ToggleMenuActive Undo Up UpdatePackageList Versions Yes + +syn keyword aptconfAptitudeUIStyles contained + \ Bullet ChangeLogNewerVersion Default DepBroken DisabledMenuEntry + \ DownloadHit DownloadProgress EditLine Error Header HighlightedMenuBar + \ HighlightedMenuEntry MediaChange MenuBar MenuBorder MenuEntry + \ MineBomb MineBorder MineFlag MineNumber1 MineNumber2 MineNumber3 + \ MineNumber4 MineNumber5 MineNumber6 MineNumber7 MineNumber8 + \ MultiplexTab MultiplexTabHighlighted PkgBroken PkgBrokenHighlighted + \ PkgIsInstalled PkgIsInstalledHighlighted PkgNotInstalled + \ PkgNotInstalledHighlighted PkgToDowngrade PkgToDowngradeHighlighted + \ PkgToHold PkgToHoldHighlighted PkgToInstall PkgToInstallHighlighted + \ PkgToRemove PkgToRemoveHighlighted PkgToUpgrade + \ PkgToUpgradeHighlighted Progress SolutionActionApproved + \ SolutionActionRejected Status TreeBackground TrustWarning + +syn keyword aptconfAptitudeUIStylesElements contained + \ bg clear fg flip set + +syn cluster aptconfAptitude_ contains=aptconfAptitude, + \ aptconfAptitudeCmdline,aptconfAptitudeCmdlineProgress, + \ aptconfAptitudeCmdlineSafeUpgrade,aptconfAptitudeLogging, + \ aptconfAptitudeProblemResolver,aptconfAptitudeSafeResolver, + \ aptconfAptitudeScreenshot,aptconfAptitudeSections,aptconfAptitudeUI, + \ aptconfAptitudeUIKeyBindings,aptconfAptitudeUIStyles, + \ aptconfAptitudeUIStylesElements +" }}} +" AptListbugs: {{{ +syn keyword aptconfAptListbugs contained + \ IgnoreRegexp Severities + +syn cluster aptconfAptListbugs_ contains=aptconfAptListbugs +" }}} +" DebTags: {{{ +syn keyword aptconfDebTags contained + \ Vocabulary + +syn cluster aptconfDebTags_ contains=aptconfDebTags +" }}} +" Debug: {{{ +syn keyword aptconfDebug contained + \ Acquire aptcdrom BuildDeps Hashes IdentCdrom Nolocking + \ pkgAcquire pkgAutoRemove pkgCacheGen pkgDepCache pkgDPkgPM + \ pkgDPkgProgressReporting pkgInitialize pkgOrderList + \ pkgPackageManager pkgPolicy pkgProblemResolver RunScripts + \ sourceList + +syn keyword aptconfDebugAcquire contained + \ cdrom Ftp gpgv Http Https netrc + +syn keyword aptconfDebugPkgAcquire contained + \ Auth Diffs RRed Worker + +syn keyword aptconfDebugPkgDepCache contained + \ AutoInstall Marker + +syn keyword aptconfDebugPkgProblemResolver contained + \ ShowScores + +syn cluster aptconfDebug_ contains=aptconfDebug, + \ aptconfDebugAcquire,aptconfDebugPkgAcquire,aptconfDebugPkgDepCache, + \ aptconfDebugPkgProblemResolver +" }}} +" Dir: {{{ +syn keyword aptconfDir contained + \ Aptitude Bin Cache Etc Ignore-Files-Silently Log Media Parts RootDir + \ State + +syn keyword aptconfDirAptitude contained + \ state + +syn keyword aptconfDirBin contained + \ apt-get apt-cache dpkg dpkg-buildpackage dpkg-source gpg gzip Methods + \ solvers + +syn keyword aptconfDirCache contained + \ Archives Backup pkgcache srcpkgcache + +syn keyword aptconfDirEtc contained + \ Main Netrc Parts Preferences PreferencesParts SourceList SourceParts + \ VendorList VendorParts Trusted TrustedParts + +syn keyword aptconfDirLog contained + \ History Terminal + +syn keyword aptconfDirMedia contained + \ MountPath + +syn keyword aptconfDirState contained + \ cdroms extended_states Lists mirrors preferences status + +syn cluster aptconfDir_ contains=aptconfDir, + \ aptconfDirAptitude,aptconfDirBin,aptconfDirCache,aptconfDirEtc, + \ aptconfDirLog,aptconfDirMedia,aptconfDirState +" }}} +" DPkg: {{{ +syn keyword aptconfDPkg contained + \ Build-Options Chroot-Directory ConfigurePending FlushSTDIN + \ MaxArgBytes MaxArgs MaxBytes NoTriggers options + \ Pre-Install-Pkgs Pre-Invoke Post-Invoke + \ Run-Directory StopOnError Tools TriggersPending + +syn keyword aptconfDPkgTools contained + \ adequate InfoFD Options Version + +syn cluster aptconfDPkg_ contains=aptconfDPkg, + \ aptconfDPkgTools +" }}} +" DSelect: {{{ +syn keyword aptconfDSelect contained + \ CheckDir Clean Options PromptAfterUpdate UpdateOptions + +syn cluster aptconfDSelect_ contains=aptconfDSelect +" }}} +" OrderList: {{{ +syn keyword aptconfOrderList contained + \ Score + +syn keyword aptconfOrderListScore contained + \ Delete Essential Immediate PreDepends + +syn cluster aptconfOrderList_ contains=aptconfOrderList, + \ aptconfOrderListScore +" }}} +" PackageManager: {{{ +syn keyword aptconfPackageManager contained + \ Configure + +syn cluster aptconfPackageManager_ contains=aptconfPackageManager +" }}} +" PkgCacheGen: {{{ +syn keyword aptconfPkgCacheGen contained + \ Essential + +syn cluster aptconfPkgCacheGen_ contains=aptconfPkgCacheGen +" }}} +" Quiet: {{{ +syn keyword aptconfQuiet contained + \ NoUpdate + +syn cluster aptconfQuiet_ contains=aptconfQuiet +" }}} +" Rpm: {{{ +syn keyword aptconfRpm contained + \ Post-Invoke Pre-Invoke + +syn cluster aptconfRpm_ contains=aptconfRpm +" }}} +" Synaptic: {{{ +syn keyword aptconfSynaptic contained + \ AskQuitOnProceed AskRelated AutoCleanCache CleanCache DefaultDistro + \ delAction delHistory Download-Only ftpProxy ftpProxyPort httpProxy + \ httpProxyPort Install-Recommends LastSearchType Maximized noProxy + \ OneClickOnStatusActions ShowAllPkgInfoInMain showWelcomeDialog + \ ToolbarState undoStackSize update upgradeType useProxy UseStatusColors + \ UseTerminal useUserFont useUserTerminalFont ViewMode + \ availVerColumnPos availVerColumnVisible componentColumnPos + \ componentColumnVisible descrColumnPos descrColumnVisible + \ downloadSizeColumnPos downloadSizeColumnVisible hpanedPos + \ instVerColumnPos instVerColumnVisible instSizeColumnPos + \ instSizeColumnVisible nameColumnPos nameColumnVisible + \ sectionColumnPos sectionColumnVisible statusColumnPos + \ statusColumnVisible supportedColumnPos supportedColumnVisible + \ vpanedPos windowWidth windowHeight windowX windowY closeZvt + \ color-available color-available-locked color-broken color-downgrade + \ color-install color-installed-locked color-installed-outdated + \ color-installed-updated color-new color-purge color-reinstall + \ color-remove color-upgrade + +syn keyword aptconfSynapticUpdate contained + \ last type + +syn cluster aptconfSynaptic_ contains=aptconfSynaptic, + \ aptconfSynapticUpdate +" }}} +" Unattended Upgrade: {{{ +syn keyword aptconfUnattendedUpgrade contained + \ AutoFixInterruptedDpkg Automatic-Reboot Automatic-Reboot-Time + \ Automatic-Reboot-WithUsers InstallOnShutdown Mail MailOnlyOnError + \ MinimalSteps Origins-Pattern Package-Blacklist + \ Remove-Unused-Dependencies + +syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade +" }}} +" Whatmaps: {{{ +syn keyword aptconfWhatmaps contained + \ Enable-Restart Security-Update-Origins + +syn cluster aptconfWhatmaps_ contains=aptconfWhatmaps +" }}} + +syn case match + +" Now put all the keywords (and 'valid' options) in a single cluster: +syn cluster aptconfOptions contains=aptconfRegexpOpt, + \ @aptconfAcquire_,@aptconfAdequate_,@aptconfApt_,@aptconfAptitude_, + \ @aptconfAptListbugs_,@aptconfDebTags_,@aptconfDebug_,@aptconfDir_, + \ @aptconfDPkg_,@aptconfDSelect_,@aptconfOrderList_, + \ @aptconfPackageManager_,@aptconfPkgCacheGen_,@aptconfQuiet_, + \ @aptconfRpm_,@aptconfSynaptic_,@aptconfUnattendedUpgrade_, + \ @aptconfWhatmaps_ + +" Syntax: +syn match aptconfSemiColon ';' +syn match aptconfDoubleColon '::' +syn match aptconfCurlyBraces '[{}]' +syn region aptconfValue start='"' end='"' oneline display +syn region aptconfInclude matchgroup=aptconfOperator start='{' end='}' contains=ALLBUT,aptconfGroup,aptconfGroupIncomplete,@aptconfCommentSpecial +syn region aptconfInclude matchgroup=aptconfOperator start='::' end='{'me=s-1 contains=@aptconfOptions,aptconfError display +syn region aptconfInclude matchgroup=aptconfOperator start='::' end='::\|\s'me=s-1 oneline contains=@aptconfOptions,aptconfError display + +" Basic Syntax Errors: XXX avoid to generate false positives !!! +" +" * Undocumented inline comment. Since it is currently largely used, and does +" not seem to cause trouble ('apt-config dump' never complains when # is used +" the same way than //) it has been moved to aptconfComment group. But it +" still needs to be defined here (i.e. before #clear and #include directives) +syn match aptconfComment '#.*' contains=@aptconfCommentSpecial +" +" * When a semicolon is missing after a double-quoted string: +" There are some cases (for example in the Dir group of options, but not only) +" where this syntax is valid. So we don't treat it as a strict error. +syn match aptconfAsError display '"[^"]*"[^;]'me=e-1 +syn match aptconfAsError display '"[^"]*"$' +" +" * When double quotes are missing around a value (before a semicolon): +" This omission has no effect if the value is a single string (without blank +" characters). But apt.conf(5) says that quotes are required, and this item +" avoids to match unquoted keywords. +syn match aptconfAsError display '\s[^"[:blank:]]*[^}"];'me=e-1 +" +" * When only one double quote is missing around a value (before a semicolon): +" No comment for that: it must be highly visible. +syn match aptconfError display '\(\s\|;\)"[^"[:blank:]]\+;'me=e-1 +syn match aptconfError display '\(\s\|;\)[^"[:blank:]]\+";'me=e-1 +" +" * When space is missing between option and (quoted) value: +" TODO (partially implemented) +syn match aptconfError display '::[^[:blank:]]*"' + +" Special Actions: +syn match aptconfAction '^#\(clear\|include\)\>' +syn region aptconfAction matchgroup=aptconfAction start='^#clear\>' end=';'me=s-1 oneline contains=aptconfGroup,aptconfDoubleColon,@aptconfOptions +syn region aptconfAction matchgroup=aptconfAction start='^#include\>' end=';'me=s-1 oneline contains=aptconfRegexpOpt + +" Comments: +syn keyword aptconfTodo TODO FIXME NOTE XXX contained +syn cluster aptconfCommentSpecial contains=@Spell,aptconfTodo +syn match aptconfComment '//.*' contains=@aptconfCommentSpecial +syn region aptconfComment start='/\*' end='\*/' contains=@aptconfCommentSpecial + +" Highlight Definitions: +hi def link aptconfTodo Todo +hi def link aptconfError Error +hi def link aptconfComment Comment +hi def link aptconfOperator Operator + +hi def link aptconfAction PreProc +hi def link aptconfOption Type +hi def link aptconfValue String +hi def link aptconfRegexpOpt Normal +hi def link aptconfAsError Special + +hi def link aptconfSemiColon aptconfOperator +hi def link aptconfDoubleColon aptconfOperator +hi def link aptconfCurlyBraces aptconfOperator + +hi def link aptconfGroupIncomplete Special +hi def link aptconfGroup aptconfOption + +hi def link aptconfAcquire aptconfOption +hi def link aptconfAcquireCDROM aptconfOption +hi def link aptconfAcquireCompressionTypes aptconfOption +hi def link aptconfAcquireFTP aptconfOption +hi def link aptconfAcquireHTTP aptconfOption +hi def link aptconfAcquireHTTPS aptconfOption +hi def link aptconfAcquireMaxValidTime aptconfOption +hi def link aptconfAcquirePDiffs aptconfOption + +hi def link aptconfAdequate aptconfOption + +hi def link aptconfApt aptconfOption +hi def link aptconfAptAuthentication aptconfOption +hi def link aptconfAptAutoRemove aptconfOption +hi def link aptconfAptCache aptconfOption +hi def link aptconfAptCDROM aptconfOption +hi def link aptconfAptChangelogs aptconfOption +hi def link aptconfAptCompressor aptconfOption +hi def link aptconfAptCompressorAll aptconfOption +hi def link aptconfAptGet aptconfOption +hi def link aptconfAptPeriodic aptconfOption +hi def link aptconfAptUpdate aptconfOption + +hi def link aptconfAptitude aptconfOption +hi def link aptconfAptitudeCmdline aptconfOption +hi def link aptconfAptitudeCmdlineProgress aptconfOption +hi def link aptconfAptitudeCmdlineSafeUpgrade aptconfOption +hi def link aptconfAptitudeLogging aptconfOption +hi def link aptconfAptitudeProblemResolver aptconfOption +hi def link aptconfAptitudeSafeResolver aptconfOption +hi def link aptconfAptitudeScreenshot aptconfOption +hi def link aptconfAptitudeSections aptconfOption +hi def link aptconfAptitudeUI aptconfOption +hi def link aptconfAptitudeUIKeyBindings aptconfOption +hi def link aptconfAptitudeUIStyles aptconfOption +hi def link aptconfAptitudeUIStylesElements aptconfOption + +hi def link aptconfAptListbugs aptconfOption + +hi def link aptconfDebTags aptconfOption + +hi def link aptconfDebug aptconfOption +hi def link aptconfDebugAcquire aptconfOption +hi def link aptconfDebugPkgAcquire aptconfOption +hi def link aptconfDebugPkgDepCache aptconfOption +hi def link aptconfDebugPkgProblemResolver aptconfOption + +hi def link aptconfDir aptconfOption +hi def link aptconfDirAptitude aptconfOption +hi def link aptconfDirBin aptconfOption +hi def link aptconfDirCache aptconfOption +hi def link aptconfDirEtc aptconfOption +hi def link aptconfDirLog aptconfOption +hi def link aptconfDirMedia aptconfOption +hi def link aptconfDirState aptconfOption + +hi def link aptconfDPkg aptconfOption +hi def link aptconfDPkgTools aptconfOption + +hi def link aptconfDSelect aptconfOption + +hi def link aptconfOrderList aptconfOption +hi def link aptconfOrderListScore aptconfOption + +hi def link aptconfPackageManager aptconfOption + +hi def link aptconfPkgCacheGen aptconfOption + +hi def link aptconfQuiet aptconfOption + +hi def link aptconfRpm aptconfOption + +hi def link aptconfSynaptic aptconfOption +hi def link aptconfSynapticUpdate aptconfOption + +hi def link aptconfUnattendedUpgrade aptconfOption + +hi def link aptconfWhatmaps aptconfOption + +let b:current_syntax = "aptconf" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/arch.vim b/syntax/arch.vim new file mode 100644 index 00000000..1491b723 --- /dev/null +++ b/syntax/arch.vim @@ -0,0 +1,45 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 + +" Vim syntax file +" Language: GNU Arch inventory file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword archTodo TODO FIXME XXX NOTE + +syn region archComment display start='^\%(#\|\s\)' end='$' + \ contains=archTodo,@Spell + +syn match archBegin display '^' nextgroup=archKeyword,archComment + +syn keyword archKeyword contained implicit tagline explicit names +syn keyword archKeyword contained untagged-source + \ nextgroup=archTMethod skipwhite +syn keyword archKeyword contained exclude junk backup precious unrecognized + \ source nextgroup=archRegex skipwhite + +syn keyword archTMethod contained source precious backup junk unrecognized + +syn match archRegex contained '\s*\zs.*' + +hi def link archTodo Todo +hi def link archComment Comment +hi def link archKeyword Keyword +hi def link archTMethod Type +hi def link archRegex String + +let b:current_syntax = "arch" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/art.vim b/syntax/art.vim new file mode 100644 index 00000000..0e032c2d --- /dev/null +++ b/syntax/art.vim @@ -0,0 +1,54 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 + +" Vim syntax file +" Language: ART-IM and ART*Enterprise +" Maintainer: Dorai Sitaram <ds26@gte.com> +" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html +" Last Change: 2011 Dec 28 by Thilo Six + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore + +syn keyword artspform => and assert bind +syn keyword artspform declare def-art-fun deffacts defglobal defrule defschema do +syn keyword artspform else for if in$ not or +syn keyword artspform progn retract salience schema test then while + +syn match artvariable "?[^ \t";()|&~]\+" + +syn match artglobalvar "?\*[^ \t";()|&~]\+\*" + +syn match artinstance "![^ \t";()|&~]\+" + +syn match delimiter "[()|&~]" + +syn region string start=/"/ skip=/\\[\\"]/ end=/"/ + +syn match number "\<[-+]\=\([0-9]\+\(\.[0-9]*\)\=\|\.[0-9]\+\)\>" + +syn match comment ";.*$" + +syn match comment "#+:\=ignore" nextgroup=artignore skipwhite skipnl + +syn region artignore start="(" end=")" contained contains=artignore,comment + +syn region artignore start=/"/ skip=/\\[\\"]/ end=/"/ contained + +hi def link artinstance type +hi def link artglobalvar preproc +hi def link artignore comment +hi def link artspform statement +hi def link artvariable function + +let b:current_syntax = "art" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/asn.vim b/syntax/asn.vim new file mode 100644 index 00000000..55d1b1fa --- /dev/null +++ b/syntax/asn.vim @@ -0,0 +1,77 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asn') == -1 + +" Vim syntax file +" Language: ASN.1 +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/asn.vim +" Last Change: 2012 Oct 05 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" keyword definitions +syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM +syn match asnExternal "\<IMPLICIT\s\+TAGS\>" +syn match asnExternal "\<EXPLICIT\s\+TAGS\>" +syn keyword asnFieldOption DEFAULT OPTIONAL +syn keyword asnTagModifier IMPLICIT EXPLICIT +syn keyword asnTypeInfo ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE +syn keyword asnBoolValue TRUE FALSE +syn keyword asnNumber MIN MAX +syn match asnNumber "\<PLUS-INFINITY\>" +syn match asnNumber "\<MINUS-INFINITY\>" +syn keyword asnType INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV +syn keyword asnType BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString +syn keyword asnType ANY DEFINED +syn match asnType "\.\.\." +syn match asnType "OBJECT\s\+IDENTIFIER" +syn match asnType "TYPE-IDENTIFIER" +syn keyword asnType UTF8String +syn keyword asnStructure CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS + +" Strings and constants +syn match asnSpecial contained "\\\d\d\d\|\\." +syn region asnString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=asnSpecial +syn match asnCharacter "'[^\\]'" +syn match asnSpecialCharacter "'\\.'" +syn match asnNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn match asnLineComment "--.*" +syn match asnLineComment "--.*--" + +syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType +syn match asnBraces "[{}]" + +syn sync ccomment asnComment + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link asnDefinition Function +hi def link asnBraces Function +hi def link asnStructure Statement +hi def link asnBoolValue Boolean +hi def link asnSpecial Special +hi def link asnString String +hi def link asnCharacter Character +hi def link asnSpecialCharacter asnSpecial +hi def link asnNumber asnValue +hi def link asnComment Comment +hi def link asnLineComment asnComment +hi def link asnType Type +hi def link asnTypeInfo PreProc +hi def link asnValue Number +hi def link asnExternal Include +hi def link asnTagModifier Function +hi def link asnFieldOption Type + +let &cpo = s:cpo_save +unlet s:cpo_save +let b:current_syntax = "asn" + +" vim: ts=8 + +endif diff --git a/syntax/atlas.vim b/syntax/atlas.vim new file mode 100644 index 00000000..d74e9c43 --- /dev/null +++ b/syntax/atlas.vim @@ -0,0 +1,89 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'atlas') == -1 + +" Vim syntax file +" Language: ATLAS +" Maintainer: Inaki Saez <jisaez@sfe.indra.es> +" Last Change: 2001 May 09 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword atlasStatement begin terminate +syn keyword atlasStatement fill calculate compare +syn keyword atlasStatement setup connect close open disconnect reset +syn keyword atlasStatement initiate read fetch +syn keyword atlasStatement apply measure verify remove +syn keyword atlasStatement perform leave finish output delay +syn keyword atlasStatement prepare execute +syn keyword atlasStatement do +syn match atlasStatement "\<go[ ]\+to\>" +syn match atlasStatement "\<wait[ ]\+for\>" + +syn keyword atlasInclude include +syn keyword atlasDefine define require declare identify + +"syn keyword atlasReserved true false go nogo hi lo via +syn keyword atlasReserved true false + +syn keyword atlasStorageClass external global + +syn keyword atlasConditional if then else end +syn keyword atlasRepeat while for thru + +" Flags BEF and statement number +syn match atlasSpecial "^[BE ][ 0-9]\{,6}\>" + +" Number formats +syn match atlasHexNumber "\<X'[0-9A-F]\+'" +syn match atlasOctalNumber "\<O'[0-7]\+'" +syn match atlasBinNumber "\<B'[01]\+'" +syn match atlasNumber "\<\d\+\>" +"Floating point number part only +syn match atlasDecimalNumber "\.\d\+\([eE][-+]\=\d\)\=\>" + +syn region atlasFormatString start=+((+ end=+\())\)\|\()[ ]*\$\)+me=e-1 +syn region atlasString start=+\<C'+ end=+'+ oneline + +syn region atlasComment start=+^C+ end=+\$+ +syn region atlasComment2 start=+\$.\++ms=s+1 end=+$+ oneline + +syn match atlasIdentifier "'[A-Za-z0-9 ._-]\+'" + +"Synchronization with Statement terminator $ +syn sync match atlasTerminator grouphere atlasComment "^C" +syn sync match atlasTerminator groupthere NONE "\$" +syn sync maxlines=100 + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link atlasConditional Conditional +hi def link atlasRepeat Repeat +hi def link atlasStatement Statement +hi def link atlasNumber Number +hi def link atlasHexNumber Number +hi def link atlasOctalNumber Number +hi def link atlasBinNumber Number +hi def link atlasDecimalNumber Float +hi def link atlasFormatString String +hi def link atlasString String +hi def link atlasComment Comment +hi def link atlasComment2 Comment +hi def link atlasInclude Include +hi def link atlasDefine Macro +hi def link atlasReserved PreCondit +hi def link atlasStorageClass StorageClass +hi def link atlasIdentifier NONE +hi def link atlasSpecial Special + + +let b:current_syntax = "atlas" + +" vim: ts=8 + +endif diff --git a/syntax/autoit.vim b/syntax/autoit.vim new file mode 100644 index 00000000..2cdac618 --- /dev/null +++ b/syntax/autoit.vim @@ -0,0 +1,1128 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autoit') == -1 + +" Vim syntax file +" +" Language: AutoIt v3 (http://www.autoitscript.com/autoit3/) +" Maintainer: Jared Breland <jbreland@legroom.net> +" Authored By: Riccardo Casini <ric@libero.it> +" Script URL: http://www.vim.org/scripts/script.php?script_id=1239 +" ChangeLog: Please visit the script URL for detailed change information + +" Quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +let b:current_syntax = "autoit" + +" AutoIt is not case dependent +syn case ignore + +" Definitions for AutoIt reserved keywords +syn keyword autoitKeyword Default False True +syn keyword autoitKeyword Const Dim Global Local ReDim +syn keyword autoitKeyword If Else ElseIf Then EndIf +syn keyword autoitKeyword Select Switch Case EndSelect EndSwitch +syn keyword autoitKeyword Enum For In To Step Next +syn keyword autoitKeyword With While EndWith Wend Do Until +syn keyword autoitKeyword ContinueCase ContinueLoop ExitLoop Exit + +" inside script inclusion and global options +syn match autoitIncluded display contained "<[^>]*>" +syn match autoitInclude display "^\s*#\s*include\>\s*["<]" + \ contains=autoitIncluded,autoitString +syn match autoitInclude "^\s*#include-once\>" +syn match autoitInclude "^\s*#NoTrayIcon\>" +syn match autoitInclude "^\s*#RequireAdmin\>" + +" user-defined functions +syn keyword autoitKeyword Func ByRef EndFunc Return OnAutoItStart OnAutoItExit + +" built-in functions +" environment management +syn keyword autoitFunction ClipGet ClipPut EnvGet EnvSet EnvUpdate MemGetStats +" file, directory, and disk management +syn keyword autoitFunction ConsoleRead ConsoleWrite ConsoleWriteError +syn keyword autoitFunction DirCopy DirCreate DirGetSize DirMove DirRemove +syn keyword autoitFunction DriveGetDrive DriveGetFileSystem DriveGetLabel + \ DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet + \ DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus +syn keyword autoitFunction FileChangeDir FileClose FileCopy FileCreateNTFSLink + \ FileCreateShortcut FileDelete FileExists FileFindFirstFile + \ FileFindNextFile FileGetAttrib FileGetLongName FileGetShortcut + \ FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall + \ FileMove FileOpen FileOpenDialog FileRead FileReadLine FileRecycle + \ FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib + \ FileSetTime FileWrite FileWriteLine +syn keyword autoitFunction IniDelete IniRead IniReadSection IniReadSectionNames + \ IniRenameSection IniWrite IniWriteSection +syn keyword autoitFunction StderrRead StdinWrite StdoutRead +" graphic and sound +syn keyword autoitFunction Beep PixelChecksum PixelGetColor PixelSearch + \ SoundPlay SoundSetWaveVolume +" gui reference +syn keyword autoitFunction GUICreate GUIDelete GUICtrlGetHandle GUICtrlGetState + \ GUICtrlRead GUICtrlRecvMsg GUICtrlSendMsg GUICtrlSendToDummy + \ GUIGetCursorInfo GUIGetMsg GUIRegisterMsg GUIStartGroup GUISwitch +syn keyword autoitFunction GUICtrlCreateAvi GUICtrlCreateButton + \ GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu + \ GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit + \ GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon + \ GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList + \ GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu + \ GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj + \ GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio + \ GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem + \ GUICtrlCreateTreeView GUICtrlCreateTreeViewItem + \ GUICtrlCreateUpDown GUICtrlDelete +syn keyword autoitFunction GUICtrlRegisterListViewSort GUICtrlSetBkColor + \ GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetFont + \ GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent + \ GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle + \ GUICtrlSetTip +syn keyword autoitFunction GUISetBkColor GUISetCoord GUISetCursor GUISetFont + \ GUISetHelp GUISetIcon GUISetOnEvent GUISetState +" keyboard control +syn keyword autoitFunction HotKeySet Send +" math +syn keyword autoitFunction Abs ACos ASin ATan BitAND BitNOT BitOR BitRotate + \ BitShift BitXOR Cos Ceiling Exp Floor Log Mod Random Round Sin Sqrt + \ SRandom Tan +" message boxes and dialogs +syn keyword autoitFunction InputBox MsgBox ProgressOff ProgressOn ProgressSet + \ SplashImageOn SplashOff SplashTextOn ToolTip +" miscellaneous +syn keyword autoitFunction AdlibDisable AdlibEnable AutoItSetOption + \ AutoItWinGetTitle AutoItWinSetTitle BlockInput Break Call CDTray + \ Execute Opt SetError SetExtended +" mouse control +syn keyword autoitFunction MouseClick MouseClickDrag MouseDown MouseGetCursor + \ MouseGetPos MouseMove MouseUp MouseWheel +" network +syn keyword autoitFunction FtpSetProxy HttpSetProxy InetGet InetGetSize Ping + \ TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIp TCPRecv + \ TCPSend TCPShutDown TCPStartup UDPBind UDPCloseSocket UDPOpen UDPRecv + \ UDPSend UDPShutdown UDPStartup +" obj/com reference +syn keyword autoitFunction ObjCreate ObjEvent ObjGet ObjName +" process management +syn keyword autoitFunction DllCall DllClose DllOpen DllStructCreate + \ DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData + \ ProcessClose ProcessExists ProcessSetPriority ProcessList ProcessWait + \ ProcessWaitClose Run RunAsSet RunWait ShellExecute ShellExecuteWait + \ Shutdown + " removed from 3.2.0 docs - PluginClose PluginOpen +" registry management +syn keyword autoitFunction RegDelete RegEnumKey RegEnumVal RegRead RegWrite +" string management +syn keyword autoitFunction StringAddCR StringFormat StringInStr StringIsAlNum + \ StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt + \ StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft + \ StringLen StringLower StringMid StringRegExp StringRegExpReplace + \ StringReplace StringRight StringSplit StringStripCR StringStripWS + \ StringTrimLeft StringTrimRight StringUpper +" timer and delay +syn keyword autoitFunction Sleep TimerInit TimerDiff +" tray +syn keyword autoitFunction TrayCreateItem TrayCreateMenu TrayItemDelete + \ TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent + \ TrayItemSetState TrayItemSetText TrayGetMsg TraySetClick TraySetIcon + \ TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip +" variables and conversions +syn keyword autoitFunction Asc Assign Binary Chr Dec Eval Hex HWnd Int IsAdmin + \ IsArray IsBinaryString IsBool IsDeclared IsDllStruct IsFloat IsHWnd + \ IsInt IsKeyword IsNumber IsObj IsString Number String UBound +" window management +syn keyword autoitFunction WinActivate WinActive WinClose WinExists WinFlash + \ WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos + \ WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList + \ WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove + \ WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive + \ WinWaitClose WinWaitNotActive +syn keyword autoitFunction ControlClick ControlCommand ControlDisable + \ ControlEnable ControlFocus ControlGetFocus ControlGetHandle + \ ControlGetPos ControlGetText ControlHide ControlListView ControlMove + \ ControlSend ControlSetText ControlShow StatusBarGetText + +" user defined functions +" array +syn keyword autoitFunction _ArrayAdd _ArrayBinarySearch _ArrayCreate + \ _ArrayDelete _ArrayDisplay _ArrayInsert _ArrayMax _ArrayMaxIndex + \ _ArrayMin _ArrayMinIndex _ArrayPop _ArrayPush _ArrayReverse + \ _ArraySearch _ArraySort _ArraySwap _ArrayToClip _ArrayToString + \ _ArrayTrim +" color +syn keyword autoitFunction _ColorgetBlue _ColorGetGreen _ColorGetRed +" date +syn keyword autoitFunction _DateAdd _DateDayOfWeek _DateDaysInMonth _DateDiff + \ _DateIsLeapYear _DateIsValid _DateTimeFormat _DateTimeSplit + \ _DateToDayOfWeek _ToDayOfWeekISO _DateToDayValue _DayValueToDate _Now + \ _NowCalc _NowCalcDate _NowDate _NowTime _SetDate _SetTime _TicksToTime + \ _TimeToTicks _WeekNumberISO +" file +syn keyword autoitFunction _FileCountLines _FileCreate _FileListToArray + \ _FilePrint _FileReadToArray _FileWriteFromArray _FileWriteLog + \ _FileWriteToLine _PathFull _PathMake _PathSplit _ReplaceStringInFile + \ _TempFile +" guicombo +syn keyword autoitFunction _GUICtrlComboAddDir _GUICtrlComboAddString + \ _GUICtrlComboAutoComplete _GUICtrlComboDeleteString + \ _GUICtrlComboFindString _GUICtrlComboGetCount _GUICtrlComboGetCurSel + \ _GUICtrlComboGetDroppedControlRect _GUICtrlComboGetDroppedState + \ _GUICtrlComboGetDroppedWidth _GUICtrlComboGetEditSel + \ _GUICtrlComboGetExtendedUI _GUICtrlComboGetHorizontalExtent + \ _GUICtrlComboGetItemHeight _GUICtrlComboGetLBText + \ _GUICtrlComboGetLBTextLen _GUICtrlComboGetList _GUICtrlComboGetLocale + \ _GUICtrlComboGetMinVisible _GUICtrlComboGetTopIndex + \ _GUICtrlComboInitStorage _GUICtrlComboInsertString + \ _GUICtrlComboLimitText _GUICtrlComboResetContent + \ _GUICtrlComboSelectString _GUICtrlComboSetCurSel + \ _GUICtrlComboSetDroppedWidth _GUICtrlComboSetEditSel + \ _GUICtrlComboSetExtendedUI _GUICtrlComboSetHorizontalExtent + \ _GUICtrlComboSetItemHeight _GUICtrlComboSetMinVisible + \ _GUICtrlComboSetTopIndex _GUICtrlComboShowDropDown +" guiedit +syn keyword autoitFunction _GUICtrlEditCanUndo _GUICtrlEditEmptyUndoBuffer + \ _GuiCtrlEditFind _GUICtrlEditGetFirstVisibleLine _GUICtrlEditGetLine + \ _GUICtrlEditGetLineCount _GUICtrlEditGetModify _GUICtrlEditGetRect + \ _GUICtrlEditGetSel _GUICtrlEditLineFromChar _GUICtrlEditLineIndex + \ _GUICtrlEditLineLength _GUICtrlEditLineScroll _GUICtrlEditReplaceSel + \ _GUICtrlEditScroll _GUICtrlEditSetModify _GUICtrlEditSetRect + \ _GUICtrlEditSetSel _GUICtrlEditUndo +" guiipaddress +syn keyword autoitFunction _GUICtrlIpAddressClear _GUICtrlIpAddressCreate + \ _GUICtrlIpAddressDelete _GUICtrlIpAddressGet _GUICtrlIpAddressIsBlank + \ _GUICtrlIpAddressSet _GUICtrlIpAddressSetFocus + \ _GUICtrlIpAddressSetFont + \ _GUICtrlIpAddressSetRange _GUICtrlIpAddressShowHide +" guilist +syn keyword autoitFunction _GUICtrlListAddDir _GUICtrlListAddItem + \ _GUICtrlListClear + \ _GUICtrlListCount _GUICtrlListDeleteItem _GUICtrlListFindString + \ _GUICtrlListGetAnchorIndex _GUICtrlListGetCaretIndex + \ _GUICtrlListGetHorizontalExtent _GUICtrlListGetInfo + \ _GUICtrlListGetItemRect _GUICtrlListGetLocale _GUICtrlListGetSelCount + \ _GUICtrlListGetSelItems _GUICtrlListGetSelItemsText + \ _GUICtrlListGetSelState _GUICtrlListGetText _GUICtrlListGetTextLen + \ _GUICtrlListGetTopIndex _GUICtrlListInsertItem + \ _GUICtrlListReplaceString _GUICtrlListSelectedIndex + \ _GUICtrlListSelectIndex _GUICtrlListSelectString + \ _GUICtrlListSelItemRange _GUICtrlListSelItemRangeEx + \ _GUICtrlListSetAnchorIndex _GUICtrlListSetCaretIndex + \ _GUICtrlListSetHorizontalExtent _GUICtrlListSetLocale + \ _GUICtrlListSetSel _GUICtrlListSetTopIndex _GUICtrlListSort + \ _GUICtrlListSwapString +" guilistview +syn keyword autoitFunction _GUICtrlListViewCopyItems + \ _GUICtrlListViewDeleteAllItems _GUICtrlListViewDeleteColumn + \ _GUICtrlListViewDeleteItem _GUICtrlListViewDeleteItemsSelected + \ _GUICtrlListViewEnsureVisible _GUICtrlListViewFindItem + \ _GUICtrlListViewGetBackColor _GUICtrlListViewGetCallBackMask + \ _GUICtrlListViewGetCheckedState _GUICtrlListViewGetColumnOrder + \ _GUICtrlListViewGetColumnWidth _GUICtrlListViewGetCounterPage + \ _GUICtrlListViewGetCurSel _GUICtrlListViewGetExtendedListViewStyle + \ _GUICtrlListViewGetHeader _GUICtrlListViewGetHotCursor + \ _GUICtrlListViewGetHotItem _GUICtrlListViewGetHoverTime + \ _GUICtrlListViewGetItemCount _GUICtrlListViewGetItemText + \ _GUICtrlListViewGetItemTextArray _GUICtrlListViewGetNextItem + \ _GUICtrlListViewGetSelectedCount _GUICtrlListViewGetSelectedIndices + \ _GUICtrlListViewGetSubItemsCount _GUICtrlListViewGetTopIndex + \ _GUICtrlListViewGetUnicodeFormat _GUICtrlListViewHideColumn + \ _GUICtrlListViewInsertColumn _GUICtrlListViewInsertItem + \ _GUICtrlListViewJustifyColumn _GUICtrlListViewScroll + \ _GUICtrlListViewSetCheckState _GUICtrlListViewSetColumnHeaderText + \ _GUICtrlListViewSetColumnOrder _GUICtrlListViewSetColumnWidth + \ _GUICtrlListViewSetHotItem _GUICtrlListViewSetHoverTime + \ _GUICtrlListViewSetItemCount _GUICtrlListViewSetItemSelState + \ _GUICtrlListViewSetItemText _GUICtrlListViewSort +" guimonthcal +syn keyword autoitFunction _GUICtrlMonthCalGet1stDOW _GUICtrlMonthCalGetColor + \ _GUICtrlMonthCalGetDelta _GUICtrlMonthCalGetMaxSelCount + \ _GUICtrlMonthCalGetMaxTodayWidth _GUICtrlMonthCalGetMinReqRect + \ _GUICtrlMonthCalSet1stDOW _GUICtrlMonthCalSetColor + \ _GUICtrlMonthCalSetDelta _GUICtrlMonthCalSetMaxSelCount +" guislider +syn keyword autoitFunction _GUICtrlSliderClearTics _GUICtrlSliderGetLineSize + \ _GUICtrlSliderGetNumTics _GUICtrlSliderGetPageSize + \ _GUICtrlSliderGetPos _GUICtrlSliderGetRangeMax + \ _GUICtrlSliderGetRangeMin _GUICtrlSliderSetLineSize + \ _GUICtrlSliderSetPageSize _GUICtrlSliderSetPos + \ _GUICtrlSliderSetTicFreq +" guistatusbar +syn keyword autoitFunction _GuiCtrlStatusBarCreate + \ _GUICtrlStatusBarCreateProgress _GUICtrlStatusBarDelete + \ _GuiCtrlStatusBarGetBorders _GuiCtrlStatusBarGetIcon + \ _GuiCtrlStatusBarGetParts _GuiCtrlStatusBarGetRect + \ _GuiCtrlStatusBarGetText _GuiCtrlStatusBarGetTextLength + \ _GuiCtrlStatusBarGetTip _GuiCtrlStatusBarGetUnicode + \ _GUICtrlStatusBarIsSimple _GuiCtrlStatusBarResize + \ _GuiCtrlStatusBarSetBKColor _GuiCtrlStatusBarSetIcon + \ _GuiCtrlStatusBarSetMinHeight _GUICtrlStatusBarSetParts + \ _GuiCtrlStatusBarSetSimple _GuiCtrlStatusBarSetText + \ _GuiCtrlStatusBarSetTip _GuiCtrlStatusBarSetUnicode + \ _GUICtrlStatusBarShowHide +" guitab +syn keyword autoitFunction _GUICtrlTabDeleteAllItems _GUICtrlTabDeleteItem + \ _GUICtrlTabDeselectAll _GUICtrlTabGetCurFocus _GUICtrlTabGetCurSel + \ _GUICtrlTabGetExtendedStyle _GUICtrlTabGetItemCount + \ _GUICtrlTabGetItemRect _GUICtrlTabGetRowCount + \ _GUICtrlTabGetUnicodeFormat _GUICtrlTabHighlightItem + \ _GUICtrlTabSetCurFocus _GUICtrlTabSetCurSel + \ _GUICtrlTabSetMinTabWidth _GUICtrlTabSetUnicodeFormat +" guitreeview +syn keyword autoitFunction _GUICtrlTreeViewDeleteAllItems + \ _GUICtrlTreeViewDeleteItem _GUICtrlTreeViewExpand + \ _GUICtrlTreeViewGetBkColor _GUICtrlTreeViewGetCount + \ _GUICtrlTreeViewGetIndent _GUICtrlTreeViewGetLineColor + \ _GUICtrlTreeViewGetParentHandle _GUICtrlTreeViewGetParentID + \ _GUICtrlTreeViewGetState _GUICtrlTreeViewGetText + \ _GUICtrlTreeViewGetTextColor _GUICtrlTreeViewItemGetTree + \ _GUICtrlTreeViewInsertItem _GUICtrlTreeViewSetBkColor + \ _GUICtrlTreeViewSetIcon _GUICtrlTreeViewSetIndent + \ _GUICtrlTreeViewSetLineColor GUICtrlTreeViewSetState + \ _GUICtrlTreeViewSetText _GUICtrlTreeViewSetTextColor + \ _GUICtrlTreeViewSort +" ie +syn keyword autoitFunction _IE_Example _IE_Introduction _IE_VersionInfo + \ _IEAction _IEAttach _IEBodyReadHTML _IEBodyReadText _IEBodyWriteHTML + \ _IECreate _IECreateEmbedded _IEDocGetObj _IEDocInsertHTML + \ _IEDocInsertText _IEDocReadHTML _IEDocWriteHTML + \ _IEErrorHandlerDeRegister _IEErrorHandlerRegister _IEErrorNotify + \ _IEFormElementCheckboxSelect _IEFormElementGetCollection + \ _IEFormElementGetObjByName _IEFormElementGetValue + \ _IEFormElementOptionSelect _IEFormElementRadioSelect + \ _IEFormElementSetValue _IEFormGetCollection _IEFormGetObjByName + \ _IEFormImageClick _IEFormReset _IEFormSubmit _IEFrameGetCollection + \ _IEFrameGetObjByName _IEGetObjByName _IEHeadInsertEventScript + \ _IEImgClick _IEImgGetCollection _IEIsFrameSet _IELinkClickByIndex + \ _IELinkClickByText _IELinkGetCollection _IELoadWait _IELoadWaitTimeout + \ _IENavigate _IEPropertyGet _IEPropertySet _IEQuit + \ _IETableGetCollection _IETableWriteToArray _IETagNameAllGetCollection + \ _IETagNameGetCollection +" inet +syn keyword autoitFunction _GetIP _INetExplorerCapable _INetGetSource _INetMail + \ _INetSmtpMail _TCPIpToName +" math +syn keyword autoitFunction _Degree _MathCheckDiv _Max _Min _Radian +" miscellaneous +syn keyword autoitFunction _ChooseColor _ChooseFont _ClipPutFile _Iif + \ _IsPressed _MouseTrap _SendMessage _Singleton +" process +syn keyword autoitFunction _ProcessGetName _ProcessGetPriority _RunDOS +" sound +syn keyword autoitFunction _SoundClose _SoundLength _SoundOpen _SoundPause + \ _SoundPlay _SoundPos _SoundResume _SoundSeek _SoundStatus _SoundStop +" sqlite +syn keyword autoitFunction _SQLite_Changes _SQLite_Close + \ _SQLite_Display2DResult _SQLite_Encode _SQLite_ErrCode _SQLite_ErrMsg + \ _SQLite_Escape _SQLite_Exec _SQLite_FetchData _SQLite_FetchNames + \ _SQLite_GetTable _SQLite_GetTable2D _SQLite_LastInsertRowID + \ _SQLite_LibVersion _SQLite_Open _SQLite_Query _SQLite_QueryFinalize + \ _SQLite_QueryReset _SQLite_QuerySingleRow _SQLite_SaveMode + \ _SQLite_SetTimeout _SQLite_Shutdown _SQLite_SQLiteExe _SQLite_Startup + \ _SQLite_TotalChanges +" string +syn keyword autoitFunction _HexToString _StringAddComma _StringBetween + \ _StringEncrypt _StringInsert _StringProper _StringRepeat + \ _StringReverse _StringToHex +" visa +syn keyword autoitFunction _viClose _viExecCommand _viFindGpib _viGpibBusReset + \ _viGTL _viOpen _viSetAttribute _viSetTimeout + +" read-only macros +syn match autoitBuiltin "@AppData\(Common\)\=Dir" +syn match autoitBuiltin "@AutoItExe" +syn match autoitBuiltin "@AutoItPID" +syn match autoitBuiltin "@AutoItVersion" +syn match autoitBuiltin "@COM_EventObj" +syn match autoitBuiltin "@CommonFilesDir" +syn match autoitBuiltin "@Compiled" +syn match autoitBuiltin "@ComputerName" +syn match autoitBuiltin "@ComSpec" +syn match autoitBuiltin "@CR\(LF\)\=" +syn match autoitBuiltin "@Desktop\(Common\)\=Dir" +syn match autoitBuiltin "@DesktopDepth" +syn match autoitBuiltin "@DesktopHeight" +syn match autoitBuiltin "@DesktopRefresh" +syn match autoitBuiltin "@DesktopWidth" +syn match autoitBuiltin "@DocumentsCommonDir" +syn match autoitBuiltin "@Error" +syn match autoitBuiltin "@ExitCode" +syn match autoitBuiltin "@ExitMethod" +syn match autoitBuiltin "@Extended" +syn match autoitBuiltin "@Favorites\(Common\)\=Dir" +syn match autoitBuiltin "@GUI_CtrlId" +syn match autoitBuiltin "@GUI_CtrlHandle" +syn match autoitBuiltin "@GUI_DragId" +syn match autoitBuiltin "@GUI_DragFile" +syn match autoitBuiltin "@GUI_DropId" +syn match autoitBuiltin "@GUI_WinHandle" +syn match autoitBuiltin "@HomeDrive" +syn match autoitBuiltin "@HomePath" +syn match autoitBuiltin "@HomeShare" +syn match autoitBuiltin "@HOUR" +syn match autoitBuiltin "@HotKeyPressed" +syn match autoitBuiltin "@InetGetActive" +syn match autoitBuiltin "@InetGetBytesRead" +syn match autoitBuiltin "@IPAddress[1234]" +syn match autoitBuiltin "@KBLayout" +syn match autoitBuiltin "@LF" +syn match autoitBuiltin "@Logon\(DNS\)\=Domain" +syn match autoitBuiltin "@LogonServer" +syn match autoitBuiltin "@MDAY" +syn match autoitBuiltin "@MIN" +syn match autoitBuiltin "@MON" +syn match autoitBuiltin "@MyDocumentsDir" +syn match autoitBuiltin "@NumParams" +syn match autoitBuiltin "@OSBuild" +syn match autoitBuiltin "@OSLang" +syn match autoitBuiltin "@OSServicePack" +syn match autoitBuiltin "@OSTYPE" +syn match autoitBuiltin "@OSVersion" +syn match autoitBuiltin "@ProcessorArch" +syn match autoitBuiltin "@ProgramFilesDir" +syn match autoitBuiltin "@Programs\(Common\)\=Dir" +syn match autoitBuiltin "@ScriptDir" +syn match autoitBuiltin "@ScriptFullPath" +syn match autoitBuiltin "@ScriptLineNumber" +syn match autoitBuiltin "@ScriptName" +syn match autoitBuiltin "@SEC" +syn match autoitBuiltin "@StartMenu\(Common\)\=Dir" +syn match autoitBuiltin "@Startup\(Common\)\=Dir" +syn match autoitBuiltin "@SW_DISABLE" +syn match autoitBuiltin "@SW_ENABLE" +syn match autoitBuiltin "@SW_HIDE" +syn match autoitBuiltin "@SW_LOCK" +syn match autoitBuiltin "@SW_MAXIMIZE" +syn match autoitBuiltin "@SW_MINIMIZE" +syn match autoitBuiltin "@SW_RESTORE" +syn match autoitBuiltin "@SW_SHOW" +syn match autoitBuiltin "@SW_SHOWDEFAULT" +syn match autoitBuiltin "@SW_SHOWMAXIMIZED" +syn match autoitBuiltin "@SW_SHOWMINIMIZED" +syn match autoitBuiltin "@SW_SHOWMINNOACTIVE" +syn match autoitBuiltin "@SW_SHOWNA" +syn match autoitBuiltin "@SW_SHOWNOACTIVATE" +syn match autoitBuiltin "@SW_SHOWNORMAL" +syn match autoitBuiltin "@SW_UNLOCK" +syn match autoitBuiltin "@SystemDir" +syn match autoitBuiltin "@TAB" +syn match autoitBuiltin "@TempDir" +syn match autoitBuiltin "@TRAY_ID" +syn match autoitBuiltin "@TrayIconFlashing" +syn match autoitBuiltin "@TrayIconVisible" +syn match autoitBuiltin "@UserProfileDir" +syn match autoitBuiltin "@UserName" +syn match autoitBuiltin "@WDAY" +syn match autoitBuiltin "@WindowsDir" +syn match autoitBuiltin "@WorkingDir" +syn match autoitBuiltin "@YDAY" +syn match autoitBuiltin "@YEAR" + +"comments and commenting-out +syn match autoitComment ";.*" +"in this way also #ce alone will be highlighted +syn match autoitCommDelimiter "^\s*#comments-start\>" +syn match autoitCommDelimiter "^\s*#cs\>" +syn match autoitCommDelimiter "^\s*#comments-end\>" +syn match autoitCommDelimiter "^\s*#ce\>" +syn region autoitComment + \ matchgroup=autoitCommDelimiter + \ start="^\s*#comments-start\>" start="^\s*#cs\>" + \ end="^\s*#comments-end\>" end="^\s*#ce\>" + +"one character operators +syn match autoitOperator "[-+*/&^=<>][^-+*/&^=<>]"me=e-1 +"two characters operators +syn match autoitOperator "==[^=]"me=e-1 +syn match autoitOperator "<>" +syn match autoitOperator "<=" +syn match autoitOperator ">=" +syn match autoitOperator "+=" +syn match autoitOperator "-=" +syn match autoitOperator "*=" +syn match autoitOperator "/=" +syn match autoitOperator "&=" +syn keyword autoitOperator NOT AND OR + +syn match autoitParen "(\|)" +syn match autoitBracket "\[\|\]" +syn match autoitComma "," + +"numbers must come after operator '-' +"decimal numbers without a dot +syn match autoitNumber "-\=\<\d\+\>" +"hexadecimal numbers without a dot +syn match autoitNumber "-\=\<0x\x\+\>" +"floating point number with dot (inside or at end) + +syn match autoitNumber "-\=\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match autoitNumber "-\=\<\.\d\+\>" +"scientific notation numbers without dots +syn match autoitNumber "-\=\<\d\+e[-+]\=\d\+\>" +"scientific notation numbers with dots +syn match autoitNumber "-\=\<\(\(\d\+\.\d*\)\|\(\.\d\+\)\)\(e[-+]\=\d\+\)\=\>" + +"string constants +"we want the escaped quotes marked in red +syn match autoitDoubledSingles +''+ contained +syn match autoitDoubledDoubles +""+ contained +"we want the continuation character marked in red +"(also at the top level, not just contained) +syn match autoitCont "_$" + +" send key list - must be defined before autoitStrings +syn match autoitSend "{!}" contained +syn match autoitSend "{#}" contained +syn match autoitSend "{+}" contained +syn match autoitSend "{^}" contained +syn match autoitSend "{{}" contained +syn match autoitSend "{}}" contained +syn match autoitSend "{SPACE}" contained +syn match autoitSend "{ENTER}" contained +syn match autoitSend "{ALT}" contained +syn match autoitSend "{BACKSPACE}" contained +syn match autoitSend "{BS}" contained +syn match autoitSend "{DELETE}" contained +syn match autoitSend "{DEL}" contained +syn match autoitSend "{UP}" contained +syn match autoitSend "{DOWN}" contained +syn match autoitSend "{LEFT}" contained +syn match autoitSend "{RIGHT}" contained +syn match autoitSend "{HOME}" contained +syn match autoitSend "{END}" contained +syn match autoitSend "{ESCAPE}" contained +syn match autoitSend "{ESC}" contained +syn match autoitSend "{INSERT}" contained +syn match autoitSend "{INS}" contained +syn match autoitSend "{PGUP}" contained +syn match autoitSend "{PGDN}" contained +syn match autoitSend "{F1}" contained +syn match autoitSend "{F2}" contained +syn match autoitSend "{F3}" contained +syn match autoitSend "{F4}" contained +syn match autoitSend "{F5}" contained +syn match autoitSend "{F6}" contained +syn match autoitSend "{F7}" contained +syn match autoitSend "{F8}" contained +syn match autoitSend "{F9}" contained +syn match autoitSend "{F10}" contained +syn match autoitSend "{F11}" contained +syn match autoitSend "{F12}" contained +syn match autoitSend "{TAB}" contained +syn match autoitSend "{PRINTSCREEN}" contained +syn match autoitSend "{LWIN}" contained +syn match autoitSend "{RWIN}" contained +syn match autoitSend "{NUMLOCK}" contained +syn match autoitSend "{CTRLBREAK}" contained +syn match autoitSend "{PAUSE}" contained +syn match autoitSend "{CAPSLOCK}" contained +syn match autoitSend "{NUMPAD0}" contained +syn match autoitSend "{NUMPAD1}" contained +syn match autoitSend "{NUMPAD2}" contained +syn match autoitSend "{NUMPAD3}" contained +syn match autoitSend "{NUMPAD4}" contained +syn match autoitSend "{NUMPAD5}" contained +syn match autoitSend "{NUMPAD6}" contained +syn match autoitSend "{NUMPAD7}" contained +syn match autoitSend "{NUMPAD8}" contained +syn match autoitSend "{NUMPAD9}" contained +syn match autoitSend "{NUMPADMULT}" contained +syn match autoitSend "{NUMPADADD}" contained +syn match autoitSend "{NUMPADSUB}" contained +syn match autoitSend "{NUMPADDIV}" contained +syn match autoitSend "{NUMPADDOT}" contained +syn match autoitSend "{NUMPADENTER}" contained +syn match autoitSend "{APPSKEY}" contained +syn match autoitSend "{LALT}" contained +syn match autoitSend "{RALT}" contained +syn match autoitSend "{LCTRL}" contained +syn match autoitSend "{RCTRL}" contained +syn match autoitSend "{LSHIFT}" contained +syn match autoitSend "{RSHIFT}" contained +syn match autoitSend "{SLEEP}" contained +syn match autoitSend "{ALTDOWN}" contained +syn match autoitSend "{SHIFTDOWN}" contained +syn match autoitSend "{CTRLDOWN}" contained +syn match autoitSend "{LWINDOWN}" contained +syn match autoitSend "{RWINDOWN}" contained +syn match autoitSend "{ASC \d\d\d\d}" contained +syn match autoitSend "{BROWSER_BACK}" contained +syn match autoitSend "{BROWSER_FORWARD}" contained +syn match autoitSend "{BROWSER_REFRESH}" contained +syn match autoitSend "{BROWSER_STOP}" contained +syn match autoitSend "{BROWSER_SEARCH}" contained +syn match autoitSend "{BROWSER_FAVORITES}" contained +syn match autoitSend "{BROWSER_HOME}" contained +syn match autoitSend "{VOLUME_MUTE}" contained +syn match autoitSend "{VOLUME_DOWN}" contained +syn match autoitSend "{VOLUME_UP}" contained +syn match autoitSend "{MEDIA_NEXT}" contained +syn match autoitSend "{MEDIA_PREV}" contained +syn match autoitSend "{MEDIA_STOP}" contained +syn match autoitSend "{MEDIA_PLAY_PAUSE}" contained +syn match autoitSend "{LAUNCH_MAIL}" contained +syn match autoitSend "{LAUNCH_MEDIA}" contained +syn match autoitSend "{LAUNCH_APP1}" contained +syn match autoitSend "{LAUNCH_APP2}" contained + +"this was tricky! +"we use an oneline region, instead of a match, in order to use skip= +"matchgroup= so start and end quotes are not considered as au3Doubled +"contained +syn region autoitString oneline contains=autoitSend matchgroup=autoitQuote start=+"+ + \ end=+"+ end=+_\n\{1}.*"+ + \ contains=autoitCont,autoitDoubledDoubles skip=+""+ +syn region autoitString oneline matchgroup=autoitQuote start=+'+ + \ end=+'+ end=+_\n\{1}.*'+ + \ contains=autoitCont,autoitDoubledSingles skip=+''+ + +syn match autoitVarSelector "\$" contained display +syn match autoitVariable "$\w\+" contains=autoitVarSelector + +" options - must be defined after autoitStrings +syn match autoitOption "\([\"\']\)CaretCoordMode\1" +syn match autoitOption "\([\"\']\)ColorMode\1" +syn match autoitOption "\([\"\']\)ExpandEnvStrings\1" +syn match autoitOption "\([\"\']\)ExpandVarStrings\1" +syn match autoitOption "\([\"\']\)FtpBinaryMode\1" +syn match autoitOption "\([\"\']\)GUICloseOnEsc\1" +syn match autoitOption "\([\"\']\)GUICoordMode\1" +syn match autoitOption "\([\"\']\)GUIDataSeparatorChar\1" +syn match autoitOption "\([\"\']\)GUIOnEventMode\1" +syn match autoitOption "\([\"\']\)GUIResizeMode\1" +syn match autoitOption "\([\"\']\)GUIEventCompatibilityMode\1" +syn match autoitOption "\([\"\']\)MouseClickDelay\1" +syn match autoitOption "\([\"\']\)MouseClickDownDelay\1" +syn match autoitOption "\([\"\']\)MouseClickDragDelay\1" +syn match autoitOption "\([\"\']\)MouseCoordMode\1" +syn match autoitOption "\([\"\']\)MustDeclareVars\1" +syn match autoitOption "\([\"\']\)OnExitFunc\1" +syn match autoitOption "\([\"\']\)PixelCoordMode\1" +syn match autoitOption "\([\"\']\)RunErrorsFatal\1" +syn match autoitOption "\([\"\']\)SendAttachMode\1" +syn match autoitOption "\([\"\']\)SendCapslockMode\1" +syn match autoitOption "\([\"\']\)SendKeyDelay\1" +syn match autoitOption "\([\"\']\)SendKeyDownDelay\1" +syn match autoitOption "\([\"\']\)TCPTimeout\1" +syn match autoitOption "\([\"\']\)TrayAutoPause\1" +syn match autoitOption "\([\"\']\)TrayIconDebug\1" +syn match autoitOption "\([\"\']\)TrayIconHide\1" +syn match autoitOption "\([\"\']\)TrayMenuMode\1" +syn match autoitOption "\([\"\']\)TrayOnEventMode\1" +syn match autoitOption "\([\"\']\)WinDetectHiddenText\1" +syn match autoitOption "\([\"\']\)WinSearchChildren\1" +syn match autoitOption "\([\"\']\)WinTextMatchMode\1" +syn match autoitOption "\([\"\']\)WinTitleMatchMode\1" +syn match autoitOption "\([\"\']\)WinWaitDelay\1" + +" styles - must be defined after autoitVariable +" common +syn match autoitStyle "\$WS_BORDER" +syn match autoitStyle "\$WS_POPUP" +syn match autoitStyle "\$WS_CAPTION" +syn match autoitStyle "\$WS_CLIPCHILDREN" +syn match autoitStyle "\$WS_CLIPSIBLINGS" +syn match autoitStyle "\$WS_DISABLED" +syn match autoitStyle "\$WS_DLGFRAME" +syn match autoitStyle "\$WS_HSCROLL" +syn match autoitStyle "\$WS_MAXIMIZE" +syn match autoitStyle "\$WS_MAXIMIZEBOX" +syn match autoitStyle "\$WS_MINIMIZE" +syn match autoitStyle "\$WS_MINIMIZEBOX" +syn match autoitStyle "\$WS_OVERLAPPED" +syn match autoitStyle "\$WS_OVERLAPPEDWINDOW" +syn match autoitStyle "\$WS_POPUPWINDOW" +syn match autoitStyle "\$WS_SIZEBOX" +syn match autoitStyle "\$WS_SYSMENU" +syn match autoitStyle "\$WS_THICKFRAME" +syn match autoitStyle "\$WS_VSCROLL" +syn match autoitStyle "\$WS_VISIBLE" +syn match autoitStyle "\$WS_CHILD" +syn match autoitStyle "\$WS_GROUP" +syn match autoitStyle "\$WS_TABSTOP" +syn match autoitStyle "\$DS_MODALFRAME" +syn match autoitStyle "\$DS_SETFOREGROUND" +syn match autoitStyle "\$DS_CONTEXTHELP" +" common extended +syn match autoitStyle "\$WS_EX_ACCEPTFILES" +syn match autoitStyle "\$WS_EX_APPWINDOW" +syn match autoitStyle "\$WS_EX_CLIENTEDGE" +syn match autoitStyle "\$WS_EX_CONTEXTHELP" +syn match autoitStyle "\$WS_EX_DLGMODALFRAME" +syn match autoitStyle "\$WS_EX_MDICHILD" +syn match autoitStyle "\$WS_EX_OVERLAPPEDWINDOW" +syn match autoitStyle "\$WS_EX_STATICEDGE" +syn match autoitStyle "\$WS_EX_TOPMOST" +syn match autoitStyle "\$WS_EX_TRANSPARENT" +syn match autoitStyle "\$WS_EX_TOOLWINDOW" +syn match autoitStyle "\$WS_EX_WINDOWEDGE" +syn match autoitStyle "\$WS_EX_LAYERED" +syn match autoitStyle "\$GUI_WS_EX_PARENTDRAG" +" checkbox +syn match autoitStyle "\$BS_3STATE" +syn match autoitStyle "\$BS_AUTO3STATE" +syn match autoitStyle "\$BS_AUTOCHECKBOX" +syn match autoitStyle "\$BS_CHECKBOX" +syn match autoitStyle "\$BS_LEFT" +syn match autoitStyle "\$BS_PUSHLIKE" +syn match autoitStyle "\$BS_RIGHT" +syn match autoitStyle "\$BS_RIGHTBUTTON" +syn match autoitStyle "\$BS_GROUPBOX" +syn match autoitStyle "\$BS_AUTORADIOBUTTON" +" push button +syn match autoitStyle "\$BS_BOTTOM" +syn match autoitStyle "\$BS_CENTER" +syn match autoitStyle "\$BS_DEFPUSHBUTTON" +syn match autoitStyle "\$BS_MULTILINE" +syn match autoitStyle "\$BS_TOP" +syn match autoitStyle "\$BS_VCENTER" +syn match autoitStyle "\$BS_ICON" +syn match autoitStyle "\$BS_BITMAP" +syn match autoitStyle "\$BS_FLAT" +" combo +syn match autoitStyle "\$CBS_AUTOHSCROLL" +syn match autoitStyle "\$CBS_DISABLENOSCROLL" +syn match autoitStyle "\$CBS_DROPDOWN" +syn match autoitStyle "\$CBS_DROPDOWNLIST" +syn match autoitStyle "\$CBS_LOWERCASE" +syn match autoitStyle "\$CBS_NOINTEGRALHEIGHT" +syn match autoitStyle "\$CBS_OEMCONVERT" +syn match autoitStyle "\$CBS_SIMPLE" +syn match autoitStyle "\$CBS_SORT" +syn match autoitStyle "\$CBS_UPPERCASE" +" list +syn match autoitStyle "\$LBS_DISABLENOSCROLL" +syn match autoitStyle "\$LBS_NOINTEGRALHEIGHT" +syn match autoitStyle "\$LBS_NOSEL" +syn match autoitStyle "\$LBS_NOTIFY" +syn match autoitStyle "\$LBS_SORT" +syn match autoitStyle "\$LBS_STANDARD" +syn match autoitStyle "\$LBS_USETABSTOPS" +" edit/input +syn match autoitStyle "\$ES_AUTOHSCROLL" +syn match autoitStyle "\$ES_AUTOVSCROLL" +syn match autoitStyle "\$ES_CENTER" +syn match autoitStyle "\$ES_LOWERCASE" +syn match autoitStyle "\$ES_NOHIDESEL" +syn match autoitStyle "\$ES_NUMBER" +syn match autoitStyle "\$ES_OEMCONVERT" +syn match autoitStyle "\$ES_MULTILINE" +syn match autoitStyle "\$ES_PASSWORD" +syn match autoitStyle "\$ES_READONLY" +syn match autoitStyle "\$ES_RIGHT" +syn match autoitStyle "\$ES_UPPERCASE" +syn match autoitStyle "\$ES_WANTRETURN" +" progress bar +syn match autoitStyle "\$PBS_SMOOTH" +syn match autoitStyle "\$PBS_VERTICAL" +" up-down +syn match autoitStyle "\$UDS_ALIGNLEFT" +syn match autoitStyle "\$UDS_ALIGNRIGHT" +syn match autoitStyle "\$UDS_ARROWKEYS" +syn match autoitStyle "\$UDS_HORZ" +syn match autoitStyle "\$UDS_NOTHOUSANDS" +syn match autoitStyle "\$UDS_WRAP" +" label/static +syn match autoitStyle "\$SS_BLACKFRAME" +syn match autoitStyle "\$SS_BLACKRECT" +syn match autoitStyle "\$SS_CENTER" +syn match autoitStyle "\$SS_CENTERIMAGE" +syn match autoitStyle "\$SS_ETCHEDFRAME" +syn match autoitStyle "\$SS_ETCHEDHORZ" +syn match autoitStyle "\$SS_ETCHEDVERT" +syn match autoitStyle "\$SS_GRAYFRAME" +syn match autoitStyle "\$SS_GRAYRECT" +syn match autoitStyle "\$SS_LEFT" +syn match autoitStyle "\$SS_LEFTNOWORDWRAP" +syn match autoitStyle "\$SS_NOPREFIX" +syn match autoitStyle "\$SS_NOTIFY" +syn match autoitStyle "\$SS_RIGHT" +syn match autoitStyle "\$SS_RIGHTJUST" +syn match autoitStyle "\$SS_SIMPLE" +syn match autoitStyle "\$SS_SUNKEN" +syn match autoitStyle "\$SS_WHITEFRAME" +syn match autoitStyle "\$SS_WHITERECT" +" tab +syn match autoitStyle "\$TCS_SCROLLOPPOSITE" +syn match autoitStyle "\$TCS_BOTTOM" +syn match autoitStyle "\$TCS_RIGHT" +syn match autoitStyle "\$TCS_MULTISELECT" +syn match autoitStyle "\$TCS_FLATBUTTONS" +syn match autoitStyle "\$TCS_FORCEICONLEFT" +syn match autoitStyle "\$TCS_FORCELABELLEFT" +syn match autoitStyle "\$TCS_HOTTRACK" +syn match autoitStyle "\$TCS_VERTICAL" +syn match autoitStyle "\$TCS_TABS" +syn match autoitStyle "\$TCS_BUTTONS" +syn match autoitStyle "\$TCS_SINGLELINE" +syn match autoitStyle "\$TCS_MULTILINE" +syn match autoitStyle "\$TCS_RIGHTJUSTIFY" +syn match autoitStyle "\$TCS_FIXEDWIDTH" +syn match autoitStyle "\$TCS_RAGGEDRIGHT" +syn match autoitStyle "\$TCS_FOCUSONBUTTONDOWN" +syn match autoitStyle "\$TCS_OWNERDRAWFIXED" +syn match autoitStyle "\$TCS_TOOLTIPS" +syn match autoitStyle "\$TCS_FOCUSNEVER" +" avi clip +syn match autoitStyle "\$ACS_AUTOPLAY" +syn match autoitStyle "\$ACS_CENTER" +syn match autoitStyle "\$ACS_TRANSPARENT" +syn match autoitStyle "\$ACS_NONTRANSPARENT" +" date +syn match autoitStyle "\$DTS_UPDOWN" +syn match autoitStyle "\$DTS_SHOWNONE" +syn match autoitStyle "\$DTS_LONGDATEFORMAT" +syn match autoitStyle "\$DTS_TIMEFORMAT" +syn match autoitStyle "\$DTS_RIGHTALIGN" +syn match autoitStyle "\$DTS_SHORTDATEFORMAT" +" monthcal +syn match autoitStyle "\$MCS_NOTODAY" +syn match autoitStyle "\$MCS_NOTODAYCIRCLE" +syn match autoitStyle "\$MCS_WEEKNUMBERS" +" treeview +syn match autoitStyle "\$TVS_HASBUTTONS" +syn match autoitStyle "\$TVS_HASLINES" +syn match autoitStyle "\$TVS_LINESATROOT" +syn match autoitStyle "\$TVS_DISABLEDRAGDROP" +syn match autoitStyle "\$TVS_SHOWSELALWAYS" +syn match autoitStyle "\$TVS_RTLREADING" +syn match autoitStyle "\$TVS_NOTOOLTIPS" +syn match autoitStyle "\$TVS_CHECKBOXES" +syn match autoitStyle "\$TVS_TRACKSELECT" +syn match autoitStyle "\$TVS_SINGLEEXPAND" +syn match autoitStyle "\$TVS_FULLROWSELECT" +syn match autoitStyle "\$TVS_NOSCROLL" +syn match autoitStyle "\$TVS_NONEVENHEIGHT" +" slider +syn match autoitStyle "\$TBS_AUTOTICKS" +syn match autoitStyle "\$TBS_BOTH" +syn match autoitStyle "\$TBS_BOTTOM" +syn match autoitStyle "\$TBS_HORZ" +syn match autoitStyle "\$TBS_VERT" +syn match autoitStyle "\$TBS_NOTHUMB" +syn match autoitStyle "\$TBS_NOTICKS" +syn match autoitStyle "\$TBS_LEFT" +syn match autoitStyle "\$TBS_RIGHT" +syn match autoitStyle "\$TBS_TOP" +" listview +syn match autoitStyle "\$LVS_ICON" +syn match autoitStyle "\$LVS_REPORT" +syn match autoitStyle "\$LVS_SMALLICON" +syn match autoitStyle "\$LVS_LIST" +syn match autoitStyle "\$LVS_EDITLABELS" +syn match autoitStyle "\$LVS_NOCOLUMNHEADER" +syn match autoitStyle "\$LVS_NOSORTHEADER" +syn match autoitStyle "\$LVS_SINGLESEL" +syn match autoitStyle "\$LVS_SHOWSELALWAYS" +syn match autoitStyle "\$LVS_SORTASCENDING" +syn match autoitStyle "\$LVS_SORTDESCENDING" +" listview extended +syn match autoitStyle "\$LVS_EX_FULLROWSELECT" +syn match autoitStyle "\$LVS_EX_GRIDLINES" +syn match autoitStyle "\$LVS_EX_HEADERDRAGDROP" +syn match autoitStyle "\$LVS_EX_TRACKSELECT" +syn match autoitStyle "\$LVS_EX_CHECKBOXES" +syn match autoitStyle "\$LVS_EX_BORDERSELECT" +syn match autoitStyle "\$LVS_EX_DOUBLEBUFFER" +syn match autoitStyle "\$LVS_EX_FLATSB" +syn match autoitStyle "\$LVS_EX_MULTIWORKAREAS" +syn match autoitStyle "\$LVS_EX_SNAPTOGRID" +syn match autoitStyle "\$LVS_EX_SUBITEMIMAGES" + +" constants - must be defined after autoitVariable - excludes styles +" constants - autoit options +syn match autoitConst "\$OPT_COORDSRELATIVE" +syn match autoitConst "\$OPT_COORDSABSOLUTE" +syn match autoitConst "\$OPT_COORDSCLIENT" +syn match autoitConst "\$OPT_ERRORSILENT" +syn match autoitConst "\$OPT_ERRORFATAL" +syn match autoitConst "\$OPT_CAPSNOSTORE" +syn match autoitConst "\$OPT_CAPSSTORE" +syn match autoitConst "\$OPT_MATCHSTART" +syn match autoitConst "\$OPT_MATCHANY" +syn match autoitConst "\$OPT_MATCHEXACT" +syn match autoitConst "\$OPT_MATCHADVANCED" +" constants - file +syn match autoitConst "\$FC_NOOVERWRITE" +syn match autoitConst "\$FC_OVERWRITE" +syn match autoitConst "\$FT_MODIFIED" +syn match autoitConst "\$FT_CREATED" +syn match autoitConst "\$FT_ACCESSED" +syn match autoitConst "\$FO_READ" +syn match autoitConst "\$FO_APPEND" +syn match autoitConst "\$FO_OVERWRITE" +syn match autoitConst "\$EOF" +syn match autoitConst "\$FD_FILEMUSTEXIST" +syn match autoitConst "\$FD_PATHMUSTEXIST" +syn match autoitConst "\$FD_MULTISELECT" +syn match autoitConst "\$FD_PROMPTCREATENEW" +syn match autoitConst "\$FD_PROMPTOVERWRITE" +" constants - keyboard +syn match autoitConst "\$KB_SENDSPECIAL" +syn match autoitConst "\$KB_SENDRAW" +syn match autoitConst "\$KB_CAPSOFF" +syn match autoitConst "\$KB_CAPSON" +" constants - message box +syn match autoitConst "\$MB_OK" +syn match autoitConst "\$MB_OKCANCEL" +syn match autoitConst "\$MB_ABORTRETRYIGNORE" +syn match autoitConst "\$MB_YESNOCANCEL" +syn match autoitConst "\$MB_YESNO" +syn match autoitConst "\$MB_RETRYCANCEL" +syn match autoitConst "\$MB_ICONHAND" +syn match autoitConst "\$MB_ICONQUESTION" +syn match autoitConst "\$MB_ICONEXCLAMATION" +syn match autoitConst "\$MB_ICONASTERISK" +syn match autoitConst "\$MB_DEFBUTTON1" +syn match autoitConst "\$MB_DEFBUTTON2" +syn match autoitConst "\$MB_DEFBUTTON3" +syn match autoitConst "\$MB_APPLMODAL" +syn match autoitConst "\$MB_SYSTEMMODAL" +syn match autoitConst "\$MB_TASKMODAL" +syn match autoitConst "\$MB_TOPMOST" +syn match autoitConst "\$MB_RIGHTJUSTIFIED" +syn match autoitConst "\$IDTIMEOUT" +syn match autoitConst "\$IDOK" +syn match autoitConst "\$IDCANCEL" +syn match autoitConst "\$IDABORT" +syn match autoitConst "\$IDRETRY" +syn match autoitConst "\$IDIGNORE" +syn match autoitConst "\$IDYES" +syn match autoitConst "\$IDNO" +syn match autoitConst "\$IDTRYAGAIN" +syn match autoitConst "\$IDCONTINUE" +" constants - progress and splash +syn match autoitConst "\$DLG_NOTITLE" +syn match autoitConst "\$DLG_NOTONTOP" +syn match autoitConst "\$DLG_TEXTLEFT" +syn match autoitConst "\$DLG_TEXTRIGHT" +syn match autoitConst "\$DLG_MOVEABLE" +syn match autoitConst "\$DLG_TEXTVCENTER" +" constants - tray tip +syn match autoitConst "\$TIP_ICONNONE" +syn match autoitConst "\$TIP_ICONASTERISK" +syn match autoitConst "\$TIP_ICONEXCLAMATION" +syn match autoitConst "\$TIP_ICONHAND" +syn match autoitConst "\$TIP_NOSOUND" +" constants - mouse +syn match autoitConst "\$IDC_UNKNOWN" +syn match autoitConst "\$IDC_APPSTARTING" +syn match autoitConst "\$IDC_ARROW" +syn match autoitConst "\$IDC_CROSS" +syn match autoitConst "\$IDC_HELP" +syn match autoitConst "\$IDC_IBEAM" +syn match autoitConst "\$IDC_ICON" +syn match autoitConst "\$IDC_NO" +syn match autoitConst "\$IDC_SIZE" +syn match autoitConst "\$IDC_SIZEALL" +syn match autoitConst "\$IDC_SIZENESW" +syn match autoitConst "\$IDC_SIZENS" +syn match autoitConst "\$IDC_SIZENWSE" +syn match autoitConst "\$IDC_SIZEWE" +syn match autoitConst "\$IDC_UPARROW" +syn match autoitConst "\$IDC_WAIT" +" constants - process +syn match autoitConst "\$SD_LOGOFF" +syn match autoitConst "\$SD_SHUTDOWN" +syn match autoitConst "\$SD_REBOOT" +syn match autoitConst "\$SD_FORCE" +syn match autoitConst "\$SD_POWERDOWN" +" constants - string +syn match autoitConst "\$STR_NOCASESENSE" +syn match autoitConst "\$STR_CASESENSE" +syn match autoitConst "\STR_STRIPLEADING" +syn match autoitConst "\$STR_STRIPTRAILING" +syn match autoitConst "\$STR_STRIPSPACES" +syn match autoitConst "\$STR_STRIPALL" +" constants - tray +syn match autoitConst "\$TRAY_ITEM_EXIT" +syn match autoitConst "\$TRAY_ITEM_PAUSE" +syn match autoitConst "\$TRAY_ITEM_FIRST" +syn match autoitConst "\$TRAY_CHECKED" +syn match autoitConst "\$TRAY_UNCHECKED" +syn match autoitConst "\$TRAY_ENABLE" +syn match autoitConst "\$TRAY_DISABLE" +syn match autoitConst "\$TRAY_FOCUS" +syn match autoitConst "\$TRAY_DEFAULT" +syn match autoitConst "\$TRAY_EVENT_SHOWICON" +syn match autoitConst "\$TRAY_EVENT_HIDEICON" +syn match autoitConst "\$TRAY_EVENT_FLASHICON" +syn match autoitConst "\$TRAY_EVENT_NOFLASHICON" +syn match autoitConst "\$TRAY_EVENT_PRIMARYDOWN" +syn match autoitConst "\$TRAY_EVENT_PRIMARYUP" +syn match autoitConst "\$TRAY_EVENT_SECONDARYDOWN" +syn match autoitConst "\$TRAY_EVENT_SECONDARYUP" +syn match autoitConst "\$TRAY_EVENT_MOUSEOVER" +syn match autoitConst "\$TRAY_EVENT_MOUSEOUT" +syn match autoitConst "\$TRAY_EVENT_PRIMARYDOUBLE" +syn match autoitConst "\$TRAY_EVENT_SECONDARYDOUBLE" +" constants - stdio +syn match autoitConst "\$STDIN_CHILD" +syn match autoitConst "\$STDOUT_CHILD" +syn match autoitConst "\$STDERR_CHILD" +" constants - color +syn match autoitConst "\$COLOR_BLACK" +syn match autoitConst "\$COLOR_SILVER" +syn match autoitConst "\$COLOR_GRAY" +syn match autoitConst "\$COLOR_WHITE" +syn match autoitConst "\$COLOR_MAROON" +syn match autoitConst "\$COLOR_RED" +syn match autoitConst "\$COLOR_PURPLE" +syn match autoitConst "\$COLOR_FUCHSIA" +syn match autoitConst "\$COLOR_GREEN" +syn match autoitConst "\$COLOR_LIME" +syn match autoitConst "\$COLOR_OLIVE" +syn match autoitConst "\$COLOR_YELLOW" +syn match autoitConst "\$COLOR_NAVY" +syn match autoitConst "\$COLOR_BLUE" +syn match autoitConst "\$COLOR_TEAL" +syn match autoitConst "\$COLOR_AQUA" +" constants - reg value type +syn match autoitConst "\$REG_NONE" +syn match autoitConst "\$REG_SZ" +syn match autoitConst "\$REG_EXPAND_SZ" +syn match autoitConst "\$REG_BINARY" +syn match autoitConst "\$REG_DWORD" +syn match autoitConst "\$REG_DWORD_BIG_ENDIAN" +syn match autoitConst "\$REG_LINK" +syn match autoitConst "\$REG_MULTI_SZ" +syn match autoitConst "\$REG_RESOURCE_LIST" +syn match autoitConst "\$REG_FULL_RESOURCE_DESCRIPTOR" +syn match autoitConst "\$REG_RESOURCE_REQUIREMENTS_LIST" +" guiconstants - events and messages +syn match autoitConst "\$GUI_EVENT_CLOSE" +syn match autoitConst "\$GUI_EVENT_MINIMIZE" +syn match autoitConst "\$GUI_EVENT_RESTORE" +syn match autoitConst "\$GUI_EVENT_MAXIMIZE" +syn match autoitConst "\$GUI_EVENT_PRIMARYDOWN" +syn match autoitConst "\$GUI_EVENT_PRIMARYUP" +syn match autoitConst "\$GUI_EVENT_SECONDARYDOWN" +syn match autoitConst "\$GUI_EVENT_SECONDARYUP" +syn match autoitConst "\$GUI_EVENT_MOUSEMOVE" +syn match autoitConst "\$GUI_EVENT_RESIZED" +syn match autoitConst "\$GUI_EVENT_DROPPED" +syn match autoitConst "\$GUI_RUNDEFMSG" +" guiconstants - state +syn match autoitConst "\$GUI_AVISTOP" +syn match autoitConst "\$GUI_AVISTART" +syn match autoitConst "\$GUI_AVICLOSE" +syn match autoitConst "\$GUI_CHECKED" +syn match autoitConst "\$GUI_INDETERMINATE" +syn match autoitConst "\$GUI_UNCHECKED" +syn match autoitConst "\$GUI_DROPACCEPTED" +syn match autoitConst "\$GUI_DROPNOTACCEPTED" +syn match autoitConst "\$GUI_ACCEPTFILES" +syn match autoitConst "\$GUI_SHOW" +syn match autoitConst "\$GUI_HIDE" +syn match autoitConst "\$GUI_ENABLE" +syn match autoitConst "\$GUI_DISABLE" +syn match autoitConst "\$GUI_FOCUS" +syn match autoitConst "\$GUI_NOFOCUS" +syn match autoitConst "\$GUI_DEFBUTTON" +syn match autoitConst "\$GUI_EXPAND" +syn match autoitConst "\$GUI_ONTOP" +" guiconstants - font +syn match autoitConst "\$GUI_FONTITALIC" +syn match autoitConst "\$GUI_FONTUNDER" +syn match autoitConst "\$GUI_FONTSTRIKE" +" guiconstants - resizing +syn match autoitConst "\$GUI_DOCKAUTO" +syn match autoitConst "\$GUI_DOCKLEFT" +syn match autoitConst "\$GUI_DOCKRIGHT" +syn match autoitConst "\$GUI_DOCKHCENTER" +syn match autoitConst "\$GUI_DOCKTOP" +syn match autoitConst "\$GUI_DOCKBOTTOM" +syn match autoitConst "\$GUI_DOCKVCENTER" +syn match autoitConst "\$GUI_DOCKWIDTH" +syn match autoitConst "\$GUI_DOCKHEIGHT" +syn match autoitConst "\$GUI_DOCKSIZE" +syn match autoitConst "\$GUI_DOCKMENUBAR" +syn match autoitConst "\$GUI_DOCKSTATEBAR" +syn match autoitConst "\$GUI_DOCKALL" +syn match autoitConst "\$GUI_DOCKBORDERS" +" guiconstants - graphic +syn match autoitConst "\$GUI_GR_CLOSE" +syn match autoitConst "\$GUI_GR_LINE" +syn match autoitConst "\$GUI_GR_BEZIER" +syn match autoitConst "\$GUI_GR_MOVE" +syn match autoitConst "\$GUI_GR_COLOR" +syn match autoitConst "\$GUI_GR_RECT" +syn match autoitConst "\$GUI_GR_ELLIPSE" +syn match autoitConst "\$GUI_GR_PIE" +syn match autoitConst "\$GUI_GR_DOT" +syn match autoitConst "\$GUI_GR_PIXEL" +syn match autoitConst "\$GUI_GR_HINT" +syn match autoitConst "\$GUI_GR_REFRESH" +syn match autoitConst "\$GUI_GR_PENSIZE" +syn match autoitConst "\$GUI_GR_NOBKCOLOR" +" guiconstants - control default styles +syn match autoitConst "\$GUI_SS_DEFAULT_AVI" +syn match autoitConst "\$GUI_SS_DEFAULT_BUTTON" +syn match autoitConst "\$GUI_SS_DEFAULT_CHECKBOX" +syn match autoitConst "\$GUI_SS_DEFAULT_COMBO" +syn match autoitConst "\$GUI_SS_DEFAULT_DATE" +syn match autoitConst "\$GUI_SS_DEFAULT_EDIT" +syn match autoitConst "\$GUI_SS_DEFAULT_GRAPHIC" +syn match autoitConst "\$GUI_SS_DEFAULT_GROUP" +syn match autoitConst "\$GUI_SS_DEFAULT_ICON" +syn match autoitConst "\$GUI_SS_DEFAULT_INPUT" +syn match autoitConst "\$GUI_SS_DEFAULT_LABEL" +syn match autoitConst "\$GUI_SS_DEFAULT_LIST" +syn match autoitConst "\$GUI_SS_DEFAULT_LISTVIEW" +syn match autoitConst "\$GUI_SS_DEFAULT_MONTHCAL" +syn match autoitConst "\$GUI_SS_DEFAULT_PIC" +syn match autoitConst "\$GUI_SS_DEFAULT_PROGRESS" +syn match autoitConst "\$GUI_SS_DEFAULT_RADIO" +syn match autoitConst "\$GUI_SS_DEFAULT_SLIDER" +syn match autoitConst "\$GUI_SS_DEFAULT_TAB" +syn match autoitConst "\$GUI_SS_DEFAULT_TREEVIEW" +syn match autoitConst "\$GUI_SS_DEFAULT_UPDOWN" +syn match autoitConst "\$GUI_SS_DEFAULT_GUI" +" guiconstants - background color special flags +syn match autoitConst "\$GUI_BKCOLOR_DEFAULT" +syn match autoitConst "\$GUI_BKCOLOR_LV_ALTERNATE" +syn match autoitConst "\$GUI_BKCOLOR_TRANSPARENT" + +" registry constants +syn match autoitConst "\([\"\']\)REG_BINARY\1" +syn match autoitConst "\([\"\']\)REG_SZ\1" +syn match autoitConst "\([\"\']\)REG_MULTI_SZ\1" +syn match autoitConst "\([\"\']\)REG_EXPAND_SZ\1" +syn match autoitConst "\([\"\']\)REG_DWORD\1" + +" Define the default highlighting. +" Unused colors: Underlined, Ignore, Error, Todo +hi def link autoitFunction Statement " yellow/yellow +hi def link autoitKeyword Statement +hi def link autoitOperator Operator +hi def link autoitVarSelector Operator +hi def link autoitComment Comment " cyan/blue +hi def link autoitParen Comment +hi def link autoitComma Comment +hi def link autoitBracket Comment +hi def link autoitNumber Constant " magenta/red +hi def link autoitString Constant +hi def link autoitQuote Constant +hi def link autoitIncluded Constant +hi def link autoitCont Special " red/orange +hi def link autoitDoubledSingles Special +hi def link autoitDoubledDoubles Special +hi def link autoitCommDelimiter PreProc " blue/magenta +hi def link autoitInclude PreProc +hi def link autoitVariable Identifier " cyan/cyan +hi def link autoitBuiltin Type " green/green +hi def link autoitOption Type +hi def link autoitStyle Type +hi def link autoitConst Type +hi def link autoitSend Type + +syn sync minlines=50 + +let &cpo = s:keepcpo +unlet s:keepcpo + +endif diff --git a/syntax/automake.vim b/syntax/automake.vim new file mode 100644 index 00000000..be0cbb92 --- /dev/null +++ b/syntax/automake.vim @@ -0,0 +1,81 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 + +" Vim syntax file +" Language: automake Makefile.am +" Maintainer: Debian Vim Maintainers +" Former Maintainer: John Williams <jrw@pobox.com> +" Last Change: 2018 Dec 27 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/automake.vim +" +" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain +" it only because patches have been submitted for it by Debian users and the +" former maintainer was MIA (Missing In Action), taking over its +" maintenance was thus the only way to include those patches. +" If you care about this file, and have time to maintain it please do so! +" +" This script adds support for automake's Makefile.am format. It highlights +" Makefile variables significant to automake as well as highlighting +" autoconf-style @variable@ substitutions . Subsitutions are marked as errors +" when they are used in an inappropriate place, such as in defining +" EXTRA_SOURCES. + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +" Read the Makefile syntax to start with +runtime! syntax/make.vim + +syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" +syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 +syn match automakeSecondary "^\w\+\(_SOURCES\|_LIBADD\|_LDADD\|_LDFLAGS\|_DEPENDENCIES\|_AR\|_CCASFLAGS\|_CFLAGS\|_CPPFLAGS\|_CXXFLAGS\|_FCFLAGS\|_FFLAGS\|_GCJFLAGS\|_LFLAGS\|_LIBTOOLFLAGS\|OBJCFLAGS\|RFLAGS\|UPCFLAGS\|YFLAGS\)\s*\ze+\==" +syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\==" +syn match automakeExtra "^EXTRA_\w\+\s*\ze+\==" +syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\==" +syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\==" +syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\==" +syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$" + +syn match automakeSubst "@\w\+@" +syn match automakeSubst "^\s*@\w\+@" +syn match automakeComment1 "#.*$" contains=automakeSubst,@Spell +syn match automakeComment2 "##.*$" contains=@Spell + +syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call +syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake + +syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent +syn match automakeBadSubst "@\(\w*@\=\)\=" contained + +syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution +syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution +syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link automakePrimary Statement +hi def link automakeSecondary Type +hi def link automakeExtra Special +hi def link automakeOptions Special +hi def link automakeClean Special +hi def link automakeSubdirs Statement +hi def link automakeConditional PreProc +hi def link automakeSubst PreProc +hi def link automakeComment1 makeComment +hi def link automakeComment2 makeComment +hi def link automakeMakeError makeError +hi def link automakeBadSubst makeError +hi def link automakeMakeDString makeDString +hi def link automakeMakeSString makeSString +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 new file mode 100644 index 00000000..71a88cc3 --- /dev/null +++ b/syntax/ave.vim @@ -0,0 +1,83 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ave') == -1 + +" Vim syntax file +" Copyright by Jan-Oliver Wagner +" Language: avenue +" Maintainer: Jan-Oliver Wagner <Jan-Oliver.Wagner@intevation.de> +" Last change: 2001 May 10 + +" Avenue is the ArcView built-in language. ArcView is +" a desktop GIS by ESRI. Though it is a built-in language +" and a built-in editor is provided, the use of VIM increases +" development speed. +" I use some technologies to automatically load avenue scripts +" into ArcView. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Avenue is entirely case-insensitive. +syn case ignore + +" The keywords + +syn keyword aveStatement if then elseif else end break exit return +syn keyword aveStatement for each in continue while + +" String + +syn region aveString start=+"+ end=+"+ + +" Integer number +syn match aveNumber "[+-]\=\<[0-9]\+\>" + +" Operator + +syn keyword aveOperator or and max min xor mod by +" 'not' is a kind of a problem: It's an Operator as well as a method +" 'not' is only marked as an Operator if not applied as method +syn match aveOperator "[^\.]not[^a-zA-Z]" + +" Variables + +syn keyword aveFixVariables av nil self false true nl tab cr tab +syn match globalVariables "_[a-zA-Z][a-zA-Z0-9]*" +syn match aveVariables "[a-zA-Z][a-zA-Z0-9_]*" +syn match aveConst "#[A-Z][A-Z_]+" + +" Comments + +syn match aveComment "'.*" + +" Typical Typos + +" for C programmers: +syn match aveTypos "==" +syn match aveTypos "!=" + +" Define the default highlighting. +" Only when an item doesn't have highlighting+yet + +hi def link aveStatement Statement + +hi def link aveString String +hi def link aveNumber Number + +hi def link aveFixVariables Special +hi def link aveVariables Identifier +hi def link globalVariables Special +hi def link aveConst Special + +hi def link aveClassMethods Function + +hi def link aveOperator Operator +hi def link aveComment Comment + +hi def link aveTypos Error + + +let b:current_syntax = "ave" + +endif diff --git a/syntax/awk.vim b/syntax/awk.vim new file mode 100644 index 00000000..342a49b7 --- /dev/null +++ b/syntax/awk.vim @@ -0,0 +1,220 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 + +" Vim syntax file +" Language: awk, nawk, gawk, mawk +" Maintainer: Antonio Colombo <azc100@gmail.com> +" Last Change: 2020 Aug 18 + +" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger +" The AWK Programming Language, Addison-Wesley, 1988 + +" GAWK ref. is: Arnold D. Robbins +" Effective AWK Programming, Third Edition, O'Reilly, 2001 +" Effective AWK Programming, Fourth Edition, O'Reilly, 2015 +" (up-to-date version available with the gawk source distribution) + +" MAWK is a "new awk" meaning it implements AWK ref. +" mawk conforms to the Posix 1003.2 (draft 11.3) +" definition of the AWK language which contains a few features +" not described in the AWK book, and mawk provides a small number of extensions. + +" TODO: +" Dig into the commented out syntax expressions below. + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn iskeyword @,48-57,_,192-255,@-@ + +" A bunch of useful Awk keywords +" AWK ref. p. 188 +syn keyword awkStatement break continue delete exit +syn keyword awkStatement function getline next +syn keyword awkStatement print printf return +" GAWK ref. Chapter 7-9 +syn keyword awkStatement case default switch nextfile +syn keyword awkStatement func +" GAWK ref. Chapter 2.7, Including Other Files into Your Program +" GAWK ref. Chapter 2.8, Loading Dynamic Extensions into Your Program +" GAWK ref. Chapter 15, Namespaces +" Directives +syn keyword awkStatement @include @load @namespace +" +" GAWK ref. Chapter 9, Functions +" Numeric Functions +syn keyword awkFunction atan2 cos exp int log rand sin sqrt srand +" String Manipulation Functions +syn keyword awkFunction asort asorti gensub gsub index length match +syn keyword awkFunction patsplit split sprintf strtonum sub substr +syn keyword awkFunction tolower toupper +" Input Output Functions +syn keyword awkFunction close fflush system +" Time Functions +syn keyword awkFunction mktime strftime systime +" Bit Manipulation Functions +syn keyword awkFunction and compl lshift or rshift xor +" Getting Type Information Functions +syn keyword awkFunction isarray typeof +" String-Translation Functions +syn keyword awkFunction bindtextdomain dcgettext dcngetext + +syn keyword awkConditional if else +syn keyword awkRepeat while for do + +syn keyword awkTodo contained TODO + +syn keyword awkPatterns BEGIN END BEGINFILE ENDFILE + +" GAWK ref. Chapter 7 +" Built-in Variables That Control awk +syn keyword awkVariables BINMODE CONVFMT FIELDWIDTHS FPAT FS +syn keyword awkVariables IGNORECASE LINT OFMT OFS ORS PREC +syn keyword awkVariables ROUNDMODE RS SUBSEP TEXTDOMAIN +" Built-in Variables That Convey Information +syn keyword awkVariables ARGC ARGV ARGIND ENVIRON ERRNO FILENAME +syn keyword awkVariables FNR NF FUNCTAB NR PROCINFO RLENGTH RSTART +syn keyword awkVariables RT SYMTAB + +" Arithmetic operators: +, and - take care of ++, and -- +syn match awkOperator "+\|-\|\*\|/\|%\|=" +syn match awkOperator "+=\|-=\|\*=\|/=\|%=" +syn match awkOperator "\^\|\^=" + +" Octal format character. +syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}" +" Hex format character. +syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+" + +syn match awkFieldVars "\$\d\+" + +" catch errors caused by wrong parenthesis +syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass,awkComment +syn match awkParenError display ")" +"syn match awkInParen display contained "[{}]" + +" 64 lines for complex &&'s, and ||'s in a big "if" +syn sync ccomment awkParen maxlines=64 + +" Search strings & Regular Expressions therein. +syn region awkSearch oneline start="^[ \t]*/"ms=e start="\(,\|!\=\~\)[ \t]*/"ms=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter +syn region awkBrackets contained start="\[\^\]\="ms=s+2 start="\[[^\^]"ms=s+1 end="\]"me=e-1 contains=awkBrktRegExp,awkCharClass +syn region awkSearch oneline start="[ \t]*/"hs=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter + +syn match awkCharClass contained "\[:[^:\]]*:\]" +syn match awkBrktRegExp contained "\\.\|.\-[^]]" +syn match awkRegExp contained "/\^"ms=s+1 +syn match awkRegExp contained "\$/"me=e-1 +syn match awkRegExp contained "[?.*{}|+]" + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn region awkString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell,awkSpecialCharacter,awkSpecialPrintf +syn match awkSpecialCharacter contained "\\." + +" Some of these combinations may seem weird, but they work. +syn match awkSpecialPrintf contained "%[-+ #]*\d*\.\=\d*[cdefgiosuxEGX%]" + +" Numbers, allowing signs (both -, and +) +" Integer number. +syn match awkNumber display "[+-]\=\<\d\+\>" +" Floating point number. +syn match awkFloat display "[+-]\=\<\d\+\.\d+\>" +" Floating point number, starting with a dot. +syn match awkFloat display "[+-]\=\<.\d+\>" +syn case ignore +"floating point number, with dot, optional exponent +syn match awkFloat display "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" +"floating point number, starting with a dot, optional exponent +syn match awkFloat display "\.\d\+\(e[-+]\=\d\+\)\=\>" +"floating point number, without dot, with exponent +syn match awkFloat display "\<\d\+e[-+]\=\d\+\>" +syn case match + +"syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + +" Comparison expressions. +syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!=" +syn match awkExpression "\~\|\!\~" +syn match awkExpression "?\|:" +syn keyword awkExpression in + +" Boolean Logic (OR, AND, NOT) +syn match awkBoolLogic "||\|&&\|\!" + +" This is overridden by less-than & greater-than. +" Put this above those to override them. +" Put this in a 'match "\<printf\=\>.*;\="' to make it not override +" less/greater than (most of the time), but it won't work yet because +" keywords always have precedence over match & region. +" File I/O: (print foo, bar > "filename") & for nawk (getline < "filename") +"syn match awkFileIO contained ">" +"syn match awkFileIO contained "<" + +" Expression separators: ';' and ',' +syn match awkSemicolon ";" +syn match awkComma "," + +syn match awkComment "#.*" contains=@Spell,awkTodo + +syn match awkLineSkip "\\$" + +" Highlight array element's (recursive arrays allowed). +" Keeps nested array names' separate from normal array elements. +" Keeps numbers separate from normal array elements (variables). +syn match awkArrayArray contained "[^][, \t]\+\["me=e-1 +syn match awkArrayElement contained "[^][, \t]\+" +syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayElement,awkArrayArray,awkNumber,awkFloat + +" 10 should be enough. +" (for the few instances where it would be more than "oneline") +syn sync ccomment awkArray maxlines=10 + +" Define the default highlighting. +hi def link awkConditional Conditional +hi def link awkFunction Function +hi def link awkRepeat Repeat +hi def link awkStatement Statement +hi def link awkString String +hi def link awkSpecialPrintf Special +hi def link awkSpecialCharacter Special +hi def link awkSearch String +hi def link awkBrackets awkRegExp +hi def link awkBrktRegExp awkNestRegExp +hi def link awkCharClass awkNestRegExp +hi def link awkNestRegExp Keyword +hi def link awkRegExp Special +hi def link awkNumber Number +hi def link awkFloat Float +hi def link awkFileIO Special +hi def link awkOperator Special +hi def link awkExpression Special +hi def link awkBoolLogic Special +hi def link awkPatterns Special +hi def link awkVariables Special +hi def link awkFieldVars Special +hi def link awkLineSkip Special +hi def link awkSemicolon Special +hi def link awkComma Special +hi def link awkIdentifier Identifier +hi def link awkComment Comment +hi def link awkTodo Todo +" Change this if you want nested array names to be highlighted. +hi def link awkArrayArray awkArray +hi def link awkArrayElement Special +hi def link awkParenError awkError +hi def link awkInParen awkError +hi def link awkError Error + +let b:current_syntax = "awk" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 + +endif diff --git a/syntax/elf.vim b/syntax/elf.vim new file mode 100644 index 00000000..5b6b9678 --- /dev/null +++ b/syntax/elf.vim @@ -0,0 +1,86 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1 + +" Vim syntax file +" Language: ELF +" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: Son 22 Jun 2003 20:43:14 CEST +" Filenames: *.ab,*.am +" URL: http://www.cvjb.de/comp/vim/elf.vim +" $Id: elf.vim,v 1.1 2004/06/13 19:52:27 vimboss Exp $ +" +" ELF: Extensible Language Facility +" This is the Applix Inc., Macro and Builder programming language. +" It has nothing in common with the binary format called ELF. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Case does not matter +syn case ignore + +" Environments +syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError + +" Unmatched braces +syn match elfBraceError "}" + +" All macros must have at least one of these definitions +syn keyword elfSpecial endmacro +syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError + +" Preprocessor Commands +syn keyword elfPPCom define include + +" Some keywords +syn keyword elfKeyword false true null +syn keyword elfKeyword var format object function endfunction + +" Conditionals and loops +syn keyword elfConditional if else case of endcase for to next while until return goto + +" All built-in elf macros end with an '@' +syn match elfMacro "[0-9_A-Za-z]\+@" + +" Strings and characters +syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" Numbers +syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Comments +syn region elfComment start="/\*" end="\*/" +syn match elfComment "\'.*$" + +syn sync ccomment elfComment + +" Parenthesis +syn match elfParens "[\[\]()]" + +" Punctuation +syn match elfPunct "[,;]" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later. +hi def link elfComment Comment +hi def link elfPPCom Include +hi def link elfKeyword Keyword +hi def link elfSpecial Special +hi def link elfEnvironment Special +hi def link elfBraceError Error +hi def link elfConditional Conditional +hi def link elfMacro Function +hi def link elfNumber Number +hi def link elfString String +hi def link elfParens Delimiter +hi def link elfPunct Delimiter + + +let b:current_syntax = "elf" + +" vim:ts=8:sw=4:nocindent:smartindent: + +endif diff --git a/syntax/forth.vim b/syntax/forth.vim new file mode 100644 index 00000000..0e9350ab --- /dev/null +++ b/syntax/forth.vim @@ -0,0 +1,266 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1 + +" Vim syntax file +" Language: FORTH +" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com> +" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: 2018-03-29 +" Filenames: *.fs,*.ft +" URL: https://github.com/jkotlinski/forth.vim + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Synchronization method +syn sync ccomment +syn sync maxlines=200 + +" I use gforth, so I set this to case ignore +syn case ignore + +" Some special, non-FORTH keywords +syn keyword forthTodo contained TODO FIXME XXX +syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\=' + +" Characters allowed in keywords +" I don't know if 128-255 are allowed in ANS-FORTH +setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 + +" when wanted, highlight trailing white space +if exists("forth_space_errors") + if !exists("forth_no_trail_space_error") + syn match forthSpaceError display excludenl "\s\+$" + endif + if !exists("forth_no_tab_space_error") + syn match forthSpaceError display " \+\t"me=e-1 + endif +endif + +" Keywords + +" basic mathematical and logical operators +syn keyword forthOperators + - * / MOD /MOD NEGATE ABS MIN MAX +syn keyword forthOperators AND OR XOR NOT LSHIFT RSHIFT INVERT 2* 2/ 1+ +syn keyword forthOperators 1- 2+ 2- 8* UNDER+ +syn keyword forthOperators M+ */ */MOD M* UM* M*/ UM/MOD FM/MOD SM/REM +syn keyword forthOperators D+ D- DNEGATE DABS DMIN DMAX D2* D2/ +syn keyword forthOperators F+ F- F* F/ FNEGATE FABS FMAX FMIN FLOOR FROUND +syn keyword forthOperators F** FSQRT FEXP FEXPM1 FLN FLNP1 FLOG FALOG FSIN +syn keyword forthOperators FCOS FSINCOS FTAN FASIN FACOS FATAN FATAN2 FSINH +syn keyword forthOperators FCOSH FTANH FASINH FACOSH FATANH F2* F2/ 1/F +syn keyword forthOperators F~REL F~ABS F~ +syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<= +syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<> +syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE +syn keyword forthOperators ?DNEGATE TRUE FALSE + +" various words that take an input and do something with it +syn keyword forthFunction . U. .R U.R + +" stack manipulations +syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL +syn keyword forthStack 2DROP 2NIP 2DUP 2OVER 2TUCK 2SWAP 2ROT 2-ROT +syn keyword forthStack 3DUP 4DUP 5DUP 3DROP 4DROP 5DROP 8DROP 4SWAP 4ROT +syn keyword forthStack 4-ROT 4TUCK 8SWAP 8DUP +syn keyword forthRStack >R R> R@ RDROP 2>R 2R> 2R@ 2RDROP +syn keyword forthRstack 4>R 4R> 4R@ 4RDROP +syn keyword forthFStack FDROP FNIP FDUP FOVER FTUCK FSWAP FROT + +" stack pointer manipulations +syn keyword forthSP SP@ SP! FP@ FP! RP@ RP! LP@ LP! DEPTH + +" address operations +syn keyword forthMemory @ ! +! C@ C! 2@ 2! F@ F! SF@ SF! DF@ DF! +syn keyword forthAdrArith CHARS CHAR+ CELLS CELL+ CELL ALIGN ALIGNED FLOATS +syn keyword forthAdrArith FLOAT+ FLOAT FALIGN FALIGNED SFLOATS SFLOAT+ +syn keyword forthAdrArith SFALIGN SFALIGNED DFLOATS DFLOAT+ DFALIGN DFALIGNED +syn keyword forthAdrArith MAXALIGN MAXALIGNED CFALIGN CFALIGNED +syn keyword forthAdrArith ADDRESS-UNIT-BITS ALLOT ALLOCATE HERE +syn keyword forthMemBlks MOVE ERASE CMOVE CMOVE> FILL BLANK UNUSED + +" conditionals +syn keyword forthCond IF ELSE ENDIF THEN CASE OF ENDOF ENDCASE ?DUP-IF +syn keyword forthCond ?DUP-0=-IF AHEAD CS-PICK CS-ROLL CATCH THROW WITHIN + +" iterations +syn keyword forthLoop BEGIN WHILE REPEAT UNTIL AGAIN +syn keyword forthLoop ?DO LOOP I J K +DO U+DO -DO U-DO DO +LOOP -LOOP +syn keyword forthLoop UNLOOP LEAVE ?LEAVE EXIT DONE FOR NEXT RECURSE + +" new words +syn match forthClassDef '\<:class\s*[^ \t]\+\>' +syn match forthObjectDef '\<:object\s*[^ \t]\+\>' +syn match forthColonDef '\<:m\?\s*[^ \t]\+\>' +syn keyword forthEndOfColonDef ; ;M ;m +syn keyword forthEndOfClassDef ;class +syn keyword forthEndOfObjectDef ;object +syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE +syn keyword forthDefine FVARIABLE CREATE USER VALUE TO DEFER IS DOES> IMMEDIATE +syn keyword forthDefine COMPILE-ONLY COMPILE RESTRICT INTERPRET POSTPONE EXECUTE +syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION> +syn keyword forthDefine <INTERPRETATION COMPILATION> <COMPILATION ] LASTXT +syn keyword forthDefine COMP' POSTPONE, FIND-NAME NAME>INT NAME?INT NAME>COMP +syn keyword forthDefine NAME>STRING STATE C; CVARIABLE BUFFER: MARKER +syn keyword forthDefine , 2, F, C, COMPILE, +syn match forthDefine "\[IFDEF]" +syn match forthDefine "\[IFUNDEF]" +syn match forthDefine "\[THEN]" +syn match forthDefine "\[ENDIF]" +syn match forthDefine "\[ELSE]" +syn match forthDefine "\[?DO]" +syn match forthDefine "\[DO]" +syn match forthDefine "\[LOOP]" +syn match forthDefine "\[+LOOP]" +syn match forthDefine "\[NEXT]" +syn match forthDefine "\[BEGIN]" +syn match forthDefine "\[UNTIL]" +syn match forthDefine "\[AGAIN]" +syn match forthDefine "\[WHILE]" +syn match forthDefine "\[REPEAT]" +syn match forthDefine "\[COMP']" +syn match forthDefine "'" +syn match forthDefine '\<\[\>' +syn match forthDefine "\[']" +syn match forthDefine '\[COMPILE]' +syn match forthDefine '\[CHAR]' + +" debugging +syn keyword forthDebug PRINTDEBUGDATA PRINTDEBUGLINE +syn match forthDebug "\<\~\~\>" + +" Assembler +syn keyword forthAssembler ASSEMBLER CODE END-CODE ;CODE FLUSH-ICACHE C, + +" basic character operations +syn keyword forthCharOps (.) CHAR EXPECT FIND WORD TYPE -TRAILING EMIT KEY +syn keyword forthCharOps KEY? TIB CR BL COUNT SPACE SPACES +" recognize 'char (' or '[char] (' correctly, so it doesn't +" highlight everything after the paren as a comment till a closing ')' +syn match forthCharOps '\<char\s\S\s' +syn match forthCharOps '\<\[char\]\s\S\s' +syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+ + +" char-number conversion +syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F +syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER +syn keyword forthConversion F>S S>F HOLDS + +" interpreter, wordbook, compiler +syn keyword forthForth (LOCAL) BYE COLD ABORT >BODY >NEXT >LINK CFA >VIEW HERE +syn keyword forthForth PAD WORDS VIEW VIEW> N>LINK NAME> LINK> L>NAME FORGET +syn keyword forthForth BODY> ASSERT( ASSERT0( ASSERT1( ASSERT2( ASSERT3( ) +syn keyword forthForth >IN ACCEPT ENVIRONMENT? EVALUATE QUIT SOURCE ACTION-OF +syn keyword forthForth DEFER! DEFER@ PARSE PARSE-NAME REFILL RESTORE-INPUT +syn keyword forthForth SAVE-INPUT SOURCE-ID +syn region forthForth start=+ABORT"\s+ skip=+\\"+ end=+"+ + +" vocabularies +syn keyword forthVocs ONLY FORTH ALSO ROOT SEAL VOCS ORDER CONTEXT #VOCS +syn keyword forthVocs VOCABULARY DEFINITIONS + +" File keywords +syn keyword forthFileMode R/O R/W W/O BIN +syn keyword forthFileWords OPEN-FILE CREATE-FILE CLOSE-FILE DELETE-FILE +syn keyword forthFileWords RENAME-FILE READ-FILE READ-LINE KEY-FILE +syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE +syn keyword forthFileWords FLUSH-FILE FILE-STATUS FILE-POSITION +syn keyword forthFileWords REPOSITION-FILE FILE-SIZE RESIZE-FILE +syn keyword forthFileWords SLURP-FILE SLURP-FID STDIN STDOUT STDERR +syn keyword forthFileWords INCLUDE-FILE INCLUDED REQUIRED +syn keyword forthBlocks OPEN-BLOCKS USE LOAD --> BLOCK-OFFSET +syn keyword forthBlocks GET-BLOCK-FID BLOCK-POSITION LIST SCR BLOCK +syn keyword forthBlocks BUFER EMPTY-BUFFERS EMPTY-BUFFER UPDATE UPDATED? +syn keyword forthBlocks SAVE-BUFFERS SAVE-BUFFER FLUSH THRU +LOAD +THRU +syn keyword forthBlocks BLOCK-INCLUDED BLK + +" numbers +syn keyword forthMath DECIMAL HEX BASE +syn match forthInteger '\<-\=[0-9]\+.\=\>' +syn match forthInteger '\<&-\=[0-9]\+.\=\>' +" recognize hex and binary numbers, the '$' and '%' notation is for gforth +syn match forthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess +syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order! +syn match forthInteger '\<%[0-1]*[0-1]\+\>' +syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>' +syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>' + +" XXX If you find this overkill you can remove it. this has to come after the +" highlighting for numbers otherwise it has no effect. +syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo + +" Strings +syn region forthString start=+\.*\"+ end=+"+ end=+$+ +" XXX +syn region forthString start=+s\"+ end=+"+ end=+$+ +syn region forthString start=+s\\\"+ end=+"+ end=+$+ +syn region forthString start=+c\"+ end=+"+ end=+$+ + +" Comments +syn match forthComment '\\\s.*$' contains=forthTodo,forthSpaceError +syn region forthComment start='\\S\s' end='.*' contains=forthTodo,forthSpaceError +syn match forthComment '\.(\s[^)]*)' contains=forthTodo,forthSpaceError +syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=forthTodo,forthSpaceError +syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError + +" Include files +syn match forthInclude '^INCLUDE\s\+\k\+' +syn match forthInclude '^REQUIRE\s\+\k\+' +syn match forthInclude '^FLOAD\s\+' +syn match forthInclude '^NEEDS\s\+' + +" Locals definitions +syn region forthLocals start='{\s' start='{$' end='\s}' end='^}' +syn match forthLocals '{ }' " otherwise, at least two spaces between +syn region forthDeprecated start='locals|' end='|' + +" Define the default highlighting. +hi def link forthTodo Todo +hi def link forthOperators Operator +hi def link forthMath Number +hi def link forthInteger Number +hi def link forthFloat Float +hi def link forthStack Special +hi def link forthRstack Special +hi def link forthFStack Special +hi def link forthSP Special +hi def link forthMemory Function +hi def link forthAdrArith Function +hi def link forthMemBlks Function +hi def link forthCond Conditional +hi def link forthLoop Repeat +hi def link forthColonDef Define +hi def link forthEndOfColonDef Define +hi def link forthDefine Define +hi def link forthDebug Debug +hi def link forthAssembler Include +hi def link forthCharOps Character +hi def link forthConversion String +hi def link forthForth Statement +hi def link forthVocs Statement +hi def link forthString String +hi def link forthComment Comment +hi def link forthClassDef Define +hi def link forthEndOfClassDef Define +hi def link forthObjectDef Define +hi def link forthEndOfObjectDef Define +hi def link forthInclude Include +hi def link forthLocals Type " nothing else uses type and locals must stand out +hi def link forthDeprecated Error " if you must, change to Type +hi def link forthFileMode Function +hi def link forthFunction Function +hi def link forthFileWords Statement +hi def link forthBlocks Statement +hi def link forthSpaceError Error + +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/grub.vim b/syntax/grub.vim new file mode 100644 index 00000000..b752209d --- /dev/null +++ b/syntax/grub.vim @@ -0,0 +1,97 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 + +" Vim syntax file +" Language: grub(8) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword grubTodo contained TODO FIXME XXX NOTE + +syn region grubComment display oneline start='^#' end='$' + \ contains=grubTodo,@Spell + +syn match grubDevice display + \ '(\([fh]d\d\|\d\+\|0x\x\+\)\(,\d\+\)\=\(,\l\)\=)' + +syn match grubBlock display '\(\d\+\)\=+\d\+\(,\(\d\+\)\=+\d\+\)*' + +syn match grubNumbers display '+\=\<\d\+\|0x\x\+\>' + +syn match grubBegin display '^' + \ nextgroup=@grubCommands,grubComment skipwhite + +syn cluster grubCommands contains=grubCommand,grubTitleCommand + +syn keyword grubCommand contained default fallback hiddenmenu timeout + +syn keyword grubTitleCommand contained title nextgroup=grubTitle skipwhite + +syn match grubTitle contained display '.*' + +syn keyword grubCommand contained bootp color device dhcp hide ifconfig + \ pager partnew parttype password rarp serial setkey + \ terminal tftpserver unhide blocklist boot cat + \ chainloader cmp configfile debug displayapm + \ displaymem embed find fstest geometry halt help + \ impsprobe initrd install ioprobe kernel lock + \ makeactive map md5crypt module modulenounzip pause + \ quit reboot read root rootnoverify savedefault setup + \ testload testvbe uppermem vbeprobe + +syn keyword grubSpecial saved + +syn match grubBlink display 'blink-' +syn keyword grubBlack black +syn keyword grubBlue blue +syn keyword grubGreen green +syn keyword grubRed red +syn keyword grubMagenta magenta +syn keyword grubBrown brown yellow +syn keyword grubWhite white +syn match grubLightGray display 'light-gray' +syn match grubLightBlue display 'light-blue' +syn match grubLightGreen display 'light-green' +syn match grubLightCyan display 'light-cyan' +syn match grubLightRed display 'light-red' +syn match grubLightMagenta display 'light-magenta' +syn match grubDarkGray display 'dark-gray' + +hi def link grubComment Comment +hi def link grubTodo Todo +hi def link grubNumbers Number +hi def link grubDevice Identifier +hi def link grubBlock Identifier +hi def link grubCommand Keyword +hi def link grubTitleCommand grubCommand +hi def link grubTitle String +hi def link grubSpecial Special + +hi def grubBlink cterm=inverse +hi def grubBlack ctermfg=Black ctermbg=White guifg=Black guibg=White +hi def grubBlue ctermfg=DarkBlue guifg=DarkBlue +hi def grubGreen ctermfg=DarkGreen guifg=DarkGreen +hi def grubRed ctermfg=DarkRed guifg=DarkRed +hi def grubMagenta ctermfg=DarkMagenta guifg=DarkMagenta +hi def grubBrown ctermfg=Brown guifg=Brown +hi def grubWhite ctermfg=White ctermbg=Black guifg=White guibg=Black +hi def grubLightGray ctermfg=LightGray guifg=LightGray +hi def grubLightBlue ctermfg=LightBlue guifg=LightBlue +hi def grubLightGreen ctermfg=LightGreen guifg=LightGreen +hi def grubLightCyan ctermfg=LightCyan guifg=LightCyan +hi def grubLightRed ctermfg=LightRed guifg=LightRed +hi def grubLightMagenta ctermfg=LightMagenta guifg=LightMagenta +hi def grubDarkGray ctermfg=DarkGray guifg=DarkGray + +let b:current_syntax = "grub" + +let &cpo = s:cpo_save +unlet s:cpo_save + +endif diff --git a/syntax/help.vim b/syntax/help.vim new file mode 100644 index 00000000..aca620ee --- /dev/null +++ b/syntax/help.vim @@ -0,0 +1,225 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 + +" Vim syntax file +" Language: Vim help file +" Maintainer: Bram Moolenaar (Bram@vim.org) +" Last Change: 2020 Jul 28 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)" +syn match helpSectionDelim "^===.*===$" +syn match helpSectionDelim "^---.*--$" +if has("conceal") + syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" concealends +else + syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" +endif +if has("ebcdic") + syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" contains=helpBar + syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 contains=helpStar + syn match helpHyperTextEntry "\*[^"*|]\+\*$" contains=helpStar +else + syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" contains=helpBar + syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 contains=helpStar + syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" contains=helpStar +endif +if has("conceal") + syn match helpBar contained "|" conceal + syn match helpBacktick contained "`" conceal + syn match helpStar contained "\*" conceal +else + syn match helpBar contained "|" + syn match helpBacktick contained "`" + syn match helpStar contained "\*" +endif +syn match helpNormal "|.*====*|" +syn match helpNormal "|||" +syn match helpNormal ":|vim:|" " for :help modeline +syn match helpVim "\<Vim version [0-9][0-9.a-z]*" +syn match helpVim "VIM REFERENCE.*" +syn match helpOption "'[a-z]\{2,\}'" +syn match helpOption "'t_..'" +syn match helpCommand "`[^` \t]\+`"hs=s+1,he=e-1 contains=helpBacktick +syn match helpCommand "\(^\|[^a-z"[]\)\zs`[^`]\+`\ze\([^a-z\t."']\|$\)"hs=s+1,he=e-1 contains=helpBacktick +syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore +syn match helpGraphic ".* \ze`$" nextgroup=helpIgnore +if has("conceal") + syn match helpIgnore "." contained conceal +else + syn match helpIgnore "." contained +endif +syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: +syn keyword helpWarning WARNING WARNING: Warning: +syn keyword helpDeprecated DEPRECATED DEPRECATED: Deprecated: +syn match helpSpecial "\<N\>" +syn match helpSpecial "\<N\.$"me=e-1 +syn match helpSpecial "\<N\.\s"me=e-2 +syn match helpSpecial "(N\>"ms=s+1 + +syn match helpSpecial "\[N]" +" avoid highlighting N N in help.txt +syn match helpSpecial "N N"he=s+1 +syn match helpSpecial "Nth"me=e-2 +syn match helpSpecial "N-1"me=e-2 +syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" +syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 +syn match helpSpecial "<[-a-zA-Z0-9_]\+>" +syn match helpSpecial "<[SCM]-.>" +syn match helpNormal "<---*>" +syn match helpSpecial "\[range]" +syn match helpSpecial "\[line]" +syn match helpSpecial "\[count]" +syn match helpSpecial "\[offset]" +syn match helpSpecial "\[cmd]" +syn match helpSpecial "\[num]" +syn match helpSpecial "\[+num]" +syn match helpSpecial "\[-num]" +syn match helpSpecial "\[+cmd]" +syn match helpSpecial "\[++opt]" +syn match helpSpecial "\[arg]" +syn match helpSpecial "\[arguments]" +syn match helpSpecial "\[ident]" +syn match helpSpecial "\[addr]" +syn match helpSpecial "\[group]" +" Don't highlight [converted] and others that do not have a tag +syn match helpNormal "\[\(readonly\|fifo\|socket\|converted\|crypted\)]" + +syn match helpSpecial "CTRL-." +syn match helpSpecial "CTRL-SHIFT-." +syn match helpSpecial "CTRL-Break" +syn match helpSpecial "CTRL-PageUp" +syn match helpSpecial "CTRL-PageDown" +syn match helpSpecial "CTRL-Insert" +syn match helpSpecial "CTRL-Del" +syn match helpSpecial "CTRL-{char}" +syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump +syn match helpLeadBlank "^\s\+" contained + +" Highlight group items in their own color. +syn match helpComment "\t[* ]Comment\t\+[a-z].*" +syn match helpConstant "\t[* ]Constant\t\+[a-z].*" +syn match helpString "\t[* ]String\t\+[a-z].*" +syn match helpCharacter "\t[* ]Character\t\+[a-z].*" +syn match helpNumber "\t[* ]Number\t\+[a-z].*" +syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" +syn match helpFloat "\t[* ]Float\t\+[a-z].*" +syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" +syn match helpFunction "\t[* ]Function\t\+[a-z].*" +syn match helpStatement "\t[* ]Statement\t\+[a-z].*" +syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" +syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" +syn match helpLabel "\t[* ]Label\t\+[a-z].*" +syn match helpOperator "\t[* ]Operator\t\+["a-z].*" +syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" +syn match helpException "\t[* ]Exception\t\+[a-z].*" +syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" +syn match helpInclude "\t[* ]Include\t\+[a-z].*" +syn match helpDefine "\t[* ]Define\t\+[a-z].*" +syn match helpMacro "\t[* ]Macro\t\+[a-z].*" +syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" +syn match helpType "\t[* ]Type\t\+[a-z].*" +syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" +syn match helpStructure "\t[* ]Structure\t\+[a-z].*" +syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" +syn match helpSpecial "\t[* ]Special\t\+[a-z].*" +syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" +syn match helpTag "\t[* ]Tag\t\+[a-z].*" +syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" +syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" +syn match helpDebug "\t[* ]Debug\t\+[a-z].*" +syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" +syn match helpError "\t[* ]Error\t\+[a-z].*" +syn match helpTodo "\t[* ]Todo\t\+[a-z].*" + +syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]` + +" Additionally load a language-specific syntax file "help_ab.vim". +let s:i = match(expand("%"), '\.\a\ax$') +if s:i > 0 + exe "runtime syntax/help_" . strpart(expand("%"), s:i + 1, 2) . ".vim" +endif + +" Italian +if v:lang =~ '\<IT\>' || v:lang =~ '_IT\>' || v:lang =~? "italian" + syn keyword helpNote nota Nota NOTA nota: Nota: NOTA: notare Notare NOTARE notare: Notare: NOTARE: + syn match helpSpecial "Nma"me=e-2 + syn match helpSpecial "Nme"me=e-2 + syn match helpSpecial "Nmi"me=e-2 + syn match helpSpecial "Nmo"me=e-2 + syn match helpSpecial "\[interv.]" + syn region helpNotVi start="{non" start="{solo" start="{disponibile" end="}" contains=helpLeadBlank,helpHyperTextJump +endif + +syn sync minlines=40 + + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link helpIgnore Ignore +hi def link helpHyperTextJump Identifier +hi def link helpBar Ignore +hi def link helpBacktick Ignore +hi def link helpStar Ignore +hi def link helpHyperTextEntry String +hi def link helpHeadline Statement +hi def link helpHeader PreProc +hi def link helpSectionDelim PreProc +hi def link helpVim Identifier +hi def link helpCommand Comment +hi def link helpExample Comment +hi def link helpOption Type +hi def link helpNotVi Special +hi def link helpSpecial Special +hi def link helpNote Todo +hi def link helpWarning Todo +hi def link helpDeprecated Todo + +hi def link helpComment Comment +hi def link helpConstant Constant +hi def link helpString String +hi def link helpCharacter Character +hi def link helpNumber Number +hi def link helpBoolean Boolean +hi def link helpFloat Float +hi def link helpIdentifier Identifier +hi def link helpFunction Function +hi def link helpStatement Statement +hi def link helpConditional Conditional +hi def link helpRepeat Repeat +hi def link helpLabel Label +hi def link helpOperator Operator +hi def link helpKeyword Keyword +hi def link helpException Exception +hi def link helpPreProc PreProc +hi def link helpInclude Include +hi def link helpDefine Define +hi def link helpMacro Macro +hi def link helpPreCondit PreCondit +hi def link helpType Type +hi def link helpStorageClass StorageClass +hi def link helpStructure Structure +hi def link helpTypedef Typedef +hi def link helpSpecialChar SpecialChar +hi def link helpTag Tag +hi def link helpDelimiter Delimiter +hi def link helpSpecialComment SpecialComment +hi def link helpDebug Debug +hi def link helpUnderlined Underlined +hi def link helpError Error +hi def link helpTodo Todo +hi def link helpURL String + +let b:current_syntax = "help" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 sw=2 + +endif diff --git a/syntax/log.vim b/syntax/log.vim index 1fe7051e..6061cd58 100644 --- a/syntax/log.vim +++ b/syntax/log.vim @@ -45,8 +45,9 @@ syn region logString start=/'\(s \|t \| \w\)\@!/ end=/'/ end=/$/ end=/s / s syn match logDate '\d\{2,4}[-\/]\(\d\{2}\|Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)[-\/]\d\{2,4}T\?' " Matches 8 digit numbers at start of line starting with 20 syn match logDate '^20\d\{6}' -" Matches Fri Jan 09 or Feb 11 or Apr 3 -syn match logDate '\(\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \)\?\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\) [0-9 ]\d' +" Matches Fri Jan 09 or Feb 11 or Apr 3 or Sun 3 +syn keyword logDate Mon Tue Wed Thu Fri Sat Sun Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec nextgroup=logDateDay +syn match logDateDay '\s\{1,2}\d\{1,2}' contained " Matches 12:09:38 or 00:03:38.129Z or 01:32:12.102938 +0700 syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite @@ -114,6 +115,7 @@ hi def link logNull Constant hi def link logString String hi def link logDate Identifier +hi def link logDateDay Identifier hi def link logTime Function hi def link logTimeZone Identifier diff --git a/syntax/m4.vim b/syntax/m4.vim new file mode 100644 index 00000000..848dba3f --- /dev/null +++ b/syntax/m4.vim @@ -0,0 +1,64 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 + +" Vim syntax file +" Language: M4 +" Maintainer: Claudio Fleiner (claudio@fleiner.com) +" URL: http://www.fleiner.com/vim/syntax/m4.vim +" Last Change: 2005 Jan 15 + +" This file will highlight user function calls if they use only +" capital letters and have at least one argument (i.e. the '(' +" must be there). Let me know if this is a problem. + +" quit when a syntax file was already loaded +if !exists("main_syntax") + if exists("b:current_syntax") + finish + endif + " we define it here so that included files can test for it + let main_syntax='m4' +endif + +" define the m4 syntax +syn match m4Variable contained "\$\d\+" +syn match m4Special contained "$[@*#]" +syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors +syn match m4Constants "\<\(m4_\)\=__file__" +syn match m4Constants "\<\(m4_\)\=__line__" +syn keyword m4Constants divnum sysval m4_divnum m4_sysval +syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top +syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top +syn region m4Command matchgroup=m4Preproc start="\<\(m4_\)\=\(include\|sinclude\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4Statement start="\<\(m4_\)\=\(syscmd\|esyscmd\|ifdef\|ifelse\|indir\|builtin\|shift\|errprint\|m4exit\|changecom\|changequote\|changeword\|m4wrap\|debugfile\|divert\|undivert\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4builtin start="\<\(m4_\)\=\(len\|index\|regexp\|substr\|translit\|patsubst\|format\|incr\|decr\|eval\|maketemp\)("he=e-1 end=")" contains=@m4Top +syn keyword m4Statement divert undivert +syn region m4Command matchgroup=m4Type start="\<\(m4_\)\=\(undefine\|popdef\)("he=e-1 end=")" contains=@m4Top +syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top +syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors +syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link m4Delimiter Delimiter +hi def link m4Comment Comment +hi def link m4Function Function +hi def link m4Keyword Keyword +hi def link m4Special Special +hi def link m4String String +hi def link m4Statement Statement +hi def link m4Preproc PreProc +hi def link m4Type Type +hi def link m4Special Special +hi def link m4Variable Special +hi def link m4Constants Constant +hi def link m4Builtin Statement + +let b:current_syntax = "m4" + +if main_syntax == 'm4' + unlet main_syntax +endif + +" vim: ts=4 + +endif diff --git a/syntax/murphi.vim b/syntax/murphi.vim new file mode 100644 index 00000000..c6d16326 --- /dev/null +++ b/syntax/murphi.vim @@ -0,0 +1,130 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'murphi') == -1 + +" Vim syntax file +" Language: Murphi model checking language +" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com> +" Last Change: 2019 Aug 27 +" Version: 2 +" Remark: Originally authored by Diego Ongaro <ongaro@cs.stanford.edu> + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Keywords are case insensitive. +" Keep these in alphabetical order. +syntax case ignore +syn keyword murphiKeyword alias +syn keyword murphiStructure array +syn keyword murphiKeyword assert +syn keyword murphiKeyword begin +syn keyword murphiType boolean +syn keyword murphiKeyword by +syn keyword murphiLabel case +syn keyword murphiKeyword clear +syn keyword murphiLabel const +syn keyword murphiRepeat do +syn keyword murphiConditional else +syn keyword murphiConditional elsif +syn keyword murphiKeyword end +syn keyword murphiKeyword endalias +syn keyword murphiRepeat endexists +syn keyword murphiRepeat endfor +syn keyword murphiRepeat endforall +syn keyword murphiKeyword endfunction +syn keyword murphiConditional endif +syn keyword murphiKeyword endprocedure +syn keyword murphiStructure endrecord +syn keyword murphiKeyword endrule +syn keyword murphiKeyword endruleset +syn keyword murphiKeyword endstartstate +syn keyword murphiConditional endswitch +syn keyword murphiRepeat endwhile +syn keyword murphiStructure enum +syn keyword murphiKeyword error +syn keyword murphiRepeat exists +syn keyword murphiBoolean false +syn keyword murphiRepeat for +syn keyword murphiRepeat forall +syn keyword murphiKeyword function +syn keyword murphiConditional if +syn keyword murphiKeyword in +syn keyword murphiKeyword interleaved +syn keyword murphiLabel invariant +syn keyword murphiFunction ismember +syn keyword murphiFunction isundefined +syn keyword murphiKeyword log +syn keyword murphiStructure of +syn keyword murphiType multiset +syn keyword murphiFunction multisetadd +syn keyword murphiFunction multisetcount +syn keyword murphiFunction multisetremove +syn keyword murphiFunction multisetremovepred +syn keyword murphiKeyword procedure +syn keyword murphiKeyword program +syn keyword murphiKeyword put +syn keyword murphiStructure record +syn keyword murphiKeyword return +syn keyword murphiLabel rule +syn keyword murphiLabel ruleset +syn keyword murphiType scalarset +syn keyword murphiLabel startstate +syn keyword murphiConditional switch +syn keyword murphiConditional then +syn keyword murphiRepeat to +syn keyword murphiKeyword traceuntil +syn keyword murphiBoolean true +syn keyword murphiLabel type +syn keyword murphiKeyword undefine +syn keyword murphiStructure union +syn keyword murphiLabel var +syn keyword murphiRepeat while + +syn keyword murphiTodo contained todo xxx fixme +syntax case match + +" Integers. +syn match murphiNumber "\<\d\+\>" + +" Operators and special characters. +syn match murphiOperator "[\+\-\*\/%&|=!<>:\?]\|\." +syn match murphiDelimiter "\(:=\@!\|[;,]\)" +syn match murphiSpecial "[()\[\]]" + +" Double equal sign is a common error: use one equal sign for equality testing. +syn match murphiError "==[^>]"he=e-1 +" Double && and || are errors. +syn match murphiError "&&\|||" + +" Strings. This is defined so late so that it overrides previous matches. +syn region murphiString start=+"+ end=+"+ + +" Comments. This is defined so late so that it overrides previous matches. +syn region murphiComment start="--" end="$" contains=murphiTodo +syn region murphiComment start="/\*" end="\*/" contains=murphiTodo + +" Link the rules to some groups. +hi def link murphiComment Comment +hi def link murphiString String +hi def link murphiNumber Number +hi def link murphiBoolean Boolean +hi def link murphiIdentifier Identifier +hi def link murphiFunction Function +hi def link murphiStatement Statement +hi def link murphiConditional Conditional +hi def link murphiRepeat Repeat +hi def link murphiLabel Label +hi def link murphiOperator Operator +hi def link murphiKeyword Keyword +hi def link murphiType Type +hi def link murphiStructure Structure +hi def link murphiSpecial Special +hi def link murphiDelimiter Delimiter +hi def link murphiError Error +hi def link murphiTodo Todo + +let b:current_syntax = "murphi" + +endif diff --git a/syntax/ruby.vim b/syntax/ruby.vim index ec10fbbb..898f811e 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -333,7 +333,7 @@ SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([ syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable -syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl +syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration diff --git a/syntax/trasys.vim b/syntax/trasys.vim new file mode 100644 index 00000000..44abf3c4 --- /dev/null +++ b/syntax/trasys.vim @@ -0,0 +1,164 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'trasys') == -1 + +" Vim syntax file +" Language: TRASYS input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.inp +" URL: http://www.naglenet.org/vim/syntax/trasys.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +runtime! syntax/fortran.vim +unlet b:current_syntax + + +" Ignore case +syn case ignore + + + +" Define keywords for TRASYS +syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc +syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg +syn keyword trasysOptions user1 nnmin erplot + +syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn +syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx +syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf +syn keyword trasysSurface imagsf act active com shade bshade axmin +syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin +syn keyword trasysSurface thmax alpha emiss trani trans spri sprs +syn keyword trasysSurface refno posit com dupbcs dimensions +syn keyword trasysSurface dimension position prop surfn + +syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab +syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly + +syn keyword trasysSurfaceArgs ff di top bottom in out both no only + +syn keyword trasysArgs fig smn nodea zero only ir sol +syn keyword trasysArgs both wband stepn initl + +syn keyword trasysOperations orbgen build + +"syn keyword trasysSubRoutine call +syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas +syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata +syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient +syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin +syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata +syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq +syn keyword trasysSubRoutine qodata qoinit modar modpr modtr +syn keyword trasysSubRoutine modprs modshd moddat rstoff rston +syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1 +syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc +syn keyword trasysSubRoutine rornt rocstr romove flxdata title + +syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal +syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal +syn keyword trassyPrcsrSegm rkcal aqcal qocal + + + +" Define matches for TRASYS +syn match trasysOptions "list source" +syn match trasysOptions "save source" +syn match trasysOptions "no print" + +"syn match trasysSurface "^K *.* [^$]" +"syn match trasysSurface "^D *[0-9]*\.[0-9]\+" +"syn match trasysSurface "^I *.*[0-9]\+\.\=" +"syn match trasysSurface "^N *[0-9]\+" +"syn match trasysSurface "^M *[a-z[A-Z0-9]\+" +"syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*" +"syn match trasysSurface "^S *SURFN.*[0-9]" +syn match trasysSurface "P[0-9]* *="he=e-1 + +syn match trasysIdentifier "^L "he=e-1 +syn match trasysIdentifier "^K "he=e-1 +syn match trasysIdentifier "^D "he=e-1 +syn match trasysIdentifier "^I "he=e-1 +syn match trasysIdentifier "^N "he=e-1 +syn match trasysIdentifier "^M "he=e-1 +syn match trasysIdentifier "^B[C][S]" +syn match trasysIdentifier "^S "he=e-1 + +syn match trasysComment "^C.*$" +syn match trasysComment "^R.*$" +syn match trasysComment "\$.*$" + +syn match trasysHeader "^header[^,]*" + +syn match trasysMacro "^FAC" + +syn match trasysInteger "-\=\<[0-9]*\>" +syn match trasysFloat "-\=\<[0-9]*\.[0-9]*" +syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match trasysBlank "' \+'"hs=s+1,he=e-1 + +syn match trasysEndData "^END OF DATA" + +if exists("thermal_todo") + execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match trasysTodo "^?.*$" +endif + + + +" Define regions for TRASYS +syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*" + + + +" Define synchronizing patterns for TRASYS +syn sync maxlines=500 +syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" + + + +" Define the default highlighting +" Only when an item doesn't have highlighting yet + +hi def link trasysOptions Special +hi def link trasysSurface Special +hi def link trasysSurfaceType Constant +hi def link trasysSurfaceArgs Constant +hi def link trasysArgs Constant +hi def link trasysOperations Statement +hi def link trasysSubRoutine Statement +hi def link trassyPrcsrSegm PreProc +hi def link trasysIdentifier Identifier +hi def link trasysComment Comment +hi def link trasysHeader Typedef +hi def link trasysMacro Macro +hi def link trasysInteger Number +hi def link trasysFloat Float +hi def link trasysScientific Float + +hi def link trasysBlank SpecialChar + +hi def link trasysEndData Macro + +hi def link trasysTodo Todo + + + +let b:current_syntax = "trasys" + +" vim: ts=8 sw=2 + +endif diff --git a/syntax/vmasm.vim b/syntax/vmasm.vim new file mode 100644 index 00000000..2581e88c --- /dev/null +++ b/syntax/vmasm.vim @@ -0,0 +1,242 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vmasm') == -1 + +" Vim syntax file +" Language: (VAX) Macro Assembly +" Maintainer: Tom Uijldert <tom.uijldert [at] cmg.nl> +" Last change: 2004 May 16 +" +" This is incomplete. Feel free to contribute... +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" Partial list of register symbols +syn keyword vmasmReg r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 +syn keyword vmasmReg ap fp sp pc iv dv + +" All matches - order is important! +syn keyword vmasmOpcode adawi adwc ashl ashq bitb bitw bitl decb decw decl +syn keyword vmasmOpcode ediv emul incb incw incl mcomb mcomw mcoml +syn keyword vmasmOpcode movzbw movzbl movzwl popl pushl rotl sbwc +syn keyword vmasmOpcode cmpv cmpzv cmpc3 cmpc5 locc matchc movc3 movc5 +syn keyword vmasmOpcode movtc movtuc scanc skpc spanc crc extv extzv +syn keyword vmasmOpcode ffc ffs insv aobleq aoblss bbc bbs bbcci bbssi +syn keyword vmasmOpcode blbc blbs brb brw bsbb bsbw caseb casew casel +syn keyword vmasmOpcode jmp jsb rsb sobgeq sobgtr callg calls ret +syn keyword vmasmOpcode bicpsw bispsw bpt halt index movpsl nop popr pushr xfc +syn keyword vmasmOpcode insqhi insqti insque remqhi remqti remque +syn keyword vmasmOpcode addp4 addp6 ashp cmpp3 cmpp4 cvtpl cvtlp cvtps cvtpt +syn keyword vmasmOpcode cvtsp cvttp divp movp mulp subp4 subp6 editpc +syn keyword vmasmOpcode prober probew rei ldpctx svpctx mfpr mtpr bugw bugl +syn keyword vmasmOpcode vldl vldq vgathl vgathq vstl vstq vscatl vscatq +syn keyword vmasmOpcode vvcvt iota mfvp mtvp vsync +syn keyword vmasmOpcode beql[u] bgtr[u] blss[u] +syn match vmasmOpcode "\<add[bwlfdgh][23]\>" +syn match vmasmOpcode "\<bi[cs][bwl][23]\>" +syn match vmasmOpcode "\<clr[bwlqofdgh]\>" +syn match vmasmOpcode "\<cmp[bwlfdgh]\>" +syn match vmasmOpcode "\<cvt[bwlfdgh][bwlfdgh]\>" +syn match vmasmOpcode "\<cvtr[fdgh]l\>" +syn match vmasmOpcode "\<div[bwlfdgh][23]\>" +syn match vmasmOpcode "\<emod[fdgh]\>" +syn match vmasmOpcode "\<mneg[bwlfdgh]\>" +syn match vmasmOpcode "\<mov[bwlqofdgh]\>" +syn match vmasmOpcode "\<mul[bwlfdgh][23]\>" +syn match vmasmOpcode "\<poly[fdgh]\>" +syn match vmasmOpcode "\<sub[bwlfdgh][23]\>" +syn match vmasmOpcode "\<tst[bwlfdgh]\>" +syn match vmasmOpcode "\<xor[bwl][23]\>" +syn match vmasmOpcode "\<mova[bwlfqdgho]\>" +syn match vmasmOpcode "\<push[bwlfqdgho]\>" +syn match vmasmOpcode "\<acb[bwlfgdh]\>" +syn match vmasmOpcode "\<b[lng]equ\=\>" +syn match vmasmOpcode "\<b[cv][cs]\>" +syn match vmasmOpcode "\<bb[cs][cs]\>" +syn match vmasmOpcode "\<v[vs]add[lfdg]\>" +syn match vmasmOpcode "\<v[vs]cmp[lfdg]\>" +syn match vmasmOpcode "\<v[vs]div[fdg]\>" +syn match vmasmOpcode "\<v[vs]mul[lfdg]\>" +syn match vmasmOpcode "\<v[vs]sub[lfdg]\>" +syn match vmasmOpcode "\<v[vs]bi[cs]l\>" +syn match vmasmOpcode "\<v[vs]xorl\>" +syn match vmasmOpcode "\<v[vs]merge\>" +syn match vmasmOpcode "\<v[vs]s[rl]ll\>" + +" Various number formats +syn match vmasmdecNumber "[+-]\=[0-9]\+\>" +syn match vmasmdecNumber "^d[0-9]\+\>" +syn match vmasmhexNumber "^x[0-9a-f]\+\>" +syn match vmasmoctNumber "^o[0-7]\+\>" +syn match vmasmbinNumber "^b[01]\+\>" +syn match vmasmfloatNumber "[-+]\=[0-9]\+E[-+]\=[0-9]\+" +syn match vmasmfloatNumber "[-+]\=[0-9]\+\.[0-9]*\(E[-+]\=[0-9]\+\)\=" + +" Valid labels +syn match vmasmLabel "^[a-z_$.][a-z0-9_$.]\{,30}::\=" +syn match vmasmLabel "\<[0-9]\{1,5}\$:\=" " Local label + +" Character string constants +" Too complex really. Could be "<...>" but those could also be +" expressions. Don't know how to handle chosen delimiters +" ("^<sep>...<sep>") +" syn region vmasmString start="<" end=">" oneline + +" Operators +syn match vmasmOperator "[-+*/@&!\\]" +syn match vmasmOperator "=" +syn match vmasmOperator "==" " Global assignment +syn match vmasmOperator "%length(.*)" +syn match vmasmOperator "%locate(.*)" +syn match vmasmOperator "%extract(.*)" +syn match vmasmOperator "^[amfc]" +syn match vmasmOperator "[bwlg]^" + +syn match vmasmOperator "\<\(not_\)\=equal\>" +syn match vmasmOperator "\<less_equal\>" +syn match vmasmOperator "\<greater\(_equal\)\=\>" +syn match vmasmOperator "\<less_than\>" +syn match vmasmOperator "\<\(not_\)\=defined\>" +syn match vmasmOperator "\<\(not_\)\=blank\>" +syn match vmasmOperator "\<identical\>" +syn match vmasmOperator "\<different\>" +syn match vmasmOperator "\<eq\>" +syn match vmasmOperator "\<[gl]t\>" +syn match vmasmOperator "\<n\=df\>" +syn match vmasmOperator "\<n\=b\>" +syn match vmasmOperator "\<idn\>" +syn match vmasmOperator "\<[nlg]e\>" +syn match vmasmOperator "\<dif\>" + +" Special items for comments +syn keyword vmasmTodo contained todo + +" Comments +syn match vmasmComment ";.*" contains=vmasmTodo + +" Include +syn match vmasmInclude "\.library\>" + +" Macro definition +syn match vmasmMacro "\.macro\>" +syn match vmasmMacro "\.mexit\>" +syn match vmasmMacro "\.endm\>" +syn match vmasmMacro "\.mcall\>" +syn match vmasmMacro "\.mdelete\>" + +" Conditional assembly +syn match vmasmPreCond "\.iff\=\>" +syn match vmasmPreCond "\.if_false\>" +syn match vmasmPreCond "\.iftf\=\>" +syn match vmasmPreCond "\.if_true\(_false\)\=\>" +syn match vmasmPreCond "\.iif\>" + +" Loop control +syn match vmasmRepeat "\.irpc\=\>" +syn match vmasmRepeat "\.repeat\>" +syn match vmasmRepeat "\.rept\>" +syn match vmasmRepeat "\.endr\>" + +" Directives +syn match vmasmDirective "\.address\>" +syn match vmasmDirective "\.align\>" +syn match vmasmDirective "\.asci[cdiz]\>" +syn match vmasmDirective "\.blk[abdfghloqw]\>" +syn match vmasmDirective "\.\(signed_\)\=byte\>" +syn match vmasmDirective "\.\(no\)\=cross\>" +syn match vmasmDirective "\.debug\>" +syn match vmasmDirective "\.default displacement\>" +syn match vmasmDirective "\.[dfgh]_floating\>" +syn match vmasmDirective "\.disable\>" +syn match vmasmDirective "\.double\>" +syn match vmasmDirective "\.dsabl\>" +syn match vmasmDirective "\.enable\=\>" +syn match vmasmDirective "\.endc\=\>" +syn match vmasmDirective "\.entry\>" +syn match vmasmDirective "\.error\>" +syn match vmasmDirective "\.even\>" +syn match vmasmDirective "\.external\>" +syn match vmasmDirective "\.extrn\>" +syn match vmasmDirective "\.float\>" +syn match vmasmDirective "\.globa\=l\>" +syn match vmasmDirective "\.ident\>" +syn match vmasmDirective "\.link\>" +syn match vmasmDirective "\.list\>" +syn match vmasmDirective "\.long\>" +syn match vmasmDirective "\.mask\>" +syn match vmasmDirective "\.narg\>" +syn match vmasmDirective "\.nchr\>" +syn match vmasmDirective "\.nlist\>" +syn match vmasmDirective "\.ntype\>" +syn match vmasmDirective "\.octa\>" +syn match vmasmDirective "\.odd\>" +syn match vmasmDirective "\.opdef\>" +syn match vmasmDirective "\.packed\>" +syn match vmasmDirective "\.page\>" +syn match vmasmDirective "\.print\>" +syn match vmasmDirective "\.psect\>" +syn match vmasmDirective "\.quad\>" +syn match vmasmDirective "\.ref[1248]\>" +syn match vmasmDirective "\.ref16\>" +syn match vmasmDirective "\.restore\(_psect\)\=\>" +syn match vmasmDirective "\.save\(_psect\)\=\>" +syn match vmasmDirective "\.sbttl\>" +syn match vmasmDirective "\.\(no\)\=show\>" +syn match vmasmDirective "\.\(sub\)\=title\>" +syn match vmasmDirective "\.transfer\>" +syn match vmasmDirective "\.warn\>" +syn match vmasmDirective "\.weak\>" +syn match vmasmDirective "\.\(signed_\)\=word\>" + +syn case match + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" Comment Constant Error Identifier PreProc Special Statement Todo Type +" +" Constant Boolean Character Number String +" Identifier Function +" PreProc Define Include Macro PreCondit +" Special Debug Delimiter SpecialChar SpecialComment Tag +" Statement Conditional Exception Keyword Label Operator Repeat +" Type StorageClass Structure Typedef + +hi def link vmasmComment Comment +hi def link vmasmTodo Todo + +hi def link vmasmhexNumber Number " Constant +hi def link vmasmoctNumber Number " Constant +hi def link vmasmbinNumber Number " Constant +hi def link vmasmdecNumber Number " Constant +hi def link vmasmfloatNumber Number " Constant + +" hi def link vmasmString String " Constant + +hi def link vmasmReg Identifier +hi def link vmasmOperator Identifier + +hi def link vmasmInclude Include " PreProc +hi def link vmasmMacro Macro " PreProc +" hi def link vmasmMacroParam Keyword " Statement + +hi def link vmasmDirective Special +hi def link vmasmPreCond Special + + +hi def link vmasmOpcode Statement +hi def link vmasmCond Conditional " Statement +hi def link vmasmRepeat Repeat " Statement + +hi def link vmasmLabel Type + +let b:current_syntax = "vmasm" + +" vim: ts=8 sw=2 + +endif |