diff --git a/.github/ISSUE_TEMPLATE/add-language.md b/.github/ISSUE_TEMPLATE/add-language.md index 1ef312577..1b9755e81 100644 --- a/.github/ISSUE_TEMPLATE/add-language.md +++ b/.github/ISSUE_TEMPLATE/add-language.md @@ -2,17 +2,23 @@ name: Add language about: Add support for new language title: '' -labels: '' +labels: 'enhancement' assignees: '' --- - +**What is the name of this language in Linguist?** + + + +**Link to GitHub repository of Vim plugin** -**GitHub repository url** **Is this plugin well maintained?** + **Is this plugin lightweight? (no advanced functionality, just indent and syntax support)** + + diff --git a/.github/ISSUE_TEMPLATE/add-support-for-language.md b/.github/ISSUE_TEMPLATE/add-support-for-language.md deleted file mode 100644 index f6317060b..000000000 --- a/.github/ISSUE_TEMPLATE/add-support-for-language.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Add support for language -about: '' -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug-report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug-report.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9005acb4..2e31e4044 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: run: | sudo add-apt-repository ppa:jonathonf/vim -y sudo apt-get update -q - sudo apt-get install -y vim + sudo apt-get install -y vim expect vim --version - uses: actions/checkout@v2 - name: Run Tests diff --git a/Makefile b/Makefile index 9e9ec579f..8cd6d2aa1 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ -.PHONY: all test dev +.PHONY: build test dev -all: +build: @ 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' + @ find scripts autoload/polyglot ftdetect tests . -type f -maxdepth 1 | DEV=1 entr bash -c 'make' diff --git a/README.md b/README.md index 7424431cc..5ae00fe5e 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,32 @@ ![vim-polyglot](https://i.imgur.com/9RxQK6k.png) -![build](https://github.com/sheerun/vim-polyglot/workflows/Vim%20Polyglot%20CI/badge.svg) [![Maintenance](https://img.shields.io/maintenance/yes/2020.svg?maxAge=2592000)]() - 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 190 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). -- No support for esoteric languages, only most popular ones (modern too, like `slim`). -- Each build is tested by automated vimrunner script on CI. See `spec` directory. +- It **installs and updates 120+ times faster** than the 598 packages it consists of. +- It is also more secure (scripts loaded for every filetype are generated by vim-polyglot) +- Best syntax and indentation support (no other features). Hand-selected language packs. +- Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled) -\*To be completely honest, optimized `ftdetect` script takes around `19ms` to load. +\*To be completely honest, optimized `ftdetect` script takes around `10ms` to load. ## Installation 1. Install [Pathogen](https://github.com/tpope/vim-pathogen), [Vundle](https://github.com/VundleVim/Vundle.vim), [NeoBundle](https://github.com/Shougo/neobundle.vim), or [Plug](https://github.com/junegunn/vim-plug) package manager for Vim. 2. Use this repository as submodule or package. -For example when using [Plug](https://github.com/junegunn/vim-plug): +For example when using [Plug](https://github.com/junegunn/vim-plug) (which I recommend): + +```vim +set nocompatible + +call plug#begin() -``` Plug 'sheerun/vim-polyglot' + +call plug#end() ``` Optionally download one of the [releases](https://github.com/sheerun/vim-polyglot/releases) and unpack it directly under `~/.vim` directory. @@ -32,207 +34,178 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo You can also use Vim 8 built-in package manager: ``` -mkdir -p ~/.vim/pack/default/start -git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/default/start/vim-polyglot +git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/start/vim-polyglot ``` -NOTE: Not all features of individual language packs are available. We strip them from functionality slowing vim startup (for example we ignore `plugins` folder that is loaded regardless of file type, instead we prefer `ftplugin` which is loaded lazily). - -If you need full functionality of any plugin, please use it directly with your plugin manager. - ## Language packs +On top of all language packs from [vim repository](https://github.com/vim/vim/tree/master/runtime/syntax), vim-polyglot includes: + -- [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) +- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (Syntax highlighting for asl and dsl files) - [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) +- [apiblueprint](https://github.com/kylef/apiblueprint.vim) (API Blueprint syntax highlighting for apib files) +- [applescript](https://github.com/mityu/vim-applescript) (AppleScript syntax highlighting for applescript and scpt files) +- [arduino](https://github.com/sudar/vim-arduino-syntax) (Processing syntax highlighting for pde and ino files) +- [asciidoc](https://github.com/asciidoc/vim-asciidoc) (AsciiDoc syntax highlighting for asciidoc, adoc and asc files) +- [autohotkey](https://github.com/hnamikaw/vim-autohotkey) (AutoHotkey syntax highlighting for ahk and ahkl files) +- [bicep](https://github.com/carlsmedstad/vim-bicep) (Syntax highlighting for bicep files) +- [blade](https://github.com/jwalton512/vim-blade) (Blade syntax highlighting for blade and blade.php files) - [brewfile](https://github.com/bfontaine/Brewfile.vim) -- [c/c++](https://github.com/vim-jp/vim-cpp) +- [c/c++](https://github.com/vim-jp/vim-cpp) (C++ and C syntax highlighting for cpp, c++, cc, cp, cxx and 18 more files) - [caddyfile](https://github.com/isobit/vim-caddyfile) -- [carp](https://github.com/hellerve/carp-vim) +- [carp](https://github.com/hellerve/carp-vim) (Syntax highlighting for carp files) - [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) +- [clojure](https://github.com/clojure-vim/clojure.vim) (Clojure syntax highlighting for clj, bb, boot, cl2, cljc and 6 more files) +- [cmake](https://github.com/pboettch/vim-cmake-syntax) (CMake syntax highlighting for cmake and cmake.in files) +- [coffee-script](https://github.com/kchmck/vim-coffee-script) (CoffeeScript and Literate CoffeeScript syntax highlighting for coffee, cake, cjsx, iced, coffeekup, cson, litcoffee and coffee.md files) +- [cpp-modern](https://github.com/bfrg/vim-cpp-modern) +- [cql](https://github.com/elubow/cql-vim) (Syntax highlighting for cql files) +- [cryptol](https://github.com/victoredwardocallaghan/cryptol.vim) (Syntax highlighting for cry, cyl, lcry and lcyl files) +- [crystal](https://github.com/rhysd/vim-crystal) (Crystal and HTML+ECR syntax highlighting for cr and ecr files) +- [csv](https://github.com/chrisbra/csv.vim) (CSV syntax highlighting for csv, tsv and tab files) +- [cucumber](https://github.com/tpope/vim-cucumber) (Gherkin syntax highlighting for feature and story files) +- [cue](https://github.com/mgrabovsky/vim-cuesheet) (Syntax highlighting for cue files) +- [dart](https://github.com/dart-lang/dart-vim-plugin) (Dart syntax highlighting for dart and drt files) +- [dhall](https://github.com/vmchale/dhall-vim) (Dhall syntax highlighting for dhall files) +- [dlang](https://github.com/JesseKPhillips/d.vim) (D syntax highlighting for d, di, lst, dd, ddoc and sdl files) +- [docker-compose](https://github.com/ekalinin/Dockerfile.vim) +- [elixir](https://github.com/elixir-lang/vim-elixir) (Elixir and HTML+EEX syntax highlighting for ex, exs, eex, html.heex, html.leex and leex files) +- [elm](https://github.com/andys8/vim-elm-syntax) (Elm syntax highlighting for elm files) +- [emberscript](https://github.com/yalesov/vim-ember-script) (EmberScript syntax highlighting for em and emberscript files) +- [emblem](https://github.com/yalesov/vim-emblem) (Syntax highlighting for emblem and em files) +- [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (Erlang syntax highlighting for erl, app.src, es, escript, hrl, xrl, yrl, app and yaws files) +- [fennel](https://github.com/bakpakin/fennel.vim) (Syntax highlighting for fnl files) +- [ferm](https://github.com/vim-scripts/ferm.vim) (Syntax highlighting for ferm files) +- [fish](https://github.com/blankname/vim-fish) (fish syntax highlighting for fish files) +- [flatbuffers](https://github.com/dcharbon/vim-flatbuffers) (Syntax highlighting for fbs files) +- [fsharp](https://github.com/ionide/Ionide-vim) (F# syntax highlighting for fs, fsi and fsx files) +- [git](https://github.com/tpope/vim-git) (Git Config syntax highlighting for gitconfig files) +- [gitignore](https://github.com/SirJson/fzf-gitignore) +- [gleam](https://github.com/gleam-lang/gleam.vim) (Syntax highlighting for gleam files) +- [glsl](https://github.com/tikhomirov/vim-glsl) (GLSL syntax highlighting for glsl, fp, frag, frg, fs and 18 more files) +- [gmpl](https://github.com/maelvalais/gmpl.vim) (Syntax highlighting for mod files) +- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (Gnuplot syntax highlighting for gp, gnu, gnuplot, p, plot, plt and gpi files) +- [go](https://github.com/fatih/vim-go) (Go syntax highlighting for go and tmpl files) - [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) +- [graphql](https://github.com/jparise/vim-graphql) (GraphQL syntax highlighting for graphql, gql and graphqls files) +- [haml](https://github.com/tpope/vim-haml) (Haml syntax highlighting for haml, haml.deface, hamlc and hamlbars files) +- [handlebars](https://github.com/mustache/vim-mustache-handlebars) (Mustache and Handlebars syntax highlighting for mustache, hogan, hulk, hjs, handlebars, hbs, hdbs and hb files) +- [haproxy](https://github.com/CH-DanReif/haproxy.vim) (HAProxy syntax highlighting) +- [haskell](https://github.com/neovimhaskell/haskell-vim) (Haskell syntax highlighting for hs, hs-boot, hsc, bpk and hsig files) +- [haxe](https://github.com/jdonaldson/vaxe) (Haxe and HXML syntax highlighting for hx, hxsl, hxml and hss files) - [helm](https://github.com/towolf/vim-helm) -- [help](https://github.com/vim/vim/tree/master/runtime) -- [hive](https://github.com/zebradil/hive.vim) +- [help](https://github.com/neovim/neovim/tree/master/runtime) +- [hive](https://github.com/zebradil/hive.vim) (HiveQL syntax highlighting for q, hql and ql files) +- [hjson](https://github.com/hjson/vim-hjson) (Syntax highlighting for hjson files) - [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) +- [icalendar](https://github.com/chutzpah/icalendar.vim) (Syntax highlighting for ics files) +- [idris2](https://github.com/edwinb/idris2-vim) (Syntax highlighting for idr, ipkg and lidr files) +- [idris](https://github.com/idris-hackers/idris-vim) (Idris syntax highlighting for idr and lidr files) +- [ion](https://github.com/vmchale/ion-vim) (Syntax highlighting for ion files) - [javascript-sql](https://github.com/statico/vim-javascript-sql) -- [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) +- [javascript](https://github.com/pangloss/vim-javascript) (JavaScript syntax highlighting for js, bones, cjs, es, es6 and 20 more files) +- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (Syntax highlighting for jenkinsfile and Jenkinsfile files) +- [jq](https://github.com/vito-c/jq.vim) (JSONiq syntax highlighting for jq files) +- [json5](https://github.com/GutenYe/json5.vim) (JSON5 syntax highlighting for json5 files) +- [json](https://github.com/elzr/vim-json) (JSON syntax highlighting for json, 4DForm, 4DProject, avsc, geojson and 15 more files) +- [jsonc](https://github.com/neoclide/jsonc.vim) (Syntax highlighting for cjson and jsonc files) +- [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files) +- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect, ejs.t and jst files) +- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files) +- [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files) +- [just](https://github.com/NoahTheDuke/vim-just) (Syntax highlighting for just files) +- [kotlin](https://github.com/udalov/kotlin-vim) (Kotlin syntax highlighting for kt, ktm and kts files) +- [ledger](https://github.com/ledger/vim-ledger) (Syntax highlighting for ldg, ledger and journal files) +- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond/tree/main) (LilyPond syntax highlighting for ly and ily files) +- [livescript](https://github.com/gkz/vim-ls) (LiveScript syntax highlighting for ls files) +- [llvm](https://github.com/rhysd/vim-llvm) (LLVM syntax highlighting for ll and td files) +- [log](https://github.com/MTDL9/vim-log-highlighting) (Syntax highlighting for log and LOG files) +- [lua](https://github.com/tbastos/vim-lua) (Lua syntax highlighting for lua, fcgi, nse, p8, rbxs, rockspec and wlua files) +- [mako](https://github.com/sophacles/vim-bundle-mako) (Mako syntax highlighting for mako and mao files) +- [markdown](https://github.com/plasticboy/vim-markdown) (Markdown syntax highlighting for md, livemd, markdown, mdown, mdwn and 6 more files) +- [mathematica](https://github.com/voldikss/vim-mma) (Mathematica syntax highlighting for mathematica, cdf, m, ma, mt and 6 more files) +- [mdx](https://github.com/jxnblk/vim-mdx-js) (Syntax highlighting for mdx files) +- [mermaid](https://github.com/mracos/mermaid.vim/tree/main) (Syntax highlighting for mermaid, mm and mmd files) +- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) (Meson syntax highlighting for wrap files) +- [mint](https://github.com/IrenejMarc/vim-mint) (Syntax highlighting for mint files) +- [moonscript](https://github.com/leafo/moonscript-vim) (MoonScript syntax highlighting for moon files) +- [nftables](https://github.com/nfnty/vim-nftables) (Syntax highlighting for nft files) +- [nginx](https://github.com/chr4/nginx.vim) (Nginx syntax highlighting for nginx, nginxconf and vhost files) +- [nim](https://github.com/zah/nim.vim) (Nim syntax highlighting for nim, nim.cfg, nimble, nimrod and nims files) +- [nix](https://github.com/LnL7/vim-nix) (Nix syntax highlighting for nix files) +- [objc](https://github.com/b4winckler/vim-objc) (Objective-C syntax highlighting for m and h files) +- [ocaml](https://github.com/rgrinberg/vim-ocaml) (OCaml syntax highlighting for ml, eliom, eliomi, ml4, mli and 13 more files) +- [octave](https://github.com/McSinyx/vim-octave) (Syntax highlighting for oct and m files) +- [odin](https://github.com/Tetralux/odin.vim) (Odin syntax highlighting for odin files) +- [opencl](https://github.com/petRUShka/vim-opencl) (OpenCL syntax highlighting for cl and opencl files) +- [openscad](https://github.com/sirtaj/vim-openscad) (Syntax highlighting for scad files) +- [org](https://github.com/axvr/org.vim) (Syntax highlighting for org files) +- [perl](https://github.com/vim-perl/vim-perl) (Perl syntax highlighting for pl, al, cgi, fcgi, perl and 12 more files) +- [pest](https://github.com/pest-parser/pest.vim) (Syntax highlighting for pest files) +- [pgsql](https://github.com/lifepillar/pgsql.vim) (PLpgSQL syntax highlighting for pgsql files) +- [php](https://github.com/StanAngeloff/php.vim) (PHP syntax highlighting for php, aw, ctp, fcgi, inc and 7 more files) +- [plantuml](https://github.com/aklt/plantuml-syntax) (PlantUML syntax highlighting for puml, iuml, plantuml, uml and pu files) +- [pony](https://github.com/jakwings/vim-pony) (Pony syntax highlighting for pony files) +- [powershell](https://github.com/PProvost/vim-ps1) (PowerShell syntax highlighting for ps1, psd1, psm1, pssc and ps1xml files) +- [protobuf](https://github.com/uarun/vim-protobuf) (Protocol Buffer syntax highlighting for proto files) +- [pug](https://github.com/digitaltoad/vim-pug) (Pug syntax highlighting for jade and pug files) +- [puppet](https://github.com/rodjek/vim-puppet) (Puppet syntax highlighting for pp and epp files) +- [purescript](https://github.com/purescript-contrib/purescript-vim) (PureScript syntax highlighting for purs files) - [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) +- [python](https://github.com/vim-python/python-syntax) (Python syntax highlighting for py, cgi, fcgi, gyp, gypi and 14 more files) +- [qmake](https://github.com/artoj/qmake-syntax-vim) (QMake syntax highlighting for pro and pri files) +- [qml](https://github.com/peterhoeg/vim-qml) (QML syntax highlighting for qml and qbs files) +- [r-lang](https://github.com/vim-scripts/R.vim) (R syntax highlighting for r, rsx, s, S and rd files) +- [racket](https://github.com/wlangstroth/vim-racket) (Racket syntax highlighting for rkt, rktd, rktl and scrbl files) +- [ragel](https://github.com/jneen/ragel.vim) (Ragel syntax highlighting for rl files) +- [raku](https://github.com/Raku/vim-raku) (Raku syntax highlighting for 6pl, 6pm, nqp, p6, p6l and 12 more files) +- [raml](https://github.com/IN3D/vim-raml) (RAML syntax highlighting for raml files) +- [razor](https://github.com/adamclerk/vim-razor) (HTML+Razor syntax highlighting for cshtml and razor files) +- [reason](https://github.com/reasonml-editor/vim-reason-plus) (Reason syntax highlighting for re and rei files) +- [requirements](https://github.com/raimon49/requirements.txt.vim) (Syntax highlighting for pip files) - [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) -- [stylus](https://github.com/wavded/vim-stylus) -- [svelte](https://github.com/evanleck/vim-svelte/tree/main) +- [rst](https://github.com/marshallward/vim-restructuredtext) (reStructuredText syntax highlighting for rst, rest, rest.txt and rst.txt files) +- [ruby](https://github.com/vim-ruby/vim-ruby) (Ruby and HTML+ERB syntax highlighting for rb, builder, eye, fcgi, gemspec and 26 more files) +- [rust](https://github.com/rust-lang/rust.vim) (Rust syntax highlighting for rs and rs.in files) +- [scala](https://github.com/derekwyatt/vim-scala) (Scala syntax highlighting for scala, kojo and sc files) +- [scss](https://github.com/cakebaker/scss-syntax.vim) (SCSS syntax highlighting for scss files) +- [sh](https://github.com/arzg/vim-sh) (Shell syntax highlighting for sh, bash, bats, cgi, command and 8 more files) +- [slim](https://github.com/slim-template/vim-slim) (Slim syntax highlighting for slim files) +- [slime](https://github.com/slime-lang/vim-slime-syntax) (Syntax highlighting for slime files) +- [smt2](https://github.com/bohlender/vim-smt2) (SMT syntax highlighting for smt2 and smt files) +- [solidity](https://github.com/TovarishFin/vim-solidity) (Solidity syntax highlighting for sol files) +- [stylus](https://github.com/wavded/vim-stylus) (Stylus syntax highlighting for styl and stylus files) +- [svelte](https://github.com/leafOfTree/vim-svelte-plugin) (Svelte syntax highlighting for svelte files) - [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) +- [svg](https://github.com/vim-scripts/svg.vim) (SVG syntax highlighting for svg files) +- [sway](https://github.com/jamespeapen/swayconfig.vim) (Syntax highlighting for swayconfig and sway.config files) +- [swift](https://github.com/keith/swift.vim) (Swift syntax highlighting for swift files) +- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (Syntax highlighting for sxhkdrc files) +- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (Syntax highlighting for automount, dnssd, link, mount, netdev and 9 more files) +- [terraform](https://github.com/hashivim/vim-terraform) (HCL syntax highlighting for tf, tfvars, hcl, nomad and workflow files) +- [textile](https://github.com/timcharper/textile.vim) (Textile syntax highlighting for textile files) +- [thrift](https://github.com/solarnz/thrift.vim) (Thrift syntax highlighting for thrift files) - [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) +- [toml](https://github.com/cespare/vim-toml/tree/main) (TOML syntax highlighting for toml files) +- [tptp](https://github.com/c-cube/vim-tptp) (Syntax highlighting for p, tptp and ax files) +- [twig](https://github.com/lumiliet/vim-twig) (Twig syntax highlighting for twig and xml.twig files) +- [typescript](https://github.com/HerringtonDarkholme/yats.vim) (TypeScript and TSX syntax highlighting for ts, cts, mts and tsx files) +- [unison](https://github.com/unisonweb/unison/tree/trunk/editor-support/vim) (Syntax highlighting for u and uu files) +- [v](https://github.com/ollykel/v-vim) (V syntax highlighting for v, vv and vsh files) +- [vala](https://github.com/arrufat/vala.vim) (Vala syntax highlighting for vala, vapi and valadoc files) +- [vbnet](https://github.com/vim-scripts/vbnet.vim) (Visual Basic .NET syntax highlighting for vb and vbhtml files) +- [vcl](https://github.com/smerrill/vcl-vim-plugin) (VCL syntax highlighting for vcl files) +- [velocity](https://github.com/lepture/vim-velocity) (Syntax highlighting for vm files) +- [vue](https://github.com/posva/vim-vue) (Vue syntax highlighting for vue and wpy files) +- [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (Syntax highlighting for xdc files) +- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axaml and 97 more files) +- [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files) +- [yard](https://github.com/noprompt/vim-yardoc) +- [zephir](https://github.com/xwsoul/vim-zephir) (Zephir syntax highlighting for zep files) +- [zig](https://github.com/ziglang/zig.vim) (Zig syntax highlighting for zir, zig and zir files) +- [zinit](https://github.com/zdharma-continuum/zinit-vim-syntax/tree/main) ## Updating @@ -241,23 +214,85 @@ You can either wait for new patch release with updates or run `make` by yourself ## Troubleshooting -Please make sure you have `syntax on` in your `.vimrc` (or use something like [sheerun/vimrc](https://github.com/sheerun/vimrc)) +Please make sure you have `set nocompatible` in your `.vimrc` (or use something like [sheerun/vimrc](https://github.com/sheerun/vimrc)) Individual language packs can be disabled by setting `g:polyglot_disabled` as follows: -```viml -let g:polyglot_disabled = ['css'] +**Please declare this variable before polyglot is loaded (at the top of .vimrc)** + +```vim +let g:polyglot_disabled = ['markdown'] ``` -*Please declare this variable before polyglot is loaded (at the top of .vimrc)* +The list of available languages to disable is shown above. + +If you wish to use filetype detection by Vim Polyglot but you'd like to use your own syntax-highlighting plugin, you can append `.plugin` to disabled entry, like below. Disabling Vim Polyglot filetype plugin won't disable native Vim filetype plugin. + +```vim +let g:polyglot_disabled = ['markdown.plugin'] +``` + +Please note that disabling a language won't make in your vim startup any faster / slower (only for specific this specific filetype). All plugins are lazily loaded only when they are really needed. + +## Autoindent + +Vim Polyglot tries to automatically detect indentation settings (just like vim-sleuth). If this feature is not working for you for some reason, please file an issue and disable it temporarily with: + +```vim +let g:polyglot_disabled = ['autoindent'] +``` -Please note that disabling a language won't make in your vim startup any faster / slower (only for specific this specific filetype). All plugins are loaded lazily, on demand. +## Reindent + +If you want to disable reindenting of the current line in insert mode (see vim 'indentkeys') you can turn it off with: + +```vim +autocmd BufEnter * set indentexpr= +``` + +This will not affect smart autoindenting when starting a new line. + + +## Default settings + +Vim Polyglot sets defaults of some settings that are relevant for good language support. You can disable them by: + + +```vim +let g:polyglot_disabled = ['sensible'] +``` + +These defaults include: +- Use utf-8 encoding by default +- Automatically reload file if changed somewhere else +- Disable existing swapfile warnings, instead just create multiple swapfiles +- Don't create swapfiles in current directory, instead in data directory +- Whitespace characters when using `:set list` +- Delete comment character when joining commented lines +- Search upwards for tags file(s) instead only locally +- Fix issues with fish shell +- Increase history size to 1000 items +- Allow for up to 50 opened tabs on Vim start. +- Reduce updatetime from 4000 to 300 to avoid issues with coc.nvim +- Always save upper case variables to viminfo file +- Don't save options in sessions and views +- Allow color schemes to do bright colors without forcing bold +- Load vim's built-in matchit plugin + +## No ftdetect + +If you want to use vim-polyglot plugins, but not ftdetect autocommands, the you can disable it as so: + + +```vim +let g:polyglot_disabled = ['ftdetect'] +``` ## Contributing Language packs are periodically updated using automated `scripts/build` script. -Feel free to add your language to `packages.yaml`, and send pull-request. Please don't run `make` and include that in your PR, send just changes to `packages.yaml` and build scripts if really necessary. You can run `make test` to run rough tests. +Feel free to add your language to `packages.yaml` + `heuristics.yaml`, and send pull-request. You can run `make test` to run rough tests. And `make dev` for easy development. ## License diff --git a/after/compiler/tex.vim b/after/compiler/tex.vim new file mode 100644 index 000000000..575c6684a --- /dev/null +++ b/after/compiler/tex.vim @@ -0,0 +1,71 @@ +if polyglot#init#is_disabled(expand(':p'), 'tex', 'after/compiler/tex.vim') + finish +endif + +" Vim compiler file +" Compiler: TeX +" Maintainer: Artem Chuprina +" Last Change: 2012 Apr 30 + +if exists("current_compiler") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +" If makefile exists and we are not asked to ignore it, we use standard make +" (do not redefine makeprg) +if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') || + \(!filereadable('Makefile') && !filereadable('makefile')) + " If buffer-local variable 'tex_flavor' exists, it defines TeX flavor, + " otherwise the same for global variable with same name, else it will be + " LaTeX + if exists("b:tex_flavor") + let current_compiler = b:tex_flavor + elseif exists("g:tex_flavor") + let current_compiler = g:tex_flavor + else + let current_compiler = "latex" + endif + let &l:makeprg=current_compiler.' -interaction=nonstopmode' +else + let current_compiler = 'make' +endif + +" Value errorformat are taken from vim help, see :help errorformat-LaTeX, with +" addition from Srinath Avadhanula +CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m, + \%E!\ %m, + \%+WLaTeX\ %.%#Warning:\ %.%#line\ %l%.%#, + \%+W%.%#\ at\ lines\ %l--%*\\d, + \%WLaTeX\ %.%#Warning:\ %m, + \%Cl.%l\ %m, + \%+C\ \ %m., + \%+C%.%#-%.%#, + \%+C%.%#[]%.%#, + \%+C[]%.%#, + \%+C%.%#%[{}\\]%.%#, + \%+C<%.%#>%.%#, + \%C\ \ %m, + \%-GSee\ the\ LaTeX%m, + \%-GType\ \ H\ %m, + \%-G\ ...%.%#, + \%-G%.%#\ (C)\ %.%#, + \%-G(see\ the\ transcript%.%#), + \%-G\\s%#, + \%+O(%*[^()])%r, + \%+O%*[^()](%*[^()])%r, + \%+P(%f%r, + \%+P\ %\\=(%f%r, + \%+P%*[^()](%f%r, + \%+P[%\\d%[^()]%#(%f%r, + \%+Q)%r, + \%+Q%*[^()])%r, + \%+Q[%\\d%*[^()])%r + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/after/ftplugin/cabal.vim b/after/ftplugin/cabal.vim index 8009502d3..c81fedb68 100644 --- a/after/ftplugin/cabal.vim +++ b/after/ftplugin/cabal.vim @@ -1,7 +1,7 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haskell', 'after/ftplugin/cabal.vim') + finish +endif setlocal comments=s1fl:{-,mb:-,ex:-},:-- setlocal iskeyword+=-,.,* setlocal commentstring=--\ %s - -endif diff --git a/after/ftplugin/coffee.vim b/after/ftplugin/coffee.vim index 27c00bcb4..528fbeaa6 100644 --- a/after/ftplugin/coffee.vim +++ b/after/ftplugin/coffee.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cjsx', 'after/ftplugin/coffee.vim') + finish +endif if exists("loaded_matchit") let b:match_ignorecase = 0 let b:match_words = '(:),\[:\],{:},<:>,' . \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' endif - -endif diff --git a/after/ftplugin/haskell.vim b/after/ftplugin/haskell.vim index a617329c1..21cf26901 100644 --- a/after/ftplugin/haskell.vim +++ b/after/ftplugin/haskell.vim @@ -1,6 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haskell', 'after/ftplugin/haskell.vim') + finish +endif setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:-- setlocal iskeyword+=' - -endif diff --git a/after/ftplugin/idris.vim b/after/ftplugin/idris.vim index 6c6815d56..f10e518c2 100644 --- a/after/ftplugin/idris.vim +++ b/after/ftplugin/idris.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 +if polyglot#init#is_disabled(expand(':p'), 'idris', 'after/ftplugin/idris.vim') + finish +endif setlocal iskeyword+=' - -endif diff --git a/after/ftplugin/idris2.vim b/after/ftplugin/idris2.vim new file mode 100644 index 000000000..466101e7d --- /dev/null +++ b/after/ftplugin/idris2.vim @@ -0,0 +1,5 @@ +if polyglot#init#is_disabled(expand(':p'), 'idris2', 'after/ftplugin/idris2.vim') + finish +endif + +setlocal iskeyword+=' diff --git a/after/ftplugin/javascript-1.vim b/after/ftplugin/javascript-1.vim new file mode 100644 index 000000000..5d6f0d0c9 --- /dev/null +++ b/after/ftplugin/javascript-1.vim @@ -0,0 +1,16 @@ +if polyglot#init#is_disabled(expand(':p'), 'javascript', 'after/ftplugin/javascript.vim') + finish +endif + +" Vim filetype plugin file +" Language: JavaScript +" Maintainer: vim-javascript community +" URL: https://github.com/pangloss/vim-javascript + +setlocal iskeyword+=$ suffixesadd+=.js + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= ' | setlocal iskeyword< suffixesadd<' +else + let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<' +endif diff --git a/after/ftplugin/javascript-2.vim b/after/ftplugin/javascript-2.vim new file mode 100644 index 000000000..9abbda2f1 --- /dev/null +++ b/after/ftplugin/javascript-2.vim @@ -0,0 +1,9 @@ +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/ftplugin/javascript-2.vim') + finish +endif + +if get(g:, 'vim_jsx_pretty_disable_js', 0) + finish +endif + +source :h/jsx.vim diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim index a590e11d5..e3d355fcb 100644 --- a/after/ftplugin/javascript.vim +++ b/after/ftplugin/javascript.vim @@ -1,51 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 - -" Vim filetype plugin file -" Language: JavaScript -" Maintainer: vim-javascript community -" URL: https://github.com/pangloss/vim-javascript - -setlocal iskeyword+=$ suffixesadd+=.js - -if exists('b:undo_ftplugin') - let b:undo_ftplugin .= ' | setlocal iskeyword< suffixesadd<' -else - let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<' -endif - -endif -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Vim ftplugin file -" -" Language: javascript.jsx -" Maintainer: MaxMEllon -" -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -" modified from html.vim -" For matchit plugin -if exists("loaded_matchit") - let b:match_ignorecase = 0 - let b:match_words = '(:),\[:\],{:},<:>,' . - \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' -endif - -" For andymass/vim-matchup plugin -if exists("loaded_matchup") - setlocal matchpairs=(:),{:},[:],<:> - let b:match_words = '<\@<=\([^/][^ \t>]*\)\g{hlend}[^>]*\%(/\@\|$\):<\@<=/\1>' - let b:match_skip = 's:comment\|string' -endif - -let b:jsx_pretty_old_cms = &l:commentstring - -augroup jsx_comment - autocmd! CursorMoved - autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:jsx_pretty_old_cms) -augroup end - -setlocal suffixesadd+=.jsx - -endif +" Polyglot metafile +source :h/javascript-1.vim +source :h/javascript-2.vim diff --git a/after/ftplugin/javascriptreact.vim b/after/ftplugin/javascriptreact.vim index ab847072d..494e6d6ed 100644 --- a/after/ftplugin/javascriptreact.vim +++ b/after/ftplugin/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -source :h/javascript.vim - +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/ftplugin/javascriptreact.vim') + finish endif + +source :h/jsx.vim diff --git a/after/ftplugin/jsx.vim b/after/ftplugin/jsx.vim new file mode 100644 index 000000000..d3bd2a8dd --- /dev/null +++ b/after/ftplugin/jsx.vim @@ -0,0 +1,35 @@ +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/ftplugin/jsx.vim') + finish +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vim ftplugin file +" +" Language: javascript.jsx +" Maintainer: MaxMEllon +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" modified from html.vim +" For matchit plugin +if exists("loaded_matchit") + let b:match_ignorecase = 0 + let b:match_words = '(:),\[:\],{:},<:>,' . + \ '<\@<=\([A-z0-9.]\+\):\( + let b:match_words = '<\@<=\([^/][^ \t>]*\)\g{hlend}[^>]*\%(/\@\|$\):<\@<=/\1>' + let b:match_skip = 's:comment\|string' +endif + +let b:jsx_pretty_old_cms = &l:commentstring + +augroup jsx_comment + autocmd! CursorMoved + autocmd CursorMoved call jsx_pretty#comment#update_commentstring(b:jsx_pretty_old_cms) +augroup end + +setlocal suffixesadd+=.jsx diff --git a/after/ftplugin/just.vim b/after/ftplugin/just.vim new file mode 100644 index 000000000..7b7fdcd3e --- /dev/null +++ b/after/ftplugin/just.vim @@ -0,0 +1,11 @@ +if polyglot#init#is_disabled(expand(':p'), 'just', 'after/ftplugin/just.vim') + finish +endif + +" Vim ftplugin file +" Language: Justfile +" Maintainer: Noah Bogart +" URL: https://github.com/NoahTheDuke/vim-just.git +" Last Change: 2021 May 19 + +setlocal iskeyword+=- diff --git a/after/ftplugin/llvm.vim b/after/ftplugin/llvm.vim index fbd4b7fff..79fbac357 100644 --- a/after/ftplugin/llvm.vim +++ b/after/ftplugin/llvm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 +if polyglot#init#is_disabled(expand(':p'), 'llvm', 'after/ftplugin/llvm.vim') + finish +endif " Copyright (c) 2018 rhysd " @@ -327,7 +329,7 @@ function! s:extract_identifier(word) abort return '' endif - if a:word[1] == '"' + if a:word[1] ==# '"' let idx = stridx(a:word, '"', 2) if idx == -1 return '' @@ -341,7 +343,7 @@ function! s:extract_identifier(word) abort endif if prefix ==# '#' - return matchstr(a:word, '^#\d\+') + return matchstr(a:word, '^#\d\+\>') endif return '' @@ -476,12 +478,16 @@ function! s:run_lli(...) abort let tmpfile = tempname() call writefile(getline(1, '$'), tmpfile) let Cleanup = {ch -> filereadable(tmpfile) ? delete(tmpfile) : 0} - let bufnr = term_start([g:llvm_ext_lli_executable, tmpfile], {'close_cb': Cleanup, 'exit_cb': Cleanup}) - echo 'Run lli in termnal buffer(' . bufnr . ')' + try + let bufnr = term_start([g:llvm_ext_lli_executable, tmpfile], {'close_cb': Cleanup, 'exit_cb': Cleanup}) + echo 'Run lli in termnal buffer(' . bufnr . ')' + catch + if filereadable(tmpfile) + delete(tmpfile) + endif + endtry endfunction if !exists(':LLI') command! -buffer -nargs=? -bar -complete=file LLI call run_lli() endif - -endif diff --git a/after/ftplugin/puppet.vim b/after/ftplugin/puppet.vim index 6ddb64e04..e530bff4b 100644 --- a/after/ftplugin/puppet.vim +++ b/after/ftplugin/puppet.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'after/ftplugin/puppet.vim') + finish +endif if !exists('g:puppet_align_hashes') let g:puppet_align_hashes = 1 @@ -7,5 +9,3 @@ endif if g:puppet_align_hashes inoremap => =>:call puppet#align#AlignHashrockets()$a endif - -endif diff --git a/after/ftplugin/tex.vim b/after/ftplugin/tex.vim new file mode 100644 index 000000000..31542d040 --- /dev/null +++ b/after/ftplugin/tex.vim @@ -0,0 +1,50 @@ +if polyglot#init#is_disabled(expand(':p'), 'tex', 'after/ftplugin/tex.vim') + finish +endif + +" LaTeX filetype plugin +" Language: LaTeX (ft=tex) +" Maintainer: Benji Fisher, Ph.D. +" Version: 1.4 +" Last Change: Wed 19 Apr 2006 +" URL: http://www.vim.org/script.php?script_id=411 + +" Only do this when not done yet for this buffer. +if exists("b:did_ftplugin") + finish +endif + +" Start with plain TeX. This will also define b:did_ftplugin . +source $VIMRUNTIME/ftplugin/plaintex.vim + +" Avoid problems if running in 'compatible' mode. +let s:save_cpo = &cpo +set cpo&vim + +let b:undo_ftplugin .= "| setl inex<" + +" Allow "[d" to be used to find a macro definition: +" Recognize plain TeX \def as well as LaTeX \newcommand and \renewcommand . +" I may as well add the AMS-LaTeX DeclareMathOperator as well. +let &l:define .= '\|\\\(re\)\=new\(boolean\|command\|counter\|environment\|font' + \ . '\|if\|length\|savebox\|theorem\(style\)\=\)\s*\*\=\s*{\=' + \ . '\|DeclareMathOperator\s*{\=\s*' + +" Tell Vim how to recognize LaTeX \include{foo} and plain \input bar : +let &l:include .= '\|\\include{' +" On some file systems, "{" and "}" are included in 'isfname'. In case the +" TeX file has \include{fname} (LaTeX only), strip everything except "fname". +let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')" + +" The following lines enable the macros/matchit.vim plugin for +" extended matching with the % key. +" ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase +" and matches \(, \), \[, \], \{, and \} . +if exists("loaded_matchit") + let b:match_words .= ',\\begin\s*\({\a\+\*\=}\):\\end\s*\1' +endif " exists("loaded_matchit") + +let &cpo = s:save_cpo +unlet s:save_cpo + +" vim:sts=2:sw=2: diff --git a/after/ftplugin/tsx.vim b/after/ftplugin/tsx.vim index 96b5515a9..d8d93c8ab 100644 --- a/after/ftplugin/tsx.vim +++ b/after/ftplugin/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/ftplugin/tsx.vim') + finish +endif " modified from html.vim " For matchit plugin @@ -28,5 +30,3 @@ augroup jsx_comment augroup end setlocal suffixesadd+=.tsx - -endif diff --git a/after/ftplugin/typescriptreact.vim b/after/ftplugin/typescriptreact.vim index 3d8502911..ec114d964 100644 --- a/after/ftplugin/typescriptreact.vim +++ b/after/ftplugin/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/ftplugin/typescriptreact.vim') + finish +endif source :h/tsx.vim - -endif diff --git a/after/ftplugin/yaml.vim b/after/ftplugin/yaml.vim deleted file mode 100644 index db608fa4d..000000000 --- a/after/ftplugin/yaml.vim +++ /dev/null @@ -1,11 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 - -" Vim indent file -" Language: Yaml -" Author: Henrique Barcelos -" Date: 2014-10-08 -" URL: https://github.com/hjpbarcelos -setlocal autoindent sw=2 ts=2 expandtab -" vim:set sw=2: - -endif diff --git a/after/indent/javascript-1.vim b/after/indent/javascript-1.vim new file mode 100644 index 000000000..ca9e143ff --- /dev/null +++ b/after/indent/javascript-1.vim @@ -0,0 +1,9 @@ +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/indent/javascript.vim') + finish +endif + +if get(g:, 'vim_jsx_pretty_disable_js', 0) + finish +endif + +source :h/jsx.vim diff --git a/after/indent/javascript-2.vim b/after/indent/javascript-2.vim new file mode 100644 index 000000000..6037664a2 --- /dev/null +++ b/after/indent/javascript-2.vim @@ -0,0 +1,46 @@ +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/indent/javascript-2.vim') + finish +endif + +" Copyright (c) 2016-2021 Jon Parise +" +" 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 + +if exists('*GetJavascriptGraphQLIndent') && !empty(&indentexpr) + finish +endif + +runtime! indent/graphql.vim + +" Set the indentexpr with our own version that will call GetGraphQLIndent when +" we're inside of a GraphQL string and otherwise defer to the base function. +let b:indentexpr_base = &indentexpr +setlocal indentexpr=GetJavascriptGraphQLIndent() + +function GetJavascriptGraphQLIndent() + let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')") + if get(l:stack, 0, '') ==# 'graphqlTemplateString' + return GetGraphQLIndent() + endif + + return eval(b:indentexpr_base) +endfunction diff --git a/after/indent/javascript.vim b/after/indent/javascript.vim index dd280edb6..e3d355fcb 100644 --- a/after/indent/javascript.vim +++ b/after/indent/javascript.vim @@ -1,80 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 - -" Copyright (c) 2016-2020 Jon Parise -" -" 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 - -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, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Vim indent file -" -" Language: javascript.jsx -" Maintainer: MaxMellon -" -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -if exists('b:did_indent') - let s:did_indent = b:did_indent - unlet b:did_indent -endif - -let s:keepcpo = &cpo -set cpo&vim - -if exists('s:did_indent') - let b:did_indent = s:did_indent -endif - -setlocal indentexpr=GetJsxIndent() -setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ - -function! GetJsxIndent() - return jsx_pretty#indent#get(function('GetJavascriptIndent')) -endfunction - -let &cpo = s:keepcpo -unlet s:keepcpo - -endif +" Polyglot metafile +source :h/javascript-1.vim +source :h/javascript-2.vim diff --git a/after/indent/javascriptreact.vim b/after/indent/javascriptreact.vim index ab847072d..994c195b9 100644 --- a/after/indent/javascriptreact.vim +++ b/after/indent/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -source :h/javascript.vim - +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/indent/javascriptreact.vim') + finish endif + +source :h/jsx.vim diff --git a/after/indent/jsx.vim b/after/indent/jsx.vim new file mode 100644 index 000000000..24c4a096e --- /dev/null +++ b/after/indent/jsx.vim @@ -0,0 +1,33 @@ +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/indent/jsx.vim') + finish +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vim indent file +" +" Language: javascript.jsx +" Maintainer: MaxMellon +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +if exists('b:did_indent') + let s:did_indent = b:did_indent + unlet b:did_indent +endif + +let s:keepcpo = &cpo +set cpo&vim + +if exists('s:did_indent') + let b:did_indent = s:did_indent +endif + +setlocal indentexpr=GetJsxIndent() +setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/ + +function! GetJsxIndent() + return jsx_pretty#indent#get(function('GetJavascriptIndent')) +endfunction + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/after/indent/objc.vim b/after/indent/objc.vim index 081e70335..c84f43b34 100644 --- a/after/indent/objc.vim +++ b/after/indent/objc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 +if polyglot#init#is_disabled(expand(':p'), 'objc', 'after/indent/objc.vim') + finish +endif " Vim indent file " Language: Objective-C @@ -93,5 +95,3 @@ endfunction " Restore 'cpo' options let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/after/indent/php.vim b/after/indent/php.vim new file mode 100644 index 000000000..7ed602f8d --- /dev/null +++ b/after/indent/php.vim @@ -0,0 +1,46 @@ +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/indent/php.vim') + finish +endif + +" Copyright (c) 2016-2021 Jon Parise +" +" 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 + +if exists('*GetPHPGraphQLIndent') && !empty(&indentexpr) + finish +endif + +runtime! indent/graphql.vim + +" Set the indentexpr with our own version that will call GetGraphQLIndent when +" we're inside of a GraphQL string and otherwise defer to the base function. +let b:indentexpr_base = &indentexpr +setlocal indentexpr=GetPHPGraphQLIndent() + +function GetPHPGraphQLIndent() + let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')") + if get(l:stack, 0, '') ==# 'phpRegion' && count(l:stack, 'graphqlFold') > 0 + return GetGraphQLIndent() + endif + + return eval(b:indentexpr_base) +endfunction diff --git a/after/indent/tex.vim b/after/indent/tex.vim new file mode 100644 index 000000000..79eb76090 --- /dev/null +++ b/after/indent/tex.vim @@ -0,0 +1,427 @@ +if polyglot#init#is_disabled(expand(':p'), 'tex', 'after/indent/tex.vim') + finish +endif + +" Vim indent file +" Language: LaTeX +" Maintainer: Yichao Zhou +" Created: Sat, 16 Feb 2002 16:50:19 +0100 +" Version: 1.0.0 +" Please email me if you found something I can do. Comments, bug report and +" feature request are welcome. + +" Last Update: {{{ +" 25th Sep 2002, by LH : +" (*) better support for the option +" (*) use some regex instead of several '||'. +" Oct 9th, 2003, by JT: +" (*) don't change indentation of lines starting with '%' +" 2005/06/15, Moshe Kaminsky +" (*) New variables: +" g:tex_items, g:tex_itemize_env, g:tex_noindent_env +" 2011/3/6, by Yichao Zhou +" (*) Don't change indentation of lines starting with '%' +" I don't see any code with '%' and it doesn't work properly +" so I add some code. +" (*) New features: Add smartindent-like indent for "{}" and "[]". +" (*) New variables: g:tex_indent_brace +" 2011/9/25, by Yichao Zhou +" (*) Bug fix: smartindent-like indent for "[]" +" (*) New features: Align with "&". +" (*) New variable: g:tex_indent_and. +" 2011/10/23 by Yichao Zhou +" (*) Bug fix: improve the smartindent-like indent for "{}" and +" "[]". +" 2012/02/27 by Yichao Zhou +" (*) Bug fix: support default folding marker. +" (*) Indent with "&" is not very handy. Make it not enable by +" default. +" 2012/03/06 by Yichao Zhou +" (*) Modify "&" behavior and make it default again. Now "&" +" won't align when there are more then one "&" in the previous +" line. +" (*) Add indent "\left(" and "\right)" +" (*) Trust user when in "verbatim" and "lstlisting" +" 2012/03/11 by Yichao Zhou +" (*) Modify "&" so that only indent when current line start with +" "&". +" 2012/03/12 by Yichao Zhou +" (*) Modify indentkeys. +" 2012/03/18 by Yichao Zhou +" (*) Add &cpo +" 2013/05/02 by Yichao Zhou +" (*) Fix problem about GetTeXIndent checker. Thank Albert Netymk +" for reporting this. +" 2014/06/23 by Yichao Zhou +" (*) Remove the feature g:tex_indent_and because it is buggy. +" (*) If there is not any obvious indentation hints, we do not +" alert our user's current indentation. +" (*) g:tex_indent_brace now only works if the open brace is the +" last character of that line. +" 2014/08/03 by Yichao Zhou +" (*) Indent current line if last line has larger indentation +" 2016/11/08 by Yichao Zhou +" (*) Fix problems for \[ and \]. Thanks Bruno for reporting. +" 2017/04/30 by Yichao Zhou +" (*) Fix a bug between g:tex_noindent_env and g:tex_indent_items +" Now g:tex_noindent_env='document\|verbatim\|itemize' (Emacs +" style) is supported. Thanks Miles Wheeler for reporting. +" 2018/02/07 by Yichao Zhou +" (*) Make indentation more smart in the normal mode +" 2020/04/26 by Yichao Zhou +" (*) Fix a bug related to \[ & \]. Thanks Manuel Boni for +" reporting. +" +" }}} + +" Document: {{{ +" +" For proper latex experience, please put +" let g:tex_flavor = "latex" +" into your vimrc. +" +" * g:tex_indent_brace +" +" If this variable is unset or non-zero, it will use smartindent-like style +" for "{}" and "[]". Now this only works if the open brace is the last +" character of that line. +" +" % Example 1 +" \usetikzlibrary{ +" external +" } +" +" % Example 2 +" \tikzexternalize[ +" prefix=tikz] +" +" * g:tex_indent_items +" +" If this variable is set, item-environments are indented like Emacs does +" it, i.e., continuation lines are indented with a shiftwidth. +" +" set unset +" ------------------------------------------------------ +" \begin{itemize} \begin{itemize} +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \item blablabla \item blablabla +" bla bla bla bla bla bla +" \end{itemize} \end{itemize} +" +" +" * g:tex_items +" +" A list of tokens to be considered as commands for the beginning of an item +" command. The tokens should be separated with '\|'. The initial '\' should +" be escaped. The default is '\\bibitem\|\\item'. +" +" * g:tex_itemize_env +" +" A list of environment names, separated with '\|', where the items (item +" commands matching g:tex_items) may appear. The default is +" 'itemize\|description\|enumerate\|thebibliography'. +" +" * g:tex_noindent_env +" +" A list of environment names. separated with '\|', where no indentation is +" required. The default is 'document\|verbatim'. +" }}} + +" Only define the function once +if exists("b:did_indent") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Define global variable {{{ + +let b:did_indent = 1 + +if !exists("g:tex_indent_items") + let g:tex_indent_items = 1 +endif +if !exists("g:tex_indent_brace") + let g:tex_indent_brace = 1 +endif +if !exists("g:tex_max_scan_line") + let g:tex_max_scan_line = 60 +endif +if g:tex_indent_items + if !exists("g:tex_itemize_env") + let g:tex_itemize_env = 'itemize\|description\|enumerate\|thebibliography' + endif + if !exists('g:tex_items') + let g:tex_items = '\\bibitem\|\\item' + endif +else + let g:tex_items = '' +endif + +if !exists("g:tex_noindent_env") + let g:tex_noindent_env = 'document\|verbatim\|lstlisting' +endif "}}} + +" VIM Setting " {{{ +setlocal autoindent +setlocal nosmartindent +setlocal indentexpr=GetTeXIndent() +setlocal indentkeys& +exec 'setlocal indentkeys+=[,(,{,),},],\&' . substitute(g:tex_items, '^\|\(\\|\)', ',=', 'g') +let g:tex_items = '^\s*' . substitute(g:tex_items, '^\(\^\\s\*\)*', '', '') +" }}} + +function! GetTeXIndent() " {{{ + " Find a non-blank line above the current line. + let lnum = prevnonblank(v:lnum - 1) + let cnum = v:lnum + + " Comment line is not what we need. + while lnum != 0 && getline(lnum) =~ '^\s*%' + let lnum = prevnonblank(lnum - 1) + endwhile + + " At the start of the file use zero indent. + if lnum == 0 + return 0 + endif + + let line = substitute(getline(lnum), '\s*%.*', '','g') " last line + let cline = substitute(getline(v:lnum), '\s*%.*', '', 'g') " current line + + let ccol = 1 + while cline[ccol] =~ '\s' + let ccol += 1 + endwhile + + " We are in verbatim, so do what our user what. + if synIDattr(synID(v:lnum, ccol, 1), "name") == "texZone" + if empty(cline) + return indent(lnum) + else + return indent(v:lnum) + endif + endif + + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + let stay = 1 + + " New code for comment: retain the indent of current line + if cline =~ '^\s*%' + return indent(v:lnum) + endif + + " Add a 'shiftwidth' after beginning of environments. + " Don't add it for \begin{document} and \begin{verbatim} + " if line =~ '^\s*\\begin{\(.*\)}' && line !~ 'verbatim' + " LH modification : \begin does not always start a line + " ZYC modification : \end after \begin won't cause wrong indent anymore + if line =~ '\\begin{.*}' + if line !~ g:tex_noindent_env + let ind = ind + shiftwidth() + let stay = 0 + endif + + if g:tex_indent_items + " Add another sw for item-environments + if line =~ g:tex_itemize_env + let ind = ind + shiftwidth() + let stay = 0 + endif + endif + endif + + if cline =~ '\\end{.*}' + let retn = s:GetEndIndentation(v:lnum) + if retn != -1 + return retn + endif + end + " Subtract a 'shiftwidth' when an environment ends + if cline =~ '\\end{.*}' + \ && cline !~ g:tex_noindent_env + \ && cline !~ '\\begin{.*}.*\\end{.*}' + if g:tex_indent_items + " Remove another sw for item-environments + if cline =~ g:tex_itemize_env + let ind = ind - shiftwidth() + let stay = 0 + endif + endif + + let ind = ind - shiftwidth() + let stay = 0 + endif + + if g:tex_indent_brace + if line =~ '[[{]$' + let ind += shiftwidth() + let stay = 0 + endif + + if cline =~ '^\s*\\\?[\]}]' && s:CheckPairedIsLastCharacter(v:lnum, ccol) + let ind -= shiftwidth() + let stay = 0 + endif + + if line !~ '^\s*\\\?[\]}]' + for i in range(1, strlen(line)-1) + let char = line[i] + if char == ']' || char == '}' + if s:CheckPairedIsLastCharacter(lnum, i) + let ind -= shiftwidth() + let stay = 0 + endif + endif + endfor + endif + endif + + " Special treatment for 'item' + " ---------------------------- + + if g:tex_indent_items + " '\item' or '\bibitem' itself: + if cline =~ g:tex_items + let ind = ind - shiftwidth() + let stay = 0 + endif + " lines following to '\item' are indented once again: + if line =~ g:tex_items + let ind = ind + shiftwidth() + let stay = 0 + endif + endif + + if stay && mode() == 'i' + " If there is no obvious indentation hint, and indentation is triggered + " in insert mode, we trust our user. + if empty(cline) + return ind + else + return max([indent(v:lnum), s:GetLastBeginIndentation(v:lnum)]) + endif + else + return ind + endif +endfunction "}}} + +function! s:GetLastBeginIndentation(lnum) " {{{ + let matchend = 1 + for lnum in range(a:lnum-1, max([a:lnum - g:tex_max_scan_line, 1]), -1) + let line = getline(lnum) + if line =~ '\\end{.*}' + let matchend += 1 + endif + if line =~ '\\begin{.*}' + let matchend -= 1 + endif + if matchend == 0 + if line =~ g:tex_noindent_env + return indent(lnum) + endif + if line =~ g:tex_itemize_env + return indent(lnum) + 2 * shiftwidth() + endif + return indent(lnum) + shiftwidth() + endif + endfor + return -1 +endfunction + +function! s:GetEndIndentation(lnum) " {{{ + if getline(a:lnum) =~ '\\begin{.*}.*\\end{.*}' + return -1 + endif + + let min_indent = 100 + let matchend = 1 + for lnum in range(a:lnum-1, max([a:lnum-g:tex_max_scan_line, 1]), -1) + let line = getline(lnum) + if line =~ '\\end{.*}' + let matchend += 1 + endif + if line =~ '\\begin{.*}' + let matchend -= 1 + endif + if matchend == 0 + return indent(lnum) + endif + if !empty(line) + let min_indent = min([min_indent, indent(lnum)]) + endif + endfor + return min_indent - shiftwidth() +endfunction + +" Most of the code is from matchparen.vim +function! s:CheckPairedIsLastCharacter(lnum, col) "{{{ + let c_lnum = a:lnum + let c_col = a:col+1 + + let line = getline(c_lnum) + if line[c_col-1] == '\' + let c_col = c_col + 1 + endif + let c = line[c_col-1] + + let plist = split(&matchpairs, '.\zs[:,]') + let i = index(plist, c) + if i < 0 + return 0 + endif + + " Figure out the arguments for searchpairpos(). + if i % 2 == 0 + let s_flags = 'nW' + let c2 = plist[i + 1] + else + let s_flags = 'nbW' + let c2 = c + let c = plist[i - 1] + endif + if c == '[' + let c = '\[' + let c2 = '\]' + endif + + " Find the match. When it was just before the cursor move it there for a + " moment. + let save_cursor = winsaveview() + call cursor(c_lnum, c_col) + + " When not in a string or comment ignore matches inside them. + " We match "escape" for special items, such as lispEscapeSpecial. + let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . + \ '=~? "string\\|character\\|singlequote\\|escape\\|comment"' + execute 'if' s_skip '| let s_skip = 0 | endif' + + let stopline = max([0, c_lnum - g:tex_max_scan_line]) + + " Limit the search time to 300 msec to avoid a hang on very long lines. + " This fails when a timeout is not supported. + try + let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, 100) + catch /E118/ + endtry + + call winrestview(save_cursor) + + if m_lnum > 0 + let line = getline(m_lnum) + return strlen(line) == m_col + endif + + return 0 +endfunction "}}} + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: set sw=4 textwidth=80: diff --git a/after/indent/tsx.vim b/after/indent/tsx.vim index 13312c03b..4ff59991e 100644 --- a/after/indent/tsx.vim +++ b/after/indent/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/indent/tsx.vim') + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim indent file @@ -36,5 +38,3 @@ endfunction let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/after/indent/typescript.vim b/after/indent/typescript.vim index 968517c89..08c1e9915 100644 --- a/after/indent/typescript.vim +++ b/after/indent/typescript.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/indent/typescript.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -23,25 +25,22 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Language: GraphQL " Maintainer: Jon Parise -runtime! indent/graphql.vim - -" Don't redefine our function and also require the standard Typescript indent -" function to exist. -if exists('*GetTypescriptGraphQLIndent') || !exists('*GetTypescriptIndent') +if exists('*GetTypescriptGraphQLIndent') && !empty(&indentexpr) finish endif +runtime! indent/graphql.vim + " Set the indentexpr with our own version that will call GetGraphQLIndent when -" we're inside of a GraphQL string and otherwise defer to GetTypescriptIndent. +" we're inside of a GraphQL string and otherwise defer to the base function. +let b:indentexpr_base = &indentexpr 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' + let l:stack = map(synstack(v:lnum, 1), "synIDattr(v:val, 'name')") + if get(l:stack, 0, '') ==# 'graphqlTemplateString' return GetGraphQLIndent() endif - return GetTypescriptIndent() + return eval(b:indentexpr_base) endfunction - -endif diff --git a/after/indent/typescriptreact.vim b/after/indent/typescriptreact.vim index 3d8502911..4a530b9dd 100644 --- a/after/indent/typescriptreact.vim +++ b/after/indent/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/indent/typescriptreact.vim') + finish +endif source :h/tsx.vim - -endif diff --git a/after/syntax/c.vim b/after/syntax/c.vim new file mode 100644 index 000000000..0196b3d49 --- /dev/null +++ b/after/syntax/c.vim @@ -0,0 +1,66 @@ +if polyglot#init#is_disabled(expand(':p'), 'cpp-modern', 'after/syntax/c.vim') + finish +endif + +" ============================================================================== +" Vim syntax file +" Language: C Additions +" Original Author: Mikhail Wolfson +" Maintainer: bfrg +" Website: https://github.com/bfrg/vim-cpp-modern +" Last Change: Jul 24, 2021 +" +" This syntax file is based on: +" https://github.com/octol/vim-cpp-enhanced-highlight +" ============================================================================== + + +" Highlight additional keywords in the comments +syn keyword cTodo contained BUG NOTE + + +" Highlight function names +if get(g:, 'cpp_function_highlight', 1) + syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cParen,cCppParen + hi def link cUserFunction Function +endif + + +" Highlight struct/class member variables +if get(g:, 'cpp_member_highlight', 0) + syn match cMemberAccess "\.\|->" nextgroup=cStructMember,cppTemplateKeyword + syn match cStructMember "\<\h\w*\>\%((\|<\)\@!" contained + syn cluster cParenGroup add=cStructMember + syn cluster cPreProcGroup add=cStructMember + syn cluster cMultiGroup add=cStructMember + hi def link cStructMember Identifier + + if &filetype ==# 'cpp' + syn keyword cppTemplateKeyword template + hi def link cppTemplateKeyword cppStructure + endif +endif + + +" Common ANSI-standard Names +syn keyword cAnsiName + \ PRId8 PRIi16 PRIo32 PRIu64 PRId16 PRIi32 PRIo64 PRIuLEAST8 PRId32 PRIi64 PRIoLEAST8 PRIuLEAST16 PRId64 PRIiLEAST8 PRIoLEAST16 PRIuLEAST32 PRIdLEAST8 PRIiLEAST16 PRIoLEAST32 PRIuLEAST64 PRIdLEAST16 PRIiLEAST32 PRIoLEAST64 PRIuFAST8 PRIdLEAST32 PRIiLEAST64 PRIoFAST8 PRIuFAST16 PRIdLEAST64 PRIiFAST8 PRIoFAST16 PRIuFAST32 PRIdFAST8 PRIiFAST16 PRIoFAST32 PRIuFAST64 PRIdFAST16 PRIiFAST32 PRIoFAST64 PRIuMAX PRIdFAST32 PRIiFAST64 PRIoMAX PRIuPTR PRIdFAST64 PRIiMAX PRIoPTR PRIx8 PRIdMAX PRIiPTR PRIu8 PRIx16 PRIdPTR PRIo8 PRIu16 PRIx32 PRIi8 PRIo16 PRIu32 PRIx64 PRIxLEAST8 SCNd8 SCNiFAST32 SCNuLEAST32 PRIxLEAST16 SCNd16 SCNiFAST64 SCNuLEAST64 PRIxLEAST32 SCNd32 SCNiMAX SCNuFAST8 PRIxLEAST64 SCNd64 SCNiPTR SCNuFAST16 PRIxFAST8 SCNdLEAST8 SCNo8 SCNuFAST32 PRIxFAST16 SCNdLEAST16 SCNo16 SCNuFAST64 PRIxFAST32 SCNdLEAST32 SCNo32 SCNuMAX PRIxFAST64 SCNdLEAST64 SCNo64 SCNuPTR PRIxMAX SCNdFAST8 SCNoLEAST8 SCNx8 PRIxPTR SCNdFAST16 SCNoLEAST16 SCNx16 PRIX8 SCNdFAST32 SCNoLEAST32 SCNx32 PRIX16 SCNdFAST64 SCNoLEAST64 SCNx64 PRIX32 SCNdMAX SCNoFAST8 SCNxLEAST8 PRIX64 SCNdPTR SCNoFAST16 SCNxLEAST16 PRIXLEAST8 SCNi8 SCNoFAST32 SCNxLEAST32 PRIXLEAST16 SCNi16 SCNoFAST64 SCNxLEAST64 PRIXLEAST32 SCNi32 SCNoMAX SCNxFAST8 PRIXLEAST64 SCNi64 SCNoPTR SCNxFAST16 PRIXFAST8 SCNiLEAST8 SCNu8 SCNxFAST32 PRIXFAST16 SCNiLEAST16 SCNu16 SCNxFAST64 PRIXFAST32 SCNiLEAST32 SCNu32 SCNxMAX PRIXFAST64 SCNiLEAST64 SCNu64 SCNxPTR PRIXMAX SCNiFAST8 SCNuLEAST8 PRIXPTR SCNiFAST16 SCNuLEAST16 STDC CX_LIMITED_RANGE STDC FENV_ACCESS STDC FP_CONTRACT + \ errno environ and bitor not_eq xor and_eq compl or xor_eq bitand not or_eq + +" Booleans +syn keyword cBoolean true false TRUE FALSE + + +" Default highlighting +hi def link cBoolean Boolean +hi def link cAnsiName Identifier + + +" Highlight all standard C keywords as Statement +" This is very similar to what other IDEs and editors do +if get(g:, 'cpp_simple_highlight', 0) + hi! def link cStorageClass Statement + hi! def link cStructure Statement + hi! def link cTypedef Statement + hi! def link cLabel Statement +endif diff --git a/after/syntax/coffee.vim b/after/syntax/coffee.vim index fde51eb4a..df65b1d91 100644 --- a/after/syntax/coffee.vim +++ b/after/syntax/coffee.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cjsx') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cjsx', 'after/syntax/coffee.vim') + finish +endif if exists('b:current_syntax') let s:current_syntax=b:current_syntax @@ -27,5 +29,3 @@ hi def link cjsxTagName Function hi def link cjsxEntity Statement hi def link cjsxEntityPunct Type hi def link cjsxAttribProperty Type - -endif diff --git a/after/syntax/cpp.vim b/after/syntax/cpp.vim new file mode 100644 index 000000000..2e8f5ac6e --- /dev/null +++ b/after/syntax/cpp.vim @@ -0,0 +1,223 @@ +if polyglot#init#is_disabled(expand(':p'), 'cpp-modern', 'after/syntax/cpp.vim') + finish +endif + +" ============================================================================== +" Vim syntax file +" Language: C++ (Standard library including C++11/14/17/20) +" Original Author: Jon Haggblad +" Maintainer: bfrg +" Website: https://github.com/bfrg/vim-cpp-modern +" Last Change: Sep 15, 2022 +" +" This syntax file is based on: +" https://github.com/octol/vim-cpp-enhanced-highlight +" ============================================================================== + +" C++ attributes {{{1 +if get(g:, 'cpp_attributes_highlight', 0) + syntax region cppAttribute matchgroup=cppAttributeBrackets start='\[\[' end=']]' contains=cString + hi def link cppAttribute Macro + hi def link cppAttributeBrackets Identifier +endif + + +" Standard library {{{1 +syntax keyword cppSTLdefine + \ MB_CUR_MAX MB_LEN_MAX WCHAR_MAX WCHAR_MIN WEOF __STDC_UTF_16__ __STDC_UTF_32__ + +syntax keyword cppSTLnamespace + \ std experimental rel_ops + +syntax keyword cppSTLconstant + \ badbit digits digits10 eofbit failbit goodbit has_denorm has_denorm_loss has_infinity has_quiet_NaN has_signaling_NaN is_bounded is_exact is_iec559 is_integer is_modulo is_signed is_specialized max_exponent max_exponent10 min_exponent min_exponent10 npos radix round_style tinyness_before traps + +syntax keyword cppSTLvariable + \ cerr cin clog cout wcerr wcin wclog wcout nothrow + +syntax keyword cppSTLexception + \ bad_alloc bad_exception bad_typeid bad_cast domain_error exception failure invalid_argument length_error logic_error out_of_range overflow_error range_error runtime_error underflow_error + +syntax keyword cppSTLios + \ endl ends flush resetiosflags setbase setfill setiosflags setprecision setw ws + +syntax keyword cppSTLios + \ boolalpha dec defaultfloat fixed hex hexfloat internal left noboolalpha noshowbase noshowpoint noshowpos noskipws nounitbuf nouppercase oct right scientific showbase showpoint showpos skipws unitbuf uppercase + +syntax keyword cppSTLtype + \ fmtflags iostate openmode Init allocator auto_ptr basic_filebuf basic_fstream basic_ifstream basic_ios basic_iostream basic_istream basic_istringstream basic_ofstream basic_ostream basic_ostringstream basic_streambuf basic_string basic_stringbuf basic_stringstream binary_compose binder1st binder2nd bitset char_traits char_type const_mem_fun1_t const_mem_fun_ref1_t const_mem_fun_ref_t const_mem_fun_t const_pointer const_reference container_type deque difference_type div_t event_callback filebuf first_type float_denorm_style float_round_style fpos fstream gslice_array ifstream imaxdiv_t indirect_array int_type ios ios_base iostream istream istringstream istrstream iterator_category iterator_traits key_compare key_type ldiv_t list lldiv_t map mapped_type mask_array mbstate_t mem_fun1_t mem_fun_ref1_t mem_fun_ref_t mem_fun_t multimap multiset nothrow_t numeric_limits off_type ofstream ostream ostringstream ostrstream pair pointer pointer_to_binary_function pointer_to_unary_function pos_type priority_queue queue reference second_type seekdir sequence_buffer set size_type slice_array stack state_type stream streambuf streamoff streampos streamsize string stringbuf stringstream strstream strstreambuf temporary_buffer test_type tm traits_type type_info u16string u32string unary_compose unary_negate valarray value_compare value_type vector wfilebuf wfstream wifstream wios wiostream wistream wistringstream wofstream wostream wostringstream wstreambuf wstreampos wstring wstringbuf wstringstream codecvt codecvt_base codecvt_byname collate collate_byname ctype ctype_base ctype_byname locale messages messages_base messages_byname money_base money_get money_put moneypunct moneypunct_byname num_get num_put numpunct numpunct_byname time_base time_get time_get_byname time_put time_put_byname binary_function binary_negate bit_and bit_not bit_or divides equal_to greater greater_equal less less_equal logical_and logical_not logical_or minus modulus multiplies negate not_equal_to plus unary_function unary_negate bidirectional_iterator_tag forward_iterator_tag input_iterator_tag output_iterator_tag random_access_iterator_tag + +syntax keyword cppSTLtypedef + \ time_t sig_atomic_t wctrans_t wctype_t wint_t + +syntax keyword cppSTLiterator + \ back_insert_iterator bidirectional_iterator const_iterator const_reverse_iterator forward_iterator front_insert_iterator input_iterator insert_iterator istream_iterator istreambuf_iterator iterator ostream_iterator ostreambuf_iterator output_iterator random_access_iterator raw_storage_iterator reverse_bidirectional_iterator reverse_iterator + +" Function templates that are called with template parameters +syntax keyword cppSTLfunction + \ use_facet has_facet get + +" Some of these keywords can be highlighted as cppSTLios or cppSTLconstant +" syntax keyword cppSTLconstant +" \ adjustfield app ate basefield binary floatfield in out trunc boolalpha dec fixed hex internal left oct right scientific showbase showpoint showpos skipws unitbuf uppercase + + +" C++11 extensions {{{1 +if !exists('cpp_no_cpp11') + syntax keyword cppStatement nullptr + syntax keyword cppType char16_t char32_t + + syntax keyword cppSTLnamespace chrono this_thread + + syntax keyword cppSTLtype + \ array atomic atomic_bool atomic_char atomic_flag atomic_int atomic_llong atomic_long atomic_schar atomic_short atomic_uchar atomic_uint atomic_ullong atomic_ulong atomic_ushort duration duration_values high_resolution_clock hours microseconds milliseconds minutes nanoseconds seconds steady_clock system_clock time_point treat_as_floating_point condition_variable exception_ptr nested_exception hash is_bind_expression is_placeholder reference_wrapper forward_list future packaged_task promise shared_future initializer_list codecvt_mode codecvt_utf16 codecvt_utf8 codecvt_utf8_utf16 wbuffer_convert wstring_convert allocator_traits allocator_type default_delete enable_shared_from_this is_always_equal owner_less pointer_safety pointer_traits propagate_on_container_copy_assignment propagate_on_container_move_assignment propagate_on_container_swap rebind_alloc rebind_traits shared_ptr unique_ptr uses_allocator void_pointer const_void_pointer weak_ptr condition_variable_any lock_guard mutex once_flag recursive_mutex recursive_timed_mutex timed_mutex unique_lock bernoulli_distribution binomial_distribution cauchy_distribution chi_squared_distribution default_random_engine discard_block_engine discrete_distribution exponential_distribution extreme_value_distribution fisher_f_distribution gamma_distribution geometric_distribution independent_bits_engine knuth_b linear_congruential_engine lognormal_distribution mersenne_twister_engine minstd_rand minstd_rand0 mt19937 mt19937_64 negative_binomial_distribution normal_distribution piecewise_constant_distribution piecewise_linear_distribution poisson_distribution random_device ranlux24 ranlux24_base ranlux48 ranlux48_base seed_seq shuffle_order_engine student_t_distribution subtract_with_carry_engine uniform_int_distribution uniform_real_distribution weibull_distribution atto centi deca deci exa femto giga hecto kilo mega micro milli nano peta pico ratio ratio_add ratio_divide ratio_equal ratio_greater ratio_greater_equal ratio_less ratio_less_equal ratio_multiply ratio_not_equal ratio_subtract tera yocto yotta zepto zetta basic_regex regex wregex match_results regex_traits sub_match syntax_option_type match_flag_type error_type scoped_allocator_adaptor outer_allocator_type inner_allocator_type error_code error_condition error_category is_error_code_enum is_error_condition_enum thread tuple tuple_size tuple_element type_index add_const add_cv add_lvalue_reference add_pointer add_rvalue_reference add_volatile aligned_storage aligned_union alignment_of common_type conditional decay enable_if extent false_type has_virtual_destructor integral_constant is_abstract is_arithmetic is_array is_assignable is_base_of is_class is_compound is_const is_constructible is_convertible is_copy_assignable is_copy_constructible is_default_constructible is_destructible is_empty is_enum is_floating_point is_function is_fundamental is_integral is_literal_type is_lvalue_reference is_member_function_pointer is_member_object_pointer is_member_pointer is_move_assignable is_move_constructible is_nothrow_assignable is_nothrow_constructible is_nothrow_copy_assignable is_nothrow_copy_constructible is_nothrow_default_constructible is_nothrow_destructible is_nothrow_move_assignable is_nothrow_move_constructible is_object is_pod is_pointer is_polymorphic is_reference is_rvalue_reference is_same is_scalar is_signed is_standard_layout is_trivial is_trivially_assignable is_trivially_constructible is_trivially_copy_assignable is_trivially_copy_constructible is_trivially_copyable is_trivially_default_constructible is_trivially_destructible is_trivially_move_assignable is_trivially_move_constructible is_union is_unsigned is_void is_volatile make_signed make_unsigned rank remove_all_extents remove_const remove_cv remove_extent remove_pointer remove_reference remove_volatile result_of true_type underlying_type hasher key_equal unordered_map unordered_multimap unordered_multiset unordered_set function + + syntax keyword cppSTLtypedef + \ atomic_char16_t atomic_char32_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t atomic_int_fast8_t atomic_int_least16_t atomic_int_least32_t atomic_int_least64_t atomic_int_least8_t atomic_intmax_t atomic_intptr_t atomic_ptrdiff_t atomic_size_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t atomic_uint_fast8_t atomic_uint_least16_t atomic_uint_least32_t atomic_uint_least64_t atomic_uint_least8_t atomic_uintmax_t atomic_uintptr_t atomic_wchar_t nullptr_t max_align_t allocator_arg_t adopt_lock_t defer_lock_t try_to_lock_t piecewise_construct_t + + syntax keyword cppSTLconstant max_digits10 + + syntax keyword cppSTLvariable + \ _1 _2 _3 _4 _5 _6 _7 _8 _9 defer_lock try_to_lock adopt_lock allocator_arg + + syntax keyword cppSTLdefine + \ math_errhandling FLT_EVAL_METHOD FP_INFINITE FP_NAN FP_NORMAL FP_SUBNORMAL FP_ZERO HUGE_VALF HUGE_VALL INFINITY MATH_ERREXCEPT MATH_ERRNO NAN + + syntax keyword cppSTLenum + \ memory_order future_status future_errc launch io_errc cv_status errc + + syntax keyword cppSTLfunction + \ duration_cast time_point_cast mem_fn const_pointer_cast dynamic_pointer_cast static_pointer_cast allocate_shared make_shared isblank generate_canonical forward_as_tuple make_tuple tie tuple_cat declval forward move move_if_noexcept + + syntax keyword cppSTLexception + \ bad_function_call future_error regex_error system_error bad_weak_ptr bad_array_new_length + + syntax keyword cppSTLiterator + \ move_iterator regex_iterator regex_token_iterator const_local_iterator local_iterator + + " Note: ignore is also a function + syntax match cppSTLvariable "\(\@!" +endif + + +" C++14 extensions {{{1 +if !exists('cpp_no_cpp14') + syntax keyword cppSTLnamespace literals chrono_literals string_literals complex_literals + + syntax keyword cppSTLfunction make_unique + + syntax keyword cppSTLtype + \ index_sequence index_sequence_for integer_sequence make_index_sequence make_integer_sequence shared_lock shared_timed_mutex is_null_pointer + + syntax keyword cppSTLtypedef + \ tuple_element_t add_const_t add_cv_t add_lvalue_reference_t add_pointer_t add_rvalue_reference_t add_volatile_t aligned_storage_t aligned_union_t common_type_t conditional_t decay_t enable_if_t make_signed_t make_unsigned_t remove_all_extents_t remove_const_t remove_cv_t remove_extent_t remove_pointer_t remove_reference_t remove_volatile_t result_of_t underlying_type_t +endif + + +" C++17 extensions {{{1 +if !exists('cpp_no_cpp17') + syntax keyword cppSTLnamespace filesystem execution string_view_literals + + syntax keyword cppSTLtype + \ any byte is_execution_policy parallel_policy parallel_unsequenced_policy sequenced_policy directory_entry directory_iterator file_status file_time_type path recursive_directory_iterator space_info default_order default_searcher boyer_moore_searcher boyer_moore_horspool_searcher memory_resource monotonic_buffer_resource polymorphic_allocator pool_options synchronized_pool_resource unsynchronized_pool_resource scoped_lock optional shared_mutex basic_string_view string_view u16string_view u32string_view wstring_view bool_constant conjunction disjunction has_unique_object_representations invoke_result is_aggregate is_callable is_invocable is_invocable_r is_nothrow_invocable is_nothrow_invocable_r is_nothrow_swappable is_nothrow_swappable_with is_nowthrow_callable is_swappable is_swappable_with negation node_type insert_return_type in_place_tag monostate variant variant_size variant_alternative from_chars_result to_chars_result chars_format + + syntax keyword cppSTLtypedef + \ invoke_result_t default_order_t nullopt_t void_t in_place_t in_place_type_t in_place_index_t variant_alternative_t + + syntax keyword cppSTLexception + \ bad_any_cast filesystem_error bad_optional_access bad_variant_access + + syntax keyword cppSTLconstant + \ is_always_lock_free seq par par_unseq copy_symlinks auto_format create_hard_links create_symlinks directories_only follow_directory_symlink generic_format group_all group_exec group_read group_write native_format others_all others_exec others_read others_write overwrite_existing owner_all owner_exec owner_read owner_write preferred_separator recursive set_gid set_uid skip_existing skip_permission_denied skip_symlinks sticky_bit update_existing hardware_destructive_interference_size hardware_constructive_interference_size tuple_size_v nullopt alignment_of_v rank_v extent_v variant_npos variant_size_v + + syntax keyword cppSTLbool + \ treat_as_floating_point_v is_execution_policy_v is_bind_expression_v is_placeholder_v is_error_code_enum_v is_error_condition_enum_v uses_allocator_v conjunction_v disjunction_v has_unique_object_representations_v has_virtual_destructor_v is_abstract_v is_aggregate_v is_arithmetic_v is_array_v is_assignable_v is_base_of_v is_callable_v is_class_v is_compound_v is_const_v is_constructible_v is_convertible_v is_copy_assignable_v is_copy_constructible_v is_default_constructible_v is_destructible_v is_empty_v is_enum_v is_floating_point_v is_function_v is_fundamental_v is_integral_v is_invocable_r_v is_invocable_v is_literal_type_v is_lvalue_reference_v is_member_function_pointer_v is_member_object_pointer_v is_member_pointer_v is_move_assignable_v is_move_constructible_v is_nothrow_assignable_v is_nothrow_constructible_v is_nothrow_copy_assignable_v is_nothrow_copy_constructible_v is_nothrow_default_constructible_v is_nothrow_destructible_v is_nothrow_invocable_r_v is_nothrow_invocable_v is_nothrow_move_assignable_v is_nothrow_move_constructible_v is_nothrow_swappable_v is_nothrow_swappable_with_v is_nowthrow_callable_v is_null_pointer_v is_object_v is_pod_v is_pointer_v is_polymorphic_v is_reference_v is_rvalue_reference_v is_same_v is_scalar_v is_signed_v is_standard_layout_v is_swappable_v is_swappable_with_v is_trivial_v is_trivially_assignable_v is_trivially_constructible_v is_trivially_copy_assignable_v is_trivially_copy_constructible_v is_trivially_copyable_v is_trivially_default_constructible_v is_trivially_destructible_v is_trivially_move_assignable_v is_trivially_move_constructible_v is_union_v is_unsigned_v is_void_v is_volatile_v negation_v + + syntax keyword cppSTLfunction + \ reinterpret_pointer_cast make_from_tuple make_optional any_cast + + syntax keyword cppSTLenum + \ copy_options directory_options file_type perm_options perms + + " Note: There is std::filesystem::path::format and std::format() in + syntax match cppSTLenum "\(\@!" + + " Note: these can be both member objects and methods + syntax match cppSTLvariable "\<\%(capacity\|free\|available\)\>(\@!" + + " Note: these keywords are very likely to coincide with user-defined variables + " syntax keyword cppSTLconstant + " \ all mask unknown replace add remove nofollow none not_found regular directory symlink block character fifo socket unknown +endif + + +" C++20 extensions {{{1 +if !exists('cpp_no_cpp20') + syntax keyword cppSTLnamespace ranges views + syntax keyword cppSTLconstant dynamic_extent + syntax keyword cppSTLvariable default_sentinel unreachable_sentinel + syntax keyword cppSTLexception format_error + + syntax keyword cppSTLtype + \ atomic_ref endian weak_ordering strong_ordering partial_ordering weak_equality strong_equality common_comparison_category contract_violation coroutine_traits coroutine_handle noop_coroutine_handle noop_coroutine_promise suspend_never suspend_always remove_cvref is_bounded_array is_layout_compatible is_unbounded_array is_nothrow_convertible has_strong_structural_equality is_pointer_interconvertible_base_of unwrap_reference unwrap_ref_decay basic_common_reference common_reference dangling ref_view filter_view transform_view iota_view join_view empty_view single_view split_view common_view reverse_view view_interface span basic_syncbuf basic_osyncstream syncbuf wsyncbuf osyncstream wosyncstream jthread latch barrier stop_token stop_source stop_callback counting_semaphore binary_semaphore source_location compare_three_way_result contiguous_iterator_tag incrementable_traits indirectly_readable_traits move_sentinel common_iterator counted_iterator projected type_identity formatter basic_format_context basic_format_args basic_format_string basic_format_parse_context + + syntax keyword cppSTLtypedef + \ common_comparison_category_t remove_cvref_t unwrap_reference_t unwrap_ref_decay_t common_reference_t iterator_t sentinel_t safe_iterator_t safe_subrange_t compare_three_way_result_t iter_value_t iter_reference_t iter_difference_t iter_rvalue_reference_t iter_common_reference_t default_sentinel_t unreachable_sentinel_t indirect_result_t type_identity_t format_context wformat_context format_args wformat_args format_string wformat_string format_parse_context wformat_parse_context + + syntax keyword cppSTLfunction + \ make_unique_default_init make_shared_default_init allocate_shared_default_init uses_allocator_construction_args make_obj_using_allocator is_corresponding_member subspan in_range is_pointer_interconvertible_with_class + + syntax keyword cppSTLbool + \ is_bounded_array_v is_layout_compatible_v is_unbounded_array_v is_nothrow_convertible_v has_strong_structural_equality_v is_pointer_interconvertible_base_of_v disable_sized_sentinel_for disable_sized_range enable_borrowed_range enable_view + + syntax keyword cppSTLconcept + \ assignable_from boolean common_reference_with common_with constructible_from convertible_to copy_constructible copyable default_constructible derived_from destructible equality_comparable equality_comparable_with equivalence_relation floating_point integral invocable movable move_constructible predicate regular regular_invocable relation same_as semiregular signed_integral strict_weak_order swappable swappable_with totally_ordered totally_ordered_with unsigned_integral default_initializable range sized_range view input_range output_range forward_range bidirectional_range random_access_range contiguous_range common_range viewable_range three_way_comparable three_way_comparable_with indirectly_readable indirectly_writable weakly_incrementable incrementable input_or_output_iterator sentinel_for sized_sentinel_for input_iterator output_iterator forward_iterator bidirectional_iterator random_access_iterator contiguous_iterator indirectly_unary_invocable indirectly_regular_unary_invocable indirect_unary_predicate indirect_binary_predicate indirect_equivalence_relation indirect_strict_weak_order indirectly_movable indirectly_movable_storable indirectly_copyable indirectly_copyable_storable indirectly_swappable indirectly_comparable permutable mergeable sortable +endif + + +" C++23 extensions {{{1 +if !exists('cpp_no_cpp23') + syntax keyword cppSTLtype basic_stacktrace stacktrace_entry is_scoped_enum + syntax keyword cppSTLtypedef stacktrace + syntax keyword cppSTLbool is_scoped_enum_v + syntax keyword cppSTLfunction invoke_r + syntax keyword cppSTLtype expected unexpected unexpect_t bad_expected_access + syntax keyword cppSTLvariable unexpect +endif + + +" Boost {{{1 +if !exists('cpp_no_boost') + syntax keyword cppSTLnamespace boost + syntax keyword cppSTLfunction lexical_cast +endif +" }}} + + +" Default highlighting +hi def link cppSTLbool Boolean +hi def link cppStatement Statement +hi def link cppSTLfunction Function +hi def link cppSTLdefine Constant +hi def link cppSTLconstant Constant +hi def link cppSTLnamespace Constant +hi def link cppSTLexception Type +hi def link cppSTLiterator Type +hi def link cppSTLtype Type +hi def link cppSTLtypedef Typedef +hi def link cppSTLenum Typedef +hi def link cppSTLios Function +hi def link cppSTLconcept Typedef +hi def link cppSTLvariable Identifier + +" The keywords {inline, virtual, explicit, export, override, final} are +" standard C++ keywords and NOT types! +hi! def link cppModifier Statement + + +" Highlight all standard C++ keywords as Statement +if get(g:, 'cpp_simple_highlight', 0) + hi! def link cppStructure Statement + hi! def link cppExceptions Statement + hi! def link cppStorageClass Statement +endif diff --git a/after/syntax/haskell.vim b/after/syntax/haskell.vim index ac1752981..9820e792c 100644 --- a/after/syntax/haskell.vim +++ b/after/syntax/haskell.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dhall', 'after/syntax/haskell.vim') + finish +endif " store and remove current syntax value let old_syntax = b:current_syntax @@ -13,5 +15,3 @@ hi def link quasiQuote Underlined " restore current syntax value let b:current_syntax = old_syntax - -endif diff --git a/after/syntax/help.vim b/after/syntax/help.vim index 16c46b299..b19c8d0dc 100644 --- a/after/syntax/help.vim +++ b/after/syntax/help.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 +if polyglot#init#is_disabled(expand(':p'), 'scala', 'after/syntax/help.vim') + finish +endif " Extends standard help syntax with highlighting of Scala code. " @@ -14,5 +16,3 @@ if has('conceal') else syntax region rgnScala matchgroup=Ignore start='!sc!' end='!/sc!' contains=@ScalaCode endif - -endif diff --git a/after/syntax/html.vim b/after/syntax/html.vim index bc7e8eedd..4ed8dfc81 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if polyglot#init#is_disabled(expand(':p'), 'html5', 'after/syntax/html.vim') + finish +endif " Vim syntax file " Language: HTML (version 5.1) @@ -12,5 +14,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 " https://github.com/w3c/html/issues/694 syntax region htmlComment start=++ contains=@Spell syntax region htmlComment start=++ - -endif diff --git a/after/syntax/idris.vim b/after/syntax/idris.vim index 29d356321..66fc91d1f 100644 --- a/after/syntax/idris.vim +++ b/after/syntax/idris.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 +if polyglot#init#is_disabled(expand(':p'), 'idris', 'after/syntax/idris.vim') + finish +endif " This script allows for unicode concealing of certain characters " For instance -> goes to → @@ -78,5 +80,3 @@ hi link idrNiceOperator Operator hi! link Conceal Operator setlocal conceallevel=2 - -endif diff --git a/after/syntax/idris2.vim b/after/syntax/idris2.vim new file mode 100644 index 000000000..fedcd8c1c --- /dev/null +++ b/after/syntax/idris2.vim @@ -0,0 +1,82 @@ +if polyglot#init#is_disabled(expand(':p'), 'idris2', 'after/syntax/idris2.vim') + finish +endif + +" This script allows for unicode concealing of certain characters +" For instance -> goes to → +" +" It needs vim >= 7.3, set nocompatible, set enc=utf-8 +" +" If you want to turn this on, let g:idris_conceal = 1 + +if !exists('g:idris_conceal') || !has('conceal') || &enc != 'utf-8' + finish +endif + +" vim: set fenc=utf-8: +syntax match idrNiceOperator "\\\ze[[:alpha:][:space:]_([]" conceal cchar=λ +syntax match idrNiceOperator "<-" conceal cchar=← +syntax match idrNiceOperator "->" conceal cchar=→ +syntax match idrNiceOperator "\" conceal cchar=∑ +syntax match idrNiceOperator "\" conceal cchar=∏ +syntax match idrNiceOperator "\" conceal cchar=√ +syntax match idrNiceOperator "\" conceal cchar=π +syntax match idrNiceOperator "==" conceal cchar=≡ +syntax match idrNiceOperator "\/=" conceal cchar=≠ + + +let s:extraConceal = 1 + +let s:doubleArrow = 1 +" Set this to 0 to use the more technically correct arrow from bar + +" Some windows font don't support some of the characters, +" so if they are the main font, we don't load them :) +if has("win32") + let s:incompleteFont = [ 'Consolas' + \ , 'Lucida Console' + \ , 'Courier New' + \ ] + let s:mainfont = substitute( &guifont, '^\([^:,]\+\).*', '\1', '') + for s:fontName in s:incompleteFont + if s:mainfont ==? s:fontName + let s:extraConceal = 0 + break + endif + endfor +endif + +if s:extraConceal + syntax match idrNiceOperator "Void" conceal cchar=⊥ + + " Match greater than and lower than w/o messing with Kleisli composition + syntax match idrNiceOperator "<=\ze[^<]" conceal cchar=≤ + syntax match idrNiceOperator ">=\ze[^>]" conceal cchar=≥ + + if s:doubleArrow + syntax match idrNiceOperator "=>" conceal cchar=⇒ + else + syntax match idrNiceOperator "=>" conceal cchar=↦ + endif + + syntax match idrNiceOperator "=\zs<<" conceal cchar=« + + syntax match idrNiceOperator "++" conceal cchar=⧺ + syntax match idrNiceOperator "::" conceal cchar=∷ + syntax match idrNiceOperator "-<" conceal cchar=↢ + syntax match idrNiceOperator ">-" conceal cchar=↣ + syntax match idrNiceOperator "-<<" conceal cchar=⤛ + syntax match idrNiceOperator ">>-" conceal cchar=⤜ + + " Only replace the dot, avoid taking spaces around. + syntax match idrNiceOperator /\s\.\s/ms=s+1,me=e-1 conceal cchar=∘ + syntax match idrNiceOperator "\.\." conceal cchar=‥ + + syntax match idrNiceOperator "`elem`" conceal cchar=∈ + syntax match idrNiceOperator "`notElem`" conceal cchar=∉ +endif + +hi link idrNiceOperator Operator +hi! link Conceal Operator +setlocal conceallevel=2 + diff --git a/after/syntax/javascript.vim b/after/syntax/javascript.vim index 00c4b0791..469a906e9 100644 --- a/after/syntax/javascript.vim +++ b/after/syntax/javascript.vim @@ -1,59 +1,9 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Vim syntax file -" -" Language: javascript.jsx -" Maintainer: MaxMellon -" -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -let s:jsx_cpo = &cpo -set cpo&vim - -syntax case match - -if exists('b:current_syntax') - let s:current_syntax = b:current_syntax - unlet b:current_syntax +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/javascript.vim') + finish endif -if exists('s:current_syntax') - let b:current_syntax = s:current_syntax +if get(g:, 'vim_jsx_pretty_disable_js', 0) + finish endif -if hlexists("jsDebugger") || hlexists("jsNoise") " yuezk/vim-js or pangloss/vim-javascript - syntax cluster jsExpression add=jsxRegion -elseif hlexists("javascriptOpSymbols") " othree/yajs.vim - " refine the javascript line comment - syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend - syntax cluster javascriptValue add=jsxRegion - syntax cluster javascriptNoReserved add=jsxElement,jsxTag -else " build-in javascript syntax - " refine the javascript line comment - syntax region javaScriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend - - " refine the template string syntax - syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr - - " add a javaScriptBlock group for build-in syntax - syntax region javaScriptBlock - \ matchgroup=javaScriptBraces - \ start="{" - \ end="}" - \ contained - \ extend - \ contains=javaScriptBlock,@javaScriptEmbededExpr,javaScript.* - \ fold - - syntax cluster javaScriptEmbededExpr add=jsxRegion,javaScript.* -endif - -runtime syntax/jsx_pretty.vim - -let b:current_syntax = 'javascript.jsx' - -let &cpo = s:jsx_cpo -unlet s:jsx_cpo - -endif +source :h/jsx.vim diff --git a/after/syntax/javascript/graphql.vim b/after/syntax/javascript/graphql.vim index f085a301a..459f79f7c 100644 --- a/after/syntax/javascript/graphql.vim +++ b/after/syntax/javascript/graphql.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/javascript/graphql.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -27,7 +29,11 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif @@ -36,22 +42,26 @@ let s:tags = '\%(' . join(graphql#javascript_tags(), '\|') . '\)' if graphql#has_syntax_group('jsTemplateExpression') " pangloss/vim-javascript - exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend' + exec 'syntax region graphqlTemplateString matchgroup=jsTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend' exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString' syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend + syntax region graphqlTemplateString matchgroup=jsTemplateString start=+`#\s\{,4\}\(gql\|graphql\)\>\s*$+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend + hi def link graphqlTemplateString jsTemplateString hi def link graphqlTaggedTemplate jsTaggedTemplate hi def link graphqlTemplateExpression jsTemplateExpression - syn cluster jsExpression add=graphqlTaggedTemplate + syn cluster jsExpression add=graphqlTemplateString,graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString elseif graphql#has_syntax_group('javaScriptStringT') " runtime/syntax/javascript.vim - exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend' + exec 'syntax region graphqlTemplateString matchgroup=javaScriptStringT start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend' exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString' syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=@javaScriptEmbededExpr containedin=graphqlFold keepend + syntax region graphqlTemplateString matchgroup=javaScriptStringT start=+`#\s\{,4\}\(gql\|graphql\)\>\s*$+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend + hi def link graphqlTemplateString javaScriptStringT hi def link graphqlTaggedTemplate javaScriptEmbed hi def link graphqlTemplateExpression javaScriptEmbed @@ -60,5 +70,3 @@ elseif graphql#has_syntax_group('javaScriptStringT') syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString endif - -endif diff --git a/after/syntax/javascript/sql.vim b/after/syntax/javascript/sql.vim index 8b45203c6..6ee300264 100644 --- a/after/syntax/javascript/sql.vim +++ b/after/syntax/javascript/sql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript-sql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'javascript-sql', 'after/syntax/javascript/sql.vim') + finish +endif " Vim plugin " Language: JavaScript @@ -22,5 +24,3 @@ hi def link sqlTaggedTemplate jsTaggedTemplate syn cluster jsExpression add=sqlTaggedTemplate syn cluster sqlTaggedTemplate add=sqlTemplateString - -endif diff --git a/after/syntax/javascriptreact.vim b/after/syntax/javascriptreact.vim index ab847072d..a5c772256 100644 --- a/after/syntax/javascriptreact.vim +++ b/after/syntax/javascriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -source :h/javascript.vim - +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/javascriptreact.vim') + finish endif + +source :h/jsx.vim diff --git a/after/syntax/javascriptreact/graphql.vim b/after/syntax/javascriptreact/graphql.vim index c86f9d237..2e1291a89 100644 --- a/after/syntax/javascriptreact/graphql.vim +++ b/after/syntax/javascriptreact/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/javascriptreact/graphql.vim') + finish +endif runtime! after/syntax/javascript/graphql.vim - -endif diff --git a/after/syntax/jsx.vim b/after/syntax/jsx.vim new file mode 100644 index 000000000..c5a1917c2 --- /dev/null +++ b/after/syntax/jsx.vim @@ -0,0 +1,59 @@ +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/jsx.vim') + finish +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Vim syntax file +" +" Language: javascript.jsx +" Maintainer: MaxMellon +" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +let s:jsx_cpo = &cpo +set cpo&vim + +syntax case match + +if exists('b:current_syntax') + let s:current_syntax = b:current_syntax + unlet b:current_syntax +endif + +if exists('s:current_syntax') + let b:current_syntax = s:current_syntax +endif + +if hlexists("jsDebugger") || hlexists("jsNoise") " yuezk/vim-js or pangloss/vim-javascript + syntax cluster jsExpression add=jsxRegion +elseif hlexists("javascriptOpSymbols") " othree/yajs.vim + " refine the javascript line comment + syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend + syntax cluster javascriptValue add=jsxRegion + syntax cluster javascriptNoReserved add=jsxElement,jsxTag +else " build-in javascript syntax + " refine the javascript line comment + syntax region javaScriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend + + " refine the template string syntax + syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr + + " add a javaScriptBlock group for build-in syntax + syntax region javaScriptBlock + \ matchgroup=javaScriptBraces + \ start="{" + \ end="}" + \ contained + \ extend + \ contains=javaScriptBlock,@javaScriptEmbededExpr,javaScript.* + \ fold + + syntax cluster javaScriptEmbededExpr add=jsxRegion,javaScript.* +endif + +runtime syntax/jsx_pretty.vim + +let b:current_syntax = 'javascript.jsx' + +let &cpo = s:jsx_cpo +unlet s:jsx_cpo diff --git a/after/syntax/jsx_pretty.vim b/after/syntax/jsx_pretty.vim index 9f14e4d46..115924c49 100644 --- a/after/syntax/jsx_pretty.vim +++ b/after/syntax/jsx_pretty.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/jsx_pretty.vim') + finish +endif let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0) @@ -138,7 +140,7 @@ exe 'syntax match jsxTagName " and " " ~~~~~~~~ -syntax region jsxString start=+\z(["']\)+ skip=+\\\\\|\\\z1\|\\\n+ end=+\z1+ contained contains=@Spell +syntax region jsxString start=+\z(["']\)+ skip=+\\\\\|\\\z1\|\\\n+ end=+\z1+ extend contained contains=@Spell let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'jsx']) let s:enable_tagged_jsx = !empty(s:tags) @@ -221,5 +223,3 @@ if s:vim_jsx_pretty_colorful_config == 1 highlight def link jsArrowFuncArgs Type highlight def link jsFuncArgs Type endif - -endif diff --git a/after/syntax/llvm.vim b/after/syntax/llvm.vim index 04d234a2e..2154a6353 100644 --- a/after/syntax/llvm.vim +++ b/after/syntax/llvm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 +if polyglot#init#is_disabled(expand(':p'), 'llvm', 'after/syntax/llvm.vim') + finish +endif " Copyright (c) 2018 rhysd " @@ -22,5 +24,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 syn keyword llvmKeyword attributes syn match llvmNoName /#\d\+\>/ - -endif diff --git a/after/syntax/mdx.vim b/after/syntax/mdx.vim index 5538f881a..387229248 100644 --- a/after/syntax/mdx.vim +++ b/after/syntax/mdx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mdx') == -1 +if polyglot#init#is_disabled(expand(':p'), 'mdx', 'after/syntax/mdx.vim') + finish +endif " based on mxw/vim-jsx @@ -41,5 +43,3 @@ syn cluster jsExpression add=jsxRegion " Allow jsxRegion to contain reserved words. syn cluster javascriptNoReserved add=jsxRegion - -endif diff --git a/after/syntax/mma.vim b/after/syntax/mma.vim index c01de4d04..bd8a0213b 100644 --- a/after/syntax/mma.vim +++ b/after/syntax/mma.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1 +if polyglot#init#is_disabled(expand(':p'), 'mathematica', 'after/syntax/mma.vim') + finish +endif "Vim conceal file " Language: Mathematica @@ -1442,5 +1444,3 @@ endif hi! link Conceal Normal setlocal conceallevel=2 - -endif diff --git a/after/syntax/objc.vim b/after/syntax/objc.vim index 093688b1f..d0b48090e 100644 --- a/after/syntax/objc.vim +++ b/after/syntax/objc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 +if polyglot#init#is_disabled(expand(':p'), 'objc', 'after/syntax/objc.vim') + finish +endif " ARC type modifiers syn keyword objcTypeModifier __bridge __bridge_retained __bridge_transfer __autoreleasing __strong __weak __unsafe_unretained @@ -19,5 +21,3 @@ syn match objcDirective "@property\|@synthesize\|@dynamic\|@package" " Highlight property attributes as if they were type modifiers hi def link objcPropertyAttribute objcTypeModifier - -endif diff --git a/after/syntax/php/graphql.vim b/after/syntax/php/graphql.vim new file mode 100644 index 000000000..958a3753d --- /dev/null +++ b/after/syntax/php/graphql.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/php/graphql.vim') + finish +endif + +" Copyright (c) 2016-2021 Jon Parise +" +" 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 + +if exists('b:current_syntax') + let s:current_syntax = b:current_syntax + unlet b:current_syntax +endif + +let b:graphql_nested_syntax = 1 +syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + +if exists('s:current_syntax') + let b:current_syntax = s:current_syntax +endif + +syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(gql\)\c\(\i*\)\)\2$" end="^\s*\z1\>" contained contains=@GraphQLSyntax,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend +syntax region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(gql\)\c\(\i*\)\)'$" end="^\s*\z1\>" contained contains=@GraphQLSyntax,@Spell keepend extend diff --git a/after/syntax/puppet.vim b/after/syntax/puppet.vim new file mode 100644 index 000000000..e39f48d0c --- /dev/null +++ b/after/syntax/puppet.vim @@ -0,0 +1,28 @@ +if polyglot#init#is_disabled(expand(':p'), 'yard', 'after/syntax/puppet.vim') + finish +endif + +" Puppet syntax extensions for highlighting YARD documentation. +" +" Author: Gabriel Filion +" URI: https://github.com/noprompt/vim-yardoc +" Version: 0.0.1 +" +" This file reuses the main yardoc syntax definitions and glues them together +" with puppet syntax groups from vim-puppet + +runtime! after/syntax/yardoc_support.vim + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Yard glue to puppet +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell,yardComment +syn region puppetComment start="/\*" end="\*/" contains=puppetTodo,@Spell,yardComment extend fold keepend +syn cluster puppetNotTop add=@yardTags,@yardDirectives,@yardTypes,@yardLists,@yardHashes + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Tacking on Yard to puppet syntax classes +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +hi def link yardComment puppetComment +hi def link yardGenericTag puppetKeyword +hi def link yardGenericDirective puppetKeyword diff --git a/after/syntax/reason.vim b/after/syntax/reason.vim index 3be396903..b64d866da 100644 --- a/after/syntax/reason.vim +++ b/after/syntax/reason.vim @@ -1,4 +1,4 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 - - +if polyglot#init#is_disabled(expand(':p'), 'reason', 'after/syntax/reason.vim') + finish endif + diff --git a/after/syntax/reason/graphql.vim b/after/syntax/reason/graphql.vim index 44a5c846d..47a63e624 100644 --- a/after/syntax/reason/graphql.vim +++ b/after/syntax/reason/graphql.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/reason/graphql.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -27,11 +29,14 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif -syntax region graphqlMultilineString matchgroup=reasonMultilineString start=+graphql\_s*\zs{|+ end=+|}+ contains=@GraphQLSyntax,reasonEscape,reasonEscapeUnicode,reasonEscapeError,reasonStringContinuation keepend - -endif +syntax region graphqlExtensionPoint start=+\[%\(graphql\|relay\)+ end=+\]+ contains=graphqlExtensionPointS +syntax region graphqlExtensionPointS matchgroup=String start=+{|+ end=+|}+ contains=@GraphQLSyntax contained diff --git a/after/syntax/rescript/graphql.vim b/after/syntax/rescript/graphql.vim new file mode 100644 index 000000000..1e5ed04ca --- /dev/null +++ b/after/syntax/rescript/graphql.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/rescript/graphql.vim') + finish +endif + +" Copyright (c) 2016-2021 Jon Parise +" +" 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 + +if exists('b:current_syntax') + let s:current_syntax = b:current_syntax + unlet b:current_syntax +endif + +let b:graphql_nested_syntax = 1 +syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + +if exists('s:current_syntax') + let b:current_syntax = s:current_syntax +endif + +syntax region graphqlExtensionPoint start=+%\(graphql\|relay\)(+ end=+)+ contains=graphqlExtensionPointS +syntax region graphqlExtensionPointS matchgroup=String start=+`+ end=+`+ contains=@GraphQLSyntax contained diff --git a/after/syntax/rspec.vim b/after/syntax/rspec.vim index 96ceb28ff..d83bbaccf 100644 --- a/after/syntax/rspec.vim +++ b/after/syntax/rspec.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rspec') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rspec', 'after/syntax/rspec.vim') + finish +endif " " An rspec syntax file @@ -189,5 +191,3 @@ highlight link rspecMatchers Function highlight link rspecMessageExpectation Function let b:current_syntax = 'rspec' - -endif diff --git a/after/syntax/ruby.vim b/after/syntax/ruby.vim index 00cd07d93..85de287ef 100644 --- a/after/syntax/ruby.vim +++ b/after/syntax/ruby.vim @@ -1,130 +1,28 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yard') == -1 +if polyglot#init#is_disabled(expand(':p'), 'yard', 'after/syntax/ruby.vim') + finish +endif " Ruby syntax extensions for highlighting YARD documentation. " " Author: Joel Holdbrooks " URI: https://github.com/noprompt/vim-yardoc " Version: 0.0.1 +" +" This file reuses the main yardoc syntax definitions and glues them together +" with Vim's builtin ruby syntax groups -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Tags -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -syn match yardGenericTag "@\h\+" contained -syn match yardAbstract "@abstract" contained -syn match yardApi "@api" contained -syn match yardAttr "@attr" contained -syn match yardAttrReader "@attr_reader" contained -syn match yardAttrWriter "@attr_writer" contained -syn match yardAuthor "@author" contained -syn match yardDeprecated "@deprecated" contained -syn match yardExample "@example" contained -syn match yardNote "@note" contained -syn match yardOption "@option" contained -syn match yardOverload "@overload" contained -syn match yardParam "@param" contained -syn match yardPrivate "@private" contained -syn match yardRaise "@raise" contained -syn match yardReturn "@return" contained -syn match yardSee "@see" contained -syn match yardSince "@since" contained -syn match yardTodo "@todo" contained -syn match yardVersion "@version" contained -syn match yardYield "@yield" contained -syn match yardYieldParam "@yieldparam" contained -syn match yardYieldReturn "@yieldreturn" contained -syn cluster yardTags contains=yardGenericTag,yardAbstract,yardApi,yardAttr,yardAttrReader,yardAttrWriter,yardAuthor,yardDeprecated,yardExample,yardNote,yardOption,yardOverload,yardParam,yardPrivate,yardRaise,yardReturn,yardSee,yardSince,yardTodo,yardVersion,yardYield,yardYieldParam,yardYieldReturn - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Directives -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -syn match yardGenericDirective "@!\h\+" contained -syn match yardAttribute "@!attribute" contained -syn match yardEndGroup "@!endgroup" contained -syn match yardGroup "@!group" contained -syn match yardMacro "@!macro" contained -syn match yardMethod "@!method" contained -syn match yardParse "@!parse" contained -syn match yardScope "@!scope" contained -syn match yardVisibility "@!visibility" contained - -syn cluster yardDirectives contains=yardGenericDirective,yardAttribute,yardEndGroup,yardGroup,yardMacro,yardMethod,yardParse,yardScope,yardVisibility - -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Types, Lists, and Hashes -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -syn match yardDuckType "#\h\+" contained -syn match yardType "[A-Z]\h\+" contained -syn match yardLiteral "\(true\|false\|nil\|self\|void\)" contained -syn match yardComma "," nextgroup=@yardTypes contained -syn match yardArrow "=>" nextgroup=@yardTypes contained - -syn region yardParametricType start="[A-Z]\+\h\+<" end=">" contains=yardType,yardOrderDependentList,yardComma skipwhite contained -syn region yardOrderDependentList start="(" end=")" contains=@yardTypes,yardComma skipwhite contained -syn region yardTypeList start="\[" end="]" contains=@yardTypes,yardOrderDependentList,@yardHashes skipwhite contained -syn region yardHashAngle start="Hash<" end=">" contains=yardDuckType,yardType,yardLiteral,yardArrow,yardComma skipwhite contained -syn region yardHashCurly start="Hash{" end="}" contains=@yardTypes,yardArrow,yardComma skipwhite contained - -syn cluster yardTypes contains=yardDuckType,yardType,yardLiteral,yardParametricType -syn cluster yardHashes contains=yardArrow,yardHashAngle,yardHashCurly -syn cluster yardLists contains=yardComma,yardTypeList,yardOrderDependentList +runtime! after/syntax/yardoc_support.vim """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" Yard +" Yard glue to ruby """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -syn match yardComment "#\s*@!\{,1}\h\+.*" contains=@yardTags,@yardDirectives,yardTypeList syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell,yardComment syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@:p'), 'rust', 'after/syntax/rust.vim') + finish +endif scriptencoding utf-8 @@ -41,5 +43,3 @@ if !get(g:, 'rust_conceal_mod_path', 0) endif " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/after/syntax/tex.vim b/after/syntax/tex.vim new file mode 100644 index 000000000..e99af17f8 --- /dev/null +++ b/after/syntax/tex.vim @@ -0,0 +1,1344 @@ +if polyglot#init#is_disabled(expand(':p'), 'tex', 'after/syntax/tex.vim') + finish +endif + +" Vim syntax file +" Language: TeX +" Maintainer: Charles E. Campbell +" Last Change: Jun 29, 2020 +" Version: 119 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX +" +" Notes: {{{1 +" +" 1. If you have a \begin{verbatim} that appears to overrun its boundaries, +" use %stopzone. +" +" 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped +" by suitable use of %stopzone. +" +" 3. If you have a slow computer, you may wish to modify +" +" syn sync maxlines=200 +" syn sync minlines=50 +" +" to values that are more to your liking. +" +" 4. There is no match-syncing for $...$ and $$...$$; hence large +" equation blocks constructed that way may exhibit syncing problems. +" (there's no difference between begin/end patterns) +" +" 5. If you have the variable "g:tex_no_error" defined then none of the +" lexical error-checking will be done. +" +" ie. let g:tex_no_error=1 +" +" 6. Please see :help latex-syntax for information on +" syntax folding :help tex-folding +" spell checking :help tex-nospell +" commands and mathzones :help tex-runon +" new command highlighting :help tex-morecommands +" error highlighting :help tex-error +" new math groups :help tex-math +" new styles :help tex-style +" using conceal mode :help tex-conceal + +" Version Clears: {{{1 +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim +scriptencoding utf-8 + +" by default, enable all region-based highlighting +let s:tex_fast= "bcmMprsSvV" +if exists("g:tex_fast") + if type(g:tex_fast) != 1 + " g:tex_fast exists and is not a string, so + " turn off all optional region-based highighting + let s:tex_fast= "" + else + let s:tex_fast= g:tex_fast + endif +endif + +" let user determine which classes of concealment will be supported +" a=accents/ligatures d=delimiters m=math symbols g=Greek s=superscripts/subscripts +if !exists("g:tex_conceal") + let s:tex_conceal= 'abdmgsS' +else + let s:tex_conceal= g:tex_conceal +endif +if !exists("g:tex_superscripts") + let s:tex_superscripts= '[0-9a-zA-W.,:;+-<>/()=]' +else + let s:tex_superscripts= g:tex_superscripts +endif +if !exists("g:tex_subscripts") + let s:tex_subscripts= '[0-9aehijklmnoprstuvx,+-/().]' +else + let s:tex_subscripts= g:tex_subscripts +endif + +" Determine whether or not to use "*.sty" mode {{{1 +" The user may override the normal determination by setting +" g:tex_stylish to 1 (for "*.sty" mode) +" or to 0 else (normal "*.tex" mode) +" or on a buffer-by-buffer basis with b:tex_stylish +let s:extfname=expand("%:e") +if exists("g:tex_stylish") + let b:tex_stylish= g:tex_stylish +elseif !exists("b:tex_stylish") + if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s:extfname == "ltx" + let b:tex_stylish= 1 + else + let b:tex_stylish= 0 + endif +endif + +" handle folding {{{1 +if !exists("g:tex_fold_enabled") + let s:tex_fold_enabled= 0 +elseif g:tex_fold_enabled && !has("folding") + let s:tex_fold_enabled= 0 + echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support" +else + let s:tex_fold_enabled= 1 +endif +if s:tex_fold_enabled && &fdm == "manual" + setl fdm=syntax +endif +if s:tex_fold_enabled && has("folding") + com! -nargs=* TexFold fold +else + com! -nargs=* TexFold +endif + +" (La)TeX keywords: uses the characters 0-9,a-z,A-Z,192-255 only... {{{1 +" but _ is the only one that causes problems. +" One may override this iskeyword setting by providing +" g:tex_isk +if exists("g:tex_isk") + if b:tex_stylish && g:tex_isk !~ '@' + let b:tex_isk= '@,'.g:tex_isk + else + let b:tex_isk= g:tex_isk + endif +elseif b:tex_stylish + let b:tex_isk="@,48-57,a-z,A-Z,192-255" +else + let b:tex_isk="48-57,a-z,A-Z,192-255" +endif +if (v:version == 704 && has("patch-7.4.1142")) || v:version > 704 + exe "syn iskeyword ".b:tex_isk +else + exe "setl isk=".b:tex_isk +endif +if exists("g:tex_no_error") && g:tex_no_error + let s:tex_no_error= 1 +else + let s:tex_no_error= 0 +endif +if exists("g:tex_comment_nospell") && g:tex_comment_nospell + let s:tex_comment_nospell= 1 +else + let s:tex_comment_nospell= 0 +endif +if exists("g:tex_nospell") && g:tex_nospell + let s:tex_nospell = 1 +else + let s:tex_nospell = 0 +endif +if exists("g:tex_matchcheck") + let s:tex_matchcheck= g:tex_matchcheck +else + let s:tex_matchcheck= '[({[]' +endif +if exists("g:tex_excludematcher") + let s:tex_excludematcher= g:tex_excludematcher +else + let s:tex_excludematcher= 0 +endif + +" Clusters: {{{1 +" -------- +syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texBeginEnd,texBeginEndName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,@texMathZones +if !s:tex_no_error + syn cluster texCmdGroup add=texMathError +endif +syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement +syn cluster texFoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMatcher,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texItalStyle,texEmphStyle,texNoSpell +syn cluster texBoldGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texBoldStyle,texBoldItalStyle,texNoSpell +syn cluster texItalGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texInputFile,texLength,texLigature,texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ,texNewCmd,texNewEnv,texOnlyMath,texOption,texParen,texRefZone,texSection,texBeginEnd,texSectionZone,texSpaceCode,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,@texMathZones,texTitle,texAbstract,texItalStyle,texEmphStyle,texItalBoldStyle,texNoSpell +if !s:tex_excludematcher + syn cluster texBoldGroup add=texMatcher + syn cluster texItalGroup add=texMatcher +endif +if !s:tex_nospell + syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell + syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,@Spell + syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texBoldStyle,texBoldItalStyle,texItalStyle,texItalBoldStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher,@Spell +else + syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption + syn cluster texMatchNMGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption + syn cluster texStyleGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texStyleStatement,texStyleMatcher +endif +syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ +syn cluster texRefGroup contains=texMatcher,texComment,texDelimiter +if !exists("g:tex_no_math") + syn cluster texPreambleMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcherNM,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTitle,texTypeSize,texTypeStyle,texZone,texInputFile,texOption,texMathZoneZ + syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ + syn cluster texMatchGroup add=@texMathZones + syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 + syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone + syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texMathSymbol,texMathText,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle + if !s:tex_no_error + syn cluster texMathMatchGroup add=texMathError + syn cluster texMathZoneGroup add=texMathError + endif + syn cluster texMathZoneGroup add=@NoSpell + " following used in the \part \chapter \section \subsection \subsubsection + " \paragraph \subparagraph \author \title highlighting + syn cluster texDocGroup contains=texPartZone,@texPartGroup + syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone + syn cluster texChapterGroup contains=texSectionZone,texParaZone + syn cluster texSectionGroup contains=texSubSectionZone,texParaZone + syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone + syn cluster texSubSubSectionGroup contains=texParaZone + syn cluster texParaGroup contains=texSubParaZone + if has("conceal") && &enc == 'utf-8' + syn cluster texMathZoneGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol + syn cluster texMathMatchGroup add=texGreek,texSuperscript,texSubscript,texMathSymbol + endif +endif + +" Try to flag {}, [], and () mismatches: {{{1 +if s:tex_fast =~# 'm' + if !s:tex_no_error + if s:tex_matchcheck =~ '{' + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup,texError + syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup,texError + endif + if s:tex_matchcheck =~ '\[' + syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup,texError,@NoSpell + syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup,texError,@NoSpell + endif + else + if s:tex_matchcheck =~ '{' + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchGroup + syn region texMatcherNM matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" transparent contains=@texMatchNMGroup + endif + if s:tex_matchcheck =~ '\[' + syn region texMatcher matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchGroup + syn region texMatcherNM matchgroup=Delimiter start="\[" end="]" transparent contains=@texMatchNMGroup + endif + endif + if s:tex_matchcheck =~ '(' + if !s:tex_nospell + syn region texParen start="(" end=")" transparent contains=@texMatchGroup,@Spell + else + syn region texParen start="(" end=")" transparent contains=@texMatchGroup + endif + endif +endif +if !s:tex_no_error + if s:tex_matchcheck =~ '(' + syn match texError "[}\]]" + else + syn match texError "[}\])]" + endif +endif +if s:tex_fast =~# 'M' + if !exists("g:tex_no_math") + if !s:tex_no_error + syn match texMathError "}" contained + endif + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\%(\\\\\)*\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup + endif +endif + +" TeX/LaTeX keywords: {{{1 +" Instead of trying to be All Knowing, I just match \..alphameric.. +" Note that *.tex files may not have "@" in their \commands +if exists("g:tex_tex") || b:tex_stylish + syn match texStatement "\\[a-zA-Z@]\+" +else + syn match texStatement "\\\a\+" + if !s:tex_no_error + syn match texError "\\\a*@[a-zA-Z@]*" + endif +endif + +" TeX/LaTeX delimiters: {{{1 +syn match texDelimiter "&" +syn match texDelimiter "\\\\" + +" Tex/Latex Options: {{{1 +syn match texOption "[^\\]\zs#\d\+\|^#\d\+" + +" texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1 +if b:tex_stylish + syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 +else + syn match texAccent "\\[bcdvuH]\A"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)\A"me=e-1 +endif +syn match texAccent "\\[bcdvuH]$" +syn match texAccent +\\[=^.\~"`']+ +syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+ +syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" + + +" \begin{}/\end{} section markers: {{{1 +syn match texBeginEnd "\\begin\>\|\\end\>" nextgroup=texBeginEndName +if s:tex_fast =~# 'm' + syn region texBeginEndName matchgroup=Delimiter start="{" end="}" contained nextgroup=texBeginEndModifier contains=texComment + syn region texBeginEndModifier matchgroup=Delimiter start="\[" end="]" contained contains=texComment,@texMathZones,@NoSpell +endif + +" \documentclass, \documentstyle, \usepackage: {{{1 +syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texBeginEndName,texDocTypeArgs +if s:tex_fast =~# 'm' + syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texBeginEndName contains=texComment,@NoSpell +endif + +" Preamble syntax-based folding support: {{{1 +if s:tex_fold_enabled && has("folding") + syn region texPreamble transparent fold start='\zs\\documentclass\>' end='\ze\\begin{document}' contains=texStyle,@texPreambleMatchGroup +endif + +" TeX input: {{{1 +syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatement +syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt +syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt +syn match texInputCurlies "[{}]" contained +if s:tex_fast =~# 'm' + syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained contains=texComment +endif + +" Type Styles (LaTeX 2.09): {{{1 +syn match texTypeStyle "\\rm\>" +syn match texTypeStyle "\\em\>" +syn match texTypeStyle "\\bf\>" +syn match texTypeStyle "\\it\>" +syn match texTypeStyle "\\sl\>" +syn match texTypeStyle "\\sf\>" +syn match texTypeStyle "\\sc\>" +syn match texTypeStyle "\\tt\>" + +" Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1 +if s:tex_conceal !~# 'b' + syn match texTypeStyle "\\textbf\>" + syn match texTypeStyle "\\textit\>" + syn match texTypeStyle "\\emph\>" +endif +syn match texTypeStyle "\\textmd\>" +syn match texTypeStyle "\\textrm\>" + +syn match texTypeStyle "\\mathbb\>" +syn match texTypeStyle "\\mathbf\>" +syn match texTypeStyle "\\mathcal\>" +syn match texTypeStyle "\\mathfrak\>" +syn match texTypeStyle "\\mathit\>" +syn match texTypeStyle "\\mathnormal\>" +syn match texTypeStyle "\\mathrm\>" +syn match texTypeStyle "\\mathsf\>" +syn match texTypeStyle "\\mathtt\>" + +syn match texTypeStyle "\\rmfamily\>" +syn match texTypeStyle "\\sffamily\>" +syn match texTypeStyle "\\ttfamily\>" + +syn match texTypeStyle "\\itshape\>" +syn match texTypeStyle "\\scshape\>" +syn match texTypeStyle "\\slshape\>" +syn match texTypeStyle "\\upshape\>" + +syn match texTypeStyle "\\bfseries\>" +syn match texTypeStyle "\\mdseries\>" + +" Some type sizes: {{{1 +syn match texTypeSize "\\tiny\>" +syn match texTypeSize "\\scriptsize\>" +syn match texTypeSize "\\footnotesize\>" +syn match texTypeSize "\\small\>" +syn match texTypeSize "\\normalsize\>" +syn match texTypeSize "\\large\>" +syn match texTypeSize "\\Large\>" +syn match texTypeSize "\\LARGE\>" +syn match texTypeSize "\\huge\>" +syn match texTypeSize "\\Huge\>" + +" Spacecodes (TeX'isms): {{{1 +" \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x +syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar +syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained + +" Sections, subsections, etc: {{{1 +if s:tex_fast =~# 'p' + if !s:tex_nospell + TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup,@Spell + TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup,@Spell + TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup,@Spell + TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup,@Spell + TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup,@Spell + TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup,@Spell + TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup,@Spell + TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@Spell + TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup,@Spell + TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup,@Spell + else + TexFold syn region texDocZone matchgroup=texSection start='\\begin\s*{\s*document\s*}' end='\\end\s*{\s*document\s*}' contains=@texFoldGroup,@texDocGroup + TexFold syn region texPartZone matchgroup=texSection start='\\part\>' end='\ze\s*\\\%(part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texPartGroup + TexFold syn region texChapterZone matchgroup=texSection start='\\chapter\>' end='\ze\s*\\\%(chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texChapterGroup + TexFold syn region texSectionZone matchgroup=texSection start='\\section\>' end='\ze\s*\\\%(section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSectionGroup + TexFold syn region texSubSectionZone matchgroup=texSection start='\\subsection\>' end='\ze\s*\\\%(\%(sub\)\=section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSectionGroup + TexFold syn region texSubSubSectionZone matchgroup=texSection start='\\subsubsection\>' end='\ze\s*\\\%(\%(sub\)\{,2}section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texSubSubSectionGroup + TexFold syn region texParaZone matchgroup=texSection start='\\paragraph\>' end='\ze\s*\\\%(paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup,@texParaGroup + TexFold syn region texSubParaZone matchgroup=texSection start='\\subparagraph\>' end='\ze\s*\\\%(\%(sub\)\=paragraph\>\|\%(sub\)*section\>\|chapter\>\|part\>\|end\s*{\s*document\s*}\)' contains=@texFoldGroup + TexFold syn region texTitle matchgroup=texSection start='\\\%(author\|title\)\>\s*{' end='}' contains=@texFoldGroup + TexFold syn region texAbstract matchgroup=texSection start='\\begin\s*{\s*abstract\s*}' end='\\end\s*{\s*abstract\s*}' contains=@texFoldGroup + endif +endif + +" particular support for bold and italic {{{1 +if s:tex_fast =~# 'b' + if s:tex_conceal =~# 'b' + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell + syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell + syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell + syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell + syn region texEmphStyle matchgroup=texTypeStyle start="\\emph\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup,@Spell + syn region texEmphStyle matchgroup=texTypeStyle start="\\texts[cfl]\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell + syn region texEmphStyle matchgroup=texTypeStyle start="\\textup\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell + syn region texEmphStyle matchgroup=texTypeStyle start="\\texttt\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup,@Spell + else + syn region texBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup + syn region texBoldItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup + syn region texItalStyle matchgroup=texTypeStyle start="\\textit\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup + syn region texItalBoldStyle matchgroup=texTypeStyle start="\\textbf\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texBoldGroup + syn region texEmphStyle matchgroup=texTypeStyle start="\\emph\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texItalGroup + syn region texEmphStyle matchgroup=texTypeStyle start="\\texts[cfl]\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup + syn region texEmphStyle matchgroup=texTypeStyle start="\\textup\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup + syn region texEmphStyle matchgroup=texTypeStyle start="\\texttt\s*{" matchgroup=texTypeStyle end="}" concealends contains=@texEmphGroup + endif + endif +endif + +" Bad Math (mismatched): {{{1 +if !exists("g:tex_no_math") && !s:tex_no_error + syn match texBadMath "\\end\s*{\s*\(array\|[bBpvV]matrix\|split\|smallmatrix\)\s*}" + syn match texBadMath "\\end\s*{\s*\(displaymath\|equation\|eqnarray\|math\)\*\=\s*}" + syn match texBadMath "\\[\])]" +endif + +" Math Zones: {{{1 +if !exists("g:tex_no_math") + " TexNewMathZone: function creates a mathzone with the given suffix and mathzone name. {{{2 + " Starred forms are created if starform is true. Starred + " forms have syntax group and synchronization groups with a + " "S" appended. Handles: cluster, syntax, sync, and highlighting. + fun! TexNewMathZone(sfx,mathzone,starform) + let grpname = "texMathZone".a:sfx + let syncname = "texSyncMathZone".a:sfx + if s:tex_fold_enabled + let foldcmd= " fold" + else + let foldcmd= "" + endif + exe "syn cluster texMathZones add=".grpname + if s:tex_fast =~# 'M' + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + endif + exe 'hi def link '.grpname.' texMath' + if a:starform + let grpname = "texMathZone".a:sfx.'S' + let syncname = "texSyncMathZone".a:sfx.'S' + exe "syn cluster texMathZones add=".grpname + if s:tex_fast =~# 'M' + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup'.foldcmd + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + endif + exe 'hi def link '.grpname.' texMath' + endif + endfun + + " Standard Math Zones: {{{2 + call TexNewMathZone("A","displaymath",1) + call TexNewMathZone("B","eqnarray",1) + call TexNewMathZone("C","equation",1) + call TexNewMathZone("D","math",1) + + " Inline Math Zones: {{{2 + if s:tex_fast =~# 'M' + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'd' + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend concealends contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" concealends contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend concealends contains=@texMathZoneGroup + else + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\%(\\\\\)*\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup + endif + syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup + endif + + syn match texMathOper "[_^=]" contained + + " Text Inside Math Zones: {{{2 + if s:tex_fast =~# 'M' + if !exists("g:tex_nospell") || !g:tex_nospell + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup,@Spell + else + syn region texMathText matchgroup=texStatement start='\\\(\(inter\)\=text\|mbox\)\s*{' end='}' contains=@texFoldGroup + endif + endif + + " \left..something.. and \right..something.. support: {{{2 + syn match texMathDelimBad contained "\S" + if has("conceal") && &enc == 'utf-8' && s:tex_conceal =~# 'm' + syn match texMathDelim contained "\\left\[" + syn match texMathDelim contained "\\left\\{" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar={ + syn match texMathDelim contained "\\right\\}" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad contains=texMathSymbol cchar=} + let s:texMathDelimList=[ + \ ['<' , '<'] , + \ ['>' , '>'] , + \ ['(' , '('] , + \ [')' , ')'] , + \ ['\[' , '['] , + \ [']' , ']'] , + \ ['\\{' , '{'] , + \ ['\\}' , '}'] , + \ ['|' , '|'] , + \ ['\\|' , '‖'] , + \ ['\\backslash' , '\'] , + \ ['\\downarrow' , '↓'] , + \ ['\\Downarrow' , '⇓'] , + \ ['\\lbrace' , '['] , + \ ['\\lceil' , '⌈'] , + \ ['\\lfloor' , '⌊'] , + \ ['\\lgroup' , '⌊'] , + \ ['\\lmoustache' , '⎛'] , + \ ['\\rbrace' , ']'] , + \ ['\\rceil' , '⌉'] , + \ ['\\rfloor' , '⌋'] , + \ ['\\rgroup' , '⌋'] , + \ ['\\rmoustache' , '⎞'] , + \ ['\\uparrow' , '↑'] , + \ ['\\Uparrow' , '↑'] , + \ ['\\updownarrow', '↕'] , + \ ['\\Updownarrow', '⇕']] + if &ambw == "double" || exists("g:tex_usedblwidth") + let s:texMathDelimList= s:texMathDelimList + [ + \ ['\\langle' , '〈'] , + \ ['\\rangle' , '〉']] + else + let s:texMathDelimList= s:texMathDelimList + [ + \ ['\\langle' , '<'] , + \ ['\\rangle' , '>']] + endif + syn match texMathDelim '\\[bB]igg\=[lr]' contained nextgroup=texMathDelimBad + for texmath in s:texMathDelimList + exe "syn match texMathDelim '\\\\[bB]igg\\=[lr]\\=".texmath[0]."' contained conceal cchar=".texmath[1] + endfor + + else + syn match texMathDelim contained "\\\(left\|right\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + syn match texMathDelim contained "\\[bB]igg\=[lr]\=\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad + syn match texMathDelimSet1 contained "[<>()[\]|/.]\|\\[{}|]" + syn keyword texMathDelimKey contained backslash lceil lVert rgroup uparrow + syn keyword texMathDelimKey contained downarrow lfloor rangle rmoustache Uparrow + syn keyword texMathDelimKey contained Downarrow lgroup rbrace rvert updownarrow + syn keyword texMathDelimKey contained langle lmoustache rceil rVert Updownarrow + syn keyword texMathDelimKey contained lbrace lvert rfloor + endif + syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>" + syn match texMathDelim contained "\\lefteqn\>" +endif + +" Special TeX characters ( \$ \& \% \# \{ \} \_ \S \P ) : {{{1 +syn match texSpecialChar "\\[$&%#{}_]" +if b:tex_stylish + syn match texSpecialChar "\\[SP@][^a-zA-Z@]"me=e-1 +else + syn match texSpecialChar "\\[SP@]\A"me=e-1 +endif +syn match texSpecialChar "\\\\" +if !exists("g:tex_no_math") + syn match texOnlyMath "[_^]" +endif +syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S" +if s:tex_conceal !~# 'S' + syn match texSpecialChar '\\glq\>' contained conceal cchar=‚ + syn match texSpecialChar '\\grq\>' contained conceal cchar=‘ + syn match texSpecialChar '\\glqq\>' contained conceal cchar=„ + syn match texSpecialChar '\\grqq\>' contained conceal cchar=“ + syn match texSpecialChar '\\hyp\>' contained conceal cchar=- +endif + +" Comments: {{{1 +" Normal TeX LaTeX : %.... +" Documented TeX Format: ^^A... -and- leading %s (only) +if !s:tex_comment_nospell + syn cluster texCommentGroup contains=texTodo,@Spell +else + syn cluster texCommentGroup contains=texTodo,@NoSpell +endif +syn case ignore +syn keyword texTodo contained combak fixme todo xxx +syn case match +if s:extfname == "dtx" + syn match texComment "\^\^A.*$" contains=@texCommentGroup + syn match texComment "^%\+" contains=@texCommentGroup +else + if s:tex_fold_enabled + " allows syntax-folding of 2 or more contiguous comment lines + " single-line comments are not folded + syn match texComment "%.*$" contains=@texCommentGroup + if s:tex_fast =~# 'c' + TexFold syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' contains=@texCommentGroup + TexFold syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif + else + syn match texComment "%.*$" contains=@texCommentGroup + if s:tex_fast =~# 'c' + syn region texNoSpell contained matchgroup=texComment start="%\s*nospell\s*{" end="%\s*nospell\s*}" contains=@texFoldGroup,@NoSpell + endif + endif +endif + +" %begin-include ... %end-include acts like a texDocZone for \include'd files. Permits spell checking, for example, in such files. +if !s:tex_nospell + TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup,@Spell +else + TexFold syn region texDocZone matchgroup=texSection start='^\s*%begin-include\>' end='^\s*%end-include\>' contains=@texFoldGroup,@texDocGroup +endif + +" Separate lines used for verb` and verb# so that the end conditions {{{1 +" will appropriately terminate. +" If g:tex_verbspell exists, then verbatim texZones will permit spellchecking there. +if s:tex_fast =~# 'v' + if exists("g:tex_verbspell") && g:tex_verbspell + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" contains=@Spell + " listings package: + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" contains=@Spell + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" contains=@Spell + endif + else + syn region texZone start="\\begin{[vV]erbatim}" end="\\end{[vV]erbatim}\|%stopzone\>" + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" + endif + endif +endif + +" Tex Reference Zones: {{{1 +if s:tex_fast =~# 'r' + syn region texZone matchgroup=texStatement start="@samp{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\nocite{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\bibliography{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\label{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefZone matchgroup=texStatement start="\\v\=ref{" end="}\|%stopzone\>" contains=@texRefGroup + syn region texRefOption contained matchgroup=Delimiter start='\[' end=']' contains=@texRefGroup,texRefZone nextgroup=texRefOption,texCite + syn region texCite contained matchgroup=Delimiter start='{' end='}' contains=@texRefGroup,texRefZone,texCite +endif +syn match texRefZone '\\cite\%([tp]\*\=\)\=\>' nextgroup=texRefOption,texCite + +" Handle newcommand, newenvironment : {{{1 +syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl +if s:tex_fast =~# 'V' + syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl + syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl + syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup +endif +syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl +if s:tex_fast =~# 'V' + syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl + syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup + syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup +endif + +" Definitions/Commands: {{{1 +syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl +if b:tex_stylish + syn match texDefName contained "\\[a-zA-Z@]\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\[^a-zA-Z@]" nextgroup=texDefParms,texCmdBody skipwhite skipnl +else + syn match texDefName contained "\\\a\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\\A" nextgroup=texDefParms,texCmdBody skipwhite skipnl +endif +syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdBody skipwhite skipnl +syn match texDefParm contained "#\d\+" + +" TeX Lengths: {{{1 +syn match texLength "\<\d\+\([.,]\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" + +" TeX String Delimiters: {{{1 +syn match texString "\(``\|''\|,,\)" + +" makeatletter -- makeatother sections +if !s:tex_no_error + if s:tex_fast =~# 'S' + syn region texStyle matchgroup=texStatement start='\\makeatletter' end='\\makeatother' contains=@texStyleGroup contained + endif + syn match texStyleStatement "\\[a-zA-Z@]\+" contained + if s:tex_fast =~# 'S' + syn region texStyleMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texStyleGroup,texError contained + syn region texStyleMatcher matchgroup=Delimiter start="\[" end="]" contains=@texStyleGroup,texError contained + endif +endif + +" Conceal mode support (supports set cole=2) {{{1 +if has("conceal") && &enc == 'utf-8' + + " Math Symbols {{{2 + " (many of these symbols were contributed by Björn Winckler) + if s:tex_conceal =~# 'm' + let s:texMathList=[ + \ ['|' , '‖'], + \ ['aleph' , 'ℵ'], + \ ['amalg' , '∐'], + \ ['angle' , '∠'], + \ ['approx' , '≈'], + \ ['ast' , '∗'], + \ ['asymp' , '≍'], + \ ['backslash' , '∖'], + \ ['bigcap' , '∩'], + \ ['bigcirc' , '○'], + \ ['bigcup' , '∪'], + \ ['bigodot' , '⊙'], + \ ['bigoplus' , '⊕'], + \ ['bigotimes' , '⊗'], + \ ['bigsqcup' , '⊔'], + \ ['bigtriangledown', '∇'], + \ ['bigtriangleup' , '∆'], + \ ['bigvee' , '⋁'], + \ ['bigwedge' , '⋀'], + \ ['bot' , '⊥'], + \ ['bowtie' , '⋈'], + \ ['bullet' , '•'], + \ ['cap' , '∩'], + \ ['cdot' , '·'], + \ ['cdots' , '⋯'], + \ ['circ' , '∘'], + \ ['clubsuit' , '♣'], + \ ['cong' , '≅'], + \ ['coprod' , '∐'], + \ ['copyright' , '©'], + \ ['cup' , '∪'], + \ ['dagger' , '†'], + \ ['dashv' , '⊣'], + \ ['ddagger' , '‡'], + \ ['ddots' , '⋱'], + \ ['diamond' , '⋄'], + \ ['diamondsuit' , '♢'], + \ ['div' , '÷'], + \ ['doteq' , '≐'], + \ ['dots' , '…'], + \ ['downarrow' , '↓'], + \ ['Downarrow' , '⇓'], + \ ['ell' , 'ℓ'], + \ ['emptyset' , '∅'], + \ ['equiv' , '≡'], + \ ['exists' , '∃'], + \ ['flat' , '♭'], + \ ['forall' , '∀'], + \ ['frown' , '⁔'], + \ ['ge' , '≥'], + \ ['geq' , '≥'], + \ ['gets' , '←'], + \ ['gg' , '⟫'], + \ ['hbar' , 'ℏ'], + \ ['heartsuit' , '♡'], + \ ['hookleftarrow' , '↩'], + \ ['hookrightarrow' , '↪'], + \ ['iff' , '⇔'], + \ ['Im' , 'ℑ'], + \ ['imath' , 'ɩ'], + \ ['in' , '∈'], + \ ['infty' , '∞'], + \ ['int' , '∫'], + \ ['jmath' , '𝚥'], + \ ['land' , '∧'], + \ ['lceil' , '⌈'], + \ ['ldots' , '…'], + \ ['le' , '≤'], + \ ['left|' , '|'], + \ ['left\\|' , '‖'], + \ ['left(' , '('], + \ ['left\[' , '['], + \ ['left\\{' , '{'], + \ ['leftarrow' , '←'], + \ ['Leftarrow' , '⇐'], + \ ['leftharpoondown', '↽'], + \ ['leftharpoonup' , '↼'], + \ ['leftrightarrow' , '↔'], + \ ['Leftrightarrow' , '⇔'], + \ ['leq' , '≤'], + \ ['leq' , '≤'], + \ ['lfloor' , '⌊'], + \ ['ll' , '≪'], + \ ['lmoustache' , '╭'], + \ ['lor' , '∨'], + \ ['mapsto' , '↦'], + \ ['mid' , '∣'], + \ ['models' , '╞'], + \ ['mp' , '∓'], + \ ['nabla' , '∇'], + \ ['natural' , '♮'], + \ ['ne' , '≠'], + \ ['nearrow' , '↗'], + \ ['neg' , '¬'], + \ ['neq' , '≠'], + \ ['ni' , '∋'], + \ ['notin' , '∉'], + \ ['nwarrow' , '↖'], + \ ['odot' , '⊙'], + \ ['oint' , '∮'], + \ ['ominus' , '⊖'], + \ ['oplus' , '⊕'], + \ ['oslash' , '⊘'], + \ ['otimes' , '⊗'], + \ ['owns' , '∋'], + \ ['P' , '¶'], + \ ['parallel' , '║'], + \ ['partial' , '∂'], + \ ['perp' , '⊥'], + \ ['pm' , '±'], + \ ['prec' , '≺'], + \ ['preceq' , '⪯'], + \ ['prime' , '′'], + \ ['prod' , '∏'], + \ ['propto' , '∝'], + \ ['rceil' , '⌉'], + \ ['Re' , 'ℜ'], + \ ['quad' , ' '], + \ ['qquad' , ' '], + \ ['rfloor' , '⌋'], + \ ['right|' , '|'], + \ ['right\\|' , '‖'], + \ ['right)' , ')'], + \ ['right]' , ']'], + \ ['right\\}' , '}'], + \ ['rightarrow' , '→'], + \ ['Rightarrow' , '⇒'], + \ ['rightleftharpoons', '⇌'], + \ ['rmoustache' , '╮'], + \ ['S' , '§'], + \ ['searrow' , '↘'], + \ ['setminus' , '∖'], + \ ['sharp' , '♯'], + \ ['sim' , '∼'], + \ ['simeq' , '⋍'], + \ ['smile' , '‿'], + \ ['spadesuit' , '♠'], + \ ['sqcap' , '⊓'], + \ ['sqcup' , '⊔'], + \ ['sqsubset' , '⊏'], + \ ['sqsubseteq' , '⊑'], + \ ['sqsupset' , '⊐'], + \ ['sqsupseteq' , '⊒'], + \ ['star' , '✫'], + \ ['subset' , '⊂'], + \ ['subseteq' , '⊆'], + \ ['succ' , '≻'], + \ ['succeq' , '⪰'], + \ ['sum' , '∑'], + \ ['supset' , '⊃'], + \ ['supseteq' , '⊇'], + \ ['surd' , '√'], + \ ['swarrow' , '↙'], + \ ['times' , '×'], + \ ['to' , '→'], + \ ['top' , '⊤'], + \ ['triangle' , '∆'], + \ ['triangleleft' , '⊲'], + \ ['triangleright' , '⊳'], + \ ['uparrow' , '↑'], + \ ['Uparrow' , '⇑'], + \ ['updownarrow' , '↕'], + \ ['Updownarrow' , '⇕'], + \ ['vdash' , '⊢'], + \ ['vdots' , '⋮'], + \ ['vee' , '∨'], + \ ['wedge' , '∧'], + \ ['wp' , '℘'], + \ ['wr' , '≀']] + if &ambw == "double" || exists("g:tex_usedblwidth") + let s:texMathList= s:texMathList + [ + \ ['right\\rangle' , '〉'], + \ ['left\\langle' , '〈']] + else + let s:texMathList= s:texMathList + [ + \ ['right\\rangle' , '>'], + \ ['left\\langle' , '<']] + endif + for texmath in s:texMathList + if texmath[0] =~# '\w$' + exe "syn match texMathSymbol '\\\\".texmath[0]."\\>' contained conceal cchar=".texmath[1] + else + exe "syn match texMathSymbol '\\\\".texmath[0]."' contained conceal cchar=".texmath[1] + endif + endfor + + if &ambw == "double" + syn match texMathSymbol '\\gg\>' contained conceal cchar=≫ + syn match texMathSymbol '\\ll\>' contained conceal cchar=≪ + else + syn match texMathSymbol '\\gg\>' contained conceal cchar=⟫ + syn match texMathSymbol '\\ll\>' contained conceal cchar=⟪ + endif + + syn match texMathSymbol '\\hat{a}' contained conceal cchar=â + syn match texMathSymbol '\\hat{A}' contained conceal cchar= + syn match texMathSymbol '\\hat{c}' contained conceal cchar=ĉ + syn match texMathSymbol '\\hat{C}' contained conceal cchar=Ĉ + syn match texMathSymbol '\\hat{e}' contained conceal cchar=ê + syn match texMathSymbol '\\hat{E}' contained conceal cchar=Ê + syn match texMathSymbol '\\hat{g}' contained conceal cchar=ĝ + syn match texMathSymbol '\\hat{G}' contained conceal cchar=Ĝ + syn match texMathSymbol '\\hat{i}' contained conceal cchar=î + syn match texMathSymbol '\\hat{I}' contained conceal cchar=Î + syn match texMathSymbol '\\hat{o}' contained conceal cchar=ô + syn match texMathSymbol '\\hat{O}' contained conceal cchar=Ô + syn match texMathSymbol '\\hat{s}' contained conceal cchar=ŝ + syn match texMathSymbol '\\hat{S}' contained conceal cchar=Ŝ + syn match texMathSymbol '\\hat{u}' contained conceal cchar=û + syn match texMathSymbol '\\hat{U}' contained conceal cchar=Û + syn match texMathSymbol '\\hat{w}' contained conceal cchar=ŵ + syn match texMathSymbol '\\hat{W}' contained conceal cchar=Ŵ + syn match texMathSymbol '\\hat{y}' contained conceal cchar=ŷ + syn match texMathSymbol '\\hat{Y}' contained conceal cchar=Ŷ +" syn match texMathSymbol '\\bar{a}' contained conceal cchar=a̅ + + syn match texMathSymbol '\\dot{B}' contained conceal cchar=Ḃ + syn match texMathSymbol '\\dot{b}' contained conceal cchar=ḃ + syn match texMathSymbol '\\dot{D}' contained conceal cchar=Ḋ + syn match texMathSymbol '\\dot{d}' contained conceal cchar=ḋ + syn match texMathSymbol '\\dot{F}' contained conceal cchar=Ḟ + syn match texMathSymbol '\\dot{f}' contained conceal cchar=ḟ + syn match texMathSymbol '\\dot{H}' contained conceal cchar=Ḣ + syn match texMathSymbol '\\dot{h}' contained conceal cchar=ḣ + syn match texMathSymbol '\\dot{M}' contained conceal cchar=Ṁ + syn match texMathSymbol '\\dot{m}' contained conceal cchar=ṁ + syn match texMathSymbol '\\dot{N}' contained conceal cchar=Ṅ + syn match texMathSymbol '\\dot{n}' contained conceal cchar=ṅ + syn match texMathSymbol '\\dot{P}' contained conceal cchar=Ṗ + syn match texMathSymbol '\\dot{p}' contained conceal cchar=ṗ + syn match texMathSymbol '\\dot{R}' contained conceal cchar=Ṙ + syn match texMathSymbol '\\dot{r}' contained conceal cchar=ṙ + syn match texMathSymbol '\\dot{S}' contained conceal cchar=Ṡ + syn match texMathSymbol '\\dot{s}' contained conceal cchar=ṡ + syn match texMathSymbol '\\dot{T}' contained conceal cchar=Ṫ + syn match texMathSymbol '\\dot{t}' contained conceal cchar=ṫ + syn match texMathSymbol '\\dot{W}' contained conceal cchar=Ẇ + syn match texMathSymbol '\\dot{w}' contained conceal cchar=ẇ + syn match texMathSymbol '\\dot{X}' contained conceal cchar=Ẋ + syn match texMathSymbol '\\dot{x}' contained conceal cchar=ẋ + syn match texMathSymbol '\\dot{Y}' contained conceal cchar=Ẏ + syn match texMathSymbol '\\dot{y}' contained conceal cchar=ẏ + syn match texMathSymbol '\\dot{Z}' contained conceal cchar=Ż + syn match texMathSymbol '\\dot{z}' contained conceal cchar=ż + + syn match texMathSymbol '\\dot{C}' contained conceal cchar=Ċ + syn match texMathSymbol '\\dot{c}' contained conceal cchar=ċ + syn match texMathSymbol '\\dot{E}' contained conceal cchar=Ė + syn match texMathSymbol '\\dot{e}' contained conceal cchar=ė + syn match texMathSymbol '\\dot{G}' contained conceal cchar=Ġ + syn match texMathSymbol '\\dot{g}' contained conceal cchar=ġ + syn match texMathSymbol '\\dot{I}' contained conceal cchar=İ + + syn match texMathSymbol '\\dot{A}' contained conceal cchar=Ȧ + syn match texMathSymbol '\\dot{a}' contained conceal cchar=ȧ + syn match texMathSymbol '\\dot{O}' contained conceal cchar=Ȯ + syn match texMathSymbol '\\dot{o}' contained conceal cchar=ȯ + endif + + " Greek {{{2 + if s:tex_conceal =~# 'g' + fun! s:Greek(group,pat,cchar) + exe 'syn match '.a:group." '".a:pat."' contained conceal cchar=".a:cchar + endfun + call s:Greek('texGreek','\\alpha\>' ,'α') + call s:Greek('texGreek','\\beta\>' ,'β') + call s:Greek('texGreek','\\gamma\>' ,'γ') + call s:Greek('texGreek','\\delta\>' ,'δ') + call s:Greek('texGreek','\\epsilon\>' ,'ϵ') + call s:Greek('texGreek','\\varepsilon\>' ,'ε') + call s:Greek('texGreek','\\zeta\>' ,'ζ') + call s:Greek('texGreek','\\eta\>' ,'η') + call s:Greek('texGreek','\\theta\>' ,'θ') + call s:Greek('texGreek','\\vartheta\>' ,'ϑ') + call s:Greek('texGreek','\\iota\>' ,'ι') + call s:Greek('texGreek','\\kappa\>' ,'κ') + call s:Greek('texGreek','\\lambda\>' ,'λ') + call s:Greek('texGreek','\\mu\>' ,'μ') + call s:Greek('texGreek','\\nu\>' ,'ν') + call s:Greek('texGreek','\\xi\>' ,'ξ') + call s:Greek('texGreek','\\pi\>' ,'π') + call s:Greek('texGreek','\\varpi\>' ,'ϖ') + call s:Greek('texGreek','\\rho\>' ,'ρ') + call s:Greek('texGreek','\\varrho\>' ,'ϱ') + call s:Greek('texGreek','\\sigma\>' ,'σ') + call s:Greek('texGreek','\\varsigma\>' ,'ς') + call s:Greek('texGreek','\\tau\>' ,'τ') + call s:Greek('texGreek','\\upsilon\>' ,'υ') + call s:Greek('texGreek','\\phi\>' ,'ϕ') + call s:Greek('texGreek','\\varphi\>' ,'φ') + call s:Greek('texGreek','\\chi\>' ,'χ') + call s:Greek('texGreek','\\psi\>' ,'ψ') + call s:Greek('texGreek','\\omega\>' ,'ω') + call s:Greek('texGreek','\\Gamma\>' ,'Γ') + call s:Greek('texGreek','\\Delta\>' ,'Δ') + call s:Greek('texGreek','\\Theta\>' ,'Θ') + call s:Greek('texGreek','\\Lambda\>' ,'Λ') + call s:Greek('texGreek','\\Xi\>' ,'Ξ') + call s:Greek('texGreek','\\Pi\>' ,'Π') + call s:Greek('texGreek','\\Sigma\>' ,'Σ') + call s:Greek('texGreek','\\Upsilon\>' ,'Υ') + call s:Greek('texGreek','\\Phi\>' ,'Φ') + call s:Greek('texGreek','\\Chi\>' ,'Χ') + call s:Greek('texGreek','\\Psi\>' ,'Ψ') + call s:Greek('texGreek','\\Omega\>' ,'Ω') + delfun s:Greek + endif + + " Superscripts/Subscripts {{{2 + if s:tex_conceal =~# 's' + if s:tex_fast =~# 's' + syn region texSuperscript matchgroup=Delimiter start='\^{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSuperscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + syn region texSubscript matchgroup=Delimiter start='_{' skip="\\\\\|\\[{}]" end='}' contained concealends contains=texSpecialChar,texSubscripts,texStatement,texSubscript,texSuperscript,texMathMatcher + endif + " s:SuperSub: + fun! s:SuperSub(group,leader,pat,cchar) + if a:pat =~# '^\\' || (a:leader == '\^' && a:pat =~# s:tex_superscripts) || (a:leader == '_' && a:pat =~# s:tex_subscripts) +" call Decho("SuperSub: group<".a:group."> leader<".a:leader."> pat<".a:pat."> cchar<".a:cchar.">") + exe 'syn match '.a:group." '".a:leader.a:pat."' contained conceal cchar=".a:cchar + exe 'syn match '.a:group."s '".a:pat ."' contained conceal cchar=".a:cchar.' nextgroup='.a:group.'s' + endif + endfun + call s:SuperSub('texSuperscript','\^','0','⁰') + call s:SuperSub('texSuperscript','\^','1','¹') + call s:SuperSub('texSuperscript','\^','2','²') + call s:SuperSub('texSuperscript','\^','3','³') + call s:SuperSub('texSuperscript','\^','4','⁴') + call s:SuperSub('texSuperscript','\^','5','⁵') + call s:SuperSub('texSuperscript','\^','6','⁶') + call s:SuperSub('texSuperscript','\^','7','⁷') + call s:SuperSub('texSuperscript','\^','8','⁸') + call s:SuperSub('texSuperscript','\^','9','⁹') + call s:SuperSub('texSuperscript','\^','a','ᵃ') + call s:SuperSub('texSuperscript','\^','b','ᵇ') + call s:SuperSub('texSuperscript','\^','c','ᶜ') + call s:SuperSub('texSuperscript','\^','d','ᵈ') + call s:SuperSub('texSuperscript','\^','e','ᵉ') + call s:SuperSub('texSuperscript','\^','f','ᶠ') + call s:SuperSub('texSuperscript','\^','g','ᵍ') + call s:SuperSub('texSuperscript','\^','h','ʰ') + call s:SuperSub('texSuperscript','\^','i','ⁱ') + call s:SuperSub('texSuperscript','\^','j','ʲ') + call s:SuperSub('texSuperscript','\^','k','ᵏ') + call s:SuperSub('texSuperscript','\^','l','ˡ') + call s:SuperSub('texSuperscript','\^','m','ᵐ') + call s:SuperSub('texSuperscript','\^','n','ⁿ') + call s:SuperSub('texSuperscript','\^','o','ᵒ') + call s:SuperSub('texSuperscript','\^','p','ᵖ') + call s:SuperSub('texSuperscript','\^','r','ʳ') + call s:SuperSub('texSuperscript','\^','s','ˢ') + call s:SuperSub('texSuperscript','\^','t','ᵗ') + call s:SuperSub('texSuperscript','\^','u','ᵘ') + call s:SuperSub('texSuperscript','\^','v','ᵛ') + call s:SuperSub('texSuperscript','\^','w','ʷ') + call s:SuperSub('texSuperscript','\^','x','ˣ') + call s:SuperSub('texSuperscript','\^','y','ʸ') + call s:SuperSub('texSuperscript','\^','z','ᶻ') + call s:SuperSub('texSuperscript','\^','A','ᴬ') + call s:SuperSub('texSuperscript','\^','B','ᴮ') + call s:SuperSub('texSuperscript','\^','D','ᴰ') + call s:SuperSub('texSuperscript','\^','E','ᴱ') + call s:SuperSub('texSuperscript','\^','G','ᴳ') + call s:SuperSub('texSuperscript','\^','H','ᴴ') + call s:SuperSub('texSuperscript','\^','I','ᴵ') + call s:SuperSub('texSuperscript','\^','J','ᴶ') + call s:SuperSub('texSuperscript','\^','K','ᴷ') + call s:SuperSub('texSuperscript','\^','L','ᴸ') + call s:SuperSub('texSuperscript','\^','M','ᴹ') + call s:SuperSub('texSuperscript','\^','N','ᴺ') + call s:SuperSub('texSuperscript','\^','O','ᴼ') + call s:SuperSub('texSuperscript','\^','P','ᴾ') + call s:SuperSub('texSuperscript','\^','R','ᴿ') + call s:SuperSub('texSuperscript','\^','T','ᵀ') + call s:SuperSub('texSuperscript','\^','U','ᵁ') + call s:SuperSub('texSuperscript','\^','V','ⱽ') + call s:SuperSub('texSuperscript','\^','W','ᵂ') + call s:SuperSub('texSuperscript','\^',',','︐') + call s:SuperSub('texSuperscript','\^',':','︓') + call s:SuperSub('texSuperscript','\^',';','︔') + call s:SuperSub('texSuperscript','\^','+','⁺') + call s:SuperSub('texSuperscript','\^','-','⁻') + call s:SuperSub('texSuperscript','\^','<','˂') + call s:SuperSub('texSuperscript','\^','>','˃') + call s:SuperSub('texSuperscript','\^','/','ˊ') + call s:SuperSub('texSuperscript','\^','(','⁽') + call s:SuperSub('texSuperscript','\^',')','⁾') + call s:SuperSub('texSuperscript','\^','\.','˙') + call s:SuperSub('texSuperscript','\^','=','˭') + call s:SuperSub('texSubscript','_','0','₀') + call s:SuperSub('texSubscript','_','1','₁') + call s:SuperSub('texSubscript','_','2','₂') + call s:SuperSub('texSubscript','_','3','₃') + call s:SuperSub('texSubscript','_','4','₄') + call s:SuperSub('texSubscript','_','5','₅') + call s:SuperSub('texSubscript','_','6','₆') + call s:SuperSub('texSubscript','_','7','₇') + call s:SuperSub('texSubscript','_','8','₈') + call s:SuperSub('texSubscript','_','9','₉') + call s:SuperSub('texSubscript','_','a','ₐ') + call s:SuperSub('texSubscript','_','e','ₑ') + call s:SuperSub('texSubscript','_','h','ₕ') + call s:SuperSub('texSubscript','_','i','ᵢ') + call s:SuperSub('texSubscript','_','j','ⱼ') + call s:SuperSub('texSubscript','_','k','ₖ') + call s:SuperSub('texSubscript','_','l','ₗ') + call s:SuperSub('texSubscript','_','m','ₘ') + call s:SuperSub('texSubscript','_','n','ₙ') + call s:SuperSub('texSubscript','_','o','ₒ') + call s:SuperSub('texSubscript','_','p','ₚ') + call s:SuperSub('texSubscript','_','r','ᵣ') + call s:SuperSub('texSubscript','_','s','ₛ') + call s:SuperSub('texSubscript','_','t','ₜ') + call s:SuperSub('texSubscript','_','u','ᵤ') + call s:SuperSub('texSubscript','_','v','ᵥ') + call s:SuperSub('texSubscript','_','x','ₓ') + call s:SuperSub('texSubscript','_',',','︐') + call s:SuperSub('texSubscript','_','+','₊') + call s:SuperSub('texSubscript','_','-','₋') + call s:SuperSub('texSubscript','_','/','ˏ') + call s:SuperSub('texSubscript','_','(','₍') + call s:SuperSub('texSubscript','_',')','₎') + call s:SuperSub('texSubscript','_','\.','‸') + call s:SuperSub('texSubscript','_','r','ᵣ') + call s:SuperSub('texSubscript','_','v','ᵥ') + call s:SuperSub('texSubscript','_','x','ₓ') + call s:SuperSub('texSubscript','_','\\beta\>' ,'ᵦ') + call s:SuperSub('texSubscript','_','\\delta\>','ᵨ') + call s:SuperSub('texSubscript','_','\\phi\>' ,'ᵩ') + call s:SuperSub('texSubscript','_','\\gamma\>','ᵧ') + call s:SuperSub('texSubscript','_','\\chi\>' ,'ᵪ') + + delfun s:SuperSub + endif + + " Accented characters and Ligatures: {{{2 + if s:tex_conceal =~# 'a' + if b:tex_stylish + syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 + syn match texLigature '--' + syn match texLigature '---' + else + fun! s:Accents(chr,...) + let i= 1 + for accent in ["`","\\'","^",'"','\~','\.','=',"c","H","k","r","u","v"] + if i > a:0 + break + endif + if strlen(a:{i}) == 0 || a:{i} == ' ' || a:{i} == '?' + let i= i + 1 + continue + endif + if accent =~# '\a' + exe "syn match texAccent '".'\\'.accent.'\(\s*{'.a:chr.'}\|\s\+'.a:chr.'\)'."' conceal cchar=".a:{i} + else + exe "syn match texAccent '".'\\'.accent.'\s*\({'.a:chr.'}\|'.a:chr.'\)'."' conceal cchar=".a:{i} + endif + let i= i + 1 + endfor + endfun + " \` \' \^ \" \~ \. \= \c \H \k \r \u \v + call s:Accents('a','à','á','â','ä','ã','ȧ','ā',' ',' ','ą','å','ă','ǎ') + call s:Accents('A','À','Á','Â','Ä','Ã','Ȧ','Ā',' ',' ','Ą','Å','Ă','Ǎ') + call s:Accents('c',' ','ć','ĉ',' ',' ','ċ',' ','ç',' ',' ',' ',' ','č') + call s:Accents('C',' ','Ć','Ĉ',' ',' ','Ċ',' ','Ç',' ',' ',' ',' ','Č') + call s:Accents('d',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ď') + call s:Accents('D',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ď') + call s:Accents('e','è','é','ê','ë','ẽ','ė','ē','ȩ',' ','ę',' ','ĕ','ě') + call s:Accents('E','È','É','Ê','Ë','Ẽ','Ė','Ē','Ȩ',' ','Ę',' ','Ĕ','Ě') + call s:Accents('g',' ','ǵ','ĝ',' ',' ','ġ',' ','ģ',' ',' ',' ','ğ','ǧ') + call s:Accents('G',' ','Ǵ','Ĝ',' ',' ','Ġ',' ','Ģ',' ',' ',' ','Ğ','Ǧ') + call s:Accents('h',' ',' ','ĥ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ȟ') + call s:Accents('H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','Ȟ') + call s:Accents('i','ì','í','î','ï','ĩ','į','ī',' ',' ','į',' ','ĭ','ǐ') + call s:Accents('I','Ì','Í','Î','Ï','Ĩ','İ','Ī',' ',' ','Į',' ','Ĭ','Ǐ') + call s:Accents('J',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','ǰ') + call s:Accents('k',' ',' ',' ',' ',' ',' ',' ','ķ',' ',' ',' ',' ','ǩ') + call s:Accents('K',' ',' ',' ',' ',' ',' ',' ','Ķ',' ',' ',' ',' ','Ǩ') + call s:Accents('l',' ','ĺ','ľ',' ',' ',' ',' ','ļ',' ',' ',' ',' ','ľ') + call s:Accents('L',' ','Ĺ','Ľ',' ',' ',' ',' ','Ļ',' ',' ',' ',' ','Ľ') + call s:Accents('n',' ','ń',' ',' ','ñ',' ',' ','ņ',' ',' ',' ',' ','ň') + call s:Accents('N',' ','Ń',' ',' ','Ñ',' ',' ','Ņ',' ',' ',' ',' ','Ň') + call s:Accents('o','ò','ó','ô','ö','õ','ȯ','ō',' ','ő','ǫ',' ','ŏ','ǒ') + call s:Accents('O','Ò','Ó','Ô','Ö','Õ','Ȯ','Ō',' ','Ő','Ǫ',' ','Ŏ','Ǒ') + call s:Accents('r',' ','ŕ',' ',' ',' ',' ',' ','ŗ',' ',' ',' ',' ','ř') + call s:Accents('R',' ','Ŕ',' ',' ',' ',' ',' ','Ŗ',' ',' ',' ',' ','Ř') + call s:Accents('s',' ','ś','ŝ',' ',' ',' ',' ','ş',' ','ȿ',' ',' ','š') + call s:Accents('S',' ','Ś','Ŝ',' ',' ',' ',' ','Ş',' ',' ',' ',' ','Š') + call s:Accents('t',' ',' ',' ',' ',' ',' ',' ','ţ',' ',' ',' ',' ','ť') + call s:Accents('T',' ',' ',' ',' ',' ',' ',' ','Ţ',' ',' ',' ',' ','Ť') + call s:Accents('u','ù','ú','û','ü','ũ',' ','ū',' ','ű','ų','ů','ŭ','ǔ') + call s:Accents('U','Ù','Ú','Û','Ü','Ũ',' ','Ū',' ','Ű','Ų','Ů','Ŭ','Ǔ') + call s:Accents('w',' ',' ','ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('W',' ',' ','Ŵ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('y','ỳ','ý','ŷ','ÿ','ỹ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('Y','Ỳ','Ý','Ŷ','Ÿ','Ỹ',' ',' ',' ',' ',' ',' ',' ',' ') + call s:Accents('z',' ','ź',' ',' ',' ','ż',' ',' ',' ',' ',' ',' ','ž') + call s:Accents('Z',' ','Ź',' ',' ',' ','Ż',' ',' ',' ',' ',' ',' ','Ž') + call s:Accents('\\i','ì','í','î','ï','ĩ','į',' ',' ',' ',' ',' ','ĭ',' ') + " \` \' \^ \" \~ \. \= \c \H \k \r \u \v + delfun s:Accents + syn match texAccent '\\aa\>' conceal cchar=å + syn match texAccent '\\AA\>' conceal cchar=Å + syn match texAccent '\\o\>' conceal cchar=ø + syn match texAccent '\\O\>' conceal cchar=Ø + syn match texLigature '\\AE\>' conceal cchar=Æ + syn match texLigature '\\ae\>' conceal cchar=æ + syn match texLigature '\\oe\>' conceal cchar=œ + syn match texLigature '\\OE\>' conceal cchar=Œ + syn match texLigature '\\ss\>' conceal cchar=ß + syn match texLigature '--' conceal cchar=– + syn match texLigature '---' conceal cchar=— + endif + endif +endif + +" --------------------------------------------------------------------- +" LaTeX synchronization: {{{1 +syn sync maxlines=200 +syn sync minlines=50 + +syn sync match texSyncStop groupthere NONE "%stopzone\>" + +" Synchronization: {{{1 +" The $..$ and $$..$$ make for impossible sync patterns +" (one can't tell if a "$$" starts or stops a math zone by itself) +" The following grouptheres coupled with minlines above +" help improve the odds of good syncing. +if !exists("g:tex_no_math") + syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{center}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{description}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{enumerate}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{itemize}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{table}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{tabular}" + syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>" +endif + +" --------------------------------------------------------------------- +" Highlighting: {{{1 + +" Define the default highlighting. {{{1 +if !exists("skip_tex_syntax_inits") + + " TeX highlighting groups which should share similar highlighting + if !exists("g:tex_no_error") + if !exists("g:tex_no_math") + hi def link texBadMath texError + hi def link texMathDelimBad texError + hi def link texMathError texError + if !b:tex_stylish + hi def link texOnlyMath texError + endif + endif + hi def link texError Error + endif + + hi texBoldStyle gui=bold cterm=bold + hi texItalStyle gui=italic cterm=italic + hi texBoldItalStyle gui=bold,italic cterm=bold,italic + hi texItalBoldStyle gui=bold,italic cterm=bold,italic + hi def link texEmphStyle texItalStyle + hi def link texCite texRefZone + hi def link texDefCmd texDef + hi def link texDefName texDef + hi def link texDocType texCmdName + hi def link texDocTypeArgs texCmdArgs + hi def link texInputFileOpt texCmdArgs + hi def link texInputCurlies texDelimiter + hi def link texLigature texSpecialChar + if !exists("g:tex_no_math") + hi def link texMathDelimSet1 texMathDelim + hi def link texMathDelimSet2 texMathDelim + hi def link texMathDelimKey texMathDelim + hi def link texMathMatcher texMath + hi def link texAccent texStatement + hi def link texGreek texStatement + hi def link texSuperscript texStatement + hi def link texSubscript texStatement + hi def link texSuperscripts texSuperscript + hi def link texSubscripts texSubscript + hi def link texMathSymbol texStatement + hi def link texMathZoneV texMath + hi def link texMathZoneW texMath + hi def link texMathZoneX texMath + hi def link texMathZoneY texMath + hi def link texMathZoneV texMath + hi def link texMathZoneZ texMath + endif + hi def link texBeginEnd texCmdName + hi def link texBeginEndName texSection + hi def link texSpaceCode texStatement + hi def link texStyleStatement texStatement + hi def link texTypeSize texType + hi def link texTypeStyle texType + + " Basic TeX highlighting groups + hi def link texCmdArgs Number + hi def link texCmdName Statement + hi def link texComment Comment + hi def link texDef Statement + hi def link texDefParm Special + hi def link texDelimiter Delimiter + hi def link texInput Special + hi def link texInputFile Special + hi def link texLength Number + hi def link texMath Special + hi def link texMathDelim Statement + hi def link texMathOper Operator + hi def link texNewCmd Statement + hi def link texNewEnv Statement + hi def link texOption Number + hi def link texRefZone Special + hi def link texSection PreCondit + hi def link texSpaceCodeChar Special + hi def link texSpecialChar SpecialChar + hi def link texStatement Statement + hi def link texString String + hi def link texTodo Todo + hi def link texType Type + hi def link texZone PreCondit + +endif + +" Cleanup: {{{1 +delc TexFold +unlet s:extfname +let b:current_syntax = "tex" +let &cpo = s:keepcpo +unlet s:keepcpo +" vim: ts=8 fdm=marker diff --git a/after/syntax/tsx.vim b/after/syntax/tsx.vim index 34a6005e4..933bff827 100644 --- a/after/syntax/tsx.vim +++ b/after/syntax/tsx.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/tsx.vim') + finish +endif """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim syntax file @@ -59,5 +61,3 @@ let b:current_syntax = 'typescript.tsx' let &cpo = s:jsx_cpo unlet s:jsx_cpo - -endif diff --git a/after/syntax/typescript/graphql.vim b/after/syntax/typescript/graphql.vim index 30075e6de..1363f7a5e 100644 --- a/after/syntax/typescript/graphql.vim +++ b/after/syntax/typescript/graphql.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/typescript/graphql.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -27,23 +29,34 @@ if exists('b:current_syntax') let s:current_syntax = b:current_syntax unlet b:current_syntax endif + +let b:graphql_nested_syntax = 1 syn include @GraphQLSyntax syntax/graphql.vim +unlet b:graphql_nested_syntax + if exists('s:current_syntax') let b:current_syntax = s:current_syntax endif let s:tags = '\%(' . join(graphql#javascript_tags(), '\|') . '\)' -exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,typescriptTemplateSubstitution extend' +exec 'syntax region graphqlTemplateString matchgroup=typescriptTemplate start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,typescriptTemplateSubstitution extend' exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString' " Support expression interpolation ((${...})) inside template strings. syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=typescriptTemplateSubstitution containedin=graphqlFold keepend +" support #graphql , #gql comment strings +syntax region graphqlTemplateString + \ start=+`\(#\s\{,4\}\(gql\|graphql\)\)\@=+ + \ skip=+\\\\\|\\`+ + \ end=+`+me=s-1 + \ containedin=typescriptTemplate + \ contained + \ contains=@GraphQLSyntax,typescriptTemplateSubstitution extend + hi def link graphqlTemplateString typescriptTemplate hi def link graphqlTemplateExpression typescriptTemplateSubstitution syn cluster typescriptExpression add=graphqlTaggedTemplate syn cluster graphqlTaggedTemplate add=graphqlTemplateString - -endif diff --git a/after/syntax/typescriptreact.vim b/after/syntax/typescriptreact.vim index 3d8502911..72f824925 100644 --- a/after/syntax/typescriptreact.vim +++ b/after/syntax/typescriptreact.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'after/syntax/typescriptreact.vim') + finish +endif source :h/tsx.vim - -endif diff --git a/after/syntax/typescriptreact/graphql.vim b/after/syntax/typescriptreact/graphql.vim index 62604d200..518c6b68b 100644 --- a/after/syntax/typescriptreact/graphql.vim +++ b/after/syntax/typescriptreact/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/typescriptreact/graphql.vim') + finish +endif runtime! after/syntax/typescript/graphql.vim - -endif diff --git a/after/syntax/vue/graphql.vim b/after/syntax/vue/graphql.vim index c86f9d237..935154d88 100644 --- a/after/syntax/vue/graphql.vim +++ b/after/syntax/vue/graphql.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'after/syntax/vue/graphql.vim') + finish +endif runtime! after/syntax/javascript/graphql.vim - -endif diff --git a/after/syntax/yaml.vim b/after/syntax/yaml.vim deleted file mode 100644 index 097d15359..000000000 --- a/after/syntax/yaml.vim +++ /dev/null @@ -1,65 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 - -" To make this file do stuff, add something like the following (without the -" leading ") to your ~/.vimrc: -" au BufNewFile,BufRead *.yaml,*.yml so ~/src/PyYaml/YAML.vim - -" Vim syntax/macro file -" Language: YAML -" Author: Igor Vergeichik -" Sponsor: Tom Sawyer -" Stayven: Ryan King -" Copyright (c) 2002 Tom Saywer - -" Add an item to a gangly list: -"map , o-o -" Convert to Canonical form: -"map \c :%!python -c 'from yaml.redump import redump; import sys; print redump(sys.stdin.read()).rstrip()' - -if version < 600 - syntax clear -endif -syntax clear - -syn match yamlInline "[\[\]\{\}]" -syn match yamlBlock "[>|]\d\?[+-]" - -syn region yamlComment start="\#" end="$" -syn match yamlIndicator "#YAML:\S\+" - -syn region yamlString start="\(^\|\s\|\[\|\,\|\-\)\@<='" end="'" skip="\\'" -syn region yamlString start='"' end='"' skip='\\"' contains=yamlEscape -syn region yamlString matchgroup=yamlBlock start=/[>|]\s*\n\+\z(\s\+\)\S/rs=s+1 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 -syn region yamlString matchgroup=yamlBlock start=/[>|]\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+2 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 -syn region yamlString matchgroup=yamlBlock start=/[>|]\d\(\d\|[+-]\)\s*\n\+\z(\s\+\)\S/rs=s+3 skip=/^\%(\z1\S\|^$\)/ end=/^\z1\@!.*/me=s-1 -syn match yamlEscape +\\[abfnrtv'"\\]+ contained -syn match yamlEscape "\\\o\o\=\o\=" contained -syn match yamlEscape "\\x\x\+" contained - -syn match yamlType "!\S\+" - -syn keyword yamlConstant NULL Null null NONE None none NIL Nil nil -syn keyword yamlConstant TRUE True true YES Yes yes ON On on -syn keyword yamlConstant FALSE False false NO No no OFF Off off - -syn match yamlKey "^\s*\zs[^ \t\"\'#]\+\ze\s*:" - syn match yamlKey "^\s*-\s*\zs[^ \t\"\'#]\+\ze\s*:" -syn match yamlAnchor "&\S\+" -syn match yamlAlias "*\S\+" - -" Setup the highlighting links - -hi link yamlConstant Keyword -hi link yamlIndicator PreCondit -hi link yamlAnchor Function -hi link yamlAlias Function -hi link yamlKey Identifier -hi link yamlType Type - -hi link yamlComment Comment -hi link yamlInline Operator -hi link yamlBlock Operator -hi link yamlString String -hi link yamlEscape Special - -endif diff --git a/after/syntax/yardoc_support.vim b/after/syntax/yardoc_support.vim new file mode 100644 index 000000000..757ead240 --- /dev/null +++ b/after/syntax/yardoc_support.vim @@ -0,0 +1,128 @@ +if polyglot#init#is_disabled(expand(':p'), 'yard', 'after/syntax/yardoc_support.vim') + finish +endif + +" Generic syntax extensions for highlighting YARD documentation. +" +" Author: Joel Holdbrooks +" URI: https://github.com/noprompt/vim-yardoc +" Version: 0.0.1 + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Tags +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +syn match yardGenericTag "@\h\+" contained +syn match yardAbstract "@abstract" contained +syn match yardApi "@api" contained +syn match yardAttr "@attr" contained +syn match yardAttrReader "@attr_reader" contained +syn match yardAttrWriter "@attr_writer" contained +syn match yardAuthor "@author" contained +syn match yardDeprecated "@deprecated" contained +syn match yardExample "@example" contained +syn match yardNote "@note" contained +syn match yardOption "@option" contained +syn match yardOverload "@overload" contained +syn match yardParam "@param" contained +syn match yardParamName /@param \h\+/hs=s+7 contained contains=yardParam +syn match yardPrivate "@private" contained +syn match yardRaise "@raise" contained +syn match yardReturn "@return" contained +syn match yardSee "@see" contained +syn match yardSince "@since" contained +syn match yardTodo "@todo" contained +syn match yardVersion "@version" contained +syn match yardYield "@yield" contained +syn match yardYieldParam "@yieldparam" contained +syn match yardYieldReturn "@yieldreturn" contained +syn cluster yardTags contains=yardGenericTag,yardAbstract,yardApi,yardAttr,yardAttrReader,yardAttrWriter,yardAuthor,yardDeprecated,yardExample,yardNote,yardOption,yardOverload,yardParam,yardParamName,yardPrivate,yardRaise,yardReturn,yardSee,yardSince,yardTodo,yardVersion,yardYield,yardYieldParam,yardYieldReturn + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Directives +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +syn match yardGenericDirective "@!\h\+" contained +syn match yardAttribute "@!attribute" contained +syn match yardEndGroup "@!endgroup" contained +syn match yardGroup "@!group" contained +syn match yardMacro "@!macro" contained +syn match yardMethod "@!method" contained +syn match yardParse "@!parse" contained +syn match yardScope "@!scope" contained +syn match yardVisibility "@!visibility" contained + +syn cluster yardDirectives contains=yardGenericDirective,yardAttribute,yardEndGroup,yardGroup,yardMacro,yardMethod,yardParse,yardScope,yardVisibility + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Types, Lists, and Hashes +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +syn match yardDuckType "#\h\+" contained +syn match yardType "[A-Z]\h\+" contained +syn match yardLiteral "\(true\|false\|nil\|self\|void\)" contained +syn match yardComma "," nextgroup=@yardTypes contained +syn match yardArrow "=>" nextgroup=@yardTypes contained + +syn region yardParametricType start="[A-Z]\+\h\+<" end=">" contains=yardType,yardOrderDependentList,yardComma skipwhite contained +syn region yardOrderDependentList start="(" end=")" contains=@yardTypes,yardComma skipwhite contained +syn region yardTypeList start="\[" end="]" contains=@yardTypes,yardOrderDependentList,@yardHashes skipwhite contained +syn region yardHashAngle start="Hash<" end=">" contains=yardDuckType,yardType,yardLiteral,yardArrow,yardComma skipwhite contained +syn region yardHashCurly start="Hash{" end="}" contains=@yardTypes,yardArrow,yardComma skipwhite contained + +syn cluster yardTypes contains=yardDuckType,yardType,yardLiteral,yardParametricType +syn cluster yardHashes contains=yardArrow,yardHashAngle,yardHashCurly +syn cluster yardLists contains=yardComma,yardTypeList,yardOrderDependentList + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Yard +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +syn match yardComment "#\s*@!\{,1}\h\+.*" contains=@yardTags,@yardDirectives,yardTypeList + +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Links +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" @note The links to language syntax classes is done in each language syntax +" script. +" +" Tags +hi def link yardAbstract yardGenericTag +hi def link yardApi yardGenericTag +hi def link yardAttr yardGenericTag +hi def link yardAttrReader yardGenericTag +hi def link yardAttrWriter yardGenericTag +hi def link yardAuthor yardGenericTag +hi def link yardDeprecated yardGenericTag +hi def link yardExample yardGenericTag +hi def link yardNote yardGenericTag +hi def link yardOption yardGenericTag +hi def link yardOverload yardGenericTag +hi def link yardParam yardGenericTag +hi def link yardPrivate yardGenericTag +hi def link yardRaise yardGenericTag +hi def link yardReturn yardGenericTag +hi def link yardSee yardGenericTag +hi def link yardSince yardGenericTag +hi def link yardTodo yardGenericTag +hi def link yardVersion yardGenericTag +hi def link yardYield yardGenericTag +hi def link yardYieldParam yardGenericTag +hi def link yardYieldReturn yardGenericTag +" Directives +hi def link yardAttribute yardGenericDirective +hi def link yardEndGroup yardGenericDirective +hi def link yardGroup yardGenericDirective +hi def link yardMacro yardGenericDirective +hi def link yardMethod yardGenericDirective +hi def link yardParse yardGenericDirective +hi def link yardScope yardGenericDirective +hi def link yardVisibility yardGenericDirective +" Types +hi def link yardComma yardComment +hi def link yardType yardComment +hi def link yardDuckType yardComment +hi def link yardLiteral yardComment +" Lists +hi def link yardTypeList yardComment +hi def link yardParametricType yardComment +" Hashes +hi def link yardArrow yardComment +hi def link yardHashAngle yardComment +hi def link yardHashCurly yardComment diff --git a/after/syntax/zsh.vim b/after/syntax/zsh.vim index 30f93b63f..90349e37d 100644 --- a/after/syntax/zsh.vim +++ b/after/syntax/zsh.vim @@ -1,6 +1,9 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zinit') == -1 +if polyglot#init#is_disabled(expand(':p'), 'zinit', 'after/syntax/zsh.vim') + finish +endif " Copyright (c) 2019 Sebastian Gniazdowski +" Copyright (c) 2021 Joakim Gottzén " " Syntax highlighting for Zinit commands in any file of type `zsh'. " It adds definitions for the Zinit syntax to the ones from the @@ -8,119 +11,163 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zinit') == -1 " Main Zinit command. " Should be the only TOP rule for the whole syntax. -syntax match ZinitCommand /\\s/me=e-1 - \ skipwhite - \ nextgroup=ZinitSubCommands,ZinitPluginSubCommands,ZinitSnippetSubCommands - \ contains=ZinitSubCommands,ZinitPluginSubCommands,ZinitSnippetSubCommands - -" TODO: add options for e.g. light -syntax match ZinitSubCommands /\s\<\%(ice\|compinit\|env-whitelist\|cdreplay\|cdclear\|update\)\>\s/ms=s+1,me=e-1 - \ contained - -syntax match ZinitPluginSubCommands /\s\<\%(light\|load\)\>\s/ms=s+1,me=e-1 - \ skipwhite nextgroup=ZinitPlugin1,ZinitPlugin2,ZinitPlugin3 - \ contains=ZinitPlugin1,ZinitPlugin2,ZinitPlugin3 - -syntax match ZinitSnippetSubCommands /\s\<\%(snippet\)\>\s/ms=s+1,me=e-1 - \ skipwhite - \ nextgroup=ZinitSnippetShorthands1,ZinitSnippetShorthands2 - \ contains=ZinitSnippetShorthands1,ZinitSnippetShorthands2 - -" "user/plugin" -syntax match ZinitPlugin1 /\s["]\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)["]/ms=s+1,hs=s+2,he=e-1 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" 'user/plugin' -syntax match ZinitPlugin2 /\s[']\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)[']/ms=s+1,hs=s+2,he=e-1 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" user/plugin -syntax match ZinitPlugin3 /\s\%([!-_]*\%(\/[!-_]\+\)\+\|[!-_]\+\)/ms=s+1,me=e+2 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" OMZ:: or PZT:: -" TODO: 'OMZ:: or 'PZT:: -syntax match ZinitSnippetShorthands1 /\s\<\%(\%(OMZ\|PZT\)\>::\|\)/hs=s+1,he=e-2 - \ contained - \ skipwhite - \ nextgroup=ZinitSnippetUrl1,ZinitSnippetUrl2 - \ contains=ZinitSnippetUrl1,ZinitSnippetUrl2 - -" "OMZ:: or "PZT:: -syntax match ZinitSnippetShorthands2 /\s["]\%(\%(OMZ\|PZT\)\>::\|\)/hs=s+2,he=e-2 - \ contained - \ skipwhite - \ nextgroup=ZinitSnippetUrl3,ZinitSnippetUrl4 - \ contains=ZinitSnippetUrl3,ZinitSnippetUrl4 - -syntax match ZinitSnippetUrl3 /\<\%(http:\/\/\|https:\/\/\|ftp:\/\/\|\$HOME\|\/\)[!-_]\+\%(\/[!-_]\+\)*\/\?["]/he=e-1 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" TODO: Fix ZinitTrailingWhiteSpace not matching -syntax match ZinitSnippetUrl4 /\%(\%(OMZ\|PZT\)::\)[!-_]\+\%(\/[!-_]\+\)*\/\?["]/hs=s+5,he=e-1 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" http://… or https://… or ftp://… or $HOME/… or /… -" TODO: Fix $HOME/… and /… not matching -syntax match ZinitSnippetUrl1 /\<\%(http:\/\/\|https:\/\/\|ftp:\/\/\|\$HOME\|\/\)[!-_]\+\%(\/[!-_]\+\)*\/\?/ - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -" TODO: Fix ZinitTrailingWhiteSpace not matching -syntax match ZinitSnippetUrl2 /\<\%(\%(OMZ\|PZT\)::\)[!-_]\+\%(\/[!-_]\+\)*\/\?/hs=s+5 - \ contained - \ nextgroup=ZinitTrailingWhiteSpace - \ contains=ZinitTrailingWhiteSpace - -syntax match ZinitTrailingWhiteSpace /[[:space:]]\+$/ contained - -" TODO: differentiate the no-value ices -" TODO: use contained -syntax match ZinitIceSubCommand /\sice\s/ms=s+1,me=e-1 nextgroup=ZinitIceModifiers -syntax match ZinitIceModifiers /\s\<\%(svn\|proto\|from\|teleid\|bindmap\|cloneopts\|id-as\|depth\|if\|wait\|load\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(unload\|blockf\|on-update-of\|subscribe\|pick\|bpick\|src\|as\|ver\|silent\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(lucid\|notify\|mv\|cp\|atinit\|atclone\|atload\|atpull\|nocd\|run-atpull\|has\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(cloneonly\|make\|service\|trackbinds\|multisrc\|compile\|nocompile\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(nocompletions\|reset-prompt\|wrap-track\|reset\|aliases\|sh\|bash\|ksh\|csh\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(\\!sh\|!sh\|\\!bash\|!bash\|\\!ksh\|!ksh\|\\!csh\|!csh\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(blockf\|silent\|lucid\|trackbinds\|cloneonly\|nocd\|run-atpull\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(\|sh\|\!sh\|bash\|\!bash\|ksh\|\!ksh\|csh\|\!csh\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(nocompletions\|svn\|aliases\|trigger-load\)\>/ms=s+1 -syntax match ZinitIceModifiers /\s\<\%(light-mode\|is-snippet\|countdown\|ps-on-unload\|ps-on-update\)\>/ms=s+1 - -" Include also ices added by the existing annexes -syntax match ZinitIceModifiers /\s\<\%(test\|zman\|submod\|dl\|patch\|fbin\|sbin\|fsrc\|ferc\|fmod\|gem\|node\|rustup\|cargo\)\>/ms=s+1 - -" Additional Zsh and Zinit functions -syntax match ZshAndZinitFunctions /\<\%(compdef\|compinit\|zpcdreplay\|zpcdclear\|zpcompinit\|zpcompdef\)\>/ - -" Link -highlight def link ZshAndZinitFunctions Keyword -highlight def link ZinitCommand Statement -highlight def link ZinitSubCommands Title -highlight def link ZinitPluginSubCommands Title -highlight def link ZinitSnippetSubCommands Title -highlight def link ZinitIceModifiers Type -highlight def link ZinitSnippetShorthands1 Keyword -highlight def link ZinitSnippetShorthands2 Keyword -highlight def link ZinitPlugin1 Macro -highlight def link ZinitPlugin2 Macro -highlight def link ZinitPlugin3 Macro -highlight def link ZinitSnippetUrl1 Macro -highlight def link ZinitSnippetUrl2 Macro -highlight def link ZinitSnippetUrl3 Macro -highlight def link ZinitSnippetUrl4 Macro -highlight def link ZinitTrailingWhiteSpace Error +syn match ZinitCommand '\(^\|\s\)zinit\s'ms=e-5,me=e-1 skipwhite + \ nextgroup=ZinitCommand,ZinitIceCommand,ZinitPluginCommand,ZinitSnippetCommand,ZinitForCommand,ZinitContinue,ZinitIceWithParam,ZinitIce + +syn match ZinitCommand '\s\%(help\|man\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(unload\)\>'ms=s+1 skipwhite contained " load,light and snippet are handled elsewhere +syn match ZinitCommand '\s\%(clist\|completions\|cdisable\|cenable\|creinstall\|cuninstall\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(csearch\|compinit\|cclear\|cdlist\|cdreplay\|cdclear\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(dtrace\|dstart\|dstop\|dunload\|dreport\|dclear\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(times\|zstatus\|report\|loaded\|list\|ls\|status\|recently\|bindkeys\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(compile\|uncompile\|compiled\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(self-update\|update\|delete\|cd\|edit\|glance\|stress\|changes\|create\)\>'ms=s+1 skipwhite contained +syn match ZinitCommand '\s\%(srv\|recall\|env-whitelist\|module\|add-fpath\|fpath\|run\)\>'ms=s+1 skipwhite contained + +syn match ZinitIceCommand '\sice\s'ms=s+1,me=e-1 skipwhite contained nextgroup=ZinitIce,ZinitIceWithParam + +syn match ZinitPluginCommand '\s\%(light\|load\)\s'ms=s+1,me=e-1 skipwhite contained nextgroup=ZinitPlugin,ZinitContinue + +syn match ZinitSnippetCommand '\s\%(snippet\)\s'ms=s+1,me=e-1 skipwhite contained nextgroup=ZinitSnippet,ZinitContinue + +syn match ZinitForCommand '\sfor\s'ms=s+1,me=e-1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue + +syn cluster ZinitLine contains=ZinitIce,ZinitIceWithParam,ZinitPlugin,ZinitSnippet,ZinitForCommand + +syn match ZinitContinue '\s\\\s*$'ms=s+1,me=s+2 skipwhite contained skipnl + \ nextgroup=@ZinitLine + +" user/plugin or @user/plugin +syn match ZinitPlugin '\s@\?\<[a-zA-Z0-9][a-zA-Z0-9_\-]*\/[a-zA-Z0-9_\-\.]\+\>'ms=s+1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue + +" shorthands +syn match ZinitSnippet '\s\%(OMZ[LPT]\?\|PZT[M]\?\)::[a-zA-Z0-9_\-\.\/]\+\>'ms=s+1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue +" url +syn match ZinitSnippet '\s\%(http[s]\?\|ftp\):\/\/[[:alnum:]%\/_#.-]*\>'ms=s+1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue +" "$VAR" local path +syn match ZinitSnippet +\s"\$\<[a-zA-Z0-9_]\+[^"]*"+ms=s+1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue +" "${VAR}" local path +syn match ZinitSnippet +\s"\${\<[a-zA-Z0-9_]\+}[^"]*"+ms=s+1 skipwhite contained + \ nextgroup=ZinitPlugin,ZinitSnippet,ZinitContinue + +" ices which takes a param enclosed in " +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(proto\|from\|ver\|bpick\|depth\|cloneopts\|pullopts\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(pick\|src\|multisrc\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(wait\|load\|unload\|if\|has\|subscribe\|on-update-of\|trigger-load\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(mv\|cp\|atclone\|atpull\|atinit\|atload\|atdelete\|make\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(as\|id-as\|compile\|nocompile\|service\|bindmap\|wrap-track\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(extract\|subst\|autoload\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(wrap\|ps-on-unload\|ps-on-update\)"+ skip=+\\"+ end=+"+ skipwhite contained + +" zinit packages +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(param\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam + +" added by the existing annexes +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(fbin\|lbin\|sbin\|gem\|node\|pip\|fmod\|fsrc\|ferc\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(dl\|patch\|submods\|cargo\|dlink\|dlink0\)"+ skip=+\\"+ end=+"+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceDoubleQuoteParam + +syn match ZinitIceDoubleQuoteParam +[^"]*+ contained + +" ices that takes a param enclosed in ' +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(proto\|from\|ver\|bpick\|depth\|cloneopts\|pullopts\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(pick\|src\|multisrc\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(wait\|load\|unload\|if\|has\|subscribe\|on-update-of\|trigger-load\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(mv\|cp\|atclone\|atpull\|atinit\|atload\|atdelete\|make\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(as\|id-as\|compile\|nocompile\|service\|bindmap\|wrap-track\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(extract\|subst\|autoload\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(wrap\|ps-on-unload\|ps-on-update\)'+ skip=+\\'+ end=+'+ skipwhite contained + +" zinit packages +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(param\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam + +" added by the existing annexes +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(fbin\|lbin\|sbin\|gem\|node\|pip\|fmod\|fsrc\|ferc\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam +syn region ZinitIceWithParam matchgroup=ZinitIce start=+\s\%(dl\|patch\|submods\|cargo\|dlink\|dlink0\)'+ skip=+\\'+ end=+'+ skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + \ contains=ZinitIceSingleQuoteParam + +syn match ZinitIceSingleQuoteParam +[^']*+ contained + +" ices that doens't take a param +syn match ZinitIce '\s\%(teleid\|svn\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(wait\|cloneonly\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(silent\|lucid\|notify\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(blockf\|nocompletions\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(run-atpull\|nocd\|make\|countdown\|reset\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s!\?\%(sh\|bash\|ksh\|csh\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(id-as\|nocompile\|reset-prompt\|trackbinds\|aliases\|light-mode\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue +syn match ZinitIce '\s\%(is-snippet\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + +" ices that doens't take a param, from zinit packages +syn match ZinitIce '\s\%(pack\|git\|null\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + +" ices that doens't take a param, added by the existing annexes +syn match ZinitIce '\s\%(notest\|rustup\|default-ice\|skip\|debug\)\>'ms=s+1 skipwhite contained + \ nextgroup=@ZinitLine,ZinitContinue + +" additional Zsh and zinit functions +syn match ZshAndZinitFunctions '\<\%(compdef\|compinit\|zpcdreplay\|zpcdclear\|zpcompinit\|zpcompdef\)\>' + +" highlights +hi def link ZinitCommand Statement +hi def link ZinitCommand Title +hi def link ZinitIceCommand Title +hi def link ZinitPluginCommand Title +hi def link ZinitSnippetCommand Title +hi def link ZinitForCommand zshRepeat +hi def link ZinitContinue Normal +hi def link ZinitPlugin Macro +hi def link ZinitSnippet Macro +hi def link ZinitIce Type +hi def link ZinitIceDoubleQuoteParam Special +hi def link ZinitIceSingleQuoteParam Special +hi def link ZshAndZinitFunctions Keyword -endif diff --git a/autoload/LaTeXtoUnicode.vim b/autoload/LaTeXtoUnicode.vim index 8e6714dc5..b512a734e 100644 --- a/autoload/LaTeXtoUnicode.vim +++ b/autoload/LaTeXtoUnicode.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 +if polyglot#init#is_disabled(expand(':p'), 'julia', 'autoload/LaTeXtoUnicode.vim') + finish +endif """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Support for LaTex-to-Unicode conversion as in the Julia REPL " @@ -10,28 +12,14 @@ function! s:L2U_Setup() " Keep track of whether LaTeX-to-Unicode is activated " (used when filetype changes) - if !has_key(b:, "l2u_enabled") - let b:l2u_enabled = 0 - endif - if !has_key(b:, "l2u_autodetect_enable") - let b:l2u_autodetect_enable = 1 - endif - - " Did we install the L2U tab mappings? - if !has_key(b:, "l2u_tab_set") - let b:l2u_tab_set = 0 - endif - if !has_key(b:, "l2u_cmdtab_set") - let b:l2u_cmdtab_set = 0 - endif - if !has_key(b:, "l2u_keymap_set") - let b:l2u_keymap_set = 0 - endif + let b:l2u_enabled = get(b:, "l2u_enabled", 0) + let b:l2u_autodetect_enable = get(b:, "l2u_autodetect_enable", 1) - " Did we activate the L2U as-you-type substitutions? - if !has_key(b:, "l2u_autosub_set") - let b:l2u_autosub_set = 0 - endif + " Did we install the L2U tab/as-you-type/keymap... mappings? + let b:l2u_tab_set = get(b:, "l2u_tab_set", 0) + let b:l2u_cmdtab_set = get(b:, "l2u_cmdtab_set", 0) + let b:l2u_autosub_set = get(b:, "l2u_autosub_set", 0) + let b:l2u_keymap_set = get(b:, "l2u_keymap_set", 0) " Following are some flags used to pass information between the function which " attempts the LaTeX-to-Unicode completion and the fallback function @@ -40,10 +28,6 @@ function! s:L2U_Setup() let b:l2u_found_completion = 0 " Is the cursor just after a single backslash let b:l2u_singlebslash = 0 - " Backup value of the completeopt settings - " (since we temporarily add the 'longest' setting while - " attempting LaTeX-to-Unicode) - let b:l2u_backup_commpleteopt = &completeopt " Are we in the middle of a L2U tab completion? let b:l2u_tab_completing = 0 " Are we calling the tab fallback? @@ -66,7 +50,7 @@ function! s:L2U_SetupGlobal() call s:L2U_deprecated_options() if v:version < 704 - let g:latex_to_unicode_tab = 0 + let g:latex_to_unicode_tab = "off" let g:latex_to_unicode_auto = 0 endif @@ -79,17 +63,16 @@ function! s:L2U_SetupGlobal() let g:latex_to_unicode_suggestions = 0 endif - " A hack to forcibly get out of completion mode: feed - " this string with feedkeys() - if has("win32") || has("win64") - let s:l2u_esc_sequence = "\u0006" - else - let s:l2u_esc_sequence = "\u0091\b" - end + " Forcibly get out of completion mode: feed + " this string with feedkeys(s:l2u_esc_sequence, 'n') + let s:l2u_esc_sequence = " \b" " Trigger for the previous mapping of let s:l2u_fallback_trigger = "\u0091L2UFallbackTab" + " Trigger for the previous mapping of + let s:l2u_fallback_trigger_cr = "\u0091L2UFallbackCR" + endfunction " Each time the filetype changes, we may need to enable or @@ -159,6 +142,14 @@ function! s:L2U_deprecated_options() exec "let g:" . new . " = g:" . old endif endfor + + if has_key(g:, "latex_to_unicode_tab") + if g:latex_to_unicode_tab is# 1 + let g:latex_to_unicode_tab = "on" + elseif g:latex_to_unicode_tab is# 0 + let g:latex_to_unicode_tab = "off" + endif + endif endfunction function! s:L2U_file_type_regex(ft) @@ -197,7 +188,7 @@ function! s:L2U_ismatch() if col0 == -1 return 0 endif - let base = l[col0 : col1-1] + let base = l[col0:col1-2] return has_key(g:l2u_symbols_dict, base) endfunction @@ -237,22 +228,29 @@ function! s:L2U_longest_common_prefix(partmatches) return common endfunction -" Omnicompletion function. Besides the usual two-stage omnifunc behaviour, +" Completion function. Besides the usual two-stage completefunc behaviour, " it has the following peculiar features: " *) keeps track of the previous completion attempt " *) sets some info to be used by the fallback function " *) either returns a list of completions if a partial match is found, or a " Unicode char if an exact match is found " *) forces its way out of completion mode through a hack in some cases -function! LaTeXtoUnicode#omnifunc(findstart, base) +function! LaTeXtoUnicode#completefunc(findstart, base) if a:findstart " first stage - " avoid infinite loop if the fallback happens to call omnicompletion + " avoid infinite loop if the fallback happens to call completion if b:l2u_in_fallback let b:l2u_in_fallback = 0 return -3 endif - let b:l2u_in_fallback = 0 + " make sure that the options are still set + " (it may happen that itself triggers the fallback before + " restarting, thus reseetting them; this happens when the prompt is + " waiting for ^U^N^P during a partial completion) + call s:L2U_SetCompleteopt() + " setup the cleanup/fallback operations when we're done + call s:L2U_InsertCompleteDoneAutocommand() + call s:L2U_InsertInsertLeaveAutocommand() " set info for the callback let b:l2u_found_completion = 1 " analyse current line @@ -338,72 +336,98 @@ function! LaTeXtoUnicode#PutLiteral(k) return '' endfunction +function! LaTeXtoUnicode#PutLiteralCR() + call feedkeys(' ', 'ni') + return '' +endfunction + " Function which saves the current insert-mode mapping of a key sequence `s` " and associates it with another key sequence `k` (e.g. stores the current -" mapping into the Fallback trigger) +" mapping into the Fallback trigger). +" It returns the previous maparg dictionary, so that the previous mapping can +" be reinstated if needed. function! s:L2U_SetFallbackMapping(s, k) let mmdict = maparg(a:s, 'i', 0, 1) - if empty(mmdict) + if empty(mmdict) || !has_key(mmdict, "rhs") exe 'inoremap ' . a:k . ' ' . a:s - return + return mmdict endif let rhs = mmdict["rhs"] if rhs =~# '^L2U' - return + return mmdict endif let pre = '' - if mmdict["silent"] - let pre = pre . '' - endif - if mmdict["expr"] - let pre = pre . '' - endif + let pre = pre . (mmdict["silent"] ? '' : '') + let pre = pre . (mmdict["expr"] ? '' : '') if mmdict["noremap"] let cmd = 'inoremap ' else let cmd = 'imap ' " This is a nasty hack used to prevent infinite recursion. It's not a - " general solution. - if mmdict["expr"] + " general solution. Also, it doesn't work with since that stops + " parsing of the =... expression, so we need to special-case it. + " Also, if the original mapping was intended to be recursive, this + " will break it. + if a:s != "" let rhs = substitute(rhs, '\c' . a:s, "\=LaTeXtoUnicode#PutLiteral('" . a:s . "')\", 'g') + else + let rhs = substitute(rhs, '\c' . a:s, "\=LaTeXtoUnicode#PutLiteralCR()\", 'g') + endif + " Make the mapping silent even if it wasn't originally + if !mmdict["silent"] + let pre = pre . '' endif endif exe cmd . pre . ' ' . a:k . ' ' . rhs + return mmdict +endfunction + +" Reinstate a mapping from the maparg dict returned by SetFallbackMapping +" (only if buffer-local, since otherwise it should still be available) +function! s:L2U_ReinstateMapping(mmdict) + if empty(a:mmdict) || !a:mmdict["buffer"] + return '' + endif + let lhs = a:mmdict["lhs"] + let rhs = a:mmdict["rhs"] + if rhs =~# '^L2U' + return '' + endif + let pre = '' + let pre = pre . (a:mmdict["silent"] ? '' : '') + let pre = pre . (a:mmdict["expr"] ? '' : '') + let cmd = a:mmdict["noremap"] ? 'inoremap ' : 'imap ' + exe cmd . pre . ' ' . lhs . ' ' . rhs endfunction " This is the function which is mapped to function! LaTeXtoUnicode#Tab() " the is passed through to the fallback mapping if the completion " menu is present, and it hasn't been raised by the L2U tab, and there - " isn't an exact match before the cursor when suggestions are disabled - if pumvisible() && !b:l2u_tab_completing && (get(g:, "latex_to_unicode_suggestions", 1) || !s:L2U_ismatch()) + " isn't an exact match before the cursor + if pumvisible() && !b:l2u_tab_completing && !s:L2U_ismatch() call feedkeys(s:l2u_fallback_trigger) return '' endif + " ensure that we start completion with some reasonable options + call s:L2U_SetCompleteopt() " reset the in_fallback info let b:l2u_in_fallback = 0 let b:l2u_tab_completing = 1 - " temporary change to completeopt to use the `longest` setting, which is - " probably the only one which makes sense given that the goal of the - " completion is to substitute the final string - let b:l2u_backup_commpleteopt = &completeopt - set completeopt+=longest - set completeopt-=noinsert - " invoke omnicompletion; failure to perform LaTeX-to-Unicode completion is + " invoke completion; failure to perform LaTeX-to-Unicode completion is " handled by the CompleteDone autocommand. - call feedkeys("\\", 'n') + call feedkeys("\\", 'n') return "" endfunction " This function is called at every CompleteDone event, and is meant to handle " the failures of LaTeX-to-Unicode completion by calling a fallback function! LaTeXtoUnicode#FallbackCallback() + call s:L2U_RemoveCompleteDoneAutocommand() + call s:L2U_RestoreCompleteopt() if !b:l2u_tab_completing " completion was not initiated by L2U, nothing to do return - else - " completion was initiated by L2U, restore completeopt - let &completeopt = b:l2u_backup_commpleteopt endif " at this point L2U tab completion is over let b:l2u_tab_completing = 0 @@ -465,9 +489,70 @@ function! LaTeXtoUnicode#CmdTab(trigger) return '' endfunction +function! s:L2U_SetCompleteopt() + " temporary change completeopt to use settings which make sense + " for L2U + let backup_new = 0 + if !exists('b:l2u_backup_completeopt') + let b:l2u_backup_completeopt = &completeopt + let backup_new = 1 + endif + noautocmd set completeopt+=longest + noautocmd set completeopt-=noinsert + noautocmd set completeopt-=noselect + noautocmd set completeopt-=menuone + if backup_new + let b:l2u_modified_completeopt = &completeopt + endif +endfunction + +function! s:L2U_RestoreCompleteopt() + " restore completeopt, but only if nothing else has + " messed with it in the meanwhile + if exists('b:l2u_backup_completeopt') + if exists('b:l2u_modified_completeopt') + if &completeopt ==# b:l2u_modified_completeopt + noautocmd let &completeopt = b:l2u_backup_completeopt + endif + unlet b:l2u_modified_completeopt + endif + unlet b:l2u_backup_completeopt + endif +endfunction + +function! s:L2U_InsertCompleteDoneAutocommand() + augroup L2UCompleteDone + autocmd! * + " Every time a L2U completion finishes, the fallback may be invoked + autocmd CompleteDone call LaTeXtoUnicode#FallbackCallback() + augroup END +endfunction + +function! s:L2U_RemoveCompleteDoneAutocommand() + augroup L2UCompleteDone + autocmd! * + augroup END +endfunction + +function s:L2U_InsertLeaveClenup() + call s:L2U_ResetLastCompletionInfo() + augroup L2UInsertLeave + autocmd! * + augroup END +endfunction + +function! s:L2U_InsertInsertLeaveAutocommand() + augroup L2UInsertLeave + autocmd! * + autocmd InsertLeave call s:L2U_InsertLeaveClenup() + augroup END +endfunction + " Setup the L2U tab mapping function! s:L2U_SetTab(wait_insert_enter) - if !b:l2u_cmdtab_set && get(g:, "latex_to_unicode_tab", 1) && b:l2u_enabled + let opt_do_cmdtab = index(["on", "command", "cmd"], get(g:, "latex_to_unicode_tab", "on")) != -1 + let opt_do_instab = index(["on", "insert", "ins"], get(g:, "latex_to_unicode_tab", "on")) != -1 + if !b:l2u_cmdtab_set && opt_do_cmdtab && b:l2u_enabled let b:l2u_cmdtab_keys = get(g:, "latex_to_unicode_cmd_mapping", ['','']) if type(b:l2u_cmdtab_keys) != type([]) " avoid using v:t_list for backward compatibility let b:l2u_cmdtab_keys = [b:l2u_cmdtab_keys] @@ -485,26 +570,20 @@ function! s:L2U_SetTab(wait_insert_enter) if a:wait_insert_enter && !get(g:, "did_insert_enter", 0) return endif - if !get(g:, "latex_to_unicode_tab", 1) || !b:l2u_enabled + if !opt_do_instab || !b:l2u_enabled return endif - " Backup the previous omnifunc (the check is probably not really needed) - if get(b:, "prev_omnifunc", "") != "LaTeXtoUnicode#omnifunc" - let b:prev_omnifunc = &omnifunc + " Backup the previous completefunc (the check is probably not really needed) + if get(b:, "l2u_prev_completefunc", "") != "LaTeXtoUnicode#completefunc" + let b:l2u_prev_completefunc = &completefunc endif - setlocal omnifunc=LaTeXtoUnicode#omnifunc + setlocal completefunc=LaTeXtoUnicode#completefunc - call s:L2U_SetFallbackMapping('', s:l2u_fallback_trigger) + let b:l2u_prev_map_tab = s:L2U_SetFallbackMapping('', s:l2u_fallback_trigger) imap L2UTab inoremap L2UTab LaTeXtoUnicode#Tab() - augroup L2UTab - autocmd! * - " Every time a completion finishes, the fallback may be invoked - autocmd CompleteDone call LaTeXtoUnicode#FallbackCallback() - augroup END - let b:l2u_tab_set = 1 endfunction @@ -519,28 +598,37 @@ function! s:L2U_UnsetTab() if !b:l2u_tab_set return endif - exec "setlocal omnifunc=" . get(b:, "prev_omnifunc", "") + exec "setlocal completefunc=" . get(b:, "l2u_prev_completefunc", "") iunmap if empty(maparg("", "i")) - call s:L2U_SetFallbackMapping(s:l2u_fallback_trigger, '') + call s:L2U_ReinstateMapping(b:l2u_prev_map_tab) endif iunmap L2UTab exe 'iunmap ' . s:l2u_fallback_trigger - augroup L2UTab - autocmd! * - augroup END let b:l2u_tab_set = 0 endfunction " Function which looks for viable LaTeX-to-Unicode supstitutions as you type function! LaTeXtoUnicode#AutoSub(...) + " avoid recursive calls + if get(b:, "l2u_in_autosub", 0) + return '' + endif let vc = a:0 == 0 ? v:char : a:1 + " for some reason function keys seem to be passed as characters 149 (F1-F12) + " or 186 (F13-F37, these are entered with shift/ctrl). In such cases, we + " can't really do any better than giving up. + if char2nr(vc) == 149 || char2nr(vc) == 186 + return '' + endif + let b:l2u_in_autosub = 1 let col1 = col('.') let lnum = line('.') if col1 == 1 if a:0 > 1 - call feedkeys(a:2, 'n') + call feedkeys(a:2, 'mi') endif + let b:l2u_in_autosub = 0 return '' endif let bs = (vc != "\n") @@ -548,21 +636,31 @@ function! LaTeXtoUnicode#AutoSub(...) let col0 = match(l, '\\\%([_^]\?[A-Za-z]\+\%' . col1 . 'c\%([^A-Za-z]\|$\)\|[_^]\%([0-9()=+-]\)\%' . col1 .'c\%(.\|$\)\)') if col0 == -1 if a:0 > 1 - call feedkeys(a:2, 'n') + call feedkeys(a:2, 'mi') endif + let b:l2u_in_autosub = 0 return '' endif - let base = l[col0 : -1-bs] + let base = l[col0 : col1-1-bs] let unicode = get(g:l2u_symbols_dict, base, '') if empty(unicode) if a:0 > 1 - call feedkeys(a:2, 'n') + call feedkeys(a:2, 'mi') endif + let b:l2u_in_autosub = 0 return '' endif - call feedkeys("\u", 'n') - call feedkeys(repeat("\b", len(base) + bs) . unicode . vc . s:l2u_esc_sequence, 'nt') - call feedkeys("\u", 'n') + + " perform the substitution, wrapping it in undo breakpoints so that + " we can revert it as a whole + " at the end, reset the l2u_in_autosub variable without leaving insert mode + " the 'i' mode is the only one that works correctly when executing macros + " the 'n' mode is to avoid user-defined mappings of \b, and + call feedkeys("\u" . + \ repeat("\b", len(base) + bs) . unicode . vc . s:l2u_esc_sequence . + \ "\u" . + \ "\\:let b:l2u_in_autosub = 0\", + \ 'ni') return '' endfunction @@ -581,8 +679,10 @@ function! s:L2U_SetAutoSub(wait_insert_enter) " Viable substitutions are searched at every character insertion via the " autocmd InsertCharPre. The key does not seem to be catched in " this way though, so we use a mapping for that case. + + let b:l2u_prev_map_cr = s:L2U_SetFallbackMapping('', s:l2u_fallback_trigger_cr) imap L2UAutoSub - inoremap L2UAutoSub LaTeXtoUnicode#AutoSub("\n", "\") + exec 'inoremap L2UAutoSub LaTeXtoUnicode#AutoSub("\n", "' . s:l2u_fallback_trigger_cr . '")' augroup L2UAutoSub autocmd! * @@ -599,7 +699,11 @@ function! s:L2U_UnsetAutoSub() endif iunmap + if empty(maparg("", "i")) + call s:L2U_ReinstateMapping(b:l2u_prev_map_cr) + endif iunmap L2UAutoSub + exe 'iunmap ' . s:l2u_fallback_trigger_cr augroup L2UAutoSub autocmd! * augroup END @@ -652,5 +756,3 @@ function! LaTeXtoUnicode#Toggle() endif return '' endfunction - -endif diff --git a/autoload/RstFold.vim b/autoload/RstFold.vim index 30d008743..c18b8232b 100644 --- a/autoload/RstFold.vim +++ b/autoload/RstFold.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rst', 'autoload/RstFold.vim') + finish +endif " Author: Antony Lee " Description: Helper functions for reStructuredText syntax folding @@ -62,5 +64,3 @@ function RstFold#GetRstFoldText() let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline return indent . text endfunction - -endif diff --git a/autoload/ada.vim b/autoload/ada.vim index efe5e7176..3d58cbb75 100644 --- a/autoload/ada.vim +++ b/autoload/ada.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ada', 'autoload/ada.vim') + finish +endif "------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. @@ -69,13 +71,13 @@ if exists ('g:ada_with_gnat_project_files') endfor endif -" Section: add standart exception {{{2 +" Section: add standard 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.', + \ 'info': 'Ada standard exception.', \ 'kind': 'x', \ 'icase': 1}] endfor @@ -212,7 +214,7 @@ function ada#Word (...) 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 + " backwards looking for previous lines if l:Column_Nr > strlen(l:Line) " We were in a comment let l:Line = getline(l:Line_Nr) @@ -637,5 +639,3 @@ finish " 1}}} "------------------------------------------------------------------------------ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker - -endif diff --git a/autoload/cargo.vim b/autoload/cargo.vim index bd453ac7c..001d35ce4 100644 --- a/autoload/cargo.vim +++ b/autoload/cargo.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/cargo.vim') + finish +endif function! cargo#Load() " Utility call to get this script loaded, for debugging @@ -147,5 +149,3 @@ function! cargo#runtarget(args) endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/cargo/quickfix.vim b/autoload/cargo/quickfix.vim index e1e5b9d25..ddd08e26c 100644 --- a/autoload/cargo/quickfix.vim +++ b/autoload/cargo/quickfix.vim @@ -1,7 +1,10 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/cargo/quickfix.vim') + finish +endif function! cargo#quickfix#CmdPre() abort - if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' + if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' && + \ &makeprg =~ '\V\^cargo\ \.\*' " Preserve the current directory, and 'lcd' to the nearest Cargo file. let b:rust_compiler_cargo_qf_has_lcd = haslocaldir() let b:rust_compiler_cargo_qf_prev_cd = getcwd() @@ -26,5 +29,3 @@ function! cargo#quickfix#CmdPost() abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/clojurecomplete.vim b/autoload/clojurecomplete.vim index 9128b3d16..31065c1fe 100644 --- a/autoload/clojurecomplete.vim +++ b/autoload/clojurecomplete.vim @@ -1,16 +1,19 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 +if polyglot#init#is_disabled(expand(':p'), 'clojure', 'autoload/clojurecomplete.vim') + finish +endif " Vim completion script -" Language: Clojure -" Maintainer: Sung Pae -" URL: https://github.com/guns/vim-clojure-static -" License: Same as Vim -" Last Change: %%RELEASE_DATE%% +" Language: Clojure +" Maintainer: Alex Vear +" Former Maintainers: Sung Pae +" URL: https://github.com/clojure-vim/clojure.vim +" License: Vim (see :h license) +" Last Change: %%RELEASE_DATE%% " -*- COMPLETION WORDS -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj -" Clojure version 1.8.0 -let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] +" Generated from https://github.com/clojure-vim/clojure.vim/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj +" Clojure version 1.11.1 +let s:words = ["&","*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","NaN?","PrintWriter-on","StackTraceElement->vec","Throwable->map","abs","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","case*","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","deftype*","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-cause","ex-data","ex-info","ex-message","extend","extend-protocol","extend-type","extenders","extends?","false","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn*","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","infinite?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iteration","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let*","letfn","letfn*","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop*","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","new","newline","next","nfirst","nil","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","parse-boolean","parse-double","parse-long","parse-uuid","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","quote","rand","rand-int","rand-nth","random-sample","random-uuid","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read+string","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","reify*","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-tap","remove-watch","repeat","repeatedly","replace","replicate","require","requiring-resolve","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq-to-map-for-destructuring","seq?","seqable?","seque","sequence","sequential?","set","set!","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","tap>","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-keys","update-proxy","update-vals","uri?","use","uuid?","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] " Simple word completion for special forms and public vars in clojure.core function! clojurecomplete#Complete(findstart, base) @@ -22,5 +25,3 @@ function! clojurecomplete#Complete(findstart, base) endfunction " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/autoload/coc/source/requirements.vim b/autoload/coc/source/requirements.vim new file mode 100644 index 000000000..c2c64dbd0 --- /dev/null +++ b/autoload/coc/source/requirements.vim @@ -0,0 +1,24 @@ +if polyglot#init#is_disabled(expand(':p'), 'requirements', 'autoload/coc/source/requirements.vim') + finish +endif + +"" +" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source +function! coc#source#requirements#init() abort + return { + \ 'shortcut': 'pip', + \ 'priority': 9, + \ 'filetypes': ['requirements'], + \ } +endfunction + +"" +" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source +" +" Completion pip option and PYPI package names. +" Note: completion PYPI package names need install pip-cache from PYPI, +" and run `pip-cache update` first to generate cache. +function! coc#source#requirements#complete(opt, cb) abort + call a:cb(g:requirements#items) +endfunction +" vim: et sw=4 ts=4 sts=4: diff --git a/autoload/coffee.vim b/autoload/coffee.vim index 76eab3b00..78427a18b 100644 --- a/autoload/coffee.vim +++ b/autoload/coffee.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 +if polyglot#init#is_disabled(expand(':p'), 'coffee-script', 'autoload/coffee.vim') + finish +endif " Language: CoffeeScript " Maintainer: Mick Koch @@ -54,5 +56,3 @@ function! coffee#CoffeeSetUpErrorFormat() \%f:%l:%c:\ error:\ %m, \%-G%.%# endfunction - -endif diff --git a/autoload/crystal/indent.vim b/autoload/crystal/indent.vim index ffd780e06..4e9ddcf73 100644 --- a/autoload/crystal/indent.vim +++ b/autoload/crystal/indent.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/crystal/indent.vim') + finish +endif " Variables {{{1 " ========= @@ -94,7 +96,7 @@ lockvar g:crystal#indent#block_regex " Regex that defines the beginning of a hanging expression. let g:crystal#indent#hanging_assignment_regex = \ '\%('.g:crystal#indent#operator_regex.'\s*\)\@<=' . - \ '\.\@1' + \ '\.\@1' lockvar g:crystal#indent#hanging_assignment_regex " Regex that defines the start-match for the 'end' keyword. @@ -105,7 +107,7 @@ let g:crystal#indent#end_start_regex = \ '\%(\<\%(private\|protected\)\s\+\)\=' . \ '\%(\<\%(abstract\s\+\)\=\%(class\|struct\)\>\|\<\%(def\|module\|macro\|lib\|enum\|annotation\)\>\)' . \ '\|' . - \ '\<\%(if\|unless\|while\|until\|case\|begin\|union\)\>' . + \ '\<\%(if\|unless\|while\|until\|case\|begin\|union\|select\)\>' . \ '\)' . \ '\|' . \ g:crystal#indent#hanging_assignment_regex . @@ -1041,4 +1043,3 @@ endfunction " }}}1 " vim:sw=2 sts=2 ts=8 fdm=marker et: -endif diff --git a/autoload/crystal_lang.vim b/autoload/crystal_lang.vim index b0e63ea26..15afbeda2 100644 --- a/autoload/crystal_lang.vim +++ b/autoload/crystal_lang.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/crystal_lang.vim') + finish +endif let s:V = vital#crystal#new() let s:P = s:V.import('Process') @@ -363,5 +365,3 @@ function! crystal_lang#expand(file, pos, ...) abort endfunction " vim: sw=2 sts=2 et: - -endif diff --git a/autoload/csv.vim b/autoload/csv.vim index 8561f30f5..4111f6ed8 100644 --- a/autoload/csv.vim +++ b/autoload/csv.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 +if polyglot#init#is_disabled(expand(':p'), 'csv', 'autoload/csv.vim') + finish +endif " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt @@ -12,7 +14,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Some ideas are taken from the wiki http://vim.wikia.com/wiki/VimTip667 " though, implementation differs. -let s:csv_numeric_sort = v:version > 704 || v:version == 704 && has("patch341") +let s:csv_numeric_sort = v:version > 704 || v:version == 704 && has("patch951") if !s:csv_numeric_sort "{{{2 fu! csv#CSVSortValues(i1, i2) "{{{3 return (a:i1+0) == (a:i2+0) ? 0 : (a:i1+0) > (a:i2+0) ? 1 : -1 @@ -75,9 +77,13 @@ fu! csv#Init(start, end, ...) "{{{3 endif if empty(b:delimiter) && !exists("b:csv_fixed_width") - call csv#Warn("No delimiter found. See :h csv-delimiter to set it manually!") - " Use a sane default as delimiter: - let b:delimiter = ',' + if !exists("g:csv_default_delim") + call csv#Warn("No delimiter found. See :h csv-delimiter to set it manually!") + " Use a sane default as delimiter: + let b:delimiter = ',' + else + let b:delimiter = g:csv_default_delim + endif endif let s:del='\%(' . b:delimiter . '\|$\)' @@ -216,6 +222,15 @@ fu! csv#LocalSettings(type) "{{{3 endif endfu +fu! csv#RemoveAutoHighlight() "{{{3 + exe "aug CSV_HI".bufnr('') + exe "au! CursorMoved " + aug end + exe "aug! CSV_HI".bufnr('') + " Remove any existing highlighting + HiColumn! +endfu + fu! csv#DoAutoCommands() "{{{3 " Highlight column, on which the cursor is if exists("g:csv_highlight_column") && g:csv_highlight_column =~? 'y' @@ -227,12 +242,7 @@ fu! csv#DoAutoCommands() "{{{3 " Set highlighting for column, on which the cursor is currently HiColumn else - exe "aug CSV_HI".bufnr('') - exe "au! CursorMoved " - aug end - exe "aug! CSV_HI".bufnr('') - " Remove any existing highlighting - HiColumn! + call csv#RemoveAutoHighlight() endif " undo autocommand: let b:undo_ftplugin .= '| exe "sil! au! CSV_HI'.bufnr('').' CursorMoved "' @@ -533,7 +543,7 @@ fu! csv#WColumn(...) "{{{3 let temp=getpos('.')[2] let j=1 let ret = 1 - for i in sort(b:csv_fixed_width_cols, s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues') + for i in sort(b:csv_fixed_width_cols, s:csv_numeric_sort ? 'N' : 'csv#CSVSortValues') if temp >= i let ret = j endif @@ -543,6 +553,9 @@ fu! csv#WColumn(...) "{{{3 call setpos('.',_cur) return ret endfu +fu! csv#ValidComment() "{{{3 + return b:csv_cmt != ['', ''] && !empty(b:csv_cmt[0]) +endfu fu! csv#MaxColumns(...) "{{{3 let this_col = exists("a:1") "return maximum number of columns in first 10 lines @@ -555,8 +568,10 @@ fu! csv#MaxColumns(...) "{{{3 endif " Filter comments out - let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') - call filter(l, 'v:val !~ pat') + if csv#ValidComment() + let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + call filter(l, 'v:val !~ pat') + endif if !empty(l) || this_col break else @@ -600,8 +615,10 @@ fu! csv#ColWidth(colnr, row, silent) "{{{3 endif endif let b:csv_list=getline(skipfirst+1,last) - let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') - call filter(b:csv_list, 'v:val !~ pat') + if csv#ValidComment() + let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + call filter(b:csv_list, 'v:val !~ pat') + endif call filter(b:csv_list, '!empty(v:val)') call map(b:csv_list, 'split(v:val, b:col.''\zs'')') endif @@ -763,8 +780,7 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3 " row for the row for which to calculate the width let b:col_width=[] if has( 'vartabs' ) && b:delimiter == "\t" - let vts_save=&vts - set vts= + setlocal vts= endif try if exists("b:csv_headerline") @@ -784,9 +800,6 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3 " delete buffer content in variable b:csv_list, " this was only necessary for calculating the max width unlet! b:csv_list s:columnize_count s:decimal_column - if has( 'vartabs' ) && b:delimiter == "\t" - let &vts=vts_save - endif endfu fu! csv#Columnize(field) "{{{3 " Internal function, not called from external, @@ -813,8 +826,8 @@ fu! csv#Columnize(field) "{{{3 let colnr = s:columnize_count % s:max_cols let width = get(b:col_width, colnr, 20) let align = 'r' - if exists('b:csv_arrange_align') - let align=b:csv_arrange_align + if exists('b:csv_arrange_align') || exists('g:csv_arrange_align') + let align=get(b:, 'csv_arrange_align', g:csv_arrange_align) let indx=match(align, '\*') if indx > 0 let align = align[0:(indx-1)]. repeat(align[indx-1], len(b:col_width)-indx) @@ -892,7 +905,7 @@ fu! csv#Columnize(field) "{{{3 return result else " right align - return printf("%*S", width+1 , a:field) + return printf("%*S", width , a:field) endif endfun fu! csv#GetColPat(colnr, zs_flag) "{{{3 @@ -906,21 +919,26 @@ fu! csv#GetColPat(colnr, zs_flag) "{{{3 let pat='\%' . b:csv_fixed_width_cols[-1] . 'v.*' else let pat='\%' . b:csv_fixed_width_cols[(a:colnr - 1)] . - \ 'c.\{-}\%' . b:csv_fixed_width_cols[a:colnr] . 'v' + \ 'c.*\%<' . (b:csv_fixed_width_cols[a:colnr] + 1) . 'v' endif endif elseif !exists("b:csv_fixed_width_cols") let pat=b:col else - let pat='\%' . b:csv_fixed_width_cols[0] . 'v.\{-}' . + let pat='\%' . b:csv_fixed_width_cols[0] . 'v.*' . \ (len(b:csv_fixed_width_cols) > 1 ? - \ '\%' . b:csv_fixed_width_cols[1] . 'v' : + \ '\%<' . (b:csv_fixed_width_cols[1] + 1) . 'v' : \ '') endif return pat . (a:zs_flag ? '\zs' : '') endfu fu! csv#SetupAutoCmd(window,bufnr) "{{{3 " Setup QuitPre autocommand to quit cleanly + if a:bufnr == 0 + " something went wrong, + " how can this happen? + return + endif aug CSV_QuitPre au! exe "au QuitPre * call CSV_CloseBuffer(".winbufnr(a:window).")" @@ -1011,7 +1029,7 @@ fu! csv#SplitHeaderLine(lines, bang, hor) "{{{3 " disable airline let w:airline_disabled = 1 let win = winnr() - setl scrollbind buftype=nowrite bufhidden=wipe noswapfile nobuflisted + setl scrollbind buftype=nofile bufhidden=wipe noswapfile nobuflisted noa wincmd p let b:csv_SplitWindow = win aug CSV_Preview @@ -1109,7 +1127,12 @@ fu! csv#MoveCol(forward, line, ...) "{{{3 let pat=csv#GetColPat(1, 0) else " Move backwards - let pat=csv#GetColPat(maxcol, 0) + if cpos == 1 && (exists("a:1") && a:1) + " H move to previous line + let pat=csv#GetColPat(maxcol, 0) + else + let pat='\%1v' + endif endif endif else @@ -1143,9 +1166,13 @@ fu! csv#MoveCol(forward, line, ...) "{{{3 " of a field. let epos = getpos('.') if getline('.')[col('.')-1] == ' ' - call search('\S', 'W', line('.')) - if getpos('.')[2] > spos - call setpos('.', epos) + if !exists("b:csv_fixed_width_cols") + call search('\S', 'W', line('.')) + if getpos('.')[2] > spos + call setpos('.', epos) + endif + elseif cpos > b:csv_fixed_width_cols[colnr] + call search('\%'. b:csv_fixed_width_cols[colnr]. 'v', 'W', line('.')) endif endif endif @@ -1189,7 +1216,7 @@ endfun fu! csv#Sort(bang, line1, line2, colnr) range "{{{3 " :Sort command let wsv = winsaveview() - let flag = matchstr(a:colnr, '[nixo]') + let flag = matchstr(a:colnr, '[nixof]') call csv#CheckHeaderLine() let line1 = a:line1 let line2 = a:line2 @@ -1240,8 +1267,10 @@ fu! csv#CopyCol(reg, col, cnt) "{{{3 endfor endif " Filter comments out - let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') - call filter(a, 'v:val !~ pat') + if csv#ValidComment() + let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + call filter(a, 'v:val !~ pat') + endif if !exists("b:csv_fixed_width_cols") call map(a, 'split(v:val, ''^'' . b:col . ''\zs'')[col-1:cnt_cols]') @@ -1282,10 +1311,9 @@ fu! csv#MoveColumn(start, stop, ...) range "{{{3 endif " Swap line by line, instead of reading the whole range into memory - for i in range(a:start, a:stop) let content = getline(i) - if content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if b:csv_cmt != ['',''] && content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') " skip comments continue endif @@ -1353,13 +1381,9 @@ fu! csv#DupColumn(start, stop, ...) range "{{{3 " skipping comment lines (we could do it with a single :s statement, " but that would fail for the first and last column. - let commentpat = '\%(\%>'.(a:start-1).'l\V'. - \ escape(b:csv_cmt[0], '\\').'\m\)'. '\&\%(\%<'. - \ (a:stop+1). 'l\V'. escape(b:csv_cmt[0], '\\'). '\m\)' - for i in range(a:start, a:stop) let content = getline(i) - if content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if csv#ValidComment() && content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') " skip comments continue endif @@ -1423,10 +1447,12 @@ fu! csv#AddColumn(start, stop, ...) range "{{{3 " skipping comment lines (we could do it with a single :s statement, " but that would fail for the first and last column. - let commentpat = '\%(\%>'.(a:start-1).'l\V'. - \ escape(b:csv_cmt[0], '\\').'\m\)'. '\&\%(\%<'. - \ (a:stop+1). 'l\V'. escape(b:csv_cmt[0], '\\'). '\m\)' - if search(commentpat) + if b:csv_cmt != ['',''] + let commentpat = '\%(\%>'.(a:start-1).'l\V'. + \ escape(b:csv_cmt[0], '\\').'\m\)'. '\&\%(\%<'. + \ (a:stop+1). 'l\V'. escape(b:csv_cmt[0], '\\'). '\m\)' + endif + if !empty(commentpat) && search(commentpat) for i in range(a:start, a:stop) let content = getline(i) if content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') @@ -1450,7 +1476,7 @@ fu! csv#SumColumn(list) "{{{3 let b:csv_result = '0' return 0 else - let sum = has("float") ? 0.0 : 0 + let sum = 0.0 for item in a:list if empty(item) continue @@ -1460,33 +1486,25 @@ fu! csv#SumColumn(list) "{{{3 let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d' try let nr = substitute(nr, format1, '', '') - if has("float") && s:nr_format[1] != '.' + if s:nr_format[1] != '.' let nr = substitute(nr, format2, '.', '') endif catch - let nr = 0 + let nr = '0' endtry - let sum += (has("float") ? str2float(nr) : (nr + 0)) + let sum += str2float(nr) endfor - if has("float") - let b:csv_result = string(float2nr(sum)) - if float2nr(sum) == sum - return float2nr(sum) - else - return printf("%.2f", sum) - endif - endif - let b:csv_result = string(sum) - return sum + let b:csv_result = sum + return printf("%.2f", sum) endif endfu fu! csv#AvgColumn(list) "{{{3 if empty(a:list) let b:csv_result = '0' - return 0 + return 0.0 else let cnt = 0 - let sum = has("float") ? 0.0 : 0 + let sum = 0.0 for item in a:list if empty(item) continue @@ -1496,30 +1514,25 @@ fu! csv#AvgColumn(list) "{{{3 let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d' try let nr = substitute(nr, format1, '', '') - if has("float") && s:nr_format[1] != '.' + if s:nr_format[1] != '.' let nr = substitute(nr, format2, '.', '') endif catch - let nr = 0 + let nr ='0' endtry - let sum += (has("float") ? str2float(nr) : (nr + 0)) + let sum += str2float(nr) let cnt += 1 endfor - if has("float") - let b:csv_result = printf("%.2f", sum/cnt) - return str2float(b:csv_result) - else - let b:csv_result = printf("%s", sum/cnt) - return b:csv_result + 0 - endif + let b:csv_result = printf("%.2f", sum/cnt) + return sum/cnt endif endfu fu! csv#VarianceColumn(list, is_population) "{{{3 if empty(a:list) - return 0 + return 0.0 else let cnt = 0 - let sum = has("float") ? 0.0 : 0 + let sum = 0.0 let avg = csv#AvgColumn(a:list) for item in a:list if empty(item) @@ -1530,64 +1543,64 @@ fu! csv#VarianceColumn(list, is_population) "{{{3 let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d' try let nr = substitute(nr, format1, '', '') - if has("float") && s:nr_format[1] != '.' + if s:nr_format[1] != '.' let nr = substitute(nr, format2, '.', '') endif catch - let nr = 0 + let nr = '0' endtry - let sum += pow((has("float") ? (str2float(nr)-avg) : ((nr + 0)-avg)), 2) + let nr = str2float(nr) + let sum += pow((nr-avg), 2) let cnt += 1 endfor if(a:is_population == 0) let cnt = cnt-1 endif - if has("float") - let b:csv_result = printf("%." . get(b:, 'csv_accuracy', get(g:, 'csv_accuracy', 2)) . "f", sum/cnt) - return b:csv_result - else - let b:csv_result = printf("%s", sum/cnt) - return sum/(cnt) - endif + let b:csv_result = sum/cnt + return b:csv_result endif endfu fu! csv#SmplVarianceColumn(list) "{{{2 + unlet! b:csv_result if empty(a:list) - let b:csv_result = '0' - return 0 + let b:csv_result = 0.0 + return 0.0 else return csv#VarianceColumn(a:list, 0) endif endfu fu! csv#PopVarianceColumn(list) "{{{2 + unlet! b:csv_result if empty(a:list) - let b:csv_result = '0' - return 0 + let b:csv_result = 0.0 + return 0.0 else return csv#VarianceColumn(a:list, 1) endif endfu fu! csv#SmplStdDevColumn(list) "{{{2 + unlet! b:csv_result if empty(a:list) - let b:csv_result = '0' - return 0 + let b:csv_result = 0.0 + return 0.0 else - let result = sqrt(str2float(csv#VarianceColumn(a:list, 0))) - let b:csv_result = string(result) + let result = sqrt(csv#VarianceColumn(a:list, 0)) + let b:csv_result = result return result endif endfu fu! csv#PopStdDevColumn(list) "{{{2 + unlet! b:csv_result if empty(a:list) - let b:csv_result = '0' - return 0 + let b:csv_result = 0.0 + return 0.0 else - let result = sqrt(str2float(csv#VarianceColumn(a:list, 1))) - let b:csv_result = string(result) + let result = sqrt(csv#VarianceColumn(a:list, 1)) + let b:csv_result = result return result endif endfu @@ -1610,15 +1623,15 @@ fu! csv#MaxColumn(list) "{{{3 let format2 = '\d\+\zs\V' . s:nr_format[1] . '\m\ze\d' try let nr = substitute(nr, format1, '', '') - if has("float") && s:nr_format[1] != '.' + if s:nr_format[1] != '.' let nr = substitute(nr, format2, '.', '') endif catch - let nr = 0 + let nr = '0' endtry - call add(result, has("float") ? str2float(nr) : nr+0) + call add(result, str2float(nr)) endfor - let result = sort(result, s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues') + let result = sort(result, s:csv_numeric_sort ? 'N' : 'csv#CSVSortValues') let ind = len(result) > 9 ? 9 : len(result) if has_key(get(s:, 'additional', {}), 'distinct') && s:additional['distinct'] if exists("*uniq") @@ -1679,7 +1692,7 @@ fu! csv#DoForEachColumn(start, stop, bang) range "{{{3 endif let t = g:csv_convert let line = getline(item) - if line =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if b:csv_cmt!=['',''] && line =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') " Filter comments out call add(result, line) continue @@ -1743,7 +1756,7 @@ fu! csv#FoldValue(lnum, filter) "{{{3 for item in values(a:filter) " always fold comments away let content = getline(a:lnum) - if content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if b:csv_cmt != ['',''] && content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') return 1 elseif eval('content' . (item.match ? '!~' : '=~') . 'item.pat') let result += 1 @@ -1905,7 +1918,7 @@ fu! csv#GetColumn(line, col, strip) "{{{3 " Return Column content at a:line, a:col let a=getline(a:line) " Filter comments out - if a =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if csv#ValidComment() && a =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') return '' endif @@ -1986,7 +1999,7 @@ fu! csv#AnalyzeColumn(...) "{{{3 let res[item]+=1 endfor - let max_items = reverse(sort(values(res), s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues')) + let max_items = reverse(sort(values(res), s:csv_numeric_sort ? 'N' : 'csv#CSVSortValues')) " What about the minimum 5 items? let count_items = keys(res) if len(max_items) > topn @@ -1995,11 +2008,7 @@ fu! csv#AnalyzeColumn(...) "{{{3 call filter(res, 'v:val =~ ''^''.join(max_items, ''\|'').''$''') endif - if has("float") - let title="Nr\tCount\t % \tValue" - else - let title="Nr\tCount\tValue" - endif + let title="Nr\tCount\t % \tValue" echohl Title echo printf("%s", title) echohl Normal @@ -2014,12 +2023,8 @@ fu! csv#AnalyzeColumn(...) "{{{3 else let k = key endif - if has("float") - echo printf("%02d\t%02d\t%2.0f%%\t%.50s", i, res[key], - \ ((res[key] + 0.0)/qty)*100, k) - else - echo printf("%02d\t%02d\t%.50s", i, res[key], k) - endif + echo printf("%02d\t%02d\t%2.0f%%\t%.50s", i, res[key], + \ ((res[key] + 0.0)/qty)*100, k) call remove(res,key) let i+=1 else @@ -2072,6 +2077,7 @@ fu! csv#InitCSVFixedWidth() "{{{3 endif " Turn off syntax highlighting syn clear + call csv#RemoveAutoHighlight() let max_line = line('$') > 10 ? 10 : line('$') let t = getline(1, max_line) let max_len = max(map(t, 'len(split(v:val, ''\zs''))')) @@ -2133,8 +2139,8 @@ fu! csv#InitCSVFixedWidth() "{{{3 endw let b:csv_fixed_width_cols=[] let tcc=0 - let b:csv_fixed_width_cols = sort(keys(Dict), s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues') - let b:csv_fixed_width = join(sort(keys(Dict), s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues'), ',') + let b:csv_fixed_width_cols = sort(keys(Dict), s:csv_numeric_sort ? 'N' : 'csv#CSVSortValues') + let b:csv_fixed_width = join(sort(keys(Dict), s:csv_numeric_sort ? 'N' : 'csv#CSVSortValues'), ',') call csv#Init(1, line('$')) let &l:cc=_cc @@ -2214,7 +2220,15 @@ fu! csv#CSVMappings() "{{{3 call csv#Map('nnoremap', 'W', ':call csv#MoveCol(1, line("."))') call csv#Map('nnoremap', '', ':call csv#MoveCol(1, line("."))') call csv#Map('nnoremap', 'L', ':call csv#MoveCol(1, line("."))') - call csv#Map('nnoremap', 'E', ':call csv#MoveCol(-1, line("."))') + try + if get(g:, 'csv_bind_B', 0) == 1 + call csv#Map('nnoremap', 'B', ':call csv#MoveCol(-1, line("."))') + else + call csv#Map('nnoremap', 'E', ':call csv#MoveCol(-1, line("."))') + endif + catch + call csv#Map('nnoremap', 'E', ':call csv#MoveCol(-1, line("."))') + endtry call csv#Map('nnoremap', '', ':call csv#MoveCol(-1, line("."))') call csv#Map('nnoremap', 'H', ':call csv#MoveCol(-1, line("."), 1)') call csv#Map('nnoremap', 'K', ':call csv#MoveCol(0, line(".")-v:count1)') @@ -2325,7 +2339,7 @@ fu! csv#CommandDefinitions() "{{{3 call csv#LocalCmd("NewDelimiter", ':call csv#NewDelimiter(, 1, line(''$''))', \ '-nargs=1') call csv#LocalCmd("Duplicates", ':call csv#CheckDuplicates()', - \ '-nargs=1 -complete=custom,csv#CompleteColumnNr') + \ '-nargs=? -complete=custom,csv#CompleteColumnNr') call csv#LocalCmd('Transpose', ':call csv#Transpose(, )', \ '-range=%') call csv#LocalCmd('CSVTabularize', ':call csv#Tabularize(0,,)', @@ -2438,7 +2452,7 @@ fu! csv#NewDelimiter(newdelimiter, firstl, lastl) "{{{3 let line=a:firstl while line <= a:lastl " Don't change delimiter for comments - if getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if csv#ValidComment() && getline(line) =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') let line+=1 continue endif @@ -2483,7 +2497,7 @@ fu! csv#DuplicateRows(columnlist) "{{{3 let i = 1 let content = getline(line) " Skip comments - if content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') + if csv#ValidComment() && content =~ '^\s*\V'. escape(b:csv_cmt[0], '\\') continue endif let cols = split(content, b:col. '\zs') @@ -2513,12 +2527,16 @@ fu! csv#CompleteColumnNr(A,L,P) "{{{3 return join(range(1,csv#MaxColumns()), "\n") endfu fu! csv#CheckDuplicates(list) "{{{3 - let string = a:list - if string =~ '\d\s\?-\s\?\d' - let string = substitute(string, '\(\d\+\)\s\?-\s\?\(\d\+\)', - \ '\=join(range(submatch(1),submatch(2)), ",")', '') + if empty(a:list) + let list=[csv#WColumn()] + else + let string = a:list + if string =~ '\d\s\?-\s\?\d' + let string = substitute(string, '\(\d\+\)\s\?-\s\?\(\d\+\)', + \ '\=join(range(submatch(1),submatch(2)), ",")', '') + endif + let list=split(string, ',') endif - let list=split(string, ',') call csv#DuplicateRows(list) endfu fu! csv#Transpose(line1, line2) "{{{3 @@ -2535,7 +2553,11 @@ fu! csv#Transpose(line1, line2) "{{{3 let TrailingDelim = getline(1) =~ b:delimiter.'$' endif - let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + if b:csv_cmt != ['',''] + let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + else + let pat = '' + endif try let columns = csv#MaxColumns(a:line1) @@ -2547,7 +2569,7 @@ fu! csv#Transpose(line1, line2) "{{{3 let matrix = [] for line in range(a:line1, a:line2) " Filter comments out - if getline(line) =~ pat + if !empty(pat) && getline(line) =~ pat continue endif let r = [] @@ -2703,7 +2725,7 @@ fu! csv#Tabularize(bang, first, last) "{{{3 if getline(a:first)[-1:] isnot? b:delimiter let b:col_width[-1] += 1 endif - let marginline = s:td.scol. join(map(copy(b:col_width), 'repeat(s:td.hbar, v:val)'), s:td.cros). s:td.ecol + let marginline = s:td.scol. join(map(copy(b:col_width), 'repeat(s:td.hbar, v:val-1)'), s:td.cros). s:td.ecol call csv#NewDelimiter(s:td.vbar, 1, line('$')) "exe printf('sil %d,%ds/%s/%s/ge', a:first, (a:last+adjust_last), @@ -2950,6 +2972,11 @@ fu! csv#EvalColumn(nr, func, first, last, ...) range "{{{3 call csv#Warn("File is no CSV file!") return endif + " Need a Vim with floating point feature + if !has("float") + call csv#Warn("Your Vim is missing floating point feature!") + return + endif let save = winsaveview() call csv#CheckHeaderLine() let nr = matchstr(a:nr, '^\-\?\d\+') @@ -3031,10 +3058,12 @@ fu! csv#SumCSVRow(line, nr) "{{{3 endif let line=getline(ln) " Filter comments out - let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') - if line =~ pat - call csv#Warn("Invalid count specified") - return + if csv#ValidComment() + let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\') + if line =~ pat + call csv#Warn("Invalid count specified") + return + endif endif let func='csv#SumColumn' let cells=split(line, b:col.'\zs') @@ -3207,5 +3236,3 @@ endfun " Vim Modeline " {{{2 " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/autoload/dart.vim b/autoload/dart.vim index 52d76c020..09ca49e05 100644 --- a/autoload/dart.vim +++ b/autoload/dart.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dart', 'autoload/dart.vim') + finish +endif function! s:error(text) abort @@ -29,9 +31,9 @@ endfunction function! dart#fmt(...) abort let l:dartfmt = s:FindDartFmt() - if type(l:dartfmt) != type('') | return | endif + if empty(l:dartfmt) | return | endif let buffer_content = getline(1, '$') - let l:cmd = [l:dartfmt, '--stdin-name', shellescape(expand('%'))] + let l:cmd = extend(l:dartfmt, ['--stdin-name', shellescape(expand('%'))]) if exists('g:dartfmt_options') call extend(l:cmd, g:dartfmt_options) endif @@ -62,33 +64,37 @@ function! dart#fmt(...) abort endfunction function! s:FindDartFmt() abort - if executable('dartfmt') | return 'dartfmt' | endif + if executable('dart') + let l:version_text = system('dart --version') + let l:match = matchlist(l:version_text, + \ '\vDart SDK version: (\d+)\.(\d+)\.\d+.*') + if empty(l:match) + call s:error('Unable to determine dart version') + return [] + endif + let l:major = l:match[1] + let l:minor = l:match[2] + if l:major > 2 || l:major == 2 && l:minor >= 14 + return ['dart', 'format'] + endif + endif + " Legacy fallback for Dart SDK pre 2.14 + if executable('dartfmt') | return ['dartfmt'] | endif if executable('flutter') let l:flutter_cmd = resolve(exepath('flutter')) let l:bin = fnamemodify(l:flutter_cmd, ':h') let l:dartfmt = l:bin.'/cache/dart-sdk/bin/dartfmt' - if executable(l:dartfmt) | return l:dartfmt | endif + if executable(l:dartfmt) | return [l:dartfmt] | endif endif call s:error('Cannot find a `dartfmt` command') -endfunction - -function! dart#analyzer(q_args) abort - call s:error('DartAnalyzer support has been removed. '. - \'If this broke your workflow please comment on '. - \'https://github.com/dart-lang/dart-vim-plugin/issues/89') -endfunction - -function! dart#tojs(q_args) abort - call s:error('Dart2JS support has been removed. '. - \'If this broke your workflow please comment on '. - \'https://github.com/dart-lang/dart-vim-plugin/issues/89') + return [] endfunction " Finds the path to `uri`. " -" If the file is a package: uri, looks for a .packages file to resolve the path. -" If the path cannot be resolved, or is not a package: uri, returns the -" original. +" If the file is a package: uri, looks for a package_config.json or .packages +" file to resolve the path. If the path cannot be resolved, or is not a +" package: uri, returns the original. function! dart#resolveUri(uri) abort if a:uri !~# 'package:' return a:uri @@ -96,7 +102,7 @@ function! dart#resolveUri(uri) abort let package_name = substitute(a:uri, 'package:\(\w\+\)\/.*', '\1', '') let [found, package_map] = s:PackageMap() if !found - call s:error('cannot find .packages file') + call s:error('cannot find .packages or package_config.json file') return a:uri endif if !has_key(package_map, package_name) @@ -110,37 +116,63 @@ function! dart#resolveUri(uri) abort \ '') endfunction -" A map from package name to lib directory parse from a '.packages' file. +" A map from package name to lib directory parse from a 'package_config.json' +" or '.packages' file. " " Returns [found, package_map] function! s:PackageMap() abort - let [found, dot_packages] = s:DotPackagesFile() - if !found - return [v:false, {}] - endif - let dot_packages_dir = fnamemodify(dot_packages, ':p:h') - let lines = readfile(dot_packages) - let map = {} - for line in lines - if line =~# '\s*#' - continue + let [found, package_config] = s:FindFile('.dart_tool/package_config.json') + if found + let dart_tool_dir = fnamemodify(package_config, ':p:h') + let content = join(readfile(package_config), "\n") + let packages_dict = json_decode(content) + if packages_dict['configVersion'] != '2' + s:error('Unsupported version of package_config.json') + return [v:false, {}] endif - let package = substitute(line, ':.*$', '', '') - let lib_dir = substitute(line, '^[^:]*:', '', '') - if lib_dir =~# 'file:/' - let lib_dir = substitute(lib_dir, 'file://', '', '') - if lib_dir =~# '/[A-Z]:/' - let lib_dir = lib_dir[1:] + let map = {} + for package in packages_dict['packages'] + let name = package['name'] + let uri = package['rootUri'] + let package_uri = package['packageUri'] + if uri =~# 'file:/' + let uri = substitute(uri, 'file://', '', '') + let lib_dir = resolve(uri.'/'.package_uri) + else + let lib_dir = resolve(dart_tool_dir.'/'.uri.'/'.package_uri) endif - else - let lib_dir = resolve(dot_packages_dir.'/'.lib_dir) - endif - if lib_dir =~# '/$' - let lib_dir = lib_dir[:len(lib_dir) - 2] - endif - let map[package] = lib_dir - endfor - return [v:true, map] + let map[name] = lib_dir + endfor + return [v:true, map] + endif + + let [found, dot_packages] = s:FindFile('.packages') + if found + let dot_packages_dir = fnamemodify(dot_packages, ':p:h') + let lines = readfile(dot_packages) + let map = {} + for line in lines + if line =~# '\s*#' + continue + endif + let package = substitute(line, ':.*$', '', '') + let lib_dir = substitute(line, '^[^:]*:', '', '') + if lib_dir =~# 'file:/' + let lib_dir = substitute(lib_dir, 'file://', '', '') + if lib_dir =~# '/[A-Z]:/' + let lib_dir = lib_dir[1:] + endif + else + let lib_dir = resolve(dot_packages_dir.'/'.lib_dir) + endif + if lib_dir =~# '/$' + let lib_dir = lib_dir[:len(lib_dir) - 2] + endif + let map[package] = lib_dir + endfor + return [v:true, map] + endif + return [v:false, {}] endfunction " Toggle whether dartfmt is run on save or not. @@ -152,17 +184,17 @@ function! dart#ToggleFormatOnSave() abort let g:dart_format_on_save = 1 endfunction -" Finds a file name '.packages' in the cwd, or in any directory above the open +" Finds a file named [a:path] in the cwd, or in any directory above the open " file. " -" Returns [found, file]. -function! s:DotPackagesFile() abort - if filereadable('.packages') - return [v:true, '.packages'] +" Returns [found, file] +function! s:FindFile(path) abort + if filereadable(a:path) + return [v:true, a:path] endif let dir_path = expand('%:p:h') while v:true - let file_path = dir_path.'/.packages' + let file_path = dir_path.'/'.a:path if filereadable(file_path) return [v:true, file_path] endif @@ -183,5 +215,3 @@ function! dart#setModifiable() abort setlocal nomodifiable endif endfunction - -endif diff --git a/autoload/db/adapter/ecto.vim b/autoload/db/adapter/ecto.vim index 4012f04ab..a17652546 100644 --- a/autoload/db/adapter/ecto.vim +++ b/autoload/db/adapter/ecto.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'autoload/db/adapter/ecto.vim') + finish +endif let s:path = expand(':h') let s:cmd = join(['mix', 'run', '--no-start', '--no-compile', shellescape(s:path.'/get_repos.exs')]) @@ -20,5 +22,3 @@ endfunction function! db#adapter#ecto#complete_opaque(url) abort return map(s:repo_list(), 'v:val[0]') endfunction - -endif diff --git a/autoload/ecrystal.vim b/autoload/ecrystal.vim index 20f3151fa..1ea21a3e3 100644 --- a/autoload/ecrystal.vim +++ b/autoload/ecrystal.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/ecrystal.vim') + finish +endif let s:ecrystal_extensions = { \ 'cr': 'crystal', @@ -32,5 +34,3 @@ function! ecrystal#SetSubtype() abort endfunction " vim: sw=2 sts=2 et: - -endif diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim index e7c8f0ea4..ccf388b73 100644 --- a/autoload/elixir/indent.vim +++ b/autoload/elixir/indent.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'autoload/elixir/indent.vim') + finish +endif if !exists("g:elixir_indent_max_lookbehind") let g:elixir_indent_max_lookbehind = 30 @@ -22,6 +24,7 @@ function! elixir#indent#indent(lnum) call cursor(lnum, 0) let handlers = [ + \'inside_embedded_view', \'top_of_file', \'starts_with_string_continuation', \'following_trailing_binary_operator', @@ -67,6 +70,17 @@ function! s:prev_starts_with(context, expr) return s:_starts_with(a:context.prev_nb_text, a:expr, a:context.prev_nb_lnum) endfunction +function! s:in_embedded_view() + let groups = map(synstack(line('.'), col('.')), "synIDattr(v:val, 'name')") + for group in ['elixirPhoenixESigil', 'elixirLiveViewSigil', 'elixirSurfaceSigil'] + if index(groups, group) >= 0 + return 1 + endif + endfor + + return 0 +endfunction + " Returns 0 or 1 based on whether or not the text starts with the given " expression and is not a string or comment function! s:_starts_with(text, expr, lnum) @@ -106,7 +120,7 @@ endfunction " Returns 0 or 1 based on whether or not the given line number and column " number pair is a string or comment function! s:is_string_or_comment(line, col) - return s:syntax_name(a:line, a:col) =~ '\%(String\|Comment\)' + return s:syntax_name(a:line, a:col) =~ '\%(String\|Comment\|CharList\)' endfunction function! s:syntax_name(line, col) @@ -147,7 +161,7 @@ function! s:find_last_pos(lnum, text, match) let peek_match = match(peek, a:match) if peek_match == ss_match + 1 let syng = synIDattr(synID(a:lnum, c + ss_match, 1), 'name') - if syng !~ '\%(String\|Comment\)' + if syng !~ '\%(String\|Comment\|CharList\)' return c + ss_match end end @@ -158,6 +172,104 @@ function! s:find_last_pos(lnum, text, match) return -1 endfunction +function! elixir#indent#handle_inside_embedded_view(context) + if !s:in_embedded_view() + return -1 + endif + + " Multi-line Surface data delimiters + let pair_lnum = searchpair('{{', '', '}}', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind])) + if pair_lnum + if a:context.text =~ '}}$' + return indent(pair_lnum) + elseif a:context.text =~ '}}*>$' + return -1 + elseif s:prev_ends_with(a:context, '[\|%{') + return indent(a:context.prev_nb_lnum) + s:sw() + elseif a:context.prev_nb_text =~ ',$' + return indent(a:context.prev_nb_lnum) + else + return indent(pair_lnum) + s:sw() + endif + endif + + " Multi-line opening tag -- >, />, or %> are on a different line that their opening < + let pair_lnum = searchpair('^\s\+<.*[^>]$', '', '^[^<]*[/%}]\?>$', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind])) + if pair_lnum + if a:context.text =~ '^\s\+\%\(>\|\/>\|%>\|}}>\)$' + call s:debug("current line is a lone >, />, or %>") + return indent(pair_lnum) + elseif a:context.text =~ '\%\(>\|\/>\|%>\|}}>\)$' + call s:debug("current line ends in >, />, or %>") + if s:prev_ends_with(a:context, ',') + return indent(a:context.prev_nb_lnum) + else + return -1 + endif + else + call s:debug("in the body of a multi-line opening tag") + return indent(pair_lnum) + s:sw() + endif + endif + + " Special cases + if s:prev_ends_with(a:context, '^[^<]*do\s%>') + call s:debug("prev line closes a multi-line do block") + return indent(a:context.prev_nb_lnum) + elseif a:context.prev_nb_text =~ 'do\s*%>$' + call s:debug("prev line opens a do block") + return indent(a:context.prev_nb_lnum) + s:sw() + elseif a:context.text =~ '^\s\+<\/[a-zA-Z0-9\.\-_]\+>\|<% end %>' + call s:debug("a single closing tag") + if a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>.*<\/[a-zA-Z0-9\.\-_]\+>$' + call s:debug("opening and closing tags are on the same line") + return indent(a:context.prev_nb_lnum) - s:sw() + elseif a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>\|\s\+>' + call s:debug("prev line is opening html tag or single >") + return indent(a:context.prev_nb_lnum) + elseif s:prev_ends_with(a:context, '^[^<]*\%\(do\s\)\@') + call s:debug("prev line closes a multi-line eex tag") + return indent(a:context.prev_nb_lnum) - 2 * s:sw() + else + return indent(a:context.prev_nb_lnum) - s:sw() + endif + elseif a:context.text =~ '^\s*<%\s*\%(end\|else\|catch\|rescue\)\>.*%>' + call s:debug("eex middle or closing eex tag") + return indent(a:context.prev_nb_lnum) - s:sw() + elseif a:context.prev_nb_text =~ '\s*<\/\|<% end %>$' + call s:debug("prev is closing tag") + return indent(a:context.prev_nb_lnum) + elseif a:context.prev_nb_text =~ '^\s\+<[^%\/]*[^/]>.*<\/[a-zA-Z0-9\.\-_]\+>$' + call s:debug("opening and closing tags are on the same line") + return indent(a:context.prev_nb_lnum) + elseif s:prev_ends_with(a:context, '\s\+\/>') + call s:debug("prev ends with a single \>") + return indent(a:context.prev_nb_lnum) + elseif s:prev_ends_with(a:context, '^[^<]*\/>') + call s:debug("prev line is closing a multi-line self-closing tag") + return indent(a:context.prev_nb_lnum) - s:sw() + elseif s:prev_ends_with(a:context, '^\s\+<.*\/>') + call s:debug("prev line is closing self-closing tag") + return indent(a:context.prev_nb_lnum) + elseif a:context.prev_nb_text =~ '^\s\+%\?>$' + call s:debug("prev line is a single > or %>") + return indent(a:context.prev_nb_lnum) + s:sw() + endif + + " Simple HTML (ie, opening tag is not split across lines) + let pair_lnum = searchpair('^\s\+<[^%\/].*[^\/>]>$', '', '^\s\+<\/\w\+>$', 'bW', "line('.') == ".a:context.lnum." || s:is_string_or_comment(line('.'), col('.'))", max([0, a:context.lnum - g:elixir_indent_max_lookbehind])) + if pair_lnum + call s:debug("simple HTML") + if a:context.text =~ '^\s\+<\/\w\+>$' + return indent(pair_lnum) + else + return indent(pair_lnum) + s:sw() + endif + endif + + return -1 +endfunction + function! elixir#indent#handle_top_of_file(context) if a:context.prev_nb_lnum == 0 return 0 @@ -167,7 +279,7 @@ function! elixir#indent#handle_top_of_file(context) endfunction function! elixir#indent#handle_starts_with_string_continuation(context) - if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\)$' + if s:syntax_name(a:context.lnum, a:context.first_nb_char_idx) =~ '\(String\|Comment\|CharList\)$' return -2 else return -1 @@ -276,12 +388,14 @@ function! elixir#indent#handle_inside_block(context) " hack - handle do: better let block_info = searchpairpos(start_pattern, '', end_pattern, 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip() || getline(line('.')) =~ 'do:'", max([0, a:context.lnum - g:elixir_indent_max_lookbehind])) let block_start_lnum = block_info[0] + call s:debug("block_start_lnum=" . block_start_lnum) let block_start_col = block_info[1] if block_start_lnum != 0 || block_start_col != 0 let block_text = getline(block_start_lnum) let block_start_char = block_text[block_start_col - 1] + call s:debug("block_start_char=" . block_start_char) - let never_match = '\(a\)\@=b' + let never_match = '' let config = { \'f': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match}, \'c': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match}, @@ -293,17 +407,25 @@ function! elixir#indent#handle_inside_block(context) \'(': {'aligned_clauses': ')', 'pattern_match_clauses': never_match} \} + " if `with` clause... if block_start_char == 'w' call s:debug("testing s:handle_with") return s:handle_with(block_start_lnum, block_start_col, a:context) else let block_config = config[block_start_char] + " if aligned clause (closing tag/`else` clause/etc...) then indent this + " at the same level as the block open tag (e.g. `if`/`case`/etc...) if s:starts_with(a:context, block_config.aligned_clauses) call s:debug("clause") return indent(block_start_lnum) else - let clause_lnum = searchpair(block_config.pattern_match_clauses, '', '*', 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip()", block_start_lnum) - let relative_lnum = max([clause_lnum, block_start_lnum]) + if block_config.pattern_match_clauses == never_match + let relative_lnum = block_start_lnum + else + let clause_lnum = searchpair(block_config.pattern_match_clauses, '', '*', 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip()", block_start_lnum) + call s:debug("clause_lum=" . clause_lnum) + let relative_lnum = max([clause_lnum, block_start_lnum]) + end call s:debug("pattern matching relative to lnum " . relative_lnum) return s:do_handle_pattern_match_block(relative_lnum, a:context) endif @@ -361,5 +483,3 @@ function! elixir#indent#handle_inside_generic_block(context) return -1 endif endfunction - -endif diff --git a/autoload/elixir/util.vim b/autoload/elixir/util.vim index 04cb8375e..1cee91992 100644 --- a/autoload/elixir/util.vim +++ b/autoload/elixir/util.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'autoload/elixir/util.vim') + finish +endif function! elixir#util#get_filename(word) abort let word = a:word @@ -24,5 +26,3 @@ function! elixir#util#get_filename(word) abort return word endfunction - -endif diff --git a/autoload/fish.vim b/autoload/fish.vim index 6d8af0133..924f38b7f 100644 --- a/autoload/fish.vim +++ b/autoload/fish.vim @@ -1,43 +1,111 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fish', 'autoload/fish.vim') + finish +endif + +function! s:IsString(lnum, col) + " Returns "true" if syntax item at the given position is part of fishString. + let l:stack = map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")') + return len(filter(l:stack, 'v:val ==# "fishString"')) +endfunction + +function! s:IsContinuedLine(lnum) + " Returns "true" if the given line is a continued line. + return getline(a:lnum - 1) =~ '\v\\$' +endfunction + +function! s:FindPrevLnum(lnum) + " Starting on the given line, search backwards for a line that is not + " empty, not part of a string and not a continued line. + if a:lnum < 1 || a:lnum > line('$') + " First line or wrong value, follow prevnonblank() behaviour and + " return zero. + return 0 + endif + let l:lnum = prevnonblank(a:lnum) + while l:lnum > 0 && ( s:IsContinuedLine(l:lnum) || s:IsString(l:lnum, 1) ) + let l:lnum = prevnonblank(l:lnum - 1) + endwhile + return l:lnum +endfunction + +function! s:IsSwitch(lnum) + " Returns "true" if the given line is part of a switch block. + let l:lnum = a:lnum + let l:line = getline(l:lnum) + let l:in_block = 0 + let l:stop_pat = '\v^\s*%(if|else|while|for|begin)>' + let l:block_start_pat = '\v^\s*%(if|while|for|switch|begin)>' + while l:lnum > 0 + let l:lnum = prevnonblank(l:lnum - 1) + let l:line = getline(l:lnum) + if l:line =~# '\v^\s*end>' + let l:in_block += 1 + elseif l:in_block && l:line =~# l:block_start_pat + let l:in_block -= 1 + elseif !l:in_block && l:line =~# l:stop_pat + return 0 + elseif !l:in_block && l:line =~# '\v^\s*switch>' + return 1 + endif + endwhile + return 0 +endfunction function! fish#Indent() - let l:prevlnum = prevnonblank(v:lnum - 1) - if l:prevlnum ==# 0 + let l:line = getline(v:lnum) + if s:IsString(v:lnum, 1) + return indent(v:lnum) + endif + " shiftwidth can be misleading in recent versions, use shiftwidth() if + " it is available. + if exists('*shiftwidth') + let l:shiftwidth = shiftwidth() + else + let l:shiftwidth = &shiftwidth + endif + let l:prevlnum = s:FindPrevLnum(v:lnum - 1) + if l:prevlnum == 0 return 0 endif + let l:shift = 0 let l:prevline = getline(l:prevlnum) - let l:line = getline(v:lnum) - let l:shiftwidth = shiftwidth() let l:previndent = indent(l:prevlnum) - let l:indent = l:previndent - if l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|switch|case)>' - let l:indent += l:shiftwidth - endif - if l:line =~# '\v^\s*end>' - let l:indent -= l:shiftwidth - " If we're inside a case, dedent twice because it ends the switch. - if l:prevline =~# '\v^\s*case>' - " Previous line starts the case. - let l:indent -= l:shiftwidth + if s:IsContinuedLine(v:lnum) + let l:previndent = indent(v:lnum - 1) + if s:IsContinuedLine(v:lnum - 1) + return l:previndent + elseif exists('g:fish_indent_cont') + return l:previndent + g:fish_indent_cont + elseif exists('g:indent_cont') + return l:previndent + g:indent_cont else - " Scan back to a dedented line to find whether we're in a case. - let l:i = l:prevlnum - while l:i >= 1 && indent(l:i) >= l:previndent - let l:i = prevnonblank(l:i - 1) - endwhile - if indent(l:i) < l:previndent && getline(l:i) =~# '\v^\s*case>' - let l:indent -= l:shiftwidth - endif + return l:previndent + l:shiftwidth endif - elseif l:line =~# '\v^\s*else>' - let l:indent -= l:shiftwidth - elseif l:prevline !~# '\v^\s*switch>' && l:line =~# '\v^\s*case>' - let l:indent -= l:shiftwidth endif - if l:indent < 0 - return 0 + if l:prevline =~# '\v^\s*%(begin|if|else|while|for|function|case|switch)>' + " First line inside a block, increase by one. + let l:shift += 1 endif - return l:indent + if l:line =~# '\v^\s*%(end|case|else)>' + " "end", "case" or "else", decrease by one. + let l:shift -= 1 + endif + if l:line =~# '\v^\s*' && l:prevline =~# '\v' + " "case" following "switch", increase by one. + let l:shift += 1 + endif + if l:line =~# '\v\s*end>' && s:IsSwitch(v:lnum) + " "end" ends switch block, decrease by one more so it matches + " the indentation of "switch". + let l:shift -= 1 + endif + if l:prevline =~# '\v^\s*%(if|while|for|else|switch|end)>.*' + " "begin" after start of block, increase by one. + let l:shift += 1 + endif + let l:indent = l:previndent + l:shift * l:shiftwidth + " Only return zero or positive numbers. + return l:indent < 0 ? 0 : l:indent endfunction function! fish#Format() @@ -47,6 +115,8 @@ function! fish#Format() let l:command = v:lnum.','.(v:lnum+v:count-1).'!fish_indent' echo l:command execute l:command + " Fix indentation and replace tabs with spaces if necessary. + normal! '[='] endif endfunction @@ -85,5 +155,3 @@ endfunction function! fish#errorformat() return '%Afish: %m,%-G%*\\ ^,%-Z%f (line %l):%s' endfunction - -endif diff --git a/autoload/freebasic.vim b/autoload/freebasic.vim new file mode 100644 index 000000000..50be90451 --- /dev/null +++ b/autoload/freebasic.vim @@ -0,0 +1,45 @@ +if polyglot#init#is_disabled(expand(':p'), 'freebasic', 'autoload/freebasic.vim') + finish +endif + +" Vim filetype plugin file +" Language: FreeBASIC +" Maintainer: Doug Kearns +" Last Change: 2021 Mar 16 + +" Dialects can be one of fb, qb, fblite, or deprecated +" Precedence is forcelang > #lang > lang +function! freebasic#GetDialect() abort + if exists("g:freebasic_forcelang") + return g:freebasic_forcelang + endif + + if exists("g:freebasic_lang") + let dialect = g:freebasic_lang + else + let dialect = "fb" + endif + + " override with #lang directive or metacommand + + let skip = "has('syntax_items') && synIDattr(synID(line('.'), col('.'), 1), 'name') =~ 'Comment$'" + let pat = '\c^\s*\%(#\s*lang\s\+\|''\s*$lang\s*:\s*\)"\([^"]*\)"' + + let save_cursor = getcurpos() + call cursor(1, 1) + let lnum = search(pat, 'n', '', '', skip) + call setpos('.', save_cursor) + + if lnum + let word = matchlist(getline(lnum), pat)[1] + if word =~? '\%(fb\|deprecated\|fblite\|qb\)' + let dialect = word + else + echomsg "freebasic#GetDialect: Invalid lang, found '" .. word .. "' at line " .. lnum .. " " .. getline(lnum) + endif + endif + + return dialect +endfunction + +" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: diff --git a/autoload/fsharp.vim b/autoload/fsharp.vim index 6816d8228..bb93b9cd7 100644 --- a/autoload/fsharp.vim +++ b/autoload/fsharp.vim @@ -1,7 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fsharp', 'autoload/fsharp.vim') + finish +endif " Vim autoload functions - if exists('g:loaded_autoload_fsharp') finish endif @@ -10,6 +11,15 @@ let g:loaded_autoload_fsharp = 1 let s:cpo_save = &cpo set cpo&vim + +" basic setups + +let s:script_root_dir = expand(':p:h') . "/../" + +if has('nvim-0.5') + lua ionide = require("ionide") +endif + function! s:prompt(msg) let height = &cmdheight if height < 2 @@ -19,6 +29,9 @@ function! s:prompt(msg) let &cmdheight = height endfunction + +" FSAC payload interfaces + function! s:PlainNotification(content) return { 'Content': a:content } endfunction @@ -78,8 +91,24 @@ function! s:FsdnRequest(query) return { 'Query': a:query } endfunction + +" LSP functions + function! s:call(method, params, cont) - call LanguageClient#Call(a:method, a:params, a:cont) + if g:fsharp#backend == 'languageclient-neovim' + call LanguageClient#Call(a:method, a:params, a:cont) + elseif g:fsharp#backend == 'nvim' + let key = fsharp#register_callback(a:cont) + call luaeval('ionide.call(_A[1], _A[2], _A[3])', [a:method, a:params, key]) + endif +endfunction + +function! s:notify(method, params) + if g:fsharp#backend == 'languageclient-neovim' + call LanguageClient#Notify(a:method, a:params) + elseif g:fsharp#backend == 'nvim' + call luaeval('ionide.notify(_A[1], _A[2])', [a:method, a:params]) + endif endfunction function! s:signature(filePath, line, character, cont) @@ -119,8 +148,11 @@ function! s:documentationSymbol(xmlSig, assembly, cont) return s:call('fsharp/documentationSymbol', s:DocumentationForSymbolRequest(a:xmlSig, a:assembly), a:cont) endfunction + +" FSAC configuration + " FSharpConfigDto from https://github.com/fsharp/FsAutoComplete/blob/master/src/FsAutoComplete/LspHelpers.fs -" +" " * The following options seems not working with workspace/didChangeConfiguration " since the initialization has already completed? " 'AutomaticWorkspaceInit', @@ -151,14 +183,14 @@ let s:config_keys_camel = \ {'key': 'EnableAnalyzers', 'default': 0}, \ {'key': 'AnalyzersPath'}, \ {'key': 'DisableInMemoryProjectReferences', 'default': 0}, - \ {'key': 'LineLens', 'default': {'enabled': 'replaceCodeLens', 'prefix': '//'}}, + \ {'key': 'LineLens', 'default': {'enabled': 'never', 'prefix': ''}}, \ {'key': 'UseSdkScripts', 'default': 1}, \ {'key': 'dotNetRoot'}, \ {'key': 'fsiExtraParameters', 'default': []}, \ ] let s:config_keys = [] -function! fsharp#toSnakeCase(str) +function! s:toSnakeCase(str) let sn = substitute(a:str, '\(\<\u\l\+\|\l\+\)\(\u\)', '\l\1_\l\2', 'g') if sn == a:str | return tolower(a:str) | endif return sn @@ -168,7 +200,7 @@ function! s:buildConfigKeys() if len(s:config_keys) == 0 for key_camel in s:config_keys_camel let key = {} - let key.snake = fsharp#toSnakeCase(key_camel.key) + let key.snake = s:toSnakeCase(key_camel.key) let key.camel = key_camel.key if has_key(key_camel, 'default') let key.default = key_camel.default @@ -178,9 +210,9 @@ function! s:buildConfigKeys() endif endfunction -function! g:fsharp#getServerConfig() +function! fsharp#getServerConfig() let fsharp = {} - call s:buildConfigKeys() + call s:buildConfigKeys() for key in s:config_keys if exists('g:fsharp#' . key.snake) let fsharp[key.camel] = g:fsharp#{key.snake} @@ -194,54 +226,205 @@ function! g:fsharp#getServerConfig() return fsharp endfunction -function! g:fsharp#updateServerConfig() +function! fsharp#updateServerConfig() let fsharp = fsharp#getServerConfig() let settings = {'settings': {'FSharp': fsharp}} - call LanguageClient#Notify('workspace/didChangeConfiguration', settings) + call s:notify('workspace/didChangeConfiguration', settings) endfunction -function! s:findWorkspace(dir, cont) - let s:cont_findWorkspace = a:cont - function! s:callback_findWorkspace(result) - let result = a:result - let content = json_decode(result.result.content) - if len(content.Data.Found) < 1 - return [] +function! fsharp#loadConfig() + if exists('s:config_is_loaded') + return + endif + + if !exists('g:fsharp#fsautocomplete_command') + let g:fsharp#fsautocomplete_command = ['fsautocomplete', '--background-service-enabled'] + endif + if !exists('g:fsharp#use_recommended_server_config') + let g:fsharp#use_recommended_server_config = 1 + endif + call fsharp#getServerConfig() + if !exists('g:fsharp#automatic_workspace_init') + let g:fsharp#automatic_workspace_init = 1 + endif + if !exists('g:fsharp#automatic_reload_workspace') + let g:fsharp#automatic_reload_workspace = 1 + endif + if !exists('g:fsharp#show_signature_on_cursor_move') + let g:fsharp#show_signature_on_cursor_move = 0 + endif + if !exists('g:fsharp#fsi_command') + let g:fsharp#fsi_command = "dotnet fsi" + endif + if !exists('g:fsharp#fsi_keymap') + let g:fsharp#fsi_keymap = "vscode" + endif + if !exists('g:fsharp#fsi_window_command') + let g:fsharp#fsi_window_command = "botright 10new" + endif + if !exists('g:fsharp#fsi_focus_on_send') + let g:fsharp#fsi_focus_on_send = 0 + endif + if !exists('g:fsharp#backend') + if has('nvim-0.5') + if exists('g:LanguageClient_loaded') + let g:fsharp#backend = "languageclient-neovim" + else + let g:fsharp#backend = "nvim" + endif + else + let g:fsharp#backend = "languageclient-neovim" endif - let workspace = { 'Type': 'none' } - for found in content.Data.Found - if workspace.Type == 'none' - let workspace = found - elseif found.Type == 'solution' - if workspace.Type == 'project' - let workspace = found - else - let curLen = len(workspace.Data.Items) - let newLen = len(found.Data.Items) - if newLen > curLen - let workspace = found - endif - endif + endif + + " backend configuration + if g:fsharp#backend == 'languageclient-neovim' + let $DOTNET_ROLL_FORWARD='LatestMajor' + if !exists('g:LanguageClient_serverCommands') + let g:LanguageClient_serverCommands = {} + endif + if !has_key(g:LanguageClient_serverCommands, 'fsharp') + let g:LanguageClient_serverCommands.fsharp = { + \ 'name': 'fsautocomplete', + \ 'command': g:fsharp#fsautocomplete_command, + \ 'initializationOptions': {}, + \} + if g:fsharp#automatic_workspace_init + let g:LanguageClient_serverCommands.fsharp.initializationOptions = { + \ 'AutomaticWorkspaceInit': v:true, + \} endif - endfor - if workspace.Type == 'solution' - call s:cont_findWorkspace([workspace.Data.Path]) + endif + + if !exists('g:LanguageClient_rootMarkers') + let g:LanguageClient_rootMarkers = {} + endif + if !has_key(g:LanguageClient_rootMarkers, 'fsharp') + let g:LanguageClient_rootMarkers.fsharp = ['*.sln', '*.fsproj', '.git'] + endif + elseif g:fsharp#backend == 'nvim' + if !exists('g:fsharp#lsp_auto_setup') + let g:fsharp#lsp_auto_setup = 1 + endif + if !exists('g:fsharp#lsp_recommended_colorscheme') + let g:fsharp#lsp_recommended_colorscheme = 1 + endif + if !exists('g:fsharp#lsp_codelens') + let g:fsharp#lsp_codelens = 1 + endif + + else + if g:fsharp#backend != 'disable' + echoerr "[FSAC] Invalid backend: " . g:fsharp#backend + endif + endif + + " FSI keymaps + if g:fsharp#fsi_keymap == "vscode" + if has('nvim') + let g:fsharp#fsi_keymap_send = "" + let g:fsharp#fsi_keymap_toggle = "" else - call s:cont_findWorkspace(workspace.Data.Fsprojs) + let g:fsharp#fsi_keymap_send = "" + let g:fsharp#fsi_keymap_toggle = "@" endif - endfunction - call s:workspacePeek(a:dir, g:fsharp#workspace_mode_peek_deep_level, g:fsharp#exclude_project_directories, function("s:callback_findWorkspace")) + elseif g:fsharp#fsi_keymap == "vim-fsharp" + let g:fsharp#fsi_keymap_send = "i" + let g:fsharp#fsi_keymap_toggle = "e" + elseif g:fsharp#fsi_keymap == "custom" + let g:fsharp#fsi_keymap = "none" + if !exists('g:fsharp#fsi_keymap_send') + echoerr "g:fsharp#fsi_keymap_send is not set" + elseif !exists('g:fsharp#fsi_keymap_toggle') + echoerr "g:fsharp#fsi_keymap_toggle is not set" + else + let g:fsharp#fsi_keymap = "custom" + endif + endif + + let s:config_is_loaded = 1 +endfunction + + +" handlers for notifications + +let s:handlers = { + \ 'fsharp/notifyWorkspace': 'fsharp#handle_notifyWorkspace', + \ } + +function! s:registerAutocmds() + if g:fsharp#backend == 'nvim' && g:fsharp#lsp_codelens + augroup FSharp_AutoRefreshCodeLens + autocmd! + autocmd CursorHold,InsertLeave lua vim.lsp.codelens.refresh() + augroup END + endif + if g:fsharp#backend != 'disable' + augroup FSharp_OnCursorMove + autocmd! + autocmd CursorMoved *.fs,*.fsi,*.fsx call fsharp#OnCursorMove() + augroup END + endif +endfunction + +function! fsharp#initialize() + echom '[FSAC] Initialized' + if g:fsharp#backend == 'languageclient-neovim' + call LanguageClient_registerHandlers(s:handlers) + endif + call fsharp#updateServerConfig() + call s:registerAutocmds() +endfunction + + +" nvim-lsp specific functions + +" handlers are picked up by ionide.setup() +function! fsharp#get_handlers() + return s:handlers endfunction +let s:callbacks = {} + +function! fsharp#register_callback(fn) + if g:fsharp#backend != 'nvim' + return -1 + endif + let rnd = reltimestr(reltime()) + let s:callbacks[rnd] = a:fn + return rnd +endfunction + +function! fsharp#resolve_callback(key, arg) + if g:fsharp#backend != 'nvim' + return + endif + if has_key(s:callbacks, a:key) + let Callback = s:callbacks[a:key] + call Callback(a:arg) + call remove(s:callbacks, a:key) + endif +endfunction + + +" .NET/F# specific operations + let s:workspace = [] +function! fsharp#handle_notifyWorkspace(payload) abort + let content = json_decode(a:payload.content) + if content.Kind == 'projectLoading' + echom "[FSAC] Loading" content.Data.Project + let s:workspace = uniq(sort(add(s:workspace, content.Data.Project))) + elseif content.Kind == 'workspaceLoad' && content.Data.Status == 'finished' + echom printf("[FSAC] Workspace loaded (%d project(s))", len(s:workspace)) + call fsharp#updateServerConfig() + endif +endfunction + + function! s:load(arg) - let s:loading_workspace = a:arg - function! s:callback_load(_) - echo "[FSAC] Workspace loaded: " . join(s:loading_workspace, ', ') - let s:workspace = s:workspace + s:loading_workspace - endfunction - call s:workspaceLoad(a:arg, function("s:callback_load")) + call s:workspaceLoad(a:arg, v:null) endfunction function! fsharp#loadProject(...) @@ -252,23 +435,15 @@ function! fsharp#loadProject(...) call s:load(prjs) endfunction -function! fsharp#loadWorkspaceAuto() - if &ft == 'fsharp' - call fsharp#updateServerConfig() - if g:fsharp#automatic_workspace_init - echom "[FSAC] Loading workspace..." - let bufferDirectory = fnamemodify(resolve(expand('%:p')), ':h') - call s:findWorkspace(bufferDirectory, function("s:load")) - endif - endif +function! fsharp#showLoadedProjects() + for proj in s:workspace + echo "-" proj + endfor endfunction function! fsharp#reloadProjects() if len(s:workspace) > 0 - function! s:callback_reloadProjects(_) - call s:prompt("[FSAC] Workspace reloaded.") - endfunction - call s:workspaceLoad(s:workspace, function("s:callback_reloadProjects")) + call s:workspaceLoad(s:workspace, v:null) else echom "[FSAC] Workspace is empty" endif @@ -286,7 +461,7 @@ function! fsharp#showSignature() if exists('result.result.content') let content = json_decode(result.result.content) if exists('content.Data') - echom substitute(content.Data, '\n\+$', ' ', 'g') + echo substitute(content.Data, '\n\+$', ' ', 'g') endif endif endfunction @@ -300,8 +475,25 @@ function! fsharp#OnCursorMove() endfunction function! fsharp#showF1Help() - let result = s:f1Help(expand('%:p'), line('.') - 1, col('.') - 1) - echo result + function! s:callback_showF1Help(result) + let result = a:result + if exists('result.result.content') + let content = json_decode(result.result.content) + if exists('content.Data') + let url = 'https://docs.microsoft.com/en-us/dotnet/api/' . substitute(content.Data, '#ctor', '-ctor', 'g') + echo url + endif + endif + endfunction + call s:f1Help(expand('%:p'), line('.') - 1, col('.') - 1, function("s:callback_showF1Help")) +endfunction + +function! s:hover() + if g:fsharp#backend == 'languageclient-neovim' + call LanguageClient#textDocument_hover() + elseif g:fsharp#backend == 'nvim' + lua vim.lsp.buf.hover() + endif endfunction function! fsharp#showTooltip() @@ -310,7 +502,7 @@ function! fsharp#showTooltip() if exists('result.result.content') let content = json_decode(result.result.content) if exists('content.Data') - call LanguageClient#textDocument_hover() + call s:hover() endif endif endfunction @@ -318,36 +510,8 @@ function! fsharp#showTooltip() call s:signature(expand('%:p'), line('.') - 1, col('.') - 1, function("s:callback_showTooltip")) endfunction -let s:script_root_dir = expand(':p:h') . "/../" -let s:fsac = fnamemodify(s:script_root_dir . "fsac/fsautocomplete.dll", ":p") -let g:fsharp#languageserver_command = - \ ['dotnet', s:fsac, - \ '--background-service-enabled' - \ ] - -function! s:download(branch) - echom "[FSAC] Downloading FSAC. This may take a while..." - let zip = s:script_root_dir . "fsac.zip" - call system( - \ 'curl -fLo ' . zip . ' --create-dirs ' . - \ '"https://ci.appveyor.com/api/projects/fsautocomplete/fsautocomplete/artifacts/bin/pkgs/fsautocomplete.netcore.zip?branch=' . a:branch . '"' - \ ) - if v:shell_error == 0 - call system('unzip -o -d ' . s:script_root_dir . "/fsac " . zip) - echom "[FSAC] Updated FsAutoComplete to version " . a:branch . "" - else - echom "[FSAC] Failed to update FsAutoComplete" - endif -endfunction -function! fsharp#updateFSAC(...) - if len(a:000) == 0 - let branch = "master" - else - let branch = a:000[0] - endif - call s:download(branch) -endfunction +" FSI integration let s:fsi_buffer = -1 let s:fsi_job = -1 @@ -377,7 +541,6 @@ endfunction function! fsharp#openFsi(returnFocus) if bufwinid(s:fsi_buffer) <= 0 let fsi_command = s:get_fsi_command() - " Neovim if exists('*termopen') || exists('*term_start') let current_win = win_getid() execute g:fsharp#fsi_window_command @@ -421,7 +584,7 @@ function! fsharp#openFsi(returnFocus) if a:returnFocus | call s:win_gotoid_safe(current_win) | endif return s:fsi_buffer else - echom "[FSAC] Your Vim does not support terminal". + echom "[FSAC] Your (neo)vim does not support terminal". return 0 endif endif @@ -465,10 +628,10 @@ function! fsharp#sendFsi(text) if fsharp#openFsi(!g:fsharp#fsi_focus_on_send) > 0 " Neovim if has('nvim') - call chansend(s:fsi_job, a:text . ";;". "\n") + call chansend(s:fsi_job, a:text . "\n" . ";;". "\n") " Vim 8 else - call term_sendkeys(s:fsi_buffer, a:text . ";;" . "\") + call term_sendkeys(s:fsi_buffer, a:text . "\" . ";;" . "\") call term_wait(s:fsi_buffer) endif endif @@ -513,5 +676,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=4 et sts=4 - -endif diff --git a/autoload/fzf_gitignore.vim b/autoload/fzf_gitignore.vim new file mode 100644 index 000000000..40272db77 --- /dev/null +++ b/autoload/fzf_gitignore.vim @@ -0,0 +1,41 @@ +if polyglot#init#is_disabled(expand(':p'), 'gitignore', 'autoload/fzf_gitignore.vim') + finish +endif + +scriptencoding utf-8 + +" Copyright (c) 2017-2020 Filip Szymański. All rights reserved. +" Use of this source code is governed by an MIT license that can be +" found in the LICENSE file. + +function! s:template_sink(templates) abort + try + let l:lines = _fzf_gitignore_create(a:templates) + catch /^Vim(\(let\|return\)):/ + return + endtry + + new + setlocal filetype=gitignore + + call setline(1, l:lines) + + $-2,$delete _ + normal! gg +endfunction + +function! fzf_gitignore#run() abort + try + let l:opts = { + \ 'source': _fzf_gitignore_get_all_templates(), + \ 'sink*': function('s:template_sink'), + \ 'options': '-m --prompt="Template> " --header="gitignore.io"' + \ } + catch /^Vim(\(let\|return\)):/ + return + endtry + + call fzf#run(fzf#wrap(l:opts)) +endfunction + +" vim: ts=2 et sw=2 diff --git a/autoload/go/config.vim b/autoload/go/config.vim index 956da2207..0ee1466fe 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -1,13 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'autoload/go/config.vim') + finish +endif " don't spam the user when Vim is started in Vi compatibility mode let s:cpo_save = &cpo set cpo&vim -function! go#config#AutodetectGopath() abort - return get(g:, 'go_autodetect_gopath', 0) -endfunction - function! go#config#ListTypeCommands() abort return get(g:, 'go_list_type_commands', {}) endfunction @@ -217,6 +215,14 @@ function! go#config#DebugWindows() abort endfunction +function! go#config#DebugSubstitutePaths() abort + return get(g:, 'go_debug_substitute_paths', []) +endfunction + +function! go#config#DebugPreserveLayout() abort + return get(g:, 'go_debug_preserve_layout', 0) +endfunction + function! go#config#DebugAddress() abort return get(g:, 'go_debug_address', '127.0.0.1:8181') endfunction @@ -265,20 +271,31 @@ function! go#config#SetTemplateAutocreate(value) abort let g:go_template_autocreate = a:value endfunction +let s:default_metalinter = 'staticcheck' function! go#config#MetalinterCommand() abort - return get(g:, "go_metalinter_command", "golangci-lint") + return get(g:, 'go_metalinter_command', s:default_metalinter) endfunction function! go#config#MetalinterAutosaveEnabled() abort - return get(g:, "go_metalinter_autosave_enabled", ["govet", "golint"]) + let l:default = [] + if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint' + let l:default = ['govet', 'revive'] + endif + + return get(g:, 'go_metalinter_autosave_enabled', l:default) endfunction function! go#config#MetalinterEnabled() abort - return get(g:, "go_metalinter_enabled", ["vet", "golint", "errcheck"]) + let l:default = [] + if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint' + let l:default = ['vet', 'revive', 'errcheck'] + endif + + return get(g:, 'go_metalinter_enabled', l:default) endfunction function! go#config#GolintBin() abort - return get(g:, "go_golint_bin", "golint") + return get(g:, "go_golint_bin", "revive") endfunction function! go#config#ErrcheckBin() abort @@ -302,7 +319,7 @@ function! go#config#FmtAutosave() abort endfunction function! go#config#ImportsAutosave() abort - return get(g:, 'go_imports_autosave', 0) + return get(g:, 'go_imports_autosave', 1) endfunction function! go#config#SetFmtAutosave(value) abort @@ -346,11 +363,11 @@ function! go#config#DeclsMode() abort endfunction function! go#config#FmtCommand() abort - return get(g:, "go_fmt_command", "gofmt") + return get(g:, "go_fmt_command", go#config#GoplsEnabled() ? 'gopls' : 'gofmt') endfunction function! go#config#ImportsMode() abort - return get(g:, "go_imports_mode", "goimports") + return get(g:, "go_imports_mode", go#config#GoplsEnabled() ? 'gopls' : 'goimports') endfunction function! go#config#FmtOptions() abort @@ -375,7 +392,7 @@ function! go#config#RenameCommand() abort endfunction function! go#config#GorenameBin() abort - return get(g:, "go_gorename_bin", "gopls") + return get(g:, "go_gorename_bin", 'gopls') endfunction function! go#config#GorenamePrefill() abort @@ -514,7 +531,7 @@ function! go#config#ReferrersMode() abort endfunction function! go#config#ImplementsMode() abort - return get(g:, 'go_implements_mode', 'guru') + return get(g:, 'go_implements_mode', 'gopls') endfunction function! go#config#GoplsCompleteUnimported() abort @@ -552,18 +569,60 @@ function! go#config#GoplsLocal() abort return get(g:, 'go_gopls_local', v:null) endfunction +function! go#config#GoplsGofumpt() abort + return get(g:, 'go_gopls_gofumpt', v:null) +endfunction + +function! go#config#GoplsSettings() abort + return get(g:, 'go_gopls_settings', v:null) +endfunction + function! go#config#GoplsEnabled() abort return get(g:, 'go_gopls_enabled', 1) endfunction +" TODO(bc): remove support for g:go_diagnostics_enabled; +" g:go_diagnostics_level is the replacement. function! go#config#DiagnosticsEnabled() abort return get(g:, 'go_diagnostics_enabled', 0) endfunction +function! go#config#DiagnosticsLevel() abort + let l:default = 0 + if has_key(g:, 'go_diagnostics_enabled') && g:go_diagnostics_enabled + let l:default = 2 + endif + + return get(g:, 'go_diagnostics_level', l:default) +endfunction + function! go#config#GoplsOptions() abort return get(g:, 'go_gopls_options', ['-remote=auto']) endfunction +function! go#config#FillStructMode() abort + return get(g:, 'go_fillstruct_mode', 'fillstruct') +endfunction + +function! go#config#DebugMappings() abort + let l:default = { + \ '(go-debug-continue)': {'key': ''}, + \ '(go-debug-print)': {'key': ''}, + \ '(go-debug-breakpoint)': {'key': ''}, + \ '(go-debug-next)': {'key': ''}, + \ '(go-debug-step)': {'key': ''}, + \ '(go-debug-halt)': {'key': ''}, + \ } + + let l:user = deepcopy(get(g:, 'go_debug_mappings', {})) + + return extend(l:user, l:default, 'keep') +endfunction + +function! go#config#DocBalloon() abort + return get(g:, 'go_doc_balloon', 0) +endfunction + " Set the default value. A value of "1" is a shortcut for this, for " compatibility reasons. if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1 @@ -575,5 +634,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/autoload/graphql.vim b/autoload/graphql.vim index 5a0a8c54d..135d184a7 100644 --- a/autoload/graphql.vim +++ b/autoload/graphql.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'autoload/graphql.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -35,5 +37,3 @@ endfunction function! graphql#javascript_tags() abort return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL']) endfunction - -endif diff --git a/autoload/hcl.vim b/autoload/hcl.vim new file mode 100644 index 000000000..b76def6ac --- /dev/null +++ b/autoload/hcl.vim @@ -0,0 +1,20 @@ +if polyglot#init#is_disabled(expand(':p'), 'terraform', 'autoload/hcl.vim') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +function! hcl#align() abort + let p = '^.*=[^>]*$' + if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) + let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g')) + let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*')) + Tabularize/=.*/l1 + normal! 0 + call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) + endif +endfunction + +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/autoload/htmlcomplete.vim b/autoload/htmlcomplete.vim index 135f716b5..a378493ef 100644 --- a/autoload/htmlcomplete.vim +++ b/autoload/htmlcomplete.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if polyglot#init#is_disabled(expand(':p'), 'html5', 'autoload/htmlcomplete.vim') + finish +endif " Vim completion script " Language: HTML and XHTML @@ -841,5 +843,3 @@ function! htmlcomplete#CheckDoctype() " {{{ endfunction " }}} " vim:set foldmethod=marker: - -endif diff --git a/autoload/jsonnet.vim b/autoload/jsonnet.vim index 6607ac0df..6a71cbb64 100644 --- a/autoload/jsonnet.vim +++ b/autoload/jsonnet.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'jsonnet', 'autoload/jsonnet.vim') + finish +endif @@ -125,5 +127,3 @@ function! jsonnet#Format() endfunction - -endif diff --git a/autoload/jsx_pretty/comment.vim b/autoload/jsx_pretty/comment.vim index 7ba23b821..f9ae5b18c 100644 --- a/autoload/jsx_pretty/comment.vim +++ b/autoload/jsx_pretty/comment.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'autoload/jsx_pretty/comment.vim') + finish +endif function! jsx_pretty#comment#update_commentstring(original) let line = getline(".") @@ -37,5 +39,3 @@ function! s:syn_contains(lnum, cnum, syn_name) let syn_names = map(stack, 'synIDattr(v:val, "name")') return index(syn_names, a:syn_name) >= 0 endfunction - -endif diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim index be78ccaaf..f45316b21 100644 --- a/autoload/jsx_pretty/indent.vim +++ b/autoload/jsx_pretty/indent.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) +if polyglot#init#is_disabled(expand(':p'), 'jsx', 'autoload/jsx_pretty/indent.vim') + finish +endif if exists('*shiftwidth') function! s:sw() @@ -302,5 +304,3 @@ function! jsx_pretty#indent#get(js_indent) return a:js_indent() endfunction - -endif diff --git a/autoload/julia.vim b/autoload/julia.vim index 9442f611d..6ffe5fd59 100644 --- a/autoload/julia.vim +++ b/autoload/julia.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 +if polyglot#init#is_disabled(expand(':p'), 'julia', 'autoload/julia.vim') + finish +endif function! julia#set_syntax_version(jvers) echo "The julia#set_syntax_version function is deprecated" @@ -165,5 +167,3 @@ function! julia#gotodefinition() endfunction endif - -endif diff --git a/autoload/julia/doc.vim b/autoload/julia/doc.vim index 7907c94a0..fe311222e 100644 --- a/autoload/julia/doc.vim +++ b/autoload/julia/doc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 +if polyglot#init#is_disabled(expand(':p'), 'julia', 'autoload/julia/doc.vim') + finish +endif " path to the julia binary to communicate with if has('win32') || has('win64') @@ -37,7 +39,7 @@ let s:NODOCPATTERN = '\C\VNo documentation found.' function! julia#doc#lookup(keyword, ...) abort let juliapath = get(a:000, 0, g:julia#doc#juliapath) let keyword = escape(a:keyword, '"\') - let cmd = printf('%s -E "@doc %s"', juliapath, keyword) + let cmd = printf('%s --compile=min --optimize=0 -E "@doc %s"', juliapath, keyword) return systemlist(cmd) endfunction @@ -95,7 +97,7 @@ function! s:write_to_preview_window(content, ftype, buffername) else " We couldn't make it to the preview window, so as a fallback we dump the " contents in the status area. - execute printf("echo '%s'", join(a:content, "\n")) + echo join(a:content, "\n") endif endfunction @@ -238,9 +240,7 @@ endfunction function! s:likely(str) abort " escape twice let str = escape(escape(a:str, '"\'), '"\') - let cmd = printf('%s -E "%s(\"%s\")"', g:julia#doc#juliapath, s:REPL_SEARCH, str) + let cmd = printf('%s --compile=min --optimize=0 -E "%s(\"%s\")"', g:julia#doc#juliapath, s:REPL_SEARCH, str) let output = systemlist(cmd) return split(matchstr(output[0], '\C^search: \zs.*')) endfunction - -endif diff --git a/autoload/julia_blocks.vim b/autoload/julia_blocks.vim index 81c204cf4..0f50eb76d 100644 --- a/autoload/julia_blocks.vim +++ b/autoload/julia_blocks.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 +if polyglot#init#is_disabled(expand(':p'), 'julia', 'autoload/julia_blocks.vim') + finish +endif " Facilities for moving around Julia blocks (e.g. if/end, function/end etc.) " (AKA a collection of horrible hacks) @@ -115,8 +117,8 @@ function! s:unmap(function) return endif let mapids = a:function =~# "^move" ? ["n", "x", "o"] : - \ a:function =~# "^select" ? ["x", "o"] : - \ ["n"] + \ a:function =~# "^select" ? ["x", "o"] : + \ ["n"] let fn = "julia_blocks#" . a:function let cmd = " " . chars for m in mapids @@ -337,7 +339,7 @@ function! s:on_begin() let [l,c] = [line('.'), col('.')] normal! ^ let patt = '\%<'.(c+1).'c\(' . b:julia_begin_keywordsm . '\)\%>'.(c-1).'c' - let n = search(patt, 'Wnc', l) + let n = search('\C' . patt, 'Wnc', l) call cursor(l, c) return n > 0 endfunction @@ -348,15 +350,15 @@ function! s:matchit() endfunction function! s:move_before_begin() - call search(b:julia_begin_keywordsm, 'Wbc') + call search('\C' . b:julia_begin_keywordsm, 'Wbc') normal! h endfunction function! s:cycle_until_end() - let pos = getpos('.') + let c = 0 while !s:on_end() + let pos = getpos('.') call s:matchit() - let c = 0 if getpos('.') == pos || c > 1000 " shouldn't happen, but let's avoid infinite loops anyway return 0 @@ -380,14 +382,14 @@ function! s:moveto_block_delim(toend, backwards, ...) normal! bh endif while 1 - let searchret = search(pattern, flags) + let searchret = search('\C' . pattern, flags) if !searchret - return ret + return ret endif exe "let skip = " . b:match_skip if !skip - let ret = 1 - break + let ret = 1 + break endif endwhile endfor @@ -471,7 +473,7 @@ function! s:moveto_currentblock_end() normal! b endif - let ret = searchpair(b:julia_begin_keywordsm, '', b:julia_end_keywords, flags, b:match_skip) + let ret = searchpair('\C' . b:julia_begin_keywordsm, '', '\C' . b:julia_end_keywords, flags, b:match_skip) if ret <= 0 return s:abort() endif @@ -493,15 +495,15 @@ function! julia_blocks#moveblock_N() let start1_pos = ret_start ? getpos('.') : [0,0,0,0] call setpos('.', save_pos) if s:on_end() - normal! h + normal! h endif let ret_end = s:moveto_block_delim(1, 0, 1) let end1_pos = ret_end ? getpos('.') : [0,0,0,0] if ret_start && (!ret_end || s:compare_pos(start1_pos, end1_pos) < 0) - call setpos('.', start1_pos) + call setpos('.', start1_pos) else - call setpos('.', save_pos) + call setpos('.', save_pos) endif endif @@ -562,7 +564,7 @@ function! julia_blocks#moveblock_p() if s:on_begin() call s:move_before_begin() if s:on_end() - normal! l + normal! l endif let save_pos = getpos('.') let ret_start = s:moveto_block_delim(0, 1, 1) @@ -572,9 +574,9 @@ function! julia_blocks#moveblock_p() let end1_pos = ret_end ? getpos('.') : [0,0,0,0] if ret_end && (!ret_start || s:compare_pos(start1_pos, end1_pos) < 0) - call setpos('.', end1_pos) + call setpos('.', end1_pos) else - call setpos('.', save_pos) + call setpos('.', save_pos) endif endif @@ -677,7 +679,7 @@ function! s:find_block(current_mode) normal! l normal! b endif - let searchret = searchpair(b:julia_begin_keywordsm, '', b:julia_end_keywords, flags, b:match_skip) + let searchret = searchpair('\C' . b:julia_begin_keywordsm, '', '\C' . b:julia_end_keywords, flags, b:match_skip) if searchret <= 0 if !b:jlblk_did_select return s:abort() @@ -698,7 +700,7 @@ function! s:find_block(current_mode) endfunction function! s:repeated_find(ai_mode) - let repeat = b:jlblk_count + (a:ai_mode == 'i' && v:count1 > 1 ? 1 : 0) + let repeat = b:jlblk_count + (a:ai_mode == 'i' && b:jlblk_count > 1 ? 1 : 0) for c in range(repeat) let current_mode = (c < repeat - 1 ? 'a' : a:ai_mode) let ret_find_block = s:find_block(current_mode) @@ -732,8 +734,8 @@ function! julia_blocks#select_a(...) let b:jlblk_doing_select = 1 - " CursorMove is only triggered if end_pos - " end_pos is different than the staring position; + " CursorMoved is only triggered if end_pos + " is different than the staring position; " so when starting from the 'd' in 'end' we need to " force it if current_pos == end_pos @@ -744,6 +746,39 @@ function! julia_blocks#select_a(...) return [start_pos, end_pos] endfunction +let s:bracketBlocks = '\' +let s:codeBlocks = '\' + +function s:is_in_brackets(lnum, c) + let stack = map(synstack(a:lnum, a:c), 'synIDattr(v:val, "name")') + for i in range(len(stack)-1, 0, -1) + if stack[i] =~# s:bracketBlocks + return 1 + elseif stack[i] =~# s:codeBlocks + return 0 + endif + endfor + return 0 +endfunction + +function! s:seek_bracket_end() + let [lnum, c] = [line('.'), col('.')] + if !s:is_in_brackets(lnum, c) + return + endif + while c > 0 && s:is_in_brackets(lnum, c) + let c -= 1 + endwhile + let c += 1 + if !s:is_in_brackets(lnum, c) + echoerr "this is a bug, please report it" + return + end + call cursor(lnum, c) + call s:matchit() + return +endfunction + function! julia_blocks#select_i() call s:get_save_pos(!b:jlblk_did_select) let current_pos = getpos('.') @@ -757,19 +792,32 @@ function! julia_blocks#select_i() return s:abort() endif - call setpos('.', end_pos) - let b:jlblk_doing_select = 1 - let start_pos[1] += 1 call setpos('.', start_pos) - normal! ^ + normal! $ + call s:seek_bracket_end() + let l = getline('.') + while col('.') < len(l) && l[col('.'):] =~# '^\s*;' + normal! l + endwhile + if col('.') == len(l) || l[col('.')] =~# '\s' + normal! W + else + normal! l + endif let start_pos = getpos('.') - let end_pos[1] -= 1 - let end_pos[2] = len(getline(end_pos[1])) - " CursorMove is only triggered if end_pos - " end_pos is different than the staring position; + call setpos('.', end_pos) + if end_pos[2] > 1 && getline('.')[end_pos[2]-2] =~# '\S' + normal! h + else + normal! gE + endif + let end_pos = getpos('.') + + " CursorMoved is only triggered if end_pos + " is different than the staring position; " so when starting from the 'd' in 'end' we need to " force it if current_pos == end_pos @@ -794,5 +842,3 @@ function! s:cursor_moved(...) let b:jlblk_did_select = b:jlblk_doing_select let b:jlblk_doing_select = 0 endfunction - -endif diff --git a/autoload/julia_latex_symbols.vim b/autoload/julia_latex_symbols.vim index 3b2bf0506..05d1fb6a4 100644 --- a/autoload/julia_latex_symbols.vim +++ b/autoload/julia_latex_symbols.vim @@ -1,7 +1,9 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 +if polyglot#init#is_disabled(expand(':p'), 'julia', 'autoload/julia_latex_symbols.vim') + finish +endif " This file is autogenerated from the script 'generate_latex_symbols_table.jl' -" The symbols are based on Julia version 1.5.0-DEV.67 +" The symbols are based on Julia version 1.9.0-DEV.16 scriptencoding utf-8 @@ -265,7 +267,7 @@ function! julia_latex_symbols#get_dict() \ '\^c': 'ᶜ', \ '\^f': 'ᶠ', \ '\^iota': 'ᶥ', - \ '\^Phi': 'ᶲ', + \ '\^ltphi': 'ᶲ', \ '\^z': 'ᶻ', \ '\^theta': 'ᶿ', \ '\enspace': ' ', @@ -279,8 +281,8 @@ function! julia_latex_symbols#get_dict() \ '\lq': '‘', \ '\rq': '’', \ '\reapos': '‛', - \ '\quotedblleft': '“', - \ '\quotedblright': '”', + \ '\ldq': '“', + \ '\rdq': '”', \ '\dagger': '†', \ '\ddagger': '‡', \ '\bullet': '•', @@ -372,10 +374,12 @@ function! julia_latex_symbols#get_dict() \ '\scrH': 'ℋ', \ '\frakH': 'ℌ', \ '\bbH': 'ℍ', + \ '\ith': 'ℎ', \ '\planck': 'ℎ', \ '\hslash': 'ℏ', \ '\scrI': 'ℐ', \ '\Im': 'ℑ', + \ '\frakI': 'ℑ', \ '\scrL': 'ℒ', \ '\ell': 'ℓ', \ '\bbN': 'ℕ', @@ -385,6 +389,7 @@ function! julia_latex_symbols#get_dict() \ '\bbQ': 'ℚ', \ '\scrR': 'ℛ', \ '\Re': 'ℜ', + \ '\frakR': 'ℜ', \ '\bbR': 'ℝ', \ '\xrat': '℞', \ '\trademark': '™', @@ -757,7 +762,9 @@ function! julia_latex_symbols#get_dict() \ '\veebar': '⊻', \ '\xor': '⊻', \ '\barwedge': '⊼', + \ '\nand': '⊼', \ '\barvee': '⊽', + \ '\nor': '⊽', \ '\rightanglearc': '⊾', \ '\varlrtriangle': '⊿', \ '\bigwedge': '⋀', @@ -1007,6 +1014,7 @@ function! julia_latex_symbols#get_dict() \ '\astrosun': '☉', \ '\:phone:': '☎', \ '\:ballot_box_with_check:': '☑', + \ '\:umbrella_with_rain_drops:': '☔', \ '\:umbrella:': '☔', \ '\:coffee:': '☕', \ '\:point_up:': '☝', @@ -1095,6 +1103,7 @@ function! julia_latex_symbols#get_dict() \ '\:soccer:': '⚽', \ '\:baseball:': '⚾', \ '\:snowman:': '⛄', + \ '\:snowman_without_snow:': '⛄', \ '\:partly_sunny:': '⛅', \ '\:ophiuchus:': '⛎', \ '\:no_entry:': '⛔', @@ -1350,8 +1359,8 @@ function! julia_latex_symbols#get_dict() \ '\intcup': '⨚', \ '\upint': '⨛', \ '\lowint': '⨜', - \ '\Join': '⨝', \ '\join': '⨝', + \ '\bbsemi': '⨟', \ '\ringplus': '⨢', \ '\plushat': '⨣', \ '\simplus': '⨤', @@ -1539,6 +1548,11 @@ function! julia_latex_symbols#get_dict() \ '\forksnot': '⫝', \ '\dashV': '⫣', \ '\Dashv': '⫤', + \ '\Top': '⫪', + \ '\downvDash': '⫪', + \ '\upvDash': '⫫', + \ '\Bot': '⫫', + \ '\indep': '⫫', \ '\interleave': '⫴', \ '\tdcol': '⫶', \ '\lllnest': '⫷', @@ -1623,6 +1637,9 @@ function! julia_latex_symbols#get_dict() \ '\:part_alternation_mark:': '〽', \ '\:congratulations:': '㊗', \ '\:secret:': '㊙', + \ '\^uparrow': 'ꜛ', + \ '\^downarrow': 'ꜜ', + \ '\^!': 'ꜝ', \ '\bfA': '𝐀', \ '\bfB': '𝐁', \ '\bfC': '𝐂', @@ -2307,7 +2324,7 @@ function! julia_latex_symbols#get_dict() \ '\bfbeta': '𝛃', \ '\bfgamma': '𝛄', \ '\bfdelta': '𝛅', - \ '\bfepsilon': '𝛆', + \ '\bfvarepsilon': '𝛆', \ '\bfzeta': '𝛇', \ '\bfeta': '𝛈', \ '\bftheta': '𝛉', @@ -2329,7 +2346,7 @@ function! julia_latex_symbols#get_dict() \ '\bfpsi': '𝛙', \ '\bfomega': '𝛚', \ '\bfpartial': '𝛛', - \ '\bfvarepsilon': '𝛜', + \ '\bfepsilon': '𝛜', \ '\bfvartheta': '𝛝', \ '\bfvarkappa': '𝛞', \ '\bfphi': '𝛟', @@ -2365,7 +2382,7 @@ function! julia_latex_symbols#get_dict() \ '\itbeta': '𝛽', \ '\itgamma': '𝛾', \ '\itdelta': '𝛿', - \ '\itepsilon': '𝜀', + \ '\itvarepsilon': '𝜀', \ '\itzeta': '𝜁', \ '\iteta': '𝜂', \ '\ittheta': '𝜃', @@ -2382,15 +2399,15 @@ function! julia_latex_symbols#get_dict() \ '\itsigma': '𝜎', \ '\ittau': '𝜏', \ '\itupsilon': '𝜐', - \ '\itphi': '𝜑', + \ '\itvarphi': '𝜑', \ '\itchi': '𝜒', \ '\itpsi': '𝜓', \ '\itomega': '𝜔', \ '\itpartial': '𝜕', - \ '\itvarepsilon': '𝜖', + \ '\itepsilon': '𝜖', \ '\itvartheta': '𝜗', \ '\itvarkappa': '𝜘', - \ '\itvarphi': '𝜙', + \ '\itphi': '𝜙', \ '\itvarrho': '𝜚', \ '\itvarpi': '𝜛', \ '\biAlpha': '𝜜', @@ -2423,7 +2440,7 @@ function! julia_latex_symbols#get_dict() \ '\bibeta': '𝜷', \ '\bigamma': '𝜸', \ '\bidelta': '𝜹', - \ '\biepsilon': '𝜺', + \ '\bivarepsilon': '𝜺', \ '\bizeta': '𝜻', \ '\bieta': '𝜼', \ '\bitheta': '𝜽', @@ -2440,15 +2457,15 @@ function! julia_latex_symbols#get_dict() \ '\bisigma': '𝝈', \ '\bitau': '𝝉', \ '\biupsilon': '𝝊', - \ '\biphi': '𝝋', + \ '\bivarphi': '𝝋', \ '\bichi': '𝝌', \ '\bipsi': '𝝍', \ '\biomega': '𝝎', \ '\bipartial': '𝝏', - \ '\bivarepsilon': '𝝐', + \ '\biepsilon': '𝝐', \ '\bivartheta': '𝝑', \ '\bivarkappa': '𝝒', - \ '\bivarphi': '𝝓', + \ '\biphi': '𝝓', \ '\bivarrho': '𝝔', \ '\bivarpi': '𝝕', \ '\bsansAlpha': '𝝖', @@ -2481,7 +2498,7 @@ function! julia_latex_symbols#get_dict() \ '\bsansbeta': '𝝱', \ '\bsansgamma': '𝝲', \ '\bsansdelta': '𝝳', - \ '\bsansepsilon': '𝝴', + \ '\bsansvarepsilon': '𝝴', \ '\bsanszeta': '𝝵', \ '\bsanseta': '𝝶', \ '\bsanstheta': '𝝷', @@ -2498,15 +2515,15 @@ function! julia_latex_symbols#get_dict() \ '\bsanssigma': '𝞂', \ '\bsanstau': '𝞃', \ '\bsansupsilon': '𝞄', - \ '\bsansphi': '𝞅', + \ '\bsansvarphi': '𝞅', \ '\bsanschi': '𝞆', \ '\bsanspsi': '𝞇', \ '\bsansomega': '𝞈', \ '\bsanspartial': '𝞉', - \ '\bsansvarepsilon': '𝞊', + \ '\bsansepsilon': '𝞊', \ '\bsansvartheta': '𝞋', \ '\bsansvarkappa': '𝞌', - \ '\bsansvarphi': '𝞍', + \ '\bsansphi': '𝞍', \ '\bsansvarrho': '𝞎', \ '\bsansvarpi': '𝞏', \ '\bisansAlpha': '𝞐', @@ -2539,7 +2556,7 @@ function! julia_latex_symbols#get_dict() \ '\bisansbeta': '𝞫', \ '\bisansgamma': '𝞬', \ '\bisansdelta': '𝞭', - \ '\bisansepsilon': '𝞮', + \ '\bisansvarepsilon': '𝞮', \ '\bisanszeta': '𝞯', \ '\bisanseta': '𝞰', \ '\bisanstheta': '𝞱', @@ -2556,15 +2573,15 @@ function! julia_latex_symbols#get_dict() \ '\bisanssigma': '𝞼', \ '\bisanstau': '𝞽', \ '\bisansupsilon': '𝞾', - \ '\bisansphi': '𝞿', + \ '\bisansvarphi': '𝞿', \ '\bisanschi': '𝟀', \ '\bisanspsi': '𝟁', \ '\bisansomega': '𝟂', \ '\bisanspartial': '𝟃', - \ '\bisansvarepsilon': '𝟄', + \ '\bisansepsilon': '𝟄', \ '\bisansvartheta': '𝟅', \ '\bisansvarkappa': '𝟆', - \ '\bisansvarphi': '𝟇', + \ '\bisansphi': '𝟇', \ '\bisansvarrho': '𝟈', \ '\bisansvarpi': '𝟉', \ '\bfDigamma': '𝟊', @@ -2684,6 +2701,9 @@ function! julia_latex_symbols#get_dict() \ '\:sun_with_face:': '🌞', \ '\:star2:': '🌟', \ '\:stars:': '🌠', + \ '\:hotdog:': '🌭', + \ '\:taco:': '🌮', + \ '\:burrito:': '🌯', \ '\:chestnut:': '🌰', \ '\:seedling:': '🌱', \ '\:evergreen_tree:': '🌲', @@ -2750,7 +2770,7 @@ function! julia_latex_symbols#get_dict() \ '\:cake:': '🍰', \ '\:bento:': '🍱', \ '\:stew:': '🍲', - \ '\:egg:': '🍳', + \ '\:fried_egg:': '🍳', \ '\:fork_and_knife:': '🍴', \ '\:tea:': '🍵', \ '\:sake:': '🍶', @@ -2760,6 +2780,8 @@ function! julia_latex_symbols#get_dict() \ '\:beer:': '🍺', \ '\:beers:': '🍻', \ '\:baby_bottle:': '🍼', + \ '\:champagne:': '🍾', + \ '\:popcorn:': '🍿', \ '\:ribbon:': '🎀', \ '\:gift:': '🎁', \ '\:birthday:': '🎂', @@ -2817,11 +2839,17 @@ function! julia_latex_symbols#get_dict() \ '\:snowboarder:': '🏂', \ '\:runner:': '🏃', \ '\:surfer:': '🏄', + \ '\:sports_medal:': '🏅', \ '\:trophy:': '🏆', \ '\:horse_racing:': '🏇', \ '\:football:': '🏈', \ '\:rugby_football:': '🏉', \ '\:swimmer:': '🏊', + \ '\:cricket_bat_and_ball:': '🏏', + \ '\:volleyball:': '🏐', + \ '\:field_hockey_stick_and_ball:': '🏑', + \ '\:ice_hockey_stick_and_puck:': '🏒', + \ '\:table_tennis_paddle_and_ball:': '🏓', \ '\:house:': '🏠', \ '\:house_with_garden:': '🏡', \ '\:office:': '🏢', @@ -2839,6 +2867,10 @@ function! julia_latex_symbols#get_dict() \ '\:izakaya_lantern:': '🏮', \ '\:japanese_castle:': '🏯', \ '\:european_castle:': '🏰', + \ '\:waving_black_flag:': '🏴', + \ '\:badminton_racquet_and_shuttlecock:': '🏸', + \ '\:bow_and_arrow:': '🏹', + \ '\:amphora:': '🏺', \ '\:skin-tone-2:': '🏻', \ '\:skin-tone-3:': '🏼', \ '\:skin-tone-4:': '🏽', @@ -2874,7 +2906,7 @@ function! julia_latex_symbols#get_dict() \ '\:bug:': '🐛', \ '\:ant:': '🐜', \ '\:bee:': '🐝', - \ '\:beetle:': '🐞', + \ '\:ladybug:': '🐞', \ '\:fish:': '🐟', \ '\:tropical_fish:': '🐠', \ '\:blowfish:': '🐡', @@ -2950,6 +2982,7 @@ function! julia_latex_symbols#get_dict() \ '\:woman:': '👩', \ '\:family:': '👪', \ '\:couple:': '👫', + \ '\:man_and_woman_holding_hands:': '👫', \ '\:two_men_holding_hands:': '👬', \ '\:two_women_holding_hands:': '👭', \ '\:cop:': '👮', @@ -3068,6 +3101,7 @@ function! julia_latex_symbols#get_dict() \ '\:pager:': '📟', \ '\:fax:': '📠', \ '\:satellite:': '📡', + \ '\:satellite_antenna:': '📡', \ '\:loudspeaker:': '📢', \ '\:mega:': '📣', \ '\:outbox_tray:': '📤', @@ -3090,10 +3124,12 @@ function! julia_latex_symbols#get_dict() \ '\:no_mobile_phones:': '📵', \ '\:signal_strength:': '📶', \ '\:camera:': '📷', + \ '\:camera_with_flash:': '📸', \ '\:video_camera:': '📹', \ '\:tv:': '📺', \ '\:radio:': '📻', \ '\:vhs:': '📼', + \ '\:prayer_beads:': '📿', \ '\:twisted_rightwards_arrows:': '🔀', \ '\:repeat:': '🔁', \ '\:repeat_one:': '🔂', @@ -3156,6 +3192,10 @@ function! julia_latex_symbols#get_dict() \ '\:small_red_triangle_down:': '🔻', \ '\:arrow_up_small:': '🔼', \ '\:arrow_down_small:': '🔽', + \ '\:kaaba:': '🕋', + \ '\:mosque:': '🕌', + \ '\:synagogue:': '🕍', + \ '\:menorah_with_nine_branches:': '🕎', \ '\:clock1:': '🕐', \ '\:clock2:': '🕑', \ '\:clock3:': '🕒', @@ -3180,6 +3220,10 @@ function! julia_latex_symbols#get_dict() \ '\:clock1030:': '🕥', \ '\:clock1130:': '🕦', \ '\:clock1230:': '🕧', + \ '\:man_dancing:': '🕺', + \ '\:middle_finger:': '🖕', + \ '\:spock-hand:': '🖖', + \ '\:black_heart:': '🖤', \ '\:mount_fuji:': '🗻', \ '\:tokyo_tower:': '🗼', \ '\:statue_of_liberty:': '🗽', @@ -3250,6 +3294,10 @@ function! julia_latex_symbols#get_dict() \ '\:pouting_cat:': '😾', \ '\:crying_cat_face:': '😿', \ '\:scream_cat:': '🙀', + \ '\:slightly_frowning_face:': '🙁', + \ '\:slightly_smiling_face:': '🙂', + \ '\:upside_down_face:': '🙃', + \ '\:face_with_rolling_eyes:': '🙄', \ '\:no_good:': '🙅', \ '\:ok_woman:': '🙆', \ '\:bow:': '🙇', @@ -3330,7 +3378,328 @@ function! julia_latex_symbols#get_dict() \ '\:passport_control:': '🛂', \ '\:customs:': '🛃', \ '\:baggage_claim:': '🛄', - \ '\:left_luggage:': '🛅'} + \ '\:left_luggage:': '🛅', + \ '\:sleeping_accommodation:': '🛌', + \ '\:place_of_worship:': '🛐', + \ '\:octagonal_sign:': '🛑', + \ '\:shopping_trolley:': '🛒', + \ '\:hindu_temple:': '🛕', + \ '\:hut:': '🛖', + \ '\:elevator:': '🛗', + \ '\:airplane_departure:': '🛫', + \ '\:airplane_arriving:': '🛬', + \ '\:scooter:': '🛴', + \ '\:motor_scooter:': '🛵', + \ '\:canoe:': '🛶', + \ '\:sled:': '🛷', + \ '\:flying_saucer:': '🛸', + \ '\:skateboard:': '🛹', + \ '\:auto_rickshaw:': '🛺', + \ '\:pickup_truck:': '🛻', + \ '\:roller_skate:': '🛼', + \ '\:large_orange_circle:': '🟠', + \ '\:large_yellow_circle:': '🟡', + \ '\:large_green_circle:': '🟢', + \ '\:large_purple_circle:': '🟣', + \ '\:large_brown_circle:': '🟤', + \ '\:large_red_square:': '🟥', + \ '\:large_blue_square:': '🟦', + \ '\:large_orange_square:': '🟧', + \ '\:large_yellow_square:': '🟨', + \ '\:large_green_square:': '🟩', + \ '\:large_purple_square:': '🟪', + \ '\:large_brown_square:': '🟫', + \ '\:pinched_fingers:': '🤌', + \ '\:white_heart:': '🤍', + \ '\:brown_heart:': '🤎', + \ '\:pinching_hand:': '🤏', + \ '\:zipper_mouth_face:': '🤐', + \ '\:money_mouth_face:': '🤑', + \ '\:face_with_thermometer:': '🤒', + \ '\:nerd_face:': '🤓', + \ '\:thinking_face:': '🤔', + \ '\:face_with_head_bandage:': '🤕', + \ '\:robot_face:': '🤖', + \ '\:hugging_face:': '🤗', + \ '\:the_horns:': '🤘', + \ '\:call_me_hand:': '🤙', + \ '\:raised_back_of_hand:': '🤚', + \ '\:left-facing_fist:': '🤛', + \ '\:right-facing_fist:': '🤜', + \ '\:handshake:': '🤝', + \ '\:crossed_fingers:': '🤞', + \ '\:i_love_you_hand_sign:': '🤟', + \ '\:face_with_cowboy_hat:': '🤠', + \ '\:clown_face:': '🤡', + \ '\:nauseated_face:': '🤢', + \ '\:rolling_on_the_floor_laughing:': '🤣', + \ '\:drooling_face:': '🤤', + \ '\:lying_face:': '🤥', + \ '\:face_palm:': '🤦', + \ '\:sneezing_face:': '🤧', + \ '\:face_with_raised_eyebrow:': '🤨', + \ '\:star-struck:': '🤩', + \ '\:zany_face:': '🤪', + \ '\:shushing_face:': '🤫', + \ '\:face_with_symbols_on_mouth:': '🤬', + \ '\:face_with_hand_over_mouth:': '🤭', + \ '\:face_vomiting:': '🤮', + \ '\:exploding_head:': '🤯', + \ '\:pregnant_woman:': '🤰', + \ '\:breast-feeding:': '🤱', + \ '\:palms_up_together:': '🤲', + \ '\:selfie:': '🤳', + \ '\:prince:': '🤴', + \ '\:person_in_tuxedo:': '🤵', + \ '\:mrs_claus:': '🤶', + \ '\:shrug:': '🤷', + \ '\:person_doing_cartwheel:': '🤸', + \ '\:juggling:': '🤹', + \ '\:fencer:': '🤺', + \ '\:wrestlers:': '🤼', + \ '\:water_polo:': '🤽', + \ '\:handball:': '🤾', + \ '\:diving_mask:': '🤿', + \ '\:wilted_flower:': '🥀', + \ '\:drum_with_drumsticks:': '🥁', + \ '\:clinking_glasses:': '🥂', + \ '\:tumbler_glass:': '🥃', + \ '\:spoon:': '🥄', + \ '\:goal_net:': '🥅', + \ '\:first_place_medal:': '🥇', + \ '\:second_place_medal:': '🥈', + \ '\:third_place_medal:': '🥉', + \ '\:boxing_glove:': '🥊', + \ '\:martial_arts_uniform:': '🥋', + \ '\:curling_stone:': '🥌', + \ '\:lacrosse:': '🥍', + \ '\:softball:': '🥎', + \ '\:flying_disc:': '🥏', + \ '\:croissant:': '🥐', + \ '\:avocado:': '🥑', + \ '\:cucumber:': '🥒', + \ '\:bacon:': '🥓', + \ '\:potato:': '🥔', + \ '\:carrot:': '🥕', + \ '\:baguette_bread:': '🥖', + \ '\:green_salad:': '🥗', + \ '\:shallow_pan_of_food:': '🥘', + \ '\:stuffed_flatbread:': '🥙', + \ '\:egg:': '🥚', + \ '\:glass_of_milk:': '🥛', + \ '\:peanuts:': '🥜', + \ '\:kiwifruit:': '🥝', + \ '\:pancakes:': '🥞', + \ '\:dumpling:': '🥟', + \ '\:fortune_cookie:': '🥠', + \ '\:takeout_box:': '🥡', + \ '\:chopsticks:': '🥢', + \ '\:bowl_with_spoon:': '🥣', + \ '\:cup_with_straw:': '🥤', + \ '\:coconut:': '🥥', + \ '\:broccoli:': '🥦', + \ '\:pie:': '🥧', + \ '\:pretzel:': '🥨', + \ '\:cut_of_meat:': '🥩', + \ '\:sandwich:': '🥪', + \ '\:canned_food:': '🥫', + \ '\:leafy_green:': '🥬', + \ '\:mango:': '🥭', + \ '\:moon_cake:': '🥮', + \ '\:bagel:': '🥯', + \ '\:smiling_face_with_3_hearts:': '🥰', + \ '\:yawning_face:': '🥱', + \ '\:smiling_face_with_tear:': '🥲', + \ '\:partying_face:': '🥳', + \ '\:woozy_face:': '🥴', + \ '\:hot_face:': '🥵', + \ '\:cold_face:': '🥶', + \ '\:ninja:': '🥷', + \ '\:disguised_face:': '🥸', + \ '\:pleading_face:': '🥺', + \ '\:sari:': '🥻', + \ '\:lab_coat:': '🥼', + \ '\:goggles:': '🥽', + \ '\:hiking_boot:': '🥾', + \ '\:womans_flat_shoe:': '🥿', + \ '\:crab:': '🦀', + \ '\:lion_face:': '🦁', + \ '\:scorpion:': '🦂', + \ '\:turkey:': '🦃', + \ '\:unicorn_face:': '🦄', + \ '\:eagle:': '🦅', + \ '\:duck:': '🦆', + \ '\:bat:': '🦇', + \ '\:shark:': '🦈', + \ '\:owl:': '🦉', + \ '\:fox_face:': '🦊', + \ '\:butterfly:': '🦋', + \ '\:deer:': '🦌', + \ '\:gorilla:': '🦍', + \ '\:lizard:': '🦎', + \ '\:rhinoceros:': '🦏', + \ '\:shrimp:': '🦐', + \ '\:squid:': '🦑', + \ '\:giraffe_face:': '🦒', + \ '\:zebra_face:': '🦓', + \ '\:hedgehog:': '🦔', + \ '\:sauropod:': '🦕', + \ '\:t-rex:': '🦖', + \ '\:cricket:': '🦗', + \ '\:kangaroo:': '🦘', + \ '\:llama:': '🦙', + \ '\:peacock:': '🦚', + \ '\:hippopotamus:': '🦛', + \ '\:parrot:': '🦜', + \ '\:raccoon:': '🦝', + \ '\:lobster:': '🦞', + \ '\:mosquito:': '🦟', + \ '\:microbe:': '🦠', + \ '\:badger:': '🦡', + \ '\:swan:': '🦢', + \ '\:mammoth:': '🦣', + \ '\:dodo:': '🦤', + \ '\:sloth:': '🦥', + \ '\:otter:': '🦦', + \ '\:orangutan:': '🦧', + \ '\:skunk:': '🦨', + \ '\:flamingo:': '🦩', + \ '\:oyster:': '🦪', + \ '\:beaver:': '🦫', + \ '\:bison:': '🦬', + \ '\:seal:': '🦭', + \ '\:guide_dog:': '🦮', + \ '\:probing_cane:': '🦯', + \ '\:bone:': '🦴', + \ '\:leg:': '🦵', + \ '\:foot:': '🦶', + \ '\:tooth:': '🦷', + \ '\:superhero:': '🦸', + \ '\:supervillain:': '🦹', + \ '\:safety_vest:': '🦺', + \ '\:ear_with_hearing_aid:': '🦻', + \ '\:motorized_wheelchair:': '🦼', + \ '\:manual_wheelchair:': '🦽', + \ '\:mechanical_arm:': '🦾', + \ '\:mechanical_leg:': '🦿', + \ '\:cheese_wedge:': '🧀', + \ '\:cupcake:': '🧁', + \ '\:salt:': '🧂', + \ '\:beverage_box:': '🧃', + \ '\:garlic:': '🧄', + \ '\:onion:': '🧅', + \ '\:falafel:': '🧆', + \ '\:waffle:': '🧇', + \ '\:butter:': '🧈', + \ '\:mate_drink:': '🧉', + \ '\:ice_cube:': '🧊', + \ '\:bubble_tea:': '🧋', + \ '\:standing_person:': '🧍', + \ '\:kneeling_person:': '🧎', + \ '\:deaf_person:': '🧏', + \ '\:face_with_monocle:': '🧐', + \ '\:adult:': '🧑', + \ '\:child:': '🧒', + \ '\:older_adult:': '🧓', + \ '\:bearded_person:': '🧔', + \ '\:person_with_headscarf:': '🧕', + \ '\:person_in_steamy_room:': '🧖', + \ '\:person_climbing:': '🧗', + \ '\:person_in_lotus_position:': '🧘', + \ '\:mage:': '🧙', + \ '\:fairy:': '🧚', + \ '\:vampire:': '🧛', + \ '\:merperson:': '🧜', + \ '\:elf:': '🧝', + \ '\:genie:': '🧞', + \ '\:zombie:': '🧟', + \ '\:brain:': '🧠', + \ '\:orange_heart:': '🧡', + \ '\:billed_cap:': '🧢', + \ '\:scarf:': '🧣', + \ '\:gloves:': '🧤', + \ '\:coat:': '🧥', + \ '\:socks:': '🧦', + \ '\:red_envelope:': '🧧', + \ '\:firecracker:': '🧨', + \ '\:jigsaw:': '🧩', + \ '\:test_tube:': '🧪', + \ '\:petri_dish:': '🧫', + \ '\:dna:': '🧬', + \ '\:compass:': '🧭', + \ '\:abacus:': '🧮', + \ '\:fire_extinguisher:': '🧯', + \ '\:toolbox:': '🧰', + \ '\:bricks:': '🧱', + \ '\:magnet:': '🧲', + \ '\:luggage:': '🧳', + \ '\:lotion_bottle:': '🧴', + \ '\:thread:': '🧵', + \ '\:yarn:': '🧶', + \ '\:safety_pin:': '🧷', + \ '\:teddy_bear:': '🧸', + \ '\:broom:': '🧹', + \ '\:basket:': '🧺', + \ '\:roll_of_paper:': '🧻', + \ '\:soap:': '🧼', + \ '\:sponge:': '🧽', + \ '\:receipt:': '🧾', + \ '\:nazar_amulet:': '🧿', + \ '\:ballet_shoes:': '🩰', + \ '\:one-piece_swimsuit:': '🩱', + \ '\:briefs:': '🩲', + \ '\:shorts:': '🩳', + \ '\:thong_sandal:': '🩴', + \ '\:drop_of_blood:': '🩸', + \ '\:adhesive_bandage:': '🩹', + \ '\:stethoscope:': '🩺', + \ '\:yo-yo:': '🪀', + \ '\:kite:': '🪁', + \ '\:parachute:': '🪂', + \ '\:boomerang:': '🪃', + \ '\:magic_wand:': '🪄', + \ '\:pinata:': '🪅', + \ '\:nesting_dolls:': '🪆', + \ '\:ringed_planet:': '🪐', + \ '\:chair:': '🪑', + \ '\:razor:': '🪒', + \ '\:axe:': '🪓', + \ '\:diya_lamp:': '🪔', + \ '\:banjo:': '🪕', + \ '\:military_helmet:': '🪖', + \ '\:accordion:': '🪗', + \ '\:long_drum:': '🪘', + \ '\:coin:': '🪙', + \ '\:carpentry_saw:': '🪚', + \ '\:screwdriver:': '🪛', + \ '\:ladder:': '🪜', + \ '\:hook:': '🪝', + \ '\:mirror:': '🪞', + \ '\:window:': '🪟', + \ '\:plunger:': '🪠', + \ '\:sewing_needle:': '🪡', + \ '\:knot:': '🪢', + \ '\:bucket:': '🪣', + \ '\:mouse_trap:': '🪤', + \ '\:toothbrush:': '🪥', + \ '\:headstone:': '🪦', + \ '\:placard:': '🪧', + \ '\:rock:': '🪨', + \ '\:fly:': '🪰', + \ '\:worm:': '🪱', + \ '\:beetle:': '🪲', + \ '\:cockroach:': '🪳', + \ '\:potted_plant:': '🪴', + \ '\:wood:': '🪵', + \ '\:feather:': '🪶', + \ '\:anatomical_heart:': '🫀', + \ '\:lungs:': '🫁', + \ '\:people_hugging:': '🫂', + \ '\:blueberries:': '🫐', + \ '\:bell_pepper:': '🫑', + \ '\:olive:': '🫒', + \ '\:flatbread:': '🫓', + \ '\:tamale:': '🫔', + \ '\:fondue:': '🫕', + \ '\:teapot:': '🫖'} endfunction - -endif diff --git a/autoload/ledger.vim b/autoload/ledger.vim index 225f96a3d..984070c08 100644 --- a/autoload/ledger.vim +++ b/autoload/ledger.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ledger', 'autoload/ledger.vim') + finish +endif scriptencoding utf-8 " vim:ts=2:sw=2:sts=2:foldmethod=marker @@ -23,7 +25,7 @@ function! ledger#transaction_state_toggle(lnum, ...) abort endf function! ledger#transaction_state_set(lnum, char) abort - " modifies or sets the state of the transaction at the cursor, + " modifies or sets the state of the transaction at the given line no., " removing the state altogether if a:char is empty let trans = s:transaction.from_lnum(a:lnum) if empty(trans) || has_key(trans, 'expr') @@ -77,6 +79,69 @@ function! ledger#transaction_date_set(lnum, type, ...) abort call setline(trans['head'], trans.format_head()) endf +function! ledger#transaction_post_state_get(lnum) abort + " safe view / position + let view = winsaveview() + call cursor(a:lnum, 0) + + let line = getline('.') + if line[0] !~# '[ \t]' + " not a post + let state = '' + else + let m = matchlist(line, '^[ \t]\+\([*?!]\)') + if len(m) > 1 + let state = m[1] + else + let state = ' ' + endif + endif + + call winrestview(view) + return state +endf + +function! ledger#transaction_post_state_toggle(lnum, ...) abort + if a:0 == 1 + let chars = a:1 + else + let chars = ' *' + endif + + let old = ledger#transaction_post_state_get(a:lnum) + if old ==# '' + " not a post, probably at the first line of transaction + call ledger#transaction_state_toggle(a:lnum, chars) + return + endif + let i = stridx(chars, old) + 1 + let new = chars[i >= len(chars) ? 0 : i] + + call ledger#transaction_post_state_set(a:lnum, new) +endf + +function! ledger#transaction_post_state_set(lnum, char) abort + let state = ledger#transaction_post_state_get(a:lnum) + if state ==# '' + " not a post, probably at the first line of transaction + call ledger#transaction_state_set(a:lnum, a:char) + return + elseif state == a:char || (state ==# ' ' && a:char ==# '') + return + endif + + let line = getline(a:lnum) + if a:char =~# '^\s*$' + let newline = substitute(line, '\V' . state . '\m[ \t]', '', '') + elseif state ==# ' ' + let m = matchlist(line, '^\([ \t]\+\)\(.*\)') + let newline = m[1] . a:char . ' ' . m[2] + else + let newline = substitute(line, '\V' . state, a:char, '') + endif + call setline(a:lnum, newline) +endf + " == get transactions == function! ledger#transaction_from_lnum(lnum) abort @@ -176,8 +241,10 @@ function! s:transaction.from_lnum(lnum) abort dict "{{{2 endf "}}} function! s:transaction.set_state(char) abort dict "{{{2 - if has_key(self, 'state') && a:char =~# '^\s*$' - call remove(self, 'state') + if a:char =~# '^\s*$' + if has_key(self, 'state') + call remove(self, 'state') + endif else let self['state'] = a:char endif @@ -390,10 +457,20 @@ endf " Return character position of decimal separator (multibyte safe) function! s:decimalpos(expr) abort - let pos = match(a:expr, '\V' . g:ledger_decimal_sep) - if pos > 0 - let pos = strchars(a:expr[:pos]) - 1 - endif + " Remove trailing comments + let l:expr = substitute(a:expr, '\v +;.*$', '', '') + " Find first or last possible decimal separator candidate + if g:ledger_align_last + let pos = matchend(l:expr, '\v.*[' . g:ledger_decimal_sep . ']') + if pos > 0 + let pos = strchars(a:expr[:pos]) + 1 + endif + else + let pos = match(l:expr, '\v[' . g:ledger_decimal_sep . ']') + if pos > 0 + let pos = strchars(a:expr[:pos]) - 1 + endif + end return pos endf @@ -424,7 +501,9 @@ function! ledger#align_commodity() abort " Remove everything after the account name (including spaces): call setline('.', substitute(l:line, '\m^\s\+[^[:space:]].\{-}\zs\(\t\| \).*$', '', '')) let pos = -1 - if g:ledger_decimal_sep !=# '' + if g:ledger_align_commodity == 1 + let pos = 0 + elseif g:ledger_decimal_sep !=# '' " Find the position of the first decimal separator: let pos = s:decimalpos(rhs) endif @@ -433,7 +512,7 @@ function! ledger#align_commodity() abort let pos = matchend(rhs, '\m\d[^[:space:]]*') endif " Go to the column that allows us to align the decimal separator at g:ledger_align_at: - if pos > 0 + if pos >= 0 call s:goto_col(g:ledger_align_at - pos - 1, 2) else call s:goto_col(g:ledger_align_at - strdisplaywidth(rhs) - 2, 2) @@ -442,6 +521,19 @@ function! ledger#align_commodity() abort endif endf +" Align the commodity on the entire buffer +function! ledger#align_commodity_buffer() abort + " Store the viewport position + let view = winsaveview() + + " Call ledger#align_commodity for every line + %call ledger#align_commodity() + + " Restore the viewport position + call winrestview(view) + unlet view +endf + " Align the amount under the cursor and append/prepend the default currency. function! ledger#align_amount_at_cursor() abort " Select and cut text: @@ -462,6 +554,10 @@ function! ledger#align_amount_at_cursor() abort endif endf +function! ledger#align_formatexpr(lnum, count) abort + execute a:lnum . ',' . (a:lnum + a:count - 1) . 'call ledger#align_commodity()' +endfunction + " Report generation {{{1 " Helper functions and variables {{{2 @@ -650,8 +746,6 @@ function! ledger#register(file, args) abort endf " Reconcile the given account. -" This function accepts a file path as a third optional argument. -" The default is to use the value of g:ledger_main. " " Parameters: " file The file to be processed @@ -740,5 +834,3 @@ function! ledger#show_balance(file, ...) abort endif endf " }}} - -endif diff --git a/autoload/nim.vim b/autoload/nim.vim index 59f9122d3..7f55f25f9 100644 --- a/autoload/nim.vim +++ b/autoload/nim.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 +if polyglot#init#is_disabled(expand(':p'), 'nim', 'autoload/nim.vim') + finish +endif let g:nim_log = [] let s:plugin_path = escape(expand(':p:h'), '\') -if !exists("g:nim_caas_enabled") +if !exists('g:nim_caas_enabled') let g:nim_caas_enabled = 0 endif @@ -11,27 +13,25 @@ if !executable('nim') echoerr "the Nim compiler must be in your system's PATH" endif -if has("python3") - exe 'py3file ' . fnameescape(s:plugin_path) . '/nim_vim.py' -elseif has("python") - exe 'pyfile ' . fnameescape(s:plugin_path) . '/nim_vim.py' +if has('pythonx') + exe 'pyxfile ' . fnameescape(s:plugin_path) . '/nim_vim.py' endif -fun! nim#init() - let cmd = printf("nim --dump.format:json --verbosity:0 dump %s", s:CurrentNimFile()) +fun! nim#init() abort + let cmd = printf('nim --dump.format:json --verbosity:0 dump %s', s:CurrentNimFile()) let raw_dumpdata = system(cmd) - if !v:shell_error && expand("%:e") == "nim" + if !v:shell_error && expand('%:e') ==# 'nim' let false = 0 " Needed for eval of json let true = 1 " Needed for eval of json - let dumpdata = eval(substitute(raw_dumpdata, "\n", "", "g")) - + let dumpdata = json_decode(raw_dumpdata) + let b:nim_project_root = dumpdata['project_path'] let b:nim_defined_symbols = dumpdata['defined_symbols'] let b:nim_caas_enabled = g:nim_caas_enabled || index(dumpdata['defined_symbols'], 'forcecaas') != -1 for path in dumpdata['lib_paths'] - if finddir(path) == path - let &l:path = path . "," . &l:path + if finddir(path) ==# path + let &l:path = path . ',' . &l:path endif endfor else @@ -39,7 +39,7 @@ fun! nim#init() endif endf -fun! s:UpdateNimLog() +fun! s:UpdateNimLog() abort setlocal buftype=nofile setlocal bufhidden=hide setlocal noswapfile @@ -56,32 +56,32 @@ endf augroup NimVim au! au BufEnter log://nim call s:UpdateNimLog() - if has("python3") || has("python") - " au QuitPre * :py nimTerminateAll() - au VimLeavePre * :py nimTerminateAll() + if has('pythonx') + " au QuitPre * :pyx nimTerminateAll() + au VimLeavePre * :pyx nimTerminateAll() endif augroup END command! NimLog :e log://nim command! NimTerminateService - \ :exe printf("py nimTerminateService('%s')", b:nim_project_root) + \ :exe printf("pyx nimTerminateService('%s')", b:nim_project_root) command! NimRestartService - \ :exe printf("py nimRestartService('%s')", b:nim_project_root) + \ :exe printf("pyx nimRestartService('%s')", b:nim_project_root) -fun! s:CurrentNimFile() +fun! s:CurrentNimFile() abort let save_cur = getpos('.') call cursor(0, 0, 0) - let PATTERN = "\\v^\\#\\s*included from \\zs.*\\ze" - let l = search(PATTERN, "n") + let PATTERN = '\v^\#\s*included from \zs.*\ze' + let l = search(PATTERN, 'n') if l != 0 let f = matchstr(getline(l), PATTERN) - let l:to_check = expand('%:h') . "/" . f + let l:to_check = expand('%:h') . '/' . f else - let l:to_check = expand("%") + let l:to_check = expand('%') endif call setpos('.', save_cur) @@ -108,42 +108,42 @@ let g:nim_symbol_types = { \ 'skEnumField': 'v', \ } -fun! NimExec(op) - let isDirty = getbufvar(bufnr('%'), "&modified") +fun! NimExec(op) abort + let isDirty = getbufvar(bufnr('%'), '&modified') if isDirty - let tmp = tempname() . bufname("%") . "_dirty.nim" - silent! exe ":w " . tmp + let tmp = tempname() . bufname('%') . '_dirty.nim' + silent! exe ':w ' . tmp - let cmd = printf("idetools %s --trackDirty:\"%s,%s,%d,%d\" \"%s\"", + let cmd = printf('idetools %s --trackDirty:"%s,%s,%d,%d" "%s"', \ a:op, tmp, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile()) else - let cmd = printf("idetools %s --track:\"%s,%d,%d\" \"%s\"", + let cmd = printf('idetools %s --track:"%s,%d,%d" "%s"', \ a:op, expand('%:p'), line('.'), col('.')-1, s:CurrentNimFile()) endif if b:nim_caas_enabled - exe printf("py nimExecCmd('%s', '%s', False)", b:nim_project_root, cmd) - let output = l:py_res + exe printf("pyx nimExecCmd('%s', '%s', False)", b:nim_project_root, cmd) + let output = get(l:, 'py_res', '') else - let output = system("nim " . cmd) + let output = system('nim ' . cmd) endif - call add(g:nim_log, "nim " . cmd . "\n" . output) + call add(g:nim_log, 'nim ' . cmd . "\n" . output) return output endf -fun! NimExecAsync(op, Handler) +fun! NimExecAsync(op, Handler) abort let result = NimExec(a:op) call a:Handler(result) endf -fun! NimComplete(findstart, base) - if b:nim_caas_enabled == 0 +fun! NimComplete(findstart, base) abort + if b:nim_caas_enabled ==# 0 return -1 endif if a:findstart - if synIDattr(synIDtrans(synID(line("."),col("."),1)), "name") == 'Comment' + if synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name') ==# 'Comment' return -1 endif let line = getline('.') @@ -154,10 +154,10 @@ fun! NimComplete(findstart, base) return start else let result = [] - let sugOut = NimExec("--suggest") + let sugOut = NimExec('--suggest') for line in split(sugOut, '\n') let lineData = split(line, '\t') - if len(lineData) > 0 && lineData[0] == "sug" + if len(lineData) > 0 && lineData[0] ==# 'sug' let word = split(lineData[2], '\.')[-1] if a:base ==? '' || word =~# '^' . a:base let kind = get(g:nim_symbol_types, lineData[1], '') @@ -170,7 +170,7 @@ fun! NimComplete(findstart, base) endif endf -if !exists("g:neocomplcache_omni_patterns") +if !exists('g:neocomplcache_omni_patterns') let g:neocomplcache_omni_patterns = {} endif let g:neocomplcache_omni_patterns['nim'] = '[^. *\t]\.\w*' @@ -182,7 +182,7 @@ let g:neocomplete#sources#omni#input_patterns['nim'] = '[^. *\t]\.\w*' let g:nim_completion_callbacks = {} -fun! NimAsyncCmdComplete(cmd, output) +fun! NimAsyncCmdComplete(cmd, output) abort call add(g:nim_log, a:output) echom g:nim_completion_callbacks if has_key(g:nim_completion_callbacks, a:cmd) @@ -190,55 +190,55 @@ fun! NimAsyncCmdComplete(cmd, output) call Callback(a:output) " remove(g:nim_completion_callbacks, a:cmd) else - echom "ERROR, Unknown Command: " . a:cmd + echom 'ERROR, Unknown Command: ' . a:cmd endif return 1 endf -fun! GotoDefinition_nim_ready(def_output) +fun! GotoDefinition_nim_ready(def_output) abort if v:shell_error - echo "nim was unable to locate the definition. exit code: " . v:shell_error + echo 'nim was unable to locate the definition. exit code: ' . v:shell_error " echoerr a:def_output return 0 endif let rawDef = matchstr(a:def_output, 'def\t\([^\n]*\)') - if rawDef == "" - echo "the current cursor position does not match any definitions" + if rawDef == '' + echo 'the current cursor position does not match any definitions' return 0 endif let defBits = split(rawDef, '\t') let file = defBits[4] let line = defBits[5] - exe printf("e +%d %s", line, file) + let column = defBits[6] + exe printf('e +%d %s', line, file) + call cursor(line, column + 1) return 1 endf -fun! GotoDefinition_nim() - call NimExecAsync("--def", function("GotoDefinition_nim_ready")) +fun! GotoDefinition_nim() abort + call NimExecAsync('--def', function('GotoDefinition_nim_ready')) endf -fun! FindReferences_nim() - setloclist() +fun! FindReferences_nim() abort + "setloclist() endf " Syntastic syntax checking -fun! SyntaxCheckers_nim_nim_GetLocList() +fun! SyntaxCheckers_nim_nim_GetLocList() abort let makeprg = 'nim check --hints:off --listfullpaths ' . s:CurrentNimFile() let errorformat = &errorformat return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat }) endf -function! SyntaxCheckers_nim_nim_IsAvailable() - return executable("nim") +function! SyntaxCheckers_nim_nim_IsAvailable() abort + return executable('nim') endfunction -if exists("g:SyntasticRegistry") +if exists('g:SyntasticRegistry') call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'nim', \ 'name': 'nim'}) endif - -endif diff --git a/autoload/org.vim b/autoload/org.vim new file mode 100644 index 000000000..6e4918f04 --- /dev/null +++ b/autoload/org.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'org', 'autoload/org.vim') + finish +endif + +" Helper functions for org.vim +" +" Maintainer: Alex Vear +" License: Vim (see `:help license`) +" Location: autoload/org.vim +" Website: https://github.com/axvr/org.vim +" Last Change: 2020-01-04 + +" Fallback chain for options. Buffer local --> Global --> default. +function org#option(name, default) abort + return get(b:, a:name, get(g:, a:name, a:default)) +endfunction + +" Emacs-like fold text. +function org#fold_text() abort + return getline(v:foldstart) . '...' +endfunction + +" Check fold depth of a line. +function org#fold_expr() + let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=') + if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^o\(rg\|utline\)Heading' + return ">" . l:depth + endif + return "=" +endfunction diff --git a/autoload/polyglot.vim b/autoload/polyglot.vim deleted file mode 100644 index 7d5aa8676..000000000 --- a/autoload/polyglot.vim +++ /dev/null @@ -1,207 +0,0 @@ -" 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/autoload/polyglot/detect.vim b/autoload/polyglot/detect.vim new file mode 100644 index 000000000..2b1900e61 --- /dev/null +++ b/autoload/polyglot/detect.vim @@ -0,0 +1,338 @@ +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE + +func! polyglot#detect#Inp(...) + if a:0 != 1 && did_filetype() + return + endif + let line = getline(nextnonblank(1)) + if line =~# '^\*' + set ft=abaqus | return + endif + for lnum in range(1, min([line("$"), 500])) + let line = getline(lnum) + if line =~? '^header surface data' + set ft=trasys | return + endif + endfor +endfunc + +func! polyglot#detect#Asa(...) + if a:0 != 1 && did_filetype() + return + endif + if exists("g:filetype_asa") + let &ft = g:filetype_asa | return + endif + set ft=aspvbs | return +endfunc + +func! polyglot#detect#Asp(...) + if a:0 != 1 && did_filetype() + return + endif + if exists("g:filetype_asp") + let &ft = g:filetype_asp | return + endif + for lnum in range(1, min([line("$"), 3])) + let line = getline(lnum) + if line =~? 'perlscript' + set ft=aspperl | return + endif + endfor + set ft=aspvbs | return +endfunc + +func! polyglot#detect#H(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 200])) + let line = getline(lnum) + if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)' + if exists('g:c_syntax_for_h') + set ft=objc | return + endif + set ft=objcpp | return + endif + endfor + if exists('g:c_syntax_for_h') + set ft=c | return + endif + if exists('g:ch_syntax_for_h') + set ft=ch | return + endif + set ft=cpp | return +endfunc + +func! polyglot#detect#M(...) + if a:0 != 1 && did_filetype() + return + endif + let saw_comment = 0 + for lnum in range(1, min([line("$"), 100])) + let line = getline(lnum) + if line =~# '^\s*/\*' + let saw_comment = 1 + endif + if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)' + set ft=objc | return + endif + if line =~# '^\s*%' + if !has_key(g:polyglot_is_disabled, 'octave') + set ft=octave | return + endif + endif + if line =~# '^\s*%' + if has_key(g:polyglot_is_disabled, 'octave') + set ft=matlab | return + endif + endif + if line =~# '^\s*(\*' + set ft=mma | return + endif + if line =~? '^\s*\(\(type\|var\)\(\<\|\>\)\|--\)' + set ft=murphi | return + endif + endfor + if saw_comment + set ft=objc | return + endif + if exists("g:filetype_m") + let &ft = g:filetype_m | return + endif + if !has_key(g:polyglot_is_disabled, 'octave') + set ft=octave | return + endif + if has_key(g:polyglot_is_disabled, 'octave') + set ft=matlab | return + endif +endfunc + +func! polyglot#detect#Fs(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\(: \|new-device\)' + set ft=forth | return + endif + if line =~# '^\s*\(#light\|import\|let\|module\|namespace\|open\|type\)' + set ft=fsharp | return + endif + if line =~# '\s*\(#version\|precision\|uniform\|varying\|vec[234]\)' + set ft=glsl | return + endif + endfor + if exists("g:filetype_fs") + let &ft = g:filetype_fs | return + endif + set ft=forth | return +endfunc + +func! polyglot#detect#Frag(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '\s*\(#version\|precision\|uniform\|varying\|vec[234]\)' + set ft=glsl | return + endif + endfor +endfunc + +func! polyglot#detect#Re(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\s*#\%(\%(if\|ifdef\|define\|pragma\)\s\+\w\|\s*include\s\+[<"]\|template\s*<\)' + set ft=cpp | return + endif + set ft=reason | return + endfor +endfunc + +func! polyglot#detect#Idr(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 5])) + let line = getline(lnum) + if line =~# '^\s*--.*[Ii]dris \=1' + set ft=idris | return + endif + if line =~# '^\s*--.*[Ii]dris \=2' + set ft=idris2 | return + endif + endfor + for lnum in range(1, min([line("$"), 30])) + let line = getline(lnum) + if line =~# '^pkgs =.*' + set ft=idris | return + endif + if line =~# '^depends =.*' + set ft=idris2 | return + endif + if line =~# '^%language \(TypeProviders\|ElabReflection\)' + set ft=idris | return + endif + if line =~# '^%language PostfixProjections' + set ft=idris2 | return + endif + if line =~# '^%access .*' + set ft=idris | return + endif + endfor + if exists("g:filetype_idr") + let &ft = g:filetype_idr | return + endif + set ft=idris2 | return +endfunc + +func! polyglot#detect#Lidr(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 200])) + let line = getline(lnum) + if line =~# '^>\s*--.*[Ii]dris \=1' + set ft=lidris | return + endif + endfor + set ft=lidris2 | return +endfunc + +func! polyglot#detect#Bas(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 5])) + let line = getline(lnum) + if line =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' + set ft=vb | return + endif + endfor + set ft=basic | return +endfunc + +func! polyglot#detect#Pm(...) + if a:0 != 1 && did_filetype() + return + endif + let line = getline(nextnonblank(1)) + if line =~# 'XPM2' + set ft=xpm2 | return + endif + if line =~# 'XPM' + set ft=xpm | return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\s*\%(use\s\+v6\(\<\|\>\)\|\(\<\|\>\)module\(\<\|\>\)\|\(\<\|\>\)\%(my\s\+\)\=class\(\<\|\>\)\)' + set ft=raku | return + endif + if line =~# '\(\<\|\>\)use\s\+\%(strict\(\<\|\>\)\|v\=5\.\)' + set ft=perl | return + endif + endfor + if exists("g:filetype_pm") + let &ft = g:filetype_pm | return + endif + if polyglot#shebang#Detect() | return | endif + set ft=perl | return +endfunc + +func! polyglot#detect#Pl(...) + if a:0 != 1 && did_filetype() + return + endif + let line = getline(nextnonblank(1)) + if line =~# '^[^#]*:-' || line =~# '^\s*\%(%\|/\*\)' || line =~# '\.\s*$' + set ft=prolog | return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\s*\%(use\s\+v6\(\<\|\>\)\|\(\<\|\>\)module\(\<\|\>\)\|\(\<\|\>\)\%(my\s\+\)\=class\(\<\|\>\)\)' + set ft=raku | return + endif + if line =~# '\(\<\|\>\)use\s\+\%(strict\(\<\|\>\)\|v\=5\.\)' + set ft=perl | return + endif + endfor + if exists("g:filetype_pl") + let &ft = g:filetype_pl | return + endif + if polyglot#shebang#Detect() | return | endif + set ft=perl | return +endfunc + +func! polyglot#detect#T(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 5])) + let line = getline(lnum) + if line =~# '^\.' + set ft=nroff | return + endif + endfor + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '^\s*\%(use\s\+v6\(\<\|\>\)\|\(\<\|\>\)module\(\<\|\>\)\|\(\<\|\>\)\%(my\s\+\)\=class\(\<\|\>\)\)' + set ft=raku | return + endif + if line =~# '\(\<\|\>\)use\s\+\%(strict\(\<\|\>\)\|v\=5\.\)' + set ft=perl | return + endif + endfor + if exists("g:filetype_t") + let &ft = g:filetype_t | return + endif + if polyglot#shebang#Detect() | return | endif + set ft=perl | return +endfunc + +func! polyglot#detect#Tt2(...) + if a:0 != 1 && did_filetype() + return + endif + for lnum in range(1, min([line("$"), 3])) + let line = getline(lnum) + if line =~? '<\%(!DOCTYPE HTML\|[%?]\|html\)' + set ft=tt2html | return + endif + endfor + set ft=tt2 | return +endfunc + +func! polyglot#detect#Html(...) + if a:0 != 1 && did_filetype() + return + endif + let line = getline(nextnonblank(1)) + if line =~# '^\(%\|<[%&].*>\)' + set ft=mason | return + endif + for lnum in range(1, min([line("$"), 50])) + let line = getline(lnum) + if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\|load\)\(\<\|\>\)\|{#\s\+' + set ft=htmldjango | return + endif + if line =~# '\(\<\|\>\)DTD\s\+XHTML\s' + set ft=xhtml | return + endif + endfor + set ft=html | return +endfunc + +" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/polyglot/ft.vim b/autoload/polyglot/ft.vim new file mode 100644 index 000000000..92c65ac19 --- /dev/null +++ b/autoload/polyglot/ft.vim @@ -0,0 +1,900 @@ +" Vim functions for file type detection +" +" Maintainer: Bram Moolenaar +" Last Change: 2022 Jan 31 + +" These functions are moved here from runtime/filetype.vim to make startup +" faster. + +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +func polyglot#ft#Check_inp() + if getline(1) =~ '^\*' + setf abaqus + else + let n = 1 + if line("$") > 500 + let nmax = 500 + else + let nmax = line("$") + endif + while n <= nmax + if getline(n) =~? "^header surface data" + setf trasys + break + endif + let n = n + 1 + endwhile + endif +endfunc + +" This function checks for the kind of assembly that is wanted by the user, or +" can be detected from the first five lines of the file. +func polyglot#ft#FTasm() + " make sure b:asmsyntax exists + if !exists("b:asmsyntax") + let b:asmsyntax = "" + endif + + if b:asmsyntax == "" + call polyglot#ft#FTasmsyntax() + endif + + " if b:asmsyntax still isn't set, default to asmsyntax or GNU + if b:asmsyntax == "" + if exists("g:asmsyntax") + let b:asmsyntax = g:asmsyntax + else + let b:asmsyntax = "asm" + endif + endif + + exe "setf " . fnameescape(b:asmsyntax) +endfunc + +func polyglot#ft#FTasmsyntax() + " see if file contains any asmsyntax=foo overrides. If so, change + " b:asmsyntax appropriately + let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4). + \" ".getline(5)." " + let match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s') + if match != '' + let b:asmsyntax = match + elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library')) + let b:asmsyntax = "vmasm" + endif +endfunc + +let s:ft_visual_basic_content = '\cVB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' + +" See FTfrm() for Visual Basic form file detection +func polyglot#ft#FTbas() + if exists("g:filetype_bas") + exe "setf " . g:filetype_bas + return + endif + + " most frequent FreeBASIC-specific keywords in distro files + let fb_keywords = '\c^\s*\%(extern\|var\|enum\|private\|scope\|union\|byref\|operator\|constructor\|delete\|namespace\|public\|property\|with\|destructor\|using\)\>\%(\s*[:=(]\)\@!' + let fb_preproc = '\c^\s*\%(#\a\+\|option\s\+\%(byval\|dynamic\|escape\|\%(no\)\=gosub\|nokeyword\|private\|static\)\>\)' + let fb_comment = "^\\s*/'" + " OPTION EXPLICIT, without the leading underscore, is common to many dialects + let qb64_preproc = '\c^\s*\%($\a\+\|option\s\+\%(_explicit\|_\=explicitarray\)\>\)' + + let lines = getline(1, min([line("$"), 100])) + + if match(lines, fb_preproc) > -1 || match(lines, fb_comment) > -1 || match(lines, fb_keywords) > -1 + setf freebasic + elseif match(lines, qb64_preproc) > -1 + setf qb64 + elseif match(lines, s:ft_visual_basic_content) > -1 + setf vb + else + setf basic + endif +endfunc + +func polyglot#ft#FTbtm() + if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm + setf dosbatch + else + setf btm + endif +endfunc + +func polyglot#ft#BindzoneCheck(default) + if getline(1).getline(2).getline(3).getline(4) =~ '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' + setf bindzone + elseif a:default != '' + exe 'setf ' . a:default + endif +endfunc + +func polyglot#ft#FTlpc() + if exists("g:lpc_syntax_for_c") + let lnum = 1 + while lnum <= 12 + if getline(lnum) =~# '^\(//\|inherit\|private\|protected\|nosave\|string\|object\|mapping\|mixed\)' + setf lpc + return + endif + let lnum = lnum + 1 + endwhile + endif + setf c +endfunc + +func polyglot#ft#FTheader() + if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1 + if exists("g:c_syntax_for_h") + setf objc + else + setf objcpp + endif + elseif exists("g:c_syntax_for_h") + setf c + elseif exists("g:ch_syntax_for_h") + setf ch + else + setf cpp + endif +endfunc + +" This function checks if one of the first ten lines start with a '@'. In +" that case it is probably a change file. +" If the first line starts with # or ! it's probably a ch file. +" If a line has "main", "include", "//" or "/*" it's probably ch. +" Otherwise CHILL is assumed. +func polyglot#ft#FTchange() + let lnum = 1 + while lnum <= 10 + if getline(lnum)[0] == '@' + setf change + return + endif + if lnum == 1 && (getline(1)[0] == '#' || getline(1)[0] == '!') + setf ch + return + endif + if getline(lnum) =~ "MODULE" + setf chill + return + endif + if getline(lnum) =~ 'main\s*(\|#\s*include\|//' + setf ch + return + endif + let lnum = lnum + 1 + endwhile + setf chill +endfunc + +func polyglot#ft#FTent() + " This function checks for valid cl syntax in the first five lines. + " Look for either an opening comment, '#', or a block start, '{". + " If not found, assume SGML. + let lnum = 1 + while lnum < 6 + let line = getline(lnum) + if line =~ '^\s*[#{]' + setf cl + return + elseif line !~ '^\s*$' + " Not a blank line, not a comment, and not a block start, + " so doesn't look like valid cl code. + break + endif + let lnum = lnum + 1 + endw + setf dtd +endfunc + +func polyglot#ft#ExCheck() + let lines = getline(1, min([line("$"), 100])) + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 + setf euphoria3 + else + setf elixir + endif +endfunc + +func polyglot#ft#EuphoriaCheck() + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + else + setf euphoria3 + endif +endfunc + +func polyglot#ft#DtraceCheck() + let lines = getline(1, min([line("$"), 100])) + if match(lines, '^module\>\|^import\>') > -1 + " D files often start with a module and/or import statement. + setf d + elseif match(lines, '^#!\S\+dtrace\|#pragma\s\+D\s\+option\|:\S\{-}:\S\{-}:') > -1 + setf dtrace + else + setf d + endif +endfunc + +func polyglot#ft#FTe() + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + else + let n = 1 + while n < 100 && n <= line("$") + if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$" + setf specman + return + endif + let n = n + 1 + endwhile + setf eiffel + endif +endfunc + +func polyglot#ft#FTfrm() + if exists("g:filetype_frm") + exe "setf " . g:filetype_frm + return + endif + + let lines = getline(1, min([line("$"), 5])) + + if match(lines, s:ft_visual_basic_content) > -1 + setf vb + else + setf form + endif +endfunc + +" Distinguish between Forth and F#. +" Provided by Doug Kearns. +func polyglot#ft#FTfs() + if exists("g:filetype_fs") + exe "setf " . g:filetype_fs + else + let line = getline(nextnonblank(1)) + " comments and colon definitions + if line =~ '^\s*\.\=( ' || line =~ '^\s*\\G\= ' || line =~ '^\\$' + \ || line =~ '^\s*: \S' + setf forth + else + setf fsharp + endif + endif +endfunc + +" Distinguish between HTML, XHTML and Django +func polyglot#ft#FThtml() + let n = 1 + while n < 10 && n <= line("$") + if getline(n) =~ '\\|{#\s\+' + setf htmldjango + return + endif + let n = n + 1 + endwhile + setf FALLBACK html +endfunc + +" Distinguish between standard IDL and MS-IDL +func polyglot#ft#FTidl() + let n = 1 + while n < 50 && n <= line("$") + if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"' + setf msidl + return + endif + let n = n + 1 + endwhile + setf idl +endfunc + +" Distinguish between "default" and Cproto prototype file. */ +func polyglot#ft#ProtoCheck(default) + " Cproto files have a comment in the first line and a function prototype in + " the second line, it always ends in ";". Indent files may also have + " comments, thus we can't match comments to see the difference. + " IDL files can have a single ';' in the second line, require at least one + " chacter before the ';'. + if getline(2) =~ '.;$' + setf cpp + else + exe 'setf ' . a:default + endif +endfunc + +func polyglot#ft#FTm() + if exists("g:filetype_m") + exe "setf " . g:filetype_m + return + endif + + " excluding end(for|function|if|switch|while) common to Murphi + let octave_block_terminators = '\' + + let objc_preprocessor = '^\s*#\s*\%(import\|include\|define\|if\|ifn\=def\|undef\|line\|error\|pragma\)\>' + + let n = 1 + let saw_comment = 0 " Whether we've seen a multiline comment leader. + while n < 100 + let line = getline(n) + if line =~ '^\s*/\*' + " /* ... */ is a comment in Objective C and Murphi, so we can't conclude + " it's either of them yet, but track this as a hint in case we don't see + " anything more definitive. + let saw_comment = 1 + endif + if line =~ '^\s*//' || line =~ '^\s*@import\>' || line =~ objc_preprocessor + setf objc + return + endif + if line =~ '^\s*\%(#\|%!\)' || line =~ '^\s*unwind_protect\>' || + \ line =~ '\%(^\|;\)\s*' .. octave_block_terminators + setf octave + return + endif + " TODO: could be Matlab or Octave + if line =~ '^\s*%' + setf matlab + return + endif + if line =~ '^\s*(\*' + setf mma + return + endif + if line =~ '^\c\s*\(\(type\|var\)\>\|--\)' + setf murphi + return + endif + let n = n + 1 + endwhile + + if saw_comment + " We didn't see anything definitive, but this looks like either Objective C + " or Murphi based on the comment leader. Assume the former as it is more + " common. + setf objc + else + " Default is Matlab + setf matlab + endif +endfunc + +func polyglot#ft#FTmms() + let n = 1 + while n < 20 + let line = getline(n) + if line =~ '^\s*\(%\|//\)' || line =~ '^\*' + setf mmix + return + endif + if line =~ '^\s*#' + setf make + return + endif + let n = n + 1 + endwhile + setf mmix +endfunc + +" This function checks if one of the first five lines start with a dot. In +" that case it is probably an nroff file: 'filetype' is set and 1 is returned. +func polyglot#ft#FTnroff() + if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.' + setf nroff + return 1 + endif + return 0 +endfunc + +func polyglot#ft#FTmm() + let n = 1 + while n < 20 + let line = getline(n) + if line =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)' + setf objcpp + return + endif + let n = n + 1 + endwhile + setf nroff +endfunc + +func polyglot#ft#FTpl() + if exists("g:filetype_pl") + exe "setf " . g:filetype_pl + else + " recognize Prolog by specific text in the first non-empty line + " require a blank after the '%' because Perl uses "%list" and "%translate" + let l = getline(nextnonblank(1)) + if l =~ '\' || l =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || l =~ ':-' + setf prolog + else + setf perl + endif + endif +endfunc + +func polyglot#ft#FTinc() + if exists("g:filetype_inc") + exe "setf " . g:filetype_inc + else + let lines = getline(1).getline(2).getline(3) + if lines =~? "perlscript" + setf aspperl + elseif lines =~ "<%" + setf aspvbs + elseif lines =~ "' + +func polyglot#ft#FTprogress_pascal() + if exists("g:filetype_p") + exe "setf " . g:filetype_p + return + endif + " This function checks for valid Pascal syntax in the first ten lines. + " Look for either an opening comment or a program start. + " If not found, assume Progress. + let lnum = 1 + while lnum <= 10 && lnum < line('$') + let line = getline(lnum) + if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords + setf pascal + return + elseif line !~ '^\s*$' || line =~ '^/\*' + " Not an empty line: Doesn't look like valid Pascal code. + " Or it looks like a Progress /* comment + break + endif + let lnum = lnum + 1 + endw + setf progress +endfunc + +func polyglot#ft#FTpp() + if exists("g:filetype_pp") + exe "setf " . g:filetype_pp + else + let line = getline(nextnonblank(1)) + if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords + setf pascal + else + setf puppet + endif + endif +endfunc + +func polyglot#ft#FTr() + let max = line("$") > 50 ? 50 : line("$") + + for n in range(1, max) + " Rebol is easy to recognize, check for that first + if getline(n) =~? '\' + setf rebol + return + endif + endfor + + for n in range(1, max) + " R has # comments + if getline(n) =~ '^\s*#' + setf r + return + endif + " Rexx has /* comments */ + if getline(n) =~ '^\s*/\*' + setf rexx + return + endif + endfor + + " Nothing recognized, use user default or assume Rexx + if exists("g:filetype_r") + exe "setf " . g:filetype_r + else + " Rexx used to be the default, but R appears to be much more popular. + setf r + endif +endfunc + +func polyglot#ft#McSetf() + " Rely on the file to start with a comment. + " MS message text files use ';', Sendmail files use '#' or 'dnl' + for lnum in range(1, min([line("$"), 20])) + let line = getline(lnum) + if line =~ '^\s*\(#\|dnl\)' + setf m4 " Sendmail .mc file + return + elseif line =~ '^\s*;' + setf msmessages " MS Message text file + return + endif + endfor + setf m4 " Default: Sendmail .mc file +endfunc + +" Called from filetype.vim and scripts.vim. +func polyglot#ft#SetFileTypeSH(name) + if did_filetype() + " Filetype was already detected + return + endif + if expand("") =~ g:ft_ignore_pat + return + endif + if a:name =~ '\' + " Some .sh scripts contain #!/bin/csh. + call polyglot#ft#SetFileTypeShell("csh") + return + elseif a:name =~ '\' + " Some .sh scripts contain #!/bin/tcsh. + call polyglot#ft#SetFileTypeShell("tcsh") + return + elseif a:name =~ '\' + " Some .sh scripts contain #!/bin/zsh. + call polyglot#ft#SetFileTypeShell("zsh") + return + elseif a:name =~ '\' + let b:is_kornshell = 1 + if exists("b:is_bash") + unlet b:is_bash + endif + if exists("b:is_sh") + unlet b:is_sh + endif + elseif exists("g:bash_is_sh") || a:name =~ '\' || a:name =~ '\' + let b:is_bash = 1 + if exists("b:is_kornshell") + unlet b:is_kornshell + endif + if exists("b:is_sh") + unlet b:is_sh + endif + elseif a:name =~ '\' + let b:is_sh = 1 + if exists("b:is_kornshell") + unlet b:is_kornshell + endif + if exists("b:is_bash") + unlet b:is_bash + endif + endif + call polyglot#ft#SetFileTypeShell("sh") +endfunc + +" For shell-like file types, check for an "exec" command hidden in a comment, +" as used for Tcl. +" Also called from scripts.vim, thus can't be local to this script. +func polyglot#ft#SetFileTypeShell(name) + if did_filetype() + " Filetype was already detected + return + endif + if expand("") =~ g:ft_ignore_pat + return + endif + let l = 2 + while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)' + " Skip empty and comment lines. + let l = l + 1 + endwhile + if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$' + " Found an "exec" line after a comment with continuation + let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '') + if n =~ '\:p') + if path =~ '/\(etc/udev/\%(rules\.d/\)\=.*\.rules\|\%(usr/\)\=lib/udev/\%(rules\.d/\)\=.*\.rules\)$' + setf udevrules + return + endif + if path =~ '^/etc/ufw/' + setf conf " Better than hog + return + endif + if path =~ '^/\(etc\|usr/share\)/polkit-1/rules\.d' + setf javascript + return + endif + try + let config_lines = readfile('/etc/udev/udev.conf') + catch /^Vim\%((\a\+)\)\=:E484/ + setf hog + return + endtry + let dir = expand(':p:h') + for line in config_lines + if line =~ s:ft_rules_udev_rules_pattern + let udev_rules = substitute(line, s:ft_rules_udev_rules_pattern, '\1', "") + if dir == udev_rules + setf udevrules + endif + break + endif + endfor + setf hog +endfunc + +func polyglot#ft#SQL() + if exists("g:filetype_sql") + exe "setf " . g:filetype_sql + else + setf sql + endif +endfunc + +" If the file has an extension of 't' and is in a directory 't' or 'xt' then +" it is almost certainly a Perl test file. +" If the first line starts with '#' and contains 'perl' it's probably a Perl +" file. +" (Slow test) If a file contains a 'use' statement then it is almost certainly +" a Perl file. +func polyglot#ft#FTperl() + let dirname = expand("%:p:h:t") + if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt') + setf perl + return 1 + endif + if getline(1)[0] == '#' && getline(1) =~ 'perl' + setf perl + return 1 + endif + let save_cursor = getpos('.') + call cursor(1,1) + let has_use = search('^use\s\s*\k', 'c', 30) + call setpos('.', save_cursor) + if has_use + setf perl + return 1 + endif + return 0 +endfunc + +" Choose context, plaintex, or tex (LaTeX) based on these rules: +" 1. Check the first line of the file for "%&". +" 2. Check the first 1000 non-comment lines for LaTeX or ConTeXt keywords. +" 3. Default to "plain" or to g:tex_flavor, can be set in user's vimrc. +func polyglot#ft#FTtex() + let firstline = getline(1) + if firstline =~ '^%&\s*\a\+' + let format = tolower(matchstr(firstline, '\a\+')) + let format = substitute(format, 'pdf', '', '') + if format == 'tex' + let format = 'latex' + elseif format == 'plaintex' + let format = 'plain' + endif + elseif expand('%') =~ 'tex/context/.*/.*.tex' + let format = 'context' + else + " Default value, may be changed later: + let format = exists("g:tex_flavor") ? g:tex_flavor : 'plain' + " Save position, go to the top of the file, find first non-comment line. + let save_cursor = getpos('.') + call cursor(1,1) + let firstNC = search('^\s*[^[:space:]%]', 'c', 1000) + if firstNC " Check the next thousand lines for a LaTeX or ConTeXt keyword. + let lpat = 'documentclass\>\|usepackage\>\|begin{\|newcommand\>\|renewcommand\>' + let cpat = 'start\a\+\|setup\a\+\|usemodule\|enablemode\|enableregime\|setvariables\|useencoding\|usesymbols\|stelle\a\+\|verwende\a\+\|stel\a\+\|gebruik\a\+\|usa\a\+\|imposta\a\+\|regle\a\+\|utilisemodule\>' + let kwline = search('^\s*\\\%(' . lpat . '\)\|^\s*\\\(' . cpat . '\)', + \ 'cnp', firstNC + 1000) + if kwline == 1 " lpat matched + let format = 'latex' + elseif kwline == 2 " cpat matched + let format = 'context' + endif " If neither matched, keep default set above. + " let lline = search('^\s*\\\%(' . lpat . '\)', 'cn', firstNC + 1000) + " let cline = search('^\s*\\\%(' . cpat . '\)', 'cn', firstNC + 1000) + " if cline > 0 + " let format = 'context' + " endif + " if lline > 0 && (cline == 0 || cline > lline) + " let format = 'tex' + " endif + endif " firstNC + call setpos('.', save_cursor) + endif " firstline =~ '^%&\s*\a\+' + + " Translation from formats to file types. TODO: add AMSTeX, RevTex, others? + if format == 'plain' + setf plaintex + elseif format == 'context' + setf context + else " probably LaTeX + setf tex + endif + return +endfunc + +func polyglot#ft#FTxml() + let n = 1 + while n < 100 && n <= line("$") + let line = getline(n) + " DocBook 4 or DocBook 5. + let is_docbook4 = line =~ '\)' && getline(n) !~ '^\s*#\s*include' + setf racc + return + endif + let n = n + 1 + endwhile + setf yacc +endfunc + +func polyglot#ft#Redif() + let lnum = 1 + while lnum <= 5 && lnum < line('$') + if getline(lnum) =~ "^\ctemplate-type:" + setf redif + return + endif + let lnum = lnum + 1 + endwhile +endfunc + +" This function is called for all files under */debian/patches/*, make sure not +" to non-dep3patch files, such as README and other text files. +func polyglot#ft#Dep3patch() + if expand('%:t') ==# 'series' + return + endif + + for ln in getline(1, 100) + if ln =~# '^\%(Description\|Subject\|Origin\|Bug\|Forwarded\|Author\|From\|Reviewed-by\|Acked-by\|Last-Updated\|Applied-Upstream\):' + setf dep3patch + return + elseif ln =~# '^---' + " end of headers found. stop processing + return + endif + endfor +endfunc + +" This function checks the first 15 lines for appearance of 'FoamFile' +" and then 'object' in a following line. +" In that case, it's probably an OpenFOAM file +func polyglot#ft#FTfoam() + let ffile = 0 + let lnum = 1 + while lnum <= 15 + if getline(lnum) =~# '^FoamFile' + let ffile = 1 + elseif ffile == 1 && getline(lnum) =~# '^\s*object' + setf foam + return + endif + let lnum = lnum + 1 + endwhile +endfunc + +" Determine if a *.tf file is TF mud client or terraform +func polyglot#ft#FTtf() + let numberOfLines = line('$') + for i in range(1, numberOfLines) + let currentLine = trim(getline(i)) + let firstCharacter = currentLine[0] + if firstCharacter !=? ";" && firstCharacter !=? "/" && firstCharacter !=? "" + setf terraform + return + endif + endfor + setf tf +endfunc + + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/polyglot/init.vim b/autoload/polyglot/init.vim new file mode 100644 index 000000000..9e991f369 --- /dev/null +++ b/autoload/polyglot/init.vim @@ -0,0 +1,3630 @@ +" Vim support file to detect file types +" +" Maintainer: Adam Stankiewicz +" URL: https://github.com/sheerun/vim-polyglot + +" Listen very carefully, I will say this only once +if exists("did_load_polyglot") + finish +endif + +" Switch to compatible mode for the time being +let s:cpo_save = &cpo +set cpo&vim + +let did_load_polyglot = 1 + +let g:polyglot_initialized = 0 + +func! polyglot#init#init() + " A no-op as sourcing this file is enough +endfunc + +func! polyglot#init#is_disabled(caller, name, path) + if !g:polyglot_initialized + if a:path[0:7] == "autoload" + let g:polyglot_initialized = 1 + + for p in globpath(&rtp, a:path, 0, 1) + if p != a:caller + exe "source " . p + endif + endfor + endif + endif + + return has_key(g:polyglot_is_disabled, a:name) +endfunc + +let g:polyglot_is_disabled = {} +let s:new_polyglot_disabled = [] + +if exists('g:polyglot_disabled') + for pkg in g:polyglot_disabled + let base = split(pkg, '\.') + if len(base) > 0 + let g:polyglot_is_disabled[pkg] = 1 + call add(s:new_polyglot_disabled, base[0]) + endif + endfor +else + let g:polyglot_disabled_not_set = 1 +endif + +func! PolyglotVerify() + if exists("g:polyglot_disabled_not_set") + if exists("g:polyglot_disabled") + echohl WarningMsg + echo "vim-polyglot: g:polyglot_disabled should be defined before loading vim-polyglot" + echohl None + endif + + unlet g:polyglot_disabled_not_set + endif +endfun + +au VimEnter * call PolyglotVerify() + +function! s:SetDefault(name, value) + if !exists(a:name) + let {a:name} = a:value + endif +endfunction + +call s:SetDefault('g:markdown_enable_spell_checking', 0) +call s:SetDefault('g:markdown_enable_input_abbreviations', 0) +call s:SetDefault('g:markdown_enable_mappings', 0) + +" Enable jsx syntax by default +call s:SetDefault('g:jsx_ext_required', 0) + +" Needed for sql highlighting +call s:SetDefault('g:javascript_sql_dialect', 'sql') + +" Enable jsdoc highlighting by default +call s:SetDefault('g:javascript_plugin_jsdoc', 1) + +" Make csv loading faster +call s:SetDefault('g:csv_start', 1) +call s:SetDefault('g:csv_end', 2) +call s:SetDefault('g:csv_default_delim', ',') + +" Disable json concealing by default +call s:SetDefault('g:vim_json_syntax_conceal', 0) + +call s:SetDefault('g:filetype_euphoria', 'elixir') + +if !exists('g:python_highlight_all') + call s:SetDefault('g:python_highlight_builtins', 1) + call s:SetDefault('g:python_highlight_builtin_objs', 1) + call s:SetDefault('g:python_highlight_builtin_types', 1) + call s:SetDefault('g:python_highlight_builtin_funcs', 1) + call s:SetDefault('g:python_highlight_builtin_funcs_kwarg', 1) + call s:SetDefault('g:python_highlight_exceptions', 1) + call s:SetDefault('g:python_highlight_string_formatting', 1) + call s:SetDefault('g:python_highlight_string_format', 1) + call s:SetDefault('g:python_highlight_string_templates', 1) + call s:SetDefault('g:python_highlight_indent_errors', 1) + call s:SetDefault('g:python_highlight_space_errors', 1) + call s:SetDefault('g:python_highlight_doctests', 1) + call s:SetDefault('g:python_highlight_func_calls', 1) + call s:SetDefault('g:python_highlight_class_vars', 1) + call s:SetDefault('g:python_highlight_operators', 1) + call s:SetDefault('g:python_highlight_file_headers_as_comments', 1) + call s:SetDefault('g:python_slow_sync', 1) +endif + +" Some variables are needed for haxe loading + +" We need it because scripts.vim in vim uses "set ft=" which cannot be +" overridden with setf (and we can't use set ft= so our scripts.vim work) +func! s:Setf(ft) + if &filetype !~# '\<'.a:ft.'\>' + let &filetype = a:ft + endif +endfunc + +" Function used for patterns that end in a star: don't set the filetype if the +" file name matches ft_ignore_pat. +" When using this, the entry should probably be further down below with the +" other StarSetf() calls. +func! s:StarSetf(ft) + if expand("") !~ g:ft_ignore_pat + exe 'setf ' . a:ft + endif +endfunc + +augroup polyglot-observer | augroup END + +if exists('s:cpo_save') + " Restore 'cpoptions' + let &cpo = s:cpo_save + unlet s:cpo_save +endif + +" Load user-defined filetype.vim and oter plugins ftdetect first +" This is to use polyglot-defined ftdetect always as fallback to user settings +augroup filetypedetect + runtime! filetype.vim + runtime! ftdetect/*.vim +augroup END + + +augroup filetypedetect + +" Switch to compatible mode for the time being +let s:cpo_save = &cpo +set cpo&vim + +if !has_key(g:polyglot_is_disabled, 'ftdetect') + +" It can happen vim filetype.vim loads first, then we need a reset +if exists("did_load_filetypes") + au! filetypedetect +endif + +" Prevent filetype.vim of vim from loading again +let did_load_filetypes = 1 + + +" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE + +if !has_key(g:polyglot_is_disabled, 'bicep') + au BufNewFile,BufRead *.bicep setf bicep +endif + +if !has_key(g:polyglot_is_disabled, 'org') + au BufNewFile,BufRead *.org setf org +endif + +if !has_key(g:polyglot_is_disabled, 'mermaid') + au BufNewFile,BufRead *.mermaid,*.mm,*.mmd setf mermaid +endif + +if !has_key(g:polyglot_is_disabled, 'openscad') + au BufNewFile,BufRead *.scad setf openscad +endif + +if !has_key(g:polyglot_is_disabled, 'nftables') + au BufNewFile,BufRead *.nft,*/nftables.conf setf nftables +endif + +if !has_key(g:polyglot_is_disabled, 'just') + au BufNewFile,BufRead *.just,justfile setf just +endif + +if !has_key(g:polyglot_is_disabled, 'sway') + au BufNewFile,BufRead *.sway.config,*.swayconfig,*sway/config,swayconfig setf swayconfig +endif + +if !has_key(g:polyglot_is_disabled, 'hjson') + au BufNewFile,BufRead *.hjson setf hjson +endif + +if !has_key(g:polyglot_is_disabled, 'gleam') + au BufNewFile,BufRead *.gleam setf gleam +endif + +if !has_key(g:polyglot_is_disabled, 'jsonc') + au BufNewFile,BufRead *.cjson,*.jsonc,{.,}babelrc,{.,}eslintrc.json,{.,}jshintrc,{.,}jslintrc,{.,}mocharc.json,coc-settings.json,coffeelint.json,jsconfig.json,tsconfig.json setf jsonc +endif + +if !has_key(g:polyglot_is_disabled, 'mint') + au BufNewFile,BufRead *.mint setf mint +endif + +if !has_key(g:polyglot_is_disabled, 'context') + au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context +endif + +if !has_key(g:polyglot_is_disabled, 'xpm2') + au BufNewFile,BufRead *.xpm2 setf xpm2 +endif + +if !has_key(g:polyglot_is_disabled, 'xpm') + au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm() + au BufNewFile,BufRead *.xpm setf xpm +endif + +if !has_key(g:polyglot_is_disabled, 'xf86conf') + au BufNewFile,BufRead */xorg.conf.d/*.conf,xorg.conf,xorg.conf-4 setf xf86conf + au BufNewFile,BufRead XF86Config-4* call s:StarSetf('xf86conf') + au BufNewFile,BufRead XF86Config* call s:StarSetf('xf86conf') +endif + +if !has_key(g:polyglot_is_disabled, 'text') + au BufNewFile,BufRead *.text,README setf text +endif + +if !has_key(g:polyglot_is_disabled, 'svn') + au BufNewFile,BufRead svn-commit*.tmp setf svn +endif + +if !has_key(g:polyglot_is_disabled, 'logcheck') + au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') +endif + +if !has_key(g:polyglot_is_disabled, 'fvwm') + au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') +endif + +if !has_key(g:polyglot_is_disabled, 'crontab') + au BufNewFile,BufRead crontab setf crontab + au BufNewFile,BufRead crontab.* call s:StarSetf('crontab') + au BufNewFile,BufRead */etc/cron.d/* call s:StarSetf('crontab') +endif + +if !has_key(g:polyglot_is_disabled, 'bzr') + au BufNewFile,BufRead bzr_log.* call s:StarSetf('bzr') +endif + +if !has_key(g:polyglot_is_disabled, 'asteriskvm') + au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') +endif + +if !has_key(g:polyglot_is_disabled, 'asterisk') + au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') +endif + +if !has_key(g:polyglot_is_disabled, 'apachestyle') + au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') + au BufNewFile,BufRead */etc/proftpd/conf.*/* call s:StarSetf('apachestyle') + au BufNewFile,BufRead */etc/proftpd/*.conf* call s:StarSetf('apachestyle') +endif + +if !has_key(g:polyglot_is_disabled, 'z8a') + au BufNewFile,BufRead *.z8a setf z8a +endif + +if !has_key(g:polyglot_is_disabled, 'zimbu') + au BufNewFile,BufRead *.zu setf zimbu +endif + +if !has_key(g:polyglot_is_disabled, 'yacc') + au BufNewFile,BufRead *.y++,*.yxx,*.yy setf yacc +endif + +if !has_key(g:polyglot_is_disabled, 'xslt') + au BufNewFile,BufRead *.xsl,*.xslt setf xslt +endif + +if !has_key(g:polyglot_is_disabled, 'xsd') + au BufNewFile,BufRead *.xsd setf xsd +endif + +if !has_key(g:polyglot_is_disabled, 'xquery') + au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery +endif + +if !has_key(g:polyglot_is_disabled, 'xmodmap') + au BufNewFile,BufRead *Xmodmap setf xmodmap + au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') +endif + +if !has_key(g:polyglot_is_disabled, 'xmath') + au BufNewFile,BufRead *.msc,*.msf setf xmath +endif + +if !has_key(g:polyglot_is_disabled, 'xdefaults') + au BufNewFile,BufRead *.ad,{.,}Xdefaults,{.,}Xpdefaults,{.,}Xresources,xdm-config setf xdefaults + au BufNewFile,BufRead Xresources* call s:StarSetf('xdefaults') + au BufNewFile,BufRead */app-defaults/* call s:StarSetf('xdefaults') + au BufNewFile,BufRead */Xresources/* call s:StarSetf('xdefaults') +endif + +if !has_key(g:polyglot_is_disabled, 'xinetd') + au BufNewFile,BufRead */etc/xinetd.conf setf xinetd + au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') +endif + +if !has_key(g:polyglot_is_disabled, 'xhtml') + au BufNewFile,BufRead *.xht,*.xhtml setf xhtml +endif + +if !has_key(g:polyglot_is_disabled, 'wsh') + au BufNewFile,BufRead *.ws[fc] setf wsh +endif + +if !has_key(g:polyglot_is_disabled, 'cvs') + au BufNewFile,BufRead cvs\d\+ setf cvs +endif + +if !has_key(g:polyglot_is_disabled, 'cvsrc') + au BufNewFile,BufRead {.,}cvsrc setf cvsrc +endif + +if !has_key(g:polyglot_is_disabled, 'wvdial') + au BufNewFile,BufRead {.,}wvdialrc,wvdial.conf setf wvdial +endif + +if !has_key(g:polyglot_is_disabled, 'wsml') + au BufNewFile,BufRead *.wsml setf wsml +endif + +if !has_key(g:polyglot_is_disabled, 'winbatch') + au BufNewFile,BufRead *.wbt setf winbatch +endif + +if !has_key(g:polyglot_is_disabled, 'wml') + au BufNewFile,BufRead *.wml setf wml +endif + +if !has_key(g:polyglot_is_disabled, 'wget') + au BufNewFile,BufRead {.,}wgetrc,wgetrc setf wget +endif + +if !has_key(g:polyglot_is_disabled, 'webmacro') + au BufNewFile,BufRead *.wm setf webmacro +endif + +if !has_key(g:polyglot_is_disabled, 'wast') + au BufNewFile,BufRead *.wast,*.wat setf wast +endif + +if !has_key(g:polyglot_is_disabled, 'vroom') + au BufNewFile,BufRead *.vroom setf vroom +endif + +if !has_key(g:polyglot_is_disabled, 'vrml') + au BufNewFile,BufRead *.wrl setf vrml +endif + +if !has_key(g:polyglot_is_disabled, 'vgrindefs') + au BufNewFile,BufRead vgrindefs setf vgrindefs +endif + +if !has_key(g:polyglot_is_disabled, 'viminfo') + au BufNewFile,BufRead {.,}viminfo,_viminfo setf viminfo +endif + +if !has_key(g:polyglot_is_disabled, 'vim') + au BufNewFile,BufRead *.vba,*.vim,{.,}exrc,_exrc setf vim + au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') +endif + +if !has_key(g:polyglot_is_disabled, 'vhdl') + au BufNewFile,BufRead *.hdl,*.vbe,*.vhd,*.vhdl,*.vho,*.vst setf vhdl + au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') +endif + +if !has_key(g:polyglot_is_disabled, 'systemverilog') + au BufNewFile,BufRead *.sv,*.svh setf systemverilog +endif + +if !has_key(g:polyglot_is_disabled, 'verilogams') + au BufNewFile,BufRead *.va,*.vams setf verilogams +endif + +if !has_key(g:polyglot_is_disabled, 'verilog') + au BufNewFile,BufRead *.v setf verilog +endif + +if !has_key(g:polyglot_is_disabled, 'vera') + au BufNewFile,BufRead *.vr,*.vrh,*.vri setf vera +endif + +if !has_key(g:polyglot_is_disabled, 'upstart') + au BufNewFile,BufRead */.config/upstart/*.conf,*/.config/upstart/*.override,*/.init/*.conf,*/.init/*.override,*/etc/init/*.conf,*/etc/init/*.override,*/usr/share/upstart/*.conf,*/usr/share/upstart/*.override setf upstart +endif + +if !has_key(g:polyglot_is_disabled, 'updatedb') + au BufNewFile,BufRead */etc/updatedb.conf setf updatedb +endif + +if !has_key(g:polyglot_is_disabled, 'uc') + au BufNewFile,BufRead *.uc setf uc +endif + +if !has_key(g:polyglot_is_disabled, 'udevperm') + au BufNewFile,BufRead */etc/udev/permissions.d/*.permissions setf udevperm +endif + +if !has_key(g:polyglot_is_disabled, 'udevconf') + au BufNewFile,BufRead */etc/udev/udev.conf setf udevconf +endif + +if !has_key(g:polyglot_is_disabled, 'uil') + au BufNewFile,BufRead *.uil,*.uit setf uil +endif + +if !has_key(g:polyglot_is_disabled, 'tsscl') + au BufNewFile,BufRead *.tsscl setf tsscl +endif + +if !has_key(g:polyglot_is_disabled, 'tssop') + au BufNewFile,BufRead *.tssop setf tssop +endif + +if !has_key(g:polyglot_is_disabled, 'tssgm') + au BufNewFile,BufRead *.tssgm setf tssgm +endif + +if !has_key(g:polyglot_is_disabled, 'trustees') + au BufNewFile,BufRead trustees.conf setf trustees +endif + +if !has_key(g:polyglot_is_disabled, 'treetop') + au BufNewFile,BufRead *.treetop setf treetop +endif + +if !has_key(g:polyglot_is_disabled, 'tpp') + au BufNewFile,BufRead *.tpp setf tpp +endif + +if !has_key(g:polyglot_is_disabled, 'tidy') + au BufNewFile,BufRead {.,}tidyrc,tidy.conf,tidyrc setf tidy +endif + +if !has_key(g:polyglot_is_disabled, 'texmf') + au BufNewFile,BufRead texmf.cnf setf texmf +endif + +if !has_key(g:polyglot_is_disabled, 'texinfo') + au BufNewFile,BufRead *.texi,*.texinfo,*.txi setf texinfo +endif + +if !has_key(g:polyglot_is_disabled, 'tex') + au BufNewFile,BufRead *.bbl,*.dtx,*.latex,*.ltx,*.sty setf tex +endif + +if !has_key(g:polyglot_is_disabled, 'terminfo') + au BufNewFile,BufRead *.ti setf terminfo +endif + +if !has_key(g:polyglot_is_disabled, 'teraterm') + au BufNewFile,BufRead *.ttl setf teraterm +endif + +if !has_key(g:polyglot_is_disabled, 'tsalt') + au BufNewFile,BufRead *.slt setf tsalt +endif + +if !has_key(g:polyglot_is_disabled, 'tli') + au BufNewFile,BufRead *.tli setf tli +endif + +if !has_key(g:polyglot_is_disabled, 'tcl') + au BufNewFile,BufRead *.itcl,*.itk,*.jacl,*.tcl,*.tk setf tcl +endif + +if !has_key(g:polyglot_is_disabled, 'taskedit') + au BufNewFile,BufRead *.task setf taskedit +endif + +if !has_key(g:polyglot_is_disabled, 'taskdata') + au BufNewFile,BufRead {pending,completed,undo}.data setf taskdata +endif + +if !has_key(g:polyglot_is_disabled, 'tak') + au BufNewFile,BufRead *.tak setf tak +endif + +if !has_key(g:polyglot_is_disabled, 'tags') + au BufNewFile,BufRead tags setf tags +endif + +if !has_key(g:polyglot_is_disabled, 'sudoers') + au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers +endif + +if !has_key(g:polyglot_is_disabled, 'sdc') + au BufNewFile,BufRead *.sdc setf sdc +endif + +if !has_key(g:polyglot_is_disabled, 'sysctl') + au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl +endif + +if !has_key(g:polyglot_is_disabled, 'sil') + au BufNewFile,BufRead *.sil setf sil +endif + +if !has_key(g:polyglot_is_disabled, 'swiftgyb') + au BufNewFile,BufRead *.swift.gyb setf swiftgyb +endif + +if !has_key(g:polyglot_is_disabled, 'voscm') + au BufNewFile,BufRead *.cm setf voscm +endif + +if !has_key(g:polyglot_is_disabled, 'sml') + au BufNewFile,BufRead *.sml setf sml +endif + +if !has_key(g:polyglot_is_disabled, 'stp') + au BufNewFile,BufRead *.stp setf stp +endif + +if !has_key(g:polyglot_is_disabled, 'smcl') + au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl +endif + +if !has_key(g:polyglot_is_disabled, 'stata') + au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata +endif + +if !has_key(g:polyglot_is_disabled, 'sshdconfig') + au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf,sshd_config setf sshdconfig +endif + +if !has_key(g:polyglot_is_disabled, 'sshconfig') + au BufNewFile,BufRead */.ssh/config,*/etc/ssh/ssh_config.d/*.conf,ssh_config setf sshconfig +endif + +if !has_key(g:polyglot_is_disabled, 'sqr') + au BufNewFile,BufRead *.sqi,*.sqr setf sqr +endif + +if !has_key(g:polyglot_is_disabled, 'sqlj') + au BufNewFile,BufRead *.sqlj setf sqlj +endif + +if !has_key(g:polyglot_is_disabled, 'squid') + au BufNewFile,BufRead squid.conf setf squid +endif + +if !has_key(g:polyglot_is_disabled, 'spice') + au BufNewFile,BufRead *.sp,*.spice setf spice +endif + +if !has_key(g:polyglot_is_disabled, 'slice') + au BufNewFile,BufRead *.ice setf slice +endif + +if !has_key(g:polyglot_is_disabled, 'spup') + au BufNewFile,BufRead *.spd,*.spdata,*.speedup setf spup +endif + +if !has_key(g:polyglot_is_disabled, 'hog') + au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog +endif + +if !has_key(g:polyglot_is_disabled, 'mib') + au BufNewFile,BufRead *.mib,*.my setf mib +endif + +if !has_key(g:polyglot_is_disabled, 'snobol4') + au BufNewFile,BufRead *.sno,*.spt setf snobol4 +endif + +if !has_key(g:polyglot_is_disabled, 'smith') + au BufNewFile,BufRead *.smith,*.smt setf smith +endif + +if !has_key(g:polyglot_is_disabled, 'st') + au BufNewFile,BufRead *.st setf st +endif + +if !has_key(g:polyglot_is_disabled, 'slrnsc') + au BufNewFile,BufRead *.score setf slrnsc +endif + +if !has_key(g:polyglot_is_disabled, 'slrnrc') + au BufNewFile,BufRead {.,}slrnrc setf slrnrc +endif + +if !has_key(g:polyglot_is_disabled, 'skill') + au BufNewFile,BufRead *.cdf,*.il,*.ils setf skill +endif + +if !has_key(g:polyglot_is_disabled, 'sisu') + au BufNewFile,BufRead *.-sst,*.-sst.meta,*._sst,*._sst.meta,*.ssi,*.ssm,*.sst,*.sst.meta setf sisu +endif + +if !has_key(g:polyglot_is_disabled, 'sinda') + au BufNewFile,BufRead *.s85,*.sin setf sinda +endif + +if !has_key(g:polyglot_is_disabled, 'simula') + au BufNewFile,BufRead *.sim setf simula +endif + +if !has_key(g:polyglot_is_disabled, 'screen') + au BufNewFile,BufRead {.,}screenrc,screenrc setf screen +endif + +if !has_key(g:polyglot_is_disabled, 'scheme') + au BufNewFile,BufRead *.scm,*.ss setf scheme +endif + +if !has_key(g:polyglot_is_disabled, 'catalog') + au BufNewFile,BufRead catalog setf catalog + au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') +endif + +if !has_key(g:polyglot_is_disabled, 'setserial') + au BufNewFile,BufRead */etc/serial.conf setf setserial +endif + +if !has_key(g:polyglot_is_disabled, 'slpspi') + au BufNewFile,BufRead */etc/slp.spi setf slpspi +endif + +if !has_key(g:polyglot_is_disabled, 'spyce') + au BufNewFile,BufRead *.spi,*.spy setf spyce +endif + +if !has_key(g:polyglot_is_disabled, 'slpreg') + au BufNewFile,BufRead */etc/slp.reg setf slpreg +endif + +if !has_key(g:polyglot_is_disabled, 'slpconf') + au BufNewFile,BufRead */etc/slp.conf setf slpconf +endif + +if !has_key(g:polyglot_is_disabled, 'services') + au BufNewFile,BufRead */etc/services setf services +endif + +if !has_key(g:polyglot_is_disabled, 'sm') + au BufNewFile,BufRead sendmail.cf setf sm +endif + +if !has_key(g:polyglot_is_disabled, 'sieve') + au BufNewFile,BufRead *.sieve,*.siv setf sieve +endif + +if !has_key(g:polyglot_is_disabled, 'sdl') + au BufNewFile,BufRead *.pr,*.sdl setf sdl +endif + +if !has_key(g:polyglot_is_disabled, 'sd') + au BufNewFile,BufRead *.sd setf sd +endif + +if !has_key(g:polyglot_is_disabled, 'scilab') + au BufNewFile,BufRead *.sce,*.sci setf scilab +endif + +if !has_key(g:polyglot_is_disabled, 'sbt') + au BufNewFile,BufRead *.sbt setf sbt +endif + +if !has_key(g:polyglot_is_disabled, 'sather') + au BufNewFile,BufRead *.sa setf sather +endif + +if !has_key(g:polyglot_is_disabled, 'sass') + au BufNewFile,BufRead *.sass setf sass +endif + +if !has_key(g:polyglot_is_disabled, 'sas') + au BufNewFile,BufRead *.sas setf sas +endif + +if !has_key(g:polyglot_is_disabled, 'samba') + au BufNewFile,BufRead smb.conf setf samba +endif + +if !has_key(g:polyglot_is_disabled, 'slang') + au BufNewFile,BufRead *.sl setf slang +endif + +if !has_key(g:polyglot_is_disabled, 'rtf') + au BufNewFile,BufRead *.rtf setf rtf +endif + +if !has_key(g:polyglot_is_disabled, 'rpcgen') + au BufNewFile,BufRead *.x setf rpcgen +endif + +if !has_key(g:polyglot_is_disabled, 'robots') + au BufNewFile,BufRead robots.txt setf robots +endif + +if !has_key(g:polyglot_is_disabled, 'rpl') + au BufNewFile,BufRead *.rpl setf rpl +endif + +if !has_key(g:polyglot_is_disabled, 'rng') + au BufNewFile,BufRead *.rng setf rng +endif + +if !has_key(g:polyglot_is_disabled, 'rnc') + au BufNewFile,BufRead *.rnc setf rnc +endif + +if !has_key(g:polyglot_is_disabled, 'resolv') + au BufNewFile,BufRead resolv.conf setf resolv +endif + +if !has_key(g:polyglot_is_disabled, 'remind') + au BufNewFile,BufRead *.rem,*.remind,{.,}reminders setf remind + au BufNewFile,BufRead .reminders* call s:StarSetf('remind') +endif + +if !has_key(g:polyglot_is_disabled, 'rrst') + au BufNewFile,BufRead *.rrst,*.srst setf rrst +endif + +if !has_key(g:polyglot_is_disabled, 'rmd') + au BufNewFile,BufRead *.rmd,*.smd setf rmd +endif + +if !has_key(g:polyglot_is_disabled, 'rnoweb') + au BufNewFile,BufRead *.rnw,*.snw setf rnoweb +endif + +if !has_key(g:polyglot_is_disabled, 'rexx') + au BufNewFile,BufRead *.jrexx,*.orx,*.rex,*.rexx,*.rexxj,*.rxj,*.rxo,*.testGroup,*.testUnit setf rexx +endif + +if !has_key(g:polyglot_is_disabled, 'rego') + au BufNewFile,BufRead *.rego setf rego +endif + +if !has_key(g:polyglot_is_disabled, 'rib') + au BufNewFile,BufRead *.rib setf rib +endif + +if !has_key(g:polyglot_is_disabled, 'readline') + au BufNewFile,BufRead {.,}inputrc,inputrc setf readline +endif + +if !has_key(g:polyglot_is_disabled, 'rcs') + au BufNewFile,BufRead *\,v setf rcs +endif + +if !has_key(g:polyglot_is_disabled, 'ratpoison') + au BufNewFile,BufRead {.,}ratpoisonrc,ratpoisonrc setf ratpoison +endif + +if !has_key(g:polyglot_is_disabled, 'radiance') + au BufNewFile,BufRead *.mat,*.rad setf radiance +endif + +if !has_key(g:polyglot_is_disabled, 'pyrex') + au BufNewFile,BufRead *.pxd,*.pyx setf pyrex +endif + +if !has_key(g:polyglot_is_disabled, 'protocols') + au BufNewFile,BufRead */etc/protocols setf protocols +endif + +if !has_key(g:polyglot_is_disabled, 'promela') + au BufNewFile,BufRead *.pml setf promela +endif + +if !has_key(g:polyglot_is_disabled, 'psf') + au BufNewFile,BufRead *.psf setf psf +endif + +if !has_key(g:polyglot_is_disabled, 'procmail') + au BufNewFile,BufRead {.,}procmail,{.,}procmailrc setf procmail +endif + +if !has_key(g:polyglot_is_disabled, 'privoxy') + au BufNewFile,BufRead *.action setf privoxy +endif + +if !has_key(g:polyglot_is_disabled, 'obj') + au BufNewFile,BufRead *.obj setf obj +endif + +if !has_key(g:polyglot_is_disabled, 'ppwiz') + au BufNewFile,BufRead *.ih,*.it setf ppwiz +endif + +if !has_key(g:polyglot_is_disabled, 'pccts') + au BufNewFile,BufRead *.g setf pccts +endif + +if !has_key(g:polyglot_is_disabled, 'povini') + au BufNewFile,BufRead {.,}povrayrc setf povini +endif + +if !has_key(g:polyglot_is_disabled, 'pov') + au BufNewFile,BufRead *.pov setf pov +endif + +if !has_key(g:polyglot_is_disabled, 'ppd') + au BufNewFile,BufRead *.ppd setf ppd +endif + +if !has_key(g:polyglot_is_disabled, 'postscr') + au BufNewFile,BufRead *.afm,*.ai,*.eps,*.epsf,*.epsi,*.pfa,*.ps setf postscr +endif + +if !has_key(g:polyglot_is_disabled, 'pfmain') + au BufNewFile,BufRead main.cf setf pfmain +endif + +if !has_key(g:polyglot_is_disabled, 'po') + au BufNewFile,BufRead *.po,*.pot setf po +endif + +if !has_key(g:polyglot_is_disabled, 'plp') + au BufNewFile,BufRead *.plp setf plp +endif + +if !has_key(g:polyglot_is_disabled, 'plsql') + au BufNewFile,BufRead *.pls,*.plsql setf plsql +endif + +if !has_key(g:polyglot_is_disabled, 'plm') + au BufNewFile,BufRead *.p36,*.pac,*.plm setf plm +endif + +if !has_key(g:polyglot_is_disabled, 'pli') + au BufNewFile,BufRead *.pl1,*.pli setf pli +endif + +if !has_key(g:polyglot_is_disabled, 'pine') + au BufNewFile,BufRead {.,}pinerc,{.,}pinercex,pinerc,pinercex setf pine +endif + +if !has_key(g:polyglot_is_disabled, 'pilrc') + au BufNewFile,BufRead *.rcp setf pilrc +endif + +if !has_key(g:polyglot_is_disabled, 'pinfo') + au BufNewFile,BufRead */.pinforc,*/etc/pinforc setf pinfo +endif + +if !has_key(g:polyglot_is_disabled, 'cmod') + au BufNewFile,BufRead *.cmod setf cmod +endif + +if !has_key(g:polyglot_is_disabled, 'pike') + au BufNewFile,BufRead *.pike,*.pmod setf pike +endif + +if !has_key(g:polyglot_is_disabled, 'pdf') + au BufNewFile,BufRead *.pdf setf pdf +endif + +if !has_key(g:polyglot_is_disabled, 'pascal') + au BufNewFile,BufRead *.dpr,*.lpr,*.pas,*.pp setf pascal +endif + +if !has_key(g:polyglot_is_disabled, 'passwd') + au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd +endif + +if !has_key(g:polyglot_is_disabled, 'papp') + au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp +endif + +if !has_key(g:polyglot_is_disabled, 'pamenv') + au BufNewFile,BufRead {.,}pam_environment,pam_env.conf setf pamenv +endif + +if !has_key(g:polyglot_is_disabled, 'pamconf') + au BufNewFile,BufRead */etc/pam.conf setf pamconf + au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') +endif + +if !has_key(g:polyglot_is_disabled, 'pf') + au BufNewFile,BufRead pf.conf setf pf +endif + +if !has_key(g:polyglot_is_disabled, 'ora') + au BufNewFile,BufRead *.ora setf ora +endif + +if !has_key(g:polyglot_is_disabled, 'opl') + au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl +endif + +if !has_key(g:polyglot_is_disabled, 'openroad') + au BufNewFile,BufRead *.or setf openroad +endif + +if !has_key(g:polyglot_is_disabled, 'omnimark') + au BufNewFile,BufRead *.xin,*.xom setf omnimark +endif + +if !has_key(g:polyglot_is_disabled, 'occam') + au BufNewFile,BufRead *.occ setf occam +endif + +if !has_key(g:polyglot_is_disabled, 'nsis') + au BufNewFile,BufRead *.nsh,*.nsi setf nsis +endif + +if !has_key(g:polyglot_is_disabled, 'nqc') + au BufNewFile,BufRead *.nqc setf nqc +endif + +if !has_key(g:polyglot_is_disabled, 'nroff') + au BufNewFile,BufRead *.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc setf nroff + au BufNewFile,BufRead *.mom,*.nr,*.roff,*.tmac,*.tr setf nroff + au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') +endif + +if !has_key(g:polyglot_is_disabled, 'ncf') + au BufNewFile,BufRead *.ncf setf ncf +endif + +if !has_key(g:polyglot_is_disabled, 'ninja') + au BufNewFile,BufRead *.ninja setf ninja +endif + +if !has_key(g:polyglot_is_disabled, 'netrc') + au BufNewFile,BufRead {.,}netrc setf netrc +endif + +if !has_key(g:polyglot_is_disabled, 'neomuttrc') + au BufNewFile,BufRead Neomuttrc setf neomuttrc + au BufNewFile,BufRead neomuttrc* call s:StarSetf('neomuttrc') + au BufNewFile,BufRead Neomuttrc* call s:StarSetf('neomuttrc') + au BufNewFile,BufRead .neomuttrc* call s:StarSetf('neomuttrc') + au BufNewFile,BufRead */.neomutt/neomuttrc* call s:StarSetf('neomuttrc') +endif + +if !has_key(g:polyglot_is_disabled, 'natural') + au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural +endif + +if !has_key(g:polyglot_is_disabled, 'nanorc') + au BufNewFile,BufRead *.nanorc,*/etc/nanorc setf nanorc +endif + +if !has_key(g:polyglot_is_disabled, 'n1ql') + au BufNewFile,BufRead *.n1ql,*.nql setf n1ql +endif + +if !has_key(g:polyglot_is_disabled, 'mush') + au BufNewFile,BufRead *.mush setf mush +endif + +if !has_key(g:polyglot_is_disabled, 'mupad') + au BufNewFile,BufRead *.mu setf mupad +endif + +if !has_key(g:polyglot_is_disabled, 'muttrc') + au BufNewFile,BufRead Mutt{ng,}rc setf muttrc + au BufNewFile,BufRead mutt{ng,}rc* call s:StarSetf('muttrc') + au BufNewFile,BufRead Mutt{ng,}rc* call s:StarSetf('muttrc') + au BufNewFile,BufRead .mutt{ng,}rc* call s:StarSetf('muttrc') + au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') + au BufNewFile,BufRead */.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') +endif + +if !has_key(g:polyglot_is_disabled, 'msql') + au BufNewFile,BufRead *.msql setf msql +endif + +if !has_key(g:polyglot_is_disabled, 'mrxvtrc') + au BufNewFile,BufRead {.,}mrxvtrc,mrxvtrc setf mrxvtrc +endif + +if !has_key(g:polyglot_is_disabled, 'srec') + au BufNewFile,BufRead *.mot,*.s19,*.s28,*.s37,*.srec setf srec +endif + +if !has_key(g:polyglot_is_disabled, 'mplayerconf') + au BufNewFile,BufRead */.mplayer/config,mplayer.conf setf mplayerconf +endif + +if !has_key(g:polyglot_is_disabled, 'modconf') + au BufNewFile,BufRead */etc/conf.modules,*/etc/modules,*/etc/modules.conf setf modconf + au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') +endif + +if !has_key(g:polyglot_is_disabled, 'moo') + au BufNewFile,BufRead *.moo setf moo +endif + +if !has_key(g:polyglot_is_disabled, 'monk') + au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk +endif + +if !has_key(g:polyglot_is_disabled, 'modula3') + au BufNewFile,BufRead *.[mi][3g] setf modula3 +endif + +if !has_key(g:polyglot_is_disabled, 'modula2') + au BufNewFile,BufRead *.DEF,*.MOD,*.m2,*.mi setf modula2 +endif + +if !has_key(g:polyglot_is_disabled, 'mmp') + au BufNewFile,BufRead *.mmp setf mmp +endif + +if !has_key(g:polyglot_is_disabled, 'mix') + au BufNewFile,BufRead *.mix,*.mixal setf mix +endif + +if !has_key(g:polyglot_is_disabled, 'mgl') + au BufNewFile,BufRead *.mgl setf mgl +endif + +if !has_key(g:polyglot_is_disabled, 'mp') + au BufNewFile,BufRead *.mp setf mp +endif + +if !has_key(g:polyglot_is_disabled, 'mf') + au BufNewFile,BufRead *.mf setf mf +endif + +if !has_key(g:polyglot_is_disabled, 'messages') + au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages +endif + +if !has_key(g:polyglot_is_disabled, 'hgcommit') + au BufNewFile,BufRead hg-editor-*.txt setf hgcommit +endif + +if !has_key(g:polyglot_is_disabled, 'mel') + au BufNewFile,BufRead *.mel setf mel +endif + +if !has_key(g:polyglot_is_disabled, 'maple') + au BufNewFile,BufRead *.mpl,*.mv,*.mws setf maple +endif + +if !has_key(g:polyglot_is_disabled, 'manconf') + au BufNewFile,BufRead */etc/man.conf,man.config setf manconf +endif + +if !has_key(g:polyglot_is_disabled, 'mallard') + au BufNewFile,BufRead *.page setf mallard +endif + +if !has_key(g:polyglot_is_disabled, 'ist') + au BufNewFile,BufRead *.ist,*.mst setf ist +endif + +if !has_key(g:polyglot_is_disabled, 'mailcap') + au BufNewFile,BufRead {.,}mailcap,mailcap setf mailcap +endif + +if !has_key(g:polyglot_is_disabled, 'mailaliases') + au BufNewFile,BufRead */etc/aliases,*/etc/mail/aliases setf mailaliases +endif + +if !has_key(g:polyglot_is_disabled, 'mail') + au BufNewFile,BufRead *.eml,{.,}article,{.,}article.\d\+,{.,}followup,{.,}letter,{.,}letter.\d\+,/tmp/SLRN[0-9A-Z.]\+,ae\d\+.txt,mutt[[:alnum:]_-]\\\{6\},mutt{ng,}-*-\w\+,neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},pico.\d\+,snd.\d\+,{neo,}mutt[[:alnum:]._-]\\\{6\} setf mail + au BufNewFile,BufRead reportbug-* call s:StarSetf('mail') +endif + +if !has_key(g:polyglot_is_disabled, 'mgp') + au BufNewFile,BufRead *.mgp setf mgp +endif + +if !has_key(g:polyglot_is_disabled, 'lss') + au BufNewFile,BufRead *.lss setf lss +endif + +if !has_key(g:polyglot_is_disabled, 'lsl') + au BufNewFile,BufRead *.lsl setf lsl +endif + +if !has_key(g:polyglot_is_disabled, 'lout') + au BufNewFile,BufRead *.lou,*.lout setf lout +endif + +if !has_key(g:polyglot_is_disabled, 'lotos') + au BufNewFile,BufRead *.lot,*.lotos setf lotos +endif + +if !has_key(g:polyglot_is_disabled, 'logtalk') + au BufNewFile,BufRead *.lgt setf logtalk +endif + +if !has_key(g:polyglot_is_disabled, 'logindefs') + au BufNewFile,BufRead */etc/login.defs setf logindefs +endif + +if !has_key(g:polyglot_is_disabled, 'loginaccess') + au BufNewFile,BufRead */etc/login.access setf loginaccess +endif + +if !has_key(g:polyglot_is_disabled, 'litestep') + au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep +endif + +if !has_key(g:polyglot_is_disabled, 'lite') + au BufNewFile,BufRead *.lite,*.lt setf lite +endif + +if !has_key(g:polyglot_is_disabled, 'liquid') + au BufNewFile,BufRead *.liquid setf liquid +endif + +if !has_key(g:polyglot_is_disabled, 'lisp') + au BufNewFile,BufRead *.cl,*.el,*.lisp,*.lsp,{.,}emacs,{.,}sawfishrc,{.,}sbclrc,sbclrc setf lisp +endif + +if !has_key(g:polyglot_is_disabled, 'lilo') + au BufNewFile,BufRead lilo.conf setf lilo + au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') +endif + +if !has_key(g:polyglot_is_disabled, 'lifelines') + au BufNewFile,BufRead *.ll setf lifelines +endif + +if !has_key(g:polyglot_is_disabled, 'lftp') + au BufNewFile,BufRead *lftp/rc,{.,}lftprc,lftp.conf setf lftp +endif + +if !has_key(g:polyglot_is_disabled, 'sensors') + au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors +endif + +if !has_key(g:polyglot_is_disabled, 'libao') + au BufNewFile,BufRead */.libao,*/etc/libao.conf setf libao +endif + +if !has_key(g:polyglot_is_disabled, 'lex') + au BufNewFile,BufRead *.l,*.l++,*.lex,*.lxx setf lex +endif + +if !has_key(g:polyglot_is_disabled, 'ld') + au BufNewFile,BufRead *.ld setf ld +endif + +if !has_key(g:polyglot_is_disabled, 'ldif') + au BufNewFile,BufRead *.ldif setf ldif +endif + +if !has_key(g:polyglot_is_disabled, 'lprolog') + au BufNewFile,BufRead *.sig setf lprolog +endif + +if !has_key(g:polyglot_is_disabled, 'limits') + au BufNewFile,BufRead */etc/*limits.conf,*/etc/*limits.d/*.conf,*/etc/limits setf limits +endif + +if !has_key(g:polyglot_is_disabled, 'latte') + au BufNewFile,BufRead *.latte,*.lte setf latte +endif + +if !has_key(g:polyglot_is_disabled, 'lace') + au BufNewFile,BufRead *.ACE,*.ace setf lace +endif + +if !has_key(g:polyglot_is_disabled, 'kconfig') + au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig + au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') +endif + +if !has_key(g:polyglot_is_disabled, 'kscript') + au BufNewFile,BufRead *.ks setf kscript +endif + +if !has_key(g:polyglot_is_disabled, 'kivy') + au BufNewFile,BufRead *.kv setf kivy +endif + +if !has_key(g:polyglot_is_disabled, 'kwt') + au BufNewFile,BufRead *.k setf kwt +endif + +if !has_key(g:polyglot_is_disabled, 'kix') + au BufNewFile,BufRead *.kix setf kix +endif + +if !has_key(g:polyglot_is_disabled, 'jovial') + au BufNewFile,BufRead *.j73,*.jov,*.jovial setf jovial +endif + +if !has_key(g:polyglot_is_disabled, 'jgraph') + au BufNewFile,BufRead *.jgr setf jgraph +endif + +if !has_key(g:polyglot_is_disabled, 'jess') + au BufNewFile,BufRead *.clp setf jess +endif + +if !has_key(g:polyglot_is_disabled, 'jproperties') + au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties + au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') +endif + +if !has_key(g:polyglot_is_disabled, 'jsp') + au BufNewFile,BufRead *.jsp setf jsp +endif + +if !has_key(g:polyglot_is_disabled, 'javacc') + au BufNewFile,BufRead *.jj,*.jjt setf javacc +endif + +if !has_key(g:polyglot_is_disabled, 'java') + au BufNewFile,BufRead *.jav,*.java setf java +endif + +if !has_key(g:polyglot_is_disabled, 'jam') + au BufNewFile,BufRead *.jpl,*.jpr setf jam + au BufNewFile,BufRead Prl*.* call s:StarSetf('jam') + au BufNewFile,BufRead JAM*.* call s:StarSetf('jam') +endif + +if !has_key(g:polyglot_is_disabled, 'jal') + au BufNewFile,BufRead *.JAL,*.jal setf jal +endif + +if !has_key(g:polyglot_is_disabled, 'j') + au BufNewFile,BufRead *.ijs setf j +endif + +if !has_key(g:polyglot_is_disabled, 'iss') + au BufNewFile,BufRead *.iss setf iss +endif + +if !has_key(g:polyglot_is_disabled, 'inittab') + au BufNewFile,BufRead inittab setf inittab +endif + +if !has_key(g:polyglot_is_disabled, 'fgl') + au BufNewFile,BufRead *.4gh,*.4gl,*.m4gl setf fgl +endif + +if !has_key(g:polyglot_is_disabled, 'ipfilter') + au BufNewFile,BufRead ipf.conf,ipf.rules,ipf6.conf setf ipfilter +endif + +if !has_key(g:polyglot_is_disabled, 'usw2kagtlog') + au BufNewFile,BufRead *.usw2kagt.log\c,usw2kagt.*.log\c,usw2kagt.log\c setf usw2kagtlog +endif + +if !has_key(g:polyglot_is_disabled, 'usserverlog') + au BufNewFile,BufRead *.usserver.log\c,usserver.*.log\c,usserver.log\c setf usserverlog +endif + +if !has_key(g:polyglot_is_disabled, 'upstreaminstalllog') + au BufNewFile,BufRead *.upstreaminstall.log\c,upstreaminstall.*.log\c,upstreaminstall.log\c setf upstreaminstalllog +endif + +if !has_key(g:polyglot_is_disabled, 'upstreamlog') + au BufNewFile,BufRead *.upstream.log\c,UPSTREAM-*.log\c,fdrupstream.log,upstream.*.log\c,upstream.log\c setf upstreamlog +endif + +if !has_key(g:polyglot_is_disabled, 'upstreamdat') + au BufNewFile,BufRead *.upstream.dat\c,upstream.*.dat\c,upstream.dat\c setf upstreamdat +endif + +if !has_key(g:polyglot_is_disabled, 'initng') + au BufNewFile,BufRead *.ii,*/etc/initng/*/*.i setf initng +endif + +if !has_key(g:polyglot_is_disabled, 'inform') + au BufNewFile,BufRead *.INF,*.inf setf inform +endif + +if !has_key(g:polyglot_is_disabled, 'indent') + au BufNewFile,BufRead {.,}indent.pro,indentrc setf indent +endif + +if !has_key(g:polyglot_is_disabled, 'icemenu') + au BufNewFile,BufRead */.icewm/menu setf icemenu +endif + +if !has_key(g:polyglot_is_disabled, 'msidl') + au BufNewFile,BufRead *.mof,*.odl setf msidl +endif + +if !has_key(g:polyglot_is_disabled, 'icon') + au BufNewFile,BufRead *.icn setf icon +endif + +if !has_key(g:polyglot_is_disabled, 'hb') + au BufNewFile,BufRead *.hb setf hb +endif + +if !has_key(g:polyglot_is_disabled, 'hostsaccess') + au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess +endif + +if !has_key(g:polyglot_is_disabled, 'hostconf') + au BufNewFile,BufRead */etc/host.conf setf hostconf +endif + +if !has_key(g:polyglot_is_disabled, 'template') + au BufNewFile,BufRead *.tmpl setf template +endif + +if !has_key(g:polyglot_is_disabled, 'htmlm4') + au BufNewFile,BufRead *.html.m4 setf htmlm4 +endif + +if !has_key(g:polyglot_is_disabled, 'tilde') + au BufNewFile,BufRead *.t.html setf tilde +endif + +if !has_key(g:polyglot_is_disabled, 'hollywood') + au BufNewFile,BufRead *.hws setf hollywood +endif + +if !has_key(g:polyglot_is_disabled, 'hex') + au BufNewFile,BufRead *.h32,*.hex setf hex +endif + +if !has_key(g:polyglot_is_disabled, 'hastepreproc') + au BufNewFile,BufRead *.htpp setf hastepreproc +endif + +if !has_key(g:polyglot_is_disabled, 'haste') + au BufNewFile,BufRead *.ht setf haste +endif + +if !has_key(g:polyglot_is_disabled, 'chaskell') + au BufNewFile,BufRead *.chs setf chaskell +endif + +if !has_key(g:polyglot_is_disabled, 'lhaskell') + au BufNewFile,BufRead *.lhs setf lhaskell +endif + +if !has_key(g:polyglot_is_disabled, 'gtkrc') + au BufNewFile,BufRead {.,}gtkrc,gtkrc setf gtkrc + au BufNewFile,BufRead gtkrc* call s:StarSetf('gtkrc') + au BufNewFile,BufRead .gtkrc* call s:StarSetf('gtkrc') +endif + +if !has_key(g:polyglot_is_disabled, 'group') + au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group +endif + +if !has_key(g:polyglot_is_disabled, 'gsp') + au BufNewFile,BufRead *.gsp setf gsp +endif + +if !has_key(g:polyglot_is_disabled, 'gretl') + au BufNewFile,BufRead *.gretl setf gretl +endif + +if !has_key(g:polyglot_is_disabled, 'grads') + au BufNewFile,BufRead *.gs setf grads +endif + +if !has_key(g:polyglot_is_disabled, 'gitolite') + au BufNewFile,BufRead gitolite.conf setf gitolite + au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') +endif + +if !has_key(g:polyglot_is_disabled, 'gnash') + au BufNewFile,BufRead {.,}gnashpluginrc,{.,}gnashrc,gnashpluginrc,gnashrc setf gnash +endif + +if !has_key(g:polyglot_is_disabled, 'gpg') + au BufNewFile,BufRead */.gnupg/gpg.conf,*/.gnupg/options,*/usr/*/gnupg/options.skel setf gpg +endif + +if !has_key(g:polyglot_is_disabled, 'gp') + au BufNewFile,BufRead *.gp,{.,}gprc setf gp +endif + +if !has_key(g:polyglot_is_disabled, 'gkrellmrc') + au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc +endif + +if !has_key(g:polyglot_is_disabled, 'gedcom') + au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom + au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') +endif + +if !has_key(g:polyglot_is_disabled, 'gdmo') + au BufNewFile,BufRead *.gdmo,*.mo setf gdmo +endif + +if !has_key(g:polyglot_is_disabled, 'gdb') + au BufNewFile,BufRead {.,}gdbinit setf gdb +endif + +if !has_key(g:polyglot_is_disabled, 'fstab') + au BufNewFile,BufRead fstab,mtab setf fstab +endif + +if !has_key(g:polyglot_is_disabled, 'framescript') + au BufNewFile,BufRead *.fsl setf framescript +endif + +if !has_key(g:polyglot_is_disabled, 'fortran') + au BufNewFile,BufRead *.f,*.f03,*.f08,*.f77,*.f90,*.f95,*.for,*.fortran,*.fpp,*.ftn setf fortran +endif + +if !has_key(g:polyglot_is_disabled, 'reva') + au BufNewFile,BufRead *.frt setf reva +endif + +if !has_key(g:polyglot_is_disabled, 'focexec') + au BufNewFile,BufRead *.fex,*.focexec setf focexec +endif + +if !has_key(g:polyglot_is_disabled, 'fetchmail') + au BufNewFile,BufRead {.,}fetchmailrc setf fetchmail +endif + +if !has_key(g:polyglot_is_disabled, 'fan') + au BufNewFile,BufRead *.fan,*.fwt setf fan +endif + +if !has_key(g:polyglot_is_disabled, 'falcon') + au BufNewFile,BufRead *.fal setf falcon +endif + +if !has_key(g:polyglot_is_disabled, 'exports') + au BufNewFile,BufRead exports setf exports +endif + +if !has_key(g:polyglot_is_disabled, 'expect') + au BufNewFile,BufRead *.exp setf expect +endif + +if !has_key(g:polyglot_is_disabled, 'exim') + au BufNewFile,BufRead exim.conf setf exim +endif + +if !has_key(g:polyglot_is_disabled, 'csc') + au BufNewFile,BufRead *.csc setf csc +endif + +if !has_key(g:polyglot_is_disabled, 'esterel') + au BufNewFile,BufRead *.strl setf esterel +endif + +if !has_key(g:polyglot_is_disabled, 'esqlc') + au BufNewFile,BufRead *.EC,*.ec setf esqlc +endif + +if !has_key(g:polyglot_is_disabled, 'esmtprc') + au BufNewFile,BufRead *esmtprc setf esmtprc +endif + +if !has_key(g:polyglot_is_disabled, 'elmfilt') + au BufNewFile,BufRead filter-rules setf elmfilt +endif + +if !has_key(g:polyglot_is_disabled, 'elinks') + au BufNewFile,BufRead elinks.conf setf elinks +endif + +if !has_key(g:polyglot_is_disabled, 'ecd') + au BufNewFile,BufRead *.ecd setf ecd +endif + +if !has_key(g:polyglot_is_disabled, 'edif') + au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif +endif + +if !has_key(g:polyglot_is_disabled, 'dts') + au BufNewFile,BufRead *.dts,*.dtsi setf dts +endif + +if !has_key(g:polyglot_is_disabled, 'dtd') + au BufNewFile,BufRead *.dtd setf dtd +endif + +if !has_key(g:polyglot_is_disabled, 'dsl') + au BufNewFile,BufRead *.dsl setf dsl +endif + +if !has_key(g:polyglot_is_disabled, 'datascript') + au BufNewFile,BufRead *.ds setf datascript +endif + +if !has_key(g:polyglot_is_disabled, 'dracula') + au BufNewFile,BufRead *.drac,*.drc,*lpe,*lvs setf dracula + au BufNewFile,BufRead drac.* call s:StarSetf('dracula') +endif + +if !has_key(g:polyglot_is_disabled, 'def') + au BufNewFile,BufRead *.def setf def +endif + +if !has_key(g:polyglot_is_disabled, 'dylan') + au BufNewFile,BufRead *.dylan setf dylan +endif + +if !has_key(g:polyglot_is_disabled, 'dylanintr') + au BufNewFile,BufRead *.intr setf dylanintr +endif + +if !has_key(g:polyglot_is_disabled, 'dylanlid') + au BufNewFile,BufRead *.lid setf dylanlid +endif + +if !has_key(g:polyglot_is_disabled, 'dot') + au BufNewFile,BufRead *.dot,*.gv setf dot +endif + +if !has_key(g:polyglot_is_disabled, 'dircolors') + au BufNewFile,BufRead */etc/DIR_COLORS,{.,}dir_colors,{.,}dircolors setf dircolors +endif + +if !has_key(g:polyglot_is_disabled, 'diff') + au BufNewFile,BufRead *.diff,*.rej setf diff +endif + +if !has_key(g:polyglot_is_disabled, 'dictdconf') + au BufNewFile,BufRead dictd.conf setf dictdconf +endif + +if !has_key(g:polyglot_is_disabled, 'dictconf') + au BufNewFile,BufRead {.,}dictrc,dict.conf setf dictconf +endif + +if !has_key(g:polyglot_is_disabled, 'desktop') + au BufNewFile,BufRead *.desktop,*.directory setf desktop +endif + +if !has_key(g:polyglot_is_disabled, 'desc') + au BufNewFile,BufRead *.desc setf desc +endif + +if !has_key(g:polyglot_is_disabled, 'dnsmasq') + au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq + au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') +endif + +if !has_key(g:polyglot_is_disabled, 'denyhosts') + au BufNewFile,BufRead denyhosts.conf setf denyhosts +endif + +if !has_key(g:polyglot_is_disabled, 'debsources') + au BufNewFile,BufRead */etc/apt/sources.list,*/etc/apt/sources.list.d/*.list setf debsources +endif + +if !has_key(g:polyglot_is_disabled, 'debcopyright') + au BufNewFile,BufRead */debian/copyright setf debcopyright +endif + +if !has_key(g:polyglot_is_disabled, 'debcontrol') + au BufNewFile,BufRead */debian/control setf debcontrol +endif + +if !has_key(g:polyglot_is_disabled, 'cuplsim') + au BufNewFile,BufRead *.si setf cuplsim +endif + +if !has_key(g:polyglot_is_disabled, 'cupl') + au BufNewFile,BufRead *.pld setf cupl +endif + +if !has_key(g:polyglot_is_disabled, 'csp') + au BufNewFile,BufRead *.csp,*.fdr setf csp +endif + +if !has_key(g:polyglot_is_disabled, 'quake') + au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg,*quake[1-3]/*.cfg setf quake +endif + +if !has_key(g:polyglot_is_disabled, 'lynx') + au BufNewFile,BufRead lynx.cfg setf lynx +endif + +if !has_key(g:polyglot_is_disabled, 'eterm') + au BufNewFile,BufRead *Eterm/*.cfg setf eterm +endif + +if !has_key(g:polyglot_is_disabled, 'dcd') + au BufNewFile,BufRead *.dcd setf dcd +endif + +if !has_key(g:polyglot_is_disabled, 'dockerfile') + au BufNewFile,BufRead *.Dockerfile,*.dock,Containerfile,Dockerfile,dockerfile setf dockerfile + au BufNewFile,BufRead Dockerfile* call s:StarSetf('dockerfile') +endif + +if !has_key(g:polyglot_is_disabled, 'cuda') + au BufNewFile,BufRead *.cu,*.cuh setf cuda +endif + +if !has_key(g:polyglot_is_disabled, 'config') + au BufNewFile,BufRead Pipfile,configure.ac,configure.in setf config + au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config') +endif + +if !has_key(g:polyglot_is_disabled, 'cf') + au BufNewFile,BufRead *.cfc,*.cfi,*.cfm setf cf +endif + +if !has_key(g:polyglot_is_disabled, 'coco') + au BufNewFile,BufRead *.atg setf coco +endif + +if !has_key(g:polyglot_is_disabled, 'cobol') + au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol +endif + +if !has_key(g:polyglot_is_disabled, 'cmusrc') + au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme},*/cmus/{rc,*.theme} setf cmusrc +endif + +if !has_key(g:polyglot_is_disabled, 'cl') + au BufNewFile,BufRead *.eni setf cl +endif + +if !has_key(g:polyglot_is_disabled, 'clean') + au BufNewFile,BufRead *.dcl,*.icl setf clean +endif + +if !has_key(g:polyglot_is_disabled, 'chordpro') + au BufNewFile,BufRead *.cho,*.chopro,*.chordpro,*.crd,*.crdpro setf chordpro +endif + +if !has_key(g:polyglot_is_disabled, 'chill') + au BufNewFile,BufRead *..ch setf chill +endif + +if !has_key(g:polyglot_is_disabled, 'debchangelog') + au BufNewFile,BufRead */debian/changelog,NEWS.Debian,NEWS.dch,changelog.Debian,changelog.dch setf debchangelog +endif + +if !has_key(g:polyglot_is_disabled, 'cterm') + au BufNewFile,BufRead *.con setf cterm +endif + +if !has_key(g:polyglot_is_disabled, 'css') + au BufNewFile,BufRead *.css setf css +endif + +if !has_key(g:polyglot_is_disabled, 'ch') + au BufNewFile,BufRead *.chf setf ch +endif + +if !has_key(g:polyglot_is_disabled, 'cynpp') + au BufNewFile,BufRead *.cyn setf cynpp +endif + +if !has_key(g:polyglot_is_disabled, 'crm') + au BufNewFile,BufRead *.crm setf crm +endif + +if !has_key(g:polyglot_is_disabled, 'conaryrecipe') + au BufNewFile,BufRead *.recipe setf conaryrecipe +endif + +if !has_key(g:polyglot_is_disabled, 'cdl') + au BufNewFile,BufRead *.cdl setf cdl +endif + +if !has_key(g:polyglot_is_disabled, 'chaiscript') + au BufNewFile,BufRead *.chai setf chaiscript +endif + +if !has_key(g:polyglot_is_disabled, 'cdrdaoconf') + au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/default/cdrdao,*/etc/defaults/cdrdao,{.,}cdrdao setf cdrdaoconf +endif + +if !has_key(g:polyglot_is_disabled, 'cdrtoc') + au BufNewFile,BufRead *.toc setf cdrtoc +endif + +if !has_key(g:polyglot_is_disabled, 'cabal') + au BufNewFile,BufRead *.cabal setf cabal +endif + +if !has_key(g:polyglot_is_disabled, 'csdl') + au BufNewFile,BufRead *.csdl setf csdl +endif + +if !has_key(g:polyglot_is_disabled, 'cs') + au BufNewFile,BufRead *.cs setf cs +endif + +if !has_key(g:polyglot_is_disabled, 'calendar') + au BufNewFile,BufRead calendar setf calendar + au BufNewFile,BufRead */share/calendar/calendar.* call s:StarSetf('calendar') + au BufNewFile,BufRead */share/calendar/*/calendar.* call s:StarSetf('calendar') + au BufNewFile,BufRead */.calendar/* call s:StarSetf('calendar') +endif + +if !has_key(g:polyglot_is_disabled, 'lpc') + au BufNewFile,BufRead *.lpc,*.ulpc setf lpc +endif + +if !has_key(g:polyglot_is_disabled, 'bsdl') + au BufNewFile,BufRead *.bsdl,*bsd setf bsdl +endif + +if !has_key(g:polyglot_is_disabled, 'blank') + au BufNewFile,BufRead *.bl setf blank +endif + +if !has_key(g:polyglot_is_disabled, 'bindzone') + au BufNewFile,BufRead named.root setf bindzone + au BufNewFile,BufRead */named/db.* call s:StarSetf('bindzone') + au BufNewFile,BufRead */bind/db.* call s:StarSetf('bindzone') +endif + +if !has_key(g:polyglot_is_disabled, 'named') + au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named +endif + +if !has_key(g:polyglot_is_disabled, 'bst') + au BufNewFile,BufRead *.bst setf bst +endif + +if !has_key(g:polyglot_is_disabled, 'bib') + au BufNewFile,BufRead *.bib setf bib +endif + +if !has_key(g:polyglot_is_disabled, 'bdf') + au BufNewFile,BufRead *.bdf setf bdf +endif + +if !has_key(g:polyglot_is_disabled, 'bc') + au BufNewFile,BufRead *.bc setf bc +endif + +if !has_key(g:polyglot_is_disabled, 'dosbatch') + au BufNewFile,BufRead *.bat,*.sys setf dosbatch +endif + +if !has_key(g:polyglot_is_disabled, 'hamster') + au BufNewFile,BufRead *.hsc,*.hsm setf hamster +endif + +if !has_key(g:polyglot_is_disabled, 'freebasic') + au BufNewFile,BufRead *.bi,*.fb setf freebasic +endif + +if !has_key(g:polyglot_is_disabled, 'ibasic') + au BufNewFile,BufRead *.iba,*.ibi setf ibasic +endif + +if !has_key(g:polyglot_is_disabled, 'b') + au BufNewFile,BufRead *.imp,*.mch,*.ref setf b +endif + +if !has_key(g:polyglot_is_disabled, 'sql') + au BufNewFile,BufRead *.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.pls,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.tyb,*.tyc,*.typ,*.vw setf sql +endif + +if !has_key(g:polyglot_is_disabled, 'gitignore') + au BufNewFile,BufRead *.git/info/exclude,*/.config/git/ignore,{.,}gitignore setf gitignore +endif + +if !has_key(g:polyglot_is_disabled, 'prolog') + au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() + au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog +endif + +if !has_key(g:polyglot_is_disabled, 'bzl') + au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,*.star,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE setf bzl +endif + +if !has_key(g:polyglot_is_disabled, 'odin') + au BufNewFile,BufRead *.odin setf odin +endif + +if !has_key(g:polyglot_is_disabled, 'dosini') + au BufNewFile,BufRead *.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*.url,*/etc/pacman.conf,*/etc/yum.conf,{.,}coveragerc,{.,}editorconfig,{.,}flake8,{.,}npmrc,{.,}pylintrc,buildozer.spec,pylintrc setf dosini + au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini') + au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') +endif + +if !has_key(g:polyglot_is_disabled, 'spec') + au BufNewFile,BufRead *.spec setf spec +endif + +if !has_key(g:polyglot_is_disabled, 'visual-basic') + au! BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas() + au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb +endif + +if !has_key(g:polyglot_is_disabled, 'basic') + au BufNewFile,BufRead *.basic setf basic +endif + +if !has_key(g:polyglot_is_disabled, 'trasys') + au! BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp() +endif + +if !has_key(g:polyglot_is_disabled, 'zig') + au BufNewFile,BufRead *.zir setf zir + au BufNewFile,BufRead *.zig,*.zir setf zig +endif + +if !has_key(g:polyglot_is_disabled, 'zephir') + au BufNewFile,BufRead *.zep setf zephir +endif + +if !has_key(g:polyglot_is_disabled, 'help') + au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help +endif + +if !has_key(g:polyglot_is_disabled, 'helm') + au BufNewFile,BufRead */templates/*.tpl,*/templates/*.yaml setf helm +endif + +if !has_key(g:polyglot_is_disabled, 'smarty') + au BufNewFile,BufRead *.tpl setf smarty +endif + +if !has_key(g:polyglot_is_disabled, 'ansible') + au BufNewFile,BufRead handlers.*.y{a,}ml,local.y{a,}ml,main.y{a,}ml,playbook.y{a,}ml,requirements.y{a,}ml,roles.*.y{a,}ml,site.y{a,}ml,tasks.*.y{a,}ml setf yaml.ansible + au BufNewFile,BufRead host_vars/* call s:StarSetf('yaml.ansible') + au BufNewFile,BufRead group_vars/* call s:StarSetf('yaml.ansible') +endif + +if !has_key(g:polyglot_is_disabled, 'xsl') + au BufNewFile,BufRead *.xsl,*.xslt setf xsl +endif + +if !has_key(g:polyglot_is_disabled, 'xdc') + au BufNewFile,BufRead *.xdc setf xdc +endif + +if !has_key(g:polyglot_is_disabled, 'vue') + au BufNewFile,BufRead *.vue,*.wpy setf vue +endif + +if !has_key(g:polyglot_is_disabled, 'vmasm') + au BufNewFile,BufRead *.mar setf vmasm +endif + +if !has_key(g:polyglot_is_disabled, 'velocity') + au BufNewFile,BufRead *.vm setf velocity +endif + +if !has_key(g:polyglot_is_disabled, 'vcl') + au BufNewFile,BufRead *.vcl setf vcl +endif + +if !has_key(g:polyglot_is_disabled, 'vbnet') + au BufNewFile,BufRead *.vb,*.vbhtml setf vbnet +endif + +if !has_key(g:polyglot_is_disabled, 'vala') + au BufNewFile,BufRead *.vala,*.valadoc,*.vapi setf vala +endif + +if !has_key(g:polyglot_is_disabled, 'v') + au BufNewFile,BufRead *.v,*.vsh,*.vv setf vlang +endif + +if !has_key(g:polyglot_is_disabled, 'unison') + au BufNewFile,BufRead *.u,*.uu setf unison +endif + +if !has_key(g:polyglot_is_disabled, 'typescript') + au BufNewFile,BufRead *.cts,*.mts,*.ts setf typescript + au BufNewFile,BufRead *.tsx setf typescriptreact +endif + +if !has_key(g:polyglot_is_disabled, 'twig') + au BufNewFile,BufRead *.twig setf html.twig + au BufNewFile,BufRead *.xml.twig setf xml.twig +endif + +if !has_key(g:polyglot_is_disabled, 'tutor') + au BufNewFile,BufRead *.tutor setf tutor +endif + +if !has_key(g:polyglot_is_disabled, 'tptp') + au BufNewFile,BufRead *.ax,*.p,*.tptp setf tptp +endif + +if !has_key(g:polyglot_is_disabled, 'toml') + au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock setf toml +endif + +if !has_key(g:polyglot_is_disabled, 'tmux') + au BufNewFile,BufRead {.,}tmux*.conf setf tmux +endif + +if !has_key(g:polyglot_is_disabled, 'thrift') + au BufNewFile,BufRead *.thrift setf thrift +endif + +if !has_key(g:polyglot_is_disabled, 'textile') + au BufNewFile,BufRead *.textile setf textile +endif + +if !has_key(g:polyglot_is_disabled, 'terraform') + au BufNewFile,BufRead *.tf,*.tfvars setf terraform + au BufNewFile,BufRead *.hcl,*.nomad,*.workflow,{.,}terraformrc,Appfile,terraform.rc setf hcl +endif + +if !has_key(g:polyglot_is_disabled, 'tf') + au BufNewFile,BufRead *.tf,{.,}tfrc,tfrc setf tf +endif + +if !has_key(g:polyglot_is_disabled, 'systemd') + au BufNewFile,BufRead *.automount,*.dnssd,*.link,*.mount,*.netdev,*.network,*.nspawn,*.path,*.service,*.slice,*.socket,*.swap,*.target,*.timer,*/systemd/*.conf setf systemd + au BufNewFile,BufRead *.#* call s:StarSetf('systemd') +endif + +if !has_key(g:polyglot_is_disabled, 'sxhkd') + au BufNewFile,BufRead *.sxhkdrc,sxhkdrc setf sxhkdrc +endif + +if !has_key(g:polyglot_is_disabled, 'swift') + au BufNewFile,BufRead *.swift setf swift +endif + +if !has_key(g:polyglot_is_disabled, 'svg') + au BufNewFile,BufRead *.svg setf svg +endif + +if !has_key(g:polyglot_is_disabled, 'svelte') + au BufNewFile,BufRead *.svelte setf svelte +endif + +if !has_key(g:polyglot_is_disabled, 'stylus') + au BufNewFile,BufRead *.styl,*.stylus setf stylus +endif + +if !has_key(g:polyglot_is_disabled, 'solidity') + au BufNewFile,BufRead *.sol setf solidity +endif + +if !has_key(g:polyglot_is_disabled, 'smt2') + au BufNewFile,BufRead *.smt,*.smt2 setf smt2 +endif + +if !has_key(g:polyglot_is_disabled, 'slime') + au BufNewFile,BufRead *.slime setf slime +endif + +if !has_key(g:polyglot_is_disabled, 'slim') + au BufNewFile,BufRead *.slim setf slim +endif + +if !has_key(g:polyglot_is_disabled, 'sh') + au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*.zsh-theme,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}kshrc,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile setf sh + au BufNewFile,BufRead *.zsh,*/etc/zprofile,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh + au BufNewFile,BufRead .zsh* call s:StarSetf('zsh') + au BufNewFile,BufRead .zlog* call s:StarSetf('zsh') + au BufNewFile,BufRead .zcompdump* call s:StarSetf('zsh') +endif + +if !has_key(g:polyglot_is_disabled, 'scss') + au BufNewFile,BufRead *.scss setf scss +endif + +if !has_key(g:polyglot_is_disabled, 'scala') + au BufNewFile,BufRead *.kojo,*.sc,*.scala setf scala +endif + +if !has_key(g:polyglot_is_disabled, 'rust') + au BufNewFile,BufRead *.rs,*.rs.in setf rust +endif + +if !has_key(g:polyglot_is_disabled, 'brewfile') + au BufNewFile,BufRead Brewfile setf brewfile +endif + +if !has_key(g:polyglot_is_disabled, 'rspec') + au BufNewFile,BufRead *_spec.rb set ft=ruby syntax=rspec +endif + +if !has_key(g:polyglot_is_disabled, 'ruby') + au BufNewFile,BufRead *.axlsx,*.builder,*.cap,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.opal,*.pluginspec,*.podspec,*.prawn,*.rabl,*.rake,*.rant,*.rb,*.rbi,*.rbuild,*.rbw,*.rbx,*.rjs,*.ru,*.ruby,*.rxml,*.spec,*.thor,*.watchr,{.,}Brewfile,{.,}Guardfile,{.,}autotest,{.,}irbrc,{.,}pryrc,{.,}simplecov,Appraisals,Berksfile,Buildfile,Capfile,Cheffile,Dangerfile,Deliverfile,Fastfile,Gemfile,Guardfile,Jarfile,KitchenSink,Mavenfile,Podfile,Puppetfile,Rakefile,Routefile,Snapfile,Steepfile,Thorfile,Vagrantfile,[Rr]antfile,buildfile,vagrantfile setf ruby + au BufNewFile,BufRead [Rr]akefile* call s:StarSetf('ruby') + au BufNewFile,BufRead *.erb,*.erb.deface,*.rhtml setf eruby +endif + +if !has_key(g:polyglot_is_disabled, 'rst') + au BufNewFile,BufRead *.rest,*.rest.txt,*.rst,*.rst.txt setf rst +endif + +if !has_key(g:polyglot_is_disabled, 'reason') + au! BufNewFile,BufRead,BufWritePost *.re call polyglot#detect#Re() + au BufNewFile,BufRead *.rei setf reason +endif + +if !has_key(g:polyglot_is_disabled, 'razor') + au BufNewFile,BufRead *.cshtml,*.razor setf razor +endif + +if !has_key(g:polyglot_is_disabled, 'raml') + au BufNewFile,BufRead *.raml setf raml +endif + +if !has_key(g:polyglot_is_disabled, 'ragel') + au BufNewFile,BufRead *.rl setf ragel +endif + +if !has_key(g:polyglot_is_disabled, 'racket') + au BufNewFile,BufRead *.rkt,*.rktd,*.rktl,*.scrbl setf racket +endif + +if !has_key(g:polyglot_is_disabled, 'r-lang') + au BufNewFile,BufRead *.S,*.r,*.rsx,*.s,{.,}Rprofile,expr-dist setf r + au BufNewFile,BufRead *.rd setf rhelp +endif + +if !has_key(g:polyglot_is_disabled, 'qml') + au BufNewFile,BufRead *.qbs,*.qml setf qml +endif + +if !has_key(g:polyglot_is_disabled, 'qmake') + au BufNewFile,BufRead *.pri,*.pro setf qmake +endif + +if !has_key(g:polyglot_is_disabled, 'requirements') + au BufNewFile,BufRead *.pip,*require.{txt,in},*requirements.{txt,in},constraints.{txt,in} setf requirements +endif + +if !has_key(g:polyglot_is_disabled, 'python') + au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,Snakefile,wscript setf python +endif + +if !has_key(g:polyglot_is_disabled, 'purescript') + au BufNewFile,BufRead *.purs setf purescript +endif + +if !has_key(g:polyglot_is_disabled, 'puppet') + au BufNewFile,BufRead *.pp,Modulefile setf puppet + au BufNewFile,BufRead *.epp setf embeddedpuppet +endif + +if !has_key(g:polyglot_is_disabled, 'pug') + au BufNewFile,BufRead *.jade,*.pug setf pug +endif + +if !has_key(g:polyglot_is_disabled, 'protobuf') + au BufNewFile,BufRead *.proto setf proto +endif + +if !has_key(g:polyglot_is_disabled, 'powershell') + au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1 + au BufNewFile,BufRead *.ps1xml setf ps1xml +endif + +if !has_key(g:polyglot_is_disabled, 'pony') + au BufNewFile,BufRead *.pony setf pony +endif + +if !has_key(g:polyglot_is_disabled, 'plantuml') + au BufNewFile,BufRead *.iuml,*.plantuml,*.pu,*.puml,*.uml setf plantuml +endif + +if !has_key(g:polyglot_is_disabled, 'pest') + au BufNewFile,BufRead *.pest setf pest +endif + +if !has_key(g:polyglot_is_disabled, 'blade') + au BufNewFile,BufRead *.blade,*.blade.php setf blade +endif + +if !has_key(g:polyglot_is_disabled, 'php') + au BufNewFile,BufRead *.aw,*.ctp,*.fcgi,*.inc,*.php,*.php3,*.php4,*.php5,*.php9,*.phps,*.phpt,*.phtml,{.,}php,{.,}php_cs,{.,}php_cs.dist,Phakefile setf php +endif + +if !has_key(g:polyglot_is_disabled, 'cql') + au BufNewFile,BufRead *.cql setf cql +endif + +if !has_key(g:polyglot_is_disabled, 'pgsql') + au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql +endif + +if !has_key(g:polyglot_is_disabled, 'opencl') + au BufNewFile,BufRead *.cl,*.opencl setf opencl +endif + +if !has_key(g:polyglot_is_disabled, 'octave') + au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() + au BufNewFile,BufRead *.oct setf octave +endif + +if !has_key(g:polyglot_is_disabled, 'ocaml') + au BufNewFile,BufRead *.eliom,*.eliomi,*.ml,*.ml.cppo,*.ml4,*.mli,*.mli.cppo,*.mlip,*.mll,*.mlp,*.mlt,*.mly,{.,}ocamlinit setf ocaml + au BufNewFile,BufRead *.om,OMakefile,OMakeroot,OMakeroot.in setf omake + au BufNewFile,BufRead *.opam,*.opam.template,opam setf opam + au BufNewFile,BufRead _oasis setf oasis + au BufNewFile,BufRead dune,dune-project,dune-workspace,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(g:polyglot_is_disabled, 'objc') + au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() + au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H() +endif + +if !has_key(g:polyglot_is_disabled, 'nix') + au BufNewFile,BufRead *.nix setf nix +endif + +if !has_key(g:polyglot_is_disabled, 'nim') + au BufNewFile,BufRead *.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg setf nim +endif + +if !has_key(g:polyglot_is_disabled, 'nginx') + au BufNewFile,BufRead *.nginx,*.nginxconf,*.vhost,*/nginx/*.conf,*nginx.conf,nginx*.conf,nginx.conf setf nginx + au BufNewFile,BufRead */usr/local/nginx/conf/* call s:StarSetf('nginx') + au BufNewFile,BufRead */etc/nginx/* call s:StarSetf('nginx') +endif + +if !has_key(g:polyglot_is_disabled, 'murphi') + au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() +endif + +if !has_key(g:polyglot_is_disabled, 'moonscript') + au BufNewFile,BufRead *.moon setf moon +endif + +if !has_key(g:polyglot_is_disabled, 'meson') + au BufNewFile,BufRead meson.build,meson_options.txt setf meson + au BufNewFile,BufRead *.wrap setf dosini +endif + +if !has_key(g:polyglot_is_disabled, 'mdx') + au BufNewFile,BufRead *.mdx setf markdown.mdx +endif + +if !has_key(g:polyglot_is_disabled, 'mathematica') + au! BufNewFile,BufRead,BufWritePost *.m call polyglot#detect#M() + au BufNewFile,BufRead *.cdf,*.ma,*.mathematica,*.mma,*.mt,*.nb,*.nbp,*.wl,*.wls,*.wlt setf mma +endif + +if !has_key(g:polyglot_is_disabled, 'mako') + au BufNewFile,BufRead *.mako,*.mao setf mako + au BufReadPre *.*.mao execute "do BufRead filetypedetect " . expand(":r") | let b:mako_outer_lang = &filetype + au BufNewFile *.*.mao execute "do BufNewFile filetypedetect " . expand(":r") | let b:mako_outer_lang = &filetype + au BufReadPre *.*.mako execute "do BufRead filetypedetect " . expand(":r") | let b:mako_outer_lang = &filetype + au BufNewFile *.*.mako execute "do BufNewFile filetypedetect " . expand(":r") | let b:mako_outer_lang = &filetype +endif + +if !has_key(g:polyglot_is_disabled, 'm4') + au BufNewFile,BufRead *.at,*.m4,*.mc setf m4 +endif + +if !has_key(g:polyglot_is_disabled, 'lua') + au BufNewFile,BufRead *.fcgi,*.lua,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,{.,}luacheckrc setf lua +endif + +if !has_key(g:polyglot_is_disabled, 'log') + au BufNewFile,BufRead *.LOG,*.log,*_LOG,*_log setf log +endif + +if !has_key(g:polyglot_is_disabled, 'llvm') + au BufNewFile,BufRead *.ll setf llvm + au BufNewFile,BufRead *.td setf tablegen +endif + +if !has_key(g:polyglot_is_disabled, 'livescript') + au BufNewFile,BufRead *._ls,*.ls,Slakefile setf ls +endif + +if !has_key(g:polyglot_is_disabled, 'lilypond') + au BufNewFile,BufRead *.ily,*.ly setf lilypond +endif + +if !has_key(g:polyglot_is_disabled, 'less') + au BufNewFile,BufRead *.less setf less +endif + +if !has_key(g:polyglot_is_disabled, 'ledger') + au BufNewFile,BufRead *.journal,*.ldg,*.ledger setf ledger +endif + +if !has_key(g:polyglot_is_disabled, 'kotlin') + au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin +endif + +if !has_key(g:polyglot_is_disabled, 'julia') + au BufNewFile,BufRead *.jl setf julia +endif + +if !has_key(g:polyglot_is_disabled, 'jst') + au BufNewFile,BufRead *.ect,*.ejs,*.ejs.t,*.jst setf jst +endif + +if !has_key(g:polyglot_is_disabled, 'tads') + au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T() +endif + +if !has_key(g:polyglot_is_disabled, 'raku') + au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T() + au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm() + au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() + au BufNewFile,BufRead *.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl6,*.pm6,*.pod6,*.raku,*.rakudoc,*.rakumod,*.rakutest,*.t6 setf raku +endif + +if !has_key(g:polyglot_is_disabled, 'perl') + au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T() + au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm() + au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() + au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc setf perl + au BufNewFile,BufRead *.pod setf pod + au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason + au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2() + au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2() + au BufNewFile,BufRead *.xs setf xs +endif + +if !has_key(g:polyglot_is_disabled, 'rc') + au BufNewFile,BufRead *.rc,*.rch setf rc +endif + +if !has_key(g:polyglot_is_disabled, 'jsonnet') + au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet +endif + +if !has_key(g:polyglot_is_disabled, 'json') + au BufNewFile,BufRead *.4DForm,*.4DProject,*.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}auto-changelog,{.,}c8rc,{.,}htmlhintrc,{.,}imgbotconfig,{.,}nycrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json +endif + +if !has_key(g:polyglot_is_disabled, 'json5') + au BufNewFile,BufRead *.json5 setf json5 +endif + +if !has_key(g:polyglot_is_disabled, 'jq') + au BufNewFile,BufRead *.jq,{.,}jqrc setf jq + au BufNewFile,BufRead .jqrc* call s:StarSetf('jq') +endif + +if !has_key(g:polyglot_is_disabled, 'htmldjango') + au BufNewFile,BufRead *.j2,*.jinja,*.jinja2 setf htmldjango +endif + +if !has_key(g:polyglot_is_disabled, 'jenkins') + au BufNewFile,BufRead *.Jenkinsfile,*.jenkinsfile,Jenkinsfile setf Jenkinsfile + au BufNewFile,BufRead Jenkinsfile* call s:StarSetf('Jenkinsfile') +endif + +if !has_key(g:polyglot_is_disabled, 'ion') + au BufNewFile,BufRead *.ion,~/.config/ion/initrc setf ion +endif + +if !has_key(g:polyglot_is_disabled, 'idris2') + au! BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr() + au BufNewFile,BufRead *.ipkg,idris-response setf idris2 + au! BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr() +endif + +if !has_key(g:polyglot_is_disabled, 'idris') + au! BufNewFile,BufRead,BufWritePost *.lidr call polyglot#detect#Lidr() + au! BufNewFile,BufRead,BufWritePost *.idr call polyglot#detect#Idr() + au BufNewFile,BufRead idris-response setf idris +endif + +if !has_key(g:polyglot_is_disabled, 'icalendar') + au BufNewFile,BufRead *.ics setf icalendar +endif + +if !has_key(g:polyglot_is_disabled, 'hive') + au BufNewFile,BufRead *.hql,*.q,*.ql setf hive +endif + +if !has_key(g:polyglot_is_disabled, 'haxe') + au BufNewFile,BufRead *.hx,*.hxsl setf haxe + au BufNewFile,BufRead *.hxml setf hxml + au BufNewFile,BufRead *.hss setf hss +endif + +if !has_key(g:polyglot_is_disabled, 'haskell') + au BufNewFile,BufRead *.bpk,*.hs,*.hs-boot,*.hsc,*.hsig setf haskell +endif + +if !has_key(g:polyglot_is_disabled, 'haproxy') + au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy') + au BufNewFile,BufRead haproxy*.cfg* call s:StarSetf('haproxy') +endif + +if !has_key(g:polyglot_is_disabled, 'handlebars') + au BufNewFile,BufRead *.hjs,*.hogan,*.hulk,*.mustache setf html.mustache + au BufNewFile,BufRead *.handlebars,*.hb,*.hbs,*.hdbs setf html.handlebars +endif + +if !has_key(g:polyglot_is_disabled, 'haml') + au BufNewFile,BufRead *.haml,*.haml.deface,*.hamlbars,*.hamlc setf haml +endif + +if !has_key(g:polyglot_is_disabled, 'grub') + au BufNewFile,BufRead */boot/grub/grub.conf,*/boot/grub/menu.lst,*/etc/grub.conf setf grub +endif + +if !has_key(g:polyglot_is_disabled, 'groovy') + au BufNewFile,BufRead *.gradle,*.groovy,*.grt,*.gtpl,*.gvy,Jenkinsfile setf groovy +endif + +if !has_key(g:polyglot_is_disabled, 'graphql') + au BufNewFile,BufRead *.gql,*.graphql,*.graphqls setf graphql +endif + +if !has_key(g:polyglot_is_disabled, 'jsx') + au BufNewFile,BufRead *.jsx setf javascriptreact +endif + +if !has_key(g:polyglot_is_disabled, 'javascript') + au! BufNewFile,BufRead,BufWritePost *.frag call polyglot#detect#Frag() + au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jslib,*.jsm,*.jspre,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript + au BufNewFile,BufRead *.flow setf flow +endif + +if !has_key(g:polyglot_is_disabled, 'go') + au BufNewFile,BufRead *.go setf go + au BufNewFile,BufRead go.mod setf gomod + au BufNewFile,BufRead go.sum setf gosum + au BufNewFile,BufRead go.work setf gowork + au BufNewFile,BufRead *.tmpl setf gohtmltmpl +endif + +if !has_key(g:polyglot_is_disabled, 'hercules') + au BufNewFile,BufRead *.errsum,*.ev,*.sum,*.vc setf hercules +endif + +if !has_key(g:polyglot_is_disabled, 'gnuplot') + au BufNewFile,BufRead *.gnu,*.gnuplot,*.gp,*.gpi,*.p,*.plot,*.plt setf gnuplot +endif + +if !has_key(g:polyglot_is_disabled, 'gmpl') + au BufNewFile,BufRead *.mod setf gmpl +endif + +if !has_key(g:polyglot_is_disabled, 'glsl') + au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() + au! BufNewFile,BufRead,BufWritePost *.frag call polyglot#detect#Frag() + au BufNewFile,BufRead *.comp,*.fp,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader setf glsl +endif + +if !has_key(g:polyglot_is_disabled, 'git') + au BufNewFile,BufRead *.gitconfig,*.git/config,*.git/modules/*/config,*/.config/git/config,*/git/config,{.,}gitconfig,{.,}gitmodules setf gitconfig + au BufNewFile,BufRead */{.,}gitconfig.d/* call s:StarSetf('gitconfig') + au BufNewFile,BufRead git-rebase-todo setf gitrebase + au BufNewFile,BufRead .gitsendemail.* call s:StarSetf('gitsendemail') + au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit +endif + +if !has_key(g:polyglot_is_disabled, 'fsharp') + au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() + au BufNewFile,BufRead *.fsi,*.fsx setf fsharp +endif + +if !has_key(g:polyglot_is_disabled, 'forth') + au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() + au BufNewFile,BufRead *.ft,*.fth setf forth +endif + +if !has_key(g:polyglot_is_disabled, 'flatbuffers') + au BufNewFile,BufRead *.fbs setf fbs +endif + +if !has_key(g:polyglot_is_disabled, 'fish') + au BufNewFile,BufRead *.fish setf fish +endif + +if !has_key(g:polyglot_is_disabled, 'ferm') + au BufNewFile,BufRead *.ferm,ferm.conf setf ferm +endif + +if !has_key(g:polyglot_is_disabled, 'fennel') + au BufNewFile,BufRead *.fnl setf fennel +endif + +if !has_key(g:polyglot_is_disabled, 'erlang') + au BufNewFile,BufRead *.app,*.app.src,*.erl,*.es,*.escript,*.hrl,*.xrl,*.yaws,*.yrl,Emakefile,rebar.config,rebar.config.lock,rebar.lock setf erlang +endif + +if !has_key(g:polyglot_is_disabled, 'emblem') + au BufNewFile,BufRead *.em,*.emblem setf emblem +endif + +if !has_key(g:polyglot_is_disabled, 'emberscript') + au BufNewFile,BufRead *.em,*.emberscript setf ember-script +endif + +if !has_key(g:polyglot_is_disabled, 'elm') + au BufNewFile,BufRead *.elm setf elm +endif + +if !has_key(g:polyglot_is_disabled, 'elixir') + au BufNewFile,BufRead *.ex,*.exs,mix.lock setf elixir + au BufNewFile,BufRead *.eex,*.html.heex,*.html.leex,*.leex setf eelixir +endif + +if !has_key(g:polyglot_is_disabled, 'docker-compose') + au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml setf yaml.docker-compose +endif + +if !has_key(g:polyglot_is_disabled, 'yaml') + au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,CITATION.cff,fish_history,fish_read_history,glide.lock,yarn.lock setf yaml +endif + +if !has_key(g:polyglot_is_disabled, 'mysql') + au BufNewFile,BufRead *.mysql setf mysql +endif + +if !has_key(g:polyglot_is_disabled, 'sed') + au BufNewFile,BufRead *.sed setf sed +endif + +if !has_key(g:polyglot_is_disabled, 'dlang') + au BufNewFile,BufRead *.d,*.di setf d + 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 !has_key(g:polyglot_is_disabled, 'dhall') + au BufNewFile,BufRead *.dhall setf dhall +endif + +if !has_key(g:polyglot_is_disabled, 'dart') + au BufNewFile,BufRead *.dart,*.drt setf dart +endif + +if !has_key(g:polyglot_is_disabled, 'cue') + au BufNewFile,BufRead *.cue setf cuesheet +endif + +if !has_key(g:polyglot_is_disabled, 'cucumber') + au BufNewFile,BufRead *.feature,*.story setf cucumber +endif + +if !has_key(g:polyglot_is_disabled, 'crystal') + au BufNewFile,BufRead *.cr,Projectfile setf crystal + au BufNewFile,BufRead *.ecr setf ecrystal +endif + +if !has_key(g:polyglot_is_disabled, 'cryptol') + au BufNewFile,BufRead *.cry,*.cyl,*.lcry,*.lcyl setf cryptol +endif + +if !has_key(g:polyglot_is_disabled, 'coffee-script') + au BufNewFile,BufRead *._coffee,*.cake,*.cjsx,*.coffee,*.coffeekup,*.cson,*.iced,Cakefile setf coffee + au BufNewFile,BufRead *.coffee.md,*.litcoffee setf litcoffee +endif + +if !has_key(g:polyglot_is_disabled, 'markdown') + au BufNewFile,BufRead *.livemd,*.markdown,*.md,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.scd,*.workbook,contents.lr setf markdown +endif + +if !has_key(g:polyglot_is_disabled, 'cmake') + au BufNewFile,BufRead *.cmake,*.cmake.in,CMakeLists.txt setf cmake +endif + +if !has_key(g:polyglot_is_disabled, 'clojure') + au BufNewFile,BufRead *.bb,*.boot,*.cl2,*.clj,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.edn,*.hic,build.boot,profile.boot,riemann.config setf clojure +endif + +if !has_key(g:polyglot_is_disabled, 'carp') + au BufNewFile,BufRead *.carp setf carp +endif + +if !has_key(g:polyglot_is_disabled, 'caddyfile') + au BufNewFile,BufRead Caddyfile setf caddyfile +endif + +if !has_key(g:polyglot_is_disabled, 'awk') + au BufNewFile,BufRead *.awk,*.gawk setf awk +endif + +if !has_key(g:polyglot_is_disabled, 'ave') + au BufNewFile,BufRead *.ave setf ave +endif + +if !has_key(g:polyglot_is_disabled, 'autoit') + au BufNewFile,BufRead *.au3 setf autoit +endif + +if !has_key(g:polyglot_is_disabled, 'atlas') + au BufNewFile,BufRead *.as,*.atl setf atlas +endif + +if !has_key(g:polyglot_is_disabled, 'aspperl') + au! BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp() +endif + +if !has_key(g:polyglot_is_disabled, 'aspvbs') + au! BufNewFile,BufRead,BufWritePost *.asp call polyglot#detect#Asp() + au! BufNewFile,BufRead,BufWritePost *.asa call polyglot#detect#Asa() +endif + +if !has_key(g:polyglot_is_disabled, 'asn') + au BufNewFile,BufRead *.asn,*.asn1 setf asn +endif + +if !has_key(g:polyglot_is_disabled, 'automake') + au BufNewFile,BufRead GNUmakefile.am,[mM]akefile.am setf automake +endif + +if !has_key(g:polyglot_is_disabled, 'elf') + au BufNewFile,BufRead *.am setf elf +endif + +if !has_key(g:polyglot_is_disabled, 'make') + au BufNewFile,BufRead *.dsp,*.mak,*.mk,*[mM]akefile setf make +endif + +if !has_key(g:polyglot_is_disabled, 'autohotkey') + au BufNewFile,BufRead *.ahk,*.ahkl setf autohotkey +endif + +if !has_key(g:polyglot_is_disabled, 'asciidoc') + au BufNewFile,BufRead *.adoc,*.asc,*.asciidoc setf asciidoc +endif + +if !has_key(g:polyglot_is_disabled, 'art') + au BufNewFile,BufRead *.art setf art +endif + +if !has_key(g:polyglot_is_disabled, 'arduino') + au BufNewFile,BufRead *.ino,*.pde setf arduino +endif + +if !has_key(g:polyglot_is_disabled, 'c/c++') + au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H() + au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.moc,*.tcc,*.tlh,*.tpp setf cpp + au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H() + au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c +endif + +if !has_key(g:polyglot_is_disabled, 'arch') + au BufNewFile,BufRead {.,}arch-inventory,=tagging-method setf arch +endif + +if !has_key(g:polyglot_is_disabled, 'aptconf') + au BufNewFile,BufRead */.aptitude/config,*/etc/apt/apt.conf.d/*.conf,apt.conf setf aptconf + au BufNewFile,BufRead */etc/apt/apt.conf.d/[^.]* call s:StarSetf('aptconf') +endif + +if !has_key(g:polyglot_is_disabled, 'applescript') + au BufNewFile,BufRead *.applescript,*.scpt setf applescript +endif + +if !has_key(g:polyglot_is_disabled, 'apiblueprint') + au BufNewFile,BufRead *.apib setf apiblueprint +endif + +if !has_key(g:polyglot_is_disabled, 'apache') + au BufNewFile,BufRead */etc/apache2/sites-*/*.com,*/etc/httpd/*.conf,{.,}htaccess setf apache + au BufNewFile,BufRead srm.conf* call s:StarSetf('apache') + au BufNewFile,BufRead httpd.conf* call s:StarSetf('apache') + au BufNewFile,BufRead apache2.conf* call s:StarSetf('apache') + au BufNewFile,BufRead apache.conf* call s:StarSetf('apache') + au BufNewFile,BufRead access.conf* call s:StarSetf('apache') + au BufNewFile,BufRead */etc/httpd/conf.d/*.conf* call s:StarSetf('apache') + au BufNewFile,BufRead */etc/apache2/sites-*/* call s:StarSetf('apache') + au BufNewFile,BufRead */etc/apache2/mods-*/* call s:StarSetf('apache') + au BufNewFile,BufRead */etc/apache2/conf.*/* call s:StarSetf('apache') + au BufNewFile,BufRead */etc/apache2/*.conf* call s:StarSetf('apache') +endif + +if !has_key(g:polyglot_is_disabled, 'ant') + au BufNewFile,BufRead build.xml setf ant +endif + +if !has_key(g:polyglot_is_disabled, 'xml') + au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml +endif + +if !has_key(g:polyglot_is_disabled, 'csv') + au BufNewFile,BufRead *.csv,*.tab,*.tsv setf csv +endif + +if !has_key(g:polyglot_is_disabled, 'ampl') + " AMPL + au BufNewFile,BufRead *.run setf ampl +endif + +if !has_key(g:polyglot_is_disabled, 'aml') + au BufNewFile,BufRead *.aml setf aml +endif + +if !has_key(g:polyglot_is_disabled, 'alsaconf') + au BufNewFile,BufRead */etc/asound.conf,*/usr/share/alsa/alsa.conf,{.,}asoundrc setf alsaconf +endif + +if !has_key(g:polyglot_is_disabled, 'conf') + au BufNewFile,BufRead *.conf,*/etc/hosts,auto.master,config setf conf +endif + +if !has_key(g:polyglot_is_disabled, 'master') + au BufNewFile,BufRead *.mas,*.master setf master +endif + +if !has_key(g:polyglot_is_disabled, 'aidl') + " AIDL + au BufNewFile,BufRead *.aidl setf aidl +endif + +if !has_key(g:polyglot_is_disabled, 'ahdl') + " AHDL + au BufNewFile,BufRead *.tdf setf ahdl +endif + +if !has_key(g:polyglot_is_disabled, 'ada') + " Ada (83, 9X, 95) + au BufNewFile,BufRead *.ada,*.ada_m,*.adb,*.adc,*.ads,*.gpr setf ada +endif + +if !has_key(g:polyglot_is_disabled, 'acpiasl') + au BufNewFile,BufRead *.asl,*.dsl setf asl +endif + +if !has_key(g:polyglot_is_disabled, 'acedb') + " AceDB + au BufNewFile,BufRead *.wrm setf acedb +endif + +if !has_key(g:polyglot_is_disabled, 'abel') + " ABEL + au BufNewFile,BufRead *.abl setf abel +endif + +if !has_key(g:polyglot_is_disabled, 'abc') + " ABC music notation + au BufNewFile,BufRead *.abc setf abc +endif + +if !has_key(g:polyglot_is_disabled, 'abaqus') + au! BufNewFile,BufRead,BufWritePost *.inp call polyglot#detect#Inp() +endif + +if !has_key(g:polyglot_is_disabled, 'abap') + " ABAB/4 + au BufNewFile,BufRead *.abap setf abap +endif + +if !has_key(g:polyglot_is_disabled, 'aap') + " A-A-P recipe + au BufNewFile,BufRead *.aap setf aap +endif + +if !has_key(g:polyglot_is_disabled, 'a65') + " XA65 MOS6510 cross assembler + au BufNewFile,BufRead *.a65 setf a65 +endif + +if !has_key(g:polyglot_is_disabled, 'a2ps') + au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,{.,}a2psrc,a2psrc setf a2ps +endif + +if !has_key(g:polyglot_is_disabled, 'cfg') + au BufNewFile,BufRead *.cfg,*.hgrc,*hgrc setf cfg +endif + +if !has_key(g:polyglot_is_disabled, '8th') + " 8th (Firth-derivative) + au BufNewFile,BufRead *.8th setf 8th +endif + + +" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE + +let s:detect_func = 'shebang#Detect' + +func! s:PolyglotObserve(fn) + call function("polyglot#" . a:fn) +endfunc + +func! s:Observe() + augroup polyglot-observer + au! + au CursorHold,CursorHoldI if (&ft == "" || &ft == "conf") | call s:PolyglotObserve(s:detect_func) | endif + augroup END +endfunc + +au BufNewFile,BufRead,StdinReadPost,BufWritePost * if (&ft == "" || &ft == "conf") && expand(":e") == "" | + \ call polyglot#shebang#Detect() | endif + +au BufWinEnter * if &ft == "" && expand(":e") == "" | + \ call s:Observe() | endif + +au BufWritePost * au! polyglot-observer + +augroup END + +endif + +if !has_key(g:polyglot_is_disabled, 'sensible') + " Use 2-spaces tab indentation by default + if &tabstop == 8 + let &tabstop = 2 + endif + + " Set shiftwidth to proper value as users often mix it with tabstop + if &shiftwidth > &tabstop + let &shiftwidth = &tabstop + endif + + " Use utf-8 encoding by default + set encoding=utf-8 + + " Reload unchanged files automatically. + set autoread + + " This is needed to avoid swapfile warning when auto-reloading + set shortmess+=A + + " Avoids swapfiles in current directory + if &directory =~# '^\.,' + if !empty($HOME) + if has('win32') + let &directory = expand('$HOME/vimfiles') . '//,' . &directory + else + let &directory = expand('$HOME/.vim') . '//,' . &directory + endif + endif + if !empty($XDG_DATA_HOME) + let &directory = expand('$XDG_DATA_HOME') . '//,' . &directory + endif + if has('macunix') + let &directory = expand('$HOME/Library/Autosave Information') . '//,' . &directory + endif + endif + + " Autoindent when starting new line, or using `o` or `O`. + set autoindent +endif + +if !has_key(g:polyglot_is_disabled, 'autoindent') + " Code below re-implements sleuth for vim-polyglot + let g:loaded_sleuth = 1 + + let s:default_shiftwidth = &shiftwidth + + func! s:get_shiftwidth(indents) abort + let shiftwidth = 0 + let max_count = 0 + let final_counts = {} + for [indent, indent_count] in items(a:indents) + let indent_count = indent_count * 1.5 + for [indent2, indent2_count] in items(a:indents) + if indent2 > indent && indent2 % indent == 0 + let indent_count = indent_count + indent2_count + endif + endfor + let final_counts[indent] = indent_count + endfor + for [indent, final_count] in items(final_counts) + if final_count > max_count + let shiftwidth = indent + let max_count = final_count + endif + endfor + return shiftwidth + endfunc + + func! s:guess(lines) abort + let options = {} + let ccomment = 0 + let podcomment = 0 + let triplequote = 0 + let backtick = 0 + let xmlcomment = 0 + let heredoc = '' + let minindent = 10 + let spaces_minus_tabs = 0 + let lineno = 0 + let stack = [0] + let indents = { '2': 0, '3': 0, '4': 0, '6': 0, '8': 0 } + + for line in a:lines + let lineno += 1 + + if line =~# '^\s*$' + continue + endif + + if line =~# '^\s*/\*' + let ccomment = 1 + endif + if ccomment + if line =~# '\*/' + let ccomment = 0 + endif + continue + endif + + if line =~# '^=\w' + let podcomment = 1 + endif + if podcomment + if line =~# '^=\%(end\|cut\)\>' + let podcomment = 0 + endif + continue + endif + + if triplequote + if line =~# '^[^"]*"""[^"]*$' + let triplequote = 0 + endif + continue + elseif line =~# '^[^"]*"""[^"]*$' + let triplequote = 1 + endif + + if backtick + if line =~# '^[^`]*`[^`]*$' + let backtick = 0 + endif + continue + elseif &filetype ==# 'go' && line =~# '^[^`]*`[^`]*$' + let backtick = 1 + endif + + if line =~# '^\s*<\!--' + let xmlcomment = 1 + endif + if xmlcomment + if line =~# '-->' + let xmlcomment = 0 + endif + continue + endif + + " This is correct order because both "< 0 + let heredoc = herematch[1] . '$' + endif + + if line[0] == "\t" + let spaces_minus_tabs -= 1 + else + if line[0] == " " + let spaces_minus_tabs += 1 + endif + let indent = len(matchstr(line, '^ *')) + while stack[-1] > indent + call remove(stack, -1) + endwhile + + let indent_inc = indent - stack[-1] + + if indent_inc == 0 && len(stack) > 1 + let indent_inc = indent - stack[-2] + endif + + if has_key(indents, indent_inc) + let indents[indent_inc] += 1 + let prev_indent = indent + endif + + if stack[-1] != indent + call add(stack, indent) + endif + endif + endfor + + if spaces_minus_tabs < 0 + setlocal noexpandtab + let &l:shiftwidth=&tabstop + return 1 + endif + + let shiftwidth = s:get_shiftwidth(indents) + + if shiftwidth > 0 + setlocal expandtab + let &l:shiftwidth=shiftwidth + try + " Sunchronize tabstop with shiftwidth + let &l:softtabstop = -1 + catch /^Vim\%((\a\+)\)\=:E487/ + " -1 was not supported before Vim 7.4 + let &l:softtabstop = a:num_spaces + endtry + return 1 + endif + + return 0 + endfunc + + func! s:detect_indent() abort + if &buftype ==# 'help' + return + endif + + " Do not autodetect indent if language or user sets it + if &l:shiftwidth != s:default_shiftwidth + return + endif + + let b:sleuth_culprit = expand(":p") + if s:guess(getline(1, 128)) + return + endif + if s:guess(getline(1, 1024)) + return + endif + let pattern = polyglot#sleuth#GlobForFiletype(&filetype) + if len(pattern) == 0 + return + endif + let pattern = '{' . pattern . ',.git,.svn,.hg}' + let dir = expand('%:p:h') + let level = 3 + while isdirectory(dir) && dir !=# fnamemodify(dir, ':h') && level > 0 + " Ignore files from homedir and root + if dir == expand('~') || dir == '/' + unlet b:sleuth_culprit + return + endif + for neighbor in glob(dir . '/' . pattern, 0, 1)[0:level] + let b:sleuth_culprit = neighbor + " Do not consider directories above .git, .svn or .hg + if fnamemodify(neighbor, ":h:t")[0] == "." + let level = 0 + continue + endif + if neighbor !=# expand('%:p') && filereadable(neighbor) + if s:guess(readfile(neighbor, '', 32)) + return + endif + endif + endfor + + let dir = fnamemodify(dir, ':h') + let level -= 1 + endwhile + + let b:sleuth_culprit = "default" + endfunc + + set smarttab + + func! SleuthIndicator() abort + let sw = &shiftwidth ? &shiftwidth : &tabstop + if &expandtab + return 'sw='.sw + elseif &tabstop == sw + return 'ts='.&tabstop + else + return 'sw='.sw.',ts='.&tabstop + endif + endfunc + + augroup polyglot-sleuth + au! + au BufEnter * call s:detect_indent() + au User Flags call Hoist('buffer', 5, 'SleuthIndicator') + augroup END + + command! -bar -bang Sleuth call s:detect_indent() +endif + +augroup filetypedetect + +" Ignored extensions +if exists("*fnameescape") +au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) +au BufNewFile,BufRead *~ + \ let s:name = expand("") | + \ let s:short = substitute(s:name, '\~$', '', '') | + \ if s:name != s:short && s:short != "" | + \ exe "doau filetypedetect BufRead " . fnameescape(s:short) | + \ endif | + \ unlet! s:name s:short +au BufNewFile,BufRead ?\+.in + \ if expand(":t") != "configure.in" | + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) | + \ endif +elseif &verbose > 0 + echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()" +endif + +" Pattern used to match file names which should not be inspected. +" Currently finds compressed files. +if !exists("g:ft_ignore_pat") + let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' +endif + +" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. +au BufNewFile,BufRead *.cmd + \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif + +" Batch file for 4DOS +au BufNewFile,BufRead *.btm call polyglot#ft#FTbtm() + +" BIND zone +au BufNewFile,BufRead *.db call polyglot#ft#BindzoneCheck('') + +" C or lpc +au BufNewFile,BufRead *.c call polyglot#ft#FTlpc() + +" Cynlib +" .cc and .cpp files can be C++ or Cynlib. +au BufNewFile,BufRead *.cpp if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif + +au BufNewFile,BufRead *.h call polyglot#ft#FTheader() + +au BufNewFile,BufRead [cC]hange[lL]og + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| else + \| setf changelog + \| endif + +au BufNewFile,BufRead NEWS + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| endif + +" Changes for WEB and CWEB or CHILL +au BufNewFile,BufRead *.ch call polyglot#ft#FTchange() + +" Clever or dtd +au BufNewFile,BufRead *.ent call polyglot#ft#FTent() + +" Clipper (or FoxPro; could also be eviews) +au BufNewFile,BufRead *.prg + \ if exists("g:filetype_prg") | + \ exe "setf " . g:filetype_prg | + \ else | + \ setf clipper | + \ endif + +au BufNewFile,BufRead *.cpy + \ if getline(1) =~ '^##' | + \ setf python | + \ else | + \ setf cobol | + \ endif + +" Euphoria 3 or 4 +au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call polyglot#ft#EuphoriaCheck() +if has("fname_case") + au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call polyglot#ft#EuphoriaCheck() +endif + +au BufNewFile,BufRead control + \ if getline(1) =~ '^Source:' + \| setf debcontrol + \| endif + +au BufNewFile,BufRead copyright + \ if getline(1) =~ '^Format:' + \| setf debcopyright + \| endif + +" the D language or dtrace +au BufNewFile,BufRead *.d call polyglot#ft#DtraceCheck() + +au BufNewFile,BufRead *.patch + \ if getline(1) =~ '^From [0-9a-f]\{40\} Mon Sep 17 00:00:00 2001$' | + \ setf gitsendemail | + \ else | + \ setf diff | + \ endif + +" Diva (with Skill) or InstallShield +au BufNewFile,BufRead *.rul + \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' | + \ setf ishd | + \ else | + \ setf diva | + \ endif + +" DCL (Digital Command Language - vms) or DNS zone file +au BufNewFile,BufRead *.com call polyglot#ft#BindzoneCheck('dcl') + +au BufNewFile,BufRead *.edn + \ if getline(1) =~ '^\s*(\s*edif\>' | + \ setf edif | + \ else | + \ setf clojure | + \ endif + +" Eiffel or Specman or Euphoria +au BufNewFile,BufRead *.e,*.E call polyglot#ft#FTe() + +if !empty($XDG_CONFIG_HOME) + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig +endif + +au BufNewFile,BufRead .msg.[0-9]* + \ if getline(1) =~ '^From.*# This line is ignored.$' | + \ setf gitsendemail | + \ endif +au BufNewFile,BufRead *.git/* + \ if getline(1) =~ '^\x\{40\}\>\|^ref: ' | + \ setf git | + \ endif + +if !empty($GNUPGHOME) + au BufNewFile,BufRead $GNUPGHOME/options setf gpg + au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg +endif + +" HTML (.shtml and .stm for server side) +au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call polyglot#ft#FThtml() + +" IDL (Interface Description Language) +au BufNewFile,BufRead *.idl call polyglot#ft#FTidl() + +au BufNewFile,BufRead indent.pro call polyglot#ft#ProtoCheck('indent') + +" IDL (Interactive Data Language) +au BufNewFile,BufRead *.pro call polyglot#ft#ProtoCheck('idlang') + +" M4 +au BufNewFile,BufRead *.m4 + \ if expand("") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif + +" Mathematica, Matlab, Murphi or Objective C +au BufNewFile,BufRead *.m call polyglot#ft#FTm() + +" MMIX or VMS makefile +au BufNewFile,BufRead *.mms call polyglot#ft#FTmms() + +" Modsim III (or LambdaProlog) +au BufNewFile,BufRead *.mod + \ if getline(1) =~ '\' | + \ setf lprolog | + \ else | + \ setf modsim3 | + \ endif + +" Mutt setup files (must be before catch *.rc) +au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') + +" Nroff/Troff (*.ms and *.t are checked below) +au BufNewFile,BufRead *.me + \ if expand("") != "read.me" && expand("") != "click.me" | + \ setf nroff | + \ endif +au BufNewFile,BufRead *.[1-9] call polyglot#ft#FTnroff() + +" Nroff or Objective C++ +au BufNewFile,BufRead *.mm call polyglot#ft#FTmm() + +" Pacman hooks +au BufNewFile,BufRead *.hook + \ if getline(1) == '[Trigger]' | + \ setf dosini | + \ endif + +" Perl +au BufNewFile,BufRead *.pl call polyglot#ft#FTpl() + +" Perl, XPM or XPM2 +au BufNewFile,BufRead *.pm + \ if getline(1) =~ "XPM2" | + \ setf xpm2 | + \ elseif getline(1) =~ "XPM" | + \ setf xpm | + \ else | + \ setf perl | + \ endif + +" Povray, PHP or assembly +au BufNewFile,BufRead *.inc call polyglot#ft#FTinc() + +" Printcap and Termcap +au BufNewFile,BufRead *printcap + \ let b:ptcap_type = "print" | setf ptcap +au BufNewFile,BufRead *termcap + \ let b:ptcap_type = "term" | setf ptcap + +" Progress or CWEB +au BufNewFile,BufRead *.w call polyglot#ft#FTprogress_cweb() + +" Progress or assembly +au BufNewFile,BufRead *.i call polyglot#ft#FTprogress_asm() + +" Progress or Pascal +au BufNewFile,BufRead *.p call polyglot#ft#FTprogress_pascal() + +" Software Distributor Product Specification File (POSIX 1387.2-1995) +au BufNewFile,BufRead INDEX,INFO + \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | + \ setf psf | + \ endif + +" Registry for MS-Windows +au BufNewFile,BufRead *.reg + \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif + +" Rexx, Rebol or R +au BufNewFile,BufRead *.r,*.R call polyglot#ft#FTr() + +" Sendmail .mc files are actually m4. Could also be MS Message text file. +au BufNewFile,BufRead *.mc call polyglot#ft#McSetf() + +" SGML +au BufNewFile,BufRead *.sgm,*.sgml + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' | + \ setf sgmllnx | + \ elseif getline(1) =~ '' | + \ setf xml | + \ else | + \ setf smil | + \ endif + +" SMIL or SNMP MIB file +au BufNewFile,BufRead *.smi + \ if getline(1) =~ '\' | + \ setf smil | + \ else | + \ setf mib | + \ endif + +au BufNewFile,BufRead *.rules call polyglot#ft#FTRules() + +" SQL +au BufNewFile,BufRead *.sql call polyglot#ft#SQL() + +" Also *.class, but not when it's a Java bytecode file +au BufNewFile,BufRead *.class + \ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif + +au BufNewFile,BufRead *.tex call polyglot#ft#FTtex() + +" Virata Config Script File or Drupal module +au BufRead,BufNewFile *.hw,*.module,*.pkg + \ if getline(1) =~ '' | + \ let b:xf86conf_xfree86_version = 3 | + \ endif | + \ setf xf86conf +au BufNewFile,BufRead */xorg.conf.d/*.conf + \ let b:xf86conf_xfree86_version = 4 | + \ setf xf86conf + +" Xorg config +au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf + +au BufNewFile,BufRead *.ms + \ if !polyglot#ft#FTnroff() | setf xmath | endif + +" XML specific variants: docbk and xbl +au BufNewFile,BufRead *.xml call polyglot#ft#FTxml() + +" Yacc or racc +au BufNewFile,BufRead *.y call polyglot#ft#FTy() + +" Zope +" dtml (zope dynamic template markup language), pt (zope page template), +" cpt (zope form controller page template) +au BufNewFile,BufRead *.dtml,*.pt,*.cpt call polyglot#ft#FThtml() +" zsql (zope sql method) +au BufNewFile,BufRead *.zsql call polyglot#ft#SQL() + +augroup END + + +" Source the user-specified filetype file, for backwards compatibility with +" Vim 5.x. +if exists("myfiletypefile") && filereadable(expand(myfiletypefile)) + execute "source " . myfiletypefile +endif + + +" Check for "*" after loading myfiletypefile, so that scripts.vim is only used +" when there are no matching file name extensions. +" Don't do this for compressed files. +augroup filetypedetect +au BufNewFile,BufRead * + \ if !did_filetype() && expand("") !~ g:ft_ignore_pat + \ | runtime! scripts.vim | endif +au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif + + +" Extra checks for when no filetype has been detected now. Mostly used for +" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim +" script file. +" Most of these should call s:StarSetf() to avoid names ending in .gz and the +" like are used. + +" More Apache style config files +au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle') +au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') + +" More Apache config files +au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') +au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') + +" Asterisk config file +au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') +au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') + +" BIND zone +au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') + +" Calendar +au BufNewFile,BufRead */.calendar/*, + \*/share/calendar/*/calendar.*,*/share/calendar/calendar.* + \ call s:StarSetf('calendar') + +" Changelog +au BufNewFile,BufRead [cC]hange[lL]og* + \ if getline(1) =~ '; urgency=' + \| call s:StarSetf('debchangelog') + \|else + \| call s:StarSetf('changelog') + \|endif + +" Crontab +au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab') + +" dnsmasq(8) configuration +au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') + +" Dracula +au BufNewFile,BufRead drac.* call s:StarSetf('dracula') + +" Fvwm +au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook + \ let b:fvwm_version = 1 | call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwm2rc* + \ if expand(":e") == "m4" + \| call s:StarSetf('fvwm2m4') + \|else + \| let b:fvwm_version = 2 | call s:StarSetf('fvwm') + \|endif + +" Gedcom +au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') + +" Git +au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig') + +" Gitolite +au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') + +" GTK RC +au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc') + +" Jam +au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam') + +" Jargon +au! BufNewFile,BufRead *jarg* + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE' + \| call s:StarSetf('jargon') + \|endif + +" Java Properties resource file (note: doesn't catch font.properties.pl) +au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') + +" Kconfig +au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') + +" Lilo: Linux loader +au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') + +" Logcheck +au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') + +" Makefile +au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make') + +" Ruby Makefile +au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby') + +" Mail (also matches muttrc.vim, so this is below the other checks) +au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\} setf mail + +au BufNewFile,BufRead reportbug-* call s:StarSetf('mail') + +" Modconf +au BufNewFile,BufRead */etc/modutils/* + \ if executable(expand("")) != 1 + \| call s:StarSetf('modconf') + \|endif +au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') + +" Mutt setup file +au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') +au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc') + +" Neomutt setup file +au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc* call s:StarSetf('neomuttrc') +au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc') + +" Nroff macros +au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') + +" OpenBSD hostname.if +au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config') + +" Pam conf +au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') + +" Printcap and Termcap +au BufNewFile,BufRead *printcap* + \ if !did_filetype() + \| let b:ptcap_type = "print" | call s:StarSetf('ptcap') + \|endif +au BufNewFile,BufRead *termcap* + \ if !did_filetype() + \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') + \|endif + +" ReDIF +" Only used when the .rdf file was not detected to be XML. +au BufRead,BufNewFile *.rdf call polyglot#ft#Redif() + +" Remind +au BufNewFile,BufRead .reminders* call s:StarSetf('remind') + +" SGML catalog file +au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') + +" Shell scripts ending in a star +au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD* call polyglot#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh") +au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1)) + +" tcsh scripts ending in a star +au BufNewFile,BufRead .tcshrc* call polyglot#ft#SetFileTypeShell("tcsh") + +" csh scripts ending in a star +au BufNewFile,BufRead .login*,.cshrc* call polyglot#ft#CSH() + +" VHDL +au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') + +" Vim script +au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') + +" Subversion commit file +au BufNewFile,BufRead svn-commit*.tmp setf svn + +" X resources file +au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults') + +" XFree86 config +au BufNewFile,BufRead XF86Config-4* + \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf') +au BufNewFile,BufRead XF86Config* + \ if getline(1) =~ '\' + \| let b:xf86conf_xfree86_version = 3 + \|endif + \|call s:StarSetf('xf86conf') + +" X11 xmodmap +au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') + +" Xinetd conf +au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') + +" yum conf (close enough to dosini) +au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') + +" Z-Shell script ending in a star +au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') +au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') + + +" Help files match *.txt but should have a last line that is a modeline. +au BufNewFile,BufRead *.txt + \ if getline('$') !~ 'vim:.*ft=help' + \| setf text + \| endif + + +" NOTE: The above command could have ended the filetypedetect autocmd group +" and started another one. Let's make sure it has ended to get to a consistent +" state. +augroup END + +" Use the filetype detect plugins. They may overrule any of the previously +" detected filetypes. No need to load if everything is enabled +if exists("did_load_filetypes") && exists("g:polyglot_disabled") + unlet did_load_filetypes + runtime! extras/filetype.vim +endif + +let s:runtime = resolve($VIMRUNTIME) +let s:base = resolve(expand(':p:h:h:h')) + +func! s:process_rtp(rtp) + " Remove vim-polyglot from paths and make everything absolute + let rtp = [] + for path in a:rtp[1:-2] + let abspath = resolve(path) + if stridx(abspath, s:base) != 0 + call add(rtp, abspath) + endif + endfor + let result = [a:rtp[0]] + " Then all other stuff (until vimruntime) + let i = 0 + for path in rtp[0:len(rtp)-1] + if path == s:runtime + break + endif + call add(result, path) + let i = i + 1 + endfor + " Then vim-polyglot + call add(result, s:base) + " Then all other files, until after-files + while i < len(rtp) + let path = rtp[i] + if match(path, '[/\\]after$') > -1 + break + endif + call add(result, path) + let i = i + 1 + endwhile + " Then vim-polyglot after path + call add(result, s:base . '/after') + " Then all other after paths + while i < len(rtp) + let path = rtp[i] + call add(result, path) + let i = i + 1 + endwhile + " User's after directory is always last + call add(result, a:rtp[len(a:rtp)-1]) + return result +endfunc + +" We want vim-polyglot files to load only as fallback +let &rtp = join(s:process_rtp(split(&rtp, ',')), ',') + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/polyglot/shebang.vim b/autoload/polyglot/shebang.vim new file mode 100644 index 000000000..31b975681 --- /dev/null +++ b/autoload/polyglot/shebang.vim @@ -0,0 +1,539 @@ +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +func! polyglot#shebang#Detect() + let ft = s:Filetype() + if ft != "" + let &ft = ft + return 1 + endif + + let err = polyglot#shebang#VimDetect() + if err == "" + return 1 + endif + + return 0 +endfunc + +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! s:Filetype() + 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:pathparts = split(l:path, "/") + + if len(l:pathparts) == 0 + return + endif + + let l:script = l:pathparts[-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#shebang#VimDetect() + let line1 = getline(1) + + if line1 =~# "^#!" + " A script that starts with "#!". + + " Check for a line like "#!/usr/bin/env {options} bash". Turn it into + " "#!/usr/bin/bash" to make matching easier. + " Recognize only a few {options} that are commonly used. + if line1 =~# '^#!\s*\S*\' + let name = substitute(line1, '^#!.*\\s\+\(\i\+\).*', '\1', '') + elseif line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)' + let name = substitute(line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '') + else + let name = substitute(line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') + endif + + " tcl scripts may have #!/bin/sh in the first line and "exec wish" in the + " third line. Suggested by Steven Atkinson. + if getline(3) =~# '^exec wish' + let name = 'wish' + endif + + " Bourne-like shell script bash bash2 ksh ksh93 sh + if name =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>' + call dist#ft#SetFileTypeSH(line1) " defined in filetype.vim + return + + " csh scripts + elseif name =~# '^csh\>' + if exists("g:filetype_csh") + call dist#ft#SetFileTypeShell(g:filetype_csh) + return + else + call dist#ft#SetFileTypeShell("csh") + return + endif + + " tcsh scripts + elseif name =~# '^tcsh\>' + call dist#ft#SetFileTypeShell("tcsh") + return + + " Z shell scripts + elseif name =~# '^zsh\>' + set ft=zsh | return + + " TCL scripts + elseif name =~# '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>' + set ft=tcl | return + + " Expect scripts + elseif name =~# '^expect\>' + set ft=expect | return + + " Gnuplot scripts + elseif name =~# '^gnuplot\>' + set ft=gnuplot | return + + " Makefiles + elseif name =~# 'make\>' + set ft=make | return + + " Pike + elseif name =~# '^pike\%(\>\|[0-9]\)' + set ft=pike | return + + " Lua + elseif name =~# 'lua' + set ft=lua | return + + " Perl 6 + elseif name =~# 'perl6' + set ft=perl6 | return + + " Perl + elseif name =~# 'perl' + set ft=perl | return + + " PHP + elseif name =~# 'php' + set ft=php | return + + " Python + elseif name =~# 'python' + set ft=python | return + + " Groovy + elseif name =~# '^groovy\>' + set ft=groovy | return + + " Ruby + elseif name =~# 'ruby' + set ft=ruby | return + + " JavaScript + elseif name =~# 'node\(js\)\=\>\|js\>' || name =~# 'rhino\>' + set ft=javascript | return + + " BC calculator + elseif name =~# '^bc\>' + set ft=bc | return + + " sed + elseif name =~# 'sed\>' + set ft=sed | return + + " OCaml-scripts + elseif name =~# 'ocaml' + set ft=ocaml | return + + " Awk scripts; also finds "gawk" + elseif name =~# 'awk\>' + set ft=awk | return + + " Website MetaLanguage + elseif name =~# 'wml' + set ft=wml | return + + " Scheme scripts + elseif name =~# 'scheme' + set ft=scheme | return + + " CFEngine scripts + elseif name =~# 'cfengine' + set ft=cfengine | return + + " Erlang scripts + elseif name =~# 'escript' + set ft=erlang | return + + " Haskell + elseif name =~# 'haskell' + set ft=haskell | return + + " Scala + elseif name =~# 'scala\>' + set ft=scala | return + + " Clojure + elseif name =~# 'clojure' + set ft=clojure | return + + endif + unlet name + + else + " File does not start with "#!". + + let line2 = getline(2) + let line3 = getline(3) + let line4 = getline(4) + let line5 = getline(5) + + " Bourne-like shell script sh ksh bash bash2 + if line1 =~# '^:$' + call dist#ft#SetFileTypeSH(line1) " defined in filetype.vim + return + + " Z shell scripts + elseif line1 =~# '^#compdef\>' || line1 =~# '^#autoload\>' || + \ "\n".line1."\n".line2."\n".line3."\n".line4."\n".line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>' + set ft=zsh | return + + " ELM Mail files + elseif line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' + set ft=mail | return + + " Mason + elseif line1 =~# '^<[%&].*>' + set ft=mason | return + + " Vim scripts (must have '" vim' as the first line to trigger this) + elseif line1 =~# '^" *[vV]im$' + set ft=vim | return + + " libcxx and libstdc++ standard library headers like "iostream" do not have + " an extension, recognize the Emacs file mode. + elseif line1 =~? '-\*-.*C++.*-\*-' + set ft=cpp | return + + " MOO + elseif line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$' + set ft=moo | return + + " Diff file: + " - "diff" in first line (context diff) + " - "Only in " in first line + " - "--- " in first line and "+++ " in second line (unified diff). + " - "*** " in first line and "--- " in second line (context diff). + " - "# It was generated by makepatch " in the second line (makepatch diff). + " - "Index: " in the first line (CVS file) + " - "=== ", line of "=", "---", "+++ " (SVK diff) + " - "=== ", "--- ", "+++ " (bzr diff, common case) + " - "=== (removed|added|renamed|modified)" (bzr diff, alternative) + " - "# HG changeset patch" in first line (Mercurial export format) + elseif line1 =~# '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)' + \ || (line1 =~# '^--- ' && line2 =~# '^+++ ') + \ || (line1 =~# '^\* looking for ' && line2 =~# '^\* comparing to ') + \ || (line1 =~# '^\*\*\* ' && line2 =~# '^--- ') + \ || (line1 =~# '^=== ' && ((line2 =~# '^=\{66\}' && line3 =~# '^--- ' && line4 =~# '^+++') || (line2 =~# '^--- ' && line3 =~# '^+++ '))) + \ || (line1 =~# '^=== \(removed\|added\|renamed\|modified\)') + set ft=diff | return + + " PostScript Files (must have %!PS as the first line, like a2ps output) + elseif line1 =~# '^%![ \t]*PS' + set ft=postscr | return + + " M4 script Guess there is a line that starts with "dnl". + elseif line1 =~# '^\s*dnl\>' + \ || line2 =~# '^\s*dnl\>' + \ || line3 =~# '^\s*dnl\>' + \ || line4 =~# '^\s*dnl\>' + \ || line5 =~# '^\s*dnl\>' + set ft=m4 | return + + " AmigaDos scripts + elseif $TERM == "amiga" + \ && (line1 =~# "^;" || line1 =~? '^\.bra') + set ft=amiga | return + + " SiCAD scripts (must have procn or procd as the first line to trigger this) + elseif line1 =~? '^ *proc[nd] *$' + set ft=sicad | return + + " Purify log files start with "**** Purify" + elseif line1 =~# '^\*\*\*\* Purify' + set ft=purifylog | return + + " XML + elseif line1 =~# '' + set ft=xml | return + + " XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") + elseif line1 =~# '\' + set ft=html | return + + " PDF + elseif line1 =~# '^%PDF-' + set ft=pdf | return + + " XXD output + elseif line1 =~# '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} ' + set ft=xxd | return + + " RCS/CVS log output + elseif line1 =~# '^RCS file:' || line2 =~# '^RCS file:' + set ft=rcslog | return + + " CVS commit + elseif line2 =~# '^CV' || getline("$") =~# '^CV ' + set ft=cvs | return + + " Prescribe + elseif line1 =~# '^!R!' + set ft=prescribe | return + + " Send-pr + elseif line1 =~# '^SEND-PR:' + set ft=sendpr | return + + " SNNS files + elseif line1 =~# '^SNNS network definition file' + set ft=snnsnet | return + elseif line1 =~# '^SNNS pattern definition file' + set ft=snnspat | return + elseif line1 =~# '^SNNS result file' + set ft=snnsres | return + + " Virata + elseif line1 =~# '^%.\{-}[Vv]irata' + \ || line2 =~# '^%.\{-}[Vv]irata' + \ || line3 =~# '^%.\{-}[Vv]irata' + \ || line4 =~# '^%.\{-}[Vv]irata' + \ || line5 =~# '^%.\{-}[Vv]irata' + set ft=virata | return + + " Strace + elseif line1 =~# '[0-9:.]* *execve(' || line1 =~# '^__libc_start_main' + set ft=strace | return + + " VSE JCL + elseif line1 =~# '^\* $$ JOB\>' || line1 =~# '^// *JOB\>' + set ft=vsejcl | return + + " TAK and SINDA + elseif line4 =~# 'K & K Associates' || line2 =~# 'TAK 2000' + set ft=takout | return + elseif line3 =~# 'S Y S T E M S I M P R O V E D ' + set ft=sindaout | return + elseif getline(6) =~# 'Run Date: ' + set ft=takcmp | return + elseif getline(9) =~# 'Node File 1' + set ft=sindacmp | return + + " DNS zone files + elseif line1.line2.line3.line4 =~# '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' + set ft=bindzone | return + + " BAAN + elseif line1 =~# '|\*\{1,80}' && line2 =~# 'VRC ' + \ || line2 =~# '|\*\{1,80}' && line3 =~# 'VRC ' + set ft=baan | return + + " Valgrind + elseif line1 =~# '^==\d\+== valgrind' || line3 =~# '^==\d\+== Using valgrind' + set ft=valgrind | return + + " Go docs + elseif line1 =~# '^PACKAGE DOCUMENTATION$' + set ft=godoc | return + + " Renderman Interface Bytestream + elseif line1 =~# '^##RenderMan' + set ft=rib | return + + " Scheme scripts + elseif line1 =~# 'exec\s\+\S*scheme' || line2 =~# 'exec\s\+\S*scheme' + set ft=scheme | return + + " Git output + elseif line1 =~# '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' + set ft=git | return + + " Gprof (gnu profiler) + elseif line1 == 'Flat profile:' + \ && line2 == '' + \ && line3 =~# '^Each sample counts as .* seconds.$' + set ft=gprof | return + + " Erlang terms + " (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes) + elseif line1 =~? '-\*-.*erlang.*-\*-' + set ft=erlang | return + + " YAML + elseif line1 =~# '^%YAML' + set ft=yaml | return + + " CVS diff + else + let lnum = 1 + while getline(lnum) =~# "^? " && lnum < line("$") + let lnum += 1 + endwhile + if getline(lnum) =~# '^Index:\s\+\f\+$' + set ft=diff | return + + " locale input file Formal Definitions of Cultural Conventions + " filename must be like en_US, fr_FR@euro or en_US.UTF-8 + elseif expand("%") =~# '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_' + let lnum = 1 + while lnum < 100 && lnum < line("$") + if getline(lnum) =~# '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$' + setf fdcc | return + break + endif + let lnum += 1 + endwhile + endif + unlet lnum + + endif + + endif + + if line1 =~ '^# ' || getline(2) =~ '^# ' || getline(3) =~ '^# ' || getline(4) =~ '^# ' || getline(5) =~ '^# ' + setf FALLBACK conf + return 1 + endif + + return 1 +endfunc + +" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE + +let s:interpreters = { + \ 'osascript': 'applescript', + \ 'tcc': 'c', + \ 'bb': 'clojure', + \ 'coffee': 'coffee', + \ 'crystal': 'crystal', + \ 'dart': 'dart', + \ 'elixir': 'elixir', + \ 'escript': 'erlang', + \ 'fish': 'fish', + \ 'gnuplot': 'gnuplot', + \ 'groovy': 'groovy', + \ 'runghc': 'haskell', + \ 'runhaskell': 'haskell', + \ 'runhugs': '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', + \ 'swipl': 'prolog', + \ 'yap': 'prolog', + \ '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', + \ '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', + \ 'zsh': 'zsh', + \ } +" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim new file mode 100644 index 000000000..5eb946e13 --- /dev/null +++ b/autoload/polyglot/sleuth.vim @@ -0,0 +1,647 @@ +" Restore 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE + +let s:globs = { + \ '8th': '*.8th', + \ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*', + \ 'a2ps': 'a2psrc,.a2psrc', + \ 'a65': '*.a65', + \ 'aap': '*.aap', + \ 'abap': '*.abap', + \ 'abaqus': '*.inp', + \ 'abc': '*.abc', + \ 'abel': '*.abl', + \ 'acedb': '*.wrm', + \ 'ada': '*.adb,*.ads,*.ada,*.adc,*.gpr,*.ada_m', + \ 'ahdl': '*.tdf', + \ 'aidl': '*.aidl', + \ 'alsaconf': '.asoundrc', + \ 'aml': '*.aml', + \ 'ampl': '*.run', + \ 'ant': 'build.xml', + \ 'apache': '.htaccess,access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*', + \ 'apachestyle': 'proftpd.conf*', + \ 'apiblueprint': '*.apib', + \ 'applescript': '*.applescript,*.scpt', + \ 'aptconf': 'apt.conf', + \ 'arch': '.arch-inventory,=tagging-method', + \ 'arduino': '*.pde,*.ino', + \ 'art': '*.art', + \ 'asciidoc': '*.asciidoc,*.adoc,*.asc', + \ 'asl': '*.asl,*.dsl', + \ 'asn': '*.asn,*.asn1', + \ 'aspperl': '*.asp', + \ 'aspvbs': '*.asa,*.asp', + \ 'asterisk': '', + \ 'asteriskvm': '', + \ 'atlas': '*.atl,*.as', + \ 'autohotkey': '*.ahk,*.ahkl', + \ 'autoit': '*.au3', + \ 'automake': '[mM]akefile.am,GNUmakefile.am', + \ 'ave': '*.ave', + \ 'awk': '*.awk,*.gawk', + \ 'b': '*.mch,*.ref,*.imp', + \ 'basic': '*.basic', + \ 'bc': '*.bc', + \ 'bdf': '*.bdf', + \ 'bib': '*.bib', + \ 'bicep': '*.bicep', + \ 'bindzone': 'named.root', + \ 'blade': '*.blade,*.blade.php', + \ 'blank': '*.bl', + \ 'brewfile': 'Brewfile', + \ 'bsdl': '*.bsdl,*bsd', + \ 'bst': '*.bst', + \ 'bzl': '*.bzl,*.star,*.bazel,*.BUILD,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE', + \ 'bzr': 'bzr_log.*', + \ 'c': '*.c,*.cats,*.h,*.idc,*.qc', + \ 'cabal': '*.cabal', + \ 'caddyfile': 'Caddyfile', + \ 'calendar': 'calendar', + \ 'carp': '*.carp', + \ 'catalog': 'catalog,sgml.catalog*', + \ 'cdl': '*.cdl', + \ 'cdrdaoconf': '.cdrdao', + \ 'cdrtoc': '*.toc', + \ 'cf': '*.cfm,*.cfi,*.cfc', + \ 'cfg': '*.cfg,*.hgrc,*hgrc', + \ 'ch': '*.chf', + \ 'chaiscript': '*.chai', + \ 'chaskell': '*.chs', + \ 'chill': '*..ch', + \ 'chordpro': '*.chopro,*.crd,*.cho,*.crdpro,*.chordpro', + \ 'cl': '*.eni', + \ 'clean': '*.dcl,*.icl', + \ 'clojure': '*.clj,*.bb,*.boot,*.cl2,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.hic,*.edn,riemann.config,build.boot,profile.boot', + \ 'cmake': '*.cmake,*.cmake.in,CMakeLists.txt', + \ 'cmod': '*.cmod', + \ 'cmusrc': '', + \ 'cobol': '*.cbl,*.cob,*.lib', + \ 'coco': '*.atg', + \ 'coffee': '*.coffee,*._coffee,*.cake,*.cjsx,*.iced,*.coffeekup,*.cson,Cakefile', + \ 'conaryrecipe': '*.recipe', + \ 'conf': '*.conf,auto.master,config', + \ 'config': 'configure.in,configure.ac,Pipfile', + \ 'context': '*.mkii,*.mkiv,*.mkvi', + \ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.tcc,*.tpp,*.moc,*.tlh', + \ 'cql': '*.cql', + \ 'crm': '*.crm', + \ 'crontab': 'crontab,crontab.*', + \ 'cryptol': '*.cry,*.cyl,*.lcry,*.lcyl', + \ 'crystal': '*.cr,Projectfile', + \ 'cs': '*.cs', + \ 'csc': '*.csc', + \ 'csdl': '*.csdl', + \ 'csp': '*.csp,*.fdr', + \ 'css': '*.css', + \ 'csv': '*.csv,*.tsv,*.tab', + \ 'cterm': '*.con', + \ 'cucumber': '*.feature,*.story', + \ 'cuda': '*.cu,*.cuh', + \ 'cuesheet': '*.cue', + \ 'cupl': '*.pld', + \ 'cuplsim': '*.si', + \ 'cvs': 'cvs\d\+', + \ 'cvsrc': '.cvsrc', + \ 'cynpp': '*.cyn', + \ 'd': '*.d,*.di', + \ 'dart': '*.dart,*.drt', + \ 'datascript': '*.ds', + \ 'dcd': '*.dcd', + \ 'dcov': '*.lst', + \ 'dd': '*.dd', + \ 'ddoc': '*.ddoc', + \ 'debchangelog': 'changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch', + \ 'debcontrol': '', + \ 'debcopyright': '', + \ 'debsources': '', + \ 'def': '*.def', + \ 'denyhosts': 'denyhosts.conf', + \ 'desc': '*.desc', + \ 'desktop': '*.desktop,*.directory', + \ 'dhall': '*.dhall', + \ 'dictconf': 'dict.conf,.dictrc', + \ 'dictdconf': 'dictd.conf', + \ 'diff': '*.diff,*.rej', + \ 'dircolors': '.dir_colors,.dircolors', + \ 'dnsmasq': '', + \ 'dockerfile': '*.Dockerfile,*.dock,Containerfile,Dockerfile,dockerfile,Dockerfile*', + \ 'dosbatch': '*.bat,*.sys', + \ 'dosini': '*.wrap,*.ini,*.dof,*.lektorproject,*.prefs,*.pro,*.properties,*.url,.coveragerc,.flake8,.pylintrc,buildozer.spec,pylintrc,.editorconfig,.npmrc,php.ini-*', + \ 'dot': '*.dot,*.gv', + \ 'dracula': '*.drac,*.drc,*lvs,*lpe,drac.*', + \ 'dsdl': '*.sdl', + \ 'dsl': '*.dsl', + \ 'dtd': '*.dtd', + \ 'dts': '*.dts,*.dtsi', + \ 'dune': 'jbuild,dune,dune-project,dune-workspace', + \ 'dylan': '*.dylan', + \ 'dylanintr': '*.intr', + \ 'dylanlid': '*.lid', + \ 'ecd': '*.ecd', + \ 'ecrystal': '*.ecr', + \ 'edif': '*.ed\(f\|if\|o\)', + \ 'eelixir': '*.eex,*.html.heex,*.html.leex,*.leex', + \ 'elf': '*.am', + \ 'elinks': 'elinks.conf', + \ 'elixir': '*.ex,*.exs,mix.lock', + \ 'elm': '*.elm', + \ 'elmfilt': 'filter-rules', + \ 'embeddedpuppet': '*.epp', + \ 'ember-script': '*.em,*.emberscript', + \ 'emblem': '*.emblem,*.em', + \ 'erlang': '*.erl,*.app.src,*.es,*.escript,*.hrl,*.xrl,*.yrl,*.app,*.yaws,Emakefile,rebar.config,rebar.config.lock,rebar.lock', + \ 'eruby': '*.erb,*.erb.deface,*.rhtml', + \ 'esmtprc': '*esmtprc', + \ 'esqlc': '*.ec,*.EC', + \ 'esterel': '*.strl', + \ 'eterm': '', + \ 'exim': 'exim.conf', + \ 'expect': '*.exp', + \ 'exports': 'exports', + \ 'falcon': '*.fal', + \ 'fan': '*.fan,*.fwt', + \ 'fbs': '*.fbs', + \ 'fennel': '*.fnl', + \ 'ferm': '*.ferm,ferm.conf', + \ 'fetchmail': '.fetchmailrc', + \ 'fgl': '*.4gl,*.4gh,*.m4gl', + \ 'fish': '*.fish', + \ 'flow': '*.flow', + \ 'focexec': '*.fex,*.focexec', + \ 'forth': '*.fs,*.ft,*.fth', + \ 'fortran': '*.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08', + \ 'framescript': '*.fsl', + \ 'freebasic': '*.fb,*.bi', + \ 'fsharp': '*.fs,*.fsi,*.fsx', + \ 'fstab': 'fstab,mtab', + \ 'fvwm': '', + \ 'gdb': '.gdbinit', + \ 'gdmo': '*.mo,*.gdmo', + \ 'gedcom': '*.ged,lltxxxxx.txt', + \ 'gitcommit': 'COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG', + \ 'gitconfig': '*.gitconfig,.gitconfig,.gitmodules', + \ 'gitignore': '.gitignore', + \ 'gitolite': 'gitolite.conf', + \ 'gitrebase': 'git-rebase-todo', + \ 'gitsendemail': '.gitsendemail.*', + \ 'gkrellmrc': 'gkrellmrc,gkrellmrc_?', + \ 'gleam': '*.gleam', + \ 'glsl': '*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader,*.comp', + \ 'gmpl': '*.mod', + \ 'gnash': 'gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc', + \ 'gnuplot': '*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,*.gpi', + \ 'go': '*.go', + \ 'gohtmltmpl': '*.tmpl', + \ 'gomod': 'go.mod', + \ 'gosum': 'go.sum', + \ 'gowork': 'go.work', + \ 'gp': '*.gp,.gprc', + \ 'gpg': '', + \ 'grads': '*.gs', + \ 'graphql': '*.graphql,*.gql,*.graphqls', + \ 'gretl': '*.gretl', + \ 'groovy': '*.groovy,*.grt,*.gtpl,*.gvy,*.gradle,Jenkinsfile', + \ 'group': '', + \ 'grub': '', + \ 'gsp': '*.gsp', + \ 'gtkrc': '.gtkrc,gtkrc,.gtkrc*,gtkrc*', + \ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars', + \ 'hamster': '*.hsc,*.hsm', + \ 'haproxy': 'haproxy*.conf*,haproxy*.cfg*', + \ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig', + \ 'haste': '*.ht', + \ 'hastepreproc': '*.htpp', + \ 'haxe': '*.hx,*.hxsl', + \ 'hb': '*.hb', + \ 'hcl': '*.hcl,*.nomad,*.workflow,Appfile,.terraformrc,terraform.rc', + \ 'helm': '', + \ 'help': '', + \ 'hercules': '*.vc,*.ev,*.sum,*.errsum', + \ 'hex': '*.hex,*.h32', + \ 'hgcommit': 'hg-editor-*.txt', + \ 'hive': '*.q,*.hql,*.ql', + \ 'hjson': '*.hjson', + \ 'hog': '*.hog,snort.conf,vision.conf', + \ 'hollywood': '*.hws', + \ 'hostconf': '', + \ 'hostsaccess': '', + \ 'hss': '*.hss', + \ 'html.handlebars': '*.handlebars,*.hbs,*.hdbs,*.hb', + \ 'html.mustache': '*.mustache,*.hogan,*.hulk,*.hjs', + \ 'html.twig': '*.twig', + \ 'htmldjango': '*.jinja,*.j2,*.jinja2', + \ 'htmlm4': '*.html.m4', + \ 'hxml': '*.hxml', + \ 'ibasic': '*.iba,*.ibi', + \ 'icalendar': '*.ics', + \ 'icemenu': '', + \ 'icon': '*.icn', + \ 'idris': '*.idr,*.lidr,idris-response', + \ 'idris2': '*.idr,*.ipkg,idris-response', + \ 'indent': '.indent.pro,indentrc', + \ 'inform': '*.inf,*.INF', + \ 'initng': '*.ii', + \ 'inittab': 'inittab', + \ 'ion': '*.ion', + \ 'ipfilter': 'ipf.conf,ipf6.conf,ipf.rules', + \ 'iss': '*.iss', + \ 'ist': '*.ist,*.mst', + \ 'j': '*.ijs', + \ 'jal': '*.jal,*.JAL', + \ 'jam': '*.jpl,*.jpr,Prl*.*,JAM*.*', + \ 'java': '*.java,*.jav', + \ 'javacc': '*.jj,*.jjt', + \ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.jsb,*.jscad,*.jsfl,*.jslib,*.jsm,*.jspre,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile', + \ 'javascriptreact': '*.jsx', + \ 'jess': '*.clp', + \ 'jgraph': '*.jgr', + \ 'jovial': '*.jov,*.j73,*.jovial', + \ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*', + \ 'jq': '*.jq,.jqrc,.jqrc*', + \ 'json': '*.json,*.4DForm,*.4DProject,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.auto-changelog,.c8rc,.htmlhintrc,.imgbotconfig,.nycrc,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info', + \ 'json5': '*.json5', + \ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json', + \ 'jsonnet': '*.jsonnet,*.libsonnet', + \ 'jsp': '*.jsp', + \ 'jst': '*.ejs,*.ect,*.ejs.t,*.jst', + \ 'julia': '*.jl', + \ 'just': '*.just,justfile', + \ 'kconfig': 'Kconfig,Kconfig.debug,Kconfig.*', + \ 'kivy': '*.kv', + \ 'kix': '*.kix', + \ 'kotlin': '*.kt,*.ktm,*.kts', + \ 'kscript': '*.ks', + \ 'kwt': '*.k', + \ 'lace': '*.ace,*.ACE', + \ 'latte': '*.latte,*.lte', + \ 'ld': '*.ld', + \ 'ldif': '*.ldif', + \ 'ledger': '*.ldg,*.ledger,*.journal', + \ 'less': '*.less', + \ 'lex': '*.lex,*.l,*.lxx,*.l++', + \ 'lftp': 'lftp.conf,.lftprc', + \ 'lhaskell': '*.lhs', + \ 'libao': '', + \ 'lidris2': '*.lidr', + \ 'lifelines': '*.ll', + \ 'lilo': 'lilo.conf,lilo.conf*', + \ 'lilypond': '*.ly,*.ily', + \ 'limits': '', + \ 'liquid': '*.liquid', + \ 'lisp': '*.lsp,*.lisp,*.el,*.cl,.emacs,.sawfishrc,sbclrc,.sbclrc', + \ 'litcoffee': '*.litcoffee,*.coffee.md', + \ 'lite': '*.lite,*.lt', + \ 'litestep': '', + \ 'llvm': '*.ll', + \ 'log': '*.log,*.LOG,*_log,*_LOG', + \ 'logcheck': '', + \ 'loginaccess': '', + \ 'logindefs': '', + \ 'logtalk': '*.lgt', + \ 'lotos': '*.lot,*.lotos', + \ 'lout': '*.lou,*.lout', + \ 'lpc': '*.lpc,*.ulpc', + \ 'lprolog': '*.sig', + \ 'ls': '*.ls,*._ls,Slakefile', + \ 'lsl': '*.lsl', + \ 'lss': '*.lss', + \ 'lua': '*.lua,*.fcgi,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,.luacheckrc', + \ 'lynx': 'lynx.cfg', + \ 'm4': '*.m4,*.mc,*.at', + \ 'mail': '*.eml,snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,{neo,}mutt[[:alnum:]._-]\\\{6\},reportbug-*', + \ 'mailaliases': '', + \ 'mailcap': '.mailcap,mailcap', + \ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile', + \ 'mako': '*.mako,*.mao', + \ 'mallard': '*.page', + \ 'manconf': 'man.config', + \ 'maple': '*.mv,*.mpl,*.mws', + \ 'markdown': '*.md,*.livemd,*.markdown,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.scd,*.workbook,contents.lr', + \ 'markdown.mdx': '*.mdx', + \ 'mason': '*.mason,*.mhtml,*.comp', + \ 'master': '*.mas,*.master', + \ 'mel': '*.mel', + \ 'mermaid': '*.mermaid,*.mm,*.mmd', + \ 'meson': 'meson.build,meson_options.txt', + \ 'messages': '', + \ 'mf': '*.mf', + \ 'mgl': '*.mgl', + \ 'mgp': '*.mgp', + \ 'mib': '*.mib,*.my', + \ 'mint': '*.mint', + \ 'mix': '*.mix,*.mixal', + \ 'mma': '*.mathematica,*.cdf,*.m,*.ma,*.mt,*.nb,*.nbp,*.wl,*.wlt,*.wls,*.mma', + \ 'mmp': '*.mmp', + \ 'modconf': '', + \ 'modula2': '*.m2,*.DEF,*.MOD,*.mi', + \ 'modula3': '*.[mi][3g]', + \ 'monk': '*.isc,*.monk,*.ssc,*.tsc', + \ 'moo': '*.moo', + \ 'moon': '*.moon', + \ 'mp': '*.mp', + \ 'mplayerconf': 'mplayer.conf', + \ 'mrxvtrc': 'mrxvtrc,.mrxvtrc', + \ 'msidl': '*.odl,*.mof', + \ 'msql': '*.msql', + \ 'mupad': '*.mu', + \ 'murphi': '*.m', + \ 'mush': '*.mush', + \ 'muttrc': '.mutt{ng,}rc*,mutt{ng,}rc*,Mutt{ng,}rc*,Mutt{ng,}rc', + \ 'mysql': '*.mysql', + \ 'n1ql': '*.n1ql,*.nql', + \ 'named': 'named*.conf,rndc*.conf,rndc*.key', + \ 'nanorc': '*.nanorc', + \ 'natural': '*.NS[ACGLMNPS]', + \ 'ncf': '*.ncf', + \ 'neomuttrc': 'Neomuttrc,.neomuttrc*,neomuttrc*,Neomuttrc*', + \ 'netrc': '.netrc', + \ 'nftables': '*.nft', + \ 'nginx': '*.nginx,*.nginxconf,*.vhost,nginx.conf,nginx*.conf,*nginx.conf', + \ 'nim': '*.nim,*.nim.cfg,*.nimble,*.nimrod,*.nims,nim.cfg', + \ 'ninja': '*.ninja', + \ 'nix': '*.nix', + \ 'nqc': '*.nqc', + \ 'nroff': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc,*.tr,*.nr,*.roff,*.tmac,*.mom,tmac.*', + \ 'nsis': '*.nsi,*.nsh', + \ 'oasis': '_oasis', + \ 'obj': '*.obj', + \ 'objc': '*.m,*.h', + \ 'ocaml': '*.ml,*.eliom,*.eliomi,*.ml4,*.mli,*.mll,*.mly,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo,.ocamlinit', + \ 'ocamlbuild_tags': '_tags', + \ 'occam': '*.occ', + \ 'ocpbuild': '*.ocp', + \ 'ocpbuildroot': '*.root', + \ 'octave': '*.oct,*.m', + \ 'odin': '*.odin', + \ 'omake': '*.om,OMakefile,OMakeroot,OMakeroot.in', + \ 'omnimark': '*.xom,*.xin', + \ 'opam': '*.opam,*.opam.template,opam', + \ 'opencl': '*.cl,*.opencl', + \ 'openroad': '*.or', + \ 'openscad': '*.scad', + \ 'opl': '*.[Oo][Pp][Ll]', + \ 'ora': '*.ora', + \ 'org': '*.org', + \ 'pamconf': '', + \ 'pamenv': 'pam_env.conf,.pam_environment', + \ 'papp': '*.papp,*.pxml,*.pxsl', + \ 'pascal': '*.pas,*.pp,*.dpr,*.lpr', + \ 'passwd': '', + \ 'pccts': '*.g', + \ 'pdf': '*.pdf', + \ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,.gitolite.rc', + \ 'pest': '*.pest', + \ 'pf': 'pf.conf', + \ 'pfmain': 'main.cf', + \ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,*.php9,.php,.php_cs,.php_cs.dist,Phakefile', + \ 'pike': '*.pike,*.pmod', + \ 'pilrc': '*.rcp', + \ 'pine': '.pinerc,pinerc,.pinercex,pinercex', + \ 'pinfo': '', + \ 'plantuml': '*.puml,*.iuml,*.plantuml,*.uml,*.pu', + \ 'pli': '*.pli,*.pl1', + \ 'plm': '*.plm,*.p36,*.pac', + \ 'plp': '*.plp', + \ 'plsql': '*.pls,*.plsql', + \ 'po': '*.po,*.pot', + \ 'pod': '*.pod', + \ 'pony': '*.pony', + \ 'postscr': '*.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai', + \ 'pov': '*.pov', + \ 'povini': '.povrayrc', + \ 'ppd': '*.ppd', + \ 'ppwiz': '*.it,*.ih', + \ 'privoxy': '*.action', + \ 'procmail': '.procmail,.procmailrc', + \ 'prolog': '*.pl,*.pro,*.prolog,*.yap,*.pdb', + \ 'promela': '*.pml', + \ 'proto': '*.proto', + \ 'protocols': '', + \ 'ps1': '*.ps1,*.psd1,*.psm1,*.pssc', + \ 'ps1xml': '*.ps1xml', + \ 'psf': '*.psf', + \ 'pug': '*.jade,*.pug', + \ 'puppet': '*.pp,Modulefile', + \ 'purescript': '*.purs', + \ 'pyrex': '*.pyx,*.pxd', + \ 'python': '*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,*.ptl,.gclient,DEPS,SConscript,SConstruct,Snakefile,wscript,.pythonrc,.pythonstartup', + \ 'qmake': '*.pro,*.pri', + \ 'qml': '*.qml,*.qbs', + \ 'quake': '', + \ 'r': '*.r,*.rsx,*.s,*.S,.Rprofile,expr-dist', + \ 'racket': '*.rkt,*.rktd,*.rktl,*.scrbl', + \ 'radiance': '*.rad,*.mat', + \ 'ragel': '*.rl', + \ 'raku': '*.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl,*.pl6,*.pm,*.pm6,*.raku,*.rakumod,*.t,*.rakudoc,*.rakutest,*.pod6,*.t6', + \ 'raml': '*.raml', + \ 'ratpoison': '.ratpoisonrc,ratpoisonrc', + \ 'razor': '*.cshtml,*.razor', + \ 'rc': '*.rc,*.rch', + \ 'rcs': '*\,v', + \ 'readline': '.inputrc,inputrc', + \ 'reason': '*.re,*.rei', + \ 'rego': '*.rego', + \ 'remind': '*.remind,*.rem,.reminders,.reminders*', + \ 'requirements': '*.pip,*requirements.{txt,in},*require.{txt,in},constraints.{txt,in}', + \ 'resolv': 'resolv.conf', + \ 'reva': '*.frt', + \ 'rexx': '*.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit', + \ 'rhelp': '*.rd', + \ 'rib': '*.rib', + \ 'rmd': '*.rmd,*.smd', + \ 'rnc': '*.rnc', + \ 'rng': '*.rng', + \ 'rnoweb': '*.rnw,*.snw', + \ 'robots': 'robots.txt', + \ 'rpcgen': '*.x', + \ 'rpl': '*.rpl', + \ 'rrst': '*.rrst,*.srst', + \ 'rst': '*.rst,*.rest,*.rest.txt,*.rst.txt', + \ 'rtf': '*.rtf', + \ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.prawn,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Steepfile,Thorfile,Vagrantfile,buildfile,[Rr]antfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb', + \ 'rust': '*.rs,*.rs.in', + \ 'samba': 'smb.conf', + \ 'sas': '*.sas', + \ 'sass': '*.sass', + \ 'sather': '*.sa', + \ 'sbt': '*.sbt', + \ 'scala': '*.scala,*.kojo,*.sc', + \ 'scheme': '*.scm,*.ss', + \ 'scilab': '*.sci,*.sce', + \ 'screen': '.screenrc,screenrc', + \ 'scss': '*.scss', + \ 'sd': '*.sd', + \ 'sdc': '*.sdc', + \ 'sdl': '*.sdl,*.pr', + \ 'sed': '*.sed', + \ 'sensors': '', + \ 'services': '', + \ 'setserial': '', + \ 'sexplib': '*.sexp', + \ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,*.zsh-theme,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.kshrc,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile', + \ 'sieve': '*.siv,*.sieve', + \ 'sil': '*.sil', + \ 'simula': '*.sim', + \ 'sinda': '*.sin,*.s85', + \ 'sisu': '*.sst,*.ssm,*.ssi,*.-sst,*._sst,*.sst.meta,*.-sst.meta,*._sst.meta', + \ 'skill': '*.il,*.ils,*.cdf', + \ 'slang': '*.sl', + \ 'slice': '*.ice', + \ 'slim': '*.slim', + \ 'slime': '*.slime', + \ 'slpconf': '', + \ 'slpreg': '', + \ 'slpspi': '', + \ 'slrnrc': '.slrnrc', + \ 'slrnsc': '*.score', + \ 'sm': 'sendmail.cf', + \ 'smarty': '*.tpl', + \ 'smcl': '*.hlp,*.ihlp,*.smcl', + \ 'smith': '*.smt,*.smith', + \ 'sml': '*.sml', + \ 'smt2': '*.smt2,*.smt', + \ 'snobol4': '*.sno,*.spt', + \ 'solidity': '*.sol', + \ 'spec': '*.spec', + \ 'spice': '*.sp,*.spice', + \ 'spup': '*.speedup,*.spdata,*.spd', + \ 'spyce': '*.spy,*.spi', + \ 'sql': '*.pgsql,*.pls,*.bdy,*.ddl,*.fnc,*.pck,*.pkb,*.pks,*.plb,*.plsql,*.prc,*.spc,*.sql,*.tpb,*.tps,*.trg,*.vw,*.tyb,*.typ,*.tyc', + \ 'sqlj': '*.sqlj', + \ 'sqr': '*.sqr,*.sqi', + \ 'squid': 'squid.conf', + \ 'srec': '*.s19,*.s28,*.s37,*.mot,*.srec', + \ 'sshconfig': 'ssh_config', + \ 'sshdconfig': 'sshd_config', + \ 'st': '*.st', + \ 'stata': '*.ado,*.do,*.imata,*.mata', + \ 'stp': '*.stp', + \ 'stylus': '*.styl,*.stylus', + \ 'sudoers': 'sudoers.tmp', + \ 'svelte': '*.svelte', + \ 'svg': '*.svg', + \ 'svn': 'svn-commit*.tmp', + \ 'swayconfig': '*.swayconfig,*.sway.config,swayconfig', + \ 'swift': '*.swift', + \ 'swiftgyb': '*.swift.gyb', + \ 'sxhkdrc': '*.sxhkdrc,sxhkdrc', + \ 'sysctl': '', + \ 'systemd': '*.automount,*.dnssd,*.link,*.mount,*.netdev,*.network,*.nspawn,*.path,*.service,*.slice,*.socket,*.swap,*.target,*.timer,*.#*', + \ 'systemverilog': '*.sv,*.svh', + \ 'tablegen': '*.td', + \ 'tads': '*.t', + \ 'tags': 'tags', + \ 'tak': '*.tak', + \ 'taskdata': '{pending,completed,undo}.data', + \ 'taskedit': '*.task', + \ 'tcl': '*.tcl,*.tk,*.itcl,*.itk,*.jacl', + \ 'template': '*.tmpl', + \ 'teraterm': '*.ttl', + \ 'terminfo': '*.ti', + \ 'terraform': '*.tf,*.tfvars', + \ 'tex': '*.latex,*.sty,*.dtx,*.ltx,*.bbl', + \ 'texinfo': '*.texinfo,*.texi,*.txi', + \ 'texmf': 'texmf.cnf', + \ 'text': '*.text,README', + \ 'textile': '*.textile', + \ 'tf': '*.tf,.tfrc,tfrc', + \ 'thrift': '*.thrift', + \ 'tidy': '.tidyrc,tidyrc,tidy.conf', + \ 'tilde': '*.t.html', + \ 'tli': '*.tli', + \ 'tmux': '.tmux*.conf', + \ 'toml': '*.toml,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock', + \ 'tpp': '*.tpp', + \ 'tptp': '*.p,*.tptp,*.ax', + \ 'trasys': '*.inp', + \ 'treetop': '*.treetop', + \ 'trustees': 'trustees.conf', + \ 'tsalt': '*.slt', + \ 'tsscl': '*.tsscl', + \ 'tssgm': '*.tssgm', + \ 'tssop': '*.tssop', + \ 'tt2': '*.tt2', + \ 'tt2html': '*.tt2', + \ 'tutor': '*.tutor', + \ 'typescript': '*.ts,*.cts,*.mts', + \ 'typescriptreact': '*.tsx', + \ 'uc': '*.uc', + \ 'udevconf': '', + \ 'udevperm': '', + \ 'uil': '*.uit,*.uil', + \ 'unison': '*.u,*.uu', + \ 'updatedb': '', + \ 'upstart': '', + \ 'upstreamdat': '*.upstream.dat\c,upstream.dat\c,upstream.*.dat\c', + \ 'upstreaminstalllog': '*.upstreaminstall.log\c,upstreaminstall.log\c,upstreaminstall.*.log\c', + \ 'upstreamlog': '*.upstream.log\c,fdrupstream.log,upstream.log\c,upstream.*.log\c,UPSTREAM-*.log\c', + \ 'usserverlog': '*.usserver.log\c,usserver.log\c,usserver.*.log\c', + \ 'usw2kagtlog': '*.usw2kagt.log\c,usw2kagt.log\c,usw2kagt.*.log\c', + \ 'vala': '*.vala,*.vapi,*.valadoc', + \ 'vb': '*.bas,*.cls,*.frm,*.frx,*.vba,*.vbs,*.dsm,*.ctl,*.sba', + \ 'vbnet': '*.vb,*.vbhtml', + \ 'vcl': '*.vcl', + \ 'velocity': '*.vm', + \ 'vera': '*.vr,*.vri,*.vrh', + \ 'verilog': '*.v', + \ 'verilogams': '*.va,*.vams', + \ 'vgrindefs': 'vgrindefs', + \ 'vhdl': '*.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho,*.vhdl_[0-9]*', + \ 'vim': '*.vim,*.vba,.exrc,_exrc,*vimrc*', + \ 'viminfo': '.viminfo,_viminfo', + \ 'vlang': '*.v,*.vv,*.vsh', + \ 'vmasm': '*.mar', + \ 'voscm': '*.cm', + \ 'vrml': '*.wrl', + \ 'vroom': '*.vroom', + \ 'vue': '*.vue,*.wpy', + \ 'wast': '*.wast,*.wat', + \ 'webmacro': '*.wm', + \ 'wget': '.wgetrc,wgetrc', + \ 'winbatch': '*.wbt', + \ 'wml': '*.wml', + \ 'wsh': '*.ws[fc]', + \ 'wsml': '*.wsml', + \ 'wvdial': 'wvdial.conf,.wvdialrc', + \ 'xdc': '*.xdc', + \ 'xdefaults': '*.ad,.Xdefaults,.Xpdefaults,.Xresources,xdm-config,Xresources*', + \ 'xf86conf': 'XF86Config-4*,XF86Config*,xorg.conf,xorg.conf-4', + \ 'xhtml': '*.xhtml,*.xht', + \ 'xinetd': '', + \ 'xmath': '*.msc,*.msf', + \ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc', + \ 'xml.twig': '*.xml.twig', + \ 'xmodmap': '*Xmodmap,*xmodmap*', + \ 'xpm': '*.xpm,*.pm', + \ 'xpm2': '*.xpm2', + \ 'xquery': '*.xq,*.xql,*.xqm,*.xquery,*.xqy', + \ 'xs': '*.xs', + \ 'xsd': '*.xsd', + \ 'xsl': '*.xslt,*.xsl', + \ 'xslt': '*.xsl,*.xslt', + \ 'yacc': '*.yy,*.yxx,*.y++', + \ 'yaml': '*.yml,*.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml.mysql,.clang-format,.clang-tidy,.gemrc,CITATION.cff,glide.lock,yarn.lock,fish_history,fish_read_history', + \ 'yaml.ansible': 'playbook.y{a,}ml,site.y{a,}ml,main.y{a,}ml,local.y{a,}ml,requirements.y{a,}ml,tasks.*.y{a,}ml,roles.*.y{a,}ml,handlers.*.y{a,}ml', + \ 'yaml.docker-compose': 'docker-compose*.yaml,docker-compose*.yml', + \ 'z8a': '*.z8a', + \ 'zephir': '*.zep', + \ 'zig': '*.zig,*.zir', + \ 'zimbu': '*.zu', + \ 'zir': '*.zir', + \ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,.zlog*,.zcompdump*,.zfbfmarks,.zsh*', + \} + + +" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE + +func! polyglot#sleuth#GlobForFiletype(type) + return get(s:globs, a:type, '') +endfunc + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/autoload/pony.vim b/autoload/pony.vim index d7ab5d025..eac219380 100644 --- a/autoload/pony.vim +++ b/autoload/pony.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 +if polyglot#init#is_disabled(expand(':p'), 'pony', 'autoload/pony.vim') + finish +endif " Vim plugin file " Language: Pony @@ -532,5 +534,3 @@ endfunction let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/autoload/puppet/align.vim b/autoload/puppet/align.vim index b7dc1edad..811dee3dc 100644 --- a/autoload/puppet/align.vim +++ b/autoload/puppet/align.vim @@ -1,10 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'autoload/puppet/align.vim') + finish +endif -function! puppet#align#IndentLevel(lnum) +function! puppet#align#IndentLevel(lnum) abort return indent(a:lnum) / &shiftwidth endfunction -function! puppet#align#LinesInBlock(lnum) +function! puppet#align#LinesInBlock(lnum) abort let lines = [] let indent_level = puppet#align#IndentLevel(a:lnum) @@ -68,5 +70,3 @@ function! puppet#align#AlignHashrockets(...) abort endif endfor endfunction - -endif diff --git a/autoload/puppet/ctags.vim b/autoload/puppet/ctags.vim index 8f4d108f7..1a12890a0 100644 --- a/autoload/puppet/ctags.vim +++ b/autoload/puppet/ctags.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'autoload/puppet/ctags.vim') + finish +endif if !exists('s:ctags_type') @@ -8,9 +10,9 @@ endif let s:ctags_options_dir = expand(':p:h:h:h') . '/ctags/' " Return full path to option file for ctags application -function! puppet#ctags#OptionFile() +function! puppet#ctags#OptionFile() abort - if puppet#ctags#Type() == 'universal' + if puppet#ctags#Type() ==? 'universal' let l:ctags_options = 'puppet_u.ctags' else let l:ctags_options = 'puppet.ctags' @@ -20,13 +22,13 @@ endfunction " Return type of installed ctags application, " can be 'universal' or 'exuberant' -function! puppet#ctags#Type() +function! puppet#ctags#Type() abort if !s:ctags_type let l:version = system('ctags --version') - if l:version =~ 'Universal Ctags' + if l:version =~? 'Universal Ctags' let s:ctags_type = 'universal' - elseif l:version =~ 'Exuberant Ctags' + elseif l:version =~? 'Exuberant Ctags' let s:ctags_type = 'exuberant' else echoerr 'Unknown version of Ctags' @@ -36,5 +38,3 @@ function! puppet#ctags#Type() return s:ctags_type endfunction - -endif diff --git a/autoload/puppet/format.vim b/autoload/puppet/format.vim index 519fcc71d..b5ad655dc 100644 --- a/autoload/puppet/format.vim +++ b/autoload/puppet/format.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'autoload/puppet/format.vim') + finish +endif " " Simple format using puppet's l:indents and align hashrockets function @@ -70,5 +72,3 @@ function! puppet#format#Fallback(start_lnum, end_lnum) abort endfunction - -endif diff --git a/autoload/python/utils.vim b/autoload/python/utils.vim index c2e64874e..c72f8fdaf 100644 --- a/autoload/python/utils.vim +++ b/autoload/python/utils.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 +if polyglot#init#is_disabled(expand(':p'), 'python-compiler', 'autoload/python/utils.vim') + finish +endif " Sometimes Python issues debugging messages " which don't belong to a call stack context @@ -17,5 +19,3 @@ function! python#utils#fix_qflist() " {{{ call setqflist(l:traceback) endif endfunction " }}} - -endif diff --git a/autoload/requirements.vim b/autoload/requirements.vim index f237905e7..1132d7b27 100644 --- a/autoload/requirements.vim +++ b/autoload/requirements.vim @@ -1,36 +1,48 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'requirements') == -1 - -" the Requirements File Format syntax support for Vim -" Version: 1.5.3 -" Author: raimon -" License: MIT LICENSE -" The MIT License (MIT) -" -" Copyright (c) 2015 raimon -" -" 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. +if polyglot#init#is_disabled(expand(':p'), 'requirements', 'autoload/requirements.vim') + finish +endif -let s:save_cpo = &cpo -set cpo&vim +"" +" @section Introduction, intro +" @library +" is generated by . +" See for more information about installation and screenshots. -let &cpo = s:save_cpo -unlet s:save_cpo -" vim: et sw=4 ts=4 sts=4: +"" +" Update cache. +function! requirements#update_cache() abort + let s:items = [] + let l:pip_items = split(system('COMP_WORDS="pip install -" COMP_CWORD=2 PIP_AUTO_COMPLETE=1 pip')) + let l:pypi_items = split(system('pip-cache pkgnames')) + for l:item in l:pip_items + let s:items += [{'word': l:item, 'menu': 'pip'}] + endfor + for l:item in l:pypi_items + let s:items += [{'word': l:item, 'menu': 'pypi'}] + endfor + call writefile([json_encode(s:items)], s:cache) +endfunction +if exists('*stdpath') + let s:cache_dir_home = stdpath('cache') +else + let s:cache_dir_home = $HOME . '/.cache/nvim' endif +let s:cache_dir = s:cache_dir_home . '/requirements.vim' +call mkdir(s:cache_dir, 'p') +"" +" Completion cache path. +call g:requirements#utils#plugin.Flag('g:requirements#cache', + \ s:cache_dir . '/requirements.json' + \ ) +let s:cache = g:requirements#cache +try + let s:items = json_decode(readfile(s:cache)[0]) +catch /\v^Vim%(\(\a+\))?:E(684|484|491):/ + call requirements#update_cache() + let s:items = json_decode(readfile(s:cache)[0]) +endtry +"" +" Completion cache contents. For program. +call g:requirements#utils#plugin.Flag('g:requirements#items', s:items) +" vim: et sw=4 ts=4 sts=4: diff --git a/autoload/requirements/utils.vim b/autoload/requirements/utils.vim new file mode 100644 index 000000000..963ecb719 --- /dev/null +++ b/autoload/requirements/utils.vim @@ -0,0 +1,15 @@ +if polyglot#init#is_disabled(expand(':p'), 'requirements', 'autoload/requirements/utils.vim') + finish +endif + +"" +" @section Configuration, config + +function! s:Flag(name, default) abort + let l:scope = get(split(a:name, ':'), 0, 'g:') + let l:name = get(split(a:name, ':'), -1) + let {l:scope}:{l:name} = get({l:scope}:, l:name, a:default) +endfunction + +let g:requirements#utils#plugin = {'Flag': funcref('s:Flag')} +" vim: et sw=4 ts=4 sts=4: diff --git a/autoload/rubycomplete.vim b/autoload/rubycomplete.vim index 54b7e1b81..9c3f9ffd4 100644 --- a/autoload/rubycomplete.vim +++ b/autoload/rubycomplete.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'autoload/rubycomplete.vim') + finish +endif " Vim completion script " Language: Ruby @@ -871,5 +873,3 @@ call s:DefRuby() "}}} ruby-side code " vim:tw=78:sw=4:ts=8:et:fdm=marker:ft=vim:norl: - -endif diff --git a/autoload/rust.vim b/autoload/rust.vim index 34dd16736..e883ad789 100644 --- a/autoload/rust.vim +++ b/autoload/rust.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/rust.vim') + finish +endif " Description: Helper functions for Rust commands/mappings " Last Modified: May 27, 2014 @@ -570,5 +572,3 @@ endfunction " }}}1 " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/debugging.vim b/autoload/rust/debugging.vim index 066e2451a..9cae48342 100644 --- a/autoload/rust/debugging.vim +++ b/autoload/rust/debugging.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/rust/debugging.vim') + finish +endif " For debugging, inspired by https://github.com/w0rp/rust/blob/master/autoload/rust/debugging.vim @@ -103,5 +105,3 @@ function! rust#debugging#InfoToFile(filename) abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/delimitmate.vim b/autoload/rust/delimitmate.vim index 6707adc54..40f3c1d10 100644 --- a/autoload/rust/delimitmate.vim +++ b/autoload/rust/delimitmate.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/rust/delimitmate.vim') + finish +endif let s:delimitMate_extra_excluded_regions = ',rustLifetimeCandidate,rustGenericLifetimeCandidate' @@ -44,5 +46,3 @@ endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rust/tags.vim b/autoload/rust/tags.vim index e75fb2083..45d999082 100644 --- a/autoload/rust/tags.vim +++ b/autoload/rust/tags.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/rust/tags.vim') + finish +endif " Tagbar support code, for the sake of not automatically overriding its " configuration in case Universal Ctags is detected. @@ -18,5 +20,3 @@ function! rust#tags#IsUCtags() abort endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim index 514e41474..23e7206ad 100644 --- a/autoload/rustfmt.vim +++ b/autoload/rustfmt.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'autoload/rustfmt.vim') + finish +endif " Author: Stephen Sugden " @@ -65,12 +67,12 @@ endfunction function! s:RustfmtConfigOptions() let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';') if l:rustfmt_toml !=# '' - return '--config-path '.fnamemodify(l:rustfmt_toml, ":p") + return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p")) endif let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';') if l:_rustfmt_toml !=# '' - return '--config-path '.fnamemodify(l:_rustfmt_toml, ":p") + return '--config-path '.shellescape(fnamemodify(l:_rustfmt_toml, ":p")) endif " Default to edition 2018 in case no rustfmt.toml was found. @@ -109,7 +111,7 @@ function! s:DeleteLines(start, end) abort endfunction function! s:RunRustfmt(command, tmpname, from_writepre) - mkview! + let l:view = winsaveview() let l:stderr_tmpname = tempname() call writefile([], l:stderr_tmpname) @@ -215,7 +217,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre) lwindow endif - silent! loadview + call winrestview(l:view) endfunction function! rustfmt#FormatRange(line1, line2) @@ -260,5 +262,3 @@ endfunction " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/autoload/smt2.vim b/autoload/smt2.vim deleted file mode 100644 index 294a64c6d..000000000 --- a/autoload/smt2.vim +++ /dev/null @@ -1,34 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1 - -" Invokes the solver on current file -function! smt2#RunSolver() - silent !clear - execute "!" . g:smt2_solver_command . " " . bufname("%") -endfunction - -" Puts the solver's output in new split (replaces old split) -function! smt2#RunSolverAndShowResult() - let output = system(g:smt2_solver_command . " " . bufname("%") . " 2>&1") - - " Create split (or reuse existent) - if exists("s:outputbufnr") && bufwinnr(s:outputbufnr) > 0 - execute bufwinnr(s:outputbufnr) . 'wincmd w' - else - silent! vnew - let s:outputbufnr=bufnr('%') - endif - - " Clear & (re-)fill contents - silent! normal! ggdG - setlocal filetype=smt2 buftype=nofile nobuflisted noswapfile - call append(0, split(output, '\v\n')) - normal! gg -endfunction - -" Requests the solver's version -function! smt2#PrintSolverVersion() - silent !clear - execute "!" . g:smt2_solver_command . " " . g:smt2_solver_version_switch -endfunction - -endif diff --git a/autoload/smt2/formatter.vim b/autoload/smt2/formatter.vim new file mode 100644 index 000000000..6a461b4c1 --- /dev/null +++ b/autoload/smt2/formatter.vim @@ -0,0 +1,142 @@ +if polyglot#init#is_disabled(expand(':p'), 'smt2', 'autoload/smt2/formatter.vim') + finish +endif + +" Formatting requires a rather recent Vim version +if !((v:version > 802) || (v:version == 802 && has("patch2725"))) + const s:errmsg_oldvim = "Vim >= 8.2.2725 required for auto-formatting" + + "Dummies + function! smt2#formatter#FormatCurrentParagraph() + echoerr s:errmsg_oldvim + endfunction + function! smt2#formatter#FormatAllParagraphs() + echoerr s:errmsg_oldvim + endfunction + + finish +endif +vim9script + +# ------------------------------------------------------------------------------ +# Config +# ------------------------------------------------------------------------------ +# Length of "short" S-expressions +if !exists("g:smt2_formatter_short_length") + g:smt2_formatter_short_length = 80 +endif + +# String to use for indentation +if !exists("g:smt2_formatter_indent_str") + g:smt2_formatter_indent_str = ' ' +endif + +# ------------------------------------------------------------------------------ +# Formatter +# ------------------------------------------------------------------------------ +def FitsOneLine(ast: dict): bool + # A paragraph with several entries should not be formatted in one line + if ast.kind ==# 'Paragraph' && len(ast.value) != 1 + return false + endif + return ast.pos_to - ast.pos_from < g:smt2_formatter_short_length && !ast.contains_comment +enddef + +def FormatOneLine(ast: dict): string + if ast.kind ==# 'Atom' + return ast.value.lexeme + elseif ast.kind ==# 'SExpr' + var formatted = [] + for expr in ast.value + call formatted->add(expr->FormatOneLine()) + endfor + return '(' .. formatted->join(' ') .. ')' + elseif ast.kind ==# 'Paragraph' + return ast.value[0]->FormatOneLine() + endif + throw 'Cannot format AST node: ' .. string(ast) + return '' # Unreachable +enddef + +def Format(ast: dict, indent = 0): string + const indent_str = repeat(g:smt2_formatter_indent_str, indent) + + if ast.kind ==# 'Atom' + return indent_str .. ast.value.lexeme + elseif ast.kind ==# 'SExpr' + # Short expression -- avoid line breaks + if ast->FitsOneLine() + return indent_str .. ast->FormatOneLine() + endif + + # Long expression -- break lines and indent subexpressions. + # Don't break before first subexpression if it's an atom + # Note: ast.value->empty() == false; otherwise it would fit in one line + var formatted = [] + if (ast.value[0].kind ==# 'Atom') + call formatted->add(ast.value[0]->Format(0)) + else + call formatted->add("\n" .. ast.value[0]->Format(indent + 1)) + endif + for child in ast.value[1 :] + call formatted->add(child->Format(indent + 1)) + endfor + return indent_str .. "(" .. formatted->join("\n") .. ")" + elseif ast.kind ==# 'Paragraph' + var formatted = [] + for child in ast.value + call formatted->add(child->Format()) + endfor + return formatted->join("\n") + endif + throw 'Cannot format AST node: ' .. string(ast) + return '' # Unreachable +enddef + +# ------------------------------------------------------------------------------ +# Public functions +# ------------------------------------------------------------------------------ +def smt2#formatter#FormatCurrentParagraph() + const cursor = getpos('.') + const ast = smt2#parser#ParseCurrentParagraph() + + # Identify on which end of the buffer we are (to fix newlines later) + silent! normal! { + const is_first_paragraph = line('.') == 1 + silent! normal! } + const is_last_paragraph = line('.') == line('$') + + # Replace paragraph by formatted lines + const lines = split(Format(ast), '\n') + silent! normal! {d} + if is_last_paragraph && !is_first_paragraph + call append('.', [''] + lines) + else + call append('.', lines + ['']) + endif + + # Remove potentially introduced first empty line + if is_first_paragraph | silent! :1delete | endif + + # Restore cursor position + call setpos('.', cursor) +enddef + +def smt2#formatter#FormatAllParagraphs() + const cursor = getpos('.') + const asts = smt2#parser#ParseAllParagraphs() + + # Clear buffer & insert formatted paragraphs + silent! :1,$delete + for ast in asts + const lines = split(Format(ast), '\n') + [''] + call append('$', lines) + endfor + + # Remove first & trailing empty lines + silent! :1delete + silent! :$delete + + # Restore cursor position + call setpos('.', cursor) +enddef diff --git a/autoload/smt2/parser.vim b/autoload/smt2/parser.vim new file mode 100644 index 000000000..b9e4837f3 --- /dev/null +++ b/autoload/smt2/parser.vim @@ -0,0 +1,227 @@ +if polyglot#init#is_disabled(expand(':p'), 'smt2', 'autoload/smt2/parser.vim') + finish +endif + +vim9script +const debug = false +set maxfuncdepth=100000000 # SMT files tend to be highly nested + +# TODO: Retry iterative parsing now that we have a scanner and simpler grammar +# TODO: Refer to token kind by name, e.g. token_comment instead of 8 +# TODO: Change Ast.kind type from string to enum/number? + +# ------------------------------------------------------------------------------ +# AST nodes -- essentially named token wrappers +# +# Note: pos_from, pos_to and contains_comment were only introduced to allow for +# a fast FitsOneLine(ast) function in the formatter. +# Here, pos_from and pos_to refer to indices of characters -- not tokens +# ------------------------------------------------------------------------------ +def Ast(kind: string, value: any, pos_from: number, pos_to: number, contains_comment: bool): dict + return {kind: kind, value: value, pos_from: pos_from, pos_to: pos_to, contains_comment: contains_comment} +enddef + +def ParagraphAst(exprs: list>, pos_from: number, pos_to: number): dict + var contains_comment = false + for expr in exprs + if expr.contains_comment + contains_comment = true + break + endif + endfor + return Ast('Paragraph', exprs, pos_from, pos_to, contains_comment) +enddef + +def SExprAst(exprs: list>, pos_from: number, pos_to: number): dict + var contains_comment = false + for expr in exprs + if expr.contains_comment + contains_comment = true + break + endif + endfor + return Ast('SExpr', exprs, pos_from, pos_to, contains_comment) +enddef + +def AtomAst(token: dict): dict + return Ast('Atom', token, token.pos, token.pos + len(token.lexeme), token.kind == 8) +enddef + +def PrintAst(ast: dict, indent = 0) + echo repeat(' ', indent * 2) .. '[' .. ast.kind .. '] ' + + if ast.kind ==# 'Atom' + echon ast.value.lexeme + elseif ast.kind ==# 'SExpr' + for v in ast.value + call PrintAst(v, indent + 1) + endfor + elseif ast.kind ==# 'Paragraph' + for v in ast.value + call PrintAst(v, indent + 1) + endfor + endif +enddef + +# ------------------------------------------------------------------------------ +# Grammar +# ------------------------------------------------------------------------------ +# Paragraph ::= Expr+ +# Expr ::= SExpr | Atom +# SExpr ::= '(' Expr* ')' + +# ------------------------------------------------------------------------------ +# LParen +# ------------------------------------------------------------------------------ +def AtStartOfLParen(scanner: dict): bool + return scanner.cur_token.kind == 0 # token_lparen +enddef + +def ParseLParen(scanner: dict) # consumes token; no return + if debug + scanner->smt2#scanner#Enforce(scanner->AtStartOfLParen(), + "ParseLParen called but not at start of LParen", + scanner.cur_token.pos) + endif + + scanner->smt2#scanner#NextToken() +enddef + +# ------------------------------------------------------------------------------ +# RParen +# ------------------------------------------------------------------------------ +def AtStartOfRParen(scanner: dict): bool + return scanner.cur_token.kind == 1 # token_rparen +enddef + +def ParseRParen(scanner: dict) # consumes token; no return + if debug + scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(), + "ParseRParen called but not at start of RParen", + scanner.cur_token.pos) + endif + + scanner->smt2#scanner#NextToken() +enddef + +# ------------------------------------------------------------------------------ +# Atom +# ------------------------------------------------------------------------------ +def AtStartOfAtom(scanner: dict): bool + return 2 <= scanner.cur_token.kind && scanner.cur_token.kind <= 8 +enddef + +def ParseAtom(scanner: dict): dict + if debug + scanner->smt2#scanner#Enforce(scanner->AtStartOfAtom(), + "ParseAtom called but not at start of Atom", + scanner.cur_token.pos) + endif + + const ast = AtomAst(scanner.cur_token) + scanner->smt2#scanner#NextToken() + return ast +enddef + +# ------------------------------------------------------------------------------ +# Expr +# ------------------------------------------------------------------------------ +def AtStartOfExpr(scanner: dict): bool + return scanner->AtStartOfSExpr() || scanner->AtStartOfAtom() +enddef +def ParseExpr(scanner: dict): dict + if debug + scanner->smt2#scanner#Enforce(scanner->AtStartOfExpr(), + "ParseExpr called but not at start of Expr", + scanner.cur_token.pos) + endif + + if scanner->AtStartOfSExpr() + return scanner->ParseSExpr() + endif + return scanner->ParseAtom() +enddef + +# ------------------------------------------------------------------------------ +# SExpr +# ------------------------------------------------------------------------------ +const AtStartOfSExpr = funcref(AtStartOfLParen) +def ParseSExpr(scanner: dict): dict + const pos_from = scanner.cur_token.pos + + if debug + scanner->smt2#scanner#Enforce(scanner->AtStartOfSExpr(), + "ParseSExpr called but not at start of SExpr", + pos_from) + endif + scanner->ParseLParen() + + # Expr* + var exprs: list> + while scanner->AtStartOfExpr() + exprs->add(scanner->ParseExpr()) + endwhile + + scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(), + printf("Expected RParen but got %s", scanner.cur_token.kind->smt2#scanner#TokenKind2Str()), + scanner.cur_token.pos) + scanner->ParseRParen() + + const pos_to = scanner.cur_token.pos + return SExprAst(exprs, pos_from, pos_to) +enddef + +# ------------------------------------------------------------------------------ +# Paragraph +# ------------------------------------------------------------------------------ +def ParseParagraph(scanner: dict): dict + const pos_from = scanner.cur_token.pos + + # Expr+ + scanner->smt2#scanner#Enforce(scanner->AtStartOfExpr(), + printf("Expected Expr but got %s", scanner.cur_token.kind->smt2#scanner#TokenKind2Str()), + pos_from) + + var exprs = [scanner->ParseExpr()] + while scanner->AtStartOfExpr() && !scanner.at_new_paragraph + exprs->add(scanner->ParseExpr()) + endwhile + + const pos_to = scanner.cur_token.pos + return ParagraphAst(exprs, pos_from, pos_to) +enddef + +# ------------------------------------------------------------------------------ +# Public functions +# ------------------------------------------------------------------------------ +def smt2#parser#ParseCurrentParagraph(): dict + # source = [start of current paragraph, EOF] + # Note: This is needed since `silent! normal! {y}` may not yank full paragraphs + # in the context of multiline expressions + const cursor = getpos('.') + silent! normal! { + const line_offset = line('.') + const source = join(getline('.', '$'), "\n") + call setpos('.', cursor) + + var scanner = smt2#scanner#Scanner(source, line_offset) + const ast = scanner->ParseParagraph() + + if debug | ast->PrintAst() | endif + return ast +enddef + +def smt2#parser#ParseAllParagraphs(): list> + # source = current buffer + const source = join(getline(1, '$'), "\n") + + var scanner = smt2#scanner#Scanner(source) + var asts = [] + while scanner.cur_token.kind != 9 # token_eof + const ast = scanner->ParseParagraph() + asts->add(ast) + + if debug | ast->PrintAst() | endif + endwhile + return asts +enddef diff --git a/autoload/smt2/scanner.vim b/autoload/smt2/scanner.vim new file mode 100644 index 000000000..464dbe249 --- /dev/null +++ b/autoload/smt2/scanner.vim @@ -0,0 +1,381 @@ +if polyglot#init#is_disabled(expand(':p'), 'smt2', 'autoload/smt2/scanner.vim') + finish +endif + +vim9script +const debug = false + +# ------------------------------------------------------------------------------ +# Ref: http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2021-05-12.pdf +# ------------------------------------------------------------------------------ + +# ------------------------------------------------------------------------------ +# Token +# ------------------------------------------------------------------------------ +const token_lparen = 0 +const token_rparen = 1 +const token_numeral = 2 +const token_decimal = 3 +const token_bv = 4 +const token_string = 5 +const token_symbol = 6 +const token_keyword = 7 +const token_comment = 8 +const token_eof = 9 + +def Token(kind: number, pos: number, lexeme: string): dict + return {kind: kind, pos: pos, lexeme: lexeme} +enddef + +def smt2#scanner#TokenKind2Str(kind: number): string + if kind == token_lparen + return "LParen" + elseif kind == token_rparen + return "RParen" + elseif kind == token_numeral + return "Numeral" + elseif kind == token_decimal + return "Decimal" + elseif kind == token_bv + return "Bv" + elseif kind == token_string + return "String" + elseif kind == token_symbol + return "Symbol" + elseif kind == token_keyword + return "Keyword" + elseif kind == token_comment + return "Comment" + elseif kind == token_eof + return "EOF" + else + echoerr "Unexpected token kind: " .. kind + return '' + endif +enddef + +def PrettyPrint(scanner: dict, token: dict) + const coord = scanner->Pos2Coord(token.pos) + echo printf("%4d:%-3d (%5d) %8s %s", coord.line, coord.col, token.pos, token.kind->smt2#scanner#TokenKind2Str(), token.lexeme) +enddef + +# ------------------------------------------------------------------------------ +# Scanner +# +# Note: The public interface is limited to the +# - field cur_token +# - method NextToken +# - field at_new_paragraph (needed to distinguish paragraphs in parser) +# +# The other fields should only be used internally / in this file +# ------------------------------------------------------------------------------ +# TODO: Enforce restriction to ASCII? We should if we use the lookup table below +# TODO: Do not take a string but a character stream (or just buffer and pos)? + +def smt2#scanner#Scanner(source: string, line_offset = 1): dict + var scanner = { + chars: source->trim(" \t\n\r", 2)->split('\zs'), + line_offset: line_offset, # start line of source string in buffer + pos: 0, # pos in source string -- not column in line + at_new_paragraph: false} + + if scanner.chars->empty() + scanner.at_eof = true + scanner.cur_char = '' + else + scanner.at_eof = false + scanner.cur_char = scanner.chars[0] + endif + scanner.cur_char_nr = scanner.cur_char->char2nr() + scanner.chars_len = len(scanner.chars) + scanner.cur_token = {} + scanner->smt2#scanner#NextToken() + return scanner +enddef + +def smt2#scanner#NextToken(scanner: dict) + if scanner.at_eof + scanner.cur_token = Token(token_eof, scanner.pos, '') + else + scanner->SkipWhitespace() # Cannot end up at eof since end is trimmed + + const nr = scanner.cur_char_nr + if nr == 40 # '(' + scanner.cur_token = Token(token_lparen, scanner.pos, '(') + scanner->NextPos() + elseif nr == 41 # ')' + scanner.cur_token = Token(token_rparen, scanner.pos, ')') + scanner->NextPos() + elseif nr->IsStartOfSimpleSymbol() + scanner.cur_token = scanner->ReadSimpleSymbol() + elseif nr == 124 # '|' + scanner.cur_token = scanner->ReadQuotedSymbol() + elseif nr == 58 # ':' + scanner.cur_token = scanner->ReadKeyword() + elseif nr->IsDigit() + scanner.cur_token = scanner->ReadNumber() + elseif nr == 35 # '#' + scanner.cur_token = scanner->ReadBv() + elseif nr == 34 # '"' + scanner.cur_token = scanner->ReadString() + elseif nr == 59 # ';' + scanner.cur_token = scanner->ReadComment() + else + scanner->smt2#scanner#Enforce(false, printf("Unexpected character '%s'", scanner.cur_char), scanner.pos) + endif + endif + + if debug + if scanner.at_new_paragraph | echo "\n" | endif + scanner->PrettyPrint(scanner.cur_token) + endif +enddef + +def NextPos(scanner: dict) + if debug | scanner->smt2#scanner#Enforce(!scanner.at_eof, "Already at EOF", scanner.pos) | endif + + scanner.pos += 1 + scanner.at_eof = scanner.pos == scanner.chars_len + scanner.cur_char = scanner.at_eof ? '' : scanner.chars[scanner.pos] + scanner.cur_char_nr = scanner.cur_char->char2nr() +enddef + +def smt2#scanner#Enforce(scanner: dict, expr: bool, msg: string, pos: number) + if !expr + const coord = scanner->Pos2Coord(pos) + throw printf("Syntax error (at %d:%d): %s ", coord.line, coord.col, msg) + endif +enddef + +# This is slow and intended for use in error messages & debugging only +def Pos2Coord(scanner: dict, pos: number): dict + const line = scanner.chars[: pos]->count("\n") + scanner.line_offset + + var cur_pos = pos - 1 + while cur_pos >= 0 && scanner.chars[cur_pos] != "\n" + cur_pos -= 1 + endwhile + + return {line: line, col: pos - cur_pos} +enddef + +# ------------------------------------------------------------------------------ +# ::= 9 (tab), 10 (lf), 13 (cr), 32 (space) +# +# Note: The source string has all lines joined by "\n" so "\r" can be ignored +# ------------------------------------------------------------------------------ +def SkipWhitespace(scanner: dict) + var newlines = 0 + while !scanner.at_eof + const nr = scanner.cur_char_nr + if nr == 32 || nr == 9 + scanner->NextPos() + elseif nr == 10 + newlines += 1 + scanner->NextPos() + else + break + endif + endwhile + scanner.at_new_paragraph = newlines > 1 +enddef + +# ------------------------------------------------------------------------------ +# A comment is any character sequence not contained within a string literal or a +# quoted symbol that begins with ; and ends with the first subsequent +# line-breaking character, i.e. 10 (lf) or 13 (cr) +# +# Note: The source string has all lines joined by "\n" so "\r" can be ignored +# ------------------------------------------------------------------------------ +def ReadComment(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char == ';', "Not the start of a comment", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + while !scanner.at_eof && scanner.cur_char_nr != 10 + scanner->NextPos() + endwhile + return Token(token_comment, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= 0 +# | a non-empty sequence of digits not starting with 0 +# +# ::= .0* +# ------------------------------------------------------------------------------ +def IsDigit(char_nr: number): bool + # '0'->char2nr() == 48 && '9'->char2nr() == 57 + return 48 <= char_nr && char_nr <= 57 +enddef + +def ReadNumber(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char_nr->IsDigit(), "Not the start of a number", scanner.pos) | endif + + const starts_with_zero = scanner.cur_char == '0' + const start_pos = scanner.pos + scanner->NextPos() + # Note: We aren't strict about numbers not starting with 0 when not debugging + if debug | scanner->smt2#scanner#Enforce(!starts_with_zero || scanner.cur_char != '0', "Numeral may not start with 0", scanner.pos) | endif + + var is_decimal = false + while !scanner.at_eof + const nr = scanner.cur_char_nr + if 48 <= nr && nr <= 57 # inlined IsDigit + scanner->NextPos() + elseif scanner.cur_char == '.' + if is_decimal + break + else + is_decimal = true + scanner->NextPos() + endif + else + break + endif + endwhile + const kind = is_decimal ? token_decimal : token_numeral + return Token(kind, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= #x followed by a non-empty sequence of digits and letters +# from A to F, capitalized or not +# +# ::= #b followed by a non-empty sequence of 0 and 1 characters +# ------------------------------------------------------------------------------ + +# Build lookup table for char->match('\m\C^[0-9a-fA-F]') +def InitIsAlphaNumericCharNr(): list + var lookup_table = [] + var char_nr = 0 + while char_nr < 255 + lookup_table->add(char_nr->nr2char()->match('\m\C^[0-9a-fA-F]') != -1) + char_nr += 1 + endwhile + return lookup_table +enddef +const is_alphanumeric_char_nr = InitIsAlphaNumericCharNr() + +def ReadBv(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char == '#', "Not the start of a bit vector literal", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + if scanner.cur_char == 'x' + scanner->NextPos() + scanner->smt2#scanner#Enforce(!scanner.at_eof && is_alphanumeric_char_nr[scanner.cur_char_nr], + "hexadecimal literal may not be empty", + scanner.pos) + while !scanner.at_eof && is_alphanumeric_char_nr[scanner.cur_char_nr] + scanner->NextPos() + endwhile + elseif scanner.cur_char == 'b' + scanner->NextPos() + # '0'->char2nr() == 48 && '1'->char2nr() == 49 + scanner->smt2#scanner#Enforce(!scanner.at_eof && scanner.cur_char_num == 48 || scanner.cur_char_num == 49, + "binary literal may not be empty", + scanner.pos) + while !scanner.at_eof && scanner.cur_char_num == 48 || scanner.cur_char_num == 49 + scanner->NextPos() + endwhile + else + scanner->smt2#scanner#Enforce(false, "invalid bit vector literal -- expected 'x' or 'b'", scanner.pos) + endif + return Token(token_bv, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= sequence of whitespace and printable characters in double +# quotes with escape sequence "" +# ------------------------------------------------------------------------------ +# TODO: Allow only printable characters, i.e. ranges [32, 126], [128-255]? +def ReadString(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char == '"', "Not the start of a string", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + while true + scanner->smt2#scanner#Enforce(!scanner.at_eof, "unexpected end of string", scanner.pos) + + if scanner.cur_char == '"' + scanner->NextPos() + if scanner.cur_char != '"' + break + endif + endif + scanner->NextPos() + endwhile + return Token(token_string, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= a non-empty sequence of letters, digits and the characters +# + - / * = % ? ! . $ _ ~ & ^ < > @ that does not start with +# a digit +# ------------------------------------------------------------------------------ + +# Build lookup table for char->match('\m\C^[a-zA-Z0-9+-/*=%?!.$_~&^<>@]') +def InitIsSimpleSymbolCharNr(): list + var lookup_table = [] + var char_nr = 0 + while char_nr < 255 + lookup_table->add(char_nr->nr2char()->match('\m\C^[a-zA-Z0-9+-/*=%?!.$_~&^<>@]') != -1) + char_nr += 1 + endwhile + return lookup_table +enddef +const is_simple_symbol_char_nr = InitIsSimpleSymbolCharNr() + +def IsStartOfSimpleSymbol(char_nr: number): bool + # '0'->char2nr() == 48 && '9'->char2nr() == 57 + return is_simple_symbol_char_nr[char_nr] && !(48 <= char_nr && char_nr <= 57) +enddef + +def ReadSimpleSymbol(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char_nr->IsStartOfSimpleSymbol(), "Not the start of a simple symbol", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + while !scanner.at_eof && is_simple_symbol_char_nr[scanner.cur_char_nr] + scanner->NextPos() + endwhile + return Token(token_symbol, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= +# | a sequence of whitespace and printable characters that starts +# and ends with '|' and does not otherwise include '|' or '\' +# ------------------------------------------------------------------------------ +# TODO: Allow only printable characters, i.e. ranges [32, 126], [128-255]? +def ReadQuotedSymbol(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char == '|', "Not the start of a quoted symbol", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + while true + scanner->smt2#scanner#Enforce(!scanner.at_eof, "unexpected end of quoted symbol", scanner.pos) + scanner->smt2#scanner#Enforce(scanner.cur_char != '\\', "quoted symbol may not contain '\'", scanner.pos) + if scanner.cur_char == '|' + break + endif + scanner->NextPos() + endwhile + scanner->NextPos() + return Token(token_symbol, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef + +# ------------------------------------------------------------------------------ +# ::= : +# ------------------------------------------------------------------------------ +def ReadKeyword(scanner: dict): dict + if debug | scanner->smt2#scanner#Enforce(scanner.cur_char == ':', "Not the start of a keyword", scanner.pos) | endif + + const start_pos = scanner.pos + scanner->NextPos() + while !scanner.at_eof && is_simple_symbol_char_nr[scanner.cur_char_nr] + scanner->NextPos() + endwhile + return Token(token_keyword, start_pos, scanner.chars[start_pos : scanner.pos - 1]->join('')) +enddef diff --git a/autoload/smt2/solver.vim b/autoload/smt2/solver.vim new file mode 100644 index 000000000..39e7d4775 --- /dev/null +++ b/autoload/smt2/solver.vim @@ -0,0 +1,56 @@ +if polyglot#init#is_disabled(expand(':p'), 'smt2', 'autoload/smt2/solver.vim') + finish +endif + +" ------------------------------------------------------------------------------ +" Config +" ------------------------------------------------------------------------------ +" If no command for invoking a solver is specified in ~/.vimrc, test if either +" 'z3' or 'boolector' is accessible through $PATH (in that order) +if !exists("g:smt2_solver_command") + if executable("z3") + let g:smt2_solver_command = "z3" + elseif executable("boolector") + let g:smt2_solver_command = "boolector" + endif +endif + +" If no command line switch for printing the solver's version is specified in +" ~/.vimrc, use '--version' +if !exists("g:smt2_solver_version_switch") + let g:smt2_solver_version_switch = "--version" +endif + +" ------------------------------------------------------------------------------ +" Public functions +" ------------------------------------------------------------------------------ +" Invokes the solver on current file +function! smt2#solver#Run() + silent !clear + execute "!" . g:smt2_solver_command . " " . bufname("%") +endfunction + +" Puts the solver's output in new split (replaces old split) +function! smt2#solver#RunAndShowResult() + let output = system(g:smt2_solver_command . " " . bufname("%") . " 2>&1") + + " Create split (or reuse existent) + if exists("s:outputbufnr") && bufwinnr(s:outputbufnr) > 0 + execute bufwinnr(s:outputbufnr) . 'wincmd w' + else + silent! vnew + let s:outputbufnr=bufnr('%') + endif + + " Clear & (re-)fill contents + silent! normal! ggdG + setlocal filetype=smt2 buftype=nofile nobuflisted noswapfile + call append(0, split(output, '\v\n')) + normal! gg +endfunction + +" Requests the solver's version +function! smt2#solver#PrintVersion() + silent !clear + execute "!" . g:smt2_solver_command . " " . g:smt2_solver_version_switch +endfunction diff --git a/autoload/svelte.vim b/autoload/svelte.vim new file mode 100644 index 000000000..60d31469b --- /dev/null +++ b/autoload/svelte.vim @@ -0,0 +1,71 @@ +if polyglot#init#is_disabled(expand(':p'), 'svelte', 'autoload/svelte.vim') + finish +endif + +let s:name = 'vim-svelte-plugin' +let s:debug = exists("g:vim_svelte_plugin_debug") + \ && g:vim_svelte_plugin_debug == 1 + +function! svelte#GetConfig(name, default) + let name = 'g:vim_svelte_plugin_'.a:name + return exists(name) ? eval(name) : a:default +endfunction + +" Since svelte#Log and svelte#GetConfig are always called +" in syntax and indent files, +" this file will be sourced when opening the first svelte file +if exists('##CursorMoved') && exists('*OnChangeSvelteSubtype') + augroup vim_svelte_plugin + autocmd! + autocmd CursorMoved,CursorMovedI,WinEnter *.svelte + \ call s:CheckSubtype() + augroup END + + let s:subtype = '' + function! s:CheckSubtype() + let subtype = GetSvelteSubtype() + + if s:subtype != subtype + call OnChangeSvelteSubtype(subtype) + let s:subtype = subtype + endif + endfunction +endif + +function! s:SynsEOL(lnum) + let lnum = prevnonblank(a:lnum) + let cnum = strlen(getline(lnum)) + return map(synstack(lnum, cnum), 'synIDattr(v:val, "name")') +endfunction + +function! GetSvelteSubtype() + let lnum = line('.') + let cursyns = s:SynsEOL(lnum) + let syn = !empty(cursyns) ? get(cursyns, 0, '') : '' + + let subtype = matchstr(syn, '\w\+\zeSvelte') + if subtype =~ 'css\w\+' + " For cssScss, cssLess, ... + let subtype = subtype[3:] + endif + let subtype = tolower(subtype) + return subtype +endfunction + +function! GetSvelteTag(...) + let lnum = a:0 > 0 ? a:1 : line('.') + let cursyns = s:SynsEOL(lnum) + let syn = get(cursyns, 0, '') + + if syn =~ 'SvelteTemplate' + let tag = 'template' + elseif syn =~ 'SvelteScript' + let tag = 'script' + elseif syn =~ 'SvelteStyle' + let tag = 'style' + else + let tag = '' + endif + + return tag +endfunction diff --git a/autoload/terraform.vim b/autoload/terraform.vim index 05a88e30e..852b261fb 100644 --- a/autoload/terraform.vim +++ b/autoload/terraform.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 +if polyglot#init#is_disabled(expand(':p'), 'terraform', 'autoload/terraform.vim') + finish +endif let s:cpo_save = &cpoptions set cpoptions&vim @@ -18,7 +20,7 @@ function! terraform#fmt() abort let tmpfile = tempname() let shellredir_save = &shellredir let &shellredir = '>%s 2>'.tmpfile - silent execute '%!terraform fmt -no-color -' + silent execute '%!'.g:terraform_binary_path.' fmt -no-color -' let &shellredir = shellredir_save " If there was an error, undo any changes and show stderr. @@ -33,50 +35,34 @@ function! terraform#fmt() abort call winrestview(curw) endfunction -function! terraform#align() abort - let p = '^.*=[^>]*$' - if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p) - let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g')) - let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*')) - Tabularize/=/l1 - normal! 0 - call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.')) - endif -endfunction - function! terraform#commands(ArgLead, CmdLine, CursorPos) abort let commands = [ + \ 'init', + \ 'validate', + \ 'plan', \ 'apply', - \ 'console', \ 'destroy', - \ 'env', + \ 'console', \ 'fmt', + \ 'force-unlock', \ 'get', \ 'graph', \ 'import', - \ 'init', \ 'login', \ 'logout', \ 'output', - \ 'plan', \ 'providers', \ 'refresh', \ 'show', + \ 'state', \ 'taint', + \ 'test', \ 'untaint', - \ 'validate', \ 'version', - \ 'workspace', - \ '0.12upgrade', - \ 'debug', - \ 'force-unlock', - \ 'push', - \ 'state' + \ 'workspace' \ ] return join(commands, "\n") endfunction let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/autoload/unison.vim b/autoload/unison.vim new file mode 100644 index 000000000..292deda6b --- /dev/null +++ b/autoload/unison.vim @@ -0,0 +1,118 @@ +if polyglot#init#is_disabled(expand(':p'), 'unison', 'autoload/unison.vim') + finish +endif + +" Unison functionality for Vim, including type/term omnicompletion. +" +" Maintainer: Unison Computing +" Original Author: Cody Allen (ceedubs) + +if exists('g:autoloaded_unison') + finish +endif +let g:autoloaded_unison = 1 + +let s:required_config_value = "!REQUIRED!" + +" adapted from https://github.com/rust-lang/rust.vim/blob/4aa69b84c8a58fcec6b6dad6fe244b916b1cf830/autoload/rust.vim#L9-L18 +function! s:config(name, default) abort + let name = 'unison_' . a:name + " Local buffer variable with same name takes predeence over global + if has_key(b:, name) + return get(b:, name) + elseif has_key(g:, name) + return get(g:, name) + elseif a:default == s:required_config_value + throw 'Missing required configuration value: ' . name + else + return a:default + endif +endfunction + +function! s:curl_path() abort + return s:config('curl_path', "curl") +endfunction + +function! s:jq_path() abort + return s:config('jq_path', "jq") +endfunction + +function! unison#SetBufferDefaults() abort + if s:config('set_buffer_defaults', 1) + " Since Unison completion is fuzzy and not prefix-based, 'longest' doesn't + " work well, and 'noinsert' behaves a little better. + setlocal completeopt=menuone,noinsert,preview + + setlocal omnifunc=unison#Complete + endif +endfunction + +" Unison completion satisfying the standard vim completion signature, such +" that it can be assigned to omnifunc. +" vim will first call this to find the base input that should be completed, +" and then will call it again with the base input. +function! unison#Complete(findstart, base) abort + if a:findstart + " locate the start of the word + let line = getline('.') + let start = col('.') - 1 + " Examples of where we want to count the start of a word: + " + " foo List.fold + " ^ + " + " {Abor + " ^ + " + " (List.fol + " ^ + while start > 0 && line[start - 1] !~ '\v\s|[!(){}\[\]]' + let start -= 1 + endwhile + return start + else + return unison#CompleteForBase(a:base) + endif +endfunction + +" Return an array of completion items for the provided base input. For example +" base could be 'List.foldL', in which case the top result would probably be +" 'List.foldLeft'. +function! unison#CompleteForBase(base) abort + let resultLimit = s:config('complete_result_limit', 20) + let apiHost = s:config('api_host', 'localhost') + let apiPort = s:config('api_port', s:required_config_value) + let apiToken = s:config('api_token', s:required_config_value) + let apiUri = 'http://' . apiHost . ':' . apiPort . '/' . apiToken . '/api/find' + + let curlCommand = s:curl_path() . " -Gfs + \ --data-urlencode 'limit=" . resultLimit . "' + \ --data-urlencode 'query=" . a:base . "' " + \ . apiUri + + let jqFilter = ' + \ def prettyTermType: .termType|[(.[] | .segment)]|add; + \ def prettyTypeDef: if .tag == "BuiltinObject" then "builtin type " else "" end + (.contents|[(.[] | .segment)]|add); + \ def termToMatch: { + \ word: .bestFoundTermName, + \ info: (.namedTerm.termName + " : " + (.namedTerm|prettyTermType)), + \ menu: .namedTerm|prettyTermType + \ }; + \ def typeToMatch: { + \ word: .bestFoundTypeName, + \ info: (.namedType.typeName + " : " + (.typeDef|prettyTypeDef)), + \ menu: .typeDef|prettyTypeDef + \ }; + \ .[][1]|( + \ (select(.tag == "FoundTermResult")|.contents|termToMatch), + \ (select(.tag == "FoundTypeResult")|.contents|typeToMatch) + \ )' + + let command = curlCommand . " | " . s:jq_path() . " -c '" . jqFilter . "'" + let lines = system(command) + let resultObjects = split(lines, "\n") + call map(resultObjects, {_, val -> json_decode(val)}) + return resultObjects +endfunction + +" vim: set et sw=2 sts=2 ts=2: diff --git a/autoload/vital/_crystal.vim b/autoload/vital/_crystal.vim index 27e1b3104..8cb1d7035 100644 --- a/autoload/vital/_crystal.vim +++ b/autoload/vital/_crystal.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal.vim') + finish +endif let s:_plugin_name = expand(':t:r') @@ -9,5 +11,3 @@ endfunction function! vital#{s:_plugin_name}#function(funcname) abort silent! return function(a:funcname) endfunction - -endif diff --git a/autoload/vital/_crystal/ColorEcho.vim b/autoload/vital/_crystal/ColorEcho.vim index f93c52153..a9b566dd2 100644 --- a/autoload/vital/_crystal/ColorEcho.vim +++ b/autoload/vital/_crystal/ColorEcho.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal/ColorEcho.vim') + finish +endif " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -182,5 +184,3 @@ function! s:echo(str) abort let echorizer = s:get_echorizer(a:str) call echorizer.echo() endfunction - -endif diff --git a/autoload/vital/_crystal/Data/List.vim b/autoload/vital/_crystal/Data/List.vim index 18a7a9477..b61878a01 100644 --- a/autoload/vital/_crystal/Data/List.vim +++ b/autoload/vital/_crystal/Data/List.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal/Data/List.vim') + finish +endif " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -458,5 +460,3 @@ function! s:combinations(list, r) abort endfunction " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Data/String.vim b/autoload/vital/_crystal/Data/String.vim index d5124081e..430718ab5 100644 --- a/autoload/vital/_crystal/Data/String.vim +++ b/autoload/vital/_crystal/Data/String.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal/Data/String.vim') + finish +endif " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -622,5 +624,3 @@ function! s:split_posix_text(text, ...) abort endfunction " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Process.vim b/autoload/vital/_crystal/Process.vim index ecbfc0d4c..1a1ba3cd6 100644 --- a/autoload/vital/_crystal/Process.vim +++ b/autoload/vital/_crystal/Process.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal/Process.vim') + finish +endif " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -167,5 +169,3 @@ endif " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/_crystal/Web/JSON.vim b/autoload/vital/_crystal/Web/JSON.vim index c6892b4ec..4e2df8f7d 100644 --- a/autoload/vital/_crystal/Web/JSON.vim +++ b/autoload/vital/_crystal/Web/JSON.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/_crystal/Web/JSON.vim') + finish +endif " ___vital___ " NOTE: lines between '" ___vital___' is generated by :Vitalize. @@ -173,5 +175,3 @@ endfunction " @vimlint(EVL102, 0, l:ns) " vim:set et ts=2 sts=2 sw=2 tw=0: - -endif diff --git a/autoload/vital/crystal.vim b/autoload/vital/crystal.vim index e1fb611b6..50f7ce750 100644 --- a/autoload/vital/crystal.vim +++ b/autoload/vital/crystal.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'autoload/vital/crystal.vim') + finish +endif let s:plugin_name = expand(':t:r') let s:vital_base_dir = expand(':h') @@ -328,5 +330,3 @@ else return a:list endfunction endif - -endif diff --git a/autoload/vital/crystal.vital b/autoload/vital/crystal.vital index 4a13eb01f..0ad94eb54 100644 --- a/autoload/vital/crystal.vital +++ b/autoload/vital/crystal.vital @@ -1,10 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 - crystal bee84ae23effb0510137ad177e98c94d8b3657a6 Process Web.JSON ColorEcho - -endif diff --git a/autoload/xml/aria.vim b/autoload/xml/aria.vim index 4fbd25d92..d2f8abe84 100644 --- a/autoload/xml/aria.vim +++ b/autoload/xml/aria.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if polyglot#init#is_disabled(expand(':p'), 'html5', 'autoload/xml/aria.vim') + finish +endif " Vim completion for WAI-ARIA data file " Language: HTML + WAI-ARIA @@ -457,5 +459,3 @@ let g:xmldata_aria = { \ 'default_role': default_role, \ 'vimariaattrinfo': aria_attributes_value \ } - -endif diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim index a20fd4f96..0df1bd0ac 100644 --- a/autoload/xml/html5.vim +++ b/autoload/xml/html5.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if polyglot#init#is_disabled(expand(':p'), 'html5', 'autoload/xml/html5.vim') + finish +endif " Vim completion for HTML5 data file " Language: HTML (version 5.1 Draft 2016 Jan 13) @@ -875,5 +877,3 @@ let g:xmldata_html5 = { \ 'wbr': ['/>', ''], \ }, \ } - -endif diff --git a/autoload/xml/xsd.vim b/autoload/xml/xsd.vim new file mode 100644 index 000000000..fdabdc5ab --- /dev/null +++ b/autoload/xml/xsd.vim @@ -0,0 +1,134 @@ +if polyglot#init#is_disabled(expand(':p'), 'xsd', 'autoload/xml/xsd.vim') + finish +endif + +" Author: Thomas Barthel +" Last change: 2007 May 8 +let g:xmldata_xsd = { + \ 'schema': [ + \ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'], + \ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }], + \ 'redefine' : [ + \ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'], + \ {'schemaLocation' : [], 'id' : []} ], + \ 'include' : [ + \ ['annotation'], + \ {'namespace' : [], 'id' : []} ], + \ 'import' : [ + \ ['annotation'], + \ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ], + \ 'complexType' : [ + \ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'], + \ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ], + \ 'complexContent' : [ + \ ['annotation', 'restriction', 'extension'], + \ {'mixed' : [], 'id' : [] } ], + \ 'simpleType' : [ + \ ['annotation', 'restriction', 'list', 'union'], + \ {'name' : [], 'final' : [], 'id' : []} ], + \ 'simpleContent' : [ + \ ['annotation', 'restriction', 'extension'], + \ {'id' : []} ], + \ 'element' : [ + \ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'], + \ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ], + \ 'attribute' : [ + \ ['annotation', 'simpleType'], + \ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ], + \ 'group' : [ + \ ['annotation', 'all', 'choice', 'sequence'], + \ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ], + \ 'choice' : [ + \ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'], + \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ], + \ 'sequence' : [ + \ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'], + \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ], + \ 'all' : [ + \ ['annotation', 'element'], + \ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ], + \ 'any' : [ + \ ['annotation'], + \ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ], + \ 'unique' : [ + \ ['annotation', 'selector', 'field'], + \ {'name' : [], 'id' : []} ], + \ 'key' : [ + \ ['annotation', 'selector', 'field'], + \ {'name' : [], 'id' : []} ], + \ 'keyref' : [ + \ ['annotation', 'selector', 'field'], + \ {'name' : [], 'refer' : [], 'id' : []} ], + \ 'selector' : [ + \ ['annotation'], + \ {'xpath' : [], 'id' : []} ], + \ 'field' : [ + \ ['annotation'], + \ {'xpath' : [], 'id' : []} ], + \ 'restriction' : [ + \ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'], + \ {'base' : [], 'id' : []} ], + \ 'minExclusive' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'maxExclusive' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'minInclusive' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'maxInclusive' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'totalDigits' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'fractionDigits' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'length' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'minLength' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'maxLength' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'enumeration' : [ + \ ['annotation'], + \ {'value' : [], 'id' : []}], + \ 'whiteSpace' : [ + \ ['annotation'], + \ {'value' : [], 'id' : [], 'fixed' : []}], + \ 'pattern' : [ + \ ['annotation'], + \ {'value' : [], 'id' : []}], + \ 'extension' : [ + \ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'], + \ {'base' : [], 'id' : []} ], + \ 'attributeGroup' : [ + \ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'], + \ {'name' : [], 'id' : [], 'ref' : []} ], + \ 'anyAttribute' : [ + \ ['annotation'], + \ {'namespace' : [], 'processContents' : [], 'id' : []} ], + \ 'list' : [ + \ ['annotation', 'simpleType'], + \ {'itemType' : [], 'id' : []} ], + \ 'union' : [ + \ ['annotation', 'simpleType'], + \ {'id' : [], 'memberTypes' : []} ], + \ 'notation' : [ + \ ['annotation'], + \ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ], + \ 'annotation' : [ + \ ['appinfo', 'documentation'], + \ {} ], + \ 'appinfo' : [ + \ [], + \ {'source' : [], 'id' : []} ], + \ 'documentation' : [ + \ [], + \ {'source' : [], 'id' : [], 'xml' : []} ] + \ } diff --git a/autoload/yats.vim b/autoload/yats.vim new file mode 100644 index 000000000..e810937eb --- /dev/null +++ b/autoload/yats.vim @@ -0,0 +1,20 @@ +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'autoload/yats.vim') + finish +endif + +" Regex of syntax group names that are strings or documentation. +let s:syng_multiline = 'comment\c' + +" Regex of syntax group names that are line comment. +let s:syng_linecom = 'linecomment\c' + +" Check if the character at lnum:col is inside a multi-line comment. +function yats#IsInMultilineComment(lnum, col) + return !yats#IsLineComment(a:lnum, a:col) && synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_multiline +endfunction + +" Check if the character at lnum:col is a line comment. +function yats#IsLineComment(lnum, col) + return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_linecom +endfunction + diff --git a/autoload/zig/config.vim b/autoload/zig/config.vim deleted file mode 100644 index 328ba100b..000000000 --- a/autoload/zig/config.vim +++ /dev/null @@ -1,43 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 - -function! zig#config#ListTypeCommands() abort - return get(g:, 'zig_list_type_commands', {}) -endfunction - -function! zig#config#ListType() abort - return get(g:, 'zig_list_type', '') -endfunction - -function! zig#config#ListAutoclose() abort - return get(g:, 'zig_list_autoclose', 1) -endfunction - -function! zig#config#ListHeight() abort - return get(g:, "zig_list_height", 0) -endfunction - -function! zig#config#FmtAutosave() abort - return get(g:, "zig_fmt_autosave", 0) -endfunction - -function! zig#config#SetFmtAutosave(value) abort - let g:zig_fmt_autosave = a:value -endfunction - -function! zig#config#FmtCommand() abort - return get(g:, "zig_fmt_command", ['zig', 'fmt', '--color', 'off']) -endfunction - -function! zig#config#FmtFailSilently() abort - return get(g:, "zig_fmt_fail_silently", 0) -endfunction - -function! zig#config#FmtExperimental() abort - return get(g:, "zig_fmt_experimental", 0) -endfunction - -function! zig#config#Debug() abort - return get(g:, 'zig_debug', []) -endfunction - -endif diff --git a/autoload/zig/fmt.vim b/autoload/zig/fmt.vim index d3aa9641f..e2e3059ab 100644 --- a/autoload/zig/fmt.vim +++ b/autoload/zig/fmt.vim @@ -1,131 +1,91 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 +if polyglot#init#is_disabled(expand(':p'), 'zig', 'autoload/zig/fmt.vim') + finish +endif " Adapted from fatih/vim-go: autoload/go/fmt.vim " " Copyright 2011 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style " license that can be found in the LICENSE file. -" -function! zig#fmt#Format() abort - if zig#config#FmtExperimental() - " Using winsaveview to save/restore cursor state has the problem of - " closing folds on save: - " https://github.com/fatih/vim-go/issues/502 - " One fix is to use mkview instead. Unfortunately, this sometimes causes - " other bad side effects: - " https://github.com/fatih/vim-go/issues/728 - " and still closes all folds if foldlevel>0: - " https://github.com/fatih/vim-go/issues/732 - let l:curw = {} - try - mkview! - catch - let l:curw = winsaveview() - endtry - - " save our undo file to be restored after we are done. This is needed to - " prevent an additional undo jump due to BufWritePre auto command and also - " restore 'redo' history because it's getting being destroyed every - " BufWritePre - let tmpundofile = tempname() - exe 'wundo! ' . tmpundofile - else - " Save cursor position and many other things. - let l:curw = winsaveview() - endif +function! zig#fmt#Format() abort " Save cursor position and many other things. - let l:curw = winsaveview() + let view = winsaveview() - let bin_name = zig#config#FmtCommand() - - " Get current position in file - let current_col = col('.') - let orig_line_count = line('$') - - " Save current buffer first, else fmt will run on the original file and we - " will lose our changes. - silent! execute 'write' expand('%') - - let [l:out, l:err] = zig#fmt#run(bin_name, expand('%')) - - if l:err == 0 - call zig#fmt#update_file(expand('%')) - elseif !zig#config#FmtFailSilently() - let errors = s:parse_errors(expand('%'), out) - call s:show_errors(errors) + if !executable('zig') + echohl Error | echomsg "no zig binary found in PATH" | echohl None + return endif - let diff_offset = line('$') - orig_line_count - - if zig#config#FmtExperimental() - " restore our undo history - silent! exe 'rundo ' . tmpundofile - call delete(tmpundofile) + let cmdline = 'zig fmt --stdin --ast-check' + let current_buf = bufnr('') - " Restore our cursor/windows positions, folds, etc. - if empty(l:curw) - silent! loadview - else - call winrestview(l:curw) - endif + " The formatted code is output on stdout, the errors go on stderr. + if exists('*systemlist') + silent let out = systemlist(cmdline, current_buf) else - " Restore our cursor/windows positions. - call winrestview(l:curw) + silent let out = split(system(cmdline, current_buf)) + endif + if len(out) == 1 + if out[0] == "error: unrecognized parameter: '--ast-check'" + let cmdline = 'zig fmt --stdin' + if exists('*systemlist') + silent let out = systemlist(cmdline, current_buf) + else + silent let out = split(system(cmdline, current_buf)) + endif + endif endif + let err = v:shell_error - " be smart and jump to the line the new statement was added/removed - call cursor(line('.') + diff_offset, current_col) - " Syntax highlighting breaks less often. - syntax sync fromstart -endfunction + if err == 0 + " remove undo point caused via BufWritePre. + try | silent undojoin | catch | endtry -" update_file updates the target file with the given formatted source -function! zig#fmt#update_file(target) - " remove undo point caused via BufWritePre - try | silent undojoin | catch | endtry + " Replace the file content with the formatted version. + if exists('*deletebufline') + call deletebufline(current_buf, len(out), line('$')) + else + silent execute ':' . len(out) . ',' . line('$') . ' delete _' + endif + call setline(1, out) - " reload buffer to reflect latest changes - silent edit! + " No errors detected, close the loclist. + call setloclist(0, [], 'r') + lclose + elseif get(g:, 'zig_fmt_parse_errors', 1) + let errors = s:parse_errors(expand('%'), out) - let l:listtype = zig#list#Type("ZigFmt") + call setloclist(0, [], 'r', { + \ 'title': 'Errors', + \ 'items': errors, + \ }) - " the title information was introduced with 7.4-2200 - " https://github.com/vim/vim/commit/d823fa910cca43fec3c31c030ee908a14c272640 - if has('patch-7.4.2200') - " clean up previous list - if l:listtype == "quickfix" - let l:list_title = getqflist({'title': 1}) - else - let l:list_title = getloclist(0, {'title': 1}) - endif - else - " can't check the title, so assume that the list was for go fmt. - let l:list_title = {'title': 'Format'} + let max_win_height = get(g:, 'zig_fmt_max_window_height', 5) + " Prevent the loclist from becoming too long. + let win_height = min([max_win_height, len(errors)]) + " Open the loclist, but only if there's at least one error to show. + execute 'silent! lwindow ' . win_height endif - if has_key(l:list_title, "title") && l:list_title['title'] == "Format" - call zig#list#Clean(l:listtype) + call winrestview(view) + + if err != 0 + echohl Error | echomsg "zig fmt returned error" | echohl None + return endif -endfunction -" run runs the gofmt/goimport command for the given source file and returns -" the output of the executed command. Target is the real file to be formatted. -function! zig#fmt#run(bin_name, target) - let l:cmd = [] - call extend(cmd, a:bin_name) - call extend(cmd, [a:target]) - return zig#util#Exec(l:cmd) + " Run the syntax highlighter on the updated content and recompute the folds if + " needed. + syntax sync fromstart endfunction " parse_errors parses the given errors and returns a list of parsed errors -function! s:parse_errors(filename, content) abort - let splitted = split(a:content, '\n') - +function! s:parse_errors(filename, lines) abort " list of errors to be put into location list let errors = [] - for line in splitted + for line in a:lines let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)') if !empty(tokens) call add(errors,{ @@ -139,32 +99,4 @@ function! s:parse_errors(filename, content) abort return errors endfunction - -" show_errors opens a location list and shows the given errors. If the given -" errors is empty, it closes the the location list -function! s:show_errors(errors) abort - let l:listtype = zig#list#Type("ZigFmt") - if !empty(a:errors) - call zig#list#Populate(l:listtype, a:errors, 'Format') - echohl Error | echomsg "zig fmt returned error" | echohl None - endif - - " this closes the window if there are no errors or it opens - " it if there is any - call zig#list#Window(l:listtype, len(a:errors)) -endfunction - -function! zig#fmt#ToggleFmtAutoSave() abort - if zig#config#FmtAutosave() - call zig#config#SetFmtAutosave(0) - call zig#util#EchoProgress("auto fmt disabled") - return - end - - call zig#config#SetFmtAutosave(1) - call zig#util#EchoProgress("auto fmt enabled") -endfunction - " vim: sw=2 ts=2 et - -endif diff --git a/autoload/zig/list.vim b/autoload/zig/list.vim deleted file mode 100644 index bdd433769..000000000 --- a/autoload/zig/list.vim +++ /dev/null @@ -1,162 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 - -" Adapted from fatih/vim-go: autoload/go/list.vim -" -" Copyright 2011 The Go Authors. All rights reserved. -" Use of this source code is governed by a BSD-style -" license that can be found in the LICENSE file. -" - -" Window opens the list with the given height up to 10 lines maximum. -" Otherwise g:zig_loclist_height is used. -" -" If no or zero height is given it closes the window by default. -" To prevent this, set g:zig_list_autoclose = 0 -function! zig#list#Window(listtype, ...) abort - " we don't use lwindow to close the location list as we need also the - " ability to resize the window. So, we are going to use lopen and lclose - " for a better user experience. If the number of errors in a current - " location list increases/decreases, cwindow will not resize when a new - " updated height is passed. lopen in the other hand resizes the screen. - if !a:0 || a:1 == 0 - call zig#list#Close(a:listtype) - return - endif - - let height = zig#config#ListHeight() - if height == 0 - " prevent creating a large location height for a large set of numbers - if a:1 > 10 - let height = 10 - else - let height = a:1 - endif - endif - - if a:listtype == "locationlist" - exe 'lopen ' . height - else - exe 'copen ' . height - endif -endfunction - - -" Get returns the current items from the list -function! zig#list#Get(listtype) abort - if a:listtype == "locationlist" - return getloclist(0) - else - return getqflist() - endif -endfunction - -" Populate populate the list with the given items -function! zig#list#Populate(listtype, items, title) abort - if a:listtype == "locationlist" - call setloclist(0, a:items, 'r') - - " The last argument ({what}) is introduced with 7.4.2200: - " https://github.com/vim/vim/commit/d823fa910cca43fec3c31c030ee908a14c272640 - if has("patch-7.4.2200") | call setloclist(0, [], 'a', {'title': a:title}) | endif - else - call setqflist(a:items, 'r') - if has("patch-7.4.2200") | call setqflist([], 'a', {'title': a:title}) | endif - endif -endfunction - -" Parse parses the given items based on the specified errorformat and -" populates the list. -function! zig#list#ParseFormat(listtype, errformat, items, title) abort - " backup users errorformat, will be restored once we are finished - let old_errorformat = &errorformat - - " parse and populate the location list - let &errorformat = a:errformat - try - call zig#list#Parse(a:listtype, a:items, a:title) - finally - "restore back - let &errorformat = old_errorformat - endtry -endfunction - -" Parse parses the given items based on the global errorformat and -" populates the list. -function! zig#list#Parse(listtype, items, title) abort - if a:listtype == "locationlist" - lgetexpr a:items - if has("patch-7.4.2200") | call setloclist(0, [], 'a', {'title': a:title}) | endif - else - cgetexpr a:items - if has("patch-7.4.2200") | call setqflist([], 'a', {'title': a:title}) | endif - endif -endfunction - -" JumpToFirst jumps to the first item in the location list -function! zig#list#JumpToFirst(listtype) abort - if a:listtype == "locationlist" - ll 1 - else - cc 1 - endif -endfunction - -" Clean cleans and closes the location list -function! zig#list#Clean(listtype) abort - if a:listtype == "locationlist" - lex [] - else - cex [] - endif - - call zig#list#Close(a:listtype) -endfunction - -" Close closes the location list -function! zig#list#Close(listtype) abort - let autoclose_window = zig#config#ListAutoclose() - if !autoclose_window - return - endif - - if a:listtype == "locationlist" - lclose - else - cclose - endif -endfunction - -function! s:listtype(listtype) abort - let listtype = zig#config#ListType() - if empty(listtype) - return a:listtype - endif - - return listtype -endfunction - -" s:default_list_type_commands is the defaults that will be used for each of -" the supported commands (see documentation for g:zig_list_type_commands). When -" defining a default, quickfix should be used if the command operates on -" multiple files, while locationlist should be used if the command operates on a -" single file or buffer. Keys that begin with an underscore are not supported -" in g:zig_list_type_commands. -let s:default_list_type_commands = { - \ "ZigFmt": "locationlist", - \ } - -function! zig#list#Type(for) abort - let l:listtype = s:listtype(get(s:default_list_type_commands, a:for)) - if l:listtype == "0" - call zig#util#EchoError(printf( - \ "unknown list type command value found ('%s'). Please open a bug report in the zig.vim repo.", - \ a:for)) - let l:listtype = "quickfix" - endif - - return get(zig#config#ListTypeCommands(), a:for, l:listtype) -endfunction - -" vim: sw=2 ts=2 et - -endif diff --git a/autoload/zig/util.vim b/autoload/zig/util.vim deleted file mode 100644 index bc454dd98..000000000 --- a/autoload/zig/util.vim +++ /dev/null @@ -1,394 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 - -" Adapted from vim-go: autoload/go/util.vim -" -" Copyright 2011 The Go Authors. All rights reserved. -" Use of this source code is governed by a BSD-style -" license that can be found in the LICENSE file. -" - -" PathSep returns the appropriate OS specific path separator. -function! zig#util#PathSep() abort - if zig#util#IsWin() - return '\' - endif - return '/' -endfunction - -" PathListSep returns the appropriate OS specific path list separator. -function! zig#util#PathListSep() abort - if zig#util#IsWin() - return ";" - endif - return ":" -endfunction - -" LineEnding returns the correct line ending, based on the current fileformat -function! zig#util#LineEnding() abort - if &fileformat == 'dos' - return "\r\n" - elseif &fileformat == 'mac' - return "\r" - endif - - return "\n" -endfunction - -" Join joins any number of path elements into a single path, adding a -" Separator if necessary and returns the result -function! zig#util#Join(...) abort - return join(a:000, zig#util#PathSep()) -endfunction - -" IsWin returns 1 if current OS is Windows or 0 otherwise -function! zig#util#IsWin() abort - let win = ['win16', 'win32', 'win64', 'win95'] - for w in win - if (has(w)) - return 1 - endif - endfor - - return 0 -endfunction - -" IsMac returns 1 if current OS is macOS or 0 otherwise. -function! zig#util#IsMac() abort - return has('mac') || - \ has('macunix') || - \ has('gui_macvim') || - \ zig#util#Exec(['uname'])[0] =~? '^darwin' -endfunction - - " Checks if using: - " 1) Windows system, - " 2) And has cygpath executable, - " 3) And uses *sh* as 'shell' -function! zig#util#IsUsingCygwinShell() - return zig#util#IsWin() && executable('cygpath') && &shell =~ '.*sh.*' -endfunction - -" Check if Vim jobs API is supported. -" -" The (optional) first paramter can be added to indicate the 'cwd' or 'env' -" parameters will be used, which wasn't added until a later version. -function! zig#util#has_job(...) abort - " cwd and env parameters to job_start was added in this version. - if a:0 > 0 && a:1 is 1 - return has('job') && has("patch-8.0.0902") - endif - - " job was introduced in 7.4.xxx however there are multiple bug fixes and one - " of the latest is 8.0.0087 which is required for a stable async API. - return has('job') && has("patch-8.0.0087") -endfunction - -let s:env_cache = {} - -" env returns the go environment variable for the given key. Where key can be -" GOARCH, GOOS, GOROOT, etc... It caches the result and returns the cached -" version. -function! zig#util#env(key) abort - let l:key = tolower(a:key) - if has_key(s:env_cache, l:key) - return s:env_cache[l:key] - endif - - if executable('go') - let l:var = call('zig#util#'.l:key, []) - if zig#util#ShellError() != 0 - call zig#util#EchoError(printf("'go env %s' failed", toupper(l:key))) - return '' - endif - else - let l:var = eval("$".toupper(a:key)) - endif - - let s:env_cache[l:key] = l:var - return l:var -endfunction - -" Run a shell command. -" -" It will temporary set the shell to /bin/sh for Unix-like systems if possible, -" so that we always use a standard POSIX-compatible Bourne shell (and not e.g. -" csh, fish, etc.) See #988 and #1276. -function! s:system(cmd, ...) abort - " Preserve original shell and shellredir values - let l:shell = &shell - let l:shellredir = &shellredir - - if !zig#util#IsWin() && executable('/bin/sh') - set shell=/bin/sh shellredir=>%s\ 2>&1 - endif - - try - return call('system', [a:cmd] + a:000) - finally - " Restore original values - let &shell = l:shell - let &shellredir = l:shellredir - endtry -endfunction - -" System runs a shell command "str". Every arguments after "str" is passed to -" stdin. -function! zig#util#System(str, ...) abort - return call('s:system', [a:str] + a:000) -endfunction - -" Exec runs a shell command "cmd", which must be a list, one argument per item. -" Every list entry will be automatically shell-escaped -" Every other argument is passed to stdin. -function! zig#util#Exec(cmd, ...) abort - if len(a:cmd) == 0 - call zig#util#EchoError("zig#util#Exec() called with empty a:cmd") - return ['', 1] - endif - - let l:bin = a:cmd[0] - - if !executable(l:bin) - call zig#util#EchoError(printf("could not find binary '%s'", a:cmd[0])) - return ['', 1] - endif - - return call('s:exec', [a:cmd] + a:000) -endfunction - -function! s:exec(cmd, ...) abort - let l:bin = a:cmd[0] - let l:cmd = zig#util#Shelljoin([l:bin] + a:cmd[1:]) - if zig#util#HasDebug('shell-commands') - call zig#util#EchoInfo('shell command: ' . l:cmd) - endif - - let l:out = call('s:system', [l:cmd] + a:000) - return [l:out, zig#util#ShellError()] -endfunction - -function! zig#util#ShellError() abort - return v:shell_error -endfunction - -" StripPath strips the path's last character if it's a path separator. -" example: '/foo/bar/' -> '/foo/bar' -function! zig#util#StripPathSep(path) abort - let last_char = strlen(a:path) - 1 - if a:path[last_char] == zig#util#PathSep() - return strpart(a:path, 0, last_char) - endif - - return a:path -endfunction - -" StripTrailingSlash strips the trailing slash from the given path list. -" example: ['/foo/bar/'] -> ['/foo/bar'] -function! zig#util#StripTrailingSlash(paths) abort - return map(copy(a:paths), 'zig#util#StripPathSep(v:val)') -endfunction - -" Shelljoin returns a shell-safe string representation of arglist. The -" {special} argument of shellescape() may optionally be passed. -function! zig#util#Shelljoin(arglist, ...) abort - try - let ssl_save = &shellslash - set noshellslash - if a:0 - return join(map(copy(a:arglist), 'shellescape(v:val, ' . a:1 . ')'), ' ') - endif - - return join(map(copy(a:arglist), 'shellescape(v:val)'), ' ') - finally - let &shellslash = ssl_save - endtry -endfunction - -fu! zig#util#Shellescape(arg) - try - let ssl_save = &shellslash - set noshellslash - return shellescape(a:arg) - finally - let &shellslash = ssl_save - endtry -endf - -" Shelllist returns a shell-safe representation of the items in the given -" arglist. The {special} argument of shellescape() may optionally be passed. -function! zig#util#Shelllist(arglist, ...) abort - try - let ssl_save = &shellslash - set noshellslash - if a:0 - return map(copy(a:arglist), 'shellescape(v:val, ' . a:1 . ')') - endif - return map(copy(a:arglist), 'shellescape(v:val)') - finally - let &shellslash = ssl_save - endtry -endfunction - -" Returns the byte offset for line and column -function! zig#util#Offset(line, col) abort - if &encoding != 'utf-8' - let sep = zig#util#LineEnding() - let buf = a:line == 1 ? '' : (join(getline(1, a:line-1), sep) . sep) - let buf .= a:col == 1 ? '' : getline('.')[:a:col-2] - return len(iconv(buf, &encoding, 'utf-8')) - endif - return line2byte(a:line) + (a:col-2) -endfunction -" -" Returns the byte offset for the cursor -function! zig#util#OffsetCursor() abort - return zig#util#Offset(line('.'), col('.')) -endfunction - -" Windo is like the built-in :windo, only it returns to the window the command -" was issued from -function! zig#util#Windo(command) abort - let s:currentWindow = winnr() - try - execute "windo " . a:command - finally - execute s:currentWindow. "wincmd w" - unlet s:currentWindow - endtry -endfunction - -" snippetcase converts the given word to given preferred snippet setting type -" case. -function! zig#util#snippetcase(word) abort - let l:snippet_case = zig#config#AddtagsTransform() - if l:snippet_case == "snakecase" - return zig#util#snakecase(a:word) - elseif l:snippet_case == "camelcase" - return zig#util#camelcase(a:word) - else - return a:word " do nothing - endif -endfunction - -" snakecase converts a string to snake case. i.e: FooBar -> foo_bar -" Copied from tpope/vim-abolish -function! zig#util#snakecase(word) abort - let word = substitute(a:word, '::', '/', 'g') - let word = substitute(word, '\(\u\+\)\(\u\l\)', '\1_\2', 'g') - let word = substitute(word, '\(\l\|\d\)\(\u\)', '\1_\2', 'g') - let word = substitute(word, '[.-]', '_', 'g') - let word = tolower(word) - return word -endfunction - -" camelcase converts a string to camel case. e.g. FooBar or foo_bar will become -" fooBar. -" Copied from tpope/vim-abolish. -function! zig#util#camelcase(word) abort - let word = substitute(a:word, '-', '_', 'g') - if word !~# '_' && word =~# '\l' - return substitute(word, '^.', '\l&', '') - else - return substitute(word, '\C\(_\)\=\(.\)', '\=submatch(1)==""?tolower(submatch(2)) : toupper(submatch(2))','g') - endif -endfunction - -" pascalcase converts a string to 'PascalCase'. e.g. fooBar or foo_bar will -" become FooBar. -function! zig#util#pascalcase(word) abort - let word = zig#util#camelcase(a:word) - return toupper(word[0]) . word[1:] -endfunction - -" Echo a message to the screen and highlight it with the group in a:hi. -" -" The message can be a list or string; every line with be :echomsg'd separately. -function! s:echo(msg, hi) - let l:msg = [] - if type(a:msg) != type([]) - let l:msg = split(a:msg, "\n") - else - let l:msg = a:msg - endif - - " Tabs display as ^I or <09>, so manually expand them. - let l:msg = map(l:msg, 'substitute(v:val, "\t", " ", "")') - - exe 'echohl ' . a:hi - for line in l:msg - echom "zig.vim: " . line - endfor - echohl None -endfunction - -function! zig#util#EchoSuccess(msg) - call s:echo(a:msg, 'Function') -endfunction -function! zig#util#EchoError(msg) - call s:echo(a:msg, 'ErrorMsg') -endfunction -function! zig#util#EchoWarning(msg) - call s:echo(a:msg, 'WarningMsg') -endfunction -function! zig#util#EchoProgress(msg) - redraw - call s:echo(a:msg, 'Identifier') -endfunction -function! zig#util#EchoInfo(msg) - call s:echo(a:msg, 'Debug') -endfunction - -" Get all lines in the buffer as a a list. -function! zig#util#GetLines() - let buf = getline(1, '$') - if &encoding != 'utf-8' - let buf = map(buf, 'iconv(v:val, &encoding, "utf-8")') - endif - if &l:fileformat == 'dos' - " XXX: line2byte() depend on 'fileformat' option. - " so if fileformat is 'dos', 'buf' must include '\r'. - let buf = map(buf, 'v:val."\r"') - endif - return buf -endfunction - -" Make a named temporary directory which starts with "prefix". -" -" Unfortunately Vim's tempname() is not portable enough across various systems; -" see: https://github.com/mattn/vim-go/pull/3#discussion_r138084911 -function! zig#util#tempdir(prefix) abort - " See :help tempfile - if zig#util#IsWin() - let l:dirs = [$TMP, $TEMP, 'c:\tmp', 'c:\temp'] - else - let l:dirs = [$TMPDIR, '/tmp', './', $HOME] - endif - - let l:dir = '' - for l:d in dirs - if !empty(l:d) && filewritable(l:d) == 2 - let l:dir = l:d - break - endif - endfor - - if l:dir == '' - call zig#util#EchoError('Unable to find directory to store temporary directory in') - return - endif - - " Not great randomness, but "good enough" for our purpose here. - let l:rnd = sha256(printf('%s%s', localtime(), fnamemodify(bufname(''), ":p"))) - let l:tmp = printf("%s/%s%s", l:dir, a:prefix, l:rnd) - call mkdir(l:tmp, 'p', 0700) - return l:tmp -endfunction - -" Report if the user enabled a debug flag in g:zig_debug. -function! zig#util#HasDebug(flag) - return index(zig#config#Debug(), a:flag) >= 0 -endfunction - -" vim: sw=2 ts=2 et - -endif diff --git a/compiler/ant.vim b/compiler/ant.vim index ddb9e7465..c46491f80 100644 --- a/compiler/ant.vim +++ b/compiler/ant.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ant', 'compiler/ant.vim') + finish +endif " Vim Compiler File " Compiler: ant @@ -38,5 +40,3 @@ CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m, let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/bdf.vim b/compiler/bdf.vim new file mode 100644 index 000000000..997d685ba --- /dev/null +++ b/compiler/bdf.vim @@ -0,0 +1,26 @@ +if polyglot#init#is_disabled(expand(':p'), 'bdf', 'compiler/bdf.vim') + finish +endif + +" Vim compiler file +" Compiler: BDF to PCF Conversion +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("current_compiler") + finish +endif +let current_compiler = "bdf" + +let s:cpo_save = &cpo +set cpo-=C + +setlocal makeprg=bdftopcf\ $* + +setlocal errorformat=%ABDF\ %trror\ on\ line\ %l:\ %m, + \%-Z%p^, + \%Cbdftopcf:\ bdf\ input\\,\ %f\\,\ corrupt, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/compiler/cake.vim b/compiler/cake.vim index 9cd45dbbc..a761282c4 100644 --- a/compiler/cake.vim +++ b/compiler/cake.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 +if polyglot#init#is_disabled(expand(':p'), 'coffee-script', 'compiler/cake.vim') + finish +endif " Language: CoffeeScript " Maintainer: Mick Koch @@ -15,5 +17,3 @@ call coffee#CoffeeSetUpVariables() exec 'CompilerSet makeprg=' . escape(g:coffee_cake . ' ' . \ g:coffee_cake_options . ' $*', ' ') call coffee#CoffeeSetUpErrorFormat() - -endif diff --git a/compiler/cargo.vim b/compiler/cargo.vim index a82713616..f5854a4d1 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'compiler/cargo.vim') + finish +endif " Vim compiler file " Compiler: Cargo Compiler @@ -36,10 +38,12 @@ augroup END " Ignore general cargo progress messages CompilerSet errorformat+= \%-G%\\s%#Downloading%.%#, + \%-G%\\s%#Checking%.%#, \%-G%\\s%#Compiling%.%#, \%-G%\\s%#Finished%.%#, \%-G%\\s%#error:\ Could\ not\ compile\ %.%#, \%-G%\\s%#To\ learn\ more\\,%.%#, + \%-G%\\s%#For\ more\ information\ about\ this\ error\\,%.%#, \%-Gnote:\ Run\ with\ \`RUST_BACKTRACE=%.%#, \%.%#panicked\ at\ \\'%m\\'\\,\ %f:%l:%c @@ -49,5 +53,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/coffee.vim b/compiler/coffee.vim index d4a112c58..28aff34e6 100644 --- a/compiler/coffee.vim +++ b/compiler/coffee.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 +if polyglot#init#is_disabled(expand(':p'), 'coffee-script', 'compiler/coffee.vim') + finish +endif " Language: CoffeeScript " Maintainer: Mick Koch @@ -82,5 +84,3 @@ augroup CoffeeUpdateMakePrg autocmd BufWritePre,BufFilePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/credo.vim b/compiler/credo.vim index 271dc67d6..ca7bfc228 100644 --- a/compiler/credo.vim +++ b/compiler/credo.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'compiler/credo.vim') + finish +endif if exists('current_compiler') finish @@ -11,5 +13,3 @@ endif CompilerSet errorformat=%f:%l:%c:\ %t:\ %m,%f:%l:\ %t:\ %m CompilerSet makeprg=mix\ credo\ suggest\ --format=flycheck - -endif diff --git a/compiler/cryptol.vim b/compiler/cryptol.vim index d355f1888..2855c0da2 100644 --- a/compiler/cryptol.vim +++ b/compiler/cryptol.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cryptol', 'compiler/cryptol.vim') + finish +endif " Vim compiler file " Compiler: Cryptol version 1.8.19-academic Compiler @@ -20,5 +22,3 @@ CompilerSet errorformat& " use the default 'errorformat' " "%<" means the current file name without extension. CompilerSet makeprg=cryptol\ -o\ %<\ % - -endif diff --git a/compiler/cs.vim b/compiler/cs.vim new file mode 100644 index 000000000..5b34a4376 --- /dev/null +++ b/compiler/cs.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'cs', 'compiler/cs.vim') + finish +endif + +" Vim compiler file +" Compiler: Microsoft Visual Studio C# +" Maintainer: Yichao Zhou (broken.zhou@gmail.com) +" Previous Maintainer: Joseph H. Yao (hyao@sina.com) +" Last Change: Jul 22, 2019 + +if exists("current_compiler") + finish +endif +let current_compiler = "cs" +let s:keepcpo= &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet errorformat& +CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m, + \%trror%*[^:]:\ %m, + \%tarning%*[^:]:\ %m + +CompilerSet makeprg=csc\ %:S + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/compiler/cucumber.vim b/compiler/cucumber.vim index af5dd4b6b..e43f553af 100644 --- a/compiler/cucumber.vim +++ b/compiler/cucumber.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cucumber', 'compiler/cucumber.vim') + finish +endif " Vim compiler file " Compiler: Cucumber @@ -29,5 +31,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/dot.vim b/compiler/dot.vim new file mode 100644 index 000000000..3773f89af --- /dev/null +++ b/compiler/dot.vim @@ -0,0 +1,19 @@ +if polyglot#init#is_disabled(expand(':p'), 'dot', 'compiler/dot.vim') + finish +endif + +" Vim compiler file +" Compiler: ATT dot +" Maintainer: Marcos Macedo +" Last Change: 2004 May 16 + +if exists("current_compiler") + finish +endif +let current_compiler = "dot" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet makeprg=dot\ -T$*\ \"%:p\"\ -o\ \"%:p:r.$*\" diff --git a/compiler/eruby.vim b/compiler/eruby.vim index a2957379b..bd5a16d01 100644 --- a/compiler/eruby.vim +++ b/compiler/eruby.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'compiler/eruby.vim') + finish +endif " Vim compiler file " Language: eRuby @@ -39,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/exunit.vim b/compiler/exunit.vim index 091506838..6381308f7 100644 --- a/compiler/exunit.vim +++ b/compiler/exunit.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'compiler/exunit.vim') + finish +endif if exists("current_compiler") finish @@ -25,5 +27,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/fish.vim b/compiler/fish.vim index 87abb8bfc..7684db47f 100644 --- a/compiler/fish.vim +++ b/compiler/fish.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fish', 'compiler/fish.vim') + finish +endif if exists('current_compiler') finish @@ -7,5 +9,3 @@ let current_compiler = 'fish' CompilerSet makeprg=fish\ --no-execute\ % execute 'CompilerSet errorformat='.escape(fish#errorformat(), ' ') - -endif diff --git a/compiler/gleam.vim b/compiler/gleam.vim new file mode 100644 index 000000000..6a63fa196 --- /dev/null +++ b/compiler/gleam.vim @@ -0,0 +1,49 @@ +if polyglot#init#is_disabled(expand(':p'), 'gleam', 'compiler/gleam.vim') + finish +endif + +" Check we've not run already +if exists('current_compiler') + finish +endif + +let current_compiler = "gleam" + +" Defined CompilerSet command if it doesn't exist. +" Needed for older vim versions. +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +endif + +" Tell vim to run 'gleam' when the user runs :make. So ':make build .' becomes +" 'gleam build .' +CompilerSet makeprg=gleam\ $* + + +" With the compiler set, we set the errorformat which is a set of rules that +" vim uses to parse the output of the current compiler program in order to +" extract file, line, column & error message information so that it can +" populate the quickfix list and the user can jump between the errors. +" +" This errorformat 'parser' will have to change if the output of the compiler +" changes. +" +" Written with the help of: https://flukus.github.io/vim-errorformat-demystified.html +" +CompilerSet errorformat=%Eerror:\ %m " use 'error:' to indicate the start of a new error +CompilerSet errorformat+=%C\ %#┌─%#\ %f:%l:%c\ %#-%# " pull out the file, line & column (matches optional spaces & dashes at the end in case they come back.) +CompilerSet errorformat+=%C " allow empty lines within an error +CompilerSet errorformat+=%C%.%#│%.%# " ignore any line with a vertial formatting pipe in it +CompilerSet errorformat+=%Z%m " assume any other line contributes to the error message + + +" Example error message +" +" error: Unknown variable +" ┌─ /home/michael/root/projects/tutorials/gleam/try/code/src/main.gleam:19:18 +" │ +" 19 │ Ok(tuple(name, spot)) +" │ ^^^^ did you mean `sport`? +" +" The name `spot` is not in scope here. + diff --git a/compiler/go.vim b/compiler/go.vim index a5528cfea..3333caeef 100644 --- a/compiler/go.vim +++ b/compiler/go.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'compiler/go.vim') + finish +endif " Copyright 2013 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -48,5 +50,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 ts=2 et - -endif diff --git a/compiler/gradle.vim b/compiler/gradle.vim index 69fa1bb96..6a52af1b9 100644 --- a/compiler/gradle.vim +++ b/compiler/gradle.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 +if polyglot#init#is_disabled(expand(':p'), 'gradle', 'compiler/gradle.vim') + finish +endif " Vim Compiler File " Compiler: gradle @@ -24,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/gradlew.vim b/compiler/gradlew.vim index 0d08ff3e2..22048a924 100644 --- a/compiler/gradlew.vim +++ b/compiler/gradlew.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1 +if polyglot#init#is_disabled(expand(':p'), 'gradle', 'compiler/gradlew.vim') + finish +endif " Vim Compiler File " Compiler: gradlew @@ -24,5 +26,3 @@ CompilerSet errorformat= \%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^, \%-G%.%# - -endif diff --git a/compiler/haml.vim b/compiler/haml.vim index e942631fb..83fd29708 100644 --- a/compiler/haml.vim +++ b/compiler/haml.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haml', 'compiler/haml.vim') + finish +endif " Vim compiler file " Compiler: Haml @@ -28,5 +30,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/ledger.vim b/compiler/ledger.vim index 8d441af91..1e35f64bf 100644 --- a/compiler/ledger.vim +++ b/compiler/ledger.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ledger', 'compiler/ledger.vim') + finish +endif " Vim Compiler File " Compiler: ledger @@ -28,9 +30,7 @@ if !g:ledger_is_hledger CompilerSet errorformat+=%tarning:\ \"%f\"\\,\ line\ %l:\ %m " Skip all other lines: CompilerSet errorformat+=%-G%.%# - exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main)) + exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main)) else - exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . shellescape(expand(g:ledger_main)) . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' -endif - + exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' endif diff --git a/compiler/lilypond.vim b/compiler/lilypond.vim index da1dd17cc..d672b7236 100644 --- a/compiler/lilypond.vim +++ b/compiler/lilypond.vim @@ -1,9 +1,28 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 +if polyglot#init#is_disabled(expand(':p'), 'lilypond', 'compiler/lilypond.vim') + finish +endif " LilyPond compiler file " Language: LilyPond " Maintainer: Heikki Junes -" Last Change: 2004 Mar 01 +" License: This file is part of LilyPond, the GNU music typesetter. +" +" Copyright (C) 2004, 2007 Heikki Junes +" +" LilyPond is free software: you can redistribute it and/or modify +" it under the terms of the GNU General Public License as published by +" the Free Software Foundation, either version 3 of the License, or +" (at your option) any later version. +" +" LilyPond is distributed in the hope that it will be useful, +" but WITHOUT ANY WARRANTY; without even the implied warranty of +" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +" GNU General Public License for more details. +" +" You should have received a copy of the GNU General Public License +" along with LilyPond. If not, see . +" +" Last Change: 2007 Aug 19 " " Installed As: vim/compiler/lilypond.vim " @@ -19,5 +38,3 @@ setlocal makeprg=lilypond\ $* " (how to see multiple-line error messages?) setlocal errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m " - -endif diff --git a/compiler/ls.vim b/compiler/ls.vim index 8aed9a685..f23539aab 100644 --- a/compiler/ls.vim +++ b/compiler/ls.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'livescript', 'compiler/ls.vim') + finish +endif " Language: LiveScript " Maintainer: George Zahariev @@ -74,5 +76,3 @@ augroup LiveScriptUpdateMakePrg autocmd BufFilePost,BufWritePost call s:UpdateMakePrg() endif augroup END - -endif diff --git a/compiler/mix.vim b/compiler/mix.vim index 9bee88e95..cb7902eee 100644 --- a/compiler/mix.vim +++ b/compiler/mix.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'compiler/mix.vim') + finish +endif if exists('current_compiler') finish @@ -16,5 +18,3 @@ CompilerSet errorformat= \%E==\ Compilation\ error\ in\ file\ %f\ ==, \%C**\ (%\\w%\\+)\ %f:%l:\ %m,%Z - -endif diff --git a/compiler/nim.vim b/compiler/nim.vim index a587a306b..f88e7d882 100644 --- a/compiler/nim.vim +++ b/compiler/nim.vim @@ -1,12 +1,14 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1 +if polyglot#init#is_disabled(expand(':p'), 'nim', 'compiler/nim.vim') + finish +endif -if exists("current_compiler") +if exists('current_compiler') finish endif -let current_compiler = "nim" +let current_compiler = 'nim' -if exists(":CompilerSet") != 2 " older Vim always used :setlocal +if exists(':CompilerSet') != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal endif @@ -25,5 +27,3 @@ unlet s:cpo_save let g:syntastic_nim_checkers = ['nim'] - -endif diff --git a/compiler/nix-build.vim b/compiler/nix-build.vim index 4ef29d28b..7c39a4a07 100644 --- a/compiler/nix-build.vim +++ b/compiler/nix-build.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 +if polyglot#init#is_disabled(expand(':p'), 'nix', 'compiler/nix-build.vim') + finish +endif if exists('current_compiler') finish @@ -11,5 +13,3 @@ endif CompilerSet errorformat=error:\ %m\ at\ %f:%l:%c,builder\ for\ \'%m\'\ failed\ with\ exit\ code\ %n,fixed-output\ derivation\ produced\ path\ \'%s\'\ with\ %m CompilerSet makeprg=nix-build - -endif diff --git a/compiler/ocaml.vim b/compiler/ocaml.vim index c8fa745e8..cad914396 100644 --- a/compiler/ocaml.vim +++ b/compiler/ocaml.vim @@ -1,10 +1,13 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ocaml', 'compiler/ocaml.vim') + finish +endif " Vim Compiler File " Compiler: ocaml " Maintainer: Markus Mottl -" URL: http://www.ocaml.info/vim/compiler/ocaml.vim +" URL: https://github.com/ocaml/vim-ocaml " Last Change: +" 2021 Nov 03 - Improved error format (Jules Aguillon) " 2020 Mar 28 - Improved error format (Thomas Leonard) " 2017 Nov 26 - Improved error format (Markus Mottl) " 2013 Aug 27 - Added a new OCaml error format (Markus Mottl) @@ -37,10 +40,13 @@ CompilerSet errorformat = \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, \%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, + \%EFile\ \"%f\"\\,\ line\ %l:, \%+EReference\ to\ unbound\ regexp\ name\ %m, \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, \%Wocamlyacc:\ w\ -\ %m, \%-Zmake%.%#, + \%C%*\\d\ \|%.%#, + \%C%p^%#, \%C%m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', @@ -52,9 +58,9 @@ CompilerSet errorformat = \%X%*\\a:\ Leaving\ directory\ '%f', \%DEntering\ directory\ '%f', \%XLeaving\ directory\ '%f', - \%DMaking\ %*\\a\ in\ %f + \%DMaking\ %*\\a\ in\ %f, + \%+G%m + let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/compiler/pip_compile.vim b/compiler/pip_compile.vim new file mode 100644 index 000000000..5b6b29d5e --- /dev/null +++ b/compiler/pip_compile.vim @@ -0,0 +1,49 @@ +if polyglot#init#is_disabled(expand(':p'), 'requirements', 'compiler/pip_compile.vim') + finish +endif + +" the Requirements File Format syntax support for Vim +" Version: 1.7.1 +" Author: raimon +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" 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. + +if exists('b:current_compiler') + finish +endif +let b:current_compiler = 'pip_compile' + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif +CompilerSet makeprg=pip-compile\ %:S +CompilerSet errorformat=%ECould\ not\ find\ a\ version\ that\ matches\ %o\ (from\ -r\ %f\ (line\ %l)), + \%C%m, + \%Z, + \%-G%.%# +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: diff --git a/compiler/powershell.vim b/compiler/powershell.vim index 1737a5a59..99fbfa326 100644 --- a/compiler/powershell.vim +++ b/compiler/powershell.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 +if polyglot#init#is_disabled(expand(':p'), 'powershell', 'compiler/powershell.vim') + finish +endif " Compiler: powershell " Run ps1 scripts in powershell and process their output. Quickly jump through @@ -31,14 +33,36 @@ endif if !executable(g:ps1_makeprg_cmd) echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!" + finish endif " Show CategoryInfo, FullyQualifiedErrorId, etc? let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0) +let &l:makeprg = g:ps1_makeprg_cmd +" Load Vanilla Shell and show syntax errors +" See https://zigford.org/powershell-syntax-now-supported-by-ale-vim-plugin.html +if has('win32') +setlocal makeprg+=\ -NoProfile\ -NoLogo\ -NonInteractive\ -command\ \"&{ + \trap{$_.tostring();continue}&{ + \[void]$executioncontext.invokecommand.invokescript('%') + \} + \}\" +elseif has('unix') +setlocal makeprg+=\ -NoProfile\ -NoLogo\ -NonInteractive\ -command\ "&{ + \trap{\\$_.tostring();continue}&{ + \[void]\\$executioncontext.invokecommand.invokescript('%') + \} + \}" + \}\" +else + echoerr "To use the powershell compiler, please run it under Microsoft Windows or Unix!" + finish +endif " Use absolute path because powershell requires explicit relative paths " (./file.ps1 is okay, but # expands to file.ps1) -let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S' +setlocal makeprg+=\ %:p:S +silent CompilerSet makeprg " Parse file, line, char from callstacks: " Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a @@ -83,5 +107,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2: - -endif diff --git a/compiler/puppet-lint.vim b/compiler/puppet-lint.vim new file mode 100644 index 000000000..584d0e193 --- /dev/null +++ b/compiler/puppet-lint.vim @@ -0,0 +1,27 @@ +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'compiler/puppet-lint.vim') + finish +endif + +" Vim compiler file +" Compiler: puppet-lint +" Maintainer: Doug Kearns + +if exists('current_compiler') + finish +endif +let current_compiler = 'puppet-lint' + +if exists(':CompilerSet') != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=puppet-lint\ --with-filename +CompilerSet errorformat=%f\ -\ %tRROR:\ %m\ on\ line\ %l, + \%f\ -\ %tARNING:\ %m\ on\ line\ %l, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/compiler/python.vim b/compiler/python.vim index eac2bb84d..b71b6a880 100644 --- a/compiler/python.vim +++ b/compiler/python.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python-compiler') == -1 +if polyglot#init#is_disabled(expand(':p'), 'python-compiler', 'compiler/python.vim') + finish +endif " Vim compiler file " Compiler: Unit testing tool for Python @@ -67,5 +69,3 @@ else endif " vim:foldmethod=marker:foldlevel=0 - -endif diff --git a/compiler/rake.vim b/compiler/rake.vim index 12f7b7a0c..84e312e89 100644 --- a/compiler/rake.vim +++ b/compiler/rake.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'compiler/rake.vim') + finish +endif " Vim compiler file " Language: Rake @@ -39,5 +41,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rspec.vim b/compiler/rspec.vim index 1f7c132f0..19f41ade7 100644 --- a/compiler/rspec.vim +++ b/compiler/rspec.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'compiler/rspec.vim') + finish +endif " Vim compiler file " Language: RSpec @@ -35,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/ruby.vim b/compiler/ruby.vim index abdb6d304..c0299d7e1 100644 --- a/compiler/ruby.vim +++ b/compiler/ruby.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'compiler/ruby.vim') + finish +endif " Vim compiler file " Language: Ruby @@ -44,5 +46,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rubyunit.vim b/compiler/rubyunit.vim index c92f3ec8b..f10496123 100644 --- a/compiler/rubyunit.vim +++ b/compiler/rubyunit.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'compiler/rubyunit.vim') + finish +endif " Vim compiler file " Language: Test::Unit - Ruby Unit Testing Framework @@ -35,5 +37,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/compiler/rustc.vim b/compiler/rustc.vim index 14034ae43..8c950bf0c 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 +if polyglot#init#is_disabled(expand(':p'), 'rust', 'compiler/rustc.vim') + finish +endif " Vim compiler file " Compiler: Rust Compiler @@ -57,5 +59,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/sass.vim b/compiler/sass.vim new file mode 100644 index 000000000..b4bbcc3b8 --- /dev/null +++ b/compiler/sass.vim @@ -0,0 +1,34 @@ +if polyglot#init#is_disabled(expand(':p'), 'sass', 'compiler/sass.vim') + finish +endif + +" Vim compiler file +" Compiler: Sass +" Maintainer: Tim Pope +" Last Change: 2016 Aug 29 + +if exists("current_compiler") + finish +endif +let current_compiler = "sass" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=sass + +CompilerSet errorformat= + \%f:%l:%m\ (Sass::Syntax%trror), + \%ESyntax\ %trror:%m, + \%C%\\s%\\+on\ line\ %l\ of\ %f, + \%Z%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2: diff --git a/compiler/sbt.vim b/compiler/sbt.vim index a57f58c9a..a7ab9da7d 100644 --- a/compiler/sbt.vim +++ b/compiler/sbt.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 +if polyglot#init#is_disabled(expand(':p'), 'scala', 'compiler/sbt.vim') + finish +endif " Vim compiler file " Language: Scala SBT (http://www.scala-sbt.org/) @@ -30,5 +32,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/compiler/sml.vim b/compiler/sml.vim new file mode 100644 index 000000000..e9b65a8e9 --- /dev/null +++ b/compiler/sml.vim @@ -0,0 +1,32 @@ +if polyglot#init#is_disabled(expand(':p'), 'sml', 'compiler/sml.vim') + finish +endif + +" Vim compiler file +" Compiler: SML/NJ Compiler +" Maintainer: Doug Kearns +" Last Change: 2020 Feb 10 + +if exists("current_compiler") + finish +endif +let current_compiler = "sml" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=sml +CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m, + \%f:%l.%c\ %trror:\ %m, + \%trror:\ %m + \%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m, + \%f:%l.%c\ %tarning:\ %m, + \%tarning:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/compiler/swift.vim b/compiler/swift.vim index 5dab34f6b..f832c9de9 100644 --- a/compiler/swift.vim +++ b/compiler/swift.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 +if polyglot#init#is_disabled(expand(':p'), 'swift', 'compiler/swift.vim') + finish +endif " Vim compiler file " Compiler: Swift Compiler @@ -39,5 +41,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/compiler/tcl.vim b/compiler/tcl.vim new file mode 100644 index 000000000..c48d197a7 --- /dev/null +++ b/compiler/tcl.vim @@ -0,0 +1,21 @@ +if polyglot#init#is_disabled(expand(':p'), 'tcl', 'compiler/tcl.vim') + finish +endif + +" Vim compiler file +" Compiler: tcl +" Maintainer: Doug Kearns +" Last Change: 2004 Nov 27 + +if exists("current_compiler") + finish +endif +let current_compiler = "tcl" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet makeprg=tcl + +CompilerSet errorformat=%EError:\ %m,%+Z\ %\\{4}(file\ \"%f\"\ line\ %l),%-G%.%# diff --git a/compiler/tidy.vim b/compiler/tidy.vim new file mode 100644 index 000000000..6e3624551 --- /dev/null +++ b/compiler/tidy.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'tidy', 'compiler/tidy.vim') + finish +endif + +" Vim compiler file +" Compiler: HTML Tidy +" Maintainer: Doug Kearns +" Last Change: 2020 Sep 4 + +if exists("current_compiler") + finish +endif +let current_compiler = "tidy" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +let s:cpo_save = &cpo +set cpo&vim + +CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes +CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m, + \%f:%l:%c:\ %tarning:\ %m, + \%f:%l:%c:\ %tnfo:\ %m, + \%f:%l:%c:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/compiler/typescript.vim b/compiler/typescript.vim index 6d1587710..43380d270 100644 --- a/compiler/typescript.vim +++ b/compiler/typescript.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'compiler/typescript.vim') + finish +endif if exists('current_compiler') finish @@ -21,5 +23,3 @@ endif let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %' CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m - -endif diff --git a/compiler/zig.vim b/compiler/zig.vim new file mode 100644 index 000000000..caa195639 --- /dev/null +++ b/compiler/zig.vim @@ -0,0 +1,32 @@ +if polyglot#init#is_disabled(expand(':p'), 'zig', 'compiler/zig.vim') + finish +endif + +" Vim compiler file +" Compiler: Zig Compiler +" For bugs, patches and license go to https://github.com/ziglang/zig.vim + +if exists("current_compiler") + finish +endif +let current_compiler = "zig" + +let s:save_cpo = &cpo +set cpo&vim + +if exists(":CompilerSet") != 2 + command -nargs=* CompilerSet setlocal +endif + +" a subcommand must be provided for the this compiler (test, build-exe, etc) +if has('patch-7.4.191') + CompilerSet makeprg=zig\ \$*\ \%:S +else + CompilerSet makeprg=zig\ \$*\ \"%\" +endif + +" TODO: improve errorformat as needed. + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab diff --git a/compiler/zig_build.vim b/compiler/zig_build.vim new file mode 100644 index 000000000..654728093 --- /dev/null +++ b/compiler/zig_build.vim @@ -0,0 +1,32 @@ +if polyglot#init#is_disabled(expand(':p'), 'zig', 'compiler/zig_build.vim') + finish +endif + +" Vim compiler file +" Compiler: Zig Compiler (zig build) + +if exists('current_compiler') + finish +endif +runtime compiler/zig.vim +let current_compiler = 'zig_build' + +let s:save_cpo = &cpo +set cpo&vim + + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif + +if exists('g:zig_build_makeprg_params') + execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*' +else + CompilerSet makeprg=zig\ build\ $* +endif + +" TODO: anything to add to errorformat for zig build specifically? + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab diff --git a/compiler/zig_build_exe.vim b/compiler/zig_build_exe.vim new file mode 100644 index 000000000..fb46d2088 --- /dev/null +++ b/compiler/zig_build_exe.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'zig', 'compiler/zig_build_exe.vim') + finish +endif + +" Vim compiler file +" Compiler: Zig Compiler (zig build-exe) + +if exists('current_compiler') + finish +endif +runtime compiler/zig.vim +let current_compiler = 'zig_build_exe' + +let s:save_cpo = &cpo +set cpo&vim + + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif + +if has('patch-7.4.191') + CompilerSet makeprg=zig\ build-exe\ \%:S\ \$* +else + CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$* +endif + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab diff --git a/compiler/zig_test.vim b/compiler/zig_test.vim new file mode 100644 index 000000000..2000e946f --- /dev/null +++ b/compiler/zig_test.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'zig', 'compiler/zig_test.vim') + finish +endif + +" Vim compiler file +" Compiler: Zig Compiler (zig test) + +if exists('current_compiler') + finish +endif +runtime compiler/zig.vim +let current_compiler = 'zig_test' + +let s:save_cpo = &cpo +set cpo&vim + + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal +endif + +if has('patch-7.4.191') + CompilerSet makeprg=zig\ test\ \%:S\ \$* +else + CompilerSet makeprg=zig\ test\ \"%\"\ \$* +endif + +let &cpo = s:save_cpo +unlet s:save_cpo +" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab diff --git a/ctags/puppet.ctags b/ctags/puppet.ctags index 6aa9a13cd..237169973 100644 --- a/ctags/puppet.ctags +++ b/ctags/puppet.ctags @@ -1,16 +1,13 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 - --langdef=puppet --langmap=puppet:.pp +--regex-puppet=/^[[:space:]]*class[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/::\1/c,class/ --regex-puppet=/^[[:space:]]*class[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/\1/c,class/ --regex-puppet=/^[[:space:]]*site[[:space:]]*([a-zA-Z0-9_\-]+)/\1/s,site/ --regex-puppet=/^[[:space:]]*node[[:space:]]*[\'|\"]*([a-zA-Z0-9_\.\-]+)[\'|\"]*/\1/n,node/ --regex-puppet=/^[[:space:]]*define[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/\1/d,definition/ ---regex-puppet=/^[[:space:]]*(include|require)[[:space:]]*([a-zA-Z0-9_:]+)/\1 \2/i,include/ +--regex-puppet=/^[[:space:]]*(include|require)[[:space:]]*:{0,2}([a-zA-Z0-9_:]+)/\1 ::\2/i,include/ --regex-puppet=/^[[:space:]]*([\$][a-zA-Z0-9_:]+)[[:space:]]*=/\1/v,variable/ --regex-puppet=/^[[:space:]]*[~|\-]?>?[[:space:]]*([a-z][a-zA-Z0-9_:]+)[[:space:]]*\{ *(.*):/\1[\2]/r,resource/ --regex-puppet=/([A-Z][a-zA-Z0-9_:]+)[[:space:]]*\{/\1/f,default/ --regex-puppet=/^[[:space:]]*type[[:space:]]*([A-Z][a-zA-Z0-9_:]*)[[:space:]]*=/\1/t,type/ --regex-puppet=/^[[:space:]]*function[[:space:]]*([a-zA-Z0-9_:]*)[[:space:]]*/\1/u,function/ - -endif diff --git a/ctags/puppet_u.ctags b/ctags/puppet_u.ctags index 9770cfd0b..3a5d380ed 100644 --- a/ctags/puppet_u.ctags +++ b/ctags/puppet_u.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 - --langdef=puppet --map-puppet=+.pp --regex-puppet=/^[[:space:]]*node[[:space:]]*[\'|\"]*([a-zA-Z0-9_\.\-]+)[\'|\"]*/\1/n,node/{scope=set} @@ -12,5 +10,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 --regex-puppet=/^[[:space:]]*site[[:space:]]*([a-zA-Z0-9_\-]+)/\1/s,site/ --regex-puppet=/^[[:space:]]*type[[:space:]]*([A-Z][a-zA-Z0-9_:]*)[[:space:]]*=/\1/t,type/ --regex-puppet=/^[[:space:]]*function[[:space:]]*([a-zA-Z0-9_:]*)[[:space:]]*/\1/u,function/ - -endif diff --git a/ctags/rust.ctags b/ctags/rust.ctags index 7971672fe..d4f474e65 100644 --- a/ctags/rust.ctags +++ b/ctags/rust.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 - --langdef=Rust --langmap=Rust:.rs --regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ @@ -11,5 +9,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 --regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/ --regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\4 \6 \7/i,impls,trait implementations/ --regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ - -endif diff --git a/ctags/scala.ctags b/ctags/scala.ctags index b640767b2..b7d312505 100644 --- a/ctags/scala.ctags +++ b/ctags/scala.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 - --langdef=scala --langmap=scala:.scala @@ -13,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|override|private[^ ]*|protected)[ \t]*)*val[ \t]+([a-zA-Z0-9_]+)/\3/V,values/ --regex-scala=/^[ \t]*((abstract|final|sealed|implicit|lazy|override|private[^ ]*|protected)[ \t]*)*var[ \t]+([a-zA-Z0-9_]+)/\3/v,variables/ --regex-scala=/^[ \t]*package[ \t]+([a-zA-Z0-9_.]+)/\1/p,packages/ - -endif diff --git a/ctags/typescript.ctags b/ctags/typescript.ctags index bd4b0e948..5c7eb9dc9 100644 --- a/ctags/typescript.ctags +++ b/ctags/typescript.ctags @@ -1,5 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 - --langdef=typescript --langmap=typescript:.ts --regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/ @@ -13,5 +11,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == --regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static|readonly)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/ --regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/ --regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/ - -endif diff --git a/doc/clojure.txt b/doc/clojure.txt deleted file mode 100644 index 07fce86b9..000000000 --- a/doc/clojure.txt +++ /dev/null @@ -1,185 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 - -*clojure.txt* Clojure runtime files - -INTRODUCTION *clojure-introduction* - -Meikel Brandmeyer's excellent Clojure runtime files. Includes syntax, indent, -ftdetect, and ftplugin scripts. - -CLOJURE *ft-clojure-indent* *clojure-indent* - -Clojure indentation differs somewhat from traditional Lisps, due in part to -the use of square and curly brackets, and otherwise by community convention. -These conventions are not universally followed, so the Clojure indent script -offers a few configurable options, listed below. - -If the current vim does not include searchpairpos(), the indent script falls -back to normal 'lisp' indenting, and the following options are ignored. - - *g:clojure_maxlines* - -Set maximum scan distance of searchpairpos(). Larger values trade performance -for correctness when dealing with very long forms. A value of 0 will scan -without limits. -> - " Default - let g:clojure_maxlines = 100 -< - *g:clojure_fuzzy_indent* - *g:clojure_fuzzy_indent_patterns* - *g:clojure_fuzzy_indent_blacklist* - -The 'lispwords' option is a list of comma-separated words that mark special -forms whose subforms must be indented with two spaces. - -For example: -> - (defn bad [] - "Incorrect indentation") - - (defn good [] - "Correct indentation") -< -If you would like to specify 'lispwords' with a |pattern| instead, you can use -the fuzzy indent feature: -> - " Default - let g:clojure_fuzzy_indent = 1 - let g:clojure_fuzzy_indent_patterns = ['^with', '^def', '^let'] - let g:clojure_fuzzy_indent_blacklist = - \ ['-fn$', '\v^with-%(meta|out-str|loading-context)$'] - - " Legacy comma-delimited string version; the list format above is - " recommended. Note that patterns are implicitly anchored with ^ and $ - let g:clojure_fuzzy_indent_patterns = 'with.*,def.*,let.*' -< -|g:clojure_fuzzy_indent_patterns| and |g:clojure_fuzzy_indent_blacklist| are -|Lists| of patterns that will be matched against the unquoted, unqualified -symbol at the head of a list. This means that a pattern like "^foo" will match -all these candidates: "foobar", "my.ns/foobar", and "#'foobar". - -Each candidate word is tested for special treatment in this order: - - 1. Return true if word is literally in 'lispwords' - 2. Return false if word matches a pattern in - |g:clojure_fuzzy_indent_blacklist| - 3. Return true if word matches a pattern in - |g:clojure_fuzzy_indent_patterns| - 4. Return false and indent normally otherwise - - *g:clojure_special_indent_words* - -Some forms in Clojure are indented so that every subform is indented only two -spaces, regardless of 'lispwords'. If you have a custom construct that should -be indented in this idiosyncratic fashion, you can add your symbols to the -default list below. -> - " Default - let g:clojure_special_indent_words = - \ 'deftype,defrecord,reify,proxy,extend-type,extend-protocol,letfn' -< - *g:clojure_align_multiline_strings* - -Align subsequent lines in multiline strings to the column after the opening -quote, instead of the same column. - -For example: -> - (def default - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat.") - - (def aligned - "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do - eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut - enim ad minim veniam, quis nostrud exercitation ullamco laboris - nisi ut aliquip ex ea commodo consequat.") -< -This option is off by default. -> - " Default - let g:clojure_align_multiline_strings = 0 -< - *g:clojure_align_subforms* - -By default, parenthesized compound forms that look like function calls and -whose head subform is on its own line have subsequent subforms indented by -two spaces relative to the opening paren: -> - (foo - bar - baz) -< -Setting this option changes this behavior so that all subforms are aligned to -the same column, emulating the default behavior of clojure-mode.el: -> - (foo - bar - baz) -< -This option is off by default. -> - " Default - let g:clojure_align_subforms = 0 -< - -CLOJURE *ft-clojure-syntax* - -The default syntax groups can be augmented through the -*g:clojure_syntax_keywords* and *b:clojure_syntax_keywords* variables. The -value should be a |Dictionary| of syntax group names to a |List| of custom -identifiers: -> - let g:clojure_syntax_keywords = { - \ 'clojureMacro': ["defproject", "defcustom"], - \ 'clojureFunc': ["string/join", "string/replace"] - \ } -< -Refer to the Clojure syntax script for valid syntax group names. - -If the |buffer-variable| *b:clojure_syntax_without_core_keywords* is set, only -language constants and special forms are matched. - -Setting *g:clojure_fold* enables folding Clojure code via the syntax engine. -Any list, vector, or map that extends over more than one line can be folded -using the standard Vim |fold-commands|. - -Please note that this option does not work with scripts that redefine the -bracket syntax regions, such as rainbow-parentheses plugins. - -This option is off by default. -> - " Default - let g:clojure_fold = 0 -< - -ABOUT *clojure-about* - -This document and associated runtime files are maintained at: -https://github.com/guns/vim-clojure-static - -Distributed under the Vim license. See |license|. - -syntax/clojure.vim - - Copyright 2007-2008 (c) Toralf Wittner - Copyright 2008-2012 (c) Meikel Brandmeyer - -ftdetect/clojure.vim, -ftplugin/clojure.vim, -indent/clojure.vim - - Copyright 2008-2012 (c) Meikel Brandmeyer - -Modified and relicensed under the Vim License for distribution with Vim: - - Copyright 2013-2014 (c) Sung Pae - -Last Change: %%RELEASE_DATE%% - - vim:tw=78:noet:sw=8:sts=8:ts=8:ft=help:norl: - -endif diff --git a/doc/coffee-script.txt b/doc/coffee-script.txt deleted file mode 100644 index 692d62419..000000000 --- a/doc/coffee-script.txt +++ /dev/null @@ -1,8 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 - -Please see the project readme for up-to-date docs: -https://github.com/kchmck/vim-coffee-script - - vim:tw=78:ts=8:ft=help:norl: - -endif diff --git a/doc/cryptol.txt b/doc/cryptol.txt deleted file mode 100644 index 0d90528c3..000000000 --- a/doc/cryptol.txt +++ /dev/null @@ -1,108 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 - -*cryptol.txt* functionality for the Cryptol programming language - -Copyright © 2013 Edward O'Callaghan. All Rights Reserved. - - .oooooo. . oooo - d8P' `Y8b .o8 `888 -888 oooo d8b oooo ooo oo.ooooo. .o888oo .ooooo. 888 -888 `888""8P `88. .8' 888' `88b 888 d88' `88b 888 -888 888 `88..8' 888 888 888 888 888 888 -`88b ooo 888 `888' 888 888 888 . 888 888 888 - `Y8bood8P' d888b .8' 888bod8P' "888" `Y8bod8P' o888o - .o..P' 888 - `Y8P' o888o - - Functionality for the Cryptol programming language. - Includes syntax highlighting, code folding, and more! - -============================================================================== -CONTENTS *CryptolContents* - - 1. Usage ................ |CryptolUsage| - 2. Mappings ............. |CryptolMappings| - 3. License .............. |CryptolLicense| - 4. Bugs ................. |CryptolBugs| - 5. Contributing ......... |CryptolContributing| - 6. Changelog ............ |CryptolChangelog| - 7. Credits .............. |CryptolCredits| - -============================================================================== -Section 1: Usage *CryptolUsage* - -This plugin will automatically provide syntax highlighting for Cryptol files -(files ending in .cry). - -Cryptol is a purely functional domain specific language, developed over the -past decade by Galois for the NSA, for the design, implementation and -verification of cryptographic algorithms. - -============================================================================== -Section 2: Mappings *CryptolMappings* - -Code folding is done in the typical way, for example: - * za - When on a closed fold - open it. - * zM - Close all foldings to level 0. - * zR - Reduce folding - -For more information see, for example, :help za - -============================================================================== -Section 3: License *CryptolLicense* - -Copyright © 2013 Edward O'Callaghan. All Rights Reserved. - -HOWEVER: -Be it known, The syntax file was written by -Copyright © 2005 Fergus Henderson. All Rights Reserved. - - -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. - -============================================================================== -Section 4: Bugs *CryptolBugs* - - * https://github.com/victoredwardocallaghan/cryptol.vim/issues - -============================================================================== -Section 5: TODOs *CryptolTODOs - - * Add compiler support - - . - -============================================================================== -Section 6: Contributing *CryptolContributing* - - * Edward O'Callaghan - -============================================================================== -Section 7: Changelog *CryptolChangelog* - - * Initial 25 Apr 2013. - -============================================================================== -Section 8: Credits *CryptolCredits* - - * Edward O'Callaghan - * Fergus Henderson - wrote the orginal syntax file. - -vim:ts=4:ft=help:tw=78:et - -endif diff --git a/doc/dart.txt b/doc/dart.txt deleted file mode 100644 index 2a3bc78e1..000000000 --- a/doc/dart.txt +++ /dev/null @@ -1,90 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 - -*dart-vim-plugin* Dart support for Vim - -INTRODUCTION *dart.vim* - -dart-vim-plugin provides filetype detection, syntax highlighting, and -indentation for Dart code in Vim. - -https://github.com/dart-lang/dart-vim-plugin - -TOOLS *dart-tools* - -An `includeexpr` is set that can read `.packages` files and resolve `package:` -uris to a file. See |gf| for an example use. - -COMMANDS *dart-commands* - -These commands are available in buffers with the dart filetype. - - *:Dart2Js* -Runs dart2js to compile the current file. Takes the same arguments as the -dart2js binary and always passes the path to the current file as the last -argument. -If there are any errors they will be shown in the quickfix window. - - *:DartFmt* -Runs dartfmt and passes the current buffer content through stdin. If the -format is successful replaces the current buffer content with the formatted -result. If the format is unsuccessful errors are shown in the quickfix window. -This command does not use the file content on disk so it is safe to run with -unwritten changes. -Passes arguments through to dartfmt. - - *:DartAnalyzer* -Runs dartanalyzer to analyze the current file. Takes the same arguments as the -dartanalyzer binary and always passes the path to the current file as the last -argument. -If there are any errors they will be shown in the quickfix window. - -CONFIGURATION *dart-configure* - - *g:dart_html_in_string* -Set to `v:true` to highlights HTML syntax inside Strings within Dart files. -Default `v:false` - - *g:dart_corelib_highlight* -Set to `v:false` to disable highlighting of code Dart classes like `Map` or -`List`. -Default `v:true` - *g:dart_style_guide* -Set to any value (set to `2` by convention) to set tab and width behavior to -match the Dart style guide - spaces only with an indent of 2. Also sets -`formatoptions += t` to auto wrap text. - -Configure DartFmt options with `let g:dartfmt_options`, for example, enable -auto syntax fixes with `let g:dartfmt_options = ['--fix']` -(discover formatter options with `dartfmt -h`) - - -SYNTAX HIGHLIGHTING *dart-syntax* - -This plugin uses narrow highlight groups to allow selectively disabling the -syntax highlights. Link any of the following groups to the `Normal` highlight -group to disable them: - -`dartSdkException`: Capitalized exception or error classes defined in the SDK. - -`dartCoreType`: `void`, `var`, `dynamic` - -`dartSdkClass`: Capitalized classes defined in the SDK, along with `bool`, -`int`, `double`, and `num`. - -`dartUserType`: Any capitalized identifier. - -`dartType`: Combines `dartCoreType`, `dartSdkClass`, and `dartUserType`. - -`dartSdkTypedef`: SDK defined `typdef`s. - -`dartFunction`: Any lower cased identifier preceding an open parenthesis. - -For example, to remove the highlighting for type and function names: -> - highlight link dartType Normal - highlight link dartFunction Normal -< - - vim:tw=78:sw=4:ts=8:ft=help:norl: - -endif diff --git a/doc/dhall.txt b/doc/dhall.txt deleted file mode 100644 index 8c5f37a56..000000000 --- a/doc/dhall.txt +++ /dev/null @@ -1,43 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 - -*dhall* Dhall syntax highlighting for Vim - ____ -===================================================================== -CONTENTS *DhallContents* - - 1. Config ......................................... ❘DhallConfig❘ - 2. License ....................................... ❘DhallLicense❘ - -====================================================================== -Section 1: Config *DhallConfig* - ----------------------------------------------------------------------- - *'g:dhall_use_ctags'* -Values: 0, 1 -Default: '' - -Generate tags file for vim on write, using universal ctags. > - let g:dhall_use_ctags=1 -< - - *'g:dhall_format'* -Values: 0, 1 -Default: '' - -Format Dhall files on write > - let g:dhall_format=1 -< - *'g:dhall_strip_whitespace'* -Values: 0, 1 -Default: '' - -To enable whitespace stripping > - let g:dhall_strip_whitespace=1 -< - -====================================================================== -Section 2: License *DhallLicense* - -This plugin is licensed under the BDS3 license. - -endif diff --git a/doc/elixir.txt b/doc/elixir.txt deleted file mode 100644 index eb482a30e..000000000 --- a/doc/elixir.txt +++ /dev/null @@ -1,116 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 - -*elixir.txt* Vim configuration files for Elixir http://elixir-lang.org/ - -Author: Plataformatec -License: Apache License Version 2.0 - -============================================================================== -CONTENTS *elixir-contents* - -INTRODUCTION |elixir-introduction| -INTERFACE |elixir-interface| - FUNCTIONS |elixir-functions| - KEY MAPPINGS |elixir-key-mappings| -OPTIONS |elixir-options| -SETTINGS |elixir-settings| - -============================================================================== -INTRODUCTION *elixir-introduction* - -*elixir* provides Vim configuration files for Elixir http://elixir-lang.org/ - -* Syntax highlighting for Elixir and EEx files -* Filetype detection for `.ex`, `.exs`, `.eex` and `.leex` files -* Automatic indentation -* Integration between Ecto projects and |vim-dadbod| for running SQL queries - on defined Ecto repositories - - -Latest Version: -https://github.com/elixir-editors/vim-elixir - - -============================================================================== -INTERFACE *elixir-interface* - ------------------------------------------------------------------------------- -FUNCTIONS *elixir-functions* - -db#adapter#ecto#canonicalize({url}) *db#adapter#ecto#canonicalize()* - TODO - -db#adapter#ecto#complete_opaque({url}) *db#adapter#ecto#complete_opaque()* - TODO - -elixir#indent#indent({lnum}) *elixir#indent#indent()* - TODO - -elixir#indent#searchpair_back_skip() *elixir#indent#searchpair_back_skip()* - TODO - - *elixir#indent#handle_top_of_file()* -elixir#indent#handle_top_of_file({context}) - TODO - - *elixir#indent#handle_follow_prev_nb()* -elixir#indent#handle_follow_prev_nb({context}) - TODO - - *elixir#indent#handle_following_trailing_binary_operator()* -elixir#indent#handle_following_trailing_binary_operator({context}) - TODO - - *elixir#indent#handle_starts_with_pipe()* -elixir#indent#handle_starts_with_pipe({context}) - TODO - - *elixir#indent#handle_starts_with_end()* -elixir#indent#handle_starts_with_end({context}) - TODO - - *elixir#indent#handle_starts_with_binary_operator()* -elixir#indent#handle_starts_with_binary_operator({context}) - TODO - - *elixir#indent#handle_inside_block()* -elixir#indent#handle_inside_block({context}) - TODO - - *elixir#indent#handle_inside_generic_block()* -elixir#indent#handle_inside_generic_block({context}) - TODO - -elixir#util#get_filename({word}) *elixir#util#get_filename({word})* - TODO - - ------------------------------------------------------------------------------- -KEY MAPPINGS *elixir-key-mappings* - -TODO - - - -============================================================================== -SETTINGS *elixir-settings* - - *g:eelixir_default_subtype* - TODO - - *g:elixir_indent_debug* - TODO - - *g:elixir_indent_max_lookbehind* - TODO - - *g:elixir_use_markdown_for_docs* - TODO - - *g:path* - TODO - -============================================================================== -vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl - -endif diff --git a/doc/ft-csv.txt b/doc/ft-csv.txt deleted file mode 100644 index 7e2a00adc..000000000 --- a/doc/ft-csv.txt +++ /dev/null @@ -1,1759 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 - -*ft-csv.txt* For Vim version 7.4 Last Change: Thu, 15 Jan 2015 - -Author: Christian Brabandt -Version: 0.31 -Homepage: http://www.vim.org/scripts/script.php?script_id=2830 - -The VIM LICENSE applies to the CSV filetype plugin (see |copyright|). -NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK. - *csv-toc* -1. Introduction.................................|csv-intro| -2. Installation.................................|csv-installation| -3. CSV Commands.................................|csv-commands| - 3.1 WhatColumn..............................|WhatColumn_CSV| - 3.2 NrColumns...............................|NrColumns_CSV| - 3.3 SearchInColumn..........................|SearchInColumn_CSV| - 3.4 HiColumn................................|HiColumn_CSV| - 3.5 ArrangeColumn...........................|ArrangeColumn_CSV| - 3.6 UnArrangeColumn.........................|UnArrangeColumn_CSV| - 3.7 DeleteColumn............................|DeleteColumn_CSV| - 3.8 InitCSV.................................|InitCSV| - 3.9 Header..................................|Header_CSV| - 3.10 Sort...................................|Sort_CSV| - 3.11 CopyColumn.............................|Copy_CSV| - 3.12 MoveColumn.............................|MoveCol_CSV| - 3.13 Sum of a column........................|SumCol_CSV| - 3.14 Create new records ....................|NewRecord_CSV| - 3.15 Change the delimiter...................|NewDelimiter_CSV| - 3.16 Check for duplicate records............|Duplicate_CSV| - 3.17 Normal mode commands...................|csv-mapping| - 3.18 Convert CSV file.......................|csv-convert| - 3.19 Dynamic filters........................|csv-filter| - 3.20 Analyze a column.......................|csv-analyze| - 3.21 Vertical Folding.......................|csv-vertfold| - 3.22 Transposing columns....................|csv-transpose| - 3.23 Transforming into a table..............|csv-tabularize| - 3.24 Add new empty columns..................|AddColumn_CSV| - 3.25 Substitute in columns..................|Substitute_CSV| - 3.26 Count values inside a column...........|Count_CSV| - 3.27 Maximum/Minimum values ................|MaxCol_CSV| - 3.28 Average values.........................|AvgCol_CSV| - 3.29 Variance of a Column...................|VarCol_CSV| - 3.30 Standard Deviation of a Column.........|StdDevCol_CSV| - 3.31 Duplicate columns......................|DupColumn_CSV| - 3.32 Column width...........................|ColumnWidth_CSV| -4. CSV Filetype configuration...................|csv-configuration| - 4.1 Delimiter...............................|csv-delimiter| - 4.2 Column..................................|csv-column| - 4.3 HiGroup.................................|csv-higroup| - 4.4 Strict Columns..........................|csv-strict| - 4.5 Concealing..............................|csv-conceal| - 4.6 Newlines................................|csv-newline| - 4.7 Highlight column automatically..........|csv-hicol| - 4.8 Fixed width columns.....................|csv-fixedwidth| - 4.8.1 Manual setup - 4.8.2 Setup using a Wizard - 4.9 CSV Header lines........................|csv-header| - 4.10 Number format..........................|csv-nrformat| - 4.11 Move folded lines......................|csv-move-folds| - 4.12 Using Comments.........................|csv-comments| - 4.13 Size and performance considerations....|csv-size| -5. Functions....................................|CSV-Functions| - 5.1 CSVPat()................................|CSVPat()| - 5.2 CSVField()..............................|CSVField()| - 5.3 CSVCol()................................|CSVCol()| - 5.4 CSVSum()................................|CSVSum()| - 5.5 CSVCount()..............................|CSVCount()| - 5.6 CSVMax()................................|CSVMax()| - 5.7 CSVMin()................................|CSVMin()| - 5.8 CSVAvg()................................|CSVAvg()| - 5.9 CSVWidth()..............................|CSVWidth()| -6. CSV Tips and Tricks..........................|csv-tips| - 6.1 Statusline..............................|csv-stl| - 6.2 Slow CSV plugin.........................|csv-slow| - 6.3 Defining custom aggregate functions.....|csv-aggregate-functions| - 6.4 Autocommand on opening/closing files....|csv-arrange-autocmd| - 6.5 CSV Syntax error........................|csv-syntax-error| - 6.6 Calculating new column values...........|csv-calculate-column| - 6.7 Using the result of an evaluation.......|b:csv_result| -7. CSV Changelog................................|csv-changelog| - -============================================================================== -1. Introduction *csv-intro* - -This plugin is used for handling column separated data with Vim. Usually those -files are called csv files and use the ',' as delimiter, though sometimes they -use e.g. the '|' or ';' as delimiter and there also exists fixedwidth columns. -The aim of this plugin is to ease handling these kinds of files. - -This is a filetype plugin for CSV files. It was heavily influenced by -the Vim Wiki Tip667 (http://vim.wikia.com/wiki/VimTip667), though it -works differently. For instructions on installing this file, type -:help add-local-help |add-local-help| inside Vim. For a screenshot, of -how the plugin can be used, see http://www.256bit.org/~chrisbra/csv.gif - -It will make use of the |+vartabs| feature for tab delimited files to arrange -them automatically. - -============================================================================== -2. Installation *csv-installation* - -In order to have vim automatically detect csv files, you need to have -|ftplugins| enabled (e.g. by having this line in your |.vimrc| file: > - - :filetype plugin on - -< -The plugin already sets up some logic to detect CSV files. By default, -the plugin recognizes *.csv and *.dat files as CSV filetype. In order that the -CSV filetype plugin is loaded correctly, vim needs to be enabled to load -|filetype-plugins|. This can be ensured by putting a line like this in your -|.vimrc|: > - :filetype plugin on -< -(see also |filetype-plugin-on|). - -In case this did not work, you need to setup vim like this: - -To have Vim automatically detect csv files, you need to do the following. - - 1) Create your user runtime directory if you do not have one yet. This - directory needs to be in your 'runtime' path. In Unix this would - typically the ~/.vim directory, while in Windows this is usually your - ~/vimfiles directory. Use :echo expand("~") to find out, what Vim thinks - your user directory is. - To create this directory, you can do: > - - :!mkdir ~/.vim -< - for Unix and > - - :!mkdir ~/vimfiles -< - for Windows. - - 2) In that directory you create a file that will detect csv files. > - - if exists("did_load_csvfiletype") - finish - endif - let did_load_csvfiletype=1 - - augroup filetypedetect - au! BufRead,BufNewFile *.csv,*.dat setfiletype csv - augroup END -< - You save this file as "filetype.vim" in your user runtime diretory: > - - :w ~/.vim/filetype.vim -< - 3) To be able to use your new filetype.vim detection, you need to restart - Vim. Vim will then load the csv filetype plugin for all files whose - names end with .csv. - -============================================================================== -3. Commands *csv-commands* - -The CSV ftplugin provides several Commands. All commands are also provided -with the prefix :CSV (e.g. |:CSVNrColumns|) - - *:CSVWhatColumn* -3.1 WhatColumn *WhatColumn_CSV* --------------- - -If you would like to know, on which column the cursor is, use > - :WhatColumn -< -or > - :CSVWhatColumn -< -Use the bang attribute, if you have a heading in the first line and you want -to know the name of the column in which the cursor is: > - :WhatColumn! -< - *:CSVNrColumns* -3.2 NrColumns *NrColumns_CSV* --------------- - -`:NrColumns` and `:CSVNrColumns` outputs the maximum number of columns -available. It does this by testing the first 10 lines for the number of -columns. This usually should be enough. If you use the '!' attribute, it -outputs the number of columns in the current line. - - *:CSVSearchInColumn* -3.3 SearchInColumn *SearchInColumn_CSV* ------------------- - -Use `:SearchInColumn` or `:CSVSearchInColumn` to search for a pattern within a -specific column. The usage is: > - - :SearchInColumn [] /{pat}/ -< - -So if you would like to search in Column 1 for the word foobar, you enter > - - :SearchInColumn 1 /foobar/ - -Instead of / as delimiter, you can use any other delimiter you like. If you -don't enter a column, the current column will be used. - - *:CSVHiColumn* -3.4 HiColumn *HiColumn_CSV* ------------- - -`:HiColumn` or `:CSVHiColumn` can be used to highlight Column . -Currently the plugin uses the WildMenu Highlight Group. If you would like to -change this, you need to define the variable |g:csv_hiGroup|. - -If you do not specify a , HiColumn will highlight the column on which the -cursor is. Use > - - :HiColumn! - -to remove any highlighting. - -If you want to automatically highlight a column, see |csv-hicol| - - *:ArrangeColumn* *:CSVArrangeColumn* -3.5 ArrangeColumn *ArrangeColumn_CSV* ------------------ - -If you would like all columns to be visually arranged, you can use the -`:ArrangeColumn` or `:CSVArrangeColumn` command: > - - :[range]ArrangeColumn[!] [] - -Beware, that this will change your file and depending on the size of -your file may slow down Vim significantly. This is highly experimental. -:ArrangeCommand will try to vertically align all columns by their maximum -column size. While the command is run, a progressbar in the statusline 'stl' -will be shown. - -Use the bang attribute to force recalculating the column width. This is -slower, but especially if you have modified the file, this will correctly -calculate the width of each column so that they can be correctly aligned. If -no column width has been calculated before, the width will be calculated, even -if the '!' has not been given. - -If is given, will use the Row, to calculate the width, else will -calculate the maximum of at least the first 10,000 rows to calculate the -width. The limit of 10,000 is set to speed up the processing and can be -overriden by setting the "b:csv_arrange_use_all_rows" variable (see below). - -If [range] is not given, it defaults to the current line. - - *csv_arrange_align* -By default, the columns will be right-aligned. If you want a different -alignment you need to specify this through the b:csv_arrange_align variable. -This is a string of flags ('r': right align, 'l': left align, 'c': center -alignment, '.': decimal alignment) where each flag defines the alignment for -a particular column (starting from left). Missing columns will be right aligned. -You can use '*' to repeat the previous value until the end. -So this: > - - :let b:csv_arrange_align = 'lc.' -< -Will left-align the first column, center align the second column, decimal -align the third column and all following columns right align. (Note: decimal -aligning might slow down Vim and additionally, if the value is no decimal -number it will be right aligned). -And this: > - - :let b:csv_arrange_align = 'l*' - -Will left align all columns. - -If you change the alignment parameter, you need to use the "!" attribute, the -next time you run the |:ArrangeCol| command, otherwise for performance -reasons, it won't be considered. - -Note, arranging the columns can be very slow on large files or many columns (see -|csv-slow| on how to increase performance for this command). For large files, -calculating the column width can take long and take a considerable amount of -memory. Therefore, the csv plugin will at most check 10.000 lines for the -width. Set the variable b:csv_arrange_use_all_rows to 1 to use all records: > - - :let b:csv_arrange_use_all_rows = 1 -< -(this could however in the worst case lead to a crash). - -To disable the statusline progressbar set the variable g:csv_no_progress: > - - :let g:csv_no_progress = 1 -< -This will disable the progressbar and slightly improve performance (since no -additional redraws are needed). - -Note: this command does not work for fixed width columns |csv-fixedwidth| - -See also |csv-arrange-autocmd| on how to have vim automatically arrange a CSV -file upon entering it. - -By default, all lines in the file are considered to calculate the column width. -If you want to ignore some lines at the beginning of the file, set the global -variable g:csv_skipfirst to the number of lines to be ignored, e.g. the first -line of the file can be ignored with > - - :let g:csv_skipfirst = 1 -< -Then use the '!' to force recalculation of column width when applying -:ArrangeColumn - - *:CSVUnArrangeColumn* -3.6 UnArrangeColumn *UnArrangeColumn_CSV* ------------------ - -If you would like to undo a previous :ArrangeColumn command, you can use this -`:UnArrangeColumn` or `:CSVUnArrangeColumn` command: > - - :[range]UnArrangeColumn - -Beware, that is no exact undo of the :ArrangeColumn command, since it strips -away all leading blanks for each column. So if previously a column contained -only some blanks, this command will strip all blanks. - -If [range] is given, it defaults to the current line. - - *:CSVDeleteColumn* -3.7 DeleteColumn *DeleteColumn_CSV* ----------------- - -The command `:DeleteColumn` or `:CSVDeleteColumn` can be used to delete a specific column. > - - :DeleteColumn 2 - -will delete column 2. If you use `:DeleteColumn 2-3` columns 2 and 3 will be -deleted. - -If you don't specify a column number, it will delete the column on which the -cursor is. Alternatively, you can also specify a search string. The plugin -will then delete all columns that match the pattern: > - - :DeleteColumn /foobar -< -will delete all columns where the pattern "foobar" matches. - - *:CSVInit* - *:InitCSV* -3.8 CSVInit ------------ -Reinitialize the Plugin. Use this, if you have changed the configuration -of the plugin (see |csv-configuration| ). -If you use the bang (!) attribute, it will keep the b:delimiter configuration -variable. - - *:CSVHeader* -3.9 Header lines *Header_CSV* ----------------- -The `:Header` or `:CSVHeader` command splits the csv-buffer and adds a window, -that holds a small fraction of the csv file. This is useful, if the first line -contains some kind of a heading and you want always to display it. This works -similar to fixing a certain line at the top. As optional argument, you can -give the number of columns from the top, that shall be displayed. By default, -1 is used (You can define your own default by setting the b:csv_headerline -variable, see |csv-header|). Use the '!' to close this window. So this > - - :Header 3 - -opens at the top a split window, that holds the first 3 lines, is fixed -and horizontally 'scrollbind'ed to the csv window and highlighted using the -CSVHeaderLine highlighting. -To close the header window, use > - - :Header! - -Note, this won't work with linebreaks in the column. - -Note also, that if you already have a horizontal header window (|VHeader_CSV|), -this command will close the horizontal Header window. This is because of a -limitation of Vim itself, which doesn't allow to sync the scrolling between -two windows horizontally and at the same time have another window only sync -its scrolling vertically. - -Note: this command does not work for fixed width columns |csv-fixedwidth| - - *:CSVVHeader* *VHeader_CSV* -If you want a vertical header line, use `:VHeader` or `:CSVVHeader`. This works -similar to the |Header_CSV| command, except that it will open a vertical split -window with the first column always visible. It will always open the first -column in the new split window. Use the '!' to close the window. If you -specify a count, that many columns will be visible (default: the first). Add -the bang to the count, if you only want the specific column to be visible. -> - :VHeader 2 -< -This will open a vertical split window containing the first 2 columns, while -> - :VHeader 2! -< -Opens a new vertical split window containing only the 2 second column. - -Note, this won't work with linebreaks in the column. -Note also: this command does not work for fixed width columns |csv-fixedwidth| - - - *:CSVVHeaderToggle* *:CSVHeaderToggle* - *VHeaderToggle_CSV* *HeaderToggle_CSV* -Use the `:HeaderToggle` and `:VHeaderToggle` command to toggle displaying the -horizontal or vertical header line. Alternatively, use `:CSVHeaderToggle` or -`:CSVVHeaderToggle` - - - *:CSVSort* -3.10 Sort *Sort_CSV* ---------- -The command `:Sort` or `:CSVSort` can be used to sort the csv file on a -certain column. If no range is given, is sorts the whole file. Specify the -column number to sort on as argument. Use the '!' attribute to reverse the -sort order. For example, the following command sorts line 1 til 10 on the 3 -column > - - :1,10Sort 3 - -While this command > - - :1,10Sort! 3 - -reverses the order based on column 3. - -The column number can be optionally followed by any of the flags [i], [n], -[x] and [o] for [i]gnoring case, sorting by [n]umeric, he[x]adecimal -or [o]ctal value. - -When no column number is given, it will sort by the column, on which the -cursor is currently. - - *:CSVColumn* -3.11 Copy Column *Copy_CSV* ----------------- -If you need to copy a specific column, you can use the command `:CSVColumn` or -`:Column` > - - :[N]Column [a] - -Copy column N into register a. This will copy all the values, that are -not folded-away (|csv-filter|) and skip comments. - -If you don't specify N, the column of the current cursor position is used. -If no register is given, the default register -|quotequote| is used. - - *:CSVMoveCol* -3.12 Move A Column *MoveCol_CSV* ------------------- -You can move one column to the right of another column by using the -`:CSVMoveColumn` or `:MoveColumn` command > - - :[range]MoveColumn [source] [dest] - -This moves the column number source to the right of column nr destination. If -both arguments are not given, move the column on which the cursor is to the -right of the current last column. If [range] is not given, MoveColumn moves -the entire column, otherwise, it moves the columns only for the lines within -the range, e.g. given that your first line is a header line, which you don't -want to change > - - :2,$MoveColumn 1 $ - -this would move column 1 behind the last column, while keeping the header line -as is. - - - *:CSVSumCol* -3.13 Sum of a Column *SumCol_CSV* --------------------- -You can let Vim output the sum of a column using the `:CSVSumCol` or `:SumCol` -command > - - :[range]SumCol [nr] [/format/] - -This outputs the result of the column within the range given. If no range -is given, this will calculate the sum of the whole column. If is not -given, this calculates the sum for the column the cursor is on. Note, that the -delimiter will be stripped away from each value and also empty values won't be -considered. - -By default, Vim uses the a numerical format that uses the '.' as decimal -separator while there is no thousands separator. If youre file contains -the numbers in a different format, you can use the /format/ option to specify -a different thousands separator or a different decimal separator. The format -needs to be specified like this: - /x:y/ -where 'x' defines the thousands separator and y defines the decimal -separator and each one is optional. This means, that > - - :SumCol 1 /:,/ - -uses the default thousands separator and ',' as the decimal separator and > - - :SumCol 2 / :./ - -uses the Space as thousands separator and the '.' as decimal separator. - -Note, if you Vim is compiled without floating point number format (|+float|), -Vim will only aggregate the integer part and therefore won't use the 'y' -argument in the /format/ specifier. - -See also |csv-aggregate-functions| - - *:CSVNewRecord* -3.14 Create new Records *NewRecord_CSV* ------------------------ -If you want to create one or several records, you can use the `:NewRecord` or -`:CSVNewRecord` command: > - - :[range]NewRecord [count] - -This will create in each line given by range [count] number of new empty -records. If [range] is not specified, creates a new line below the line the -cursor is on and if count is not given, it defaults to 1. - - - *:CSVNewDelimiter* -3.15 Change the delimiter *NewDelimiter_CSV* -------------------------- -If you want to change the field delimiter of your file you can use the -`:CSVNewDelimiter` or `:NewDelimiter` command: > - - :NewDelimiter char - -This changes the field delimiter of your file to the new delimiter "char". -Note: Will remove trailing delimiters. - - *:CSVDuplicate* -3.16 Check for duplicate records *Duplicate_CSV* --------------------------------- -If you want to check the file for duplicate records, use the command -`:Duplicate` or `:CSVDuplicate`: > - - :Duplicate columnlist -< - -Columnlist needs to be a numeric comma-separated list of all columns that you -want to check. You can also use a range like '2-5' which means the plugin -should check columns 2,3,4 and 5. - -If the plugin finds a duplicate records, it outputs its line number (but it -only does that at most 10 times). - -3.17 Normal mode commands *csv-mapping* -------------------------- -The csv filetype plugin redefines the following keys (in normal Mode) as: - - or L or W Move [count] field forwards - - or E or H Move [count] field backwards (but see |csv-mapping-H| - for the movement of H). - - or K Move [count] lines upwards within the same column - - or J Move [count] lines downwards within the same column - -The upwards and downwards motions try to keep the cursor in the relative -position within the cell when changing lines. That is not a guaranteed to work -and will fail if the upper/lower cell is of a different width than the -starting cell. - - Dynamically fold all lines away, that don't match - the value in the current column. See |csv-filter| - - In |Replace-mode| and |Virtual-Replace-mode| does not - create a new row, but instead moves the cursor to the - beginning of the same column, one more line below. - - Dynamically fold all lines away, that match - the value in the current column. See |csv-filter| - - Remove last item from the dynamic filter. - See |csv-filter| - - *csv-mapping-H* -Note how the mapping of 'H' differs from 'E' - -H step fields backwards but also stops at where the content of the columns -begins. - -If you look into this example (with the cursor being '|') - - aaa, bbbb,|ccc ` - -Pressing 'H' moves to - - aaa, |bbbb,ccc ` - -Pressing 'H' again moves to - - aaa,| bbbb,ccc ` - -Pressing 'H' again moves to - - |aaa, bbbb,ccc ` - -While with 'E', the cursor moves to: - - aaa,| bbbb,ccc ` - -and pressing 'E' again, it would move directly to - - |aaa, bbbb,ccc ` - - *csv-textobjects* -Also, the csv plugin defines these text-object: - -if Inner Field (contains everything up to the delimiter) -af Outer Field (contains everything up to and including - the delimiter) -iL Inner Line (visually linewise select all lines, that - has the same value at the cursor's column) - -Note, that the , , K and J overlap Vim's default mapping for ||, -||, |J| and |K| respectively. Therefore, this functionality has been -mapped to a sane default of J and K. If you haven't -changed the || or || variables, those the -is equival to a single backslash '\', e.g. \K would run the lookup function on -the word under the cursor and \J would join this line with the previous line. - -If you want to prevent the mapping of keys, simply set the global variable -g:csv_nomap_ to 1, (remove the special characters `<>` and replace `-` by -`_`), e.g. to prevent mapping of and in csv files, put > - - let g:csv_nomap_cr = 1 - let g:csv_nomap_c_left = 1 -< -into your |.vimrc|. Note, the keyname must be lower case. - -Also the csv plugins follows the general consensus, that when the variable -g:no_plugin_maps or g:no_csv_maps is set, no key will be mapped. - - - *:CSVConvertData* *ConvertData_CSV* -3.18 Converting a CSV File *csv-convert* --------------------------- -You can convert your CSV file to a different format with the `:ConvertData` -or `:CSVConvertData` command > - - ConvertData - -Use the the ! attribute, to convert your data without the delimiter. - -This command will interactively ask you for the definition of 3 variables. -After which it will convert your csv file into a new format, defined by those -3 variables and open the newly created file in a new window. Those 3 variables -define how the text converted. - -First, You need to define what has to be done, before converting your column -data. That is done with the "pre convert" variable. The content of this -variable will be put in front of the new document. - -Second, you define, what has to be put after the converted content of your -column data. This happens with the "post convert" variable. Basically the -contents of this variable will be put after processing the columns. - -Last, the columns need to be converted into your format. For this you can -specify a printf() format like string, that defines how your data will be -converted. You can use '%s' to specify placeholders, which will later be -replaced by the content of the actual column. - -For example, suppose you want to convert your data into HTML, then you first -call the > - - :ConvertData - -At this point, Vim will ask you for input. First, you need to specify, what -needs to be done before processing the data: - - Pre convert text: ` - -This would specify to put the HTML Header before the actual data can be -processed. If the variable g:csv_pre_convert is already defined, Vim will -already show you its' content as default value. Simply pressing Enter will use -this data. After that, Vim asks, what the end of the converted file needs to -look like: - - Post convert text:
` - -So here you are defining how to finish up the HTML file. If the variable -g:csv_post_convert is already defined, Vim will already show you its' content -as default value which you can confirm by pressing Enter. Last, you define, -how your columns need to be converted. Again, Vim asks you for how to do that: - - Converted text, use %s for column input: ` - %s%s%s - -This time, you can use '%s' expandos. They tell Vim, that they need to be -replaced by the actual content of your file. It does by going from the first -column in your file and replacing it with the corresponding %s in that order. -If there are less '%s' expandos than columns in your file, Vim will skip the -columns, that are not used. Again If the variable g:csv_convert is already -defined, Vim will already show you its' content as default value which you can -confirm by pressing Enter. - -After you hit Enter, Vim will convert your data and put it into a new window. -It may look like this: - - ` - ` - ` -
1,2,3,
2,2,4,
` - -Note, this is only a proof of concept. A better version of converting your -data to HTML is bundled with Vim (|:TOhtml|). - -But may be you want your data converted into SQL-insert statements. That could -be done like this: > - - ConvertData! -< - Pre convert text: ` - -(Leave this empty. It won't be used). - - Post convert text: Commit; ` - -After inserting the data, commit it into the database. - - Converted text, use %s for column input: ` - Insert into table foobar values ('%s', '%s', %s); ` - -Note, that the last argument is not included within single quotation marks, -since in this case the data is assumed to be integer and won't need to be -quoted for the database. - -After hitting Enter, a new Window will be opened, which might look like this: - - Insert into table foobar values('Foobar', '2', 2011); ` - Insert into table foobar values('Bar', '1', 2011); ` - Commit; ` - -Since the command was used with the bang attribute (!), the converted data -doesn't include the column delimiters. - -Now you can copy it into your database, or further manipulate it. - -3.19 Dynamic filters *csv-filter* --------------------- -If you are on a value and only want to see lines that have the same value in -this column, you can dynamically filter the file and fold away all lines not -matching the value in the current column. To do so, simply press (Enter). -Now Vim will fold away all lines, that don't have the same value in this -particular row. Note, that leading blanks and the delimiter is removed and the -value is used literally when comparing with other values. If you press -on the value, all fields having the same value will be folded away. -Pressing will remove the last item from the dynamic filter. To remove all -filters, keep pressing until no more filters are present. - -The way this is done is, that the value from the column is extracted and a -regular expression for that field is generated from it. In the end this -regular expression is used for folding the file. - -A subsequent or on another value, will add this value to the -current applied filter (this is like using the logical AND between the -currently active filter and the new value). To remove the last item from the -filter, press (backspace). If all items from the filter are removed, -folding will be disabled. - -If some command messes up the folding, you can use |zX| to have the folding -being reinitialized. - -By default, the first line is assumed to be the header and won't be folded -away. See also |csv-header|. - -If you have set the g:csv_move_folds variable and the file is modifiable, all -folded lines will be moved to the end of the file, so you can view all -non-folded lines as one consecutive area (see also |csv-move-folds|) - - *:CSVFilter* *:Filter* *Filter_CSV* -To see the active filters, you can use the `:Filter` or `:CSVFilter` command. -This will show you a small summary, of what filters are active and looks like -this: - -Nr Match Col Name Value ~ -===================================================== ` -01 - 07 Price 23.10 ` -02 + 08 Qty 10 ` - -This means, there are two filters active. The current active filter is on -column 7 (column name is Price) and all values that match 23.10 will be folded -away AND all values that don't match a value of 10 in the QTY column will also -be folded away. -When removing one item from the filter by pressing , it will always remove -the last item (highest number in NR column) from the active filter values. - -Note, that depending on your csv file and the number of filters you used, -applying the filter might actually slow down vim, because a complex regular -expression is generated that is applied by the fold expression. Look into the -@/ (|quote_/|) register to see its value. - -Use |zX| to apply the current value of your search register as filter. Use > - - :Filters! - -to reapply all values from the current active filter and fold non-matching -items away. - - *:CSVAnalyze* *Analyze_CSV* -3.20 Analyze a Column *csv-analyze* ---------------------- -If you'd like to know, how the values are distributed among a certain column, -you can use the `:CSVAnalyze` or `:Analyze` command. So > - - :Analyze 3 - -outputs the the distribution of the top 5 values in column 3. This looks like -this: - -Nr Count % Value ~ -============================= ` -01 20 50% 10 ` -02 10 25% 2 ` -03 10 25% 5 ` - -This tells you, that the the value '10' in column 3 occurs 50% of the time -(exactly 20 times) and the other 2 values '2' and '5' occur only 10 times, so -25% of the time. - -In addition, a second argument may be used to specify the number of top values. -So - - :Analyze 3 10 - -outputs the the distribution of the top 10 values in column 3, respectively. - - *:CSVVertFold* *VertFold_CSV* -3.21 Vertical Folding *csv-vertfold* ---------------------- -Sometimes, you want to hide away certain columns to better view only certain -columns without having to horizontally scroll. You can use the `:CSVVertFold` -or `:VertFold` command to hide certain columns: > - - :VertFold [] -< -This will hide all columns from the first until the number entered. It -currently can't hide single columns, because of the way, syntax highlighting -is used. This command uses the conceal-feature |:syn-conceal| to hide away -those columns. If no nr is given, hides all columns from the beginning till -the current column. - -Use > - :VertFold! - -to display all hidden columns again. - - *:CSVTranspose* *Transpose_CSV* -3.22 Transposing a column *csv-transpose* -------------------------- -Transposing means to exchange rows and columns. You can transpose the csv -file, using the `:CSVTranspose` or `:Transpose` : > - - :[range]Transpose -< -command. If [range] is not given, it will transpose the complete file, -otherwise it will only transpose the lines in the range given. Note, comments -will be deleted and transposing does not work with fixed-width columns. - - *:CSVTabularize* -3.23 Transforming into a table *:CSVTable* *csv-tabularize* ------------------------------- -You can also transform your csv data into a visual table, using the -`:CSVTabularize` or `:CSVTable`: > - - :CSVTabularize -< -command. This will make a frame around your csv data and substitute all -delimiters by '|', so that it will look like a table. - -e.g. consider this data: > -> -First,Second,Third ~ -10,5,2 ` -5,2,10 ` -2,10,5 ` -10,5,2 ` - -This will be transformed into: > - - |---------------------| - | First| Second| Third| - |------|-------|------| - | 10| 5| 2| - | 5| 2| 10| - | 2| 10| 5| - | 10| 5| 2| - |---------------------| - -If your Vim uses an unicode 'encoding', the plugin makes a nice table using -special unicode drawing glyphs (but it might be possible, that those chars are -not being displayed correctly, if either your terminal or the gui font doesn't -have characters for those codepoints). If you use the bang form, each row will -be separated by a line. -You can also visual select a range of lines and use :Tabularize to have only -that range converted into a nice ascii table. Else it try to use the current -paragraph and try to transform it. - -If you use the '!' bang argument, between each row, a line will be drawn. - -In csv files, you can also use the :CSVTabularize command, in different -filetypes you can use the :CSVTable command (and is available as plugin so it -will be available for non-CSV filetypes). - -Set the variable g:csv_table_leftalign=1 if you want the columns to be -leftaligned. - -Note: Each row must contain exactly as many fields as columns. - -This command is available as default plugin. To disable this feature, set the - variable g:csv_disable_table_command to 1: > - - :let g:csv_disable_table_command = 1 -< - *:CSVAddColumn* -3.24 Add new empty columns *AddColumn_CSV* --------------------------- -If you want to add new empty columns to your file you can use the -`:CSVAddColumn` or `:AddColumn` command: > - - :[range]AddColumn [column] [count] - -By default, this works for the whole file, but you can give a different range -to which the AddColumn command applies. If no arguments are given, the new -empty column will be added after the column on which the cursor is. You can -however add as first argument the column number after which the new column -needs to be added. - -Additionally, you can also add a count number to add several columns at once -after the specified column number. Use 0 for the column number, if you want to -add several columns after the current column. - - *:CSVSubstitute* -3.25 Substitute in columns *Substitute_CSV* --------------------------- -If you want to substitute only in specific columns, you can use the -`:CSVSubstitute` or `:Substitute` command: > - - :[range]Substitute [column/]pattern/string[/flags] - -This means in the range and within the given columns replace pattern by -string. This works basically like the |:s| command, except that you MUST use -forward slashes / to delimit the command. The optional part `[column/]` can -take either the form of an address or if you leave it out, substitution will -only happen in the current column. Additionally, you can use the `1,5/` form -to substitute within the columns 1 till 5 or you can even use `1,$` which -means to substitute in each column (so in fact this simplifies to a simple -`:s` command whithin the given range. For the use of `[/flags]` see |:s_flags| -Here are some examples: > - - :%Substitute 1,4/foobar/baz/gce - -Substitutes in the whole file in columns 1 till 4 the pattern foobar by baz -for every match ('g' flag) and asks for confirmation ('c' flag). - - :%S 3,$/(\d\+)/\1 EUR/g - -Substitutes in each column starting from the third each number and appends the -EURO suffix to it. - -3.26 Count Values inside a Column *Count_CSV* ---------------------------------- -You can let Vim output the number of values inside a column using the `:CSVCountCol` -command > - - :[range]CountCol [nr] [distinct] - -This outputs the number of [distinct] values visible in the column [nr] -If [distinct] is not given, count's all values. Note, header rows and folded -rows won't be counted. - -The result is also available in the buffer-local variable `b:csv_result`. - -See also |csv-aggregate-functions| - - *MinCol_CSV* -3.27 Maximum/Minimum value of a Column *MaxCol_CSV* ---------------------------------------- -You can let Vim output the 10 maximum/minimum values of a column using the -`:CSVMaxCol` command > - - :[range]MaxCol [nr][distinct] [/format/] - :[range]MinCol [nr][distinct] [/format/] - -This outputs the result of the column within the range given. If no range -is given, this will calculate the max value of the whole column. If is not -given, this calculates the sum for the column the cursor is on. Note, that the -delimiter will be stripped away from each value and also empty values won't be -considered. - -By default, Vim uses the a numerical format that uses the '.' as decimal -separator while there is no thousands separator. If youre file contains -the numbers in a different format, you can use the /format/ option to specify -a different thousands separator or a different decimal separator. The format -needs to be specified like this: - /x:y/ -where 'x' defines the thousands separator and y defines the decimal -separator and each one is optional. This means, that > - - :MaxCol 1 /:,/ - -uses the default thousands separator and ',' as the decimal separator and > - - :MaxCol 2 / :./ - -uses the Space as thousands separator and the '.' as decimal separator. - -If [distinct] is given, only returns the number of distinct values. - -Note, if you Vim is compiled without floating point number format (|+float|), -Vim will only aggregate the integer part and therefore won't use the 'y' -argument in the /format/ specifier. - -The result is also available in the buffer-local variable `b:csv_result`. - -3.28 Average value of a Column *AvgCol_CSV* ------------------------------- -You can let Vim output the value of a column using the `:CSVAvgCol` command > - - :[range]AvgCol [nr] [/format/] - -This outputs the result of the column within the range given. If no range -is given, this will calculate the average value of the whole column. If is not -given, this calculates the sum for the column the cursor is on. Note, that the -delimiter will be stripped away from each value and also empty values won't be -considered. - -For the [/format/] part, see |MaxCol_CSV|. - -The result is also available in the buffer-local variable `b:csv_result`. - -See also |csv-aggregate-functions| - -3.29 Variance of a Column *VarCol_CSV* -_________________________ - - :[range]PopVarCol [nr] [/format/] - - :[range]SmplVarCol [nr] [/format/] - -This outputs the result of the column `` within the range given. If no range -is given, this will calculate the statistical variance of the whole column. If is not -given, this calculates the variance for the column the cursor is on. Note, that the delimiter -will be stripped away from each value and also empty values won't be considered. - -The result is also available in the buffer-local variable `b:csv_result`. - -3.30 Standard Deviation of a Column *StdDevCol_CSV* -___________________________________ - - :[range]PopStdCol [nr] [/format/] - - :[range]SmplStdCol [nr] [/format/] - -This outputs the result of the column `` within the range given. If no range -is given, this will calculate the standard deviation of the whole column. If is not -given, this calculates the standard deviation for the column the cursor is on. Note, that -the delimiter will be stripped away from each value and also empty values won't be considered. - -The result is also available in the buffer-local variable `b:csv_result`. - - *:CSVDupColumn* -3.31 Duplicate columns *DupColumn_CSV* ----------------------- -If you want to add duplicate an existing column you can use the -`:CSVDupColumn` or `:DupColumn` command: > - - :[range]DupColumn [column] [count] - -By default, this works for the whole file, but you can give a different range -to which the command applies. By default it will duplicate the column on which -the cursor is, but you can add as first argument which column will be duplicated. - -Additionally, you can also provide a count to copy several columns at once. - - *ColumnWidth_CSV* -3.32 Column Width *:CSVColumnWidth* ------------------ -If you want to know the width of each column, you can use the `:CSVColumnWidth` command: > - - :CSVColumnWidth - -This will output the width for each column at the bottom. See also -|CSVWidth()| function - -3.33 Sum of Numbers in a Row *SumRow_CSV* ----------------------------- -You can let Vim output the sum of a field in a row using the `:CSVASumRow` command > - - :[range]SumRow [/format/] - -This outputs the sum of the row [range]. If no range is given, this will -calculate the sum for the current row. Note, that the delimiter will be -stripped away from each value and also empty values won't be considered. - -For the [/format/] part, see |MaxCol_CSV|. -============================================================================== -4. CSV Configuration *csv-configuration* - -The CSV plugin tries to automatically detect the field delimiter for your -file, cause although often the file is called CSV (comma separated values), a -semicolon is actually used. By default the plugin tries the following -delimiters: ',', ';', '|', '\t', '^', ':'. -The column separator is stored in the buffer-local variable b:delimiter. This -delimiter is heavily used, because you need it to define a column. Almost all -commands use this variable therefore. - -4.1 Delimiter *csv-delimiter* -------------- -To override the automatic detection of the delimiter and define the separator -manually, use: > - - :let g:csv_delim=',' - -to let the comma be the delimiter. This sets the buffer local delimiter -variable b:delimiter. - -If your file does not consist of delimited columns, but rather is a fixed -width csv file, see |csv-fixedwidth| for configuring the plugin appropriately. - -If you changed the delimiter, you should reinitialize the plugin using -|InitCSV| - -Note: the delimiter will be used to generate a regular expression that matches -a column. Internally the plugin uses the very-nomagic setting for the -delimiter, so escaping is not neccessary. - -If you want to override which delimiters are probed automatically, set the -g:csv_delim_test variable like this: > - :let g:csv_delim_test = ',;|' - -This will only make the plugin test the possible delimiters ',', ';' and '|'. -This will also make the automatic detection a bit faster, since it does not -need to test that many delimiters. - -4.2 Column *csv-column* ----------- -The definition, of what a column is, is defined as buffer-local variable -b:col. By default this variable is initialized to: > - - let b:col='\%(\%([^' . b:delimiter . ']*"[^"]*"[^' . b:delimiter . ']*' - \. b:delimiter . '\)\|\%([^' . b:delimiter . ']*\%(' . b:delimiter - \. '\|$\)\)\)' - -This should take care of quoted delimiters within a column. Those should -obviously not count as a delimiter. This regular expression is quite -complex and might not always work on some complex cases (e.g. linebreaks -within a field, see RFC4180 for some ugly cases that will probably not work -with this plugin). - -If you changed the b:delimiter variable, you need to redefine the b:col -variable, cause otherwise it will not reflect the change. To change the -variable from the comma to a semicolon, you could call in your CSV-Buffer -this command: > - - :let b:col=substitute(b:col, ',', ';', 'g') - -Check with :echo b:col, if the definition is correct afterwards. - -You can also force the plugin to use your own defined regular expression as -column. That regular expression should include the delimiter for the columns. -To define your own regular expression, set the g:csv_col variable: > - - let g:csv_col='[^,]*,' - -This defines a column as a field delimited by the comma (where no comma can be -contained inside a field), similar to how |csv-strict| works. - -You should reinitialize the plugin afterwards |InitCSV| - -4.3 Highlighting Group *csv-higroup* ----------------------- -By default the csv ftplugin uses the WildMenu highlighting Group to define how -the |HiColumn| command highlights columns. If you would like to define a -different highlighting group, you need to set this via the g:csv_hiGroup -variable. You can e.g. define it in your |.vimrc|: > - - :let g:csv_hiGroup = "IncSearch" - -You need to restart Vim, if you have changed this variable or use |InitCSV| - -The |hl-Title| highlighting is used for the Header line that is created by the -|Header_CSV| command. If you prefer a different highlighting, set the -g:csv_hiHeader variable to the prefered highlighting: > - - let g:csv_hiHeader = 'Pmenu' -< -This would set the header window to the |hl-Pmenu| highlighting, that is used -for the popup menu. To disable the custom highlighting, simply |unlet| the -variable: > - - unlet g:csv_hiHeader - -You should reinitialize the plugin afterwards |InitCSV| - -4.4 Strict Columns *csv-strict* ------------------- -The default regular expression to define a column is quite complex -(|csv-column|). This slows down the processing and makes Vim use more memory -and it could still not fit to your specific use case. - -If you know, that in your data file, the delimiter cannot be contained inside -the fields quoted or escaped, you can speed up processing (this is quite -noticeable when using the |ArrangeColumn_CSV| command) by setting the -g:csv_strict_columns variable: > - - let g:csv_strict_columns = 1 - -This would define a column as this regex: > - - let b:col = '\%([^' . b:delimiter . ']*' . b:delimiter . '\|$\)' - -Much simpler then the default column definition, isn't it? -See also |csv-column| and |csv-delimiter| - -You can disable the effect if you |unlet| the variable: > - - unlet g:csv_strict_columns - -You should reinitialize the plugin afterwards |InitCSV| - -For example when opening a CSV file you get the Error |E363|: pattern uses -more memory than 'maxmempattern'. In this case, either increase the -'maxmempattern' or set the g:csv_strict_columns variable. - - -4.5 Concealing *csv-syntax* *csv-conceal* --------------- -The CSV plugin comes with a function to syntax highlight csv files. Basically -allt it does is highlight the columns and the header line. - -By default, the delimiter will not be displayed, if Vim supports |conceal| of -syntax items and instead draws a vertical line. If you don't want that, simply -set the g:csv_noconceal variable in your .vimrc > - - let g:csv_no_conceal = 1 - -and to disable it, simply unlet the variable > - - unlet g:csv_no_conceal - -You should reinitialize the plugin afterwards |InitCSV| -Note: You can also set the 'conceallevel' option to control how the concealed -chars will be displayed. - -If you want to customize the syntax colors, you can define your own groups. -The CSV plugin will use already defined highlighting groups, if they are -already defined, otherwise it will define its own defaults which should be -visible with 8, 16, 88 and 256 color terminals. For that it uses the -CSVColumnHeaderOdd and CSVColumnHeaderEven highlight groups for syntax -coloring the first line. All other lines get either the CSVColumnOdd or -CSVColumnEven highlighting. - -In case you want to define your own highlighting groups, you can define your -own syntax highlighting like this in your |.vimrc| > - - hi CSVColumnEven term=bold ctermbg=4 guibg=DarkBlue - hi CSVColumnOdd term=bold ctermbg=5 guibg=DarkMagenta - hi CSVColumnHeaderEven ... - hi CSVColumnHeaderOdd ... - -Alternatively, you can simply link those highlighting groups to some other -ones, you really like: > - - hi link CSVColumnOdd MoreMsg - hi link CSVColumnEven Question -< -If you do not want column highlighting, set the variable -g:csv_no_column_highlight to 1 > - - :let g:csv_no_column_highlight = 1 -< -Note, these changes won't take effect, until you restart Vim. - - -4.6 Newlines *csv-newline* ------------- -RFC4180 allows newlines in double quoted strings. By default, the csv-plugin -won't recognize newlines inside fields. It is however possible to make the -plugin aware of newlines within quoted strings. To enable this, set > - - let g:csv_nl = 1 - -and to disable it again, simply unset the variable > - - unlet g:csv_nl - -It is a good idea to reinitialize the plugin afterwards |InitCSV| - -Note, this might not work correctly in all cases. The syntax highlighting -seems to change on cursor movements. This could possibly be a bug in the -syntax highlighting engine of Vim. Also, |WhatColumn_CSV| can't handle -newlines inside fields and will most certainly be wrong. - -4.7 Highlight column automatically *csv-hicol* ----------------------------------- -You can let vim automatically highlight the column on which the cursor is. -This works by defining an |CursorMoved| autocommand to always highlight the -column, when the cursor is moved in normal mode. Note, this does not update -the highlighting, if the Cursor is moved in Insert mode. To enable this, -define the g:csv_highlight_column variable like this > - - let g:csv_highlight_column = 'y' - -and to disable it again, simply unset the variable > - - unlet g:csv_highlight_column - -It is a good idea to reinitialize the plugin afterwards |InitCSV| - -4.8 Fixed width columns *csv-fixedwidth* ------------------------ -Sometimes there are no real columns, but rather the file is fixed width with -no distinct delimiters between each column. The CSV plugin allows you to -handle such virtual columns like csv columns, if you define where each column -starts. - -Note: Except for |ArrangeColumn_CSV| and the |Header_CSV| commands, all -commands work in either mode. Those two commands won't do anything in the case -of fixedwidth columns, since they don't really make sense here. - -4.8.1 Manual setup ------------------- -You can do this, by setting the buffer-local variable -b:csv_fixed_width like this > - - let b:csv_fixed_width="1,5,9,13,17,21" - -This defines that each column starts at multiples of 4. Be sure, to issue -this command in the buffer, that contains your file, otherwise, it won't -have an effect, since this is a buffer-local option (|local-option|) - -After setting this variable, you should reinitialize the plugins using -|InitCSV| - - *CSVFixed* -4.8.2 Setup using a Wizard --------------------------- -Alternatively, you can setup the fixed width columns using the :CSVFixed -command. This provides a simple wizard to select each column. If you enter -the command: > - :CSVFixed -< -The first column will be highlighted and Vim outputs: -, , , , ... -This means, you can now use those 5 keys to configure the fixed-width columns: - - Use Cursor Left () and Cursor Right () to move the - highlighting bar. - If you press , this column will be fixed and remain - highlighted and there will be another bar, you can move using - the Cursor keys. This means this column will be considered to be - the border between 2 fixed with columns. - Abort - Press the backspace key, to remove the last column you fixed with - the key. - Use Enter to finish the wizard. This will use all fixed columns - to define the fixed width columns of your csv file. The plugin - will be initialized and syntax highlighting should appear. - -Note: This only works, if your Vim has the 'colorcolumn' option available -(This won't work with Vim < 7.3 and also not with a Vim without +syntax -feature). - - -4.9 CSV Header lines *csv-header* --------------------- -By default, dynamic filtering |csv-filter| will not fold away the first line. -If you don't like that, you can define your header line using the variable -b:csv_fold_headerline, e.g. > - - let b:csv_headerline = 0 - -to disable, that a header line won't be folded away. If your header line -instead is on line 5, simply set this variable to 5. This also applies to the -|Header_CSV| command. - -4.10 Number format *csv-nrformat* ------------------- -When using the |SumCol_CSV| command, you can specify a certain number format -using the /x:y/ argument. You can however also configure the plugin to detect -a different number format than the default number format (which does not -support a thousands separator and uses the '.' as decimal separator). - -To specify a different thousands separator by default, use > - - let b:csv_thousands_sep = ' ' - -to have the space use as thousands separator and > - - let b:csv_decimal_sep = ',' - -to use the comma as decimal separator. - -4.11 Move folded lines *csv-move-folds* ----------------------- -If you use dynamic filters (see |csv-filter|), you can configure the plugin to -move all folded lines to the end of the file. This only happens if you set the -variable > - - let g:csv_move_folds = 1 -< -and the file is modifiable. This let's you see all non-folded records as a -consecutive area without being disrupted by folded lines. - -4.12 Using comments *csv-comments* -------------------- -Strictly speaking, in csv files there can't be any comments. You might however -still wish to comment or annotate certain sections in your file, so the CSV -plugin supports Comments. - -Be default, the CSV plugin will use the 'commentstring' setting to identify -comments. If this option includes the '%s' it will consider the part before -the '%s' as leading comment marker and the part behind it as comment -delimiter. - -You can however define your own comment marker, using the variable -g:csv_comment. Like with the 'commentstring' setting, you can use '%s' -expandos, that will denote where the actual comment text belongs. To define -your own comment string, put this in your |.vimrc| > - - :let g:csv_comment = '#' -< -Which will use the '#' sign as comment leader like in many scripting -languages. - -After setting this variable, you should reinitialize the plugins using -|InitCSV| - - *csv-foldtext* -By default, the csv plugin sets the 'foldtext' option. If you don't want this, -set the variable `g:csv_disable_fdt` in your |.vimrc| > - - :let g:csv_disable_fdt = 1 - -4.13 Size and performance considerations *csv-size* ----------------------------------------- -By default, the csv plugin will analyze the whole file to determine which -delimiter to use. Beside specifying the the actual delimiter to use -(|csv-delimiter|) you can restrict analyzing the plugin to consider only a -certain part of the file. This should make loading huge csv files a log -faster. To only consider the first 100 rows set the `g:csv_start` and -`g:csv_end` variables in your |.vimrc| like this > - - :let g:csv_start = 1 - :let g:csv_end = 100 - -Also note, you can use the Large File plugin -(http://www.drchip.org/astronaut/vim/index.html#LARGEFILE) which however will -disable syntax highlighting and the filetype commands for very large csv files -(by default larger than 100 MB). - -See also |csv-slow| -============================================================================== -5. Functions *CSV-Functions* - -The csv plugins also defines some functions, that can be used for scripting -when a csv file is open - -5.1 CSVPat() *CSVPat()* ------------- -CSVPat({column}[, {pattern}]) - -This function returns the pattern for the selected column. If only columns is -given, returns the regular expression used to search for the pattern '.*' in -that column (which means the content of that column). Alternatively, an -optional pattern can be given, so the return string can be directly feeded to -the |/| or |:s| command, e.g. type: > - - :s/=CSVPat(3, 'foobar')/baz - -where the means pressing Control followed by R followed by = -(see |c_CTRL-R_=|). A prompt will apear, with the '=' as the first character -on which you can enter expressions. - -In this case enter CSVPat(3, 'foobar') which returns the pattern to search for -the string 'foobar' in the third column. After you press enter, the returned -pattern will be put after the :s command so you can directly enter / and the -substitute string. - -5.2 CSVField(x,y[, orig]) *CSVField()* -------------------------- -This function returns the field at index (x,y) (starting from 1). If the -parameter orig is given, returns the column "as is" (e.g. including delimiter -and leading and trailing whitespace, otherwise that will be stripped.) - -5.3 CSVCol([name]) *CSVCol()* ------------------- -If the name parameter is given, returns the name of the column, else returns -the index of the current column, starting at 1. - -5.4 CSVSum(col, fmt, startline, endline) *CSVSum()* ----------------------------------------- -Returns the sum for column col. Uses fmt to parse number format (see -|:CSVSumCol|) startline and endline specify the lines to consider, if empty, -will be first and last line. - -5.5 CSVCount(col, fmt, startline, endline[, distinct]) *CSVCount()* ------------------------------------------------------- -Returns the count of values for column col. If the optional parameter -[distinct] is given, only returns the distinct number of values. - -5.6 CSVMax(col, fmt, startline, endline) *CSVMax()* ------------------------------------------------------- -Returns the 10 largest values for column col. - -5.7 CSVMin(col, fmt, startline, endline) *CSVMin()* ------------------------------------------------------- -Returns the 10 smallest values for column col. - -5.8 CSVAvg(col, fmt, startline, endline) *CSVAvg()* ------------------------------------------------------- -Returns the average value for column col. - -5.9 CSVWidth([silent]) *CSVWidth()* ------------------------------------------------------- -Returns a list with the width for each column. If the first argument is given -and non-zero, do not output warning message about the number of records used -to calculate the width (else it might output something like: - CSV: File too large, only checking the first 10000 rows for the width -), default: 1 - -============================================================================== -6. CSV Tips and Tricks *csv-tips* - -Here, there you'll find some small tips and tricks that might help when -working with CSV files. - -6.1 Statusline *csv-stl* --------------- -Suppose you want to include the column, on which the cursor is, into your -statusline. You can do this, by defining in your .vimrc the 'statusline' like -this: > - - function MySTL() - if has("statusline") - hi User1 term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow - let stl = ... - if exists("*CSV_WCol") - let csv = '%1*%{&ft=~"csv" ? CSV_WCol() : ""}%*' - else - let csv = '' - endif - return stl.csv - endif - endfunc - set stl=%!MySTL() -< - -This will draw in your statusline right aligned the current column and max -column (like 1/10), if you are inside a CSV file. The column info will be -drawn using the User1 highlighting (|hl-User1|), that has been defined in the -second line of the function. In the third line of your function, put your -desired 'statusline' settings as |expression|. Note the section starting with -'if exists(..)' guards against not having loaded the filetype plugin. - -Note: vim-airline (https://github.com/bling/vim-airline) by default supports -the csv plugin and enables a nice little csv statusline which helps for -navigating within a csv file. For details, see the Vim-Airline documentation. - - *CSV_WCol()* -The CSV_WCol() function controls, what will be output. In the simplest case, -when no argument is given, it simply returns on which column the cursor is. -This would look like '1/10' which means the cursor is on the first of 10 -columns. If you rather like to know the name of the column, simply give as -parameter to the function the string "Name". This will return the column name -as it is printed on the first line of that column. This can be adjusted, to -have the column name printed into the statusline (see |csv-stl| above) by -replacing the line > - - let csv = '%1*%{&ft=~"csv" ? CSV_WCol() : ""}%*' -< -by e.g. - - let csv = '%1*%{&ft=~"csv" ? CSV_WCol("Name") . " " . CSV_WCol() : ""}%*' - -which will output "Name 2/10" if the cursor is in the second column -which is named "Name". - -6.2 Slow CSV plugin *csv-slow* -------------------- -Processing a csv file using |ArrangeColumn_CSV| can be quite slow, because Vim -needs to calculate the width for each column and then replace each column by -itself widened by spaces to the optimal length. Unfortunately, csv files tend -to be quite big. Remember, for a file with 10,000 lines and 50 columns Vim -needs to process each cell, which accumulates to 500,000 substitutions. It -might take some time, until Vim is finished. - -You can speed up things a little bit, if you omit the '!' attribute to the -|ArrangeColumn| (but this will only work, if the width has been calculated -before, e.g. by issuing a :1ArrangeColumn command to arrange only the first -line. Additionally you can also configure how this command behaves by setting -some configuration variables. - -Also note, using dynamic filters (|csv-filter|), can slow down Vim -considerably, since they internally work with complex regular expressions, and -if you have a large file, containing many columns, you might hit a performance -penalty (especially, if you want to filter many columns). It's best to avoid -those functions if you are using a large csv file (so using strict columns -|csv-strict| might help a little and also setting 're' to 1 might also -alleviate it a little). - - -6.3 Defining custom aggregate functions *csv-aggregate-functions* ---------------------------------------- -The CSV plugin already defines the |SumCol_CSV| command, to let you calculate -the sum of all values of a certain column within a given range. This will -consider all values within the range, that are not folded away (|csv-filter|), -and also skip comments and the header lines. The delimiter will be deleted -from each field. - -But it may be, that you don't need the sum, but would rather want to have the -average of all values within a certain column. You can define your own -function and let the plugin call it for a column like this: - - 1) You define your own custom function in the after directory of your - vim runtime path |after-directory| (see also #2 below) > - - fun! My_CSV_Average(col) - let sum=0 - for item in a:col - let sum+=item - endfor - return sum/len(a:col) - endfun -< - This function takes a list as argument, and calculates the average for - all items in the list. You could also make use of Vim's |eval()| - function and write your own Product function like this > - - fun! My_CSV_Product(col) - return eval(join(a:col, '*')) - endfun -< - - 2) Now define your own custom command, that calls your custom function for - a certain column > - - command! -buffer -nargs=? -range=% AvgCol - \ :echo csv#EvalColumn(, - \ "My_CSV_Average", ,) -< - This command should best be put into a file called csv.vim and save - it into your ~/.vim/after/ftplugin/ directory. Create directories - that don't exist yet. For Windows, this would be the - $VIMRUNTIME/vimfiles/after/ftplugin directory. - - 3) Make sure, your |.vimrc| includes a filetype plugin setting like this > - - filetype plugin on -< - This should make sure, that all the necessary scripts are loaded by - Vim. - - After restarting Vim, you can now use your custom command definition - :AvgCol. Use a range, for the number of lines you want to evaluate and - optionally use an argument to specify which column you want to be - evaluated > - - :2,$AvgCol 7 -< - This will evaluate the average of column seven (assuming, line 1 is the - header line, which should not be taken into account). - - Note: this plugin already defines an average function. - -6.4 Autocommand on opening/closing files *csv-arrange-autocmd* ----------------------------------------- -If you want your CSV files to always be displayed like a table, you can -achieve this using the |ArrangeColumn_CSV| command and some autocommands. -Define these autocommands in your |.vimrc| > - - aug CSV_Editing - au! - au BufRead,BufWritePost *.csv :%ArrangeColumn - au BufWritePre *.csv :%UnArrangeColumn - aug end - -Upon Entering a csv file, Vim will visually arrange all columns and before -writing, those columns will be collapsed again. The BufWritePost autocommand -makes sure, that after the file has been written successfully, the csv file -will again be visually arranged. - -You can also simply set the variable > - - let g:csv_autocmd_arrange = 1 -< -in your vimrc and an autocmd will be installed, that visually arranges your -csv file whenever you open them for editing. Alternatively, you can restrict -this setting to files below a certain size. For example, if you only want to -enable this feature for files smaller than 1 MB, put this into your |.vimrc| > - - let g:csv_autocmd_arrange = 1 - let g:csv_autocmd_arrange_size = 1024*1024 - -Note, this is highly experimental and especially on big files, this might -slow down Vim considerably. - -6.5 Syntax error when opening a CSV file *csv-syntax-error* ----------------------------------------- -If you see this error: > - - CSV Syntax:Invalid column pattern, using default pattern \%([^,]*,\|$\) -< -This happens usually, when the syntax script is read before the filetype -plugin, so the plugin did not have a chance to setup the column delimiter -correctly. - -The easy way to fix it, is to make sure the :syntax on (|:syn-on|) statement -comes after the :filetype plugin (|:filetype-plugin-on|) statement in your -|.vimrc| - -Alternatively, you can simply call |InitCSV| and ignore the error. - -Note: It could also be caused by lazy loading feature by a vim plugin -manager. For example this line might also cause it: > - - Plug 'https://github.com/chrisbra/csv.vim', { 'for' : 'csv' } -< - -The fix would then be: > - - Plug 'https://github.com/chrisbra/csv.vim' - -6.6 Calculate new columns *csv-calculate-column* -------------------------- -Suppose you have a table like this: - -Index;Value1;Value2~ -1;100;3 ` -2;20;4 ` - -And you need one more column, that is the calculated product of column 2 and -3, you can make use of the provided |CSVField()| function using a -|sub-replace-expression| of an |:s| command. In this case, you would do this: > - - :2,3s/$/\=printf("%s%.2f", b:delimiter, - (CSVField(2,line('.'))+0.0)*(CSVField(3,line('.'))+0.0/ - -Note: Enter as single line. The result will be this: > - -Index;Value1;Value2~ -1;100;3;300.00 ` -2;20;4;80.00 ` - -6.7 Using the result of an evaluation in insert mode *b:csv_result* ----------------------------------------------------- -The result of the last evaluation like e.g. |SumCol_CSV| will be available in -the buffer-local variable `b:csv_result`. This allows to easily enter the -result in a new new cell while in insert mode, using |i_CTRL-R|(e.g. in insert -mode press Ctrl-R followed by "=b:csv_result". - -You can also easily copy and paste it into e.g. the system clipboard using > - :let @+=b:csv_result - -============================================================================== -7. CSV Changelog *csv-changelog* - -see CHANGELOG.md in root directory of the plugin. - -# vim:ft=help - -endif diff --git a/doc/ft-gitcommit-plugin.txt b/doc/ft-gitcommit-plugin.txt deleted file mode 100644 index 3d6b90556..000000000 --- a/doc/ft-gitcommit-plugin.txt +++ /dev/null @@ -1,25 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 - -GIT COMMIT *ft-gitcommit-plugin* - -One command, :DiffGitCached, is provided to show a diff of the current commit -in the preview window. It is equivalent to calling "git diff --cached" plus -any arguments given to the command. - -GIT REBASE *ft-gitrebase-plugin* - -In a gitrebase filetype buffer, the following commands are provided: - - `:Pick` Changes the cursor line to a `pick` line. - `:Squash` Changes the cursor line to a `squash` line - `:Edit` Changes the cursor line to an `edit` line - `:Reword` Changes the cursor line to a `reword` line - `:Fixup` Changes the cursor line to a `fixup` line - `:Drop` Changes the cursor line to a `drop` line - `:Cycle` Cycles between the first 5 gitrebase commands - -To make the `:Cycle` command more useful, it might be mapped, e.g. > - nnoremap S :Cycle -< - -endif diff --git a/doc/ft-ruby-indent.txt b/doc/ft-ruby-indent.txt deleted file mode 100644 index 5e2749656..000000000 --- a/doc/ft-ruby-indent.txt +++ /dev/null @@ -1,152 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 - -RUBY *ft-ruby-indent* - *vim-ruby-indent* - - Ruby: Access modifier indentation |ruby-access-modifier-indentation| - Ruby: Block style indentation |ruby-block-style-indentation| - Ruby: Assignment style indentation |ruby-assignment-style-indentation| - Ruby: Hanging element indentation |ruby-hanging-element-indentation| - - *ruby-access-modifier-indentation* - *g:ruby_indent_access_modifier_style* - Ruby: Access modifier indentation ~ - -Different access modifier indentation styles can be used by setting: > - - :let g:ruby_indent_access_modifier_style = 'normal' - :let g:ruby_indent_access_modifier_style = 'indent' - :let g:ruby_indent_access_modifier_style = 'outdent' -< -By default, the "normal" access modifier style is used. - -Access modifier style "normal": -> - class Indent - private :method - protected :method - private - def method; end - protected - def method; end - public - def method; end - end -< -Access modifier style "indent": -> - class Indent - private :method - protected :method - private - def method; end - protected - def method; end - public - def method; end - end -< -Access modifier style "outdent": -> - class Indent - private :method - protected :method - private - def method; end - protected - def method; end - public - def method; end - end -< - *ruby-block-style-indentation* - *g:ruby_indent_block_style* - Ruby: Block style indentation ~ - -Different block indentation styles can be used by setting: > - - :let g:ruby_indent_block_style = 'expression' - :let g:ruby_indent_block_style = 'do' -< -By default, the "do" block indent style is used. - -Block indent style "expression": -> - first - .second do |x| - something - end -< -Block indent style "do": -> - first - .second do |x| - something - end -< - - *ruby-assignment-style-indentation* - *g:ruby_indent_assignment_style* - Ruby: Assignment style indentation ~ - -Different styles of indenting assignment for multiline expressions: -> - :let g:ruby_indent_assignment_style = 'hanging' - :let g:ruby_indent_assignment_style = 'variable' -< -By default, the "hanging" style is used. - -Assignment indent style "hanging": -> - x = if condition - something - end -< -Assignment indent style "variable": -> - x = if condition - something - end -< - - *ruby-hanging-element-indentation* - *g:ruby_indent_hanging_elements* - Ruby: Hanging element indentation ~ - -Elements of multiline collections -- such as arrays, hashes, and method -argument lists -- can have hanging indentation enabled or disabled with the -following setting. -> - :let g:ruby_indent_hanging_elements = 1 - :let g:ruby_indent_hanging_elements = 0 -< -By default, this setting is "1" (true) meaning that hanging indentation is -enabled in some cases. - -Here is an example method call when the setting is true (non-zero): -> - render('product/show', - product: product, - on_sale: true, - ) -< -And the same method call when the setting is false (zero): -> - render('product/show', - product: product, - on_sale: true, - ) -< -Note that, even if the setting is turned on, you can still get non-hanging -indentation by putting each argument on a separate line: -> - render( - 'product/show', - product: product, - on_sale: true, - ) -< - - vim:tw=78:sw=4:ts=8:ft=help:norl: - -endif diff --git a/doc/ft-ruby-omni.txt b/doc/ft-ruby-omni.txt deleted file mode 100644 index dc78493bb..000000000 --- a/doc/ft-ruby-omni.txt +++ /dev/null @@ -1,56 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 - -RUBY *ft-ruby-omni* - *vim-ruby-omni* - -Completion of Ruby code requires that Vim be built with |+ruby|. - -Ruby completion will parse your buffer on demand in order to provide a list of -completions. These completions will be drawn from modules loaded by "require" -and modules defined in the current buffer. - -The completions provided by CTRL-X CTRL-O are sensitive to the context: - - CONTEXT COMPLETIONS PROVIDED ~ - - 1. Not inside a class definition Classes, constants and globals - - 2. Inside a class definition Methods or constants defined in the class - - 3. After '.', '::' or ':' Methods applicable to the object being - dereferenced - - 4. After ':' or ':foo' Symbol name (beginning with "foo") - -Notes: - - Vim will load/evaluate code in order to provide completions. This may - cause some code execution, which may be a concern. This is no longer - enabled by default, to enable this feature add > - let g:rubycomplete_buffer_loading = 1 -< - In context 1 above, Vim can parse the entire buffer to add a list of - classes to the completion results. This feature is turned off by default, - to enable it add > - let g:rubycomplete_classes_in_global = 1 -< to your vimrc - - In context 2 above, anonymous classes are not supported. - - In context 3 above, Vim will attempt to determine the methods supported by - the object. - - Vim can detect and load the Rails environment for files within a rails - project. The feature is disabled by default, to enable it add > - let g:rubycomplete_rails = 1 -< to your vimrc - - Vim can parse a Gemfile, in case gems are being implicitly required. To - activate the feature: > - let g:rubycomplete_load_gemfile = 1 -< To specify an alternative path, use: > - let g:rubycomplete_gemfile_path = 'Gemfile.aux' -< To use Bundler.require instead of parsing the Gemfile, set: > - let g:rubycomplete_use_bundler = 1 -< To use custom paths that should be added to $LOAD_PATH to correctly - resolve requires, set: > - let g:rubycomplete_load_paths = ["/path/to/code", "./lib/example"] - - - vim:tw=78:sw=4:ts=8:ft=help:norl: - -endif diff --git a/doc/ft-ruby-plugin.txt b/doc/ft-ruby-plugin.txt deleted file mode 100644 index 2380240d1..000000000 --- a/doc/ft-ruby-plugin.txt +++ /dev/null @@ -1,85 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 - -RUBY *ft-ruby-plugin* - *vim-ruby-plugin* - - - Ruby: Recommended settings |ruby-recommended| - Ruby: Motion commands |ruby-motion| - Ruby: Text objects |ruby-text-objects| - - *ruby-recommended* - *g:ruby_recommended_style* - Ruby: Recommended settings ~ - -The `g:ruby_recommended_style` variable activates indentation settings -according to the most common ruby convention: two spaces for indentation. It's -turned on by default to ensure an unsurprising default experience for most -ruby developers. - -If you'd like to enforce your own style, it's possible to apply your own -preferences in your own configuration in `after/ftplugin/ruby.vim`. You can -also disable the setting by setting the variable to 0: -> - let g:ruby_recommended_style = 0 -< - - *ruby-motion* - Ruby: Motion commands ~ - -Vim provides motions such as |[m| and |]m| for jumping to the start or end of -a method definition. Out of the box, these work for curly-bracket languages, -but not for Ruby. The vim-ruby plugin enhances these motions, by making them -also work on Ruby files. - - *ruby-]m* -]m Go to start of next method definition. - - *ruby-]M* -]M Go to end of next method definition. - - *ruby-[m* -[m Go to start of previous method definition. - - *ruby-[M* -[M Go to end of previous method definition. - - *ruby-]]* -]] Go to start of next module or class definition. - - *ruby-][* -][ Go to end of next module or class definition. - - *ruby-[[* -[[ Go to start of previous module or class definition. - - *ruby-[]* -[] Go to end of previous module or class definition. - - *ruby-text-objects* - Ruby: Text objects ~ - -Vim's |text-objects| can be used to select or operate upon regions of text -that are defined by structure. The vim-ruby plugin adds text objects for -operating on methods and classes. - - *ruby-v_am* *ruby-am* -am "a method", select from "def" until matching "end" - keyword. - - *ruby-v_im* *ruby-im* -im "inner method", select contents of "def"/"end" block, - excluding the "def" and "end" themselves. - - *ruby-v_aM* *ruby-aM* -aM "a class", select from "class" until matching "end" - keyword. - - *ruby-v_iM* *ruby-iM* -iM "inner class", select contents of "class"/"end" - block, excluding the "class" and "end" themselves. - - - vim:tw=78:sw=4:ts=8:ft=help:norl: - -endif diff --git a/doc/ft-ruby-syntax.txt b/doc/ft-ruby-syntax.txt deleted file mode 100644 index c8c8b9cf7..000000000 --- a/doc/ft-ruby-syntax.txt +++ /dev/null @@ -1,123 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 - -RUBY *ruby.vim* *ft-ruby-syntax* - *vim-ruby-syntax* - - Ruby: Operator highlighting |ruby_operators| - Ruby: Whitespace errors |ruby_space_errors| - Ruby: Syntax errors |ruby_syntax_errors| - Ruby: Folding |ruby_fold| |ruby_foldable_groups| - Ruby: Reducing expensive operations |ruby_no_expensive| |ruby_minlines| - Ruby: Spellchecking strings |ruby_spellcheck_strings| - - *ruby_operators* - Ruby: Operator highlighting ~ - -Operators, and pseudo operators, can be highlighted by defining: > - - :let ruby_operators = 1 - :let ruby_pseudo_operators = 1 -< -The supported pseudo operators are ., &., ::, *, **, &, <, << and ->. - - *ruby_space_errors* - Ruby: Whitespace errors ~ - -Whitespace errors can be highlighted by defining "ruby_space_errors": > - - :let ruby_space_errors = 1 -< -This will highlight trailing whitespace and tabs preceded by a space character -as errors. This can be refined by defining "ruby_no_trail_space_error" and -"ruby_no_tab_space_error" which will ignore trailing whitespace and tabs after -spaces respectively. - - *ruby_syntax_errors* - Ruby: Syntax errors ~ - -Redundant line continuations and predefined global variable look-alikes (such -as $# and $-z) can be highlighted as errors by defining: -> - :let ruby_line_continuation_error = 1 - :let ruby_global_variable_error = 1 -< - *ruby_fold* - Ruby: Folding ~ - -Folding can be enabled by defining "ruby_fold": > - - :let ruby_fold = 1 -< -This will set the value of 'foldmethod' to "syntax" locally to the current -buffer or window, which will enable syntax-based folding when editing Ruby -filetypes. - - *ruby_foldable_groups* -Default folding is rather detailed, i.e., small syntax units like "if", "do", -"%w[]" may create corresponding fold levels. - -You can set "ruby_foldable_groups" to restrict which groups are foldable: > - - :let ruby_foldable_groups = 'if case %' -< -The value is a space-separated list of keywords: - - keyword meaning ~ - -------- ------------------------------------- ~ - ALL Most block syntax (default) - NONE Nothing - if "if" or "unless" block - def "def" block - class "class" block - module "module" block - do "do" block - begin "begin" block - case "case" block - for "for", "while", "until" loops - { Curly bracket block or hash literal - [ Array literal - % Literal with "%" notation, e.g.: %w(STRING), %!STRING! - / Regexp - string String and shell command output (surrounded by ', ", `) - : Symbol - # Multiline comment - << Here documents - __END__ Source code after "__END__" directive - -NONE and ALL have priority, in that order, over all other folding groups. - - *ruby_no_expensive* - Ruby: Reducing expensive operations ~ - -By default, the "end" keyword is colorized according to the opening statement -of the block it closes. While useful, this feature can be expensive; if you -experience slow redrawing (or you are on a terminal with poor color support) -you may want to turn it off by defining the "ruby_no_expensive" variable: > - - :let ruby_no_expensive = 1 -< -In this case the same color will be used for all control keywords. - - *ruby_minlines* - -If you do want this feature enabled, but notice highlighting errors while -scrolling backwards, which are fixed when redrawing with CTRL-L, try setting -the "ruby_minlines" variable to a value larger than 50: > - - :let ruby_minlines = 100 -< -Ideally, this value should be a number of lines large enough to embrace your -largest class or module. - - *ruby_spellcheck_strings* - Ruby: Spellchecking strings ~ - -Ruby syntax will perform spellchecking of strings if you define -"ruby_spellcheck_strings": > - - :let ruby_spellcheck_strings = 1 -< - - vim:tw=78:sw=4:ts=8:ft=help:norl: - -endif diff --git a/doc/graphql.txt b/doc/graphql.txt deleted file mode 100644 index 3f41deaa4..000000000 --- a/doc/graphql.txt +++ /dev/null @@ -1,55 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 - -*graphql.txt* GraphQL plug-in for Vim *graphql* - -CONTENTS *graphql-contents* - -1. Introduction |graphql-intro| -2. JavaScript Support |graphql-javascript| -3. TypeScript Support |graphql-typescript| - - -INTRODUCTION *graphql-intro* - -This plugin provides GraphQL (http://graphql.org/) file detection, syntax -highlighting, and indentation. - - -JAVASCRIPT *graphql-javascript* - -GraphQL syntax support in ES2015 template literals is provided. It works "out -of the box" with Vim 8.2's JavaScript support. The extended syntax provided by -the vim-javascript (https://github.com/pangloss/vim-javascript) plugin is also -supported. - - *graphql-javascript-options* - - *g:graphql_javascript_tags* -|g:graphql_javascript_tags| list of strings - - Default: `["gql", "graphql", "Relay.QL"]` - - This variable lists the ES2015 template tag names that will be recognized as - containing GraphQL template literal strings. - - -TYPESCRIPT *graphql-typescript* - -Like |graphql-javascript|, GraphQL syntax support in ES2015 template literals -is provided. It also works "out of the box" with Vim 8.2's TypeScript support, -which is based on the yats (https://github.com/HerringtonDarkholme/yats.vim) -plugin. For older versions, you can install yats directly. - -TypeScript syntax support also uses |graphql-javascript-options| to customize -the list of recognized template tag names. - -REASONML *graphql-reasonml* - -GraphQL syntax support inside of ReasonML template strings using graphql-ppx -is available when vim-reasonml (https://github.com/jordwalke/vim-reasonml) is -also installed. - ------------------------------------------------------------------------------- -vim:tw=78:ft=help:norl: - -endif diff --git a/doc/haskell-vim.txt b/doc/haskell-vim.txt deleted file mode 100644 index d2083ca59..000000000 --- a/doc/haskell-vim.txt +++ /dev/null @@ -1,163 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 - -*haskell-vim.txt* Last Change 2016 March 14 -=============================================================================== -=============================================================================== - -=============================================================================== -CONTENTS *haskell-vim-contents* - - 1. Features |haskell-vim-features| - 2. Configuration |haskell-vim-configuration| - 3. Highlighting |haskell-vim-indentation| - -=============================================================================== -FEATURES *haskell-vim-features* - - * Covers a broader spectrum of keywords - * Highlighting for new features like type families, pattern synonyms, - arrow syntax, recursive do, role annotations, QuasiQuotation - * More contextual highlighting - (e.g. highlight "as" or "family" only in appropriate places) - * Smarter indentation - * Better Cabal support - -=============================================================================== -CONFIGURATION *haskell-vim-configuration* - -To enable the features you would like to use, just add the according line to -your `.vimrc`. - -=============================================================================== -HIGHLIGHTING *haskell-vim-highlighting* - -`haskell-vim` can highlight additional keywords. This is enabled by setting -the according variable to 1 in the `.vimrc`. - - * |haskell-vim-enable-quantification| - * |haskell-vim-enable-recursivedo| - * |haskell-vim-enable-arrowsyntax| - * |haskell-vim-enable-pattern-synonyms| - * |haskell-vim-enable-typeroles| - * |haskell-vim-enable-static-pointers| - * |haskell-vim-classic-highlighting| - * |haskell-vim-disable-TH| - - *haskell-vim-enable-quantification* -`g:haskell_enable_quantification` Enables highlighting of `forall`. - - *haskell-vim-enable-recursivedo* -`g:haskell_enable_recursivedo` Enables highlighting of `mdo` and `rec`. - - *haskell-vim-enable-arrowsyntax* -`g:haskell_enable_arrowsyntax` Enables highlighting of `proc`. - - *haskell-vim-enable-pattern-synonyms* -`g:haskell_enable_pattern_synonyms` Enables highlighting of the `pattern` keyword. - - *haskell-vim-enable-typeroles* -`g:haskell_enable_typeroles` Enables highlighting of the `role` keyword, as - well as `phantom`, `norminal` and - `representational`. - - *haskell-vim-enable-static-pointers* -`g:haskell_enable_static_pointers` Enables highlighting of the `static` keyword. - - *haskell-vim-classic-highlighting* -`haskell-vim` has an opinionated highlighting. If you do not like that you can -switch to a more traditional mode by setting `g:haskell_classic_highlighting` -to 1. - - *haskell-vim-disable-TH* -Disabling Template Haskell and Quasiquoting syntax is possible by setting -`g:haskell_disable_TH` to `1`. - -=============================================================================== -INDENTATION *haskell-vim-indentation* - -To configure indentation in `haskell-vim` you can use the following variables to -change indentation depth, just add the according line to your `.vimrc`. - -You can disable the indentation by setting `g:haskell_indent_disable` to `1`. - -Haskell~ - - * |haskell-vim-indent-if| - * |haskell-vim-indent-case| - * |haskell-vim-indent-let| - * |haskell-vim-indent-where| - * |haskell-vim-indent-before-where| - * |haskell-vim-indent-after-bare-where| - * |haskell-vim-indent-do| - * |haskell-vim-indent-in| - * |haskell-vim-indent-guard| - *haskell-vim-indent-if* -* let g:haskell_indent_if = 3 > - - if bool - >>>then ... - >>>else ... -< - - *haskell-vim-indent-case* -* let g:haskell_indent_case = 2 > - - case xs of - >>[] -> ... - >>(y:ys) -> ... -< - *haskell-vim-indent-let* -* let g:haskell_indent_let = 4 > - - let x = 0 in - >>>>x -< - *haskell-vim-indent-where* -* let g:haskell_indent_where = 6 > - - where f :: Int -> Int - >>>>>>f x = x -< - *haskell-vim-indent-before-where* -* let g:haskell_indent_before_where = 2 > - - foo - >>where -< - *haskell-vim-indent-after-bare-where* -* let g:haskell_indent_after_bare_where = 2 > - - where - >>foo -< - *haskell-vim-indent-do* -* let g:haskell_indent_do = 3 > - - do x <- a - >>>y <- b -< - *haskell-vim-indent-in* -* let g:haskell_indent_in = 1 > - - let x = 1 - >in x -< - *haskell-vim-indent-guard* -* let g:haskell_indent_guard = 2 > - - f x y - >>| -< - -Cabal~ - - * |cabal-vim-indent-section| - - *cabal-vim-indent-section* -* let g:cabal_indent_section = 2 (limited to max. 4 spaces) > - - executable name - >>main-is: Main.hs -< - -endif diff --git a/doc/idris-vim.txt b/doc/idris-vim.txt deleted file mode 100644 index e3d48e9eb..000000000 --- a/doc/idris-vim.txt +++ /dev/null @@ -1,158 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 - -*idris-vim.txt* Last change 2014 April 24 -=============================================================================== -=============================================================================== - @@@@ @@@@@@@@ @@@@@@@@ @@@@ @@@@@@ @@ @@ @@@@ @@ @@ - @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@ @@@ - @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@@@ - @@ @@ @@ @@@@@@@@ @@ @@@@@@ @@@@@@@ @@ @@ @@ @@ @@@ @@ - @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ - @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ - @@@@ @@@@@@@@ @@ @@ @@@@ @@@@@@ @@@ @@@@ @@ @@ -=============================================================================== -CONTENTS *idris-vim-contents* - - 1. Features: |idris-vim-features| - 2. Requirements: |idris-vim-requirements| - 3. Functions: |idris-vim-functions| - 4. Troubleshooting |idris-vim-troubleshooting| - 5. Examples: |idris-vim-examples| - 6. Information: |idris-vim-information| - -=============================================================================== -FEATURES *idris-vim-features* - - * Syntax Highlighting - * Indentation - * Unicode Concealing - * Syntax Checking (via Syntastic(https://github.com/scrooloose/syntastic)) - * Interactive Editing via the REPL - -=============================================================================== -REQUIREMENTS *idris-vim-requirements* - - * Idris (http://www.idris-lang.org/) - - OPTIONAL: - - * Syntastic(https://github.com/scrooloose/syntastic) for syntax checking - * Vimshell(https://github.com/Shougo/vimshell.vim) for a REPL - -=============================================================================== -FUNCTIONS *idris-vim-functions* - -All of the functions in idris-vim are essentially just calls back to the REPL, -so documentation for each of them is also available there. - -IdrisDocumentation *IdrisDocumentation* - Shows internal documentation of the primitive under the cursor. - - Mapped to '_h' by default. - -IdrisResponseWin *IdrisResponseWin* - This opens an idris response window in a new pane. - - Mapped to '_i' by default. - -IdrisShowType *IdrisShowType* - This shows the type of the name under the cursor (or, if the cursor happens - to be over a metavariable, a bit more information about its context). - - Mapped to '_t' by default. - -IdrisReload *IdrisReload* - This reloads the file and type-checks the file in the current buffer. - - Mapped to '_r' by default. - -IdrisEval *IdrisEval* - This prompts for an expression and then evaluates it in the REPL, then - returns the result. - - Mapped to '_e' by default. - -IdrisCaseSplit *IdrisCaseSplit* - When the cursor is over a variable in a pattern match clause or case - expression, this splits the variable into all well-typed patterns. - - Mapped to '_c' by default - -IdrisAddClause *IdrisAddClause* - When the cursor is at a type declaration this creates a new clause for that - signature. - - By default mapped to '_d' for an ordinary top-level definition, - '_b' for a typeclass instance definition, and - '_md' to add a pattern-matching proof clause. - -IdrisAddMissing: *IdrisAddMissing* - When the cursor is over a function, this adds all clauses necessary to make - that function cover all inputs. This also eliminates clauses which would - lead to unification errors from appearing. - - Mapped to '_m' by default - -IdrisRefine: *IdrisRefine* - Refines the item the cursor is over (applies the name and fills in any - arguments which can be filled in via unification) - - Mapped to '_f' by default - -IdrisProofSearch: *IdrisProofSearch* - This attempts to find a value for the metavariable it was called on by - looking at the rest of the code. It can also be called with hints, which - are functions that can apply to help solve for the metavariable. - - Mapped to '_o' without hints and 'p' with hints by - default - -IdrisMakeWith: *IdrisMakeWith* - When the cursor is over a pattern clause and this is called, it creates a - new with clause. - - Mapped to '_w' by default - -IdrisMakeLemma: *IdrisMakeLemma* - When the cursor is over a metavariable and this is called, it creates a new - top-level definition to solve the metavariable. - - Mapped to '_l' by default - -=============================================================================== -TROUBLESHOOTING *idris-vim-troubleshooting* - -If this isn't working for you, make sure that: - - * There is an Idris REPL running - * For syntax checking, you have syntastic installed - * The plugins mappings exists and don't conflict with anything else installed - (You can use ':map' to check. There should be mappings similar to - '\h * :call IdrisShowDoc()'.) - * Vim recognizes you're in an idris file (you can use ':verb set ft' to check) - -If none of this works, check to issue tracker on github and if nothing is -there create an issue with a detailed description of the problem. - -=============================================================================== -EXAMPLES *idris-vim-examples* - -Some excellent tutorials/examples for interactive editing using the above -functions can be found at: - http://edwinb.wordpress.com/2013/10/28/interactive-idris-editing-with-vim/ -and - http://www.scribd.com/doc/214031954/60/Interactive-Editing-in-Vim - -=============================================================================== -INFORMATION *idris-vim-information* - -Author: edwinb -Repo: https://github.com/idris-hackers/idris-vim - -Documentation by japesinator - -=============================================================================== -=============================================================================== -" vim:ft=help:et:ts=2:sw=2:sts=2:norl: - -endif diff --git a/doc/julia-vim-L2U-table.txt b/doc/julia-vim-L2U-table.txt deleted file mode 100644 index 06f8a3945..000000000 --- a/doc/julia-vim-L2U-table.txt +++ /dev/null @@ -1,3282 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 - -julia-vim-L2U-table.txt LaTeX-to-Unicode reference table - -=================================================================== -LATEX-TO-UNICODE REFERENCE TABLE *L2U-ref* *julia-vim-L2U-reference* - - Note: This file is autogenerated from the script 'generate_latex_symbols_table.jl' - The symbols are based on the documentation of Julia version 1.5.0-DEV.67 - See |julia-vim| for the LaTeX-to-Unicode manual. - -Code point(s) Character(s) Tab completion sequence(s) Unicode name(s)~ ------------------ ------------ -------------------------------------------- -------------------------------------------------------------------------------------------------------- -U+000A1 ¡ \exclamdown INVERTED EXCLAMATION MARK -U+000A3 £ \sterling POUND SIGN -U+000A5 ¥ \yen YEN SIGN -U+000A6 ¦ \brokenbar BROKEN BAR / BROKEN VERTICAL BAR -U+000A7 § \S SECTION SIGN -U+000A9 © \copyright, \:copyright: COPYRIGHT SIGN -U+000AA ª \ordfeminine FEMININE ORDINAL INDICATOR -U+000AC ¬ \neg NOT SIGN -U+000AE ® \circledR, \:registered: REGISTERED SIGN / REGISTERED TRADE MARK SIGN -U+000AF ¯ \highminus MACRON / SPACING MACRON -U+000B0 ° \degree DEGREE SIGN -U+000B1 ± \pm PLUS-MINUS SIGN / PLUS-OR-MINUS SIGN -U+000B2 ² \^2 SUPERSCRIPT TWO / SUPERSCRIPT DIGIT TWO -U+000B3 ³ \^3 SUPERSCRIPT THREE / SUPERSCRIPT DIGIT THREE -U+000B6 ¶ \P PILCROW SIGN / PARAGRAPH SIGN -U+000B7 · \cdotp MIDDLE DOT -U+000B9 ¹ \^1 SUPERSCRIPT ONE / SUPERSCRIPT DIGIT ONE -U+000BA º \ordmasculine MASCULINE ORDINAL INDICATOR -U+000BC ¼ \1/4 VULGAR FRACTION ONE QUARTER / FRACTION ONE QUARTER -U+000BD ½ \1/2 VULGAR FRACTION ONE HALF / FRACTION ONE HALF -U+000BE ¾ \3/4 VULGAR FRACTION THREE QUARTERS / FRACTION THREE QUARTERS -U+000BF ¿ \questiondown INVERTED QUESTION MARK -U+000C5 Å \AA LATIN CAPITAL LETTER A WITH RING ABOVE / LATIN CAPITAL LETTER A RING -U+000C6 Æ \AE LATIN CAPITAL LETTER AE / LATIN CAPITAL LETTER A E -U+000D0 Ð \DH LATIN CAPITAL LETTER ETH -U+000D7 × \times MULTIPLICATION SIGN -U+000D8 Ø \O LATIN CAPITAL LETTER O WITH STROKE / LATIN CAPITAL LETTER O SLASH -U+000DE Þ \TH LATIN CAPITAL LETTER THORN -U+000DF ß \ss LATIN SMALL LETTER SHARP S -U+000E5 å \aa LATIN SMALL LETTER A WITH RING ABOVE / LATIN SMALL LETTER A RING -U+000E6 æ \ae LATIN SMALL LETTER AE / LATIN SMALL LETTER A E -U+000F0 ð \eth, \dh LATIN SMALL LETTER ETH -U+000F7 ÷ \div DIVISION SIGN -U+000F8 ø \o LATIN SMALL LETTER O WITH STROKE / LATIN SMALL LETTER O SLASH -U+000FE þ \th LATIN SMALL LETTER THORN -U+00110 Đ \DJ LATIN CAPITAL LETTER D WITH STROKE / LATIN CAPITAL LETTER D BAR -U+00111 đ \dj LATIN SMALL LETTER D WITH STROKE / LATIN SMALL LETTER D BAR -U+00127 ħ \hbar LATIN SMALL LETTER H WITH STROKE / LATIN SMALL LETTER H BAR -U+00131 ı \imath LATIN SMALL LETTER DOTLESS I -U+00141 Ł \L LATIN CAPITAL LETTER L WITH STROKE / LATIN CAPITAL LETTER L SLASH -U+00142 ł \l LATIN SMALL LETTER L WITH STROKE / LATIN SMALL LETTER L SLASH -U+0014A Ŋ \NG LATIN CAPITAL LETTER ENG -U+0014B ŋ \ng LATIN SMALL LETTER ENG -U+00152 Œ \OE LATIN CAPITAL LIGATURE OE / LATIN CAPITAL LETTER O E -U+00153 œ \oe LATIN SMALL LIGATURE OE / LATIN SMALL LETTER O E -U+00195 ƕ \hvlig LATIN SMALL LETTER HV / LATIN SMALL LETTER H V -U+0019E ƞ \nrleg LATIN SMALL LETTER N WITH LONG RIGHT LEG -U+001B5 Ƶ \Zbar LATIN CAPITAL LETTER Z WITH STROKE / LATIN CAPITAL LETTER Z BAR -U+001C2 ǂ \doublepipe LATIN LETTER ALVEOLAR CLICK / LATIN LETTER PIPE DOUBLE BAR -U+00237 ȷ \jmath LATIN SMALL LETTER DOTLESS J -U+00250 ɐ \trna LATIN SMALL LETTER TURNED A -U+00252 ɒ \trnsa LATIN SMALL LETTER TURNED ALPHA / LATIN SMALL LETTER TURNED SCRIPT A -U+00254 ɔ \openo LATIN SMALL LETTER OPEN O -U+00256 ɖ \rtld LATIN SMALL LETTER D WITH TAIL / LATIN SMALL LETTER D RETROFLEX HOOK -U+00259 ə \schwa LATIN SMALL LETTER SCHWA -U+00263 ɣ \pgamma LATIN SMALL LETTER GAMMA -U+00264 ɤ \pbgam LATIN SMALL LETTER RAMS HORN / LATIN SMALL LETTER BABY GAMMA -U+00265 ɥ \trnh LATIN SMALL LETTER TURNED H -U+0026C ɬ \btdl LATIN SMALL LETTER L WITH BELT / LATIN SMALL LETTER L BELT -U+0026D ɭ \rtll LATIN SMALL LETTER L WITH RETROFLEX HOOK / LATIN SMALL LETTER L RETROFLEX HOOK -U+0026F ɯ \trnm LATIN SMALL LETTER TURNED M -U+00270 ɰ \trnmlr LATIN SMALL LETTER TURNED M WITH LONG LEG -U+00271 ɱ \ltlmr LATIN SMALL LETTER M WITH HOOK / LATIN SMALL LETTER M HOOK -U+00272 ɲ \ltln LATIN SMALL LETTER N WITH LEFT HOOK / LATIN SMALL LETTER N HOOK -U+00273 ɳ \rtln LATIN SMALL LETTER N WITH RETROFLEX HOOK / LATIN SMALL LETTER N RETROFLEX HOOK -U+00277 ɷ \clomeg LATIN SMALL LETTER CLOSED OMEGA -U+00278 ɸ \ltphi LATIN SMALL LETTER PHI -U+00279 ɹ \trnr LATIN SMALL LETTER TURNED R -U+0027A ɺ \trnrl LATIN SMALL LETTER TURNED R WITH LONG LEG -U+0027B ɻ \rttrnr LATIN SMALL LETTER TURNED R WITH HOOK / LATIN SMALL LETTER TURNED R HOOK -U+0027C ɼ \rl LATIN SMALL LETTER R WITH LONG LEG -U+0027D ɽ \rtlr LATIN SMALL LETTER R WITH TAIL / LATIN SMALL LETTER R HOOK -U+0027E ɾ \fhr LATIN SMALL LETTER R WITH FISHHOOK / LATIN SMALL LETTER FISHHOOK R -U+00282 ʂ \rtls LATIN SMALL LETTER S WITH HOOK / LATIN SMALL LETTER S HOOK -U+00283 ʃ \esh LATIN SMALL LETTER ESH -U+00287 ʇ \trnt LATIN SMALL LETTER TURNED T -U+00288 ʈ \rtlt LATIN SMALL LETTER T WITH RETROFLEX HOOK / LATIN SMALL LETTER T RETROFLEX HOOK -U+0028A ʊ \pupsil LATIN SMALL LETTER UPSILON -U+0028B ʋ \pscrv LATIN SMALL LETTER V WITH HOOK / LATIN SMALL LETTER SCRIPT V -U+0028C ʌ \invv LATIN SMALL LETTER TURNED V -U+0028D ʍ \invw LATIN SMALL LETTER TURNED W -U+0028E ʎ \trny LATIN SMALL LETTER TURNED Y -U+00290 ʐ \rtlz LATIN SMALL LETTER Z WITH RETROFLEX HOOK / LATIN SMALL LETTER Z RETROFLEX HOOK -U+00292 ʒ \yogh LATIN SMALL LETTER EZH / LATIN SMALL LETTER YOGH -U+00294 ʔ \glst LATIN LETTER GLOTTAL STOP -U+00295 ʕ \reglst LATIN LETTER PHARYNGEAL VOICED FRICATIVE / LATIN LETTER REVERSED GLOTTAL STOP -U+00296 ʖ \inglst LATIN LETTER INVERTED GLOTTAL STOP -U+0029E ʞ \turnk LATIN SMALL LETTER TURNED K -U+002A4 ʤ \dyogh LATIN SMALL LETTER DEZH DIGRAPH / LATIN SMALL LETTER D YOGH -U+002A7 ʧ \tesh LATIN SMALL LETTER TESH DIGRAPH / LATIN SMALL LETTER T ESH -U+002B0 ʰ \^h MODIFIER LETTER SMALL H -U+002B2 ʲ \^j MODIFIER LETTER SMALL J -U+002B3 ʳ \^r MODIFIER LETTER SMALL R -U+002B7 ʷ \^w MODIFIER LETTER SMALL W -U+002B8 ʸ \^y MODIFIER LETTER SMALL Y -U+002BC ʼ \rasp MODIFIER LETTER APOSTROPHE -U+002C8 ˈ \verts MODIFIER LETTER VERTICAL LINE -U+002CC ˌ \verti MODIFIER LETTER LOW VERTICAL LINE -U+002D0 ː \lmrk MODIFIER LETTER TRIANGULAR COLON -U+002D1 ˑ \hlmrk MODIFIER LETTER HALF TRIANGULAR COLON -U+002D2 ˒ \sbrhr MODIFIER LETTER CENTRED RIGHT HALF RING / MODIFIER LETTER CENTERED RIGHT HALF RING -U+002D3 ˓ \sblhr MODIFIER LETTER CENTRED LEFT HALF RING / MODIFIER LETTER CENTERED LEFT HALF RING -U+002D4 ˔ \rais MODIFIER LETTER UP TACK -U+002D5 ˕ \low MODIFIER LETTER DOWN TACK -U+002D8 ˘ \u BREVE / SPACING BREVE -U+002DC ˜ \tildelow SMALL TILDE / SPACING TILDE -U+002E1 ˡ \^l MODIFIER LETTER SMALL L -U+002E2 ˢ \^s MODIFIER LETTER SMALL S -U+002E3 ˣ \^x MODIFIER LETTER SMALL X -U+00300 ◌̀ \grave COMBINING GRAVE ACCENT / NON-SPACING GRAVE -U+00301 ◌́ \acute COMBINING ACUTE ACCENT / NON-SPACING ACUTE -U+00302 ◌̂ \hat COMBINING CIRCUMFLEX ACCENT / NON-SPACING CIRCUMFLEX -U+00303 ◌̃ \tilde COMBINING TILDE / NON-SPACING TILDE -U+00304 ◌̄ \bar COMBINING MACRON / NON-SPACING MACRON -U+00305 ◌̅ \overbar COMBINING OVERLINE / NON-SPACING OVERSCORE -U+00306 ◌̆ \breve COMBINING BREVE / NON-SPACING BREVE -U+00307 ◌̇ \dot COMBINING DOT ABOVE / NON-SPACING DOT ABOVE -U+00308 ◌̈ \ddot COMBINING DIAERESIS / NON-SPACING DIAERESIS -U+00309 ◌̉ \ovhook COMBINING HOOK ABOVE / NON-SPACING HOOK ABOVE -U+0030A ◌̊ \ocirc COMBINING RING ABOVE / NON-SPACING RING ABOVE -U+0030B ◌̋ \H COMBINING DOUBLE ACUTE ACCENT / NON-SPACING DOUBLE ACUTE -U+0030C ◌̌ \check COMBINING CARON / NON-SPACING HACEK -U+00310 ◌̐ \candra COMBINING CANDRABINDU / NON-SPACING CANDRABINDU -U+00312 ◌̒ \oturnedcomma COMBINING TURNED COMMA ABOVE / NON-SPACING TURNED COMMA ABOVE -U+00315 ◌̕ \ocommatopright COMBINING COMMA ABOVE RIGHT / NON-SPACING COMMA ABOVE RIGHT -U+0031A ◌̚ \droang COMBINING LEFT ANGLE ABOVE / NON-SPACING LEFT ANGLE ABOVE -U+00321 ◌̡ \palh COMBINING PALATALIZED HOOK BELOW / NON-SPACING PALATALIZED HOOK BELOW -U+00322 ◌̢ \rh COMBINING RETROFLEX HOOK BELOW / NON-SPACING RETROFLEX HOOK BELOW -U+00327 ◌̧ \c COMBINING CEDILLA / NON-SPACING CEDILLA -U+00328 ◌̨ \k COMBINING OGONEK / NON-SPACING OGONEK -U+0032A ◌̪ \sbbrg COMBINING BRIDGE BELOW / NON-SPACING BRIDGE BELOW -U+00330 ◌̰ \wideutilde COMBINING TILDE BELOW / NON-SPACING TILDE BELOW -U+00332 ◌̲ \underbar COMBINING LOW LINE / NON-SPACING UNDERSCORE -U+00336 ◌̶ \strike, \sout COMBINING LONG STROKE OVERLAY / NON-SPACING LONG BAR OVERLAY -U+00338 ◌̸ \not COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+0034D ◌͍ \underleftrightarrow COMBINING LEFT RIGHT ARROW BELOW -U+00391 Α \Alpha GREEK CAPITAL LETTER ALPHA -U+00392 Β \Beta GREEK CAPITAL LETTER BETA -U+00393 Γ \Gamma GREEK CAPITAL LETTER GAMMA -U+00394 Δ \Delta GREEK CAPITAL LETTER DELTA -U+00395 Ε \Epsilon GREEK CAPITAL LETTER EPSILON -U+00396 Ζ \Zeta GREEK CAPITAL LETTER ZETA -U+00397 Η \Eta GREEK CAPITAL LETTER ETA -U+00398 Θ \Theta GREEK CAPITAL LETTER THETA -U+00399 Ι \Iota GREEK CAPITAL LETTER IOTA -U+0039A Κ \Kappa GREEK CAPITAL LETTER KAPPA -U+0039B Λ \Lambda GREEK CAPITAL LETTER LAMDA / GREEK CAPITAL LETTER LAMBDA -U+0039C Μ \upMu GREEK CAPITAL LETTER MU -U+0039D Ν \upNu GREEK CAPITAL LETTER NU -U+0039E Ξ \Xi GREEK CAPITAL LETTER XI -U+0039F Ο \upOmicron GREEK CAPITAL LETTER OMICRON -U+003A0 Π \Pi GREEK CAPITAL LETTER PI -U+003A1 Ρ \Rho GREEK CAPITAL LETTER RHO -U+003A3 Σ \Sigma GREEK CAPITAL LETTER SIGMA -U+003A4 Τ \Tau GREEK CAPITAL LETTER TAU -U+003A5 Υ \Upsilon GREEK CAPITAL LETTER UPSILON -U+003A6 Φ \Phi GREEK CAPITAL LETTER PHI -U+003A7 Χ \Chi GREEK CAPITAL LETTER CHI -U+003A8 Ψ \Psi GREEK CAPITAL LETTER PSI -U+003A9 Ω \Omega GREEK CAPITAL LETTER OMEGA -U+003B1 α \alpha GREEK SMALL LETTER ALPHA -U+003B2 β \beta GREEK SMALL LETTER BETA -U+003B3 γ \gamma GREEK SMALL LETTER GAMMA -U+003B4 δ \delta GREEK SMALL LETTER DELTA -U+003B5 ε \upepsilon, \varepsilon GREEK SMALL LETTER EPSILON -U+003B6 ζ \zeta GREEK SMALL LETTER ZETA -U+003B7 η \eta GREEK SMALL LETTER ETA -U+003B8 θ \theta GREEK SMALL LETTER THETA -U+003B9 ι \iota GREEK SMALL LETTER IOTA -U+003BA κ \kappa GREEK SMALL LETTER KAPPA -U+003BB λ \lambda GREEK SMALL LETTER LAMDA / GREEK SMALL LETTER LAMBDA -U+003BC μ \mu GREEK SMALL LETTER MU -U+003BD ν \nu GREEK SMALL LETTER NU -U+003BE ξ \xi GREEK SMALL LETTER XI -U+003BF ο \upomicron GREEK SMALL LETTER OMICRON -U+003C0 π \pi GREEK SMALL LETTER PI -U+003C1 ρ \rho GREEK SMALL LETTER RHO -U+003C2 ς \varsigma GREEK SMALL LETTER FINAL SIGMA -U+003C3 σ \sigma GREEK SMALL LETTER SIGMA -U+003C4 τ \tau GREEK SMALL LETTER TAU -U+003C5 υ \upsilon GREEK SMALL LETTER UPSILON -U+003C6 φ \varphi GREEK SMALL LETTER PHI -U+003C7 χ \chi GREEK SMALL LETTER CHI -U+003C8 ψ \psi GREEK SMALL LETTER PSI -U+003C9 ω \omega GREEK SMALL LETTER OMEGA -U+003D0 ϐ \upvarbeta GREEK BETA SYMBOL / GREEK SMALL LETTER CURLED BETA -U+003D1 ϑ \vartheta GREEK THETA SYMBOL / GREEK SMALL LETTER SCRIPT THETA -U+003D5 ϕ \phi GREEK PHI SYMBOL / GREEK SMALL LETTER SCRIPT PHI -U+003D6 ϖ \varpi GREEK PI SYMBOL / GREEK SMALL LETTER OMEGA PI -U+003D8 Ϙ \upoldKoppa GREEK LETTER ARCHAIC KOPPA -U+003D9 ϙ \upoldkoppa GREEK SMALL LETTER ARCHAIC KOPPA -U+003DA Ϛ \Stigma GREEK LETTER STIGMA / GREEK CAPITAL LETTER STIGMA -U+003DB ϛ \upstigma GREEK SMALL LETTER STIGMA -U+003DC Ϝ \Digamma GREEK LETTER DIGAMMA / GREEK CAPITAL LETTER DIGAMMA -U+003DD ϝ \digamma GREEK SMALL LETTER DIGAMMA -U+003DE Ϟ \Koppa GREEK LETTER KOPPA / GREEK CAPITAL LETTER KOPPA -U+003DF ϟ \upkoppa GREEK SMALL LETTER KOPPA -U+003E0 Ϡ \Sampi GREEK LETTER SAMPI / GREEK CAPITAL LETTER SAMPI -U+003E1 ϡ \upsampi GREEK SMALL LETTER SAMPI -U+003F0 ϰ \varkappa GREEK KAPPA SYMBOL / GREEK SMALL LETTER SCRIPT KAPPA -U+003F1 ϱ \varrho GREEK RHO SYMBOL / GREEK SMALL LETTER TAILED RHO -U+003F4 ϴ \varTheta GREEK CAPITAL THETA SYMBOL -U+003F5 ϵ \epsilon GREEK LUNATE EPSILON SYMBOL -U+003F6 ϶ \backepsilon GREEK REVERSED LUNATE EPSILON SYMBOL -U+01D2C ᴬ \^A MODIFIER LETTER CAPITAL A -U+01D2E ᴮ \^B MODIFIER LETTER CAPITAL B -U+01D30 ᴰ \^D MODIFIER LETTER CAPITAL D -U+01D31 ᴱ \^E MODIFIER LETTER CAPITAL E -U+01D33 ᴳ \^G MODIFIER LETTER CAPITAL G -U+01D34 ᴴ \^H MODIFIER LETTER CAPITAL H -U+01D35 ᴵ \^I MODIFIER LETTER CAPITAL I -U+01D36 ᴶ \^J MODIFIER LETTER CAPITAL J -U+01D37 ᴷ \^K MODIFIER LETTER CAPITAL K -U+01D38 ᴸ \^L MODIFIER LETTER CAPITAL L -U+01D39 ᴹ \^M MODIFIER LETTER CAPITAL M -U+01D3A ᴺ \^N MODIFIER LETTER CAPITAL N -U+01D3C ᴼ \^O MODIFIER LETTER CAPITAL O -U+01D3E ᴾ \^P MODIFIER LETTER CAPITAL P -U+01D3F ᴿ \^R MODIFIER LETTER CAPITAL R -U+01D40 ᵀ \^T MODIFIER LETTER CAPITAL T -U+01D41 ᵁ \^U MODIFIER LETTER CAPITAL U -U+01D42 ᵂ \^W MODIFIER LETTER CAPITAL W -U+01D43 ᵃ \^a MODIFIER LETTER SMALL A -U+01D45 ᵅ \^alpha MODIFIER LETTER SMALL ALPHA -U+01D47 ᵇ \^b MODIFIER LETTER SMALL B -U+01D48 ᵈ \^d MODIFIER LETTER SMALL D -U+01D49 ᵉ \^e MODIFIER LETTER SMALL E -U+01D4B ᵋ \^epsilon MODIFIER LETTER SMALL OPEN E -U+01D4D ᵍ \^g MODIFIER LETTER SMALL G -U+01D4F ᵏ \^k MODIFIER LETTER SMALL K -U+01D50 ᵐ \^m MODIFIER LETTER SMALL M -U+01D52 ᵒ \^o MODIFIER LETTER SMALL O -U+01D56 ᵖ \^p MODIFIER LETTER SMALL P -U+01D57 ᵗ \^t MODIFIER LETTER SMALL T -U+01D58 ᵘ \^u MODIFIER LETTER SMALL U -U+01D5B ᵛ \^v MODIFIER LETTER SMALL V -U+01D5D ᵝ \^beta MODIFIER LETTER SMALL BETA -U+01D5E ᵞ \^gamma MODIFIER LETTER SMALL GREEK GAMMA -U+01D5F ᵟ \^delta MODIFIER LETTER SMALL DELTA -U+01D60 ᵠ \^phi MODIFIER LETTER SMALL GREEK PHI -U+01D61 ᵡ \^chi MODIFIER LETTER SMALL CHI -U+01D62 ᵢ \_i LATIN SUBSCRIPT SMALL LETTER I -U+01D63 ᵣ \_r LATIN SUBSCRIPT SMALL LETTER R -U+01D64 ᵤ \_u LATIN SUBSCRIPT SMALL LETTER U -U+01D65 ᵥ \_v LATIN SUBSCRIPT SMALL LETTER V -U+01D66 ᵦ \_beta GREEK SUBSCRIPT SMALL LETTER BETA -U+01D67 ᵧ \_gamma GREEK SUBSCRIPT SMALL LETTER GAMMA -U+01D68 ᵨ \_rho GREEK SUBSCRIPT SMALL LETTER RHO -U+01D69 ᵩ \_phi GREEK SUBSCRIPT SMALL LETTER PHI -U+01D6A ᵪ \_chi GREEK SUBSCRIPT SMALL LETTER CHI -U+01D9C ᶜ \^c MODIFIER LETTER SMALL C -U+01DA0 ᶠ \^f MODIFIER LETTER SMALL F -U+01DA5 ᶥ \^iota MODIFIER LETTER SMALL IOTA -U+01DB2 ᶲ \^Phi MODIFIER LETTER SMALL PHI -U+01DBB ᶻ \^z MODIFIER LETTER SMALL Z -U+01DBF ᶿ \^theta MODIFIER LETTER SMALL THETA -U+02002   \enspace EN SPACE -U+02003   \quad EM SPACE -U+02005   \thickspace FOUR-PER-EM SPACE -U+02009   \thinspace THIN SPACE -U+0200A   \hspace HAIR SPACE -U+02013 – \endash EN DASH -U+02014 — \emdash EM DASH -U+02016 ‖ \Vert DOUBLE VERTICAL LINE / DOUBLE VERTICAL BAR -U+02018 ‘ \lq LEFT SINGLE QUOTATION MARK / SINGLE TURNED COMMA QUOTATION MARK -U+02019 ’ \rq RIGHT SINGLE QUOTATION MARK / SINGLE COMMA QUOTATION MARK -U+0201B ‛ \reapos SINGLE HIGH-REVERSED-9 QUOTATION MARK / SINGLE REVERSED COMMA QUOTATION MARK -U+0201C “ \quotedblleft LEFT DOUBLE QUOTATION MARK / DOUBLE TURNED COMMA QUOTATION MARK -U+0201D ” \quotedblright RIGHT DOUBLE QUOTATION MARK / DOUBLE COMMA QUOTATION MARK -U+02020 † \dagger DAGGER -U+02021 ‡ \ddagger DOUBLE DAGGER -U+02022 • \bullet BULLET -U+02026 … \dots, \ldots HORIZONTAL ELLIPSIS -U+02030 ‰ \perthousand PER MILLE SIGN -U+02031 ‱ \pertenthousand PER TEN THOUSAND SIGN -U+02032 ′ \prime PRIME -U+02033 ″ \pprime DOUBLE PRIME -U+02034 ‴ \ppprime TRIPLE PRIME -U+02035 ‵ \backprime REVERSED PRIME -U+02036 ‶ \backpprime REVERSED DOUBLE PRIME -U+02037 ‷ \backppprime REVERSED TRIPLE PRIME -U+02039 ‹ \guilsinglleft SINGLE LEFT-POINTING ANGLE QUOTATION MARK / LEFT POINTING SINGLE GUILLEMET -U+0203A › \guilsinglright SINGLE RIGHT-POINTING ANGLE QUOTATION MARK / RIGHT POINTING SINGLE GUILLEMET -U+0203C ‼ \:bangbang: DOUBLE EXCLAMATION MARK -U+02040 ⁀ \tieconcat CHARACTER TIE -U+02049 ⁉ \:interrobang: EXCLAMATION QUESTION MARK -U+02057 ⁗ \pppprime QUADRUPLE PRIME -U+0205D ⁝ \tricolon TRICOLON -U+02060 ⁠ \nolinebreak WORD JOINER -U+02070 ⁰ \^0 SUPERSCRIPT ZERO / SUPERSCRIPT DIGIT ZERO -U+02071 ⁱ \^i SUPERSCRIPT LATIN SMALL LETTER I -U+02074 ⁴ \^4 SUPERSCRIPT FOUR / SUPERSCRIPT DIGIT FOUR -U+02075 ⁵ \^5 SUPERSCRIPT FIVE / SUPERSCRIPT DIGIT FIVE -U+02076 ⁶ \^6 SUPERSCRIPT SIX / SUPERSCRIPT DIGIT SIX -U+02077 ⁷ \^7 SUPERSCRIPT SEVEN / SUPERSCRIPT DIGIT SEVEN -U+02078 ⁸ \^8 SUPERSCRIPT EIGHT / SUPERSCRIPT DIGIT EIGHT -U+02079 ⁹ \^9 SUPERSCRIPT NINE / SUPERSCRIPT DIGIT NINE -U+0207A ⁺ \^+ SUPERSCRIPT PLUS SIGN -U+0207B ⁻ \^- SUPERSCRIPT MINUS / SUPERSCRIPT HYPHEN-MINUS -U+0207C ⁼ \^= SUPERSCRIPT EQUALS SIGN -U+0207D ⁽ \^( SUPERSCRIPT LEFT PARENTHESIS / SUPERSCRIPT OPENING PARENTHESIS -U+0207E ⁾ \^) SUPERSCRIPT RIGHT PARENTHESIS / SUPERSCRIPT CLOSING PARENTHESIS -U+0207F ⁿ \^n SUPERSCRIPT LATIN SMALL LETTER N -U+02080 ₀ \_0 SUBSCRIPT ZERO / SUBSCRIPT DIGIT ZERO -U+02081 ₁ \_1 SUBSCRIPT ONE / SUBSCRIPT DIGIT ONE -U+02082 ₂ \_2 SUBSCRIPT TWO / SUBSCRIPT DIGIT TWO -U+02083 ₃ \_3 SUBSCRIPT THREE / SUBSCRIPT DIGIT THREE -U+02084 ₄ \_4 SUBSCRIPT FOUR / SUBSCRIPT DIGIT FOUR -U+02085 ₅ \_5 SUBSCRIPT FIVE / SUBSCRIPT DIGIT FIVE -U+02086 ₆ \_6 SUBSCRIPT SIX / SUBSCRIPT DIGIT SIX -U+02087 ₇ \_7 SUBSCRIPT SEVEN / SUBSCRIPT DIGIT SEVEN -U+02088 ₈ \_8 SUBSCRIPT EIGHT / SUBSCRIPT DIGIT EIGHT -U+02089 ₉ \_9 SUBSCRIPT NINE / SUBSCRIPT DIGIT NINE -U+0208A ₊ \_+ SUBSCRIPT PLUS SIGN -U+0208B ₋ \_- SUBSCRIPT MINUS / SUBSCRIPT HYPHEN-MINUS -U+0208C ₌ \_= SUBSCRIPT EQUALS SIGN -U+0208D ₍ \_( SUBSCRIPT LEFT PARENTHESIS / SUBSCRIPT OPENING PARENTHESIS -U+0208E ₎ \_) SUBSCRIPT RIGHT PARENTHESIS / SUBSCRIPT CLOSING PARENTHESIS -U+02090 ₐ \_a LATIN SUBSCRIPT SMALL LETTER A -U+02091 ₑ \_e LATIN SUBSCRIPT SMALL LETTER E -U+02092 ₒ \_o LATIN SUBSCRIPT SMALL LETTER O -U+02093 ₓ \_x LATIN SUBSCRIPT SMALL LETTER X -U+02094 ₔ \_schwa LATIN SUBSCRIPT SMALL LETTER SCHWA -U+02095 ₕ \_h LATIN SUBSCRIPT SMALL LETTER H -U+02096 ₖ \_k LATIN SUBSCRIPT SMALL LETTER K -U+02097 ₗ \_l LATIN SUBSCRIPT SMALL LETTER L -U+02098 ₘ \_m LATIN SUBSCRIPT SMALL LETTER M -U+02099 ₙ \_n LATIN SUBSCRIPT SMALL LETTER N -U+0209A ₚ \_p LATIN SUBSCRIPT SMALL LETTER P -U+0209B ₛ \_s LATIN SUBSCRIPT SMALL LETTER S -U+0209C ₜ \_t LATIN SUBSCRIPT SMALL LETTER T -U+020A7 ₧ \pes PESETA SIGN -U+020AC € \euro EURO SIGN -U+020D0 ◌⃐ \leftharpoonaccent COMBINING LEFT HARPOON ABOVE / NON-SPACING LEFT HARPOON ABOVE -U+020D1 ◌⃑ \rightharpoonaccent COMBINING RIGHT HARPOON ABOVE / NON-SPACING RIGHT HARPOON ABOVE -U+020D2 ◌⃒ \vertoverlay COMBINING LONG VERTICAL LINE OVERLAY / NON-SPACING LONG VERTICAL BAR OVERLAY -U+020D6 ◌⃖ \overleftarrow COMBINING LEFT ARROW ABOVE / NON-SPACING LEFT ARROW ABOVE -U+020D7 ◌⃗ \vec COMBINING RIGHT ARROW ABOVE / NON-SPACING RIGHT ARROW ABOVE -U+020DB ◌⃛ \dddot COMBINING THREE DOTS ABOVE / NON-SPACING THREE DOTS ABOVE -U+020DC ◌⃜ \ddddot COMBINING FOUR DOTS ABOVE / NON-SPACING FOUR DOTS ABOVE -U+020DD ◌⃝ \enclosecircle COMBINING ENCLOSING CIRCLE / ENCLOSING CIRCLE -U+020DE ◌⃞ \enclosesquare COMBINING ENCLOSING SQUARE / ENCLOSING SQUARE -U+020DF ◌⃟ \enclosediamond COMBINING ENCLOSING DIAMOND / ENCLOSING DIAMOND -U+020E1 ◌⃡ \overleftrightarrow COMBINING LEFT RIGHT ARROW ABOVE / NON-SPACING LEFT RIGHT ARROW ABOVE -U+020E4 ◌⃤ \enclosetriangle COMBINING ENCLOSING UPWARD POINTING TRIANGLE -U+020E7 ◌⃧ \annuity COMBINING ANNUITY SYMBOL -U+020E8 ◌⃨ \threeunderdot COMBINING TRIPLE UNDERDOT -U+020E9 ◌⃩ \widebridgeabove COMBINING WIDE BRIDGE ABOVE -U+020EC ◌⃬ \underrightharpoondown COMBINING RIGHTWARDS HARPOON WITH BARB DOWNWARDS -U+020ED ◌⃭ \underleftharpoondown COMBINING LEFTWARDS HARPOON WITH BARB DOWNWARDS -U+020EE ◌⃮ \underleftarrow COMBINING LEFT ARROW BELOW -U+020EF ◌⃯ \underrightarrow COMBINING RIGHT ARROW BELOW -U+020F0 ◌⃰ \asteraccent COMBINING ASTERISK ABOVE -U+02102 ℂ \bbC DOUBLE-STRUCK CAPITAL C / DOUBLE-STRUCK C -U+02107 ℇ \eulermascheroni EULER CONSTANT / EULERS -U+0210A ℊ \scrg SCRIPT SMALL G -U+0210B ℋ \scrH SCRIPT CAPITAL H / SCRIPT H -U+0210C ℌ \frakH BLACK-LETTER CAPITAL H / BLACK-LETTER H -U+0210D ℍ \bbH DOUBLE-STRUCK CAPITAL H / DOUBLE-STRUCK H -U+0210E ℎ \planck PLANCK CONSTANT -U+0210F ℏ \hslash PLANCK CONSTANT OVER TWO PI / PLANCK CONSTANT OVER 2 PI -U+02110 ℐ \scrI SCRIPT CAPITAL I / SCRIPT I -U+02111 ℑ \Im BLACK-LETTER CAPITAL I / BLACK-LETTER I -U+02112 ℒ \scrL SCRIPT CAPITAL L / SCRIPT L -U+02113 ℓ \ell SCRIPT SMALL L -U+02115 ℕ \bbN DOUBLE-STRUCK CAPITAL N / DOUBLE-STRUCK N -U+02116 № \numero NUMERO SIGN / NUMERO -U+02118 ℘ \wp SCRIPT CAPITAL P / SCRIPT P -U+02119 ℙ \bbP DOUBLE-STRUCK CAPITAL P / DOUBLE-STRUCK P -U+0211A ℚ \bbQ DOUBLE-STRUCK CAPITAL Q / DOUBLE-STRUCK Q -U+0211B ℛ \scrR SCRIPT CAPITAL R / SCRIPT R -U+0211C ℜ \Re BLACK-LETTER CAPITAL R / BLACK-LETTER R -U+0211D ℝ \bbR DOUBLE-STRUCK CAPITAL R / DOUBLE-STRUCK R -U+0211E ℞ \xrat PRESCRIPTION TAKE -U+02122 ™ \trademark, \:tm: TRADE MARK SIGN / TRADEMARK -U+02124 ℤ \bbZ DOUBLE-STRUCK CAPITAL Z / DOUBLE-STRUCK Z -U+02126 Ω \ohm OHM SIGN / OHM -U+02127 ℧ \mho INVERTED OHM SIGN / MHO -U+02128 ℨ \frakZ BLACK-LETTER CAPITAL Z / BLACK-LETTER Z -U+02129 ℩ \turnediota TURNED GREEK SMALL LETTER IOTA -U+0212B Å \Angstrom ANGSTROM SIGN / ANGSTROM UNIT -U+0212C ℬ \scrB SCRIPT CAPITAL B / SCRIPT B -U+0212D ℭ \frakC BLACK-LETTER CAPITAL C / BLACK-LETTER C -U+0212F ℯ \scre, \euler SCRIPT SMALL E -U+02130 ℰ \scrE SCRIPT CAPITAL E / SCRIPT E -U+02131 ℱ \scrF SCRIPT CAPITAL F / SCRIPT F -U+02132 Ⅎ \Finv TURNED CAPITAL F / TURNED F -U+02133 ℳ \scrM SCRIPT CAPITAL M / SCRIPT M -U+02134 ℴ \scro SCRIPT SMALL O -U+02135 ℵ \aleph ALEF SYMBOL / FIRST TRANSFINITE CARDINAL -U+02136 ℶ \beth BET SYMBOL / SECOND TRANSFINITE CARDINAL -U+02137 ℷ \gimel GIMEL SYMBOL / THIRD TRANSFINITE CARDINAL -U+02138 ℸ \daleth DALET SYMBOL / FOURTH TRANSFINITE CARDINAL -U+02139 ℹ \:information_source: INFORMATION SOURCE -U+0213C ℼ \bbpi DOUBLE-STRUCK SMALL PI -U+0213D ℽ \bbgamma DOUBLE-STRUCK SMALL GAMMA -U+0213E ℾ \bbGamma DOUBLE-STRUCK CAPITAL GAMMA -U+0213F ℿ \bbPi DOUBLE-STRUCK CAPITAL PI -U+02140 ⅀ \bbsum DOUBLE-STRUCK N-ARY SUMMATION -U+02141 ⅁ \Game TURNED SANS-SERIF CAPITAL G -U+02142 ⅂ \sansLturned TURNED SANS-SERIF CAPITAL L -U+02143 ⅃ \sansLmirrored REVERSED SANS-SERIF CAPITAL L -U+02144 ⅄ \Yup TURNED SANS-SERIF CAPITAL Y -U+02145 ⅅ \bbiD DOUBLE-STRUCK ITALIC CAPITAL D -U+02146 ⅆ \bbid DOUBLE-STRUCK ITALIC SMALL D -U+02147 ⅇ \bbie DOUBLE-STRUCK ITALIC SMALL E -U+02148 ⅈ \bbii DOUBLE-STRUCK ITALIC SMALL I -U+02149 ⅉ \bbij DOUBLE-STRUCK ITALIC SMALL J -U+0214A ⅊ \PropertyLine PROPERTY LINE -U+0214B ⅋ \upand TURNED AMPERSAND -U+02150 ⅐ \1/7 VULGAR FRACTION ONE SEVENTH -U+02151 ⅑ \1/9 VULGAR FRACTION ONE NINTH -U+02152 ⅒ \1/10 VULGAR FRACTION ONE TENTH -U+02153 ⅓ \1/3 VULGAR FRACTION ONE THIRD / FRACTION ONE THIRD -U+02154 ⅔ \2/3 VULGAR FRACTION TWO THIRDS / FRACTION TWO THIRDS -U+02155 ⅕ \1/5 VULGAR FRACTION ONE FIFTH / FRACTION ONE FIFTH -U+02156 ⅖ \2/5 VULGAR FRACTION TWO FIFTHS / FRACTION TWO FIFTHS -U+02157 ⅗ \3/5 VULGAR FRACTION THREE FIFTHS / FRACTION THREE FIFTHS -U+02158 ⅘ \4/5 VULGAR FRACTION FOUR FIFTHS / FRACTION FOUR FIFTHS -U+02159 ⅙ \1/6 VULGAR FRACTION ONE SIXTH / FRACTION ONE SIXTH -U+0215A ⅚ \5/6 VULGAR FRACTION FIVE SIXTHS / FRACTION FIVE SIXTHS -U+0215B ⅛ \1/8 VULGAR FRACTION ONE EIGHTH / FRACTION ONE EIGHTH -U+0215C ⅜ \3/8 VULGAR FRACTION THREE EIGHTHS / FRACTION THREE EIGHTHS -U+0215D ⅝ \5/8 VULGAR FRACTION FIVE EIGHTHS / FRACTION FIVE EIGHTHS -U+0215E ⅞ \7/8 VULGAR FRACTION SEVEN EIGHTHS / FRACTION SEVEN EIGHTHS -U+0215F ⅟ \1/ FRACTION NUMERATOR ONE -U+02189 ↉ \0/3 VULGAR FRACTION ZERO THIRDS -U+02190 ← \leftarrow LEFTWARDS ARROW / LEFT ARROW -U+02191 ↑ \uparrow UPWARDS ARROW / UP ARROW -U+02192 → \to, \rightarrow RIGHTWARDS ARROW / RIGHT ARROW -U+02193 ↓ \downarrow DOWNWARDS ARROW / DOWN ARROW -U+02194 ↔ \leftrightarrow, \:left_right_arrow: LEFT RIGHT ARROW -U+02195 ↕ \updownarrow, \:arrow_up_down: UP DOWN ARROW -U+02196 ↖ \nwarrow, \:arrow_upper_left: NORTH WEST ARROW / UPPER LEFT ARROW -U+02197 ↗ \nearrow, \:arrow_upper_right: NORTH EAST ARROW / UPPER RIGHT ARROW -U+02198 ↘ \searrow, \:arrow_lower_right: SOUTH EAST ARROW / LOWER RIGHT ARROW -U+02199 ↙ \swarrow, \:arrow_lower_left: SOUTH WEST ARROW / LOWER LEFT ARROW -U+0219A ↚ \nleftarrow LEFTWARDS ARROW WITH STROKE / LEFT ARROW WITH STROKE -U+0219B ↛ \nrightarrow RIGHTWARDS ARROW WITH STROKE / RIGHT ARROW WITH STROKE -U+0219C ↜ \leftwavearrow LEFTWARDS WAVE ARROW / LEFT WAVE ARROW -U+0219D ↝ \rightwavearrow RIGHTWARDS WAVE ARROW / RIGHT WAVE ARROW -U+0219E ↞ \twoheadleftarrow LEFTWARDS TWO HEADED ARROW / LEFT TWO HEADED ARROW -U+0219F ↟ \twoheaduparrow UPWARDS TWO HEADED ARROW / UP TWO HEADED ARROW -U+021A0 ↠ \twoheadrightarrow RIGHTWARDS TWO HEADED ARROW / RIGHT TWO HEADED ARROW -U+021A1 ↡ \twoheaddownarrow DOWNWARDS TWO HEADED ARROW / DOWN TWO HEADED ARROW -U+021A2 ↢ \leftarrowtail LEFTWARDS ARROW WITH TAIL / LEFT ARROW WITH TAIL -U+021A3 ↣ \rightarrowtail RIGHTWARDS ARROW WITH TAIL / RIGHT ARROW WITH TAIL -U+021A4 ↤ \mapsfrom LEFTWARDS ARROW FROM BAR / LEFT ARROW FROM BAR -U+021A5 ↥ \mapsup UPWARDS ARROW FROM BAR / UP ARROW FROM BAR -U+021A6 ↦ \mapsto RIGHTWARDS ARROW FROM BAR / RIGHT ARROW FROM BAR -U+021A7 ↧ \mapsdown DOWNWARDS ARROW FROM BAR / DOWN ARROW FROM BAR -U+021A8 ↨ \updownarrowbar UP DOWN ARROW WITH BASE -U+021A9 ↩ \hookleftarrow, \:leftwards_arrow_with_hook: LEFTWARDS ARROW WITH HOOK / LEFT ARROW WITH HOOK -U+021AA ↪ \hookrightarrow, \:arrow_right_hook: RIGHTWARDS ARROW WITH HOOK / RIGHT ARROW WITH HOOK -U+021AB ↫ \looparrowleft LEFTWARDS ARROW WITH LOOP / LEFT ARROW WITH LOOP -U+021AC ↬ \looparrowright RIGHTWARDS ARROW WITH LOOP / RIGHT ARROW WITH LOOP -U+021AD ↭ \leftrightsquigarrow LEFT RIGHT WAVE ARROW -U+021AE ↮ \nleftrightarrow LEFT RIGHT ARROW WITH STROKE -U+021AF ↯ \downzigzagarrow DOWNWARDS ZIGZAG ARROW / DOWN ZIGZAG ARROW -U+021B0 ↰ \Lsh UPWARDS ARROW WITH TIP LEFTWARDS / UP ARROW WITH TIP LEFT -U+021B1 ↱ \Rsh UPWARDS ARROW WITH TIP RIGHTWARDS / UP ARROW WITH TIP RIGHT -U+021B2 ↲ \Ldsh DOWNWARDS ARROW WITH TIP LEFTWARDS / DOWN ARROW WITH TIP LEFT -U+021B3 ↳ \Rdsh DOWNWARDS ARROW WITH TIP RIGHTWARDS / DOWN ARROW WITH TIP RIGHT -U+021B4 ↴ \linefeed RIGHTWARDS ARROW WITH CORNER DOWNWARDS / RIGHT ARROW WITH CORNER DOWN -U+021B5 ↵ \carriagereturn DOWNWARDS ARROW WITH CORNER LEFTWARDS / DOWN ARROW WITH CORNER LEFT -U+021B6 ↶ \curvearrowleft ANTICLOCKWISE TOP SEMICIRCLE ARROW -U+021B7 ↷ \curvearrowright CLOCKWISE TOP SEMICIRCLE ARROW -U+021B8 ↸ \barovernorthwestarrow NORTH WEST ARROW TO LONG BAR / UPPER LEFT ARROW TO LONG BAR -U+021B9 ↹ \barleftarrowrightarrowbar LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR / LEFT ARROW TO BAR OVER RIGHT ARROW TO BAR -U+021BA ↺ \circlearrowleft ANTICLOCKWISE OPEN CIRCLE ARROW -U+021BB ↻ \circlearrowright CLOCKWISE OPEN CIRCLE ARROW -U+021BC ↼ \leftharpoonup LEFTWARDS HARPOON WITH BARB UPWARDS / LEFT HARPOON WITH BARB UP -U+021BD ↽ \leftharpoondown LEFTWARDS HARPOON WITH BARB DOWNWARDS / LEFT HARPOON WITH BARB DOWN -U+021BE ↾ \upharpoonright UPWARDS HARPOON WITH BARB RIGHTWARDS / UP HARPOON WITH BARB RIGHT -U+021BF ↿ \upharpoonleft UPWARDS HARPOON WITH BARB LEFTWARDS / UP HARPOON WITH BARB LEFT -U+021C0 ⇀ \rightharpoonup RIGHTWARDS HARPOON WITH BARB UPWARDS / RIGHT HARPOON WITH BARB UP -U+021C1 ⇁ \rightharpoondown RIGHTWARDS HARPOON WITH BARB DOWNWARDS / RIGHT HARPOON WITH BARB DOWN -U+021C2 ⇂ \downharpoonright DOWNWARDS HARPOON WITH BARB RIGHTWARDS / DOWN HARPOON WITH BARB RIGHT -U+021C3 ⇃ \downharpoonleft DOWNWARDS HARPOON WITH BARB LEFTWARDS / DOWN HARPOON WITH BARB LEFT -U+021C4 ⇄ \rightleftarrows RIGHTWARDS ARROW OVER LEFTWARDS ARROW / RIGHT ARROW OVER LEFT ARROW -U+021C5 ⇅ \dblarrowupdown UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW / UP ARROW LEFT OF DOWN ARROW -U+021C6 ⇆ \leftrightarrows LEFTWARDS ARROW OVER RIGHTWARDS ARROW / LEFT ARROW OVER RIGHT ARROW -U+021C7 ⇇ \leftleftarrows LEFTWARDS PAIRED ARROWS / LEFT PAIRED ARROWS -U+021C8 ⇈ \upuparrows UPWARDS PAIRED ARROWS / UP PAIRED ARROWS -U+021C9 ⇉ \rightrightarrows RIGHTWARDS PAIRED ARROWS / RIGHT PAIRED ARROWS -U+021CA ⇊ \downdownarrows DOWNWARDS PAIRED ARROWS / DOWN PAIRED ARROWS -U+021CB ⇋ \leftrightharpoons LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON / LEFT HARPOON OVER RIGHT HARPOON -U+021CC ⇌ \rightleftharpoons RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON / RIGHT HARPOON OVER LEFT HARPOON -U+021CD ⇍ \nLeftarrow LEFTWARDS DOUBLE ARROW WITH STROKE / LEFT DOUBLE ARROW WITH STROKE -U+021CE ⇎ \nLeftrightarrow LEFT RIGHT DOUBLE ARROW WITH STROKE -U+021CF ⇏ \nRightarrow RIGHTWARDS DOUBLE ARROW WITH STROKE / RIGHT DOUBLE ARROW WITH STROKE -U+021D0 ⇐ \Leftarrow LEFTWARDS DOUBLE ARROW / LEFT DOUBLE ARROW -U+021D1 ⇑ \Uparrow UPWARDS DOUBLE ARROW / UP DOUBLE ARROW -U+021D2 ⇒ \Rightarrow RIGHTWARDS DOUBLE ARROW / RIGHT DOUBLE ARROW -U+021D3 ⇓ \Downarrow DOWNWARDS DOUBLE ARROW / DOWN DOUBLE ARROW -U+021D4 ⇔ \Leftrightarrow LEFT RIGHT DOUBLE ARROW -U+021D5 ⇕ \Updownarrow UP DOWN DOUBLE ARROW -U+021D6 ⇖ \Nwarrow NORTH WEST DOUBLE ARROW / UPPER LEFT DOUBLE ARROW -U+021D7 ⇗ \Nearrow NORTH EAST DOUBLE ARROW / UPPER RIGHT DOUBLE ARROW -U+021D8 ⇘ \Searrow SOUTH EAST DOUBLE ARROW / LOWER RIGHT DOUBLE ARROW -U+021D9 ⇙ \Swarrow SOUTH WEST DOUBLE ARROW / LOWER LEFT DOUBLE ARROW -U+021DA ⇚ \Lleftarrow LEFTWARDS TRIPLE ARROW / LEFT TRIPLE ARROW -U+021DB ⇛ \Rrightarrow RIGHTWARDS TRIPLE ARROW / RIGHT TRIPLE ARROW -U+021DC ⇜ \leftsquigarrow LEFTWARDS SQUIGGLE ARROW / LEFT SQUIGGLE ARROW -U+021DD ⇝ \rightsquigarrow RIGHTWARDS SQUIGGLE ARROW / RIGHT SQUIGGLE ARROW -U+021DE ⇞ \nHuparrow UPWARDS ARROW WITH DOUBLE STROKE / UP ARROW WITH DOUBLE STROKE -U+021DF ⇟ \nHdownarrow DOWNWARDS ARROW WITH DOUBLE STROKE / DOWN ARROW WITH DOUBLE STROKE -U+021E0 ⇠ \leftdasharrow LEFTWARDS DASHED ARROW / LEFT DASHED ARROW -U+021E1 ⇡ \updasharrow UPWARDS DASHED ARROW / UP DASHED ARROW -U+021E2 ⇢ \rightdasharrow RIGHTWARDS DASHED ARROW / RIGHT DASHED ARROW -U+021E3 ⇣ \downdasharrow DOWNWARDS DASHED ARROW / DOWN DASHED ARROW -U+021E4 ⇤ \barleftarrow LEFTWARDS ARROW TO BAR / LEFT ARROW TO BAR -U+021E5 ⇥ \rightarrowbar RIGHTWARDS ARROW TO BAR / RIGHT ARROW TO BAR -U+021E6 ⇦ \leftwhitearrow LEFTWARDS WHITE ARROW / WHITE LEFT ARROW -U+021E7 ⇧ \upwhitearrow UPWARDS WHITE ARROW / WHITE UP ARROW -U+021E8 ⇨ \rightwhitearrow RIGHTWARDS WHITE ARROW / WHITE RIGHT ARROW -U+021E9 ⇩ \downwhitearrow DOWNWARDS WHITE ARROW / WHITE DOWN ARROW -U+021EA ⇪ \whitearrowupfrombar UPWARDS WHITE ARROW FROM BAR / WHITE UP ARROW FROM BAR -U+021F4 ⇴ \circleonrightarrow RIGHT ARROW WITH SMALL CIRCLE -U+021F5 ⇵ \DownArrowUpArrow DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW -U+021F6 ⇶ \rightthreearrows THREE RIGHTWARDS ARROWS -U+021F7 ⇷ \nvleftarrow LEFTWARDS ARROW WITH VERTICAL STROKE -U+021F8 ⇸ \nvrightarrow RIGHTWARDS ARROW WITH VERTICAL STROKE -U+021F9 ⇹ \nvleftrightarrow LEFT RIGHT ARROW WITH VERTICAL STROKE -U+021FA ⇺ \nVleftarrow LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE -U+021FB ⇻ \nVrightarrow RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE -U+021FC ⇼ \nVleftrightarrow LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE -U+021FD ⇽ \leftarrowtriangle LEFTWARDS OPEN-HEADED ARROW -U+021FE ⇾ \rightarrowtriangle RIGHTWARDS OPEN-HEADED ARROW -U+021FF ⇿ \leftrightarrowtriangle LEFT RIGHT OPEN-HEADED ARROW -U+02200 ∀ \forall FOR ALL -U+02201 ∁ \complement COMPLEMENT -U+02202 ∂ \partial PARTIAL DIFFERENTIAL -U+02203 ∃ \exists THERE EXISTS -U+02204 ∄ \nexists THERE DOES NOT EXIST -U+02205 ∅ \varnothing, \emptyset EMPTY SET -U+02206 ∆ \increment INCREMENT -U+02207 ∇ \del, \nabla NABLA -U+02208 ∈ \in ELEMENT OF -U+02209 ∉ \notin NOT AN ELEMENT OF -U+0220A ∊ \smallin SMALL ELEMENT OF -U+0220B ∋ \ni CONTAINS AS MEMBER -U+0220C ∌ \nni DOES NOT CONTAIN AS MEMBER -U+0220D ∍ \smallni SMALL CONTAINS AS MEMBER -U+0220E ∎ \QED END OF PROOF -U+0220F ∏ \prod N-ARY PRODUCT -U+02210 ∐ \coprod N-ARY COPRODUCT -U+02211 ∑ \sum N-ARY SUMMATION -U+02212 − \minus MINUS SIGN -U+02213 ∓ \mp MINUS-OR-PLUS SIGN -U+02214 ∔ \dotplus DOT PLUS -U+02216 ∖ \setminus SET MINUS -U+02217 ∗ \ast ASTERISK OPERATOR -U+02218 ∘ \circ RING OPERATOR -U+02219 ∙ \vysmblkcircle BULLET OPERATOR -U+0221A √ \surd, \sqrt SQUARE ROOT -U+0221B ∛ \cbrt CUBE ROOT -U+0221C ∜ \fourthroot FOURTH ROOT -U+0221D ∝ \propto PROPORTIONAL TO -U+0221E ∞ \infty INFINITY -U+0221F ∟ \rightangle RIGHT ANGLE -U+02220 ∠ \angle ANGLE -U+02221 ∡ \measuredangle MEASURED ANGLE -U+02222 ∢ \sphericalangle SPHERICAL ANGLE -U+02223 ∣ \mid DIVIDES -U+02224 ∤ \nmid DOES NOT DIVIDE -U+02225 ∥ \parallel PARALLEL TO -U+02226 ∦ \nparallel NOT PARALLEL TO -U+02227 ∧ \wedge LOGICAL AND -U+02228 ∨ \vee LOGICAL OR -U+02229 ∩ \cap INTERSECTION -U+0222A ∪ \cup UNION -U+0222B ∫ \int INTEGRAL -U+0222C ∬ \iint DOUBLE INTEGRAL -U+0222D ∭ \iiint TRIPLE INTEGRAL -U+0222E ∮ \oint CONTOUR INTEGRAL -U+0222F ∯ \oiint SURFACE INTEGRAL -U+02230 ∰ \oiiint VOLUME INTEGRAL -U+02231 ∱ \clwintegral CLOCKWISE INTEGRAL -U+02232 ∲ \varointclockwise CLOCKWISE CONTOUR INTEGRAL -U+02233 ∳ \ointctrclockwise ANTICLOCKWISE CONTOUR INTEGRAL -U+02234 ∴ \therefore THEREFORE -U+02235 ∵ \because BECAUSE -U+02237 ∷ \Colon PROPORTION -U+02238 ∸ \dotminus DOT MINUS -U+0223A ∺ \dotsminusdots GEOMETRIC PROPORTION -U+0223B ∻ \kernelcontraction HOMOTHETIC -U+0223C ∼ \sim TILDE OPERATOR -U+0223D ∽ \backsim REVERSED TILDE -U+0223E ∾ \lazysinv INVERTED LAZY S -U+0223F ∿ \sinewave SINE WAVE -U+02240 ≀ \wr WREATH PRODUCT -U+02241 ≁ \nsim NOT TILDE -U+02242 ≂ \eqsim MINUS TILDE -U+02242 + U+00338 ≂̸ \neqsim MINUS TILDE + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02243 ≃ \simeq ASYMPTOTICALLY EQUAL TO -U+02244 ≄ \nsime NOT ASYMPTOTICALLY EQUAL TO -U+02245 ≅ \cong APPROXIMATELY EQUAL TO -U+02246 ≆ \approxnotequal APPROXIMATELY BUT NOT ACTUALLY EQUAL TO -U+02247 ≇ \ncong NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO -U+02248 ≈ \approx ALMOST EQUAL TO -U+02249 ≉ \napprox NOT ALMOST EQUAL TO -U+0224A ≊ \approxeq ALMOST EQUAL OR EQUAL TO -U+0224B ≋ \tildetrpl TRIPLE TILDE -U+0224C ≌ \allequal ALL EQUAL TO -U+0224D ≍ \asymp EQUIVALENT TO -U+0224E ≎ \Bumpeq GEOMETRICALLY EQUIVALENT TO -U+0224E + U+00338 ≎̸ \nBumpeq GEOMETRICALLY EQUIVALENT TO + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+0224F ≏ \bumpeq DIFFERENCE BETWEEN -U+0224F + U+00338 ≏̸ \nbumpeq DIFFERENCE BETWEEN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02250 ≐ \doteq APPROACHES THE LIMIT -U+02251 ≑ \Doteq GEOMETRICALLY EQUAL TO -U+02252 ≒ \fallingdotseq APPROXIMATELY EQUAL TO OR THE IMAGE OF -U+02253 ≓ \risingdotseq IMAGE OF OR APPROXIMATELY EQUAL TO -U+02254 ≔ \coloneq COLON EQUALS / COLON EQUAL -U+02255 ≕ \eqcolon EQUALS COLON / EQUAL COLON -U+02256 ≖ \eqcirc RING IN EQUAL TO -U+02257 ≗ \circeq RING EQUAL TO -U+02258 ≘ \arceq CORRESPONDS TO -U+02259 ≙ \wedgeq ESTIMATES -U+0225A ≚ \veeeq EQUIANGULAR TO -U+0225B ≛ \starequal STAR EQUALS -U+0225C ≜ \triangleq DELTA EQUAL TO -U+0225D ≝ \eqdef EQUAL TO BY DEFINITION -U+0225E ≞ \measeq MEASURED BY -U+0225F ≟ \questeq QUESTIONED EQUAL TO -U+02260 ≠ \ne NOT EQUAL TO -U+02261 ≡ \equiv IDENTICAL TO -U+02262 ≢ \nequiv NOT IDENTICAL TO -U+02263 ≣ \Equiv STRICTLY EQUIVALENT TO -U+02264 ≤ \le, \leq LESS-THAN OR EQUAL TO / LESS THAN OR EQUAL TO -U+02265 ≥ \ge, \geq GREATER-THAN OR EQUAL TO / GREATER THAN OR EQUAL TO -U+02266 ≦ \leqq LESS-THAN OVER EQUAL TO / LESS THAN OVER EQUAL TO -U+02267 ≧ \geqq GREATER-THAN OVER EQUAL TO / GREATER THAN OVER EQUAL TO -U+02268 ≨ \lneqq LESS-THAN BUT NOT EQUAL TO / LESS THAN BUT NOT EQUAL TO -U+02268 + U+0FE00 ≨︀ \lvertneqq LESS-THAN BUT NOT EQUAL TO / LESS THAN BUT NOT EQUAL TO + VARIATION SELECTOR-1 -U+02269 ≩ \gneqq GREATER-THAN BUT NOT EQUAL TO / GREATER THAN BUT NOT EQUAL TO -U+02269 + U+0FE00 ≩︀ \gvertneqq GREATER-THAN BUT NOT EQUAL TO / GREATER THAN BUT NOT EQUAL TO + VARIATION SELECTOR-1 -U+0226A ≪ \ll MUCH LESS-THAN / MUCH LESS THAN -U+0226A + U+00338 ≪̸ \NotLessLess MUCH LESS-THAN / MUCH LESS THAN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+0226B ≫ \gg MUCH GREATER-THAN / MUCH GREATER THAN -U+0226B + U+00338 ≫̸ \NotGreaterGreater MUCH GREATER-THAN / MUCH GREATER THAN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+0226C ≬ \between BETWEEN -U+0226D ≭ \nasymp NOT EQUIVALENT TO -U+0226E ≮ \nless NOT LESS-THAN / NOT LESS THAN -U+0226F ≯ \ngtr NOT GREATER-THAN / NOT GREATER THAN -U+02270 ≰ \nleq NEITHER LESS-THAN NOR EQUAL TO / NEITHER LESS THAN NOR EQUAL TO -U+02271 ≱ \ngeq NEITHER GREATER-THAN NOR EQUAL TO / NEITHER GREATER THAN NOR EQUAL TO -U+02272 ≲ \lesssim LESS-THAN OR EQUIVALENT TO / LESS THAN OR EQUIVALENT TO -U+02273 ≳ \gtrsim GREATER-THAN OR EQUIVALENT TO / GREATER THAN OR EQUIVALENT TO -U+02274 ≴ \nlesssim NEITHER LESS-THAN NOR EQUIVALENT TO / NEITHER LESS THAN NOR EQUIVALENT TO -U+02275 ≵ \ngtrsim NEITHER GREATER-THAN NOR EQUIVALENT TO / NEITHER GREATER THAN NOR EQUIVALENT TO -U+02276 ≶ \lessgtr LESS-THAN OR GREATER-THAN / LESS THAN OR GREATER THAN -U+02277 ≷ \gtrless GREATER-THAN OR LESS-THAN / GREATER THAN OR LESS THAN -U+02278 ≸ \notlessgreater NEITHER LESS-THAN NOR GREATER-THAN / NEITHER LESS THAN NOR GREATER THAN -U+02279 ≹ \notgreaterless NEITHER GREATER-THAN NOR LESS-THAN / NEITHER GREATER THAN NOR LESS THAN -U+0227A ≺ \prec PRECEDES -U+0227B ≻ \succ SUCCEEDS -U+0227C ≼ \preccurlyeq PRECEDES OR EQUAL TO -U+0227D ≽ \succcurlyeq SUCCEEDS OR EQUAL TO -U+0227E ≾ \precsim PRECEDES OR EQUIVALENT TO -U+0227E + U+00338 ≾̸ \nprecsim PRECEDES OR EQUIVALENT TO + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+0227F ≿ \succsim SUCCEEDS OR EQUIVALENT TO -U+0227F + U+00338 ≿̸ \nsuccsim SUCCEEDS OR EQUIVALENT TO + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02280 ⊀ \nprec DOES NOT PRECEDE -U+02281 ⊁ \nsucc DOES NOT SUCCEED -U+02282 ⊂ \subset SUBSET OF -U+02283 ⊃ \supset SUPERSET OF -U+02284 ⊄ \nsubset NOT A SUBSET OF -U+02285 ⊅ \nsupset NOT A SUPERSET OF -U+02286 ⊆ \subseteq SUBSET OF OR EQUAL TO -U+02287 ⊇ \supseteq SUPERSET OF OR EQUAL TO -U+02288 ⊈ \nsubseteq NEITHER A SUBSET OF NOR EQUAL TO -U+02289 ⊉ \nsupseteq NEITHER A SUPERSET OF NOR EQUAL TO -U+0228A ⊊ \subsetneq SUBSET OF WITH NOT EQUAL TO / SUBSET OF OR NOT EQUAL TO -U+0228A + U+0FE00 ⊊︀ \varsubsetneqq SUBSET OF WITH NOT EQUAL TO / SUBSET OF OR NOT EQUAL TO + VARIATION SELECTOR-1 -U+0228B ⊋ \supsetneq SUPERSET OF WITH NOT EQUAL TO / SUPERSET OF OR NOT EQUAL TO -U+0228B + U+0FE00 ⊋︀ \varsupsetneq SUPERSET OF WITH NOT EQUAL TO / SUPERSET OF OR NOT EQUAL TO + VARIATION SELECTOR-1 -U+0228D ⊍ \cupdot MULTISET MULTIPLICATION -U+0228E ⊎ \uplus MULTISET UNION -U+0228F ⊏ \sqsubset SQUARE IMAGE OF -U+0228F + U+00338 ⊏̸ \NotSquareSubset SQUARE IMAGE OF + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02290 ⊐ \sqsupset SQUARE ORIGINAL OF -U+02290 + U+00338 ⊐̸ \NotSquareSuperset SQUARE ORIGINAL OF + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02291 ⊑ \sqsubseteq SQUARE IMAGE OF OR EQUAL TO -U+02292 ⊒ \sqsupseteq SQUARE ORIGINAL OF OR EQUAL TO -U+02293 ⊓ \sqcap SQUARE CAP -U+02294 ⊔ \sqcup SQUARE CUP -U+02295 ⊕ \oplus CIRCLED PLUS -U+02296 ⊖ \ominus CIRCLED MINUS -U+02297 ⊗ \otimes CIRCLED TIMES -U+02298 ⊘ \oslash CIRCLED DIVISION SLASH -U+02299 ⊙ \odot CIRCLED DOT OPERATOR -U+0229A ⊚ \circledcirc CIRCLED RING OPERATOR -U+0229B ⊛ \circledast CIRCLED ASTERISK OPERATOR -U+0229C ⊜ \circledequal CIRCLED EQUALS -U+0229D ⊝ \circleddash CIRCLED DASH -U+0229E ⊞ \boxplus SQUARED PLUS -U+0229F ⊟ \boxminus SQUARED MINUS -U+022A0 ⊠ \boxtimes SQUARED TIMES -U+022A1 ⊡ \boxdot SQUARED DOT OPERATOR -U+022A2 ⊢ \vdash RIGHT TACK -U+022A3 ⊣ \dashv LEFT TACK -U+022A4 ⊤ \top DOWN TACK -U+022A5 ⊥ \bot UP TACK -U+022A7 ⊧ \models MODELS -U+022A8 ⊨ \vDash TRUE -U+022A9 ⊩ \Vdash FORCES -U+022AA ⊪ \Vvdash TRIPLE VERTICAL BAR RIGHT TURNSTILE -U+022AB ⊫ \VDash DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE -U+022AC ⊬ \nvdash DOES NOT PROVE -U+022AD ⊭ \nvDash NOT TRUE -U+022AE ⊮ \nVdash DOES NOT FORCE -U+022AF ⊯ \nVDash NEGATED DOUBLE VERTICAL BAR DOUBLE RIGHT TURNSTILE -U+022B0 ⊰ \prurel PRECEDES UNDER RELATION -U+022B1 ⊱ \scurel SUCCEEDS UNDER RELATION -U+022B2 ⊲ \vartriangleleft NORMAL SUBGROUP OF -U+022B3 ⊳ \vartriangleright CONTAINS AS NORMAL SUBGROUP -U+022B4 ⊴ \trianglelefteq NORMAL SUBGROUP OF OR EQUAL TO -U+022B5 ⊵ \trianglerighteq CONTAINS AS NORMAL SUBGROUP OR EQUAL TO -U+022B6 ⊶ \original ORIGINAL OF -U+022B7 ⊷ \image IMAGE OF -U+022B8 ⊸ \multimap MULTIMAP -U+022B9 ⊹ \hermitconjmatrix HERMITIAN CONJUGATE MATRIX -U+022BA ⊺ \intercal INTERCALATE -U+022BB ⊻ \veebar, \xor XOR -U+022BC ⊼ \barwedge NAND -U+022BD ⊽ \barvee NOR -U+022BE ⊾ \rightanglearc RIGHT ANGLE WITH ARC -U+022BF ⊿ \varlrtriangle RIGHT TRIANGLE -U+022C0 ⋀ \bigwedge N-ARY LOGICAL AND -U+022C1 ⋁ \bigvee N-ARY LOGICAL OR -U+022C2 ⋂ \bigcap N-ARY INTERSECTION -U+022C3 ⋃ \bigcup N-ARY UNION -U+022C4 ⋄ \diamond DIAMOND OPERATOR -U+022C5 ⋅ \cdot DOT OPERATOR -U+022C6 ⋆ \star STAR OPERATOR -U+022C7 ⋇ \divideontimes DIVISION TIMES -U+022C8 ⋈ \bowtie BOWTIE -U+022C9 ⋉ \ltimes LEFT NORMAL FACTOR SEMIDIRECT PRODUCT -U+022CA ⋊ \rtimes RIGHT NORMAL FACTOR SEMIDIRECT PRODUCT -U+022CB ⋋ \leftthreetimes LEFT SEMIDIRECT PRODUCT -U+022CC ⋌ \rightthreetimes RIGHT SEMIDIRECT PRODUCT -U+022CD ⋍ \backsimeq REVERSED TILDE EQUALS -U+022CE ⋎ \curlyvee CURLY LOGICAL OR -U+022CF ⋏ \curlywedge CURLY LOGICAL AND -U+022D0 ⋐ \Subset DOUBLE SUBSET -U+022D1 ⋑ \Supset DOUBLE SUPERSET -U+022D2 ⋒ \Cap DOUBLE INTERSECTION -U+022D3 ⋓ \Cup DOUBLE UNION -U+022D4 ⋔ \pitchfork PITCHFORK -U+022D5 ⋕ \equalparallel EQUAL AND PARALLEL TO -U+022D6 ⋖ \lessdot LESS-THAN WITH DOT / LESS THAN WITH DOT -U+022D7 ⋗ \gtrdot GREATER-THAN WITH DOT / GREATER THAN WITH DOT -U+022D8 ⋘ \verymuchless VERY MUCH LESS-THAN / VERY MUCH LESS THAN -U+022D9 ⋙ \ggg VERY MUCH GREATER-THAN / VERY MUCH GREATER THAN -U+022DA ⋚ \lesseqgtr LESS-THAN EQUAL TO OR GREATER-THAN / LESS THAN EQUAL TO OR GREATER THAN -U+022DB ⋛ \gtreqless GREATER-THAN EQUAL TO OR LESS-THAN / GREATER THAN EQUAL TO OR LESS THAN -U+022DC ⋜ \eqless EQUAL TO OR LESS-THAN / EQUAL TO OR LESS THAN -U+022DD ⋝ \eqgtr EQUAL TO OR GREATER-THAN / EQUAL TO OR GREATER THAN -U+022DE ⋞ \curlyeqprec EQUAL TO OR PRECEDES -U+022DF ⋟ \curlyeqsucc EQUAL TO OR SUCCEEDS -U+022E0 ⋠ \npreccurlyeq DOES NOT PRECEDE OR EQUAL -U+022E1 ⋡ \nsucccurlyeq DOES NOT SUCCEED OR EQUAL -U+022E2 ⋢ \nsqsubseteq NOT SQUARE IMAGE OF OR EQUAL TO -U+022E3 ⋣ \nsqsupseteq NOT SQUARE ORIGINAL OF OR EQUAL TO -U+022E4 ⋤ \sqsubsetneq SQUARE IMAGE OF OR NOT EQUAL TO -U+022E5 ⋥ \sqspne SQUARE ORIGINAL OF OR NOT EQUAL TO -U+022E6 ⋦ \lnsim LESS-THAN BUT NOT EQUIVALENT TO / LESS THAN BUT NOT EQUIVALENT TO -U+022E7 ⋧ \gnsim GREATER-THAN BUT NOT EQUIVALENT TO / GREATER THAN BUT NOT EQUIVALENT TO -U+022E8 ⋨ \precnsim PRECEDES BUT NOT EQUIVALENT TO -U+022E9 ⋩ \succnsim SUCCEEDS BUT NOT EQUIVALENT TO -U+022EA ⋪ \ntriangleleft NOT NORMAL SUBGROUP OF -U+022EB ⋫ \ntriangleright DOES NOT CONTAIN AS NORMAL SUBGROUP -U+022EC ⋬ \ntrianglelefteq NOT NORMAL SUBGROUP OF OR EQUAL TO -U+022ED ⋭ \ntrianglerighteq DOES NOT CONTAIN AS NORMAL SUBGROUP OR EQUAL -U+022EE ⋮ \vdots VERTICAL ELLIPSIS -U+022EF ⋯ \cdots MIDLINE HORIZONTAL ELLIPSIS -U+022F0 ⋰ \adots UP RIGHT DIAGONAL ELLIPSIS -U+022F1 ⋱ \ddots DOWN RIGHT DIAGONAL ELLIPSIS -U+022F2 ⋲ \disin ELEMENT OF WITH LONG HORIZONTAL STROKE -U+022F3 ⋳ \varisins ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE -U+022F4 ⋴ \isins SMALL ELEMENT OF WITH VERTICAL BAR AT END OF HORIZONTAL STROKE -U+022F5 ⋵ \isindot ELEMENT OF WITH DOT ABOVE -U+022F6 ⋶ \varisinobar ELEMENT OF WITH OVERBAR -U+022F7 ⋷ \isinobar SMALL ELEMENT OF WITH OVERBAR -U+022F8 ⋸ \isinvb ELEMENT OF WITH UNDERBAR -U+022F9 ⋹ \isinE ELEMENT OF WITH TWO HORIZONTAL STROKES -U+022FA ⋺ \nisd CONTAINS WITH LONG HORIZONTAL STROKE -U+022FB ⋻ \varnis CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE -U+022FC ⋼ \nis SMALL CONTAINS WITH VERTICAL BAR AT END OF HORIZONTAL STROKE -U+022FD ⋽ \varniobar CONTAINS WITH OVERBAR -U+022FE ⋾ \niobar SMALL CONTAINS WITH OVERBAR -U+022FF ⋿ \bagmember Z NOTATION BAG MEMBERSHIP -U+02300 ⌀ \diameter DIAMETER SIGN -U+02302 ⌂ \house HOUSE -U+02305 ⌅ \varbarwedge PROJECTIVE -U+02306 ⌆ \vardoublebarwedge PERSPECTIVE -U+02308 ⌈ \lceil LEFT CEILING -U+02309 ⌉ \rceil RIGHT CEILING -U+0230A ⌊ \lfloor LEFT FLOOR -U+0230B ⌋ \rfloor RIGHT FLOOR -U+02310 ⌐ \invnot REVERSED NOT SIGN -U+02311 ⌑ \sqlozenge SQUARE LOZENGE -U+02312 ⌒ \profline ARC -U+02313 ⌓ \profsurf SEGMENT -U+02315 ⌕ \recorder TELEPHONE RECORDER -U+02317 ⌗ \viewdata VIEWDATA SQUARE -U+02319 ⌙ \turnednot TURNED NOT SIGN -U+0231A ⌚ \:watch: WATCH -U+0231B ⌛ \:hourglass: HOURGLASS -U+0231C ⌜ \ulcorner TOP LEFT CORNER -U+0231D ⌝ \urcorner TOP RIGHT CORNER -U+0231E ⌞ \llcorner BOTTOM LEFT CORNER -U+0231F ⌟ \lrcorner BOTTOM RIGHT CORNER -U+02322 ⌢ \frown FROWN -U+02323 ⌣ \smile SMILE -U+0232C ⌬ \varhexagonlrbonds BENZENE RING -U+02332 ⌲ \conictaper CONICAL TAPER -U+02336 ⌶ \topbot APL FUNCTIONAL SYMBOL I-BEAM -U+0233D ⌽ \obar APL FUNCTIONAL SYMBOL CIRCLE STILE -U+0233F ⌿ \notslash APL FUNCTIONAL SYMBOL SLASH BAR -U+02340 ⍀ \notbackslash APL FUNCTIONAL SYMBOL BACKSLASH BAR -U+02353 ⍓ \boxupcaret APL FUNCTIONAL SYMBOL QUAD UP CARET -U+02370 ⍰ \boxquestion APL FUNCTIONAL SYMBOL QUAD QUESTION -U+02394 ⎔ \hexagon SOFTWARE-FUNCTION SYMBOL -U+023A3 ⎣ \dlcorn LEFT SQUARE BRACKET LOWER CORNER -U+023B0 ⎰ \lmoustache UPPER LEFT OR LOWER RIGHT CURLY BRACKET SECTION -U+023B1 ⎱ \rmoustache UPPER RIGHT OR LOWER LEFT CURLY BRACKET SECTION -U+023B4 ⎴ \overbracket TOP SQUARE BRACKET -U+023B5 ⎵ \underbracket BOTTOM SQUARE BRACKET -U+023B6 ⎶ \bbrktbrk BOTTOM SQUARE BRACKET OVER TOP SQUARE BRACKET -U+023B7 ⎷ \sqrtbottom RADICAL SYMBOL BOTTOM -U+023B8 ⎸ \lvboxline LEFT VERTICAL BOX LINE -U+023B9 ⎹ \rvboxline RIGHT VERTICAL BOX LINE -U+023CE ⏎ \varcarriagereturn RETURN SYMBOL -U+023DE ⏞ \overbrace TOP CURLY BRACKET -U+023DF ⏟ \underbrace BOTTOM CURLY BRACKET -U+023E2 ⏢ \trapezium WHITE TRAPEZIUM -U+023E3 ⏣ \benzenr BENZENE RING WITH CIRCLE -U+023E4 ⏤ \strns STRAIGHTNESS -U+023E5 ⏥ \fltns FLATNESS -U+023E6 ⏦ \accurrent AC CURRENT -U+023E7 ⏧ \elinters ELECTRICAL INTERSECTION -U+023E9 ⏩ \:fast_forward: BLACK RIGHT-POINTING DOUBLE TRIANGLE -U+023EA ⏪ \:rewind: BLACK LEFT-POINTING DOUBLE TRIANGLE -U+023EB ⏫ \:arrow_double_up: BLACK UP-POINTING DOUBLE TRIANGLE -U+023EC ⏬ \:arrow_double_down: BLACK DOWN-POINTING DOUBLE TRIANGLE -U+023F0 ⏰ \:alarm_clock: ALARM CLOCK -U+023F3 ⏳ \:hourglass_flowing_sand: HOURGLASS WITH FLOWING SAND -U+02422 ␢ \blanksymbol BLANK SYMBOL / BLANK -U+02423 ␣ \visiblespace OPEN BOX -U+024C2 Ⓜ \:m: CIRCLED LATIN CAPITAL LETTER M -U+024C8 Ⓢ \circledS CIRCLED LATIN CAPITAL LETTER S -U+02506 ┆ \dshfnc BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL / FORMS LIGHT TRIPLE DASH VERTICAL -U+02519 ┙ \sqfnw BOX DRAWINGS UP LIGHT AND LEFT HEAVY / FORMS UP LIGHT AND LEFT HEAVY -U+02571 ╱ \diagup BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT / FORMS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT -U+02572 ╲ \diagdown BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT / FORMS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT -U+02580 ▀ \blockuphalf UPPER HALF BLOCK -U+02584 ▄ \blocklowhalf LOWER HALF BLOCK -U+02588 █ \blockfull FULL BLOCK -U+0258C ▌ \blocklefthalf LEFT HALF BLOCK -U+02590 ▐ \blockrighthalf RIGHT HALF BLOCK -U+02591 ░ \blockqtrshaded LIGHT SHADE -U+02592 ▒ \blockhalfshaded MEDIUM SHADE -U+02593 ▓ \blockthreeqtrshaded DARK SHADE -U+025A0 ■ \blacksquare BLACK SQUARE -U+025A1 □ \square WHITE SQUARE -U+025A2 ▢ \squoval WHITE SQUARE WITH ROUNDED CORNERS -U+025A3 ▣ \blackinwhitesquare WHITE SQUARE CONTAINING BLACK SMALL SQUARE -U+025A4 ▤ \squarehfill SQUARE WITH HORIZONTAL FILL -U+025A5 ▥ \squarevfill SQUARE WITH VERTICAL FILL -U+025A6 ▦ \squarehvfill SQUARE WITH ORTHOGONAL CROSSHATCH FILL -U+025A7 ▧ \squarenwsefill SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL -U+025A8 ▨ \squareneswfill SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL -U+025A9 ▩ \squarecrossfill SQUARE WITH DIAGONAL CROSSHATCH FILL -U+025AA ▪ \smblksquare, \:black_small_square: BLACK SMALL SQUARE -U+025AB ▫ \smwhtsquare, \:white_small_square: WHITE SMALL SQUARE -U+025AC ▬ \hrectangleblack BLACK RECTANGLE -U+025AD ▭ \hrectangle WHITE RECTANGLE -U+025AE ▮ \vrectangleblack BLACK VERTICAL RECTANGLE -U+025AF ▯ \vrecto WHITE VERTICAL RECTANGLE -U+025B0 ▰ \parallelogramblack BLACK PARALLELOGRAM -U+025B1 ▱ \parallelogram WHITE PARALLELOGRAM -U+025B2 ▲ \bigblacktriangleup BLACK UP-POINTING TRIANGLE / BLACK UP POINTING TRIANGLE -U+025B3 △ \bigtriangleup WHITE UP-POINTING TRIANGLE / WHITE UP POINTING TRIANGLE -U+025B4 ▴ \blacktriangle BLACK UP-POINTING SMALL TRIANGLE / BLACK UP POINTING SMALL TRIANGLE -U+025B5 ▵ \vartriangle WHITE UP-POINTING SMALL TRIANGLE / WHITE UP POINTING SMALL TRIANGLE -U+025B6 ▶ \blacktriangleright, \:arrow_forward: BLACK RIGHT-POINTING TRIANGLE / BLACK RIGHT POINTING TRIANGLE -U+025B7 ▷ \triangleright WHITE RIGHT-POINTING TRIANGLE / WHITE RIGHT POINTING TRIANGLE -U+025B8 ▸ \smallblacktriangleright BLACK RIGHT-POINTING SMALL TRIANGLE / BLACK RIGHT POINTING SMALL TRIANGLE -U+025B9 ▹ \smalltriangleright WHITE RIGHT-POINTING SMALL TRIANGLE / WHITE RIGHT POINTING SMALL TRIANGLE -U+025BA ► \blackpointerright BLACK RIGHT-POINTING POINTER / BLACK RIGHT POINTING POINTER -U+025BB ▻ \whitepointerright WHITE RIGHT-POINTING POINTER / WHITE RIGHT POINTING POINTER -U+025BC ▼ \bigblacktriangledown BLACK DOWN-POINTING TRIANGLE / BLACK DOWN POINTING TRIANGLE -U+025BD ▽ \bigtriangledown WHITE DOWN-POINTING TRIANGLE / WHITE DOWN POINTING TRIANGLE -U+025BE ▾ \blacktriangledown BLACK DOWN-POINTING SMALL TRIANGLE / BLACK DOWN POINTING SMALL TRIANGLE -U+025BF ▿ \triangledown WHITE DOWN-POINTING SMALL TRIANGLE / WHITE DOWN POINTING SMALL TRIANGLE -U+025C0 ◀ \blacktriangleleft, \:arrow_backward: BLACK LEFT-POINTING TRIANGLE / BLACK LEFT POINTING TRIANGLE -U+025C1 ◁ \triangleleft WHITE LEFT-POINTING TRIANGLE / WHITE LEFT POINTING TRIANGLE -U+025C2 ◂ \smallblacktriangleleft BLACK LEFT-POINTING SMALL TRIANGLE / BLACK LEFT POINTING SMALL TRIANGLE -U+025C3 ◃ \smalltriangleleft WHITE LEFT-POINTING SMALL TRIANGLE / WHITE LEFT POINTING SMALL TRIANGLE -U+025C4 ◄ \blackpointerleft BLACK LEFT-POINTING POINTER / BLACK LEFT POINTING POINTER -U+025C5 ◅ \whitepointerleft WHITE LEFT-POINTING POINTER / WHITE LEFT POINTING POINTER -U+025C6 ◆ \mdlgblkdiamond BLACK DIAMOND -U+025C7 ◇ \mdlgwhtdiamond WHITE DIAMOND -U+025C8 ◈ \blackinwhitediamond WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND -U+025C9 ◉ \fisheye FISHEYE -U+025CA ◊ \lozenge LOZENGE -U+025CB ○ \bigcirc WHITE CIRCLE -U+025CC ◌ \dottedcircle DOTTED CIRCLE -U+025CD ◍ \circlevertfill CIRCLE WITH VERTICAL FILL -U+025CE ◎ \bullseye BULLSEYE -U+025CF ● \mdlgblkcircle BLACK CIRCLE -U+025D0 ◐ \cirfl CIRCLE WITH LEFT HALF BLACK -U+025D1 ◑ \cirfr CIRCLE WITH RIGHT HALF BLACK -U+025D2 ◒ \cirfb CIRCLE WITH LOWER HALF BLACK -U+025D3 ◓ \circletophalfblack CIRCLE WITH UPPER HALF BLACK -U+025D4 ◔ \circleurquadblack CIRCLE WITH UPPER RIGHT QUADRANT BLACK -U+025D5 ◕ \blackcircleulquadwhite CIRCLE WITH ALL BUT UPPER LEFT QUADRANT BLACK -U+025D6 ◖ \blacklefthalfcircle LEFT HALF BLACK CIRCLE -U+025D7 ◗ \blackrighthalfcircle RIGHT HALF BLACK CIRCLE -U+025D8 ◘ \rvbull INVERSE BULLET -U+025D9 ◙ \inversewhitecircle INVERSE WHITE CIRCLE -U+025DA ◚ \invwhiteupperhalfcircle UPPER HALF INVERSE WHITE CIRCLE -U+025DB ◛ \invwhitelowerhalfcircle LOWER HALF INVERSE WHITE CIRCLE -U+025DC ◜ \ularc UPPER LEFT QUADRANT CIRCULAR ARC -U+025DD ◝ \urarc UPPER RIGHT QUADRANT CIRCULAR ARC -U+025DE ◞ \lrarc LOWER RIGHT QUADRANT CIRCULAR ARC -U+025DF ◟ \llarc LOWER LEFT QUADRANT CIRCULAR ARC -U+025E0 ◠ \topsemicircle UPPER HALF CIRCLE -U+025E1 ◡ \botsemicircle LOWER HALF CIRCLE -U+025E2 ◢ \lrblacktriangle BLACK LOWER RIGHT TRIANGLE -U+025E3 ◣ \llblacktriangle BLACK LOWER LEFT TRIANGLE -U+025E4 ◤ \ulblacktriangle BLACK UPPER LEFT TRIANGLE -U+025E5 ◥ \urblacktriangle BLACK UPPER RIGHT TRIANGLE -U+025E6 ◦ \smwhtcircle WHITE BULLET -U+025E7 ◧ \sqfl SQUARE WITH LEFT HALF BLACK -U+025E8 ◨ \sqfr SQUARE WITH RIGHT HALF BLACK -U+025E9 ◩ \squareulblack SQUARE WITH UPPER LEFT DIAGONAL HALF BLACK -U+025EA ◪ \sqfse SQUARE WITH LOWER RIGHT DIAGONAL HALF BLACK -U+025EB ◫ \boxbar WHITE SQUARE WITH VERTICAL BISECTING LINE -U+025EC ◬ \trianglecdot WHITE UP-POINTING TRIANGLE WITH DOT / WHITE UP POINTING TRIANGLE WITH DOT -U+025ED ◭ \triangleleftblack UP-POINTING TRIANGLE WITH LEFT HALF BLACK / UP POINTING TRIANGLE WITH LEFT HALF BLACK -U+025EE ◮ \trianglerightblack UP-POINTING TRIANGLE WITH RIGHT HALF BLACK / UP POINTING TRIANGLE WITH RIGHT HALF BLACK -U+025EF ◯ \lgwhtcircle LARGE CIRCLE -U+025F0 ◰ \squareulquad WHITE SQUARE WITH UPPER LEFT QUADRANT -U+025F1 ◱ \squarellquad WHITE SQUARE WITH LOWER LEFT QUADRANT -U+025F2 ◲ \squarelrquad WHITE SQUARE WITH LOWER RIGHT QUADRANT -U+025F3 ◳ \squareurquad WHITE SQUARE WITH UPPER RIGHT QUADRANT -U+025F4 ◴ \circleulquad WHITE CIRCLE WITH UPPER LEFT QUADRANT -U+025F5 ◵ \circlellquad WHITE CIRCLE WITH LOWER LEFT QUADRANT -U+025F6 ◶ \circlelrquad WHITE CIRCLE WITH LOWER RIGHT QUADRANT -U+025F7 ◷ \circleurquad WHITE CIRCLE WITH UPPER RIGHT QUADRANT -U+025F8 ◸ \ultriangle UPPER LEFT TRIANGLE -U+025F9 ◹ \urtriangle UPPER RIGHT TRIANGLE -U+025FA ◺ \lltriangle LOWER LEFT TRIANGLE -U+025FB ◻ \mdwhtsquare, \:white_medium_square: WHITE MEDIUM SQUARE -U+025FC ◼ \mdblksquare, \:black_medium_square: BLACK MEDIUM SQUARE -U+025FD ◽ \mdsmwhtsquare, \:white_medium_small_square: WHITE MEDIUM SMALL SQUARE -U+025FE ◾ \mdsmblksquare, \:black_medium_small_square: BLACK MEDIUM SMALL SQUARE -U+025FF ◿ \lrtriangle LOWER RIGHT TRIANGLE -U+02600 ☀ \:sunny: BLACK SUN WITH RAYS -U+02601 ☁ \:cloud: CLOUD -U+02605 ★ \bigstar BLACK STAR -U+02606 ☆ \bigwhitestar WHITE STAR -U+02609 ☉ \astrosun SUN -U+0260E ☎ \:phone: BLACK TELEPHONE -U+02611 ☑ \:ballot_box_with_check: BALLOT BOX WITH CHECK -U+02614 ☔ \:umbrella: UMBRELLA WITH RAIN DROPS -U+02615 ☕ \:coffee: HOT BEVERAGE -U+0261D ☝ \:point_up: WHITE UP POINTING INDEX -U+02621 ☡ \danger CAUTION SIGN -U+0263A ☺ \:relaxed: WHITE SMILING FACE -U+0263B ☻ \blacksmiley BLACK SMILING FACE -U+0263C ☼ \sun WHITE SUN WITH RAYS -U+0263D ☽ \rightmoon FIRST QUARTER MOON -U+0263E ☾ \leftmoon LAST QUARTER MOON -U+0263F ☿ \mercury MERCURY -U+02640 ♀ \venus, \female FEMALE SIGN -U+02642 ♂ \male, \mars MALE SIGN -U+02643 ♃ \jupiter JUPITER -U+02644 ♄ \saturn SATURN -U+02645 ♅ \uranus URANUS -U+02646 ♆ \neptune NEPTUNE -U+02647 ♇ \pluto PLUTO -U+02648 ♈ \aries, \:aries: ARIES -U+02649 ♉ \taurus, \:taurus: TAURUS -U+0264A ♊ \gemini, \:gemini: GEMINI -U+0264B ♋ \cancer, \:cancer: CANCER -U+0264C ♌ \leo, \:leo: LEO -U+0264D ♍ \virgo, \:virgo: VIRGO -U+0264E ♎ \libra, \:libra: LIBRA -U+0264F ♏ \scorpio, \:scorpius: SCORPIUS -U+02650 ♐ \sagittarius, \:sagittarius: SAGITTARIUS -U+02651 ♑ \capricornus, \:capricorn: CAPRICORN -U+02652 ♒ \aquarius, \:aquarius: AQUARIUS -U+02653 ♓ \pisces, \:pisces: PISCES -U+02660 ♠ \spadesuit, \:spades: BLACK SPADE SUIT -U+02661 ♡ \heartsuit WHITE HEART SUIT -U+02662 ♢ \diamondsuit WHITE DIAMOND SUIT -U+02663 ♣ \clubsuit, \:clubs: BLACK CLUB SUIT -U+02664 ♤ \varspadesuit WHITE SPADE SUIT -U+02665 ♥ \varheartsuit, \:hearts: BLACK HEART SUIT -U+02666 ♦ \vardiamondsuit, \:diamonds: BLACK DIAMOND SUIT -U+02667 ♧ \varclubsuit WHITE CLUB SUIT -U+02668 ♨ \:hotsprings: HOT SPRINGS -U+02669 ♩ \quarternote QUARTER NOTE -U+0266A ♪ \eighthnote EIGHTH NOTE -U+0266B ♫ \twonotes BEAMED EIGHTH NOTES / BARRED EIGHTH NOTES -U+0266D ♭ \flat MUSIC FLAT SIGN / FLAT -U+0266E ♮ \natural MUSIC NATURAL SIGN / NATURAL -U+0266F ♯ \sharp MUSIC SHARP SIGN / SHARP -U+0267B ♻ \:recycle: BLACK UNIVERSAL RECYCLING SYMBOL -U+0267E ♾ \acidfree PERMANENT PAPER SIGN -U+0267F ♿ \:wheelchair: WHEELCHAIR SYMBOL -U+02680 ⚀ \dicei DIE FACE-1 -U+02681 ⚁ \diceii DIE FACE-2 -U+02682 ⚂ \diceiii DIE FACE-3 -U+02683 ⚃ \diceiv DIE FACE-4 -U+02684 ⚄ \dicev DIE FACE-5 -U+02685 ⚅ \dicevi DIE FACE-6 -U+02686 ⚆ \circledrightdot WHITE CIRCLE WITH DOT RIGHT -U+02687 ⚇ \circledtwodots WHITE CIRCLE WITH TWO DOTS -U+02688 ⚈ \blackcircledrightdot BLACK CIRCLE WITH WHITE DOT RIGHT -U+02689 ⚉ \blackcircledtwodots BLACK CIRCLE WITH TWO WHITE DOTS -U+02693 ⚓ \:anchor: ANCHOR -U+026A0 ⚠ \:warning: WARNING SIGN -U+026A1 ⚡ \:zap: HIGH VOLTAGE SIGN -U+026A5 ⚥ \hermaphrodite MALE AND FEMALE SIGN -U+026AA ⚪ \mdwhtcircle, \:white_circle: MEDIUM WHITE CIRCLE -U+026AB ⚫ \mdblkcircle, \:black_circle: MEDIUM BLACK CIRCLE -U+026AC ⚬ \mdsmwhtcircle MEDIUM SMALL WHITE CIRCLE -U+026B2 ⚲ \neuter NEUTER -U+026BD ⚽ \:soccer: SOCCER BALL -U+026BE ⚾ \:baseball: BASEBALL -U+026C4 ⛄ \:snowman: SNOWMAN WITHOUT SNOW -U+026C5 ⛅ \:partly_sunny: SUN BEHIND CLOUD -U+026CE ⛎ \:ophiuchus: OPHIUCHUS -U+026D4 ⛔ \:no_entry: NO ENTRY -U+026EA ⛪ \:church: CHURCH -U+026F2 ⛲ \:fountain: FOUNTAIN -U+026F3 ⛳ \:golf: FLAG IN HOLE -U+026F5 ⛵ \:boat: SAILBOAT -U+026FA ⛺ \:tent: TENT -U+026FD ⛽ \:fuelpump: FUEL PUMP -U+02702 ✂ \:scissors: BLACK SCISSORS -U+02705 ✅ \:white_check_mark: WHITE HEAVY CHECK MARK -U+02708 ✈ \:airplane: AIRPLANE -U+02709 ✉ \:email: ENVELOPE -U+0270A ✊ \:fist: RAISED FIST -U+0270B ✋ \:hand: RAISED HAND -U+0270C ✌ \:v: VICTORY HAND -U+0270F ✏ \:pencil2: PENCIL -U+02712 ✒ \:black_nib: BLACK NIB -U+02713 ✓ \checkmark CHECK MARK -U+02714 ✔ \:heavy_check_mark: HEAVY CHECK MARK -U+02716 ✖ \:heavy_multiplication_x: HEAVY MULTIPLICATION X -U+02720 ✠ \maltese MALTESE CROSS -U+02728 ✨ \:sparkles: SPARKLES -U+0272A ✪ \circledstar CIRCLED WHITE STAR -U+02733 ✳ \:eight_spoked_asterisk: EIGHT SPOKED ASTERISK -U+02734 ✴ \:eight_pointed_black_star: EIGHT POINTED BLACK STAR -U+02736 ✶ \varstar SIX POINTED BLACK STAR -U+0273D ✽ \dingasterisk HEAVY TEARDROP-SPOKED ASTERISK -U+02744 ❄ \:snowflake: SNOWFLAKE -U+02747 ❇ \:sparkle: SPARKLE -U+0274C ❌ \:x: CROSS MARK -U+0274E ❎ \:negative_squared_cross_mark: NEGATIVE SQUARED CROSS MARK -U+02753 ❓ \:question: BLACK QUESTION MARK ORNAMENT -U+02754 ❔ \:grey_question: WHITE QUESTION MARK ORNAMENT -U+02755 ❕ \:grey_exclamation: WHITE EXCLAMATION MARK ORNAMENT -U+02757 ❗ \:exclamation: HEAVY EXCLAMATION MARK SYMBOL -U+02764 ❤ \:heart: HEAVY BLACK HEART -U+02795 ➕ \:heavy_plus_sign: HEAVY PLUS SIGN -U+02796 ➖ \:heavy_minus_sign: HEAVY MINUS SIGN -U+02797 ➗ \:heavy_division_sign: HEAVY DIVISION SIGN -U+0279B ➛ \draftingarrow DRAFTING POINT RIGHTWARDS ARROW / DRAFTING POINT RIGHT ARROW -U+027A1 ➡ \:arrow_right: BLACK RIGHTWARDS ARROW / BLACK RIGHT ARROW -U+027B0 ➰ \:curly_loop: CURLY LOOP -U+027BF ➿ \:loop: DOUBLE CURLY LOOP -U+027C0 ⟀ \threedangle THREE DIMENSIONAL ANGLE -U+027C1 ⟁ \whiteinwhitetriangle WHITE TRIANGLE CONTAINING SMALL WHITE TRIANGLE -U+027C2 ⟂ \perp PERPENDICULAR -U+027C8 ⟈ \bsolhsub REVERSE SOLIDUS PRECEDING SUBSET -U+027C9 ⟉ \suphsol SUPERSET PRECEDING SOLIDUS -U+027D1 ⟑ \wedgedot AND WITH DOT -U+027D2 ⟒ \upin ELEMENT OF OPENING UPWARDS -U+027D5 ⟕ \leftouterjoin LEFT OUTER JOIN -U+027D6 ⟖ \rightouterjoin RIGHT OUTER JOIN -U+027D7 ⟗ \fullouterjoin FULL OUTER JOIN -U+027D8 ⟘ \bigbot LARGE UP TACK -U+027D9 ⟙ \bigtop LARGE DOWN TACK -U+027E6 ⟦ \llbracket, \openbracketleft MATHEMATICAL LEFT WHITE SQUARE BRACKET -U+027E7 ⟧ \openbracketright, \rrbracket MATHEMATICAL RIGHT WHITE SQUARE BRACKET -U+027E8 ⟨ \langle MATHEMATICAL LEFT ANGLE BRACKET -U+027E9 ⟩ \rangle MATHEMATICAL RIGHT ANGLE BRACKET -U+027F0 ⟰ \UUparrow UPWARDS QUADRUPLE ARROW -U+027F1 ⟱ \DDownarrow DOWNWARDS QUADRUPLE ARROW -U+027F5 ⟵ \longleftarrow LONG LEFTWARDS ARROW -U+027F6 ⟶ \longrightarrow LONG RIGHTWARDS ARROW -U+027F7 ⟷ \longleftrightarrow LONG LEFT RIGHT ARROW -U+027F8 ⟸ \impliedby, \Longleftarrow LONG LEFTWARDS DOUBLE ARROW -U+027F9 ⟹ \implies, \Longrightarrow LONG RIGHTWARDS DOUBLE ARROW -U+027FA ⟺ \Longleftrightarrow, \iff LONG LEFT RIGHT DOUBLE ARROW -U+027FB ⟻ \longmapsfrom LONG LEFTWARDS ARROW FROM BAR -U+027FC ⟼ \longmapsto LONG RIGHTWARDS ARROW FROM BAR -U+027FD ⟽ \Longmapsfrom LONG LEFTWARDS DOUBLE ARROW FROM BAR -U+027FE ⟾ \Longmapsto LONG RIGHTWARDS DOUBLE ARROW FROM BAR -U+027FF ⟿ \longrightsquigarrow LONG RIGHTWARDS SQUIGGLE ARROW -U+02900 ⤀ \nvtwoheadrightarrow RIGHTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE -U+02901 ⤁ \nVtwoheadrightarrow RIGHTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE -U+02902 ⤂ \nvLeftarrow LEFTWARDS DOUBLE ARROW WITH VERTICAL STROKE -U+02903 ⤃ \nvRightarrow RIGHTWARDS DOUBLE ARROW WITH VERTICAL STROKE -U+02904 ⤄ \nvLeftrightarrow LEFT RIGHT DOUBLE ARROW WITH VERTICAL STROKE -U+02905 ⤅ \twoheadmapsto RIGHTWARDS TWO-HEADED ARROW FROM BAR -U+02906 ⤆ \Mapsfrom LEFTWARDS DOUBLE ARROW FROM BAR -U+02907 ⤇ \Mapsto RIGHTWARDS DOUBLE ARROW FROM BAR -U+02908 ⤈ \downarrowbarred DOWNWARDS ARROW WITH HORIZONTAL STROKE -U+02909 ⤉ \uparrowbarred UPWARDS ARROW WITH HORIZONTAL STROKE -U+0290A ⤊ \Uuparrow UPWARDS TRIPLE ARROW -U+0290B ⤋ \Ddownarrow DOWNWARDS TRIPLE ARROW -U+0290C ⤌ \leftbkarrow LEFTWARDS DOUBLE DASH ARROW -U+0290D ⤍ \bkarow RIGHTWARDS DOUBLE DASH ARROW -U+0290E ⤎ \leftdbkarrow LEFTWARDS TRIPLE DASH ARROW -U+0290F ⤏ \dbkarow RIGHTWARDS TRIPLE DASH ARROW -U+02910 ⤐ \drbkarrow RIGHTWARDS TWO-HEADED TRIPLE DASH ARROW -U+02911 ⤑ \rightdotarrow RIGHTWARDS ARROW WITH DOTTED STEM -U+02912 ⤒ \UpArrowBar UPWARDS ARROW TO BAR -U+02913 ⤓ \DownArrowBar DOWNWARDS ARROW TO BAR -U+02914 ⤔ \nvrightarrowtail RIGHTWARDS ARROW WITH TAIL WITH VERTICAL STROKE -U+02915 ⤕ \nVrightarrowtail RIGHTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE -U+02916 ⤖ \twoheadrightarrowtail RIGHTWARDS TWO-HEADED ARROW WITH TAIL -U+02917 ⤗ \nvtwoheadrightarrowtail RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE -U+02918 ⤘ \nVtwoheadrightarrowtail RIGHTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE -U+0291D ⤝ \diamondleftarrow LEFTWARDS ARROW TO BLACK DIAMOND -U+0291E ⤞ \rightarrowdiamond RIGHTWARDS ARROW TO BLACK DIAMOND -U+0291F ⤟ \diamondleftarrowbar LEFTWARDS ARROW FROM BAR TO BLACK DIAMOND -U+02920 ⤠ \barrightarrowdiamond RIGHTWARDS ARROW FROM BAR TO BLACK DIAMOND -U+02925 ⤥ \hksearow SOUTH EAST ARROW WITH HOOK -U+02926 ⤦ \hkswarow SOUTH WEST ARROW WITH HOOK -U+02927 ⤧ \tona NORTH WEST ARROW AND NORTH EAST ARROW -U+02928 ⤨ \toea NORTH EAST ARROW AND SOUTH EAST ARROW -U+02929 ⤩ \tosa SOUTH EAST ARROW AND SOUTH WEST ARROW -U+0292A ⤪ \towa SOUTH WEST ARROW AND NORTH WEST ARROW -U+0292B ⤫ \rdiagovfdiag RISING DIAGONAL CROSSING FALLING DIAGONAL -U+0292C ⤬ \fdiagovrdiag FALLING DIAGONAL CROSSING RISING DIAGONAL -U+0292D ⤭ \seovnearrow SOUTH EAST ARROW CROSSING NORTH EAST ARROW -U+0292E ⤮ \neovsearrow NORTH EAST ARROW CROSSING SOUTH EAST ARROW -U+0292F ⤯ \fdiagovnearrow FALLING DIAGONAL CROSSING NORTH EAST ARROW -U+02930 ⤰ \rdiagovsearrow RISING DIAGONAL CROSSING SOUTH EAST ARROW -U+02931 ⤱ \neovnwarrow NORTH EAST ARROW CROSSING NORTH WEST ARROW -U+02932 ⤲ \nwovnearrow NORTH WEST ARROW CROSSING NORTH EAST ARROW -U+02934 ⤴ \:arrow_heading_up: ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS -U+02935 ⤵ \:arrow_heading_down: ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS -U+02942 ⥂ \Rlarr RIGHTWARDS ARROW ABOVE SHORT LEFTWARDS ARROW -U+02944 ⥄ \rLarr SHORT RIGHTWARDS ARROW ABOVE LEFTWARDS ARROW -U+02945 ⥅ \rightarrowplus RIGHTWARDS ARROW WITH PLUS BELOW -U+02946 ⥆ \leftarrowplus LEFTWARDS ARROW WITH PLUS BELOW -U+02947 ⥇ \rarrx RIGHTWARDS ARROW THROUGH X -U+02948 ⥈ \leftrightarrowcircle LEFT RIGHT ARROW THROUGH SMALL CIRCLE -U+02949 ⥉ \twoheaduparrowcircle UPWARDS TWO-HEADED ARROW FROM SMALL CIRCLE -U+0294A ⥊ \leftrightharpoonupdown LEFT BARB UP RIGHT BARB DOWN HARPOON -U+0294B ⥋ \leftrightharpoondownup LEFT BARB DOWN RIGHT BARB UP HARPOON -U+0294C ⥌ \updownharpoonrightleft UP BARB RIGHT DOWN BARB LEFT HARPOON -U+0294D ⥍ \updownharpoonleftright UP BARB LEFT DOWN BARB RIGHT HARPOON -U+0294E ⥎ \LeftRightVector LEFT BARB UP RIGHT BARB UP HARPOON -U+0294F ⥏ \RightUpDownVector UP BARB RIGHT DOWN BARB RIGHT HARPOON -U+02950 ⥐ \DownLeftRightVector LEFT BARB DOWN RIGHT BARB DOWN HARPOON -U+02951 ⥑ \LeftUpDownVector UP BARB LEFT DOWN BARB LEFT HARPOON -U+02952 ⥒ \LeftVectorBar LEFTWARDS HARPOON WITH BARB UP TO BAR -U+02953 ⥓ \RightVectorBar RIGHTWARDS HARPOON WITH BARB UP TO BAR -U+02954 ⥔ \RightUpVectorBar UPWARDS HARPOON WITH BARB RIGHT TO BAR -U+02955 ⥕ \RightDownVectorBar DOWNWARDS HARPOON WITH BARB RIGHT TO BAR -U+02956 ⥖ \DownLeftVectorBar LEFTWARDS HARPOON WITH BARB DOWN TO BAR -U+02957 ⥗ \DownRightVectorBar RIGHTWARDS HARPOON WITH BARB DOWN TO BAR -U+02958 ⥘ \LeftUpVectorBar UPWARDS HARPOON WITH BARB LEFT TO BAR -U+02959 ⥙ \LeftDownVectorBar DOWNWARDS HARPOON WITH BARB LEFT TO BAR -U+0295A ⥚ \LeftTeeVector LEFTWARDS HARPOON WITH BARB UP FROM BAR -U+0295B ⥛ \RightTeeVector RIGHTWARDS HARPOON WITH BARB UP FROM BAR -U+0295C ⥜ \RightUpTeeVector UPWARDS HARPOON WITH BARB RIGHT FROM BAR -U+0295D ⥝ \RightDownTeeVector DOWNWARDS HARPOON WITH BARB RIGHT FROM BAR -U+0295E ⥞ \DownLeftTeeVector LEFTWARDS HARPOON WITH BARB DOWN FROM BAR -U+0295F ⥟ \DownRightTeeVector RIGHTWARDS HARPOON WITH BARB DOWN FROM BAR -U+02960 ⥠ \LeftUpTeeVector UPWARDS HARPOON WITH BARB LEFT FROM BAR -U+02961 ⥡ \LeftDownTeeVector DOWNWARDS HARPOON WITH BARB LEFT FROM BAR -U+02962 ⥢ \leftharpoonsupdown LEFTWARDS HARPOON WITH BARB UP ABOVE LEFTWARDS HARPOON WITH BARB DOWN -U+02963 ⥣ \upharpoonsleftright UPWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT -U+02964 ⥤ \rightharpoonsupdown RIGHTWARDS HARPOON WITH BARB UP ABOVE RIGHTWARDS HARPOON WITH BARB DOWN -U+02965 ⥥ \downharpoonsleftright DOWNWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT -U+02966 ⥦ \leftrightharpoonsup LEFTWARDS HARPOON WITH BARB UP ABOVE RIGHTWARDS HARPOON WITH BARB UP -U+02967 ⥧ \leftrightharpoonsdown LEFTWARDS HARPOON WITH BARB DOWN ABOVE RIGHTWARDS HARPOON WITH BARB DOWN -U+02968 ⥨ \rightleftharpoonsup RIGHTWARDS HARPOON WITH BARB UP ABOVE LEFTWARDS HARPOON WITH BARB UP -U+02969 ⥩ \rightleftharpoonsdown RIGHTWARDS HARPOON WITH BARB DOWN ABOVE LEFTWARDS HARPOON WITH BARB DOWN -U+0296A ⥪ \leftharpoonupdash LEFTWARDS HARPOON WITH BARB UP ABOVE LONG DASH -U+0296B ⥫ \dashleftharpoondown LEFTWARDS HARPOON WITH BARB DOWN BELOW LONG DASH -U+0296C ⥬ \rightharpoonupdash RIGHTWARDS HARPOON WITH BARB UP ABOVE LONG DASH -U+0296D ⥭ \dashrightharpoondown RIGHTWARDS HARPOON WITH BARB DOWN BELOW LONG DASH -U+0296E ⥮ \UpEquilibrium UPWARDS HARPOON WITH BARB LEFT BESIDE DOWNWARDS HARPOON WITH BARB RIGHT -U+0296F ⥯ \ReverseUpEquilibrium DOWNWARDS HARPOON WITH BARB LEFT BESIDE UPWARDS HARPOON WITH BARB RIGHT -U+02970 ⥰ \RoundImplies RIGHT DOUBLE ARROW WITH ROUNDED HEAD -U+02980 ⦀ \Vvert TRIPLE VERTICAL BAR DELIMITER -U+02986 ⦆ \Elroang RIGHT WHITE PARENTHESIS -U+02999 ⦙ \ddfnc DOTTED FENCE -U+0299B ⦛ \measuredangleleft MEASURED ANGLE OPENING LEFT -U+0299C ⦜ \Angle RIGHT ANGLE VARIANT WITH SQUARE -U+0299D ⦝ \rightanglemdot MEASURED RIGHT ANGLE WITH DOT -U+0299E ⦞ \angles ANGLE WITH S INSIDE -U+0299F ⦟ \angdnr ACUTE ANGLE -U+029A0 ⦠ \lpargt SPHERICAL ANGLE OPENING LEFT -U+029A1 ⦡ \sphericalangleup SPHERICAL ANGLE OPENING UP -U+029A2 ⦢ \turnangle TURNED ANGLE -U+029A3 ⦣ \revangle REVERSED ANGLE -U+029A4 ⦤ \angleubar ANGLE WITH UNDERBAR -U+029A5 ⦥ \revangleubar REVERSED ANGLE WITH UNDERBAR -U+029A6 ⦦ \wideangledown OBLIQUE ANGLE OPENING UP -U+029A7 ⦧ \wideangleup OBLIQUE ANGLE OPENING DOWN -U+029A8 ⦨ \measanglerutone MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING UP AND RIGHT -U+029A9 ⦩ \measanglelutonw MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING UP AND LEFT -U+029AA ⦪ \measanglerdtose MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING DOWN AND RIGHT -U+029AB ⦫ \measangleldtosw MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING DOWN AND LEFT -U+029AC ⦬ \measangleurtone MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING RIGHT AND UP -U+029AD ⦭ \measangleultonw MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING LEFT AND UP -U+029AE ⦮ \measangledrtose MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING RIGHT AND DOWN -U+029AF ⦯ \measangledltosw MEASURED ANGLE WITH OPEN ARM ENDING IN ARROW POINTING LEFT AND DOWN -U+029B0 ⦰ \revemptyset REVERSED EMPTY SET -U+029B1 ⦱ \emptysetobar EMPTY SET WITH OVERBAR -U+029B2 ⦲ \emptysetocirc EMPTY SET WITH SMALL CIRCLE ABOVE -U+029B3 ⦳ \emptysetoarr EMPTY SET WITH RIGHT ARROW ABOVE -U+029B4 ⦴ \emptysetoarrl EMPTY SET WITH LEFT ARROW ABOVE -U+029B7 ⦷ \circledparallel CIRCLED PARALLEL -U+029B8 ⦸ \obslash CIRCLED REVERSE SOLIDUS -U+029BC ⦼ \odotslashdot CIRCLED ANTICLOCKWISE-ROTATED DIVISION SIGN -U+029BE ⦾ \circledwhitebullet CIRCLED WHITE BULLET -U+029BF ⦿ \circledbullet CIRCLED BULLET -U+029C0 ⧀ \olessthan CIRCLED LESS-THAN -U+029C1 ⧁ \ogreaterthan CIRCLED GREATER-THAN -U+029C4 ⧄ \boxdiag SQUARED RISING DIAGONAL SLASH -U+029C5 ⧅ \boxbslash SQUARED FALLING DIAGONAL SLASH -U+029C6 ⧆ \boxast SQUARED ASTERISK -U+029C7 ⧇ \boxcircle SQUARED SMALL CIRCLE -U+029CA ⧊ \Lap TRIANGLE WITH DOT ABOVE -U+029CB ⧋ \defas TRIANGLE WITH UNDERBAR -U+029CF ⧏ \LeftTriangleBar LEFT TRIANGLE BESIDE VERTICAL BAR -U+029CF + U+00338 ⧏̸ \NotLeftTriangleBar LEFT TRIANGLE BESIDE VERTICAL BAR + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+029D0 ⧐ \RightTriangleBar VERTICAL BAR BESIDE RIGHT TRIANGLE -U+029D0 + U+00338 ⧐̸ \NotRightTriangleBar VERTICAL BAR BESIDE RIGHT TRIANGLE + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+029DF ⧟ \dualmap DOUBLE-ENDED MULTIMAP -U+029E1 ⧡ \lrtriangleeq INCREASES AS -U+029E2 ⧢ \shuffle SHUFFLE PRODUCT -U+029E3 ⧣ \eparsl EQUALS SIGN AND SLANTED PARALLEL -U+029E4 ⧤ \smeparsl EQUALS SIGN AND SLANTED PARALLEL WITH TILDE ABOVE -U+029E5 ⧥ \eqvparsl IDENTICAL TO AND SLANTED PARALLEL -U+029EB ⧫ \blacklozenge BLACK LOZENGE -U+029F4 ⧴ \RuleDelayed RULE-DELAYED -U+029F6 ⧶ \dsol SOLIDUS WITH OVERBAR -U+029F7 ⧷ \rsolbar REVERSE SOLIDUS WITH HORIZONTAL STROKE -U+029FA ⧺ \doubleplus DOUBLE PLUS -U+029FB ⧻ \tripleplus TRIPLE PLUS -U+02A00 ⨀ \bigodot N-ARY CIRCLED DOT OPERATOR -U+02A01 ⨁ \bigoplus N-ARY CIRCLED PLUS OPERATOR -U+02A02 ⨂ \bigotimes N-ARY CIRCLED TIMES OPERATOR -U+02A03 ⨃ \bigcupdot N-ARY UNION OPERATOR WITH DOT -U+02A04 ⨄ \biguplus N-ARY UNION OPERATOR WITH PLUS -U+02A05 ⨅ \bigsqcap N-ARY SQUARE INTERSECTION OPERATOR -U+02A06 ⨆ \bigsqcup N-ARY SQUARE UNION OPERATOR -U+02A07 ⨇ \conjquant TWO LOGICAL AND OPERATOR -U+02A08 ⨈ \disjquant TWO LOGICAL OR OPERATOR -U+02A09 ⨉ \bigtimes N-ARY TIMES OPERATOR -U+02A0A ⨊ \modtwosum MODULO TWO SUM -U+02A0B ⨋ \sumint SUMMATION WITH INTEGRAL -U+02A0C ⨌ \iiiint QUADRUPLE INTEGRAL OPERATOR -U+02A0D ⨍ \intbar FINITE PART INTEGRAL -U+02A0E ⨎ \intBar INTEGRAL WITH DOUBLE STROKE -U+02A0F ⨏ \clockoint INTEGRAL AVERAGE WITH SLASH -U+02A10 ⨐ \cirfnint CIRCULATION FUNCTION -U+02A11 ⨑ \awint ANTICLOCKWISE INTEGRATION -U+02A12 ⨒ \rppolint LINE INTEGRATION WITH RECTANGULAR PATH AROUND POLE -U+02A13 ⨓ \scpolint LINE INTEGRATION WITH SEMICIRCULAR PATH AROUND POLE -U+02A14 ⨔ \npolint LINE INTEGRATION NOT INCLUDING THE POLE -U+02A15 ⨕ \pointint INTEGRAL AROUND A POINT OPERATOR -U+02A16 ⨖ \sqrint QUATERNION INTEGRAL OPERATOR -U+02A18 ⨘ \intx INTEGRAL WITH TIMES SIGN -U+02A19 ⨙ \intcap INTEGRAL WITH INTERSECTION -U+02A1A ⨚ \intcup INTEGRAL WITH UNION -U+02A1B ⨛ \upint INTEGRAL WITH OVERBAR -U+02A1C ⨜ \lowint INTEGRAL WITH UNDERBAR -U+02A1D ⨝ \Join, \join JOIN -U+02A22 ⨢ \ringplus PLUS SIGN WITH SMALL CIRCLE ABOVE -U+02A23 ⨣ \plushat PLUS SIGN WITH CIRCUMFLEX ACCENT ABOVE -U+02A24 ⨤ \simplus PLUS SIGN WITH TILDE ABOVE -U+02A25 ⨥ \plusdot PLUS SIGN WITH DOT BELOW -U+02A26 ⨦ \plussim PLUS SIGN WITH TILDE BELOW -U+02A27 ⨧ \plussubtwo PLUS SIGN WITH SUBSCRIPT TWO -U+02A28 ⨨ \plustrif PLUS SIGN WITH BLACK TRIANGLE -U+02A29 ⨩ \commaminus MINUS SIGN WITH COMMA ABOVE -U+02A2A ⨪ \minusdot MINUS SIGN WITH DOT BELOW -U+02A2B ⨫ \minusfdots MINUS SIGN WITH FALLING DOTS -U+02A2C ⨬ \minusrdots MINUS SIGN WITH RISING DOTS -U+02A2D ⨭ \opluslhrim PLUS SIGN IN LEFT HALF CIRCLE -U+02A2E ⨮ \oplusrhrim PLUS SIGN IN RIGHT HALF CIRCLE -U+02A2F ⨯ \Times VECTOR OR CROSS PRODUCT -U+02A30 ⨰ \dottimes MULTIPLICATION SIGN WITH DOT ABOVE -U+02A31 ⨱ \timesbar MULTIPLICATION SIGN WITH UNDERBAR -U+02A32 ⨲ \btimes SEMIDIRECT PRODUCT WITH BOTTOM CLOSED -U+02A33 ⨳ \smashtimes SMASH PRODUCT -U+02A34 ⨴ \otimeslhrim MULTIPLICATION SIGN IN LEFT HALF CIRCLE -U+02A35 ⨵ \otimesrhrim MULTIPLICATION SIGN IN RIGHT HALF CIRCLE -U+02A36 ⨶ \otimeshat CIRCLED MULTIPLICATION SIGN WITH CIRCUMFLEX ACCENT -U+02A37 ⨷ \Otimes MULTIPLICATION SIGN IN DOUBLE CIRCLE -U+02A38 ⨸ \odiv CIRCLED DIVISION SIGN -U+02A39 ⨹ \triangleplus PLUS SIGN IN TRIANGLE -U+02A3A ⨺ \triangleminus MINUS SIGN IN TRIANGLE -U+02A3B ⨻ \triangletimes MULTIPLICATION SIGN IN TRIANGLE -U+02A3C ⨼ \intprod INTERIOR PRODUCT -U+02A3D ⨽ \intprodr RIGHTHAND INTERIOR PRODUCT -U+02A3F ⨿ \amalg AMALGAMATION OR COPRODUCT -U+02A40 ⩀ \capdot INTERSECTION WITH DOT -U+02A41 ⩁ \uminus UNION WITH MINUS SIGN -U+02A42 ⩂ \barcup UNION WITH OVERBAR -U+02A43 ⩃ \barcap INTERSECTION WITH OVERBAR -U+02A44 ⩄ \capwedge INTERSECTION WITH LOGICAL AND -U+02A45 ⩅ \cupvee UNION WITH LOGICAL OR -U+02A4A ⩊ \twocups UNION BESIDE AND JOINED WITH UNION -U+02A4B ⩋ \twocaps INTERSECTION BESIDE AND JOINED WITH INTERSECTION -U+02A4C ⩌ \closedvarcup CLOSED UNION WITH SERIFS -U+02A4D ⩍ \closedvarcap CLOSED INTERSECTION WITH SERIFS -U+02A4E ⩎ \Sqcap DOUBLE SQUARE INTERSECTION -U+02A4F ⩏ \Sqcup DOUBLE SQUARE UNION -U+02A50 ⩐ \closedvarcupsmashprod CLOSED UNION WITH SERIFS AND SMASH PRODUCT -U+02A51 ⩑ \wedgeodot LOGICAL AND WITH DOT ABOVE -U+02A52 ⩒ \veeodot LOGICAL OR WITH DOT ABOVE -U+02A53 ⩓ \And DOUBLE LOGICAL AND -U+02A54 ⩔ \Or DOUBLE LOGICAL OR -U+02A55 ⩕ \wedgeonwedge TWO INTERSECTING LOGICAL AND -U+02A56 ⩖ \ElOr TWO INTERSECTING LOGICAL OR -U+02A57 ⩗ \bigslopedvee SLOPING LARGE OR -U+02A58 ⩘ \bigslopedwedge SLOPING LARGE AND -U+02A5A ⩚ \wedgemidvert LOGICAL AND WITH MIDDLE STEM -U+02A5B ⩛ \veemidvert LOGICAL OR WITH MIDDLE STEM -U+02A5C ⩜ \midbarwedge LOGICAL AND WITH HORIZONTAL DASH -U+02A5D ⩝ \midbarvee LOGICAL OR WITH HORIZONTAL DASH -U+02A5E ⩞ \perspcorrespond LOGICAL AND WITH DOUBLE OVERBAR -U+02A5F ⩟ \minhat LOGICAL AND WITH UNDERBAR -U+02A60 ⩠ \wedgedoublebar LOGICAL AND WITH DOUBLE UNDERBAR -U+02A61 ⩡ \varveebar SMALL VEE WITH UNDERBAR -U+02A62 ⩢ \doublebarvee LOGICAL OR WITH DOUBLE OVERBAR -U+02A63 ⩣ \veedoublebar LOGICAL OR WITH DOUBLE UNDERBAR -U+02A66 ⩦ \eqdot EQUALS SIGN WITH DOT BELOW -U+02A67 ⩧ \dotequiv IDENTICAL WITH DOT ABOVE -U+02A6A ⩪ \dotsim TILDE OPERATOR WITH DOT ABOVE -U+02A6B ⩫ \simrdots TILDE OPERATOR WITH RISING DOTS -U+02A6C ⩬ \simminussim SIMILAR MINUS SIMILAR -U+02A6D ⩭ \congdot CONGRUENT WITH DOT ABOVE -U+02A6E ⩮ \asteq EQUALS WITH ASTERISK -U+02A6F ⩯ \hatapprox ALMOST EQUAL TO WITH CIRCUMFLEX ACCENT -U+02A70 ⩰ \approxeqq APPROXIMATELY EQUAL OR EQUAL TO -U+02A71 ⩱ \eqqplus EQUALS SIGN ABOVE PLUS SIGN -U+02A72 ⩲ \pluseqq PLUS SIGN ABOVE EQUALS SIGN -U+02A73 ⩳ \eqqsim EQUALS SIGN ABOVE TILDE OPERATOR -U+02A74 ⩴ \Coloneq DOUBLE COLON EQUAL -U+02A75 ⩵ \Equal TWO CONSECUTIVE EQUALS SIGNS -U+02A76 ⩶ \eqeqeq THREE CONSECUTIVE EQUALS SIGNS -U+02A77 ⩷ \ddotseq EQUALS SIGN WITH TWO DOTS ABOVE AND TWO DOTS BELOW -U+02A78 ⩸ \equivDD EQUIVALENT WITH FOUR DOTS ABOVE -U+02A79 ⩹ \ltcir LESS-THAN WITH CIRCLE INSIDE -U+02A7A ⩺ \gtcir GREATER-THAN WITH CIRCLE INSIDE -U+02A7B ⩻ \ltquest LESS-THAN WITH QUESTION MARK ABOVE -U+02A7C ⩼ \gtquest GREATER-THAN WITH QUESTION MARK ABOVE -U+02A7D ⩽ \leqslant LESS-THAN OR SLANTED EQUAL TO -U+02A7D + U+00338 ⩽̸ \nleqslant LESS-THAN OR SLANTED EQUAL TO + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02A7E ⩾ \geqslant GREATER-THAN OR SLANTED EQUAL TO -U+02A7E + U+00338 ⩾̸ \ngeqslant GREATER-THAN OR SLANTED EQUAL TO + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02A7F ⩿ \lesdot LESS-THAN OR SLANTED EQUAL TO WITH DOT INSIDE -U+02A80 ⪀ \gesdot GREATER-THAN OR SLANTED EQUAL TO WITH DOT INSIDE -U+02A81 ⪁ \lesdoto LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE -U+02A82 ⪂ \gesdoto GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE -U+02A83 ⪃ \lesdotor LESS-THAN OR SLANTED EQUAL TO WITH DOT ABOVE RIGHT -U+02A84 ⪄ \gesdotol GREATER-THAN OR SLANTED EQUAL TO WITH DOT ABOVE LEFT -U+02A85 ⪅ \lessapprox LESS-THAN OR APPROXIMATE -U+02A86 ⪆ \gtrapprox GREATER-THAN OR APPROXIMATE -U+02A87 ⪇ \lneq LESS-THAN AND SINGLE-LINE NOT EQUAL TO -U+02A88 ⪈ \gneq GREATER-THAN AND SINGLE-LINE NOT EQUAL TO -U+02A89 ⪉ \lnapprox LESS-THAN AND NOT APPROXIMATE -U+02A8A ⪊ \gnapprox GREATER-THAN AND NOT APPROXIMATE -U+02A8B ⪋ \lesseqqgtr LESS-THAN ABOVE DOUBLE-LINE EQUAL ABOVE GREATER-THAN -U+02A8C ⪌ \gtreqqless GREATER-THAN ABOVE DOUBLE-LINE EQUAL ABOVE LESS-THAN -U+02A8D ⪍ \lsime LESS-THAN ABOVE SIMILAR OR EQUAL -U+02A8E ⪎ \gsime GREATER-THAN ABOVE SIMILAR OR EQUAL -U+02A8F ⪏ \lsimg LESS-THAN ABOVE SIMILAR ABOVE GREATER-THAN -U+02A90 ⪐ \gsiml GREATER-THAN ABOVE SIMILAR ABOVE LESS-THAN -U+02A91 ⪑ \lgE LESS-THAN ABOVE GREATER-THAN ABOVE DOUBLE-LINE EQUAL -U+02A92 ⪒ \glE GREATER-THAN ABOVE LESS-THAN ABOVE DOUBLE-LINE EQUAL -U+02A93 ⪓ \lesges LESS-THAN ABOVE SLANTED EQUAL ABOVE GREATER-THAN ABOVE SLANTED EQUAL -U+02A94 ⪔ \gesles GREATER-THAN ABOVE SLANTED EQUAL ABOVE LESS-THAN ABOVE SLANTED EQUAL -U+02A95 ⪕ \eqslantless SLANTED EQUAL TO OR LESS-THAN -U+02A96 ⪖ \eqslantgtr SLANTED EQUAL TO OR GREATER-THAN -U+02A97 ⪗ \elsdot SLANTED EQUAL TO OR LESS-THAN WITH DOT INSIDE -U+02A98 ⪘ \egsdot SLANTED EQUAL TO OR GREATER-THAN WITH DOT INSIDE -U+02A99 ⪙ \eqqless DOUBLE-LINE EQUAL TO OR LESS-THAN -U+02A9A ⪚ \eqqgtr DOUBLE-LINE EQUAL TO OR GREATER-THAN -U+02A9B ⪛ \eqqslantless DOUBLE-LINE SLANTED EQUAL TO OR LESS-THAN -U+02A9C ⪜ \eqqslantgtr DOUBLE-LINE SLANTED EQUAL TO OR GREATER-THAN -U+02A9D ⪝ \simless SIMILAR OR LESS-THAN -U+02A9E ⪞ \simgtr SIMILAR OR GREATER-THAN -U+02A9F ⪟ \simlE SIMILAR ABOVE LESS-THAN ABOVE EQUALS SIGN -U+02AA0 ⪠ \simgE SIMILAR ABOVE GREATER-THAN ABOVE EQUALS SIGN -U+02AA1 ⪡ \NestedLessLess DOUBLE NESTED LESS-THAN -U+02AA1 + U+00338 ⪡̸ \NotNestedLessLess DOUBLE NESTED LESS-THAN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AA2 ⪢ \NestedGreaterGreater DOUBLE NESTED GREATER-THAN -U+02AA2 + U+00338 ⪢̸ \NotNestedGreaterGreater DOUBLE NESTED GREATER-THAN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AA3 ⪣ \partialmeetcontraction DOUBLE NESTED LESS-THAN WITH UNDERBAR -U+02AA4 ⪤ \glj GREATER-THAN OVERLAPPING LESS-THAN -U+02AA5 ⪥ \gla GREATER-THAN BESIDE LESS-THAN -U+02AA6 ⪦ \ltcc LESS-THAN CLOSED BY CURVE -U+02AA7 ⪧ \gtcc GREATER-THAN CLOSED BY CURVE -U+02AA8 ⪨ \lescc LESS-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL -U+02AA9 ⪩ \gescc GREATER-THAN CLOSED BY CURVE ABOVE SLANTED EQUAL -U+02AAA ⪪ \smt SMALLER THAN -U+02AAB ⪫ \lat LARGER THAN -U+02AAC ⪬ \smte SMALLER THAN OR EQUAL TO -U+02AAD ⪭ \late LARGER THAN OR EQUAL TO -U+02AAE ⪮ \bumpeqq EQUALS SIGN WITH BUMPY ABOVE -U+02AAF ⪯ \preceq PRECEDES ABOVE SINGLE-LINE EQUALS SIGN -U+02AAF + U+00338 ⪯̸ \npreceq PRECEDES ABOVE SINGLE-LINE EQUALS SIGN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AB0 ⪰ \succeq SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN -U+02AB0 + U+00338 ⪰̸ \nsucceq SUCCEEDS ABOVE SINGLE-LINE EQUALS SIGN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AB1 ⪱ \precneq PRECEDES ABOVE SINGLE-LINE NOT EQUAL TO -U+02AB2 ⪲ \succneq SUCCEEDS ABOVE SINGLE-LINE NOT EQUAL TO -U+02AB3 ⪳ \preceqq PRECEDES ABOVE EQUALS SIGN -U+02AB4 ⪴ \succeqq SUCCEEDS ABOVE EQUALS SIGN -U+02AB5 ⪵ \precneqq PRECEDES ABOVE NOT EQUAL TO -U+02AB6 ⪶ \succneqq SUCCEEDS ABOVE NOT EQUAL TO -U+02AB7 ⪷ \precapprox PRECEDES ABOVE ALMOST EQUAL TO -U+02AB8 ⪸ \succapprox SUCCEEDS ABOVE ALMOST EQUAL TO -U+02AB9 ⪹ \precnapprox PRECEDES ABOVE NOT ALMOST EQUAL TO -U+02ABA ⪺ \succnapprox SUCCEEDS ABOVE NOT ALMOST EQUAL TO -U+02ABB ⪻ \Prec DOUBLE PRECEDES -U+02ABC ⪼ \Succ DOUBLE SUCCEEDS -U+02ABD ⪽ \subsetdot SUBSET WITH DOT -U+02ABE ⪾ \supsetdot SUPERSET WITH DOT -U+02ABF ⪿ \subsetplus SUBSET WITH PLUS SIGN BELOW -U+02AC0 ⫀ \supsetplus SUPERSET WITH PLUS SIGN BELOW -U+02AC1 ⫁ \submult SUBSET WITH MULTIPLICATION SIGN BELOW -U+02AC2 ⫂ \supmult SUPERSET WITH MULTIPLICATION SIGN BELOW -U+02AC3 ⫃ \subedot SUBSET OF OR EQUAL TO WITH DOT ABOVE -U+02AC4 ⫄ \supedot SUPERSET OF OR EQUAL TO WITH DOT ABOVE -U+02AC5 ⫅ \subseteqq SUBSET OF ABOVE EQUALS SIGN -U+02AC5 + U+00338 ⫅̸ \nsubseteqq SUBSET OF ABOVE EQUALS SIGN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AC6 ⫆ \supseteqq SUPERSET OF ABOVE EQUALS SIGN -U+02AC6 + U+00338 ⫆̸ \nsupseteqq SUPERSET OF ABOVE EQUALS SIGN + COMBINING LONG SOLIDUS OVERLAY / NON-SPACING LONG SLASH OVERLAY -U+02AC7 ⫇ \subsim SUBSET OF ABOVE TILDE OPERATOR -U+02AC8 ⫈ \supsim SUPERSET OF ABOVE TILDE OPERATOR -U+02AC9 ⫉ \subsetapprox SUBSET OF ABOVE ALMOST EQUAL TO -U+02ACA ⫊ \supsetapprox SUPERSET OF ABOVE ALMOST EQUAL TO -U+02ACB ⫋ \subsetneqq SUBSET OF ABOVE NOT EQUAL TO -U+02ACC ⫌ \supsetneqq SUPERSET OF ABOVE NOT EQUAL TO -U+02ACD ⫍ \lsqhook SQUARE LEFT OPEN BOX OPERATOR -U+02ACE ⫎ \rsqhook SQUARE RIGHT OPEN BOX OPERATOR -U+02ACF ⫏ \csub CLOSED SUBSET -U+02AD0 ⫐ \csup CLOSED SUPERSET -U+02AD1 ⫑ \csube CLOSED SUBSET OR EQUAL TO -U+02AD2 ⫒ \csupe CLOSED SUPERSET OR EQUAL TO -U+02AD3 ⫓ \subsup SUBSET ABOVE SUPERSET -U+02AD4 ⫔ \supsub SUPERSET ABOVE SUBSET -U+02AD5 ⫕ \subsub SUBSET ABOVE SUBSET -U+02AD6 ⫖ \supsup SUPERSET ABOVE SUPERSET -U+02AD7 ⫗ \suphsub SUPERSET BESIDE SUBSET -U+02AD8 ⫘ \supdsub SUPERSET BESIDE AND JOINED BY DASH WITH SUBSET -U+02AD9 ⫙ \forkv ELEMENT OF OPENING DOWNWARDS -U+02ADB ⫛ \mlcp TRANSVERSAL INTERSECTION -U+02ADC ⫝̸ \forks FORKING -U+02ADD ⫝ \forksnot NONFORKING -U+02AE3 ⫣ \dashV DOUBLE VERTICAL BAR LEFT TURNSTILE -U+02AE4 ⫤ \Dashv VERTICAL BAR DOUBLE LEFT TURNSTILE -U+02AF4 ⫴ \interleave TRIPLE VERTICAL BAR BINARY RELATION -U+02AF6 ⫶ \tdcol TRIPLE COLON OPERATOR -U+02AF7 ⫷ \lllnest TRIPLE NESTED LESS-THAN -U+02AF8 ⫸ \gggnest TRIPLE NESTED GREATER-THAN -U+02AF9 ⫹ \leqqslant DOUBLE-LINE SLANTED LESS-THAN OR EQUAL TO -U+02AFA ⫺ \geqqslant DOUBLE-LINE SLANTED GREATER-THAN OR EQUAL TO -U+02B05 ⬅ \:arrow_left: LEFTWARDS BLACK ARROW -U+02B06 ⬆ \:arrow_up: UPWARDS BLACK ARROW -U+02B07 ⬇ \:arrow_down: DOWNWARDS BLACK ARROW -U+02B12 ⬒ \squaretopblack SQUARE WITH TOP HALF BLACK -U+02B13 ⬓ \squarebotblack SQUARE WITH BOTTOM HALF BLACK -U+02B14 ⬔ \squareurblack SQUARE WITH UPPER RIGHT DIAGONAL HALF BLACK -U+02B15 ⬕ \squarellblack SQUARE WITH LOWER LEFT DIAGONAL HALF BLACK -U+02B16 ⬖ \diamondleftblack DIAMOND WITH LEFT HALF BLACK -U+02B17 ⬗ \diamondrightblack DIAMOND WITH RIGHT HALF BLACK -U+02B18 ⬘ \diamondtopblack DIAMOND WITH TOP HALF BLACK -U+02B19 ⬙ \diamondbotblack DIAMOND WITH BOTTOM HALF BLACK -U+02B1A ⬚ \dottedsquare DOTTED SQUARE -U+02B1B ⬛ \lgblksquare, \:black_large_square: BLACK LARGE SQUARE -U+02B1C ⬜ \lgwhtsquare, \:white_large_square: WHITE LARGE SQUARE -U+02B1D ⬝ \vysmblksquare BLACK VERY SMALL SQUARE -U+02B1E ⬞ \vysmwhtsquare WHITE VERY SMALL SQUARE -U+02B1F ⬟ \pentagonblack BLACK PENTAGON -U+02B20 ⬠ \pentagon WHITE PENTAGON -U+02B21 ⬡ \varhexagon WHITE HEXAGON -U+02B22 ⬢ \varhexagonblack BLACK HEXAGON -U+02B23 ⬣ \hexagonblack HORIZONTAL BLACK HEXAGON -U+02B24 ⬤ \lgblkcircle BLACK LARGE CIRCLE -U+02B25 ⬥ \mdblkdiamond BLACK MEDIUM DIAMOND -U+02B26 ⬦ \mdwhtdiamond WHITE MEDIUM DIAMOND -U+02B27 ⬧ \mdblklozenge BLACK MEDIUM LOZENGE -U+02B28 ⬨ \mdwhtlozenge WHITE MEDIUM LOZENGE -U+02B29 ⬩ \smblkdiamond BLACK SMALL DIAMOND -U+02B2A ⬪ \smblklozenge BLACK SMALL LOZENGE -U+02B2B ⬫ \smwhtlozenge WHITE SMALL LOZENGE -U+02B2C ⬬ \blkhorzoval BLACK HORIZONTAL ELLIPSE -U+02B2D ⬭ \whthorzoval WHITE HORIZONTAL ELLIPSE -U+02B2E ⬮ \blkvertoval BLACK VERTICAL ELLIPSE -U+02B2F ⬯ \whtvertoval WHITE VERTICAL ELLIPSE -U+02B30 ⬰ \circleonleftarrow LEFT ARROW WITH SMALL CIRCLE -U+02B31 ⬱ \leftthreearrows THREE LEFTWARDS ARROWS -U+02B32 ⬲ \leftarrowonoplus LEFT ARROW WITH CIRCLED PLUS -U+02B33 ⬳ \longleftsquigarrow LONG LEFTWARDS SQUIGGLE ARROW -U+02B34 ⬴ \nvtwoheadleftarrow LEFTWARDS TWO-HEADED ARROW WITH VERTICAL STROKE -U+02B35 ⬵ \nVtwoheadleftarrow LEFTWARDS TWO-HEADED ARROW WITH DOUBLE VERTICAL STROKE -U+02B36 ⬶ \twoheadmapsfrom LEFTWARDS TWO-HEADED ARROW FROM BAR -U+02B37 ⬷ \twoheadleftdbkarrow LEFTWARDS TWO-HEADED TRIPLE DASH ARROW -U+02B38 ⬸ \leftdotarrow LEFTWARDS ARROW WITH DOTTED STEM -U+02B39 ⬹ \nvleftarrowtail LEFTWARDS ARROW WITH TAIL WITH VERTICAL STROKE -U+02B3A ⬺ \nVleftarrowtail LEFTWARDS ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE -U+02B3B ⬻ \twoheadleftarrowtail LEFTWARDS TWO-HEADED ARROW WITH TAIL -U+02B3C ⬼ \nvtwoheadleftarrowtail LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH VERTICAL STROKE -U+02B3D ⬽ \nVtwoheadleftarrowtail LEFTWARDS TWO-HEADED ARROW WITH TAIL WITH DOUBLE VERTICAL STROKE -U+02B3E ⬾ \leftarrowx LEFTWARDS ARROW THROUGH X -U+02B3F ⬿ \leftcurvedarrow WAVE ARROW POINTING DIRECTLY LEFT -U+02B40 ⭀ \equalleftarrow EQUALS SIGN ABOVE LEFTWARDS ARROW -U+02B41 ⭁ \bsimilarleftarrow REVERSE TILDE OPERATOR ABOVE LEFTWARDS ARROW -U+02B42 ⭂ \leftarrowbackapprox LEFTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO -U+02B43 ⭃ \rightarrowgtr RIGHTWARDS ARROW THROUGH GREATER-THAN -U+02B44 ⭄ \rightarrowsupset RIGHTWARDS ARROW THROUGH SUPERSET -U+02B45 ⭅ \LLeftarrow LEFTWARDS QUADRUPLE ARROW -U+02B46 ⭆ \RRightarrow RIGHTWARDS QUADRUPLE ARROW -U+02B47 ⭇ \bsimilarrightarrow REVERSE TILDE OPERATOR ABOVE RIGHTWARDS ARROW -U+02B48 ⭈ \rightarrowbackapprox RIGHTWARDS ARROW ABOVE REVERSE ALMOST EQUAL TO -U+02B49 ⭉ \similarleftarrow TILDE OPERATOR ABOVE LEFTWARDS ARROW -U+02B4A ⭊ \leftarrowapprox LEFTWARDS ARROW ABOVE ALMOST EQUAL TO -U+02B4B ⭋ \leftarrowbsimilar LEFTWARDS ARROW ABOVE REVERSE TILDE OPERATOR -U+02B4C ⭌ \rightarrowbsimilar RIGHTWARDS ARROW ABOVE REVERSE TILDE OPERATOR -U+02B50 ⭐ \medwhitestar, \:star: WHITE MEDIUM STAR -U+02B51 ⭑ \medblackstar BLACK SMALL STAR -U+02B52 ⭒ \smwhitestar WHITE SMALL STAR -U+02B53 ⭓ \rightpentagonblack BLACK RIGHT-POINTING PENTAGON -U+02B54 ⭔ \rightpentagon WHITE RIGHT-POINTING PENTAGON -U+02B55 ⭕ \:o: HEAVY LARGE CIRCLE -U+02C7C ⱼ \_j LATIN SUBSCRIPT SMALL LETTER J -U+02C7D ⱽ \^V MODIFIER LETTER CAPITAL V -U+03012 〒 \postalmark POSTAL MARK -U+03030 〰 \:wavy_dash: WAVY DASH -U+0303D 〽 \:part_alternation_mark: PART ALTERNATION MARK -U+03297 ㊗ \:congratulations: CIRCLED IDEOGRAPH CONGRATULATION -U+03299 ㊙ \:secret: CIRCLED IDEOGRAPH SECRET -U+1D400 𝐀 \bfA MATHEMATICAL BOLD CAPITAL A -U+1D401 𝐁 \bfB MATHEMATICAL BOLD CAPITAL B -U+1D402 𝐂 \bfC MATHEMATICAL BOLD CAPITAL C -U+1D403 𝐃 \bfD MATHEMATICAL BOLD CAPITAL D -U+1D404 𝐄 \bfE MATHEMATICAL BOLD CAPITAL E -U+1D405 𝐅 \bfF MATHEMATICAL BOLD CAPITAL F -U+1D406 𝐆 \bfG MATHEMATICAL BOLD CAPITAL G -U+1D407 𝐇 \bfH MATHEMATICAL BOLD CAPITAL H -U+1D408 𝐈 \bfI MATHEMATICAL BOLD CAPITAL I -U+1D409 𝐉 \bfJ MATHEMATICAL BOLD CAPITAL J -U+1D40A 𝐊 \bfK MATHEMATICAL BOLD CAPITAL K -U+1D40B 𝐋 \bfL MATHEMATICAL BOLD CAPITAL L -U+1D40C 𝐌 \bfM MATHEMATICAL BOLD CAPITAL M -U+1D40D 𝐍 \bfN MATHEMATICAL BOLD CAPITAL N -U+1D40E 𝐎 \bfO MATHEMATICAL BOLD CAPITAL O -U+1D40F 𝐏 \bfP MATHEMATICAL BOLD CAPITAL P -U+1D410 𝐐 \bfQ MATHEMATICAL BOLD CAPITAL Q -U+1D411 𝐑 \bfR MATHEMATICAL BOLD CAPITAL R -U+1D412 𝐒 \bfS MATHEMATICAL BOLD CAPITAL S -U+1D413 𝐓 \bfT MATHEMATICAL BOLD CAPITAL T -U+1D414 𝐔 \bfU MATHEMATICAL BOLD CAPITAL U -U+1D415 𝐕 \bfV MATHEMATICAL BOLD CAPITAL V -U+1D416 𝐖 \bfW MATHEMATICAL BOLD CAPITAL W -U+1D417 𝐗 \bfX MATHEMATICAL BOLD CAPITAL X -U+1D418 𝐘 \bfY MATHEMATICAL BOLD CAPITAL Y -U+1D419 𝐙 \bfZ MATHEMATICAL BOLD CAPITAL Z -U+1D41A 𝐚 \bfa MATHEMATICAL BOLD SMALL A -U+1D41B 𝐛 \bfb MATHEMATICAL BOLD SMALL B -U+1D41C 𝐜 \bfc MATHEMATICAL BOLD SMALL C -U+1D41D 𝐝 \bfd MATHEMATICAL BOLD SMALL D -U+1D41E 𝐞 \bfe MATHEMATICAL BOLD SMALL E -U+1D41F 𝐟 \bff MATHEMATICAL BOLD SMALL F -U+1D420 𝐠 \bfg MATHEMATICAL BOLD SMALL G -U+1D421 𝐡 \bfh MATHEMATICAL BOLD SMALL H -U+1D422 𝐢 \bfi MATHEMATICAL BOLD SMALL I -U+1D423 𝐣 \bfj MATHEMATICAL BOLD SMALL J -U+1D424 𝐤 \bfk MATHEMATICAL BOLD SMALL K -U+1D425 𝐥 \bfl MATHEMATICAL BOLD SMALL L -U+1D426 𝐦 \bfm MATHEMATICAL BOLD SMALL M -U+1D427 𝐧 \bfn MATHEMATICAL BOLD SMALL N -U+1D428 𝐨 \bfo MATHEMATICAL BOLD SMALL O -U+1D429 𝐩 \bfp MATHEMATICAL BOLD SMALL P -U+1D42A 𝐪 \bfq MATHEMATICAL BOLD SMALL Q -U+1D42B 𝐫 \bfr MATHEMATICAL BOLD SMALL R -U+1D42C 𝐬 \bfs MATHEMATICAL BOLD SMALL S -U+1D42D 𝐭 \bft MATHEMATICAL BOLD SMALL T -U+1D42E 𝐮 \bfu MATHEMATICAL BOLD SMALL U -U+1D42F 𝐯 \bfv MATHEMATICAL BOLD SMALL V -U+1D430 𝐰 \bfw MATHEMATICAL BOLD SMALL W -U+1D431 𝐱 \bfx MATHEMATICAL BOLD SMALL X -U+1D432 𝐲 \bfy MATHEMATICAL BOLD SMALL Y -U+1D433 𝐳 \bfz MATHEMATICAL BOLD SMALL Z -U+1D434 𝐴 \itA MATHEMATICAL ITALIC CAPITAL A -U+1D435 𝐵 \itB MATHEMATICAL ITALIC CAPITAL B -U+1D436 𝐶 \itC MATHEMATICAL ITALIC CAPITAL C -U+1D437 𝐷 \itD MATHEMATICAL ITALIC CAPITAL D -U+1D438 𝐸 \itE MATHEMATICAL ITALIC CAPITAL E -U+1D439 𝐹 \itF MATHEMATICAL ITALIC CAPITAL F -U+1D43A 𝐺 \itG MATHEMATICAL ITALIC CAPITAL G -U+1D43B 𝐻 \itH MATHEMATICAL ITALIC CAPITAL H -U+1D43C 𝐼 \itI MATHEMATICAL ITALIC CAPITAL I -U+1D43D 𝐽 \itJ MATHEMATICAL ITALIC CAPITAL J -U+1D43E 𝐾 \itK MATHEMATICAL ITALIC CAPITAL K -U+1D43F 𝐿 \itL MATHEMATICAL ITALIC CAPITAL L -U+1D440 𝑀 \itM MATHEMATICAL ITALIC CAPITAL M -U+1D441 𝑁 \itN MATHEMATICAL ITALIC CAPITAL N -U+1D442 𝑂 \itO MATHEMATICAL ITALIC CAPITAL O -U+1D443 𝑃 \itP MATHEMATICAL ITALIC CAPITAL P -U+1D444 𝑄 \itQ MATHEMATICAL ITALIC CAPITAL Q -U+1D445 𝑅 \itR MATHEMATICAL ITALIC CAPITAL R -U+1D446 𝑆 \itS MATHEMATICAL ITALIC CAPITAL S -U+1D447 𝑇 \itT MATHEMATICAL ITALIC CAPITAL T -U+1D448 𝑈 \itU MATHEMATICAL ITALIC CAPITAL U -U+1D449 𝑉 \itV MATHEMATICAL ITALIC CAPITAL V -U+1D44A 𝑊 \itW MATHEMATICAL ITALIC CAPITAL W -U+1D44B 𝑋 \itX MATHEMATICAL ITALIC CAPITAL X -U+1D44C 𝑌 \itY MATHEMATICAL ITALIC CAPITAL Y -U+1D44D 𝑍 \itZ MATHEMATICAL ITALIC CAPITAL Z -U+1D44E 𝑎 \ita MATHEMATICAL ITALIC SMALL A -U+1D44F 𝑏 \itb MATHEMATICAL ITALIC SMALL B -U+1D450 𝑐 \itc MATHEMATICAL ITALIC SMALL C -U+1D451 𝑑 \itd MATHEMATICAL ITALIC SMALL D -U+1D452 𝑒 \ite MATHEMATICAL ITALIC SMALL E -U+1D453 𝑓 \itf MATHEMATICAL ITALIC SMALL F -U+1D454 𝑔 \itg MATHEMATICAL ITALIC SMALL G -U+1D456 𝑖 \iti MATHEMATICAL ITALIC SMALL I -U+1D457 𝑗 \itj MATHEMATICAL ITALIC SMALL J -U+1D458 𝑘 \itk MATHEMATICAL ITALIC SMALL K -U+1D459 𝑙 \itl MATHEMATICAL ITALIC SMALL L -U+1D45A 𝑚 \itm MATHEMATICAL ITALIC SMALL M -U+1D45B 𝑛 \itn MATHEMATICAL ITALIC SMALL N -U+1D45C 𝑜 \ito MATHEMATICAL ITALIC SMALL O -U+1D45D 𝑝 \itp MATHEMATICAL ITALIC SMALL P -U+1D45E 𝑞 \itq MATHEMATICAL ITALIC SMALL Q -U+1D45F 𝑟 \itr MATHEMATICAL ITALIC SMALL R -U+1D460 𝑠 \its MATHEMATICAL ITALIC SMALL S -U+1D461 𝑡 \itt MATHEMATICAL ITALIC SMALL T -U+1D462 𝑢 \itu MATHEMATICAL ITALIC SMALL U -U+1D463 𝑣 \itv MATHEMATICAL ITALIC SMALL V -U+1D464 𝑤 \itw MATHEMATICAL ITALIC SMALL W -U+1D465 𝑥 \itx MATHEMATICAL ITALIC SMALL X -U+1D466 𝑦 \ity MATHEMATICAL ITALIC SMALL Y -U+1D467 𝑧 \itz MATHEMATICAL ITALIC SMALL Z -U+1D468 𝑨 \biA MATHEMATICAL BOLD ITALIC CAPITAL A -U+1D469 𝑩 \biB MATHEMATICAL BOLD ITALIC CAPITAL B -U+1D46A 𝑪 \biC MATHEMATICAL BOLD ITALIC CAPITAL C -U+1D46B 𝑫 \biD MATHEMATICAL BOLD ITALIC CAPITAL D -U+1D46C 𝑬 \biE MATHEMATICAL BOLD ITALIC CAPITAL E -U+1D46D 𝑭 \biF MATHEMATICAL BOLD ITALIC CAPITAL F -U+1D46E 𝑮 \biG MATHEMATICAL BOLD ITALIC CAPITAL G -U+1D46F 𝑯 \biH MATHEMATICAL BOLD ITALIC CAPITAL H -U+1D470 𝑰 \biI MATHEMATICAL BOLD ITALIC CAPITAL I -U+1D471 𝑱 \biJ MATHEMATICAL BOLD ITALIC CAPITAL J -U+1D472 𝑲 \biK MATHEMATICAL BOLD ITALIC CAPITAL K -U+1D473 𝑳 \biL MATHEMATICAL BOLD ITALIC CAPITAL L -U+1D474 𝑴 \biM MATHEMATICAL BOLD ITALIC CAPITAL M -U+1D475 𝑵 \biN MATHEMATICAL BOLD ITALIC CAPITAL N -U+1D476 𝑶 \biO MATHEMATICAL BOLD ITALIC CAPITAL O -U+1D477 𝑷 \biP MATHEMATICAL BOLD ITALIC CAPITAL P -U+1D478 𝑸 \biQ MATHEMATICAL BOLD ITALIC CAPITAL Q -U+1D479 𝑹 \biR MATHEMATICAL BOLD ITALIC CAPITAL R -U+1D47A 𝑺 \biS MATHEMATICAL BOLD ITALIC CAPITAL S -U+1D47B 𝑻 \biT MATHEMATICAL BOLD ITALIC CAPITAL T -U+1D47C 𝑼 \biU MATHEMATICAL BOLD ITALIC CAPITAL U -U+1D47D 𝑽 \biV MATHEMATICAL BOLD ITALIC CAPITAL V -U+1D47E 𝑾 \biW MATHEMATICAL BOLD ITALIC CAPITAL W -U+1D47F 𝑿 \biX MATHEMATICAL BOLD ITALIC CAPITAL X -U+1D480 𝒀 \biY MATHEMATICAL BOLD ITALIC CAPITAL Y -U+1D481 𝒁 \biZ MATHEMATICAL BOLD ITALIC CAPITAL Z -U+1D482 𝒂 \bia MATHEMATICAL BOLD ITALIC SMALL A -U+1D483 𝒃 \bib MATHEMATICAL BOLD ITALIC SMALL B -U+1D484 𝒄 \bic MATHEMATICAL BOLD ITALIC SMALL C -U+1D485 𝒅 \bid MATHEMATICAL BOLD ITALIC SMALL D -U+1D486 𝒆 \bie MATHEMATICAL BOLD ITALIC SMALL E -U+1D487 𝒇 \bif MATHEMATICAL BOLD ITALIC SMALL F -U+1D488 𝒈 \big MATHEMATICAL BOLD ITALIC SMALL G -U+1D489 𝒉 \bih MATHEMATICAL BOLD ITALIC SMALL H -U+1D48A 𝒊 \bii MATHEMATICAL BOLD ITALIC SMALL I -U+1D48B 𝒋 \bij MATHEMATICAL BOLD ITALIC SMALL J -U+1D48C 𝒌 \bik MATHEMATICAL BOLD ITALIC SMALL K -U+1D48D 𝒍 \bil MATHEMATICAL BOLD ITALIC SMALL L -U+1D48E 𝒎 \bim MATHEMATICAL BOLD ITALIC SMALL M -U+1D48F 𝒏 \bin MATHEMATICAL BOLD ITALIC SMALL N -U+1D490 𝒐 \bio MATHEMATICAL BOLD ITALIC SMALL O -U+1D491 𝒑 \bip MATHEMATICAL BOLD ITALIC SMALL P -U+1D492 𝒒 \biq MATHEMATICAL BOLD ITALIC SMALL Q -U+1D493 𝒓 \bir MATHEMATICAL BOLD ITALIC SMALL R -U+1D494 𝒔 \bis MATHEMATICAL BOLD ITALIC SMALL S -U+1D495 𝒕 \bit MATHEMATICAL BOLD ITALIC SMALL T -U+1D496 𝒖 \biu MATHEMATICAL BOLD ITALIC SMALL U -U+1D497 𝒗 \biv MATHEMATICAL BOLD ITALIC SMALL V -U+1D498 𝒘 \biw MATHEMATICAL BOLD ITALIC SMALL W -U+1D499 𝒙 \bix MATHEMATICAL BOLD ITALIC SMALL X -U+1D49A 𝒚 \biy MATHEMATICAL BOLD ITALIC SMALL Y -U+1D49B 𝒛 \biz MATHEMATICAL BOLD ITALIC SMALL Z -U+1D49C 𝒜 \scrA MATHEMATICAL SCRIPT CAPITAL A -U+1D49E 𝒞 \scrC MATHEMATICAL SCRIPT CAPITAL C -U+1D49F 𝒟 \scrD MATHEMATICAL SCRIPT CAPITAL D -U+1D4A2 𝒢 \scrG MATHEMATICAL SCRIPT CAPITAL G -U+1D4A5 𝒥 \scrJ MATHEMATICAL SCRIPT CAPITAL J -U+1D4A6 𝒦 \scrK MATHEMATICAL SCRIPT CAPITAL K -U+1D4A9 𝒩 \scrN MATHEMATICAL SCRIPT CAPITAL N -U+1D4AA 𝒪 \scrO MATHEMATICAL SCRIPT CAPITAL O -U+1D4AB 𝒫 \scrP MATHEMATICAL SCRIPT CAPITAL P -U+1D4AC 𝒬 \scrQ MATHEMATICAL SCRIPT CAPITAL Q -U+1D4AE 𝒮 \scrS MATHEMATICAL SCRIPT CAPITAL S -U+1D4AF 𝒯 \scrT MATHEMATICAL SCRIPT CAPITAL T -U+1D4B0 𝒰 \scrU MATHEMATICAL SCRIPT CAPITAL U -U+1D4B1 𝒱 \scrV MATHEMATICAL SCRIPT CAPITAL V -U+1D4B2 𝒲 \scrW MATHEMATICAL SCRIPT CAPITAL W -U+1D4B3 𝒳 \scrX MATHEMATICAL SCRIPT CAPITAL X -U+1D4B4 𝒴 \scrY MATHEMATICAL SCRIPT CAPITAL Y -U+1D4B5 𝒵 \scrZ MATHEMATICAL SCRIPT CAPITAL Z -U+1D4B6 𝒶 \scra MATHEMATICAL SCRIPT SMALL A -U+1D4B7 𝒷 \scrb MATHEMATICAL SCRIPT SMALL B -U+1D4B8 𝒸 \scrc MATHEMATICAL SCRIPT SMALL C -U+1D4B9 𝒹 \scrd MATHEMATICAL SCRIPT SMALL D -U+1D4BB 𝒻 \scrf MATHEMATICAL SCRIPT SMALL F -U+1D4BD 𝒽 \scrh MATHEMATICAL SCRIPT SMALL H -U+1D4BE 𝒾 \scri MATHEMATICAL SCRIPT SMALL I -U+1D4BF 𝒿 \scrj MATHEMATICAL SCRIPT SMALL J -U+1D4C0 𝓀 \scrk MATHEMATICAL SCRIPT SMALL K -U+1D4C1 𝓁 \scrl MATHEMATICAL SCRIPT SMALL L -U+1D4C2 𝓂 \scrm MATHEMATICAL SCRIPT SMALL M -U+1D4C3 𝓃 \scrn MATHEMATICAL SCRIPT SMALL N -U+1D4C5 𝓅 \scrp MATHEMATICAL SCRIPT SMALL P -U+1D4C6 𝓆 \scrq MATHEMATICAL SCRIPT SMALL Q -U+1D4C7 𝓇 \scrr MATHEMATICAL SCRIPT SMALL R -U+1D4C8 𝓈 \scrs MATHEMATICAL SCRIPT SMALL S -U+1D4C9 𝓉 \scrt MATHEMATICAL SCRIPT SMALL T -U+1D4CA 𝓊 \scru MATHEMATICAL SCRIPT SMALL U -U+1D4CB 𝓋 \scrv MATHEMATICAL SCRIPT SMALL V -U+1D4CC 𝓌 \scrw MATHEMATICAL SCRIPT SMALL W -U+1D4CD 𝓍 \scrx MATHEMATICAL SCRIPT SMALL X -U+1D4CE 𝓎 \scry MATHEMATICAL SCRIPT SMALL Y -U+1D4CF 𝓏 \scrz MATHEMATICAL SCRIPT SMALL Z -U+1D4D0 𝓐 \bscrA MATHEMATICAL BOLD SCRIPT CAPITAL A -U+1D4D1 𝓑 \bscrB MATHEMATICAL BOLD SCRIPT CAPITAL B -U+1D4D2 𝓒 \bscrC MATHEMATICAL BOLD SCRIPT CAPITAL C -U+1D4D3 𝓓 \bscrD MATHEMATICAL BOLD SCRIPT CAPITAL D -U+1D4D4 𝓔 \bscrE MATHEMATICAL BOLD SCRIPT CAPITAL E -U+1D4D5 𝓕 \bscrF MATHEMATICAL BOLD SCRIPT CAPITAL F -U+1D4D6 𝓖 \bscrG MATHEMATICAL BOLD SCRIPT CAPITAL G -U+1D4D7 𝓗 \bscrH MATHEMATICAL BOLD SCRIPT CAPITAL H -U+1D4D8 𝓘 \bscrI MATHEMATICAL BOLD SCRIPT CAPITAL I -U+1D4D9 𝓙 \bscrJ MATHEMATICAL BOLD SCRIPT CAPITAL J -U+1D4DA 𝓚 \bscrK MATHEMATICAL BOLD SCRIPT CAPITAL K -U+1D4DB 𝓛 \bscrL MATHEMATICAL BOLD SCRIPT CAPITAL L -U+1D4DC 𝓜 \bscrM MATHEMATICAL BOLD SCRIPT CAPITAL M -U+1D4DD 𝓝 \bscrN MATHEMATICAL BOLD SCRIPT CAPITAL N -U+1D4DE 𝓞 \bscrO MATHEMATICAL BOLD SCRIPT CAPITAL O -U+1D4DF 𝓟 \bscrP MATHEMATICAL BOLD SCRIPT CAPITAL P -U+1D4E0 𝓠 \bscrQ MATHEMATICAL BOLD SCRIPT CAPITAL Q -U+1D4E1 𝓡 \bscrR MATHEMATICAL BOLD SCRIPT CAPITAL R -U+1D4E2 𝓢 \bscrS MATHEMATICAL BOLD SCRIPT CAPITAL S -U+1D4E3 𝓣 \bscrT MATHEMATICAL BOLD SCRIPT CAPITAL T -U+1D4E4 𝓤 \bscrU MATHEMATICAL BOLD SCRIPT CAPITAL U -U+1D4E5 𝓥 \bscrV MATHEMATICAL BOLD SCRIPT CAPITAL V -U+1D4E6 𝓦 \bscrW MATHEMATICAL BOLD SCRIPT CAPITAL W -U+1D4E7 𝓧 \bscrX MATHEMATICAL BOLD SCRIPT CAPITAL X -U+1D4E8 𝓨 \bscrY MATHEMATICAL BOLD SCRIPT CAPITAL Y -U+1D4E9 𝓩 \bscrZ MATHEMATICAL BOLD SCRIPT CAPITAL Z -U+1D4EA 𝓪 \bscra MATHEMATICAL BOLD SCRIPT SMALL A -U+1D4EB 𝓫 \bscrb MATHEMATICAL BOLD SCRIPT SMALL B -U+1D4EC 𝓬 \bscrc MATHEMATICAL BOLD SCRIPT SMALL C -U+1D4ED 𝓭 \bscrd MATHEMATICAL BOLD SCRIPT SMALL D -U+1D4EE 𝓮 \bscre MATHEMATICAL BOLD SCRIPT SMALL E -U+1D4EF 𝓯 \bscrf MATHEMATICAL BOLD SCRIPT SMALL F -U+1D4F0 𝓰 \bscrg MATHEMATICAL BOLD SCRIPT SMALL G -U+1D4F1 𝓱 \bscrh MATHEMATICAL BOLD SCRIPT SMALL H -U+1D4F2 𝓲 \bscri MATHEMATICAL BOLD SCRIPT SMALL I -U+1D4F3 𝓳 \bscrj MATHEMATICAL BOLD SCRIPT SMALL J -U+1D4F4 𝓴 \bscrk MATHEMATICAL BOLD SCRIPT SMALL K -U+1D4F5 𝓵 \bscrl MATHEMATICAL BOLD SCRIPT SMALL L -U+1D4F6 𝓶 \bscrm MATHEMATICAL BOLD SCRIPT SMALL M -U+1D4F7 𝓷 \bscrn MATHEMATICAL BOLD SCRIPT SMALL N -U+1D4F8 𝓸 \bscro MATHEMATICAL BOLD SCRIPT SMALL O -U+1D4F9 𝓹 \bscrp MATHEMATICAL BOLD SCRIPT SMALL P -U+1D4FA 𝓺 \bscrq MATHEMATICAL BOLD SCRIPT SMALL Q -U+1D4FB 𝓻 \bscrr MATHEMATICAL BOLD SCRIPT SMALL R -U+1D4FC 𝓼 \bscrs MATHEMATICAL BOLD SCRIPT SMALL S -U+1D4FD 𝓽 \bscrt MATHEMATICAL BOLD SCRIPT SMALL T -U+1D4FE 𝓾 \bscru MATHEMATICAL BOLD SCRIPT SMALL U -U+1D4FF 𝓿 \bscrv MATHEMATICAL BOLD SCRIPT SMALL V -U+1D500 𝔀 \bscrw MATHEMATICAL BOLD SCRIPT SMALL W -U+1D501 𝔁 \bscrx MATHEMATICAL BOLD SCRIPT SMALL X -U+1D502 𝔂 \bscry MATHEMATICAL BOLD SCRIPT SMALL Y -U+1D503 𝔃 \bscrz MATHEMATICAL BOLD SCRIPT SMALL Z -U+1D504 𝔄 \frakA MATHEMATICAL FRAKTUR CAPITAL A -U+1D505 𝔅 \frakB MATHEMATICAL FRAKTUR CAPITAL B -U+1D507 𝔇 \frakD MATHEMATICAL FRAKTUR CAPITAL D -U+1D508 𝔈 \frakE MATHEMATICAL FRAKTUR CAPITAL E -U+1D509 𝔉 \frakF MATHEMATICAL FRAKTUR CAPITAL F -U+1D50A 𝔊 \frakG MATHEMATICAL FRAKTUR CAPITAL G -U+1D50D 𝔍 \frakJ MATHEMATICAL FRAKTUR CAPITAL J -U+1D50E 𝔎 \frakK MATHEMATICAL FRAKTUR CAPITAL K -U+1D50F 𝔏 \frakL MATHEMATICAL FRAKTUR CAPITAL L -U+1D510 𝔐 \frakM MATHEMATICAL FRAKTUR CAPITAL M -U+1D511 𝔑 \frakN MATHEMATICAL FRAKTUR CAPITAL N -U+1D512 𝔒 \frakO MATHEMATICAL FRAKTUR CAPITAL O -U+1D513 𝔓 \frakP MATHEMATICAL FRAKTUR CAPITAL P -U+1D514 𝔔 \frakQ MATHEMATICAL FRAKTUR CAPITAL Q -U+1D516 𝔖 \frakS MATHEMATICAL FRAKTUR CAPITAL S -U+1D517 𝔗 \frakT MATHEMATICAL FRAKTUR CAPITAL T -U+1D518 𝔘 \frakU MATHEMATICAL FRAKTUR CAPITAL U -U+1D519 𝔙 \frakV MATHEMATICAL FRAKTUR CAPITAL V -U+1D51A 𝔚 \frakW MATHEMATICAL FRAKTUR CAPITAL W -U+1D51B 𝔛 \frakX MATHEMATICAL FRAKTUR CAPITAL X -U+1D51C 𝔜 \frakY MATHEMATICAL FRAKTUR CAPITAL Y -U+1D51E 𝔞 \fraka MATHEMATICAL FRAKTUR SMALL A -U+1D51F 𝔟 \frakb MATHEMATICAL FRAKTUR SMALL B -U+1D520 𝔠 \frakc MATHEMATICAL FRAKTUR SMALL C -U+1D521 𝔡 \frakd MATHEMATICAL FRAKTUR SMALL D -U+1D522 𝔢 \frake MATHEMATICAL FRAKTUR SMALL E -U+1D523 𝔣 \frakf MATHEMATICAL FRAKTUR SMALL F -U+1D524 𝔤 \frakg MATHEMATICAL FRAKTUR SMALL G -U+1D525 𝔥 \frakh MATHEMATICAL FRAKTUR SMALL H -U+1D526 𝔦 \fraki MATHEMATICAL FRAKTUR SMALL I -U+1D527 𝔧 \frakj MATHEMATICAL FRAKTUR SMALL J -U+1D528 𝔨 \frakk MATHEMATICAL FRAKTUR SMALL K -U+1D529 𝔩 \frakl MATHEMATICAL FRAKTUR SMALL L -U+1D52A 𝔪 \frakm MATHEMATICAL FRAKTUR SMALL M -U+1D52B 𝔫 \frakn MATHEMATICAL FRAKTUR SMALL N -U+1D52C 𝔬 \frako MATHEMATICAL FRAKTUR SMALL O -U+1D52D 𝔭 \frakp MATHEMATICAL FRAKTUR SMALL P -U+1D52E 𝔮 \frakq MATHEMATICAL FRAKTUR SMALL Q -U+1D52F 𝔯 \frakr MATHEMATICAL FRAKTUR SMALL R -U+1D530 𝔰 \fraks MATHEMATICAL FRAKTUR SMALL S -U+1D531 𝔱 \frakt MATHEMATICAL FRAKTUR SMALL T -U+1D532 𝔲 \fraku MATHEMATICAL FRAKTUR SMALL U -U+1D533 𝔳 \frakv MATHEMATICAL FRAKTUR SMALL V -U+1D534 𝔴 \frakw MATHEMATICAL FRAKTUR SMALL W -U+1D535 𝔵 \frakx MATHEMATICAL FRAKTUR SMALL X -U+1D536 𝔶 \fraky MATHEMATICAL FRAKTUR SMALL Y -U+1D537 𝔷 \frakz MATHEMATICAL FRAKTUR SMALL Z -U+1D538 𝔸 \bbA MATHEMATICAL DOUBLE-STRUCK CAPITAL A -U+1D539 𝔹 \bbB MATHEMATICAL DOUBLE-STRUCK CAPITAL B -U+1D53B 𝔻 \bbD MATHEMATICAL DOUBLE-STRUCK CAPITAL D -U+1D53C 𝔼 \bbE MATHEMATICAL DOUBLE-STRUCK CAPITAL E -U+1D53D 𝔽 \bbF MATHEMATICAL DOUBLE-STRUCK CAPITAL F -U+1D53E 𝔾 \bbG MATHEMATICAL DOUBLE-STRUCK CAPITAL G -U+1D540 𝕀 \bbI MATHEMATICAL DOUBLE-STRUCK CAPITAL I -U+1D541 𝕁 \bbJ MATHEMATICAL DOUBLE-STRUCK CAPITAL J -U+1D542 𝕂 \bbK MATHEMATICAL DOUBLE-STRUCK CAPITAL K -U+1D543 𝕃 \bbL MATHEMATICAL DOUBLE-STRUCK CAPITAL L -U+1D544 𝕄 \bbM MATHEMATICAL DOUBLE-STRUCK CAPITAL M -U+1D546 𝕆 \bbO MATHEMATICAL DOUBLE-STRUCK CAPITAL O -U+1D54A 𝕊 \bbS MATHEMATICAL DOUBLE-STRUCK CAPITAL S -U+1D54B 𝕋 \bbT MATHEMATICAL DOUBLE-STRUCK CAPITAL T -U+1D54C 𝕌 \bbU MATHEMATICAL DOUBLE-STRUCK CAPITAL U -U+1D54D 𝕍 \bbV MATHEMATICAL DOUBLE-STRUCK CAPITAL V -U+1D54E 𝕎 \bbW MATHEMATICAL DOUBLE-STRUCK CAPITAL W -U+1D54F 𝕏 \bbX MATHEMATICAL DOUBLE-STRUCK CAPITAL X -U+1D550 𝕐 \bbY MATHEMATICAL DOUBLE-STRUCK CAPITAL Y -U+1D552 𝕒 \bba MATHEMATICAL DOUBLE-STRUCK SMALL A -U+1D553 𝕓 \bbb MATHEMATICAL DOUBLE-STRUCK SMALL B -U+1D554 𝕔 \bbc MATHEMATICAL DOUBLE-STRUCK SMALL C -U+1D555 𝕕 \bbd MATHEMATICAL DOUBLE-STRUCK SMALL D -U+1D556 𝕖 \bbe MATHEMATICAL DOUBLE-STRUCK SMALL E -U+1D557 𝕗 \bbf MATHEMATICAL DOUBLE-STRUCK SMALL F -U+1D558 𝕘 \bbg MATHEMATICAL DOUBLE-STRUCK SMALL G -U+1D559 𝕙 \bbh MATHEMATICAL DOUBLE-STRUCK SMALL H -U+1D55A 𝕚 \bbi MATHEMATICAL DOUBLE-STRUCK SMALL I -U+1D55B 𝕛 \bbj MATHEMATICAL DOUBLE-STRUCK SMALL J -U+1D55C 𝕜 \bbk MATHEMATICAL DOUBLE-STRUCK SMALL K -U+1D55D 𝕝 \bbl MATHEMATICAL DOUBLE-STRUCK SMALL L -U+1D55E 𝕞 \bbm MATHEMATICAL DOUBLE-STRUCK SMALL M -U+1D55F 𝕟 \bbn MATHEMATICAL DOUBLE-STRUCK SMALL N -U+1D560 𝕠 \bbo MATHEMATICAL DOUBLE-STRUCK SMALL O -U+1D561 𝕡 \bbp MATHEMATICAL DOUBLE-STRUCK SMALL P -U+1D562 𝕢 \bbq MATHEMATICAL DOUBLE-STRUCK SMALL Q -U+1D563 𝕣 \bbr MATHEMATICAL DOUBLE-STRUCK SMALL R -U+1D564 𝕤 \bbs MATHEMATICAL DOUBLE-STRUCK SMALL S -U+1D565 𝕥 \bbt MATHEMATICAL DOUBLE-STRUCK SMALL T -U+1D566 𝕦 \bbu MATHEMATICAL DOUBLE-STRUCK SMALL U -U+1D567 𝕧 \bbv MATHEMATICAL DOUBLE-STRUCK SMALL V -U+1D568 𝕨 \bbw MATHEMATICAL DOUBLE-STRUCK SMALL W -U+1D569 𝕩 \bbx MATHEMATICAL DOUBLE-STRUCK SMALL X -U+1D56A 𝕪 \bby MATHEMATICAL DOUBLE-STRUCK SMALL Y -U+1D56B 𝕫 \bbz MATHEMATICAL DOUBLE-STRUCK SMALL Z -U+1D56C 𝕬 \bfrakA MATHEMATICAL BOLD FRAKTUR CAPITAL A -U+1D56D 𝕭 \bfrakB MATHEMATICAL BOLD FRAKTUR CAPITAL B -U+1D56E 𝕮 \bfrakC MATHEMATICAL BOLD FRAKTUR CAPITAL C -U+1D56F 𝕯 \bfrakD MATHEMATICAL BOLD FRAKTUR CAPITAL D -U+1D570 𝕰 \bfrakE MATHEMATICAL BOLD FRAKTUR CAPITAL E -U+1D571 𝕱 \bfrakF MATHEMATICAL BOLD FRAKTUR CAPITAL F -U+1D572 𝕲 \bfrakG MATHEMATICAL BOLD FRAKTUR CAPITAL G -U+1D573 𝕳 \bfrakH MATHEMATICAL BOLD FRAKTUR CAPITAL H -U+1D574 𝕴 \bfrakI MATHEMATICAL BOLD FRAKTUR CAPITAL I -U+1D575 𝕵 \bfrakJ MATHEMATICAL BOLD FRAKTUR CAPITAL J -U+1D576 𝕶 \bfrakK MATHEMATICAL BOLD FRAKTUR CAPITAL K -U+1D577 𝕷 \bfrakL MATHEMATICAL BOLD FRAKTUR CAPITAL L -U+1D578 𝕸 \bfrakM MATHEMATICAL BOLD FRAKTUR CAPITAL M -U+1D579 𝕹 \bfrakN MATHEMATICAL BOLD FRAKTUR CAPITAL N -U+1D57A 𝕺 \bfrakO MATHEMATICAL BOLD FRAKTUR CAPITAL O -U+1D57B 𝕻 \bfrakP MATHEMATICAL BOLD FRAKTUR CAPITAL P -U+1D57C 𝕼 \bfrakQ MATHEMATICAL BOLD FRAKTUR CAPITAL Q -U+1D57D 𝕽 \bfrakR MATHEMATICAL BOLD FRAKTUR CAPITAL R -U+1D57E 𝕾 \bfrakS MATHEMATICAL BOLD FRAKTUR CAPITAL S -U+1D57F 𝕿 \bfrakT MATHEMATICAL BOLD FRAKTUR CAPITAL T -U+1D580 𝖀 \bfrakU MATHEMATICAL BOLD FRAKTUR CAPITAL U -U+1D581 𝖁 \bfrakV MATHEMATICAL BOLD FRAKTUR CAPITAL V -U+1D582 𝖂 \bfrakW MATHEMATICAL BOLD FRAKTUR CAPITAL W -U+1D583 𝖃 \bfrakX MATHEMATICAL BOLD FRAKTUR CAPITAL X -U+1D584 𝖄 \bfrakY MATHEMATICAL BOLD FRAKTUR CAPITAL Y -U+1D585 𝖅 \bfrakZ MATHEMATICAL BOLD FRAKTUR CAPITAL Z -U+1D586 𝖆 \bfraka MATHEMATICAL BOLD FRAKTUR SMALL A -U+1D587 𝖇 \bfrakb MATHEMATICAL BOLD FRAKTUR SMALL B -U+1D588 𝖈 \bfrakc MATHEMATICAL BOLD FRAKTUR SMALL C -U+1D589 𝖉 \bfrakd MATHEMATICAL BOLD FRAKTUR SMALL D -U+1D58A 𝖊 \bfrake MATHEMATICAL BOLD FRAKTUR SMALL E -U+1D58B 𝖋 \bfrakf MATHEMATICAL BOLD FRAKTUR SMALL F -U+1D58C 𝖌 \bfrakg MATHEMATICAL BOLD FRAKTUR SMALL G -U+1D58D 𝖍 \bfrakh MATHEMATICAL BOLD FRAKTUR SMALL H -U+1D58E 𝖎 \bfraki MATHEMATICAL BOLD FRAKTUR SMALL I -U+1D58F 𝖏 \bfrakj MATHEMATICAL BOLD FRAKTUR SMALL J -U+1D590 𝖐 \bfrakk MATHEMATICAL BOLD FRAKTUR SMALL K -U+1D591 𝖑 \bfrakl MATHEMATICAL BOLD FRAKTUR SMALL L -U+1D592 𝖒 \bfrakm MATHEMATICAL BOLD FRAKTUR SMALL M -U+1D593 𝖓 \bfrakn MATHEMATICAL BOLD FRAKTUR SMALL N -U+1D594 𝖔 \bfrako MATHEMATICAL BOLD FRAKTUR SMALL O -U+1D595 𝖕 \bfrakp MATHEMATICAL BOLD FRAKTUR SMALL P -U+1D596 𝖖 \bfrakq MATHEMATICAL BOLD FRAKTUR SMALL Q -U+1D597 𝖗 \bfrakr MATHEMATICAL BOLD FRAKTUR SMALL R -U+1D598 𝖘 \bfraks MATHEMATICAL BOLD FRAKTUR SMALL S -U+1D599 𝖙 \bfrakt MATHEMATICAL BOLD FRAKTUR SMALL T -U+1D59A 𝖚 \bfraku MATHEMATICAL BOLD FRAKTUR SMALL U -U+1D59B 𝖛 \bfrakv MATHEMATICAL BOLD FRAKTUR SMALL V -U+1D59C 𝖜 \bfrakw MATHEMATICAL BOLD FRAKTUR SMALL W -U+1D59D 𝖝 \bfrakx MATHEMATICAL BOLD FRAKTUR SMALL X -U+1D59E 𝖞 \bfraky MATHEMATICAL BOLD FRAKTUR SMALL Y -U+1D59F 𝖟 \bfrakz MATHEMATICAL BOLD FRAKTUR SMALL Z -U+1D5A0 𝖠 \sansA MATHEMATICAL SANS-SERIF CAPITAL A -U+1D5A1 𝖡 \sansB MATHEMATICAL SANS-SERIF CAPITAL B -U+1D5A2 𝖢 \sansC MATHEMATICAL SANS-SERIF CAPITAL C -U+1D5A3 𝖣 \sansD MATHEMATICAL SANS-SERIF CAPITAL D -U+1D5A4 𝖤 \sansE MATHEMATICAL SANS-SERIF CAPITAL E -U+1D5A5 𝖥 \sansF MATHEMATICAL SANS-SERIF CAPITAL F -U+1D5A6 𝖦 \sansG MATHEMATICAL SANS-SERIF CAPITAL G -U+1D5A7 𝖧 \sansH MATHEMATICAL SANS-SERIF CAPITAL H -U+1D5A8 𝖨 \sansI MATHEMATICAL SANS-SERIF CAPITAL I -U+1D5A9 𝖩 \sansJ MATHEMATICAL SANS-SERIF CAPITAL J -U+1D5AA 𝖪 \sansK MATHEMATICAL SANS-SERIF CAPITAL K -U+1D5AB 𝖫 \sansL MATHEMATICAL SANS-SERIF CAPITAL L -U+1D5AC 𝖬 \sansM MATHEMATICAL SANS-SERIF CAPITAL M -U+1D5AD 𝖭 \sansN MATHEMATICAL SANS-SERIF CAPITAL N -U+1D5AE 𝖮 \sansO MATHEMATICAL SANS-SERIF CAPITAL O -U+1D5AF 𝖯 \sansP MATHEMATICAL SANS-SERIF CAPITAL P -U+1D5B0 𝖰 \sansQ MATHEMATICAL SANS-SERIF CAPITAL Q -U+1D5B1 𝖱 \sansR MATHEMATICAL SANS-SERIF CAPITAL R -U+1D5B2 𝖲 \sansS MATHEMATICAL SANS-SERIF CAPITAL S -U+1D5B3 𝖳 \sansT MATHEMATICAL SANS-SERIF CAPITAL T -U+1D5B4 𝖴 \sansU MATHEMATICAL SANS-SERIF CAPITAL U -U+1D5B5 𝖵 \sansV MATHEMATICAL SANS-SERIF CAPITAL V -U+1D5B6 𝖶 \sansW MATHEMATICAL SANS-SERIF CAPITAL W -U+1D5B7 𝖷 \sansX MATHEMATICAL SANS-SERIF CAPITAL X -U+1D5B8 𝖸 \sansY MATHEMATICAL SANS-SERIF CAPITAL Y -U+1D5B9 𝖹 \sansZ MATHEMATICAL SANS-SERIF CAPITAL Z -U+1D5BA 𝖺 \sansa MATHEMATICAL SANS-SERIF SMALL A -U+1D5BB 𝖻 \sansb MATHEMATICAL SANS-SERIF SMALL B -U+1D5BC 𝖼 \sansc MATHEMATICAL SANS-SERIF SMALL C -U+1D5BD 𝖽 \sansd MATHEMATICAL SANS-SERIF SMALL D -U+1D5BE 𝖾 \sanse MATHEMATICAL SANS-SERIF SMALL E -U+1D5BF 𝖿 \sansf MATHEMATICAL SANS-SERIF SMALL F -U+1D5C0 𝗀 \sansg MATHEMATICAL SANS-SERIF SMALL G -U+1D5C1 𝗁 \sansh MATHEMATICAL SANS-SERIF SMALL H -U+1D5C2 𝗂 \sansi MATHEMATICAL SANS-SERIF SMALL I -U+1D5C3 𝗃 \sansj MATHEMATICAL SANS-SERIF SMALL J -U+1D5C4 𝗄 \sansk MATHEMATICAL SANS-SERIF SMALL K -U+1D5C5 𝗅 \sansl MATHEMATICAL SANS-SERIF SMALL L -U+1D5C6 𝗆 \sansm MATHEMATICAL SANS-SERIF SMALL M -U+1D5C7 𝗇 \sansn MATHEMATICAL SANS-SERIF SMALL N -U+1D5C8 𝗈 \sanso MATHEMATICAL SANS-SERIF SMALL O -U+1D5C9 𝗉 \sansp MATHEMATICAL SANS-SERIF SMALL P -U+1D5CA 𝗊 \sansq MATHEMATICAL SANS-SERIF SMALL Q -U+1D5CB 𝗋 \sansr MATHEMATICAL SANS-SERIF SMALL R -U+1D5CC 𝗌 \sanss MATHEMATICAL SANS-SERIF SMALL S -U+1D5CD 𝗍 \sanst MATHEMATICAL SANS-SERIF SMALL T -U+1D5CE 𝗎 \sansu MATHEMATICAL SANS-SERIF SMALL U -U+1D5CF 𝗏 \sansv MATHEMATICAL SANS-SERIF SMALL V -U+1D5D0 𝗐 \sansw MATHEMATICAL SANS-SERIF SMALL W -U+1D5D1 𝗑 \sansx MATHEMATICAL SANS-SERIF SMALL X -U+1D5D2 𝗒 \sansy MATHEMATICAL SANS-SERIF SMALL Y -U+1D5D3 𝗓 \sansz MATHEMATICAL SANS-SERIF SMALL Z -U+1D5D4 𝗔 \bsansA MATHEMATICAL SANS-SERIF BOLD CAPITAL A -U+1D5D5 𝗕 \bsansB MATHEMATICAL SANS-SERIF BOLD CAPITAL B -U+1D5D6 𝗖 \bsansC MATHEMATICAL SANS-SERIF BOLD CAPITAL C -U+1D5D7 𝗗 \bsansD MATHEMATICAL SANS-SERIF BOLD CAPITAL D -U+1D5D8 𝗘 \bsansE MATHEMATICAL SANS-SERIF BOLD CAPITAL E -U+1D5D9 𝗙 \bsansF MATHEMATICAL SANS-SERIF BOLD CAPITAL F -U+1D5DA 𝗚 \bsansG MATHEMATICAL SANS-SERIF BOLD CAPITAL G -U+1D5DB 𝗛 \bsansH MATHEMATICAL SANS-SERIF BOLD CAPITAL H -U+1D5DC 𝗜 \bsansI MATHEMATICAL SANS-SERIF BOLD CAPITAL I -U+1D5DD 𝗝 \bsansJ MATHEMATICAL SANS-SERIF BOLD CAPITAL J -U+1D5DE 𝗞 \bsansK MATHEMATICAL SANS-SERIF BOLD CAPITAL K -U+1D5DF 𝗟 \bsansL MATHEMATICAL SANS-SERIF BOLD CAPITAL L -U+1D5E0 𝗠 \bsansM MATHEMATICAL SANS-SERIF BOLD CAPITAL M -U+1D5E1 𝗡 \bsansN MATHEMATICAL SANS-SERIF BOLD CAPITAL N -U+1D5E2 𝗢 \bsansO MATHEMATICAL SANS-SERIF BOLD CAPITAL O -U+1D5E3 𝗣 \bsansP MATHEMATICAL SANS-SERIF BOLD CAPITAL P -U+1D5E4 𝗤 \bsansQ MATHEMATICAL SANS-SERIF BOLD CAPITAL Q -U+1D5E5 𝗥 \bsansR MATHEMATICAL SANS-SERIF BOLD CAPITAL R -U+1D5E6 𝗦 \bsansS MATHEMATICAL SANS-SERIF BOLD CAPITAL S -U+1D5E7 𝗧 \bsansT MATHEMATICAL SANS-SERIF BOLD CAPITAL T -U+1D5E8 𝗨 \bsansU MATHEMATICAL SANS-SERIF BOLD CAPITAL U -U+1D5E9 𝗩 \bsansV MATHEMATICAL SANS-SERIF BOLD CAPITAL V -U+1D5EA 𝗪 \bsansW MATHEMATICAL SANS-SERIF BOLD CAPITAL W -U+1D5EB 𝗫 \bsansX MATHEMATICAL SANS-SERIF BOLD CAPITAL X -U+1D5EC 𝗬 \bsansY MATHEMATICAL SANS-SERIF BOLD CAPITAL Y -U+1D5ED 𝗭 \bsansZ MATHEMATICAL SANS-SERIF BOLD CAPITAL Z -U+1D5EE 𝗮 \bsansa MATHEMATICAL SANS-SERIF BOLD SMALL A -U+1D5EF 𝗯 \bsansb MATHEMATICAL SANS-SERIF BOLD SMALL B -U+1D5F0 𝗰 \bsansc MATHEMATICAL SANS-SERIF BOLD SMALL C -U+1D5F1 𝗱 \bsansd MATHEMATICAL SANS-SERIF BOLD SMALL D -U+1D5F2 𝗲 \bsanse MATHEMATICAL SANS-SERIF BOLD SMALL E -U+1D5F3 𝗳 \bsansf MATHEMATICAL SANS-SERIF BOLD SMALL F -U+1D5F4 𝗴 \bsansg MATHEMATICAL SANS-SERIF BOLD SMALL G -U+1D5F5 𝗵 \bsansh MATHEMATICAL SANS-SERIF BOLD SMALL H -U+1D5F6 𝗶 \bsansi MATHEMATICAL SANS-SERIF BOLD SMALL I -U+1D5F7 𝗷 \bsansj MATHEMATICAL SANS-SERIF BOLD SMALL J -U+1D5F8 𝗸 \bsansk MATHEMATICAL SANS-SERIF BOLD SMALL K -U+1D5F9 𝗹 \bsansl MATHEMATICAL SANS-SERIF BOLD SMALL L -U+1D5FA 𝗺 \bsansm MATHEMATICAL SANS-SERIF BOLD SMALL M -U+1D5FB 𝗻 \bsansn MATHEMATICAL SANS-SERIF BOLD SMALL N -U+1D5FC 𝗼 \bsanso MATHEMATICAL SANS-SERIF BOLD SMALL O -U+1D5FD 𝗽 \bsansp MATHEMATICAL SANS-SERIF BOLD SMALL P -U+1D5FE 𝗾 \bsansq MATHEMATICAL SANS-SERIF BOLD SMALL Q -U+1D5FF 𝗿 \bsansr MATHEMATICAL SANS-SERIF BOLD SMALL R -U+1D600 𝘀 \bsanss MATHEMATICAL SANS-SERIF BOLD SMALL S -U+1D601 𝘁 \bsanst MATHEMATICAL SANS-SERIF BOLD SMALL T -U+1D602 𝘂 \bsansu MATHEMATICAL SANS-SERIF BOLD SMALL U -U+1D603 𝘃 \bsansv MATHEMATICAL SANS-SERIF BOLD SMALL V -U+1D604 𝘄 \bsansw MATHEMATICAL SANS-SERIF BOLD SMALL W -U+1D605 𝘅 \bsansx MATHEMATICAL SANS-SERIF BOLD SMALL X -U+1D606 𝘆 \bsansy MATHEMATICAL SANS-SERIF BOLD SMALL Y -U+1D607 𝘇 \bsansz MATHEMATICAL SANS-SERIF BOLD SMALL Z -U+1D608 𝘈 \isansA MATHEMATICAL SANS-SERIF ITALIC CAPITAL A -U+1D609 𝘉 \isansB MATHEMATICAL SANS-SERIF ITALIC CAPITAL B -U+1D60A 𝘊 \isansC MATHEMATICAL SANS-SERIF ITALIC CAPITAL C -U+1D60B 𝘋 \isansD MATHEMATICAL SANS-SERIF ITALIC CAPITAL D -U+1D60C 𝘌 \isansE MATHEMATICAL SANS-SERIF ITALIC CAPITAL E -U+1D60D 𝘍 \isansF MATHEMATICAL SANS-SERIF ITALIC CAPITAL F -U+1D60E 𝘎 \isansG MATHEMATICAL SANS-SERIF ITALIC CAPITAL G -U+1D60F 𝘏 \isansH MATHEMATICAL SANS-SERIF ITALIC CAPITAL H -U+1D610 𝘐 \isansI MATHEMATICAL SANS-SERIF ITALIC CAPITAL I -U+1D611 𝘑 \isansJ MATHEMATICAL SANS-SERIF ITALIC CAPITAL J -U+1D612 𝘒 \isansK MATHEMATICAL SANS-SERIF ITALIC CAPITAL K -U+1D613 𝘓 \isansL MATHEMATICAL SANS-SERIF ITALIC CAPITAL L -U+1D614 𝘔 \isansM MATHEMATICAL SANS-SERIF ITALIC CAPITAL M -U+1D615 𝘕 \isansN MATHEMATICAL SANS-SERIF ITALIC CAPITAL N -U+1D616 𝘖 \isansO MATHEMATICAL SANS-SERIF ITALIC CAPITAL O -U+1D617 𝘗 \isansP MATHEMATICAL SANS-SERIF ITALIC CAPITAL P -U+1D618 𝘘 \isansQ MATHEMATICAL SANS-SERIF ITALIC CAPITAL Q -U+1D619 𝘙 \isansR MATHEMATICAL SANS-SERIF ITALIC CAPITAL R -U+1D61A 𝘚 \isansS MATHEMATICAL SANS-SERIF ITALIC CAPITAL S -U+1D61B 𝘛 \isansT MATHEMATICAL SANS-SERIF ITALIC CAPITAL T -U+1D61C 𝘜 \isansU MATHEMATICAL SANS-SERIF ITALIC CAPITAL U -U+1D61D 𝘝 \isansV MATHEMATICAL SANS-SERIF ITALIC CAPITAL V -U+1D61E 𝘞 \isansW MATHEMATICAL SANS-SERIF ITALIC CAPITAL W -U+1D61F 𝘟 \isansX MATHEMATICAL SANS-SERIF ITALIC CAPITAL X -U+1D620 𝘠 \isansY MATHEMATICAL SANS-SERIF ITALIC CAPITAL Y -U+1D621 𝘡 \isansZ MATHEMATICAL SANS-SERIF ITALIC CAPITAL Z -U+1D622 𝘢 \isansa MATHEMATICAL SANS-SERIF ITALIC SMALL A -U+1D623 𝘣 \isansb MATHEMATICAL SANS-SERIF ITALIC SMALL B -U+1D624 𝘤 \isansc MATHEMATICAL SANS-SERIF ITALIC SMALL C -U+1D625 𝘥 \isansd MATHEMATICAL SANS-SERIF ITALIC SMALL D -U+1D626 𝘦 \isanse MATHEMATICAL SANS-SERIF ITALIC SMALL E -U+1D627 𝘧 \isansf MATHEMATICAL SANS-SERIF ITALIC SMALL F -U+1D628 𝘨 \isansg MATHEMATICAL SANS-SERIF ITALIC SMALL G -U+1D629 𝘩 \isansh MATHEMATICAL SANS-SERIF ITALIC SMALL H -U+1D62A 𝘪 \isansi MATHEMATICAL SANS-SERIF ITALIC SMALL I -U+1D62B 𝘫 \isansj MATHEMATICAL SANS-SERIF ITALIC SMALL J -U+1D62C 𝘬 \isansk MATHEMATICAL SANS-SERIF ITALIC SMALL K -U+1D62D 𝘭 \isansl MATHEMATICAL SANS-SERIF ITALIC SMALL L -U+1D62E 𝘮 \isansm MATHEMATICAL SANS-SERIF ITALIC SMALL M -U+1D62F 𝘯 \isansn MATHEMATICAL SANS-SERIF ITALIC SMALL N -U+1D630 𝘰 \isanso MATHEMATICAL SANS-SERIF ITALIC SMALL O -U+1D631 𝘱 \isansp MATHEMATICAL SANS-SERIF ITALIC SMALL P -U+1D632 𝘲 \isansq MATHEMATICAL SANS-SERIF ITALIC SMALL Q -U+1D633 𝘳 \isansr MATHEMATICAL SANS-SERIF ITALIC SMALL R -U+1D634 𝘴 \isanss MATHEMATICAL SANS-SERIF ITALIC SMALL S -U+1D635 𝘵 \isanst MATHEMATICAL SANS-SERIF ITALIC SMALL T -U+1D636 𝘶 \isansu MATHEMATICAL SANS-SERIF ITALIC SMALL U -U+1D637 𝘷 \isansv MATHEMATICAL SANS-SERIF ITALIC SMALL V -U+1D638 𝘸 \isansw MATHEMATICAL SANS-SERIF ITALIC SMALL W -U+1D639 𝘹 \isansx MATHEMATICAL SANS-SERIF ITALIC SMALL X -U+1D63A 𝘺 \isansy MATHEMATICAL SANS-SERIF ITALIC SMALL Y -U+1D63B 𝘻 \isansz MATHEMATICAL SANS-SERIF ITALIC SMALL Z -U+1D63C 𝘼 \bisansA MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL A -U+1D63D 𝘽 \bisansB MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL B -U+1D63E 𝘾 \bisansC MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL C -U+1D63F 𝘿 \bisansD MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL D -U+1D640 𝙀 \bisansE MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL E -U+1D641 𝙁 \bisansF MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL F -U+1D642 𝙂 \bisansG MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL G -U+1D643 𝙃 \bisansH MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL H -U+1D644 𝙄 \bisansI MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL I -U+1D645 𝙅 \bisansJ MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL J -U+1D646 𝙆 \bisansK MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL K -U+1D647 𝙇 \bisansL MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL L -U+1D648 𝙈 \bisansM MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL M -U+1D649 𝙉 \bisansN MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL N -U+1D64A 𝙊 \bisansO MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL O -U+1D64B 𝙋 \bisansP MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL P -U+1D64C 𝙌 \bisansQ MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Q -U+1D64D 𝙍 \bisansR MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL R -U+1D64E 𝙎 \bisansS MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL S -U+1D64F 𝙏 \bisansT MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL T -U+1D650 𝙐 \bisansU MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL U -U+1D651 𝙑 \bisansV MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL V -U+1D652 𝙒 \bisansW MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL W -U+1D653 𝙓 \bisansX MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL X -U+1D654 𝙔 \bisansY MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Y -U+1D655 𝙕 \bisansZ MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL Z -U+1D656 𝙖 \bisansa MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL A -U+1D657 𝙗 \bisansb MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B -U+1D658 𝙘 \bisansc MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL C -U+1D659 𝙙 \bisansd MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL D -U+1D65A 𝙚 \bisanse MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL E -U+1D65B 𝙛 \bisansf MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL F -U+1D65C 𝙜 \bisansg MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL G -U+1D65D 𝙝 \bisansh MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL H -U+1D65E 𝙞 \bisansi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL I -U+1D65F 𝙟 \bisansj MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL J -U+1D660 𝙠 \bisansk MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL K -U+1D661 𝙡 \bisansl MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL L -U+1D662 𝙢 \bisansm MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL M -U+1D663 𝙣 \bisansn MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL N -U+1D664 𝙤 \bisanso MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL O -U+1D665 𝙥 \bisansp MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL P -U+1D666 𝙦 \bisansq MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Q -U+1D667 𝙧 \bisansr MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL R -U+1D668 𝙨 \bisanss MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL S -U+1D669 𝙩 \bisanst MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL T -U+1D66A 𝙪 \bisansu MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL U -U+1D66B 𝙫 \bisansv MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL V -U+1D66C 𝙬 \bisansw MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL W -U+1D66D 𝙭 \bisansx MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL X -U+1D66E 𝙮 \bisansy MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Y -U+1D66F 𝙯 \bisansz MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL Z -U+1D670 𝙰 \ttA MATHEMATICAL MONOSPACE CAPITAL A -U+1D671 𝙱 \ttB MATHEMATICAL MONOSPACE CAPITAL B -U+1D672 𝙲 \ttC MATHEMATICAL MONOSPACE CAPITAL C -U+1D673 𝙳 \ttD MATHEMATICAL MONOSPACE CAPITAL D -U+1D674 𝙴 \ttE MATHEMATICAL MONOSPACE CAPITAL E -U+1D675 𝙵 \ttF MATHEMATICAL MONOSPACE CAPITAL F -U+1D676 𝙶 \ttG MATHEMATICAL MONOSPACE CAPITAL G -U+1D677 𝙷 \ttH MATHEMATICAL MONOSPACE CAPITAL H -U+1D678 𝙸 \ttI MATHEMATICAL MONOSPACE CAPITAL I -U+1D679 𝙹 \ttJ MATHEMATICAL MONOSPACE CAPITAL J -U+1D67A 𝙺 \ttK MATHEMATICAL MONOSPACE CAPITAL K -U+1D67B 𝙻 \ttL MATHEMATICAL MONOSPACE CAPITAL L -U+1D67C 𝙼 \ttM MATHEMATICAL MONOSPACE CAPITAL M -U+1D67D 𝙽 \ttN MATHEMATICAL MONOSPACE CAPITAL N -U+1D67E 𝙾 \ttO MATHEMATICAL MONOSPACE CAPITAL O -U+1D67F 𝙿 \ttP MATHEMATICAL MONOSPACE CAPITAL P -U+1D680 𝚀 \ttQ MATHEMATICAL MONOSPACE CAPITAL Q -U+1D681 𝚁 \ttR MATHEMATICAL MONOSPACE CAPITAL R -U+1D682 𝚂 \ttS MATHEMATICAL MONOSPACE CAPITAL S -U+1D683 𝚃 \ttT MATHEMATICAL MONOSPACE CAPITAL T -U+1D684 𝚄 \ttU MATHEMATICAL MONOSPACE CAPITAL U -U+1D685 𝚅 \ttV MATHEMATICAL MONOSPACE CAPITAL V -U+1D686 𝚆 \ttW MATHEMATICAL MONOSPACE CAPITAL W -U+1D687 𝚇 \ttX MATHEMATICAL MONOSPACE CAPITAL X -U+1D688 𝚈 \ttY MATHEMATICAL MONOSPACE CAPITAL Y -U+1D689 𝚉 \ttZ MATHEMATICAL MONOSPACE CAPITAL Z -U+1D68A 𝚊 \tta MATHEMATICAL MONOSPACE SMALL A -U+1D68B 𝚋 \ttb MATHEMATICAL MONOSPACE SMALL B -U+1D68C 𝚌 \ttc MATHEMATICAL MONOSPACE SMALL C -U+1D68D 𝚍 \ttd MATHEMATICAL MONOSPACE SMALL D -U+1D68E 𝚎 \tte MATHEMATICAL MONOSPACE SMALL E -U+1D68F 𝚏 \ttf MATHEMATICAL MONOSPACE SMALL F -U+1D690 𝚐 \ttg MATHEMATICAL MONOSPACE SMALL G -U+1D691 𝚑 \tth MATHEMATICAL MONOSPACE SMALL H -U+1D692 𝚒 \tti MATHEMATICAL MONOSPACE SMALL I -U+1D693 𝚓 \ttj MATHEMATICAL MONOSPACE SMALL J -U+1D694 𝚔 \ttk MATHEMATICAL MONOSPACE SMALL K -U+1D695 𝚕 \ttl MATHEMATICAL MONOSPACE SMALL L -U+1D696 𝚖 \ttm MATHEMATICAL MONOSPACE SMALL M -U+1D697 𝚗 \ttn MATHEMATICAL MONOSPACE SMALL N -U+1D698 𝚘 \tto MATHEMATICAL MONOSPACE SMALL O -U+1D699 𝚙 \ttp MATHEMATICAL MONOSPACE SMALL P -U+1D69A 𝚚 \ttq MATHEMATICAL MONOSPACE SMALL Q -U+1D69B 𝚛 \ttr MATHEMATICAL MONOSPACE SMALL R -U+1D69C 𝚜 \tts MATHEMATICAL MONOSPACE SMALL S -U+1D69D 𝚝 \ttt MATHEMATICAL MONOSPACE SMALL T -U+1D69E 𝚞 \ttu MATHEMATICAL MONOSPACE SMALL U -U+1D69F 𝚟 \ttv MATHEMATICAL MONOSPACE SMALL V -U+1D6A0 𝚠 \ttw MATHEMATICAL MONOSPACE SMALL W -U+1D6A1 𝚡 \ttx MATHEMATICAL MONOSPACE SMALL X -U+1D6A2 𝚢 \tty MATHEMATICAL MONOSPACE SMALL Y -U+1D6A3 𝚣 \ttz MATHEMATICAL MONOSPACE SMALL Z -U+1D6A4 𝚤 \itimath MATHEMATICAL ITALIC SMALL DOTLESS I -U+1D6A5 𝚥 \itjmath MATHEMATICAL ITALIC SMALL DOTLESS J -U+1D6A8 𝚨 \bfAlpha MATHEMATICAL BOLD CAPITAL ALPHA -U+1D6A9 𝚩 \bfBeta MATHEMATICAL BOLD CAPITAL BETA -U+1D6AA 𝚪 \bfGamma MATHEMATICAL BOLD CAPITAL GAMMA -U+1D6AB 𝚫 \bfDelta MATHEMATICAL BOLD CAPITAL DELTA -U+1D6AC 𝚬 \bfEpsilon MATHEMATICAL BOLD CAPITAL EPSILON -U+1D6AD 𝚭 \bfZeta MATHEMATICAL BOLD CAPITAL ZETA -U+1D6AE 𝚮 \bfEta MATHEMATICAL BOLD CAPITAL ETA -U+1D6AF 𝚯 \bfTheta MATHEMATICAL BOLD CAPITAL THETA -U+1D6B0 𝚰 \bfIota MATHEMATICAL BOLD CAPITAL IOTA -U+1D6B1 𝚱 \bfKappa MATHEMATICAL BOLD CAPITAL KAPPA -U+1D6B2 𝚲 \bfLambda MATHEMATICAL BOLD CAPITAL LAMDA -U+1D6B3 𝚳 \bfMu MATHEMATICAL BOLD CAPITAL MU -U+1D6B4 𝚴 \bfNu MATHEMATICAL BOLD CAPITAL NU -U+1D6B5 𝚵 \bfXi MATHEMATICAL BOLD CAPITAL XI -U+1D6B6 𝚶 \bfOmicron MATHEMATICAL BOLD CAPITAL OMICRON -U+1D6B7 𝚷 \bfPi MATHEMATICAL BOLD CAPITAL PI -U+1D6B8 𝚸 \bfRho MATHEMATICAL BOLD CAPITAL RHO -U+1D6B9 𝚹 \bfvarTheta MATHEMATICAL BOLD CAPITAL THETA SYMBOL -U+1D6BA 𝚺 \bfSigma MATHEMATICAL BOLD CAPITAL SIGMA -U+1D6BB 𝚻 \bfTau MATHEMATICAL BOLD CAPITAL TAU -U+1D6BC 𝚼 \bfUpsilon MATHEMATICAL BOLD CAPITAL UPSILON -U+1D6BD 𝚽 \bfPhi MATHEMATICAL BOLD CAPITAL PHI -U+1D6BE 𝚾 \bfChi MATHEMATICAL BOLD CAPITAL CHI -U+1D6BF 𝚿 \bfPsi MATHEMATICAL BOLD CAPITAL PSI -U+1D6C0 𝛀 \bfOmega MATHEMATICAL BOLD CAPITAL OMEGA -U+1D6C1 𝛁 \bfnabla MATHEMATICAL BOLD NABLA -U+1D6C2 𝛂 \bfalpha MATHEMATICAL BOLD SMALL ALPHA -U+1D6C3 𝛃 \bfbeta MATHEMATICAL BOLD SMALL BETA -U+1D6C4 𝛄 \bfgamma MATHEMATICAL BOLD SMALL GAMMA -U+1D6C5 𝛅 \bfdelta MATHEMATICAL BOLD SMALL DELTA -U+1D6C6 𝛆 \bfepsilon MATHEMATICAL BOLD SMALL EPSILON -U+1D6C7 𝛇 \bfzeta MATHEMATICAL BOLD SMALL ZETA -U+1D6C8 𝛈 \bfeta MATHEMATICAL BOLD SMALL ETA -U+1D6C9 𝛉 \bftheta MATHEMATICAL BOLD SMALL THETA -U+1D6CA 𝛊 \bfiota MATHEMATICAL BOLD SMALL IOTA -U+1D6CB 𝛋 \bfkappa MATHEMATICAL BOLD SMALL KAPPA -U+1D6CC 𝛌 \bflambda MATHEMATICAL BOLD SMALL LAMDA -U+1D6CD 𝛍 \bfmu MATHEMATICAL BOLD SMALL MU -U+1D6CE 𝛎 \bfnu MATHEMATICAL BOLD SMALL NU -U+1D6CF 𝛏 \bfxi MATHEMATICAL BOLD SMALL XI -U+1D6D0 𝛐 \bfomicron MATHEMATICAL BOLD SMALL OMICRON -U+1D6D1 𝛑 \bfpi MATHEMATICAL BOLD SMALL PI -U+1D6D2 𝛒 \bfrho MATHEMATICAL BOLD SMALL RHO -U+1D6D3 𝛓 \bfvarsigma MATHEMATICAL BOLD SMALL FINAL SIGMA -U+1D6D4 𝛔 \bfsigma MATHEMATICAL BOLD SMALL SIGMA -U+1D6D5 𝛕 \bftau MATHEMATICAL BOLD SMALL TAU -U+1D6D6 𝛖 \bfupsilon MATHEMATICAL BOLD SMALL UPSILON -U+1D6D7 𝛗 \bfvarphi MATHEMATICAL BOLD SMALL PHI -U+1D6D8 𝛘 \bfchi MATHEMATICAL BOLD SMALL CHI -U+1D6D9 𝛙 \bfpsi MATHEMATICAL BOLD SMALL PSI -U+1D6DA 𝛚 \bfomega MATHEMATICAL BOLD SMALL OMEGA -U+1D6DB 𝛛 \bfpartial MATHEMATICAL BOLD PARTIAL DIFFERENTIAL -U+1D6DC 𝛜 \bfvarepsilon MATHEMATICAL BOLD EPSILON SYMBOL -U+1D6DD 𝛝 \bfvartheta MATHEMATICAL BOLD THETA SYMBOL -U+1D6DE 𝛞 \bfvarkappa MATHEMATICAL BOLD KAPPA SYMBOL -U+1D6DF 𝛟 \bfphi MATHEMATICAL BOLD PHI SYMBOL -U+1D6E0 𝛠 \bfvarrho MATHEMATICAL BOLD RHO SYMBOL -U+1D6E1 𝛡 \bfvarpi MATHEMATICAL BOLD PI SYMBOL -U+1D6E2 𝛢 \itAlpha MATHEMATICAL ITALIC CAPITAL ALPHA -U+1D6E3 𝛣 \itBeta MATHEMATICAL ITALIC CAPITAL BETA -U+1D6E4 𝛤 \itGamma MATHEMATICAL ITALIC CAPITAL GAMMA -U+1D6E5 𝛥 \itDelta MATHEMATICAL ITALIC CAPITAL DELTA -U+1D6E6 𝛦 \itEpsilon MATHEMATICAL ITALIC CAPITAL EPSILON -U+1D6E7 𝛧 \itZeta MATHEMATICAL ITALIC CAPITAL ZETA -U+1D6E8 𝛨 \itEta MATHEMATICAL ITALIC CAPITAL ETA -U+1D6E9 𝛩 \itTheta MATHEMATICAL ITALIC CAPITAL THETA -U+1D6EA 𝛪 \itIota MATHEMATICAL ITALIC CAPITAL IOTA -U+1D6EB 𝛫 \itKappa MATHEMATICAL ITALIC CAPITAL KAPPA -U+1D6EC 𝛬 \itLambda MATHEMATICAL ITALIC CAPITAL LAMDA -U+1D6ED 𝛭 \itMu MATHEMATICAL ITALIC CAPITAL MU -U+1D6EE 𝛮 \itNu MATHEMATICAL ITALIC CAPITAL NU -U+1D6EF 𝛯 \itXi MATHEMATICAL ITALIC CAPITAL XI -U+1D6F0 𝛰 \itOmicron MATHEMATICAL ITALIC CAPITAL OMICRON -U+1D6F1 𝛱 \itPi MATHEMATICAL ITALIC CAPITAL PI -U+1D6F2 𝛲 \itRho MATHEMATICAL ITALIC CAPITAL RHO -U+1D6F3 𝛳 \itvarTheta MATHEMATICAL ITALIC CAPITAL THETA SYMBOL -U+1D6F4 𝛴 \itSigma MATHEMATICAL ITALIC CAPITAL SIGMA -U+1D6F5 𝛵 \itTau MATHEMATICAL ITALIC CAPITAL TAU -U+1D6F6 𝛶 \itUpsilon MATHEMATICAL ITALIC CAPITAL UPSILON -U+1D6F7 𝛷 \itPhi MATHEMATICAL ITALIC CAPITAL PHI -U+1D6F8 𝛸 \itChi MATHEMATICAL ITALIC CAPITAL CHI -U+1D6F9 𝛹 \itPsi MATHEMATICAL ITALIC CAPITAL PSI -U+1D6FA 𝛺 \itOmega MATHEMATICAL ITALIC CAPITAL OMEGA -U+1D6FB 𝛻 \itnabla MATHEMATICAL ITALIC NABLA -U+1D6FC 𝛼 \italpha MATHEMATICAL ITALIC SMALL ALPHA -U+1D6FD 𝛽 \itbeta MATHEMATICAL ITALIC SMALL BETA -U+1D6FE 𝛾 \itgamma MATHEMATICAL ITALIC SMALL GAMMA -U+1D6FF 𝛿 \itdelta MATHEMATICAL ITALIC SMALL DELTA -U+1D700 𝜀 \itepsilon MATHEMATICAL ITALIC SMALL EPSILON -U+1D701 𝜁 \itzeta MATHEMATICAL ITALIC SMALL ZETA -U+1D702 𝜂 \iteta MATHEMATICAL ITALIC SMALL ETA -U+1D703 𝜃 \ittheta MATHEMATICAL ITALIC SMALL THETA -U+1D704 𝜄 \itiota MATHEMATICAL ITALIC SMALL IOTA -U+1D705 𝜅 \itkappa MATHEMATICAL ITALIC SMALL KAPPA -U+1D706 𝜆 \itlambda MATHEMATICAL ITALIC SMALL LAMDA -U+1D707 𝜇 \itmu MATHEMATICAL ITALIC SMALL MU -U+1D708 𝜈 \itnu MATHEMATICAL ITALIC SMALL NU -U+1D709 𝜉 \itxi MATHEMATICAL ITALIC SMALL XI -U+1D70A 𝜊 \itomicron MATHEMATICAL ITALIC SMALL OMICRON -U+1D70B 𝜋 \itpi MATHEMATICAL ITALIC SMALL PI -U+1D70C 𝜌 \itrho MATHEMATICAL ITALIC SMALL RHO -U+1D70D 𝜍 \itvarsigma MATHEMATICAL ITALIC SMALL FINAL SIGMA -U+1D70E 𝜎 \itsigma MATHEMATICAL ITALIC SMALL SIGMA -U+1D70F 𝜏 \ittau MATHEMATICAL ITALIC SMALL TAU -U+1D710 𝜐 \itupsilon MATHEMATICAL ITALIC SMALL UPSILON -U+1D711 𝜑 \itphi MATHEMATICAL ITALIC SMALL PHI -U+1D712 𝜒 \itchi MATHEMATICAL ITALIC SMALL CHI -U+1D713 𝜓 \itpsi MATHEMATICAL ITALIC SMALL PSI -U+1D714 𝜔 \itomega MATHEMATICAL ITALIC SMALL OMEGA -U+1D715 𝜕 \itpartial MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL -U+1D716 𝜖 \itvarepsilon MATHEMATICAL ITALIC EPSILON SYMBOL -U+1D717 𝜗 \itvartheta MATHEMATICAL ITALIC THETA SYMBOL -U+1D718 𝜘 \itvarkappa MATHEMATICAL ITALIC KAPPA SYMBOL -U+1D719 𝜙 \itvarphi MATHEMATICAL ITALIC PHI SYMBOL -U+1D71A 𝜚 \itvarrho MATHEMATICAL ITALIC RHO SYMBOL -U+1D71B 𝜛 \itvarpi MATHEMATICAL ITALIC PI SYMBOL -U+1D71C 𝜜 \biAlpha MATHEMATICAL BOLD ITALIC CAPITAL ALPHA -U+1D71D 𝜝 \biBeta MATHEMATICAL BOLD ITALIC CAPITAL BETA -U+1D71E 𝜞 \biGamma MATHEMATICAL BOLD ITALIC CAPITAL GAMMA -U+1D71F 𝜟 \biDelta MATHEMATICAL BOLD ITALIC CAPITAL DELTA -U+1D720 𝜠 \biEpsilon MATHEMATICAL BOLD ITALIC CAPITAL EPSILON -U+1D721 𝜡 \biZeta MATHEMATICAL BOLD ITALIC CAPITAL ZETA -U+1D722 𝜢 \biEta MATHEMATICAL BOLD ITALIC CAPITAL ETA -U+1D723 𝜣 \biTheta MATHEMATICAL BOLD ITALIC CAPITAL THETA -U+1D724 𝜤 \biIota MATHEMATICAL BOLD ITALIC CAPITAL IOTA -U+1D725 𝜥 \biKappa MATHEMATICAL BOLD ITALIC CAPITAL KAPPA -U+1D726 𝜦 \biLambda MATHEMATICAL BOLD ITALIC CAPITAL LAMDA -U+1D727 𝜧 \biMu MATHEMATICAL BOLD ITALIC CAPITAL MU -U+1D728 𝜨 \biNu MATHEMATICAL BOLD ITALIC CAPITAL NU -U+1D729 𝜩 \biXi MATHEMATICAL BOLD ITALIC CAPITAL XI -U+1D72A 𝜪 \biOmicron MATHEMATICAL BOLD ITALIC CAPITAL OMICRON -U+1D72B 𝜫 \biPi MATHEMATICAL BOLD ITALIC CAPITAL PI -U+1D72C 𝜬 \biRho MATHEMATICAL BOLD ITALIC CAPITAL RHO -U+1D72D 𝜭 \bivarTheta MATHEMATICAL BOLD ITALIC CAPITAL THETA SYMBOL -U+1D72E 𝜮 \biSigma MATHEMATICAL BOLD ITALIC CAPITAL SIGMA -U+1D72F 𝜯 \biTau MATHEMATICAL BOLD ITALIC CAPITAL TAU -U+1D730 𝜰 \biUpsilon MATHEMATICAL BOLD ITALIC CAPITAL UPSILON -U+1D731 𝜱 \biPhi MATHEMATICAL BOLD ITALIC CAPITAL PHI -U+1D732 𝜲 \biChi MATHEMATICAL BOLD ITALIC CAPITAL CHI -U+1D733 𝜳 \biPsi MATHEMATICAL BOLD ITALIC CAPITAL PSI -U+1D734 𝜴 \biOmega MATHEMATICAL BOLD ITALIC CAPITAL OMEGA -U+1D735 𝜵 \binabla MATHEMATICAL BOLD ITALIC NABLA -U+1D736 𝜶 \bialpha MATHEMATICAL BOLD ITALIC SMALL ALPHA -U+1D737 𝜷 \bibeta MATHEMATICAL BOLD ITALIC SMALL BETA -U+1D738 𝜸 \bigamma MATHEMATICAL BOLD ITALIC SMALL GAMMA -U+1D739 𝜹 \bidelta MATHEMATICAL BOLD ITALIC SMALL DELTA -U+1D73A 𝜺 \biepsilon MATHEMATICAL BOLD ITALIC SMALL EPSILON -U+1D73B 𝜻 \bizeta MATHEMATICAL BOLD ITALIC SMALL ZETA -U+1D73C 𝜼 \bieta MATHEMATICAL BOLD ITALIC SMALL ETA -U+1D73D 𝜽 \bitheta MATHEMATICAL BOLD ITALIC SMALL THETA -U+1D73E 𝜾 \biiota MATHEMATICAL BOLD ITALIC SMALL IOTA -U+1D73F 𝜿 \bikappa MATHEMATICAL BOLD ITALIC SMALL KAPPA -U+1D740 𝝀 \bilambda MATHEMATICAL BOLD ITALIC SMALL LAMDA -U+1D741 𝝁 \bimu MATHEMATICAL BOLD ITALIC SMALL MU -U+1D742 𝝂 \binu MATHEMATICAL BOLD ITALIC SMALL NU -U+1D743 𝝃 \bixi MATHEMATICAL BOLD ITALIC SMALL XI -U+1D744 𝝄 \biomicron MATHEMATICAL BOLD ITALIC SMALL OMICRON -U+1D745 𝝅 \bipi MATHEMATICAL BOLD ITALIC SMALL PI -U+1D746 𝝆 \birho MATHEMATICAL BOLD ITALIC SMALL RHO -U+1D747 𝝇 \bivarsigma MATHEMATICAL BOLD ITALIC SMALL FINAL SIGMA -U+1D748 𝝈 \bisigma MATHEMATICAL BOLD ITALIC SMALL SIGMA -U+1D749 𝝉 \bitau MATHEMATICAL BOLD ITALIC SMALL TAU -U+1D74A 𝝊 \biupsilon MATHEMATICAL BOLD ITALIC SMALL UPSILON -U+1D74B 𝝋 \biphi MATHEMATICAL BOLD ITALIC SMALL PHI -U+1D74C 𝝌 \bichi MATHEMATICAL BOLD ITALIC SMALL CHI -U+1D74D 𝝍 \bipsi MATHEMATICAL BOLD ITALIC SMALL PSI -U+1D74E 𝝎 \biomega MATHEMATICAL BOLD ITALIC SMALL OMEGA -U+1D74F 𝝏 \bipartial MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL -U+1D750 𝝐 \bivarepsilon MATHEMATICAL BOLD ITALIC EPSILON SYMBOL -U+1D751 𝝑 \bivartheta MATHEMATICAL BOLD ITALIC THETA SYMBOL -U+1D752 𝝒 \bivarkappa MATHEMATICAL BOLD ITALIC KAPPA SYMBOL -U+1D753 𝝓 \bivarphi MATHEMATICAL BOLD ITALIC PHI SYMBOL -U+1D754 𝝔 \bivarrho MATHEMATICAL BOLD ITALIC RHO SYMBOL -U+1D755 𝝕 \bivarpi MATHEMATICAL BOLD ITALIC PI SYMBOL -U+1D756 𝝖 \bsansAlpha MATHEMATICAL SANS-SERIF BOLD CAPITAL ALPHA -U+1D757 𝝗 \bsansBeta MATHEMATICAL SANS-SERIF BOLD CAPITAL BETA -U+1D758 𝝘 \bsansGamma MATHEMATICAL SANS-SERIF BOLD CAPITAL GAMMA -U+1D759 𝝙 \bsansDelta MATHEMATICAL SANS-SERIF BOLD CAPITAL DELTA -U+1D75A 𝝚 \bsansEpsilon MATHEMATICAL SANS-SERIF BOLD CAPITAL EPSILON -U+1D75B 𝝛 \bsansZeta MATHEMATICAL SANS-SERIF BOLD CAPITAL ZETA -U+1D75C 𝝜 \bsansEta MATHEMATICAL SANS-SERIF BOLD CAPITAL ETA -U+1D75D 𝝝 \bsansTheta MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA -U+1D75E 𝝞 \bsansIota MATHEMATICAL SANS-SERIF BOLD CAPITAL IOTA -U+1D75F 𝝟 \bsansKappa MATHEMATICAL SANS-SERIF BOLD CAPITAL KAPPA -U+1D760 𝝠 \bsansLambda MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA -U+1D761 𝝡 \bsansMu MATHEMATICAL SANS-SERIF BOLD CAPITAL MU -U+1D762 𝝢 \bsansNu MATHEMATICAL SANS-SERIF BOLD CAPITAL NU -U+1D763 𝝣 \bsansXi MATHEMATICAL SANS-SERIF BOLD CAPITAL XI -U+1D764 𝝤 \bsansOmicron MATHEMATICAL SANS-SERIF BOLD CAPITAL OMICRON -U+1D765 𝝥 \bsansPi MATHEMATICAL SANS-SERIF BOLD CAPITAL PI -U+1D766 𝝦 \bsansRho MATHEMATICAL SANS-SERIF BOLD CAPITAL RHO -U+1D767 𝝧 \bsansvarTheta MATHEMATICAL SANS-SERIF BOLD CAPITAL THETA SYMBOL -U+1D768 𝝨 \bsansSigma MATHEMATICAL SANS-SERIF BOLD CAPITAL SIGMA -U+1D769 𝝩 \bsansTau MATHEMATICAL SANS-SERIF BOLD CAPITAL TAU -U+1D76A 𝝪 \bsansUpsilon MATHEMATICAL SANS-SERIF BOLD CAPITAL UPSILON -U+1D76B 𝝫 \bsansPhi MATHEMATICAL SANS-SERIF BOLD CAPITAL PHI -U+1D76C 𝝬 \bsansChi MATHEMATICAL SANS-SERIF BOLD CAPITAL CHI -U+1D76D 𝝭 \bsansPsi MATHEMATICAL SANS-SERIF BOLD CAPITAL PSI -U+1D76E 𝝮 \bsansOmega MATHEMATICAL SANS-SERIF BOLD CAPITAL OMEGA -U+1D76F 𝝯 \bsansnabla MATHEMATICAL SANS-SERIF BOLD NABLA -U+1D770 𝝰 \bsansalpha MATHEMATICAL SANS-SERIF BOLD SMALL ALPHA -U+1D771 𝝱 \bsansbeta MATHEMATICAL SANS-SERIF BOLD SMALL BETA -U+1D772 𝝲 \bsansgamma MATHEMATICAL SANS-SERIF BOLD SMALL GAMMA -U+1D773 𝝳 \bsansdelta MATHEMATICAL SANS-SERIF BOLD SMALL DELTA -U+1D774 𝝴 \bsansepsilon MATHEMATICAL SANS-SERIF BOLD SMALL EPSILON -U+1D775 𝝵 \bsanszeta MATHEMATICAL SANS-SERIF BOLD SMALL ZETA -U+1D776 𝝶 \bsanseta MATHEMATICAL SANS-SERIF BOLD SMALL ETA -U+1D777 𝝷 \bsanstheta MATHEMATICAL SANS-SERIF BOLD SMALL THETA -U+1D778 𝝸 \bsansiota MATHEMATICAL SANS-SERIF BOLD SMALL IOTA -U+1D779 𝝹 \bsanskappa MATHEMATICAL SANS-SERIF BOLD SMALL KAPPA -U+1D77A 𝝺 \bsanslambda MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA -U+1D77B 𝝻 \bsansmu MATHEMATICAL SANS-SERIF BOLD SMALL MU -U+1D77C 𝝼 \bsansnu MATHEMATICAL SANS-SERIF BOLD SMALL NU -U+1D77D 𝝽 \bsansxi MATHEMATICAL SANS-SERIF BOLD SMALL XI -U+1D77E 𝝾 \bsansomicron MATHEMATICAL SANS-SERIF BOLD SMALL OMICRON -U+1D77F 𝝿 \bsanspi MATHEMATICAL SANS-SERIF BOLD SMALL PI -U+1D780 𝞀 \bsansrho MATHEMATICAL SANS-SERIF BOLD SMALL RHO -U+1D781 𝞁 \bsansvarsigma MATHEMATICAL SANS-SERIF BOLD SMALL FINAL SIGMA -U+1D782 𝞂 \bsanssigma MATHEMATICAL SANS-SERIF BOLD SMALL SIGMA -U+1D783 𝞃 \bsanstau MATHEMATICAL SANS-SERIF BOLD SMALL TAU -U+1D784 𝞄 \bsansupsilon MATHEMATICAL SANS-SERIF BOLD SMALL UPSILON -U+1D785 𝞅 \bsansphi MATHEMATICAL SANS-SERIF BOLD SMALL PHI -U+1D786 𝞆 \bsanschi MATHEMATICAL SANS-SERIF BOLD SMALL CHI -U+1D787 𝞇 \bsanspsi MATHEMATICAL SANS-SERIF BOLD SMALL PSI -U+1D788 𝞈 \bsansomega MATHEMATICAL SANS-SERIF BOLD SMALL OMEGA -U+1D789 𝞉 \bsanspartial MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL -U+1D78A 𝞊 \bsansvarepsilon MATHEMATICAL SANS-SERIF BOLD EPSILON SYMBOL -U+1D78B 𝞋 \bsansvartheta MATHEMATICAL SANS-SERIF BOLD THETA SYMBOL -U+1D78C 𝞌 \bsansvarkappa MATHEMATICAL SANS-SERIF BOLD KAPPA SYMBOL -U+1D78D 𝞍 \bsansvarphi MATHEMATICAL SANS-SERIF BOLD PHI SYMBOL -U+1D78E 𝞎 \bsansvarrho MATHEMATICAL SANS-SERIF BOLD RHO SYMBOL -U+1D78F 𝞏 \bsansvarpi MATHEMATICAL SANS-SERIF BOLD PI SYMBOL -U+1D790 𝞐 \bisansAlpha MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ALPHA -U+1D791 𝞑 \bisansBeta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL BETA -U+1D792 𝞒 \bisansGamma MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL GAMMA -U+1D793 𝞓 \bisansDelta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL DELTA -U+1D794 𝞔 \bisansEpsilon MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL EPSILON -U+1D795 𝞕 \bisansZeta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ZETA -U+1D796 𝞖 \bisansEta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL ETA -U+1D797 𝞗 \bisansTheta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA -U+1D798 𝞘 \bisansIota MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL IOTA -U+1D799 𝞙 \bisansKappa MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL KAPPA -U+1D79A 𝞚 \bisansLambda MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA -U+1D79B 𝞛 \bisansMu MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL MU -U+1D79C 𝞜 \bisansNu MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL NU -U+1D79D 𝞝 \bisansXi MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL XI -U+1D79E 𝞞 \bisansOmicron MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMICRON -U+1D79F 𝞟 \bisansPi MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PI -U+1D7A0 𝞠 \bisansRho MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL RHO -U+1D7A1 𝞡 \bisansvarTheta MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL THETA SYMBOL -U+1D7A2 𝞢 \bisansSigma MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL SIGMA -U+1D7A3 𝞣 \bisansTau MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL TAU -U+1D7A4 𝞤 \bisansUpsilon MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL UPSILON -U+1D7A5 𝞥 \bisansPhi MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PHI -U+1D7A6 𝞦 \bisansChi MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL CHI -U+1D7A7 𝞧 \bisansPsi MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL PSI -U+1D7A8 𝞨 \bisansOmega MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL OMEGA -U+1D7A9 𝞩 \bisansnabla MATHEMATICAL SANS-SERIF BOLD ITALIC NABLA -U+1D7AA 𝞪 \bisansalpha MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ALPHA -U+1D7AB 𝞫 \bisansbeta MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL BETA -U+1D7AC 𝞬 \bisansgamma MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL GAMMA -U+1D7AD 𝞭 \bisansdelta MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL DELTA -U+1D7AE 𝞮 \bisansepsilon MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL EPSILON -U+1D7AF 𝞯 \bisanszeta MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ZETA -U+1D7B0 𝞰 \bisanseta MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL ETA -U+1D7B1 𝞱 \bisanstheta MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL THETA -U+1D7B2 𝞲 \bisansiota MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL IOTA -U+1D7B3 𝞳 \bisanskappa MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL KAPPA -U+1D7B4 𝞴 \bisanslambda MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA -U+1D7B5 𝞵 \bisansmu MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL MU -U+1D7B6 𝞶 \bisansnu MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL NU -U+1D7B7 𝞷 \bisansxi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL XI -U+1D7B8 𝞸 \bisansomicron MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMICRON -U+1D7B9 𝞹 \bisanspi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PI -U+1D7BA 𝞺 \bisansrho MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL RHO -U+1D7BB 𝞻 \bisansvarsigma MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL FINAL SIGMA -U+1D7BC 𝞼 \bisanssigma MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL SIGMA -U+1D7BD 𝞽 \bisanstau MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL TAU -U+1D7BE 𝞾 \bisansupsilon MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL UPSILON -U+1D7BF 𝞿 \bisansphi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PHI -U+1D7C0 𝟀 \bisanschi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL CHI -U+1D7C1 𝟁 \bisanspsi MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL PSI -U+1D7C2 𝟂 \bisansomega MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL OMEGA -U+1D7C3 𝟃 \bisanspartial MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL -U+1D7C4 𝟄 \bisansvarepsilon MATHEMATICAL SANS-SERIF BOLD ITALIC EPSILON SYMBOL -U+1D7C5 𝟅 \bisansvartheta MATHEMATICAL SANS-SERIF BOLD ITALIC THETA SYMBOL -U+1D7C6 𝟆 \bisansvarkappa MATHEMATICAL SANS-SERIF BOLD ITALIC KAPPA SYMBOL -U+1D7C7 𝟇 \bisansvarphi MATHEMATICAL SANS-SERIF BOLD ITALIC PHI SYMBOL -U+1D7C8 𝟈 \bisansvarrho MATHEMATICAL SANS-SERIF BOLD ITALIC RHO SYMBOL -U+1D7C9 𝟉 \bisansvarpi MATHEMATICAL SANS-SERIF BOLD ITALIC PI SYMBOL -U+1D7CA 𝟊 \bfDigamma MATHEMATICAL BOLD CAPITAL DIGAMMA -U+1D7CB 𝟋 \bfdigamma MATHEMATICAL BOLD SMALL DIGAMMA -U+1D7CE 𝟎 \bfzero MATHEMATICAL BOLD DIGIT ZERO -U+1D7CF 𝟏 \bfone MATHEMATICAL BOLD DIGIT ONE -U+1D7D0 𝟐 \bftwo MATHEMATICAL BOLD DIGIT TWO -U+1D7D1 𝟑 \bfthree MATHEMATICAL BOLD DIGIT THREE -U+1D7D2 𝟒 \bffour MATHEMATICAL BOLD DIGIT FOUR -U+1D7D3 𝟓 \bffive MATHEMATICAL BOLD DIGIT FIVE -U+1D7D4 𝟔 \bfsix MATHEMATICAL BOLD DIGIT SIX -U+1D7D5 𝟕 \bfseven MATHEMATICAL BOLD DIGIT SEVEN -U+1D7D6 𝟖 \bfeight MATHEMATICAL BOLD DIGIT EIGHT -U+1D7D7 𝟗 \bfnine MATHEMATICAL BOLD DIGIT NINE -U+1D7D8 𝟘 \bbzero MATHEMATICAL DOUBLE-STRUCK DIGIT ZERO -U+1D7D9 𝟙 \bbone MATHEMATICAL DOUBLE-STRUCK DIGIT ONE -U+1D7DA 𝟚 \bbtwo MATHEMATICAL DOUBLE-STRUCK DIGIT TWO -U+1D7DB 𝟛 \bbthree MATHEMATICAL DOUBLE-STRUCK DIGIT THREE -U+1D7DC 𝟜 \bbfour MATHEMATICAL DOUBLE-STRUCK DIGIT FOUR -U+1D7DD 𝟝 \bbfive MATHEMATICAL DOUBLE-STRUCK DIGIT FIVE -U+1D7DE 𝟞 \bbsix MATHEMATICAL DOUBLE-STRUCK DIGIT SIX -U+1D7DF 𝟟 \bbseven MATHEMATICAL DOUBLE-STRUCK DIGIT SEVEN -U+1D7E0 𝟠 \bbeight MATHEMATICAL DOUBLE-STRUCK DIGIT EIGHT -U+1D7E1 𝟡 \bbnine MATHEMATICAL DOUBLE-STRUCK DIGIT NINE -U+1D7E2 𝟢 \sanszero MATHEMATICAL SANS-SERIF DIGIT ZERO -U+1D7E3 𝟣 \sansone MATHEMATICAL SANS-SERIF DIGIT ONE -U+1D7E4 𝟤 \sanstwo MATHEMATICAL SANS-SERIF DIGIT TWO -U+1D7E5 𝟥 \sansthree MATHEMATICAL SANS-SERIF DIGIT THREE -U+1D7E6 𝟦 \sansfour MATHEMATICAL SANS-SERIF DIGIT FOUR -U+1D7E7 𝟧 \sansfive MATHEMATICAL SANS-SERIF DIGIT FIVE -U+1D7E8 𝟨 \sanssix MATHEMATICAL SANS-SERIF DIGIT SIX -U+1D7E9 𝟩 \sansseven MATHEMATICAL SANS-SERIF DIGIT SEVEN -U+1D7EA 𝟪 \sanseight MATHEMATICAL SANS-SERIF DIGIT EIGHT -U+1D7EB 𝟫 \sansnine MATHEMATICAL SANS-SERIF DIGIT NINE -U+1D7EC 𝟬 \bsanszero MATHEMATICAL SANS-SERIF BOLD DIGIT ZERO -U+1D7ED 𝟭 \bsansone MATHEMATICAL SANS-SERIF BOLD DIGIT ONE -U+1D7EE 𝟮 \bsanstwo MATHEMATICAL SANS-SERIF BOLD DIGIT TWO -U+1D7EF 𝟯 \bsansthree MATHEMATICAL SANS-SERIF BOLD DIGIT THREE -U+1D7F0 𝟰 \bsansfour MATHEMATICAL SANS-SERIF BOLD DIGIT FOUR -U+1D7F1 𝟱 \bsansfive MATHEMATICAL SANS-SERIF BOLD DIGIT FIVE -U+1D7F2 𝟲 \bsanssix MATHEMATICAL SANS-SERIF BOLD DIGIT SIX -U+1D7F3 𝟳 \bsansseven MATHEMATICAL SANS-SERIF BOLD DIGIT SEVEN -U+1D7F4 𝟴 \bsanseight MATHEMATICAL SANS-SERIF BOLD DIGIT EIGHT -U+1D7F5 𝟵 \bsansnine MATHEMATICAL SANS-SERIF BOLD DIGIT NINE -U+1D7F6 𝟶 \ttzero MATHEMATICAL MONOSPACE DIGIT ZERO -U+1D7F7 𝟷 \ttone MATHEMATICAL MONOSPACE DIGIT ONE -U+1D7F8 𝟸 \tttwo MATHEMATICAL MONOSPACE DIGIT TWO -U+1D7F9 𝟹 \ttthree MATHEMATICAL MONOSPACE DIGIT THREE -U+1D7FA 𝟺 \ttfour MATHEMATICAL MONOSPACE DIGIT FOUR -U+1D7FB 𝟻 \ttfive MATHEMATICAL MONOSPACE DIGIT FIVE -U+1D7FC 𝟼 \ttsix MATHEMATICAL MONOSPACE DIGIT SIX -U+1D7FD 𝟽 \ttseven MATHEMATICAL MONOSPACE DIGIT SEVEN -U+1D7FE 𝟾 \tteight MATHEMATICAL MONOSPACE DIGIT EIGHT -U+1D7FF 𝟿 \ttnine MATHEMATICAL MONOSPACE DIGIT NINE -U+1F004 🀄 \:mahjong: MAHJONG TILE RED DRAGON -U+1F0CF 🃏 \:black_joker: PLAYING CARD BLACK JOKER -U+1F170 🅰 \:a: NEGATIVE SQUARED LATIN CAPITAL LETTER A -U+1F171 🅱 \:b: NEGATIVE SQUARED LATIN CAPITAL LETTER B -U+1F17E 🅾 \:o2: NEGATIVE SQUARED LATIN CAPITAL LETTER O -U+1F17F 🅿 \:parking: NEGATIVE SQUARED LATIN CAPITAL LETTER P -U+1F18E 🆎 \:ab: NEGATIVE SQUARED AB -U+1F191 🆑 \:cl: SQUARED CL -U+1F192 🆒 \:cool: SQUARED COOL -U+1F193 🆓 \:free: SQUARED FREE -U+1F194 🆔 \:id: SQUARED ID -U+1F195 🆕 \:new: SQUARED NEW -U+1F196 🆖 \:ng: SQUARED NG -U+1F197 🆗 \:ok: SQUARED OK -U+1F198 🆘 \:sos: SQUARED SOS -U+1F199 🆙 \:up: SQUARED UP WITH EXCLAMATION MARK -U+1F19A 🆚 \:vs: SQUARED VS -U+1F201 🈁 \:koko: SQUARED KATAKANA KOKO -U+1F202 🈂 \:sa: SQUARED KATAKANA SA -U+1F21A 🈚 \:u7121: SQUARED CJK UNIFIED IDEOGRAPH-7121 -U+1F22F 🈯 \:u6307: SQUARED CJK UNIFIED IDEOGRAPH-6307 -U+1F232 🈲 \:u7981: SQUARED CJK UNIFIED IDEOGRAPH-7981 -U+1F233 🈳 \:u7a7a: SQUARED CJK UNIFIED IDEOGRAPH-7A7A -U+1F234 🈴 \:u5408: SQUARED CJK UNIFIED IDEOGRAPH-5408 -U+1F235 🈵 \:u6e80: SQUARED CJK UNIFIED IDEOGRAPH-6E80 -U+1F236 🈶 \:u6709: SQUARED CJK UNIFIED IDEOGRAPH-6709 -U+1F237 🈷 \:u6708: SQUARED CJK UNIFIED IDEOGRAPH-6708 -U+1F238 🈸 \:u7533: SQUARED CJK UNIFIED IDEOGRAPH-7533 -U+1F239 🈹 \:u5272: SQUARED CJK UNIFIED IDEOGRAPH-5272 -U+1F23A 🈺 \:u55b6: SQUARED CJK UNIFIED IDEOGRAPH-55B6 -U+1F250 🉐 \:ideograph_advantage: CIRCLED IDEOGRAPH ADVANTAGE -U+1F251 🉑 \:accept: CIRCLED IDEOGRAPH ACCEPT -U+1F300 🌀 \:cyclone: CYCLONE -U+1F301 🌁 \:foggy: FOGGY -U+1F302 🌂 \:closed_umbrella: CLOSED UMBRELLA -U+1F303 🌃 \:night_with_stars: NIGHT WITH STARS -U+1F304 🌄 \:sunrise_over_mountains: SUNRISE OVER MOUNTAINS -U+1F305 🌅 \:sunrise: SUNRISE -U+1F306 🌆 \:city_sunset: CITYSCAPE AT DUSK -U+1F307 🌇 \:city_sunrise: SUNSET OVER BUILDINGS -U+1F308 🌈 \:rainbow: RAINBOW -U+1F309 🌉 \:bridge_at_night: BRIDGE AT NIGHT -U+1F30A 🌊 \:ocean: WATER WAVE -U+1F30B 🌋 \:volcano: VOLCANO -U+1F30C 🌌 \:milky_way: MILKY WAY -U+1F30D 🌍 \:earth_africa: EARTH GLOBE EUROPE-AFRICA -U+1F30E 🌎 \:earth_americas: EARTH GLOBE AMERICAS -U+1F30F 🌏 \:earth_asia: EARTH GLOBE ASIA-AUSTRALIA -U+1F310 🌐 \:globe_with_meridians: GLOBE WITH MERIDIANS -U+1F311 🌑 \:new_moon: NEW MOON SYMBOL -U+1F312 🌒 \:waxing_crescent_moon: WAXING CRESCENT MOON SYMBOL -U+1F313 🌓 \:first_quarter_moon: FIRST QUARTER MOON SYMBOL -U+1F314 🌔 \:moon: WAXING GIBBOUS MOON SYMBOL -U+1F315 🌕 \:full_moon: FULL MOON SYMBOL -U+1F316 🌖 \:waning_gibbous_moon: WANING GIBBOUS MOON SYMBOL -U+1F317 🌗 \:last_quarter_moon: LAST QUARTER MOON SYMBOL -U+1F318 🌘 \:waning_crescent_moon: WANING CRESCENT MOON SYMBOL -U+1F319 🌙 \:crescent_moon: CRESCENT MOON -U+1F31A 🌚 \:new_moon_with_face: NEW MOON WITH FACE -U+1F31B 🌛 \:first_quarter_moon_with_face: FIRST QUARTER MOON WITH FACE -U+1F31C 🌜 \:last_quarter_moon_with_face: LAST QUARTER MOON WITH FACE -U+1F31D 🌝 \:full_moon_with_face: FULL MOON WITH FACE -U+1F31E 🌞 \:sun_with_face: SUN WITH FACE -U+1F31F 🌟 \:star2: GLOWING STAR -U+1F320 🌠 \:stars: SHOOTING STAR -U+1F330 🌰 \:chestnut: CHESTNUT -U+1F331 🌱 \:seedling: SEEDLING -U+1F332 🌲 \:evergreen_tree: EVERGREEN TREE -U+1F333 🌳 \:deciduous_tree: DECIDUOUS TREE -U+1F334 🌴 \:palm_tree: PALM TREE -U+1F335 🌵 \:cactus: CACTUS -U+1F337 🌷 \:tulip: TULIP -U+1F338 🌸 \:cherry_blossom: CHERRY BLOSSOM -U+1F339 🌹 \:rose: ROSE -U+1F33A 🌺 \:hibiscus: HIBISCUS -U+1F33B 🌻 \:sunflower: SUNFLOWER -U+1F33C 🌼 \:blossom: BLOSSOM -U+1F33D 🌽 \:corn: EAR OF MAIZE -U+1F33E 🌾 \:ear_of_rice: EAR OF RICE -U+1F33F 🌿 \:herb: HERB -U+1F340 🍀 \:four_leaf_clover: FOUR LEAF CLOVER -U+1F341 🍁 \:maple_leaf: MAPLE LEAF -U+1F342 🍂 \:fallen_leaf: FALLEN LEAF -U+1F343 🍃 \:leaves: LEAF FLUTTERING IN WIND -U+1F344 🍄 \:mushroom: MUSHROOM -U+1F345 🍅 \:tomato: TOMATO -U+1F346 🍆 \:eggplant: AUBERGINE -U+1F347 🍇 \:grapes: GRAPES -U+1F348 🍈 \:melon: MELON -U+1F349 🍉 \:watermelon: WATERMELON -U+1F34A 🍊 \:tangerine: TANGERINE -U+1F34B 🍋 \:lemon: LEMON -U+1F34C 🍌 \:banana: BANANA -U+1F34D 🍍 \:pineapple: PINEAPPLE -U+1F34E 🍎 \:apple: RED APPLE -U+1F34F 🍏 \:green_apple: GREEN APPLE -U+1F350 🍐 \:pear: PEAR -U+1F351 🍑 \:peach: PEACH -U+1F352 🍒 \:cherries: CHERRIES -U+1F353 🍓 \:strawberry: STRAWBERRY -U+1F354 🍔 \:hamburger: HAMBURGER -U+1F355 🍕 \:pizza: SLICE OF PIZZA -U+1F356 🍖 \:meat_on_bone: MEAT ON BONE -U+1F357 🍗 \:poultry_leg: POULTRY LEG -U+1F358 🍘 \:rice_cracker: RICE CRACKER -U+1F359 🍙 \:rice_ball: RICE BALL -U+1F35A 🍚 \:rice: COOKED RICE -U+1F35B 🍛 \:curry: CURRY AND RICE -U+1F35C 🍜 \:ramen: STEAMING BOWL -U+1F35D 🍝 \:spaghetti: SPAGHETTI -U+1F35E 🍞 \:bread: BREAD -U+1F35F 🍟 \:fries: FRENCH FRIES -U+1F360 🍠 \:sweet_potato: ROASTED SWEET POTATO -U+1F361 🍡 \:dango: DANGO -U+1F362 🍢 \:oden: ODEN -U+1F363 🍣 \:sushi: SUSHI -U+1F364 🍤 \:fried_shrimp: FRIED SHRIMP -U+1F365 🍥 \:fish_cake: FISH CAKE WITH SWIRL DESIGN -U+1F366 🍦 \:icecream: SOFT ICE CREAM -U+1F367 🍧 \:shaved_ice: SHAVED ICE -U+1F368 🍨 \:ice_cream: ICE CREAM -U+1F369 🍩 \:doughnut: DOUGHNUT -U+1F36A 🍪 \:cookie: COOKIE -U+1F36B 🍫 \:chocolate_bar: CHOCOLATE BAR -U+1F36C 🍬 \:candy: CANDY -U+1F36D 🍭 \:lollipop: LOLLIPOP -U+1F36E 🍮 \:custard: CUSTARD -U+1F36F 🍯 \:honey_pot: HONEY POT -U+1F370 🍰 \:cake: SHORTCAKE -U+1F371 🍱 \:bento: BENTO BOX -U+1F372 🍲 \:stew: POT OF FOOD -U+1F373 🍳 \:egg: COOKING -U+1F374 🍴 \:fork_and_knife: FORK AND KNIFE -U+1F375 🍵 \:tea: TEACUP WITHOUT HANDLE -U+1F376 🍶 \:sake: SAKE BOTTLE AND CUP -U+1F377 🍷 \:wine_glass: WINE GLASS -U+1F378 🍸 \:cocktail: COCKTAIL GLASS -U+1F379 🍹 \:tropical_drink: TROPICAL DRINK -U+1F37A 🍺 \:beer: BEER MUG -U+1F37B 🍻 \:beers: CLINKING BEER MUGS -U+1F37C 🍼 \:baby_bottle: BABY BOTTLE -U+1F380 🎀 \:ribbon: RIBBON -U+1F381 🎁 \:gift: WRAPPED PRESENT -U+1F382 🎂 \:birthday: BIRTHDAY CAKE -U+1F383 🎃 \:jack_o_lantern: JACK-O-LANTERN -U+1F384 🎄 \:christmas_tree: CHRISTMAS TREE -U+1F385 🎅 \:santa: FATHER CHRISTMAS -U+1F386 🎆 \:fireworks: FIREWORKS -U+1F387 🎇 \:sparkler: FIREWORK SPARKLER -U+1F388 🎈 \:balloon: BALLOON -U+1F389 🎉 \:tada: PARTY POPPER -U+1F38A 🎊 \:confetti_ball: CONFETTI BALL -U+1F38B 🎋 \:tanabata_tree: TANABATA TREE -U+1F38C 🎌 \:crossed_flags: CROSSED FLAGS -U+1F38D 🎍 \:bamboo: PINE DECORATION -U+1F38E 🎎 \:dolls: JAPANESE DOLLS -U+1F38F 🎏 \:flags: CARP STREAMER -U+1F390 🎐 \:wind_chime: WIND CHIME -U+1F391 🎑 \:rice_scene: MOON VIEWING CEREMONY -U+1F392 🎒 \:school_satchel: SCHOOL SATCHEL -U+1F393 🎓 \:mortar_board: GRADUATION CAP -U+1F3A0 🎠 \:carousel_horse: CAROUSEL HORSE -U+1F3A1 🎡 \:ferris_wheel: FERRIS WHEEL -U+1F3A2 🎢 \:roller_coaster: ROLLER COASTER -U+1F3A3 🎣 \:fishing_pole_and_fish: FISHING POLE AND FISH -U+1F3A4 🎤 \:microphone: MICROPHONE -U+1F3A5 🎥 \:movie_camera: MOVIE CAMERA -U+1F3A6 🎦 \:cinema: CINEMA -U+1F3A7 🎧 \:headphones: HEADPHONE -U+1F3A8 🎨 \:art: ARTIST PALETTE -U+1F3A9 🎩 \:tophat: TOP HAT -U+1F3AA 🎪 \:circus_tent: CIRCUS TENT -U+1F3AB 🎫 \:ticket: TICKET -U+1F3AC 🎬 \:clapper: CLAPPER BOARD -U+1F3AD 🎭 \:performing_arts: PERFORMING ARTS -U+1F3AE 🎮 \:video_game: VIDEO GAME -U+1F3AF 🎯 \:dart: DIRECT HIT -U+1F3B0 🎰 \:slot_machine: SLOT MACHINE -U+1F3B1 🎱 \:8ball: BILLIARDS -U+1F3B2 🎲 \:game_die: GAME DIE -U+1F3B3 🎳 \:bowling: BOWLING -U+1F3B4 🎴 \:flower_playing_cards: FLOWER PLAYING CARDS -U+1F3B5 🎵 \:musical_note: MUSICAL NOTE -U+1F3B6 🎶 \:notes: MULTIPLE MUSICAL NOTES -U+1F3B7 🎷 \:saxophone: SAXOPHONE -U+1F3B8 🎸 \:guitar: GUITAR -U+1F3B9 🎹 \:musical_keyboard: MUSICAL KEYBOARD -U+1F3BA 🎺 \:trumpet: TRUMPET -U+1F3BB 🎻 \:violin: VIOLIN -U+1F3BC 🎼 \:musical_score: MUSICAL SCORE -U+1F3BD 🎽 \:running_shirt_with_sash: RUNNING SHIRT WITH SASH -U+1F3BE 🎾 \:tennis: TENNIS RACQUET AND BALL -U+1F3BF 🎿 \:ski: SKI AND SKI BOOT -U+1F3C0 🏀 \:basketball: BASKETBALL AND HOOP -U+1F3C1 🏁 \:checkered_flag: CHEQUERED FLAG -U+1F3C2 🏂 \:snowboarder: SNOWBOARDER -U+1F3C3 🏃 \:runner: RUNNER -U+1F3C4 🏄 \:surfer: SURFER -U+1F3C6 🏆 \:trophy: TROPHY -U+1F3C7 🏇 \:horse_racing: HORSE RACING -U+1F3C8 🏈 \:football: AMERICAN FOOTBALL -U+1F3C9 🏉 \:rugby_football: RUGBY FOOTBALL -U+1F3CA 🏊 \:swimmer: SWIMMER -U+1F3E0 🏠 \:house: HOUSE BUILDING -U+1F3E1 🏡 \:house_with_garden: HOUSE WITH GARDEN -U+1F3E2 🏢 \:office: OFFICE BUILDING -U+1F3E3 🏣 \:post_office: JAPANESE POST OFFICE -U+1F3E4 🏤 \:european_post_office: EUROPEAN POST OFFICE -U+1F3E5 🏥 \:hospital: HOSPITAL -U+1F3E6 🏦 \:bank: BANK -U+1F3E7 🏧 \:atm: AUTOMATED TELLER MACHINE -U+1F3E8 🏨 \:hotel: HOTEL -U+1F3E9 🏩 \:love_hotel: LOVE HOTEL -U+1F3EA 🏪 \:convenience_store: CONVENIENCE STORE -U+1F3EB 🏫 \:school: SCHOOL -U+1F3EC 🏬 \:department_store: DEPARTMENT STORE -U+1F3ED 🏭 \:factory: FACTORY -U+1F3EE 🏮 \:izakaya_lantern: IZAKAYA LANTERN -U+1F3EF 🏯 \:japanese_castle: JAPANESE CASTLE -U+1F3F0 🏰 \:european_castle: EUROPEAN CASTLE -U+1F3FB 🏻 \:skin-tone-2: EMOJI MODIFIER FITZPATRICK TYPE-1-2 -U+1F3FC 🏼 \:skin-tone-3: EMOJI MODIFIER FITZPATRICK TYPE-3 -U+1F3FD 🏽 \:skin-tone-4: EMOJI MODIFIER FITZPATRICK TYPE-4 -U+1F3FE 🏾 \:skin-tone-5: EMOJI MODIFIER FITZPATRICK TYPE-5 -U+1F3FF 🏿 \:skin-tone-6: EMOJI MODIFIER FITZPATRICK TYPE-6 -U+1F400 🐀 \:rat: RAT -U+1F401 🐁 \:mouse2: MOUSE -U+1F402 🐂 \:ox: OX -U+1F403 🐃 \:water_buffalo: WATER BUFFALO -U+1F404 🐄 \:cow2: COW -U+1F405 🐅 \:tiger2: TIGER -U+1F406 🐆 \:leopard: LEOPARD -U+1F407 🐇 \:rabbit2: RABBIT -U+1F408 🐈 \:cat2: CAT -U+1F409 🐉 \:dragon: DRAGON -U+1F40A 🐊 \:crocodile: CROCODILE -U+1F40B 🐋 \:whale2: WHALE -U+1F40C 🐌 \:snail: SNAIL -U+1F40D 🐍 \:snake: SNAKE -U+1F40E 🐎 \:racehorse: HORSE -U+1F40F 🐏 \:ram: RAM -U+1F410 🐐 \:goat: GOAT -U+1F411 🐑 \:sheep: SHEEP -U+1F412 🐒 \:monkey: MONKEY -U+1F413 🐓 \:rooster: ROOSTER -U+1F414 🐔 \:chicken: CHICKEN -U+1F415 🐕 \:dog2: DOG -U+1F416 🐖 \:pig2: PIG -U+1F417 🐗 \:boar: BOAR -U+1F418 🐘 \:elephant: ELEPHANT -U+1F419 🐙 \:octopus: OCTOPUS -U+1F41A 🐚 \:shell: SPIRAL SHELL -U+1F41B 🐛 \:bug: BUG -U+1F41C 🐜 \:ant: ANT -U+1F41D 🐝 \:bee: HONEYBEE -U+1F41E 🐞 \:beetle: LADY BEETLE -U+1F41F 🐟 \:fish: FISH -U+1F420 🐠 \:tropical_fish: TROPICAL FISH -U+1F421 🐡 \:blowfish: BLOWFISH -U+1F422 🐢 \:turtle: TURTLE -U+1F423 🐣 \:hatching_chick: HATCHING CHICK -U+1F424 🐤 \:baby_chick: BABY CHICK -U+1F425 🐥 \:hatched_chick: FRONT-FACING BABY CHICK -U+1F426 🐦 \:bird: BIRD -U+1F427 🐧 \:penguin: PENGUIN -U+1F428 🐨 \:koala: KOALA -U+1F429 🐩 \:poodle: POODLE -U+1F42A 🐪 \:dromedary_camel: DROMEDARY CAMEL -U+1F42B 🐫 \:camel: BACTRIAN CAMEL -U+1F42C 🐬 \:dolphin: DOLPHIN -U+1F42D 🐭 \:mouse: MOUSE FACE -U+1F42E 🐮 \:cow: COW FACE -U+1F42F 🐯 \:tiger: TIGER FACE -U+1F430 🐰 \:rabbit: RABBIT FACE -U+1F431 🐱 \:cat: CAT FACE -U+1F432 🐲 \:dragon_face: DRAGON FACE -U+1F433 🐳 \:whale: SPOUTING WHALE -U+1F434 🐴 \:horse: HORSE FACE -U+1F435 🐵 \:monkey_face: MONKEY FACE -U+1F436 🐶 \:dog: DOG FACE -U+1F437 🐷 \:pig: PIG FACE -U+1F438 🐸 \:frog: FROG FACE -U+1F439 🐹 \:hamster: HAMSTER FACE -U+1F43A 🐺 \:wolf: WOLF FACE -U+1F43B 🐻 \:bear: BEAR FACE -U+1F43C 🐼 \:panda_face: PANDA FACE -U+1F43D 🐽 \:pig_nose: PIG NOSE -U+1F43E 🐾 \:feet: PAW PRINTS -U+1F440 👀 \:eyes: EYES -U+1F442 👂 \:ear: EAR -U+1F443 👃 \:nose: NOSE -U+1F444 👄 \:lips: MOUTH -U+1F445 👅 \:tongue: TONGUE -U+1F446 👆 \:point_up_2: WHITE UP POINTING BACKHAND INDEX -U+1F447 👇 \:point_down: WHITE DOWN POINTING BACKHAND INDEX -U+1F448 👈 \:point_left: WHITE LEFT POINTING BACKHAND INDEX -U+1F449 👉 \:point_right: WHITE RIGHT POINTING BACKHAND INDEX -U+1F44A 👊 \:facepunch: FISTED HAND SIGN -U+1F44B 👋 \:wave: WAVING HAND SIGN -U+1F44C 👌 \:ok_hand: OK HAND SIGN -U+1F44D 👍 \:+1: THUMBS UP SIGN -U+1F44E 👎 \:-1: THUMBS DOWN SIGN -U+1F44F 👏 \:clap: CLAPPING HANDS SIGN -U+1F450 👐 \:open_hands: OPEN HANDS SIGN -U+1F451 👑 \:crown: CROWN -U+1F452 👒 \:womans_hat: WOMANS HAT -U+1F453 👓 \:eyeglasses: EYEGLASSES -U+1F454 👔 \:necktie: NECKTIE -U+1F455 👕 \:shirt: T-SHIRT -U+1F456 👖 \:jeans: JEANS -U+1F457 👗 \:dress: DRESS -U+1F458 👘 \:kimono: KIMONO -U+1F459 👙 \:bikini: BIKINI -U+1F45A 👚 \:womans_clothes: WOMANS CLOTHES -U+1F45B 👛 \:purse: PURSE -U+1F45C 👜 \:handbag: HANDBAG -U+1F45D 👝 \:pouch: POUCH -U+1F45E 👞 \:mans_shoe: MANS SHOE -U+1F45F 👟 \:athletic_shoe: ATHLETIC SHOE -U+1F460 👠 \:high_heel: HIGH-HEELED SHOE -U+1F461 👡 \:sandal: WOMANS SANDAL -U+1F462 👢 \:boot: WOMANS BOOTS -U+1F463 👣 \:footprints: FOOTPRINTS -U+1F464 👤 \:bust_in_silhouette: BUST IN SILHOUETTE -U+1F465 👥 \:busts_in_silhouette: BUSTS IN SILHOUETTE -U+1F466 👦 \:boy: BOY -U+1F467 👧 \:girl: GIRL -U+1F468 👨 \:man: MAN -U+1F469 👩 \:woman: WOMAN -U+1F46A 👪 \:family: FAMILY -U+1F46B 👫 \:couple: MAN AND WOMAN HOLDING HANDS -U+1F46C 👬 \:two_men_holding_hands: TWO MEN HOLDING HANDS -U+1F46D 👭 \:two_women_holding_hands: TWO WOMEN HOLDING HANDS -U+1F46E 👮 \:cop: POLICE OFFICER -U+1F46F 👯 \:dancers: WOMAN WITH BUNNY EARS -U+1F470 👰 \:bride_with_veil: BRIDE WITH VEIL -U+1F471 👱 \:person_with_blond_hair: PERSON WITH BLOND HAIR -U+1F472 👲 \:man_with_gua_pi_mao: MAN WITH GUA PI MAO -U+1F473 👳 \:man_with_turban: MAN WITH TURBAN -U+1F474 👴 \:older_man: OLDER MAN -U+1F475 👵 \:older_woman: OLDER WOMAN -U+1F476 👶 \:baby: BABY -U+1F477 👷 \:construction_worker: CONSTRUCTION WORKER -U+1F478 👸 \:princess: PRINCESS -U+1F479 👹 \:japanese_ogre: JAPANESE OGRE -U+1F47A 👺 \:japanese_goblin: JAPANESE GOBLIN -U+1F47B 👻 \:ghost: GHOST -U+1F47C 👼 \:angel: BABY ANGEL -U+1F47D 👽 \:alien: EXTRATERRESTRIAL ALIEN -U+1F47E 👾 \:space_invader: ALIEN MONSTER -U+1F47F 👿 \:imp: IMP -U+1F480 💀 \:skull: SKULL -U+1F481 💁 \:information_desk_person: INFORMATION DESK PERSON -U+1F482 💂 \:guardsman: GUARDSMAN -U+1F483 💃 \:dancer: DANCER -U+1F484 💄 \:lipstick: LIPSTICK -U+1F485 💅 \:nail_care: NAIL POLISH -U+1F486 💆 \:massage: FACE MASSAGE -U+1F487 💇 \:haircut: HAIRCUT -U+1F488 💈 \:barber: BARBER POLE -U+1F489 💉 \:syringe: SYRINGE -U+1F48A 💊 \:pill: PILL -U+1F48B 💋 \:kiss: KISS MARK -U+1F48C 💌 \:love_letter: LOVE LETTER -U+1F48D 💍 \:ring: RING -U+1F48E 💎 \:gem: GEM STONE -U+1F48F 💏 \:couplekiss: KISS -U+1F490 💐 \:bouquet: BOUQUET -U+1F491 💑 \:couple_with_heart: COUPLE WITH HEART -U+1F492 💒 \:wedding: WEDDING -U+1F493 💓 \:heartbeat: BEATING HEART -U+1F494 💔 \:broken_heart: BROKEN HEART -U+1F495 💕 \:two_hearts: TWO HEARTS -U+1F496 💖 \:sparkling_heart: SPARKLING HEART -U+1F497 💗 \:heartpulse: GROWING HEART -U+1F498 💘 \:cupid: HEART WITH ARROW -U+1F499 💙 \:blue_heart: BLUE HEART -U+1F49A 💚 \:green_heart: GREEN HEART -U+1F49B 💛 \:yellow_heart: YELLOW HEART -U+1F49C 💜 \:purple_heart: PURPLE HEART -U+1F49D 💝 \:gift_heart: HEART WITH RIBBON -U+1F49E 💞 \:revolving_hearts: REVOLVING HEARTS -U+1F49F 💟 \:heart_decoration: HEART DECORATION -U+1F4A0 💠 \:diamond_shape_with_a_dot_inside: DIAMOND SHAPE WITH A DOT INSIDE -U+1F4A1 💡 \:bulb: ELECTRIC LIGHT BULB -U+1F4A2 💢 \:anger: ANGER SYMBOL -U+1F4A3 💣 \:bomb: BOMB -U+1F4A4 💤 \:zzz: SLEEPING SYMBOL -U+1F4A5 💥 \:boom: COLLISION SYMBOL -U+1F4A6 💦 \:sweat_drops: SPLASHING SWEAT SYMBOL -U+1F4A7 💧 \:droplet: DROPLET -U+1F4A8 💨 \:dash: DASH SYMBOL -U+1F4A9 💩 \:hankey: PILE OF POO -U+1F4AA 💪 \:muscle: FLEXED BICEPS -U+1F4AB 💫 \:dizzy: DIZZY SYMBOL -U+1F4AC 💬 \:speech_balloon: SPEECH BALLOON -U+1F4AD 💭 \:thought_balloon: THOUGHT BALLOON -U+1F4AE 💮 \:white_flower: WHITE FLOWER -U+1F4AF 💯 \:100: HUNDRED POINTS SYMBOL -U+1F4B0 💰 \:moneybag: MONEY BAG -U+1F4B1 💱 \:currency_exchange: CURRENCY EXCHANGE -U+1F4B2 💲 \:heavy_dollar_sign: HEAVY DOLLAR SIGN -U+1F4B3 💳 \:credit_card: CREDIT CARD -U+1F4B4 💴 \:yen: BANKNOTE WITH YEN SIGN -U+1F4B5 💵 \:dollar: BANKNOTE WITH DOLLAR SIGN -U+1F4B6 💶 \:euro: BANKNOTE WITH EURO SIGN -U+1F4B7 💷 \:pound: BANKNOTE WITH POUND SIGN -U+1F4B8 💸 \:money_with_wings: MONEY WITH WINGS -U+1F4B9 💹 \:chart: CHART WITH UPWARDS TREND AND YEN SIGN -U+1F4BA 💺 \:seat: SEAT -U+1F4BB 💻 \:computer: PERSONAL COMPUTER -U+1F4BC 💼 \:briefcase: BRIEFCASE -U+1F4BD 💽 \:minidisc: MINIDISC -U+1F4BE 💾 \:floppy_disk: FLOPPY DISK -U+1F4BF 💿 \:cd: OPTICAL DISC -U+1F4C0 📀 \:dvd: DVD -U+1F4C1 📁 \:file_folder: FILE FOLDER -U+1F4C2 📂 \:open_file_folder: OPEN FILE FOLDER -U+1F4C3 📃 \:page_with_curl: PAGE WITH CURL -U+1F4C4 📄 \:page_facing_up: PAGE FACING UP -U+1F4C5 📅 \:date: CALENDAR -U+1F4C6 📆 \:calendar: TEAR-OFF CALENDAR -U+1F4C7 📇 \:card_index: CARD INDEX -U+1F4C8 📈 \:chart_with_upwards_trend: CHART WITH UPWARDS TREND -U+1F4C9 📉 \:chart_with_downwards_trend: CHART WITH DOWNWARDS TREND -U+1F4CA 📊 \:bar_chart: BAR CHART -U+1F4CB 📋 \:clipboard: CLIPBOARD -U+1F4CC 📌 \:pushpin: PUSHPIN -U+1F4CD 📍 \:round_pushpin: ROUND PUSHPIN -U+1F4CE 📎 \:paperclip: PAPERCLIP -U+1F4CF 📏 \:straight_ruler: STRAIGHT RULER -U+1F4D0 📐 \:triangular_ruler: TRIANGULAR RULER -U+1F4D1 📑 \:bookmark_tabs: BOOKMARK TABS -U+1F4D2 📒 \:ledger: LEDGER -U+1F4D3 📓 \:notebook: NOTEBOOK -U+1F4D4 📔 \:notebook_with_decorative_cover: NOTEBOOK WITH DECORATIVE COVER -U+1F4D5 📕 \:closed_book: CLOSED BOOK -U+1F4D6 📖 \:book: OPEN BOOK -U+1F4D7 📗 \:green_book: GREEN BOOK -U+1F4D8 📘 \:blue_book: BLUE BOOK -U+1F4D9 📙 \:orange_book: ORANGE BOOK -U+1F4DA 📚 \:books: BOOKS -U+1F4DB 📛 \:name_badge: NAME BADGE -U+1F4DC 📜 \:scroll: SCROLL -U+1F4DD 📝 \:memo: MEMO -U+1F4DE 📞 \:telephone_receiver: TELEPHONE RECEIVER -U+1F4DF 📟 \:pager: PAGER -U+1F4E0 📠 \:fax: FAX MACHINE -U+1F4E1 📡 \:satellite: SATELLITE ANTENNA -U+1F4E2 📢 \:loudspeaker: PUBLIC ADDRESS LOUDSPEAKER -U+1F4E3 📣 \:mega: CHEERING MEGAPHONE -U+1F4E4 📤 \:outbox_tray: OUTBOX TRAY -U+1F4E5 📥 \:inbox_tray: INBOX TRAY -U+1F4E6 📦 \:package: PACKAGE -U+1F4E7 📧 \:e-mail: E-MAIL SYMBOL -U+1F4E8 📨 \:incoming_envelope: INCOMING ENVELOPE -U+1F4E9 📩 \:envelope_with_arrow: ENVELOPE WITH DOWNWARDS ARROW ABOVE -U+1F4EA 📪 \:mailbox_closed: CLOSED MAILBOX WITH LOWERED FLAG -U+1F4EB 📫 \:mailbox: CLOSED MAILBOX WITH RAISED FLAG -U+1F4EC 📬 \:mailbox_with_mail: OPEN MAILBOX WITH RAISED FLAG -U+1F4ED 📭 \:mailbox_with_no_mail: OPEN MAILBOX WITH LOWERED FLAG -U+1F4EE 📮 \:postbox: POSTBOX -U+1F4EF 📯 \:postal_horn: POSTAL HORN -U+1F4F0 📰 \:newspaper: NEWSPAPER -U+1F4F1 📱 \:iphone: MOBILE PHONE -U+1F4F2 📲 \:calling: MOBILE PHONE WITH RIGHTWARDS ARROW AT LEFT -U+1F4F3 📳 \:vibration_mode: VIBRATION MODE -U+1F4F4 📴 \:mobile_phone_off: MOBILE PHONE OFF -U+1F4F5 📵 \:no_mobile_phones: NO MOBILE PHONES -U+1F4F6 📶 \:signal_strength: ANTENNA WITH BARS -U+1F4F7 📷 \:camera: CAMERA -U+1F4F9 📹 \:video_camera: VIDEO CAMERA -U+1F4FA 📺 \:tv: TELEVISION -U+1F4FB 📻 \:radio: RADIO -U+1F4FC 📼 \:vhs: VIDEOCASSETTE -U+1F500 🔀 \:twisted_rightwards_arrows: TWISTED RIGHTWARDS ARROWS -U+1F501 🔁 \:repeat: CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS -U+1F502 🔂 \:repeat_one: CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY -U+1F503 🔃 \:arrows_clockwise: CLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS -U+1F504 🔄 \:arrows_counterclockwise: ANTICLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS -U+1F505 🔅 \:low_brightness: LOW BRIGHTNESS SYMBOL -U+1F506 🔆 \:high_brightness: HIGH BRIGHTNESS SYMBOL -U+1F507 🔇 \:mute: SPEAKER WITH CANCELLATION STROKE -U+1F508 🔈 \:speaker: SPEAKER -U+1F509 🔉 \:sound: SPEAKER WITH ONE SOUND WAVE -U+1F50A 🔊 \:loud_sound: SPEAKER WITH THREE SOUND WAVES -U+1F50B 🔋 \:battery: BATTERY -U+1F50C 🔌 \:electric_plug: ELECTRIC PLUG -U+1F50D 🔍 \:mag: LEFT-POINTING MAGNIFYING GLASS -U+1F50E 🔎 \:mag_right: RIGHT-POINTING MAGNIFYING GLASS -U+1F50F 🔏 \:lock_with_ink_pen: LOCK WITH INK PEN -U+1F510 🔐 \:closed_lock_with_key: CLOSED LOCK WITH KEY -U+1F511 🔑 \:key: KEY -U+1F512 🔒 \:lock: LOCK -U+1F513 🔓 \:unlock: OPEN LOCK -U+1F514 🔔 \:bell: BELL -U+1F515 🔕 \:no_bell: BELL WITH CANCELLATION STROKE -U+1F516 🔖 \:bookmark: BOOKMARK -U+1F517 🔗 \:link: LINK SYMBOL -U+1F518 🔘 \:radio_button: RADIO BUTTON -U+1F519 🔙 \:back: BACK WITH LEFTWARDS ARROW ABOVE -U+1F51A 🔚 \:end: END WITH LEFTWARDS ARROW ABOVE -U+1F51B 🔛 \:on: ON WITH EXCLAMATION MARK WITH LEFT RIGHT ARROW ABOVE -U+1F51C 🔜 \:soon: SOON WITH RIGHTWARDS ARROW ABOVE -U+1F51D 🔝 \:top: TOP WITH UPWARDS ARROW ABOVE -U+1F51E 🔞 \:underage: NO ONE UNDER EIGHTEEN SYMBOL -U+1F51F 🔟 \:keycap_ten: KEYCAP TEN -U+1F520 🔠 \:capital_abcd: INPUT SYMBOL FOR LATIN CAPITAL LETTERS -U+1F521 🔡 \:abcd: INPUT SYMBOL FOR LATIN SMALL LETTERS -U+1F522 🔢 \:1234: INPUT SYMBOL FOR NUMBERS -U+1F523 🔣 \:symbols: INPUT SYMBOL FOR SYMBOLS -U+1F524 🔤 \:abc: INPUT SYMBOL FOR LATIN LETTERS -U+1F525 🔥 \:fire: FIRE -U+1F526 🔦 \:flashlight: ELECTRIC TORCH -U+1F527 🔧 \:wrench: WRENCH -U+1F528 🔨 \:hammer: HAMMER -U+1F529 🔩 \:nut_and_bolt: NUT AND BOLT -U+1F52A 🔪 \:hocho: HOCHO -U+1F52B 🔫 \:gun: PISTOL -U+1F52C 🔬 \:microscope: MICROSCOPE -U+1F52D 🔭 \:telescope: TELESCOPE -U+1F52E 🔮 \:crystal_ball: CRYSTAL BALL -U+1F52F 🔯 \:six_pointed_star: SIX POINTED STAR WITH MIDDLE DOT -U+1F530 🔰 \:beginner: JAPANESE SYMBOL FOR BEGINNER -U+1F531 🔱 \:trident: TRIDENT EMBLEM -U+1F532 🔲 \:black_square_button: BLACK SQUARE BUTTON -U+1F533 🔳 \:white_square_button: WHITE SQUARE BUTTON -U+1F534 🔴 \:red_circle: LARGE RED CIRCLE -U+1F535 🔵 \:large_blue_circle: LARGE BLUE CIRCLE -U+1F536 🔶 \:large_orange_diamond: LARGE ORANGE DIAMOND -U+1F537 🔷 \:large_blue_diamond: LARGE BLUE DIAMOND -U+1F538 🔸 \:small_orange_diamond: SMALL ORANGE DIAMOND -U+1F539 🔹 \:small_blue_diamond: SMALL BLUE DIAMOND -U+1F53A 🔺 \:small_red_triangle: UP-POINTING RED TRIANGLE -U+1F53B 🔻 \:small_red_triangle_down: DOWN-POINTING RED TRIANGLE -U+1F53C 🔼 \:arrow_up_small: UP-POINTING SMALL RED TRIANGLE -U+1F53D 🔽 \:arrow_down_small: DOWN-POINTING SMALL RED TRIANGLE -U+1F550 🕐 \:clock1: CLOCK FACE ONE OCLOCK -U+1F551 🕑 \:clock2: CLOCK FACE TWO OCLOCK -U+1F552 🕒 \:clock3: CLOCK FACE THREE OCLOCK -U+1F553 🕓 \:clock4: CLOCK FACE FOUR OCLOCK -U+1F554 🕔 \:clock5: CLOCK FACE FIVE OCLOCK -U+1F555 🕕 \:clock6: CLOCK FACE SIX OCLOCK -U+1F556 🕖 \:clock7: CLOCK FACE SEVEN OCLOCK -U+1F557 🕗 \:clock8: CLOCK FACE EIGHT OCLOCK -U+1F558 🕘 \:clock9: CLOCK FACE NINE OCLOCK -U+1F559 🕙 \:clock10: CLOCK FACE TEN OCLOCK -U+1F55A 🕚 \:clock11: CLOCK FACE ELEVEN OCLOCK -U+1F55B 🕛 \:clock12: CLOCK FACE TWELVE OCLOCK -U+1F55C 🕜 \:clock130: CLOCK FACE ONE-THIRTY -U+1F55D 🕝 \:clock230: CLOCK FACE TWO-THIRTY -U+1F55E 🕞 \:clock330: CLOCK FACE THREE-THIRTY -U+1F55F 🕟 \:clock430: CLOCK FACE FOUR-THIRTY -U+1F560 🕠 \:clock530: CLOCK FACE FIVE-THIRTY -U+1F561 🕡 \:clock630: CLOCK FACE SIX-THIRTY -U+1F562 🕢 \:clock730: CLOCK FACE SEVEN-THIRTY -U+1F563 🕣 \:clock830: CLOCK FACE EIGHT-THIRTY -U+1F564 🕤 \:clock930: CLOCK FACE NINE-THIRTY -U+1F565 🕥 \:clock1030: CLOCK FACE TEN-THIRTY -U+1F566 🕦 \:clock1130: CLOCK FACE ELEVEN-THIRTY -U+1F567 🕧 \:clock1230: CLOCK FACE TWELVE-THIRTY -U+1F5FB 🗻 \:mount_fuji: MOUNT FUJI -U+1F5FC 🗼 \:tokyo_tower: TOKYO TOWER -U+1F5FD 🗽 \:statue_of_liberty: STATUE OF LIBERTY -U+1F5FE 🗾 \:japan: SILHOUETTE OF JAPAN -U+1F5FF 🗿 \:moyai: MOYAI -U+1F600 😀 \:grinning: GRINNING FACE -U+1F601 😁 \:grin: GRINNING FACE WITH SMILING EYES -U+1F602 😂 \:joy: FACE WITH TEARS OF JOY -U+1F603 😃 \:smiley: SMILING FACE WITH OPEN MOUTH -U+1F604 😄 \:smile: SMILING FACE WITH OPEN MOUTH AND SMILING EYES -U+1F605 😅 \:sweat_smile: SMILING FACE WITH OPEN MOUTH AND COLD SWEAT -U+1F606 😆 \:laughing: SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES -U+1F607 😇 \:innocent: SMILING FACE WITH HALO -U+1F608 😈 \:smiling_imp: SMILING FACE WITH HORNS -U+1F609 😉 \:wink: WINKING FACE -U+1F60A 😊 \:blush: SMILING FACE WITH SMILING EYES -U+1F60B 😋 \:yum: FACE SAVOURING DELICIOUS FOOD -U+1F60C 😌 \:relieved: RELIEVED FACE -U+1F60D 😍 \:heart_eyes: SMILING FACE WITH HEART-SHAPED EYES -U+1F60E 😎 \:sunglasses: SMILING FACE WITH SUNGLASSES -U+1F60F 😏 \:smirk: SMIRKING FACE -U+1F610 😐 \:neutral_face: NEUTRAL FACE -U+1F611 😑 \:expressionless: EXPRESSIONLESS FACE -U+1F612 😒 \:unamused: UNAMUSED FACE -U+1F613 😓 \:sweat: FACE WITH COLD SWEAT -U+1F614 😔 \:pensive: PENSIVE FACE -U+1F615 😕 \:confused: CONFUSED FACE -U+1F616 😖 \:confounded: CONFOUNDED FACE -U+1F617 😗 \:kissing: KISSING FACE -U+1F618 😘 \:kissing_heart: FACE THROWING A KISS -U+1F619 😙 \:kissing_smiling_eyes: KISSING FACE WITH SMILING EYES -U+1F61A 😚 \:kissing_closed_eyes: KISSING FACE WITH CLOSED EYES -U+1F61B 😛 \:stuck_out_tongue: FACE WITH STUCK-OUT TONGUE -U+1F61C 😜 \:stuck_out_tongue_winking_eye: FACE WITH STUCK-OUT TONGUE AND WINKING EYE -U+1F61D 😝 \:stuck_out_tongue_closed_eyes: FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES -U+1F61E 😞 \:disappointed: DISAPPOINTED FACE -U+1F61F 😟 \:worried: WORRIED FACE -U+1F620 😠 \:angry: ANGRY FACE -U+1F621 😡 \:rage: POUTING FACE -U+1F622 😢 \:cry: CRYING FACE -U+1F623 😣 \:persevere: PERSEVERING FACE -U+1F624 😤 \:triumph: FACE WITH LOOK OF TRIUMPH -U+1F625 😥 \:disappointed_relieved: DISAPPOINTED BUT RELIEVED FACE -U+1F626 😦 \:frowning: FROWNING FACE WITH OPEN MOUTH -U+1F627 😧 \:anguished: ANGUISHED FACE -U+1F628 😨 \:fearful: FEARFUL FACE -U+1F629 😩 \:weary: WEARY FACE -U+1F62A 😪 \:sleepy: SLEEPY FACE -U+1F62B 😫 \:tired_face: TIRED FACE -U+1F62C 😬 \:grimacing: GRIMACING FACE -U+1F62D 😭 \:sob: LOUDLY CRYING FACE -U+1F62E 😮 \:open_mouth: FACE WITH OPEN MOUTH -U+1F62F 😯 \:hushed: HUSHED FACE -U+1F630 😰 \:cold_sweat: FACE WITH OPEN MOUTH AND COLD SWEAT -U+1F631 😱 \:scream: FACE SCREAMING IN FEAR -U+1F632 😲 \:astonished: ASTONISHED FACE -U+1F633 😳 \:flushed: FLUSHED FACE -U+1F634 😴 \:sleeping: SLEEPING FACE -U+1F635 😵 \:dizzy_face: DIZZY FACE -U+1F636 😶 \:no_mouth: FACE WITHOUT MOUTH -U+1F637 😷 \:mask: FACE WITH MEDICAL MASK -U+1F638 😸 \:smile_cat: GRINNING CAT FACE WITH SMILING EYES -U+1F639 😹 \:joy_cat: CAT FACE WITH TEARS OF JOY -U+1F63A 😺 \:smiley_cat: SMILING CAT FACE WITH OPEN MOUTH -U+1F63B 😻 \:heart_eyes_cat: SMILING CAT FACE WITH HEART-SHAPED EYES -U+1F63C 😼 \:smirk_cat: CAT FACE WITH WRY SMILE -U+1F63D 😽 \:kissing_cat: KISSING CAT FACE WITH CLOSED EYES -U+1F63E 😾 \:pouting_cat: POUTING CAT FACE -U+1F63F 😿 \:crying_cat_face: CRYING CAT FACE -U+1F640 🙀 \:scream_cat: WEARY CAT FACE -U+1F645 🙅 \:no_good: FACE WITH NO GOOD GESTURE -U+1F646 🙆 \:ok_woman: FACE WITH OK GESTURE -U+1F647 🙇 \:bow: PERSON BOWING DEEPLY -U+1F648 🙈 \:see_no_evil: SEE-NO-EVIL MONKEY -U+1F649 🙉 \:hear_no_evil: HEAR-NO-EVIL MONKEY -U+1F64A 🙊 \:speak_no_evil: SPEAK-NO-EVIL MONKEY -U+1F64B 🙋 \:raising_hand: HAPPY PERSON RAISING ONE HAND -U+1F64C 🙌 \:raised_hands: PERSON RAISING BOTH HANDS IN CELEBRATION -U+1F64D 🙍 \:person_frowning: PERSON FROWNING -U+1F64E 🙎 \:person_with_pouting_face: PERSON WITH POUTING FACE -U+1F64F 🙏 \:pray: PERSON WITH FOLDED HANDS -U+1F680 🚀 \:rocket: ROCKET -U+1F681 🚁 \:helicopter: HELICOPTER -U+1F682 🚂 \:steam_locomotive: STEAM LOCOMOTIVE -U+1F683 🚃 \:railway_car: RAILWAY CAR -U+1F684 🚄 \:bullettrain_side: HIGH-SPEED TRAIN -U+1F685 🚅 \:bullettrain_front: HIGH-SPEED TRAIN WITH BULLET NOSE -U+1F686 🚆 \:train2: TRAIN -U+1F687 🚇 \:metro: METRO -U+1F688 🚈 \:light_rail: LIGHT RAIL -U+1F689 🚉 \:station: STATION -U+1F68A 🚊 \:tram: TRAM -U+1F68B 🚋 \:train: TRAM CAR -U+1F68C 🚌 \:bus: BUS -U+1F68D 🚍 \:oncoming_bus: ONCOMING BUS -U+1F68E 🚎 \:trolleybus: TROLLEYBUS -U+1F68F 🚏 \:busstop: BUS STOP -U+1F690 🚐 \:minibus: MINIBUS -U+1F691 🚑 \:ambulance: AMBULANCE -U+1F692 🚒 \:fire_engine: FIRE ENGINE -U+1F693 🚓 \:police_car: POLICE CAR -U+1F694 🚔 \:oncoming_police_car: ONCOMING POLICE CAR -U+1F695 🚕 \:taxi: TAXI -U+1F696 🚖 \:oncoming_taxi: ONCOMING TAXI -U+1F697 🚗 \:car: AUTOMOBILE -U+1F698 🚘 \:oncoming_automobile: ONCOMING AUTOMOBILE -U+1F699 🚙 \:blue_car: RECREATIONAL VEHICLE -U+1F69A 🚚 \:truck: DELIVERY TRUCK -U+1F69B 🚛 \:articulated_lorry: ARTICULATED LORRY -U+1F69C 🚜 \:tractor: TRACTOR -U+1F69D 🚝 \:monorail: MONORAIL -U+1F69E 🚞 \:mountain_railway: MOUNTAIN RAILWAY -U+1F69F 🚟 \:suspension_railway: SUSPENSION RAILWAY -U+1F6A0 🚠 \:mountain_cableway: MOUNTAIN CABLEWAY -U+1F6A1 🚡 \:aerial_tramway: AERIAL TRAMWAY -U+1F6A2 🚢 \:ship: SHIP -U+1F6A3 🚣 \:rowboat: ROWBOAT -U+1F6A4 🚤 \:speedboat: SPEEDBOAT -U+1F6A5 🚥 \:traffic_light: HORIZONTAL TRAFFIC LIGHT -U+1F6A6 🚦 \:vertical_traffic_light: VERTICAL TRAFFIC LIGHT -U+1F6A7 🚧 \:construction: CONSTRUCTION SIGN -U+1F6A8 🚨 \:rotating_light: POLICE CARS REVOLVING LIGHT -U+1F6A9 🚩 \:triangular_flag_on_post: TRIANGULAR FLAG ON POST -U+1F6AA 🚪 \:door: DOOR -U+1F6AB 🚫 \:no_entry_sign: NO ENTRY SIGN -U+1F6AC 🚬 \:smoking: SMOKING SYMBOL -U+1F6AD 🚭 \:no_smoking: NO SMOKING SYMBOL -U+1F6AE 🚮 \:put_litter_in_its_place: PUT LITTER IN ITS PLACE SYMBOL -U+1F6AF 🚯 \:do_not_litter: DO NOT LITTER SYMBOL -U+1F6B0 🚰 \:potable_water: POTABLE WATER SYMBOL -U+1F6B1 🚱 \:non-potable_water: NON-POTABLE WATER SYMBOL -U+1F6B2 🚲 \:bike: BICYCLE -U+1F6B3 🚳 \:no_bicycles: NO BICYCLES -U+1F6B4 🚴 \:bicyclist: BICYCLIST -U+1F6B5 🚵 \:mountain_bicyclist: MOUNTAIN BICYCLIST -U+1F6B6 🚶 \:walking: PEDESTRIAN -U+1F6B7 🚷 \:no_pedestrians: NO PEDESTRIANS -U+1F6B8 🚸 \:children_crossing: CHILDREN CROSSING -U+1F6B9 🚹 \:mens: MENS SYMBOL -U+1F6BA 🚺 \:womens: WOMENS SYMBOL -U+1F6BB 🚻 \:restroom: RESTROOM -U+1F6BC 🚼 \:baby_symbol: BABY SYMBOL -U+1F6BD 🚽 \:toilet: TOILET -U+1F6BE 🚾 \:wc: WATER CLOSET -U+1F6BF 🚿 \:shower: SHOWER -U+1F6C0 🛀 \:bath: BATH -U+1F6C1 🛁 \:bathtub: BATHTUB -U+1F6C2 🛂 \:passport_control: PASSPORT CONTROL -U+1F6C3 🛃 \:customs: CUSTOMS -U+1F6C4 🛄 \:baggage_claim: BAGGAGE CLAIM -U+1F6C5 🛅 \:left_luggage: LEFT LUGGAGE ------------------ ------------ -------------------------------------------- -------------------------------------------------------------------------------------------------------- - - vim:tw=180:et:ft=help:norl: - -endif diff --git a/doc/julia-vim-L2U.txt b/doc/julia-vim-L2U.txt deleted file mode 100644 index 8f3a852cf..000000000 --- a/doc/julia-vim-L2U.txt +++ /dev/null @@ -1,405 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 - -*julia-vim-L2U.txt* Support for LaTeX-to-Unicode substitutions - -Author: Carlo Baldassi -License: MIT license {{{ - 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. -}}} -CONTENTS *julia-vim-L2U* - -LaTeX-to-Unicode substitutions |julia-vim-L2U-introdction| - Via Tab key |julia-vim-L2U-tab| - As you type |julia-vim-L2U-as-you-type| - Via Keymap |julia-vim-L2U-keymap| - On different file types |julia-vim-L2U-file-types| - Enabling and disabling |julia-vim-L2U-enable-disable| -Variables |julia-vim-L2U-variables| -Functions |julia-vim-L2U-functions| - -============================================================================== -LATEX TO UNICODE *julia-vim-L2U-introduction* - -In the Julia REPL, entering a LaTeX-like sequence such as `\alpha` and pressing -the key substitutes it with a Unicode character such as `α`. The Julia -REPL also provides partial completions, and suggestions for possible -completions upon repeated pressing of the key. Emojis are also -available, with their names written between colons, e.g. `\:interrobang:` -produces `⁉`. - -See |julia-vim-L2U-reference| for the complete table of substitutions. - -This Vim plug-in also provides the functionality needed to convert LaTeX -input sequences into Unicode characters. There are 3 different methods -available: - - 1. The default one is the most similar to the Julia one: substitutions are - triggered by pressing the key; if a partial match is found a list - of suggested completions is presented in a menu together with their - Unicode counterpart. The exact behaviour of this feature can be - customized, see |julia-vim-L2U-tab|. - - 2. The second one substitutes symbols on the fly as you type, but only in - |Insert| mode. See |julia-vim-L2U-as-you-type|. - - 3. The third is based on |keymap|. It also substitutes as-you-type, but it - doesn't show you the full LaTeX sequence as you're typing it, and there - is a time-out. Its main advantage over the previous one is that can be - used in more circumstances, e.g. in |Command-line| mode or when searching - for a character with |f| or |t|, as explained in |language-mapping|. See - |julia-vim-L2U-keymap|. - -All of these methods are independent and can be used together without issues. - -The default configuration is to use the first method, and it's only active -when editing Julia files. It only works in |Insert| and |Command-line| modes. - -It is possible to enable it with other file types, see -|julia-vim-L2U-file-types|, and it can be even turned on/off on the fly -regardless of the file type, see |julia-vim-L2U-enable-disable|. - -In |Command-line| mode, e.g. when searching with the |/| or |?| commands, the -default behavior is very similar to the default |Insert| mode behavior, but -slightly more limited, see |julia-vim-L2U-cmdmode|. - -These features only work as described with Vim version 7.4 or higher. Tab -completion can still be made available on lower Vim versions, see -|julia-vim-L2U-workaround|. The keymap mode might work but it hasn't been -tested. - -See |julia-vim| for the general reference about the other features of the -julia-vim plug-in. - ------------------------------------------------------------------------------- -LATEX TO UNICODE VIA TAB KEY *julia-vim-L2U-tab* - -Substitution of LaTeX sequences when pressing the key (in |Insert| mode or -in |Command-line| modes) is active by default. Use |g:latex_to_unicode_tab| to -control it. - -When this feature is active, the julia-vim plug-in creates a mapping for the - key (in |Insert| mode) which takes precedence on any previously defined -mapping assigned to it, such that when the key is pressed the plug-in -looks for potential LaTeX symbol matches before the cursor, and if it fails to -find anything of interest it will fall-back to the previous mapping for -(with default Vim settings, this means it will insert a literal ; but if -you have defined some other behavior for that key, e.g. by installing another -plug-in such as supertab (https://github.com/ervandew/supertab) than that will -be used). - -For example, entering this text in a file: -> - 1 + \alpha -< -and then pressing , results in: -> - 1 + α -< - -This feature is associated with 'omnifunc' completion, and therefore can -always be accessed via CTRL-X CTRL-O, even when |g:latex_to_unicode_tab| is 0. - -A literal key can always be entered by using CTRL-V before (see -|i_CTRL-V|). - -Partial sequence recognition triggers auto-completion (performed as if the -`longest` setting was used in 'completeopt') and shows a menu of suggestions -together with their corresponding Unicode symbol (provided the `menu` setting -is included in 'completeopt', and more then one match is found). So for -example, entering `\al` and pressing will result in the following list: -> - +-------------+ - | \aleph ℵ | - | \allequal ≌ | - | \alpha α | - +-------------+ -> -Then, pressing `p` will reduce the list to `\alpha`, pressing will -complete it and pressing again will perform the substitution. - -The completion menu can be disbled, and this will happen automatically if a -plug-in which is known to be incompatible with this feature is detected: see -|g:latex_to_unicode_suggestions|. - -Some LaTeX sequences can be valid both as they are and as partial matches for -other sequences, e.g. `\ne` is associated with `≠`, but it is also a partial -match for `\nequiv` (`≢`). By default, if finds an exact match performs -the substitution, but this can be controlled by the |g:latex_to_unicode_eager| -setting. - -Command-line mode *julia-vim-L2U-cmdmode* - -In |Command-line| mode, the behavior is largely the same except that both - and are mapped by default, and the functionality is slightly -more limited. No suggestions are shown for partial completions. Pre-existing -user-defined mappings of are overridden. In order to avoid that, the -completion can be mapped onto a defferent key combination, see -|g:latex_to_unicode_cmd_mapping|. When using , if no matches are found -the behavior falls back to the standard Vim command-line completion. - -Vim versions lower than 7.4 *julia-vim-L2U-workaround* - -The key remapping is not performed by default with Vim versions lower -than 7.4. However, the functionality is still available via onmicompletion, -which is accessible by the CTRL-X CTRL-O key combination. You can map some -other key combination to this by adding something like -> - inoremap -< -in your |.vimrc| file. If you'd map directly, then you'd need to use -CTRL-V to insert a literal . - -The settings |g:latex_to_unicode_eager| and |g:latex_to_unicode_suggestions| -are still meaningful in this case. - ------------------------------------------------------------------------------- -LATEX TO UNICODE AS YOU TYPE *julia-vim-L2U-as-you-type* - -This feature is disabled by default, see |g:latex_to_unicode_auto|, and it is -only available with Vim version 7.4 or higher. It consists in substituting -valid LaTeX sequences with Unicode symbols automatically as the typing -progresses, as soon as the sequences is unambiguously complete. For example, -when typing: -> - \chi\^2 = 1 -< -The result is -> - χ² = 1 -< -The `\chi` is substituted right when the second backslash is entered, and the -`\^2` is substituted when the following space is entered, before the equal -sign. - -This feature does not currently work with emojis. - -This feature does not interfere with the based substitution. - ------------------------------------------------------------------------------- -LATEX TO UNICODE VIA KEYMAP *julia-vim-L2U-keymap* - -This method is somewhat similar to the as-you-type one described above, but it -uses |keymap| to generate the mappings. This has the advantage that it works -in more circumstances, e.g. in |Command-line| mode or when searching within a -line with |f| or |t| (since it uses |language-mapping| underneath). It can -also be easily turned on or off like any other keymap (see |i_CTRL-^| and -|c_CTRL-^|). Like the as-you-type fature, it doesn't work with emojis. -The disadvantage is that you don't see the whole sequence as you're typing -it, and you can't fix mistakes with backspace, for example. -Another difference is that there is a |timeout| like for any other mapping. - -In order to use this method, set |g:latex_to_unicode_keymap| to `1`. -You can use it in parallel with the other methods, they don't interfere. For -example, typing a partial sequence and pressing still triggers -completions and suggestions if |g:latex_to_unicode_tab| is active. - -If you use this feature, it's also useful to set |lCursor|. - ------------------------------------------------------------------------------- -LATEX TO UNICODE ON DIFFERENT FILE TYPES *julia-vim-L2U-file-types* - -By default, the LaTeX-to-Unicode substitutions are only active when editing -Julia files. However, you can use the variable |g:latex_to_unicode_file_types| -to specify for which file types this feature is active by default. The -variable must be set to a string containing a |pattern| (a regular expression) -which matches the desired file types, or to a list of such patterns. For -example, to activate the feature on all file types by default, you could put -this in your |.vimrc| file: -> - let g:latex_to_unicode_file_types = ".*" -< -To make it active only on, say, Julia and Lisp files, you could use: -> - let g:latex_to_unicode_file_types = ["julia", "lisp"] -< - -Another option, |g:latex_to_unicode_file_types_blacklist|, can be used to -exclude certain file types. For example, if you'd wish to enable the feature -in all cases except for Python and untyped files, you would use: -> - let g:latex_to_unicode_file_types = ".*" - let g:latex_to_unicode_file_types_blacklist = ["python", ""] -< - -NOTE: enabling the functionality will override the |'omnifunc'| setting, which -can be undesirable, and interfere with plug-ins for different file types. In -any case, the previous |'omnifunc'| setting is restored when the functionality -is disabled, see |julia-vim-L2U-enable-disable|. - ------------------------------------------------------------------------------- -ENABLING AND DISABLING LATEX TO UNICODE *julia-vim-L2U-enable-disable* - -The LaTeX-to-Unicode functionality can be enabled or disabled at any time, -regardless of the |'filetype'| of the file you're editing, using the functions -|LaTeXtoUnicode#Enable()|, |LaTeXtoUnicode#Disable()|, |LaTeXtoUnicode#Toggle()|. -For example, you could use a mapping like: -> - noremap LaTeXtoUnicode#Toggle() - noremap! LaTeXtoUnicode#Toggle() -< -and then use the key to quickly switch the functionality on and off as -needed (see |noremap| and |noremap!|). - -NOTE: these functions are different from the variables |g:latex_to_unicode_tab|, -|g:latex_to_unicode_auto| and |g:latex_to_unicode_keymap|: the functions -enable/disable the functionality as a whole, while the variables control -individual features (tab, auto and keymap substitution). - -============================================================================== -VARIABLES *julia-vim-L2U-variables* - - *g:latex_to_unicode_tab* -g:latex_to_unicode_tab - - Determines whether to map LaTeX-to-Unicode substitution to the - key while in |Insert| and |Command-line| modes, see - |julia-vim-L2U-tab|. If unspecified, it is on. You can disable - the feature by default by inserting the line -> - let g:latex_to_unicode_tab = 0 -< - in your |.vimrc| file. You can change this setting at any moment - while editing, but you need to invoke |LaTeXtoUnicode#Init()| - for the change to take effect. - - *g:latex_to_unicode_suggestions* -g:latex_to_unicode_suggestions - - Determines whether the key mapping produces suggestions - for partial matches. By default, this is set to 1 (active), - unless a plug-in which is known to be incompatible with it is - detected. Currently, known incompatible plug-ins are - YouCompleteMe (https://github.com/Valloric/YouCompleteMe), - neocomplcache (https://github.com/Shougo/neocomplcache.vim), - neocomplete (https://github.com/Shougo/neocomplete.vim) and - deoplete (https://github.com/Shougo/deoplete.nvim), - - This variable can be set at any time, changes will immediately - take effect. - - *g:latex_to_unicode_eager* -g:latex_to_unicode_eager - - Determines whether the key mapping performs the - substitution immediately upon finding an exact match. By - default this setting is set to 1 (active), so that e.g. typing - `\ne` and pressing the key triggers the substitution. If - this variable is set to 0, an exact match which is also a - possible partial match to some other sequence triggers the - suggestions menu first, but another forces the - substitution, so that e.g. typing `\ne` and then - produces a list with `\ne`, `\neg`, `\nequiv` etc., and - pressing again performs the substitution. - - This variable can be set at any time, changes will immediately - take effect. When |g:latex_to_unicode_suggestions| is `0`, - this setting has no effect (it's like if it was always on). - - *g:latex_to_unicode_auto* -g:latex_to_unicode_auto - - Determines whether to activate LaTeX-to-Unicode substitution - on the fly as you type (in |Insert| mode), see - |julia-vim-L2U-as-you-type|. If unspecified, it is `0` (off). - You can enable the feature by default by inserting the line -> - let g:latex_to_unicode_auto = 1 -< - in your |.vimrc| file. You can change this setting at any - moment while editing, but you need to invoke - |LaTeXtoUnicode#Init()| for the change to take effect. - - - *g:latex_to_unicode_keymap* -g:latex_to_unicode_keymap - - Determines whether to activate the |keymap|-based - LaTeX-to-Unicode substitutions, see |julia-vim-L2U-keymap|. - If unspecified, it is `0` (off). You can enable the feature by - default by inserting the line -> - let g:latex_to_unicode_keymap = 1 -< - in your |.vimrc| file. You can change this setting at any - moment while editing, but you need to invoke - |LaTeXtoUnicode#Init()| for the change to take effect. - - *g:latex_to_unicode_file_types* -g:latex_to_unicode_file_types - - Contains a |pattern|, or a list of patterns, which are matched - against the |'filetype'| to determine when to enable the - LaTeX-to-Unicode functionality, see |julia-vim-L2U-file-types|. - By default, its value is `"julia"`. The patterns provided must - match the whole filetype name. See also - |g:latex_to_unicode_file_types_blacklist|. - - *g:latex_to_unicode_file_types_blacklist* -g:latex_to_unicode_file_types_blacklist - - Same as |g:latex_to_unicode_file_types|, but acts in reverse: - it disables the LaTeX-to-Unicode functionality when the - |'filetype'| matches the provided pattern (or any of the - patterns if a list is provided). By default, it contains an - unmatchable pattern, i.e. it is effectively disabled. - - *g:latex_to_unicode_cmd_mapping* -g:latex_to_unicode_cmd_mapping - - Specifies the mapping (or list of mappings) for the - substitution in |Command-line| mode. By default, it is - `['', '']`, but it can be changed to avoid - overriding other user-defined mapping, e.g. to `''` - (if your terminal suppoorts it) or `''`. - The `''` (or to be more precise the |wildchar| key) and - `''` mappings are special in that they fall back to - performing default Vim completions in case no suitable - substitutions are found. - -============================================================================== -FUNCTIONS *julia-vim-L2U-functions* - - *LaTeXtoUnicode#Init()* -LaTeXtoUnicode#Init() - - Initialize or re-initialize the LaTeX-to-Unicode substitutions - (see |julia-vim-L2U-introduction|). Must be invoked after - changing |g:latex_to_unicode_tab| or |g:latex_to_unicode_auto| - to make the changes take effect. - - *LaTeXtoUnicode#Enable()* - *LaTeXtoUnicode#Disable()* - *LaTeXtoUnicode#Toggle()* -LaTeXtoUnicode#Enable() -LaTeXtoUnicode#Disable() -LaTeXtoUnicode#Toggle() - - These functions enable/disable/toggle the LaTeX-to-Unicode - functionality, regardless of the |'filetype'| specified in - |g:latex_to_unicode_file_types| and - |g:latex_to_unicode_file_types_blacklist|. See - |julia-vim-L2U-enable-disable|. Note that LaTeXtoUnicode#Enable() - will override the |'omnifunc'| definition, if present. However, - LaTeXtoUnicode#Disable() will restore it. - These functions implicitly invoke |LaTeXtoUnicode#Init()|. - - - vim:tw=78:et:ft=help:norl: - -endif diff --git a/doc/julia-vim.txt b/doc/julia-vim.txt deleted file mode 100644 index 3f09e3bdc..000000000 --- a/doc/julia-vim.txt +++ /dev/null @@ -1,399 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 - -*julia-vim.txt* Support for Julia in Vim - -Author: Carlo Baldassi -License: MIT license {{{ - 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. -}}} - -CONTENTS *julia-vim* - -Introduction |julia-vim-introduction| -Block-wise movements/objects |julia-vim-blocks| - Keyword-oriented movements |julia-vim-blocks-move| - Block-oriented movements |julia-vim-blocks-moveblock| - Block text objects |julia-vim-blocks-objects| - Variables |julia-vim-blocks-variables| -Referring to documents |julia-vim-doc| -Extras |julia-vim-extras| -Customizations |julia-vim-options| -About |julia-vim-about| - -============================================================================== -INTRODUCTION *julia-vim-introduction* - -The julia-vim plug-in provides: - - basic support for editing Julia files (automatic filetype detection, - indentation, syntax highlighting) - - support for the |matchit| plugin - - support for Julia block-wise movements (i.e. jumping around between - Julia blocks like if/end, function/end etc.) and block text-objects - - facilities for conversion of LaTeX entries to Unicode symbols which mimic - and extend what the Julia REPL and the IJulia notebook interface do. - Optionally, this functionality can be used with all file types, not - just Julia files. See |julia-vim-L2U|. - - a keymapping |K| to refer julia documents. - -This help file documents: 1) the block-wise movements and objects, how they -work and what variables can be used to enable/disable/tweak them; 2) The -documentation lookup facility; 3) Some extra functions and customization -options. -The LaTeX-to-Unicode facilities are documented in |julia-vim-L2U|. - -============================================================================== -BLOCK-WISE MOVEMENTS AND BLOCK TEXT OBJECTS *julia-vim-blocks* - -In Julia, all blocks start with a keyword (`module`, `function`, `if`, `for`, -`while`, `type`, etc.) and end with the `end` keyword. - -This plug-in adds support for the |matchit| plugin, such that pressing |%| while -on a block keyword will jump to the other keywords pertaining to the same -block. For example, if the cursor is at the beginning of the following code: -> - if a == 1 - if b > 0 - println("yes") - end - else - println("no") - end -< -then pressing |%| will jump to the `else` keyword, pressing it again will jump -to `end`, and pressing it again will go back to the first `if`. - -Note that the matchit plugin is normally distributed with ViM, but it is -disabled by default. To enable it, add this line to your |.vimrc| file: -> - runtime macros/matchit.vim -< -The julia-vim plug-in also adds commands to jump around block keywords in -normal, operator-pending and visual modes (see |vim-modes|). These are somehow -similar to the |]]| and |]m| mappings when used in C and Java files, -respectively, but are more powerful. These commands also require that the -matchit plugin is enabled. - -There are two families of block movements, keyword-oriented (see -|julia-vim-blocks-move|) and block-oriented (see -|julia-vim-blocks-blockmove|). - -Finally, this plug-in also adds block |text-objects| special mappings, so that -whole blocks can be manipulated as a whole when in visual mode or -operator-pending mode, see |julia-vim-block-objects|. - -The block movements and block objects mappings can be collectively disabled, -see |g:julia_blocks|, and customized, see |g:julia_blocks_mappings|. - -NOTE: in all cases, macros at the beginning of a block are considered as part -of the block itself. For example, in this code: -> - @inbounds for i = 1:5 - s += v[i] - end -< -the block begins at `@inbounds`. - ------------------------------------------------------------------------------- -KEYWORD-ORIENTED MOVEMENTS *julia-vim-blocks-move* - -These movements jump to the following/preceding block keyword, and they -differentiate between begin keywords and end keywords. Some block keywords can -also be used outside blocks (e.g. `for` in comprehensions, or `end` within -indexing expressions): these instances are ignored by these commands. - -The following movements are provided: - - *julia_]j* *julia_]J* *julia_[j* *julia_[J* -move_n : jumps to the next begin keyword. By default, it is mapped to `]j`. -move_N : jumps to the next end keyword. By default, it is mapped to `]J`. -move_p : jumps to the preceding begin keyword. By default, it is mapped to `[j`. -move_P : jumps to the preceding end keyword. By default, it is mapped to `[J`. - -Use |g:julia_blocks_mappings| to customize the mappings. - ------------------------------------------------------------------------------- -BLOCK-ORIENTED MOVEMENTS *julia-vim-blocks-moveblock* - -These movements are like keyword-oriented movements (|julia-vim-blocks-move|), -except that they ignore nested blocks within the block where the cursor is. -For example, given the following code (with line annotations): -> - 1 while true - 2 a += 1 - 3 if a > 5 - 4 break - 5 end - 6 end - 7 if b == 2 - 8 return - 9 end -< -if the cursor is on line 2, these movements will ignore the inner -`if/end` block (lines 3 to 5). You would then be able to jump directly -to lines 1 (with `[[`), 6 (with `][`), 7 (with `]]`), or 9 (with `2][`). - -The following movements are provided: - - *julia_]]* *julia_][* *julia_[[* *julia_[]* -moveblock_n : gets out from the current block (if any) and jumps to the next - begin keyword. (Similar to |w| for word movements.) By default, - it is mapped to `]]`. -moveblock_N : jumps to the end of the current block, if any. If the cursor is - already at the end of a block, jumps to the end of the following - block at the same level of the current one, or at the end of the - enclosing block. (Similar to |e| for word movements.) By - default, it is mapped to `][`. -moveblock_p : jumps to the beginning of the current block, if any. If the - cursor is already at the beginning of a block, jumps to the - beginning of the preceding block at the same level of the - current one, or at the beginning of the enclosing block. - (Similar to |b| for word movements.) By default, it is mapped to - `[[`. -moveblock_P : gets out from the current block (if any) and jumps to the - preceding end keyword. (Similar to |ge| for word movements.) - By default, it is mapped to `[]`. - -Use |g:julia_blocks_mappings| to customize the mappings. - ------------------------------------------------------------------------------- -BLOCK TEXT OBJECTS *julia-vim-blocks-objects* - -The julia-vim plug-in extends the ViM |text-objects| by defining special -mappings which allow to operate on blocks as a whole when in visual mode -or operator-pending mode. The default mappings use `aj` and `ij` to refer to -these objects. -For example, given the following code (with line annotations): -> - 1 while true - 2 a += 1 - 3 if a > 5 - 4 break - 5 end - 6 end -< -if the cursor is on `break` on line 4, pressing `vaj` will select the whole -inner `if` block (lines 3 to 5), and pressing `aj` again will select the whole -`while` block (lines 1 to 6). The same effect could have been obtained with a -counter, i.e. using `v2aj`. If the cursor were initially on line 2, the whole -`while` block would have been selected with the first `vaj`. Using `daj` would -delete a block, `caj` would delete it and leave ViM in insert mode, `=aj` -would indent it, etc. -Starting from line 2, pressing `vij` wuold only select the inner part of the -`while` block (lines 2 to 5). - -The following mappings are provided: - - *julia_aj* *julia_ij* -select_a : the block which contains the cursor, including its delimiters. - By default, this is mapped to `aj`. Repeated application (e.g. - `vajaj`) selects the enclosing blocks. A counter can be used to - the same effect as repetition (e.g. `v2aj`). -select_i : same as select_a, but only selects the lines included between the - delimiters. Thus, this does not work with single-line blocks. - By default, this is mapped to `ij`. Repeated application (e.g. - `vijij`) has no effect, but using a counter has the same effect as - using "select_a" and then selecting the inner part of the outermost - block. For example, with the default mappings, `v3ij` is the same as - `v3ajij`, or `vajajajij`. - -Use |g:julia_blocks_mappings| to customize the mappings. - -The following auxiliary function is only mapped to normal mode: - - *julia_whereami* -whereami : this mapping prints the first line of the current block on the - command line. If invoked repeatedly, or if given a count, it prints - the first line of the enclosing blocks, like `select_a`. If followed - by `select_a`, the selection, or operation, will refer to the last - block printed. By default, it is not mapped to any key, but a - mapping can be easily provided in |g:julia_blocks_mappings|. It is - possible to obtain the string, instead of having it printed, by - calling the function `julia_blocks#whereami()`. In such case, use - the function `julia_blocks#select_reset()` to reset the block - nesting level. - ------------------------------------------------------------------------------- -VARIABLES *julia-vim-blocks-variables* - - *g:julia_blocks* -g:julia_blocks - - Determines whether to map block-wise movements and objects. If - unspecified, it is on. You can disable the feature by default - by inserting the line -> - let g:julia_blocks = 0 -< - in your |.vimrc| file. - - *g:julia_blocks_mappings* -g:julia_blocks_mappings - - Custom mapping for block-wise movements. This must be a |dict| - associating movements to key combinations. Use empty strings - to disable individual mappings. The following is equivalent - to the default mappings (see |julia-vim-blocks-moveblock|, - |julia-vim-blocks-move| and |julia-vim-blocks-objects|): -> - let g:julia_blocks_mappings = { - \ "move_n" : "]j", - \ "move_N" : "]J", - \ "move_p" : "[j", - \ "move_P" : "[J", - \ - \ "moveblock_n" : "]]", - \ "moveblock_N" : "][", - \ "moveblock_p" : "[[", - \ "moveblock_P" : "[]", - \ - \ "select_a" : "aj", - \ "select_i" : "ij", - \ - \ "whereami" : "", - \ } -< - You can change individual mappings by writing something like - this in your |.vimrc| file: -> - let g:julia_blocks_mappings = { - \ "move_N" : "]n", - \ "move_P" : "[n", - \ "whereami" : "j", - \ } -< - Or you can disable individual mappings by writing something like - this in your |.vimrc| file: -> - let g:julia_blocks_mappings = { - \ "moveblock_n" : "", - \ "moveblock_p" : "", - \ } -< - All unspecified entries keep their default value. - - -============================================================================== -REFERRING TO DOCUMENTATION *julia-vim-doc* - - *julia-vim-K* -K - Look up documentation for the keyword under the cursor. If found, - a preview window with the documentation is opened. - - This also works for keywords within the opened preview window, - allowing effortless browsing of the documentation. - - (This is not really a key mapping, but uses the built-in - |keywordprg|-mechanism in vim; see |K| if you're curious). - - - *(JuliaDocPrompt)* -(JuliaDocPrompt) - Open a prompt for keyword documentation lookup. If you don't use |?| - for backward search, you can use the following to make `?` work like - in the Julia REPL: -> - autocmd FileType julia nmap ? (JuliaDocPrompt) -< - Apply |:augroup| as needed. - - - *:JuliaDoc* -:JuliaDoc {keyword} - Look up documentation for {keyword}. - - -============================================================================== -EXTRAS *julia-vim-extras* - - - *julia#toggle_function_blockassign* - *julia#function_block2assign* - *julia#function_assign2block* -julia#toggle_function_blockassign() -julia#function_block2assign() -julia#function_assign2block() - - These functions allow to transform function definitions - between block format and assignment format. For example, - these two definitions are equivalent: -> - function test(x, y) - x + 2y - end - - test(x, y) = x + 2y -< - You can use the function `julia#toggle_function_blockassign()` - to switch between the two forms (the cursor needs to be on the - first line of the block form). This functionality requires - that the |matchit| plugin is loaded. Only three-line function - blocks like the one in the example are recognized. When - changing the block form into the assignment form, `return` - statements are removed; if the result is empty, `nothing` is - substituted. Leading macros (e.g. `@inline` or `@compat`) are - recognized and preserved by the transformation. - - In order to make this functionality practical, it is advisable - to map it to some key combination, e.g.: -> - noremap fb :call julia#toggle_function_blockassign() -< - -============================================================================== -CUSTOMIZATIONS *julia-vim-options* - -The following options allows customizing some aspects of the plugin. - - *g:julia_spellcheck_docstrings* -g:julia_spellcheck_docstrings - - Determines whether to enable spell-checking for docstrings, - i.e. triple quoted strings that start in the first column. See - |spell|. Default: on (set to `1`). - - *g:julia_spellcheck_strings* -g:julia_spellcheck_strings - - Determines whether to enable spell-checking for all strings. - See |spell|. Default: off (set to `0`). - - *g:julia_spellcheck_comments* -g:julia_spellcheck_comments - - Determines whether to enable spell-checking for comments. See - |spell|. Default: on (set to `1`). - - *g:julia_highlight_operators* -g:julia_highlight_operators - - Determines whether to apply syntax highlighting to operators. - Default: on (set to `1`). - - -============================================================================== -ABOUT *julia-vim-about* - -Grab the latest version or report a bug on GitHub: - -http://github.com/JuliaEditorSupport/julia-vim - - vim:tw=78:et:ft=help:norl: - -endif diff --git a/doc/ledger.txt b/doc/ledger.txt deleted file mode 100644 index 1cb2f65cd..000000000 --- a/doc/ledger.txt +++ /dev/null @@ -1,443 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ledger') == -1 - -*ledger.txt* Plugin for the ledger filetype. - - - *ledger* *ledger-plugin* - -Contents: - - Commands............|ledger-invoking| - Source................|ledger-source| - Usage..................|ledger-usage| - Tips....................|ledger-tips| - Reports..............|ledger-reports| - Settings............|ledger-settings| - Completion........|ledger-completion| - License..............|ledger-license| - - -============================================================================== -USAGE *ledger-usage* - -Copy each file to the corresponding directory in your ~/.vim directory or -install using Pathogen. - -You can also use a modeline like this in every ledger file: - - vim:filetype=ledger - -============================================================================== -TIPS *ledger-tips* - -Tips and useful commands - -* vim-ledger can do syntax-sensitive folding when you set `foldmethod=syntax` - in the |modeline| of your ledger file. This way transactions can shrink down - to just one line. - -* Try account-completion (as explained below). If you use YouCompleteMe, you - should disable it for Ledger files. Put this in your .vimrc: - - if exists('g:ycm_filetype_blacklist') - call extend(g:ycm_filetype_blacklist, { 'ledger': 1 }) - endif - -* You may use `:make` for syntax checking. It may be convenient to define a - mapping for the following command: - - :silent make | redraw! | cwindow - - It is recommended to set the value of `g:ledger_extra_options` (see below) - as follows: - - let g:ledger_extra_options = '--pedantic --explicit --check-payees' - - to catch most potential problems in your source file. - -* Remap vim paragraph motion to move by transaction. - - In vim, the "{" and "}" keystrokes move the cursor up and down by whole - paragraphs. They can be redefined in ledger files to move by transaction - instead. Add these lines to .vimrc: - - au FileType ledger noremap { ?^\d - au FileType ledger noremap } /^\d - - The default definitions already work in ledger files that separate - transactions with blank lines. - -* `:call ledger#transaction_date_set(line('.'), "auxiliary")` - - will set today's date as the auxiliary date of the current transaction. You - can use also "primary" or "unshift" in place of "auxiliary". When you pass - "unshift" the old primary date will be set as the auxiliary date and today's - date will be set as the new primary date. - To use a different date pass a date measured in seconds since 1st Jan 1970 - as the third argument. - -* `:call ledger#transaction_state_set(line('.'), '*')` - - sets the state of the current transaction to '*'. You can use this in custom - mappings. - -* `:call ledger#transaction_state_toggle(line('.'), ' *?!')` - - will toggle through the provided transaction states. You can map this to - double-clicking for example: - - noremap <2-LeftMouse>\ - :call ledger#transaction_state_toggle(line('.'), ' *?!') - -* `:LedgerAlign` - - moves the amount expression of a posting so that the decimal separator is - aligned at the column specified by g:ledger_align_at. If an amount has no - decimal point, the imaginary decimal point to the right of the least - significant digit will align. The command acts on a range, with the default - being the current line. - - The decimal separator can be set using `g:ledger_decimal_sep`. The default - value of `g:ledger_decimal_sep` is `'.'`. - - See below for the recommended mappings. - -* `:call ledger#align_amount_at_cursor()` - - aligns the amount under the cursor and append/prepend the default currency. - The default currency can be set using `g:ledger_default_commodity`. Whether - the commodity should be inserted before the amount or appended to it can be - configured with the boolean flag `g:ledger_commodity_before` (the default - value is 1). A separator between the commodity and the amount may be set - using `g:ledger_commodity_sep`. - - See below for the recommended mappings. - -* `:call ledger#autocomplete_and_align()` - - when the cursor is on a number or immediately after it, invokes - `ledger#align_amount_at_cursor()` to align it and add the default currency; - otherwise, performs autocompletion. If you define the following mappings in - your `.vimrc` then you may perform both autocompletion and alignment using - the key: - - au FileType ledger inoremap \ - =ledger#autocomplete_and_align() - au FileType ledger vnoremap :LedgerAlign - - Alternatively, you may create a file `.vim/after/ftplugin/ledger.vim` - containing the following definitions: - - inoremap \ - =ledger#autocomplete_and_align() - vnoremap :LedgerAlign - - Now, you may type `asset:check123.45`, and have the - account name autocompleted and `$123.45` properly aligned (assuming your - default commodity is set to `'$'`). Or you may press in Visual mode - to align a number of transactions at once. - -* `:call ledger#entry()` - - enters a new transaction based on the text in the current line. - The text in the current line is replaced by the new transaction. - This is a front end to `ledger entry`. - -============================================================================== -REPORTS *ledger-reports* - -* `:Ledger` - - Executes an arbitrary Ledger command and sends the output to a new buffer. - For example: - - :Ledger bal ^assets ^liab - - Errors are displayed in a quickfix window. The command offers account and - payee autocompletion (by pressing ): every name starting with `@` is - autocompleted as a payee; any other name is autocompleted as an account. - - In a report buffer or in the quickfix window, you may press to switch - back to your source file, and you may press `q` to dismiss the current window. - - There are three highlight groups that are used to color the report: - - * `LedgerNumber` - - This is used to color nonnegative numbers. - - * `LedgerNegativeNumber` - - This is used to color negative numbers. - - * `LedgerImproperPerc` - - This is used to color improper percentages. - -* `:Balance` - - Show the pending and cleared balance of a given account below the status - line. For example: - - :Balance checking:savings - - The command offers payee and account autocompletion (see `:Ledger`). The - account argument is optional: if no argument is given, the first account - name found in the current line is used. - - Two highlight groups can be used to customize the colors of the line: - - * `LedgerCleared` - - This is used to color the cleared balance. - - * `LedgerPending` - - This is used to color the pending balance. - -* `:Register` - - Opens an arbitrary register report in the quickfix window. For example: - - :Register groceries -p 'this month' - - The command offers account and payee autocompletion (see |:Ledger|). You - may use the standard quickfix commands to jump from an entry in the register - report to the corresponding location in the source file. If you use GUI Vim - or if your terminal has support for the mouse (e.g., iTerm2, or even - Terminal.app in OS X 10.11 or later), you may also double-click on a line - number in the quickfix window to jump to the corresponding posting. - - It is strongly recommended that you add mappings for common quickfix - commands like `:cprev` and `:cnext`, or that you use T. Pope's Unimpaired - plugin. - -* :`Reconcile` - - Reconcile an account. For example: - - :Reconcile checking - - After you press Enter, you will be asked to enter a target amount (use - Vim's syntax for numbers, not your ledger's format). For example, for a - checking account, the target amount may be the balance of your latest bank - statement. The list of uncleared postings appears in the quickfix window. - The current balance of the account, together with the difference between the - target amount and the cleared balance, is shown at the bottom of the screen. - You may use standard quickfix commands to navigate through the postings. You - may use |ledger#transaction_state_set()| to update a transaction's state. - Every time you save your file, the balance and the difference from the - target amount are updated at the bottom of the screen. The goal, of course, - is to get such difference to zero. You may press `` to refresh the - Reconcile buffer. To finish reconciling an account, simply close the - quickfix window. - - There is a highlight group to customize the color of the difference from - target: - - * `LedgerTarget` - - This is used to color the difference between the target amount and the - cleared balance. - -============================================================================== -SETTINGS *ledger-settings* - -Configuration - -Include the following let-statements somewhere in your `.vimrc` to modify the -behaviour of the ledger filetype. - -* Path to the `ledger` executable: - - let g:ledger_bin = 'ledger' - -* Additional default options for the `ledger` executable: - - let g:ledger_extra_options = '' - -* To use a custom external system command to generate a list of account names - for completion, set the following. If g:ledger_bin is set, this will default - to running that command with arguments to parse the current file using the - accounts subcommand (works with ledger or hledger), otherwise it will parse - the postings in the current file itself. - - let g:ledger_accounts_cmd = 'your_command args' - -* To use a custom external system command to generate a list of descriptions - for completion, set the following. If g:ledger_bin is set, this will default - to running that command with arguments to parse the current file using the - descriptions subcommand (works with ledger or hledger), otherwise it will - parse the transactions in the current file itself. - - let g:ledger_descriptions_cmd = 'your_command args' - -* Number of columns that will be used to display the foldtext. Set this when - you think that the amount is too far off to the right. - - let g:ledger_maxwidth = 80 - -* String that will be used to fill the space between account name and amount in - the foldtext. Set this to get some kind of lines or visual aid. - - let g:ledger_fillstring = ' -' - -* If you want the account completion to be sorted by level of detail/depth - instead of alphabetical, include the following line: - - let g:ledger_detailed_first = 1 - -* By default vim will fold ledger transactions, leaving surrounding blank lines - unfolded. You can use 'g:ledger_fold_blanks' to hide blank lines following a - transaction. - - let g:ledger_fold_blanks = 0 - - A value of 0 will disable folding of blank lines, 1 will allow folding of a - single blank line between transactions; any larger value will enable folding - unconditionally. - - Note that only lines containing no trailing spaces are considered for - folding. You can take advantage of this to disable this feature on a - case-by-case basis. - -* Decimal separator: - - let g:ledger_decimal_sep = '.' - -* Specify at which column decimal separators should be aligned: - - let g:ledger_align_at = 60 - -* Default commodity used by `ledger#align_amount_at_cursor()`: - - let g:ledger_default_commodity = '' - -* Flag that tells whether the commodity should be prepended or appended to the - amount: - - let g:ledger_commodity_before = 1 - -* String to be put between the commodity and the amount: - - let g:ledger_commodity_sep = '' - -* Flag that enable the spelling of the amount: - - let g:ledger_commodity_spell = 1 - -* Format of transaction date: - - let g:ledger_date_format = '%Y/%m/%d' - -* The file to be used to generate reports: - - let g:ledger_main = '%' - - The default is to use the current file. - -* Position of a report buffer: - - let g:ledger_winpos = 'B' - - Use `b` for bottom, `t` for top, `l` for left, `r` for right. Use uppercase letters - if you want the window to always occupy the full width or height. - -* Format of quickfix register reports (see |:Register|): - - let g:ledger_qf_register_format = \ - '%(date) %-50(payee) %-30(account) %15(amount) %15(total)\n' - - The format is specified using the standard Ledger syntax for --format. - -* Format of the reconcile quickfix window (see |:Reconcile|): - - let g:ledger_qf_reconcile_format = \ - '%(date) %-4(code) %-50(payee) %-30(account) %15(amount)\n' - - The format is specified using the standard Ledger syntax for --format. - -* Flag that tells whether a location list or a quickfix list should be used: - - let g:ledger_use_location_list = 0 - - The default is to use the quickfix window. Set to 1 to use a location list. - -* Position of the quickfix/location list: - - let g:ledger_qf_vertical = 0 - - Set to 1 to open the quickfix window in a vertical split. - -* Size of the quickfix window: - - let g:ledger_qf_size = 10 - - This is the number of lines of a horizontal quickfix window, or the number - of columns of a vertical quickfix window. - -* Flag to show or hide filenames in the quickfix window: - - let g:ledger_qf_hide_file = 1 - - Filenames in the quickfix window are hidden by default. Set this to 1 is - you want filenames to be visible. - -* Text of the output of the |:Balance| command: - - let g:ledger_cleared_string = 'Cleared: ' - let g:ledger_pending_string = 'Cleared or pending: ' - let g:ledger_target_string = 'Difference from target: ' - -============================================================================== -COMPLETION *ledger-completion* - -Omni completion is currently implemented for account names only. - -### Accounts - -Account names are matched by the start of every sub-level. When you -insert an account name like this: - - Asse - -You will get a list of top-level accounts that start like this. - -Go ahead and try something like: - - As:Ban:Che - -When you have an account like this, 'Assets:Bank:Checking' should show up. - -When you want to complete on a virtual transaction, it's currently best -to keep the cursor in front of the closing bracket. Of course you can -insert the closing bracket after calling the completion, too. - -============================================================================== -LICENSE *ledger-license* - -https://github.com/ledger/vim-ledger - -Copyright 2019 Caleb Maclennan -Copyright 2009–2017 Johann Klähn -Copyright 2009 Stefan Karrmann -Copyright 2005 Wolfgang Oertl - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation, either version 2 of the License, or (at your -option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General -Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program. If not, see . - - -vim:ts=8 sw=8 noexpandtab tw=78 ft=help: - - -endif diff --git a/doc/ocaml.txt b/doc/ocaml.txt deleted file mode 100644 index 83c5418dc..000000000 --- a/doc/ocaml.txt +++ /dev/null @@ -1,16 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 - -*ocaml.txt* Filetype plugin for OCaml - -CONFIGURATION *ocaml-configuration* - - *g:ocaml_highlight_operators* - -By default operators are not linked to the Operator group and thus not -highlighted. You can turn on highlighting of operators by defining: - - let g:ocaml_highlight_operators = 1 - - vim:tw=78:et:ft=help:norl: - -endif diff --git a/doc/opam.txt b/doc/opam.txt deleted file mode 100644 index 6669bb2b5..000000000 --- a/doc/opam.txt +++ /dev/null @@ -1,22 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 - -*opam.txt* Switch OCaml versions from inside Vim using OPAM - -Author: Rudi Grinberg -License: Same terms as Vim itself (see |license|) - -This plugin is only available if 'compatible' is not set. - -COMMANDS *:opam* - -:Opam {version} Set the current OCaml version to {version}. - -ABOUT *opam-about* - -Grab the latest version or report a bug on GitHub: - -https://github.com/ocaml/vim-ocaml - - vim:tw=78:et:ft=help:norl: - -endif diff --git a/doc/pgsql.txt b/doc/pgsql.txt deleted file mode 100644 index 7ccd03d04..000000000 --- a/doc/pgsql.txt +++ /dev/null @@ -1,143 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pgsql') == -1 - -*pgsql.txt* Syntax highlighting for PostgreSQL files - _ ~ - | | ~ - ____ ____ ___ ____| | ~ - | _ \ / _ |/___)/ _ | | ~ - | |_| ( (_| |___ | |_| | | ~ - | __/ \___ (___/ \__ |\_) ~ - |_| (_____| |_| ~ - - The best PostgreSQL plugin for Vim! - -Author: Lifepillar -License: Public Domain - -============================================================================== -CONTENTS *pgsql-contents* - - 1. Syntax highlighting ................... |pgsql-syntax| - 2. Customization ......................... |pgsql-customization| - 3. Autocompletion ........................ |pgsql-autocompletion| - 4. Contributing .......................... |pgsql-contributing| - 5. Credits ............................... |pgsql-credits| - -============================================================================== -Syntax highlighting *pgsql-syntax* - -Files with a .`pgsql` suffix are highlighted out of the box. If you want to -highlight `.sql` files using this plugin by default, add this to your `.vimrc` -(see |ft_sql.txt| for more details): -> - let g:sql_type_default = 'pgsql' -< -Alternatively, after loading a `.sql` file use this command: -> - SQLSetType pgsql.vim -< -To set the file type in new buffers use: -> - let b:sql_type_override='pgsql' | set ft=sql -< -Identifiers starting with an underscore are highlighted as variables. It is -recommended to adopt the convention of prefixing function parameters and local -variables with `_`. - -Code between `$pgsql$`, `$body$`, or `$$` pairs is interpreted as PL/pgSQL and -highlighted accordingly (the delimiters are case-insensitive). If you prefer -to use `$$` to highlight strings instead, you may set |g:pgsql_dollar_strings| -to 1. - -Text enclosed between `$anyword$` pairs, where `anyword` is any non-empty -sequence of word characters different from those with a special meaning (such -as `$pgsql$`) is treated as a multi-line string. - -Finally, the plugin supports syntax highlighting of arbitrary languages within -procedure and function blocks. This feature needs to be configured: see -|g:pgsql_pl|. - -============================================================================== -Customization *pgsql-customization* - - *'g:pgsql_backslash_quote'* -Set to 1 to recognize `\'` as an escape sequence in all strings. By default, -`\'` is treated as an escape sequence only in "escape" strings constants, -i.e., strings enclosed in `E''`. -> - let g:pgsql_backslash_quote = 0 -< - *'g:pgsql_disabled_extensions'* -Support for the most common PostgreSQL extensions is enabled by default. Set -this to a List of names of extensions whose keywords you do not want to be -highlighted. -> - let g:pgsql_disabled_extensions = [] -< - *'g:pgsql_dollar_strings'* -Set to 1 if you want double-dollar enclosed text highlighted as a SQL string. -By default, text quoted with `$$` is highlighted as PL/pgSQL. -> - let g:pgsql_dollar_strings = 0 -< - *'g:pgsql_pl'* - *'b:pgsql_pl'* -A List of the filetypes that should be highlighted inside the body of -user-defined functions and procedures. -> - let g:pgsql_pl = [] -< -For example, to use PL/Python and PL/R, you should define: -> - let g:pgsql_pl = ['python', 'r'] -< -Then, code between `$python$` pairs will be highlighted as Python, and code -between `$r$` pairs will be highlighted as R. - -The buffer-local version of this setting can be used to override the global -setting in a single buffer. - -Note: changes to any of these variables take effect after the SQL filetype is -reloaded. - -============================================================================== -Autocompletion *pgsql-autocompletion* - -This plugin just defines a new dialect for Vim's SQL plugin. As such, it -inherits the static and dynamic completion methods already offered by Vim (see -|sql-completion|). So, for example, by default you may use `f` to -complete function names, `T` to complete types, and so on. See -|ft_sql.txt| for thorough documentation about SQL support in Vim. - -As far as I know, YouCompleteMe does not support SQL. If you use YouCompleteMe -you may want to disable it for SQL buffers. Add this to -`.vim/after/ftplugin/sql.vim`: -> - if exists('g:ycm_filetype_blacklist') - call extend(g:ycm_filetype_blacklist, { 'sql': 1 }) - endif -< -Of course, I recommend using my own MUcomplete plugin over YCM ;) - -============================================================================== -Contributing *pgsql-contributing* - -For bug reports and feature requests please use: - - https://github.com/lifepillar/pgsql.vim/issues - -Pull requests are welcome, too! - -============================================================================== -Credits *pgsql-credits* - -This plugin was originally a fork of space::tekk's - - https://github.com/spacetekk/pgsql.vim - -and completely rewritten. - - vim:tw=78:ts=8:noet:ft=help:norl: - - -endif diff --git a/doc/polyglot.txt b/doc/polyglot.txt new file mode 100644 index 000000000..ace96d0f8 --- /dev/null +++ b/doc/polyglot.txt @@ -0,0 +1,29 @@ +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--- + o | o o | o o | o o | o o | o o | o o | o o | o o +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--- + +*polyglot-vim-plugin* Language pack for Vim + +CONFIGURATION *polyglot.vim* + +You can disable vim-polyglot by putting using `g:polyglot_disabled` +option. It needs to be defined before vim-polyglot is loaded. + +``` +let g:polyglot_disabled = ['javascript', 'autoindent', 'sensible'] +``` + +What can be disabled: + +1. Language packs, like "javascript", "css" etc. +2. Support for detecting indentation like vim-sleuth ('autoindent') +3. Default vim settings from vim-sensible ('sensible') + + +You can file bugs, and find more information at: + +https://github.com/sheerun/vim-polyglot + +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--- + o | o o | o o | o o | o o | o o | o o | o o | o o +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+--- diff --git a/doc/ps1.txt b/doc/ps1.txt deleted file mode 100644 index 660f2c1a0..000000000 --- a/doc/ps1.txt +++ /dev/null @@ -1,68 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 - -*ps1.txt* A Windows PowerShell syntax plugin for Vim - -Maintainer: Peter Provost -License: Apache 2.0 -Version: 2.10 - -INTRODUCTION *ps1-syntax* - -This plugin provides Vim syntax, indent and filetype detection for Windows -PowerShell scripts, modules, and XML configuration files. - - -ABOUT *ps1-about* - -Grab the latest version or report a bug on GitHub: - -https://github.com/PProvost/vim-ps1 - - -FOLDING *ps1-folding* - -The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks -and digital signatures in scripts. - -When 'foldmethod' is set to "syntax" then function script blocks will be -folded unless you use the following in your .vimrc or before opening a script: > - - :let g:ps1_nofold_blocks = 1 -< -Digital signatures in scripts will also be folded unless you use: > - - :let g:ps1_nofold_sig = 1 -< -Note: syntax folding might slow down syntax highlighting significantly, -especially for large files. - - -COMPILER *ps1-compiler* - -The powershell |compiler| script configures |:make| to execute the script in -PowerShell. - -It tries to pick a smart default PowerShell command: `pwsh` if available and -`powershell` otherwise, but you can customize the command: > - - :let g:ps1_makeprg_cmd = '/path/to/pwsh' -< -To configure whether to show the exception type information: > - - :let g:ps1_efm_show_error_categories = 1 -< - -KEYWORD LOOKUP *ps1-keyword* - -To look up keywords using PowerShell's Get-Help, press the |K| key. For more -convenient paging, the pager `less` should be installed, which is included in -many Linux distributions and in macOS. - -Many other distributions are available for Windows like -https://chocolatey.org/packages/less/. Make sure `less` is in a directory -listed in the `PATH` environment variable, which chocolatey above does. - ------------------------------------------------------------------------------- - vim:ft=help: - -endif diff --git a/doc/python-syntax.txt b/doc/python-syntax.txt deleted file mode 100644 index d5391ff73..000000000 --- a/doc/python-syntax.txt +++ /dev/null @@ -1,124 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'python') == -1 - -*python-syntax.txt* Python syntax highlighting - -============================================================================== -Introduction *python-syntax* *ft-python-syntax* *python.vim* - -This is an enhanced version of the original Vim 6.1 Python syntax highlighting -`python.vim` by Neil Schemenauer. - -Features --------- - -* Enhanced highlighting for: - * Strings - * Special symbols inside strings - * Numeric constants -* Added support for: - * Python 3 - * Numbers with underscores - * String %-formatting and f-strings - * Magic comments: source code encoding and shebangs - * New exceptions and builtins - * Doctests - * `@decorator` syntax - * Class variables such as `self` and `cls` - * Operators -* Highlighting of the following errors: - * Invalid symbols in source file - * Invalid numeric constants - * Invalid %-formatting inside strings - * Invalid variable names - * Invalid operators - * Mixing spaces and tabs - * Trailing spaces (Enabled with `g:python_highlight_space_errors`) -* Commands for easy switching between versions - -Folding is done by the plugin SimpylFold -(https://github.com/tmhedberg/SimpylFold). - -============================================================================== -Configuration *python-syntax-configuration* - -Option variables ----------------- - -Set variable to `1` to enable or `0` to disable. - -For example to enable all syntax highlighting features you can add the -following command to your `~/.config/nvim/init.vim` or `~/.vimrc`: > - - let g:python_highlight_all = 1 -< - -`g:python_version_2` (default `0`) - Python 2 mode - -`b:python_version_2` (default `0`) - Python 2 mode (buffer local) - -`g:python_highlight_builtins` (default `0`) - Highlight builtin objects, types, and functions - -`g:python_highlight_builtin_objs` (default `0`) - Highlight builtin objects only - -`g:python_highlight_builtin_types` (default `0`) - Highlight builtin types only - -`g:python_highlight_builtin_funcs` (default `0`) - Highlight builtin functions only - -`g:python_highlight_builtin_funcs_kwarg` (default `1`) - Highlight builtin functions when used as kwarg - -`g:python_highlight_exceptions` (default `0`) - Highlight standard exceptions - -`g:python_highlight_string_formatting` (default `0`) - Highlight `%` string formatting - -`g:python_highlight_string_format` (default `0`) - Highlight syntax of `str.format` syntax - -`g:python_highlight_string_templates` (default `0`) - Highlight syntax of `string.Template` - -`g:python_highlight_indent_errors` (default `0`) - Highlight indentation errors - -`g:python_highlight_space_errors` (default `0`) - Highlight trailing spaces - -`g:python_highlight_doctests` (default `0`) - Highlight doc-tests - -`g:python_highlight_func_calls` (default `0`) - Highlight functions calls - -`g:python_highlight_class_vars` (default `0`) - Highlight class variables `self` and `cls` - -`g:python_highlight_operators` (default `0`) - Highlight all operators - -`g:python_highlight_all` (default `0`) - Enable all highlight options above, except for previously set. - -`g:python_highlight_file_headers_as_comments` (default `0`) - Highlight shebang and coding headers as comments - -`g:python_slow_sync` (default `1`) - Disable for slow machines - -Commands --------- - -`Python2Syntax` - Switch to Python 2 - -`Python3Syntax` - Switch to Python 3 - -endif diff --git a/doc/reason.txt b/doc/reason.txt deleted file mode 100644 index ad2cd1d96..000000000 --- a/doc/reason.txt +++ /dev/null @@ -1,24 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reason') == -1 - -*reason.txt* Filetype plugin for Reason - -============================================================================== -CONTENTS *reason* *ft-reason* - - -============================================================================== -INTRODUCTION *reason-intro* - - -============================================================================== -SETTINGS *reason-settings* - - -============================================================================== -MAPPINGS *reason-mappings* - - -============================================================================== - vim:tw=78:sw=4:noet:ts=8:ft=help:norl: - -endif diff --git a/doc/rust.txt b/doc/rust.txt deleted file mode 100644 index 6dbb1a2ce..000000000 --- a/doc/rust.txt +++ /dev/null @@ -1,490 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 - -*ft_rust.txt* Filetype plugin for Rust - -============================================================================== -CONTENTS *rust* - -1. Introduction |rust-intro| -2. Settings |rust-settings| -3. Commands |rust-commands| -4. Mappings |rust-mappings| - -============================================================================== -INTRODUCTION *rust-intro* - -This plugin provides syntax and supporting functionality for the Rust -filetype. It requires Vim 8 or higher for full functionality. Some commands -will not work on earlier versions. - -============================================================================== -SETTINGS *rust-settings* - -This plugin has a few variables you can define in your vimrc that change the -behavior of the plugin. - -Some variables can be set buffer local (`:b` prefix), and the buffer local -will take precedence over the global `g:` counterpart. - - *g:rustc_path* -g:rustc_path~ - Set this option to the path to rustc for use in the |:RustRun| and - |:RustExpand| commands. If unset, "rustc" will be located in $PATH: > - let g:rustc_path = $HOME."/bin/rustc" -< - - *g:rustc_makeprg_no_percent* -g:rustc_makeprg_no_percent~ - Set this option to 1 to have 'makeprg' default to "rustc" instead of - "rustc %": > - let g:rustc_makeprg_no_percent = 1 -< - - *g:rust_conceal* -g:rust_conceal~ - Set this option to turn on the basic |conceal| support: > - let g:rust_conceal = 1 -< - - *g:rust_conceal_mod_path* -g:rust_conceal_mod_path~ - Set this option to turn on |conceal| for the path connecting token - "::": > - let g:rust_conceal_mod_path = 1 -< - - *g:rust_conceal_pub* -g:rust_conceal_pub~ - Set this option to turn on |conceal| for the "pub" token: > - let g:rust_conceal_pub = 1 -< - - *g:rust_recommended_style* -g:rust_recommended_style~ - Set this option to enable vim indentation and textwidth settings to - conform to style conventions of the rust standard library (i.e. use 4 - spaces for indents and sets 'textwidth' to 99). This option is enabled - by default. To disable it: > - let g:rust_recommended_style = 0 -< - - *g:rust_fold* -g:rust_fold~ - Set this option to turn on |folding|: > - let g:rust_fold = 1 -< - Value Effect ~ - 0 No folding - 1 Braced blocks are folded. All folds are open by - default. - 2 Braced blocks are folded. 'foldlevel' is left at the - global value (all folds are closed by default). - - *g:rust_bang_comment_leader* -g:rust_bang_comment_leader~ - Set this option to 1 to preserve the leader on multi-line doc comments - using the /*! syntax: > - let g:rust_bang_comment_leader = 1 -< - - *g:rust_use_custom_ctags_defs* -g:rust_use_custom_ctags_defs~ - Set this option to 1 if you have customized ctags definitions for Rust - and do not wish for those included with rust.vim to be used: > - let g:rust_use_custom_ctags_defs = 1 -< - - NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim - plugin, if you have it installed, AND if Universal Ctags is not - detected. This is because Universal Ctags already has built-in - support for Rust when used with Tagbar. - - Also, note that when using ctags other than Universal Ctags, it is not - automatically used when generating |tags| files that Vim can use to - navigate to definitions across different source files. Feel free to - copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish - to generate |tags| files. - - - *g:ftplugin_rust_source_path* -g:ftplugin_rust_source_path~ - Set this option to a path that should be prepended to 'path' for Rust - source files: > - let g:ftplugin_rust_source_path = $HOME.'/dev/rust' -< - - *g:rustfmt_command* -g:rustfmt_command~ - Set this option to the name of the 'rustfmt' executable in your $PATH. If - not specified it defaults to 'rustfmt' : > - let g:rustfmt_command = 'rustfmt' -< - *g:rustfmt_autosave* -g:rustfmt_autosave~ - Set this option to 1 to run |:RustFmt| automatically when saving a - buffer. If not specified it defaults to 0 : > - let g:rustfmt_autosave = 0 -< - There is also a buffer-local b:rustfmt_autosave that can be set for - the same purpose, and can override the global setting. - - *g:rustfmt_autosave_if_config_present* -g:rustfmt_autosave_if_config_present~ - Set this option to 1 to have *b:rustfmt_autosave* be set automatically - if a `rustfmt.toml` file is present in any parent directly leading to - the file being edited. If not set, default to 0: > - let g:rustfmt_autosave_if_config_present = 0 -< - This is useful to have `rustfmt` only execute on save, on projects - that have `rustfmt.toml` configuration. - - There is also a buffer-local b:rustfmt_autosave_if_config_present - that can be set for the same purpose, which can overrides the global - setting. - *g:rustfmt_fail_silently* -g:rustfmt_fail_silently~ - Set this option to 1 to prevent 'rustfmt' from populating the - |location-list| with errors. If not specified it defaults to 0: > - let g:rustfmt_fail_silently = 0 -< - *g:rustfmt_options* -g:rustfmt_options~ - Set this option to a string of options to pass to 'rustfmt'. The - write-mode is already set to 'overwrite'. If not specified it - defaults to '' : > - let g:rustfmt_options = '' -< - *g:rustfmt_emit_files* -g:rustfmt_emit_files~ - If not specified rust.vim tries to detect the right parameter to - pass to rustfmt based on its reported version. Otherwise, it - determines whether to run rustfmt with '--emit=files' (when 1 is - provided) instead of '--write-mode=overwrite'. > - let g:rustfmt_emit_files = 0 - - - *g:rust_playpen_url* -g:rust_playpen_url~ - Set this option to override the url for the playpen to use: > - let g:rust_playpen_url = 'https://play.rust-lang.org/' -< - - *g:rust_shortener_url* -g:rust_shortener_url~ - Set this option to override the url for the url shortener: > - let g:rust_shortener_url = 'https://is.gd/' -< - - *g:rust_clip_command* -g:rust_clip_command~ - Set this option to the command used in your OS to copy the Rust Play - url to the clipboard: > - let g:rust_clip_command = 'xclip -selection clipboard' -< - - *g:cargo_makeprg_params* -g:cargo_makeprg_params~ - Set this option to the string of parameters to pass to cargo. If not - specified it defaults to '$*' : > - let g:cargo_makeprg_params = 'build' -< - - *g:cargo_shell_command_runner* -g:cargo_shell_command_runner~ - Set this option to change how to run shell commands for cargo commands - |:Cargo|, |:Cbuild|, |:Crun|, ... - By default, |:terminal| is used to run shell command in terminal window - asynchronously. But if you prefer |:!| for running the commands, it can - be specified: > - let g:cargo_shell_command_runner = '!' -< - - -Integration with Syntastic *rust-syntastic* --------------------------- - -This plugin automatically integrates with the Syntastic checker. There are two -checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to -build code, and the former delivers a single edited '.rs' file as a compilation -target directly to the Rust compiler, `rustc`. - -Because Cargo is almost exclusively being used for building Rust code these -days, 'cargo' is the default checker. > - - let g:syntastic_rust_checkers = ['cargo'] -< -If you would like to change it, you can set `g:syntastic_rust_checkers` to a -different value. - *g:rust_cargo_avoid_whole_workspace* - *b:rust_cargo_avoid_whole_workspace* -g:rust_cargo_avoid_whole_workspace~ - When editing a crate that is part of a Cargo workspace, and this - option is set to 1 (the default), then 'cargo' will be executed - directly in that crate directory instead of in the workspace - directory. Setting 0 prevents this behavior - however be aware that if - you are working in large workspace, Cargo commands may take more time, - plus the Syntastic error list may include all the crates in the - workspace. > - let g:rust_cargo_avoid_whole_workspace = 0 -< - *g:rust_cargo_check_all_targets* - *b:rust_cargo_check_all_targets* -g:rust_cargo_check_all_targets~ - When set to 1, the `--all-targets` option will be passed to cargo when - Syntastic executes it, allowing the linting of all targets under the - package. - The default is 0. - - *g:rust_cargo_check_all_features* - *b:rust_cargo_check_all_features* -g:rust_cargo_check_all_features~ - When set to 1, the `--all-features` option will be passed to cargo when - Syntastic executes it, allowing the linting of all features of the - package. - The default is 0. - - *g:rust_cargo_check_examples* - *b:rust_cargo_check_examples* -g:rust_cargo_check_examples~ - When set to 1, the `--examples` option will be passed to cargo when - Syntastic executes it, to prevent the exclusion of examples from - linting. The examples are normally under the `examples/` directory of - the crate. - The default is 0. - - *g:rust_cargo_check_tests* - *b:rust_cargo_check_tests* -g:rust_cargo_check_tests~ - When set to 1, the `--tests` option will be passed to cargo when - Syntastic executes it, to prevent the exclusion of tests from linting. - The tests are normally under the `tests/` directory of the crate. - The default is 0. - - *g:rust_cargo_check_benches* - *b:rust_cargo_check_benches* -g:rust_cargo_check_benches~ - When set to 1, the `--benches` option will be passed to cargo when - Syntastic executes it. The benches are normally under the `benches/` - directory of the crate. - The default is 0. - -Integration with auto-pairs *rust-auto-pairs* ---------------------------- - -This plugin automatically configures the auto-pairs plugin not to duplicate -single quotes, which are used more often for lifetime annotations than for -single character literals. - - *g:rust_keep_autopairs_default* -g:rust_keep_autopairs_default~ - - Don't override auto-pairs default for the Rust filetype. The default - is 0. - -============================================================================== -COMMANDS *rust-commands* - -Invoking Cargo --------------- - -This plug defines very simple shortcuts for invoking Cargo from with Vim. - -:Cargo *:Cargo* - Runs 'cargo' with the provided arguments. - -:Cbuild *:Cbuild* - Shortcut for 'cargo build`. - -:Cclean *:Cclean* - Shortcut for 'cargo clean`. - -:Cdoc *:Cdoc* - Shortcut for 'cargo doc`. - -:Cinit *:Cinit* - Shortcut for 'cargo init`. - -:Crun *:Crun* - Shortcut for 'cargo run`. - -:Ctest *:Ctest* - Shortcut for 'cargo test`. - -:Cupdate *:Cupdate* - Shortcut for 'cargo update`. - -:Cbench *:Cbench* - Shortcut for 'cargo bench`. - -:Csearch *:Csearch* - Shortcut for 'cargo search`. - -:Cpublish *:Cpublish* - Shortcut for 'cargo publish`. - -:Cinstall *:Cinstall* - Shortcut for 'cargo install`. - -:Cruntarget *:Cruntarget* - Shortcut for 'cargo run --bin' or 'cargo run --example', - depending on the currently open buffer. - -Formatting ----------- - -:RustFmt *:RustFmt* - Runs |g:rustfmt_command| on the current buffer. If - |g:rustfmt_options| is set then those will be passed to the - executable. - - If |g:rustfmt_fail_silently| is 0 (the default) then it - will populate the |location-list| with the errors from - |g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1 - then it will not populate the |location-list|. - -:RustFmtRange *:RustFmtRange* - Runs |g:rustfmt_command| with selected range. See - |:RustFmt| for any other information. - - -Playpen integration -------------------- - -:RustPlay *:RustPlay* - This command will only work if you have web-api.vim installed - (available at https://github.com/mattn/webapi-vim). It sends the - current selection, or if nothing is selected, the entirety of the - current buffer to the Rust playpen, and emits a message with the - shortened URL to the playpen. - - |g:rust_playpen_url| is the base URL to the playpen, by default - "https://play.rust-lang.org/". - - |g:rust_shortener_url| is the base url for the shorterner, by - default "https://is.gd/" - - |g:rust_clip_command| is the command to run to copy the - playpen url to the clipboard of your system. - - -Evaluation of a single Rust file --------------------------------- - -NOTE: These commands are useful only when working with standalone Rust files, -which is usually not the case for common Rust development. If you wish to -building Rust crates from with Vim can should use Vim's make, Syntastic, or -functionality from other plugins. - - -:RustRun [args] *:RustRun* -:RustRun! [rustc-args] [--] [args] - Compiles and runs the current file. If it has unsaved changes, - it will be saved first using |:update|. If the current file is - an unnamed buffer, it will be written to a temporary file - first. The compiled binary is always placed in a temporary - directory, but is run from the current directory. - - The arguments given to |:RustRun| will be passed to the - compiled binary. - - If ! is specified, the arguments are passed to rustc instead. - A "--" argument will separate the rustc arguments from the - arguments passed to the binary. - - If |g:rustc_path| is defined, it is used as the path to rustc. - Otherwise it is assumed rustc can be found in $PATH. - -:RustExpand [args] *:RustExpand* -:RustExpand! [TYPE] [args] - Expands the current file using --pretty and displays the - results in a new split. If the current file has unsaved - changes, it will be saved first using |:update|. If the - current file is an unnamed buffer, it will be written to a - temporary file first. - - The arguments given to |:RustExpand| will be passed to rustc. - This is largely intended for specifying various --cfg - configurations. - - If ! is specified, the first argument is the expansion type to - pass to rustc --pretty. Otherwise it will default to - "expanded". - - If |g:rustc_path| is defined, it is used as the path to rustc. - Otherwise it is assumed rustc can be found in $PATH. - -:RustEmitIr [args] *:RustEmitIr* - Compiles the current file to LLVM IR and displays the results - in a new split. If the current file has unsaved changes, it - will be saved first using |:update|. If the current file is an - unnamed buffer, it will be written to a temporary file first. - - The arguments given to |:RustEmitIr| will be passed to rustc. - - If |g:rustc_path| is defined, it is used as the path to rustc. - Otherwise it is assumed rustc can be found in $PATH. - -:RustEmitAsm [args] *:RustEmitAsm* - Compiles the current file to assembly and displays the results - in a new split. If the current file has unsaved changes, it - will be saved first using |:update|. If the current file is an - unnamed buffer, it will be written to a temporary file first. - - The arguments given to |:RustEmitAsm| will be passed to rustc. - - If |g:rustc_path| is defined, it is used as the path to rustc. - Otherwise it is assumed rustc can be found in $PATH. - - -Running test(s) ---------------- - -:[N]RustTest[!] [options] *:RustTest* - Runs a test under the cursor when the current buffer is in a - cargo project with "cargo test" command. If the command did - not find any test function under the cursor, it stops with an - error message. - - When N is given, adjust the size of the new window to N lines - or columns. - - When ! is given, runs all tests regardless of current cursor - position. - - When [options] is given, it is passed to "cargo" command - arguments. - - When the current buffer is outside cargo project, the command - runs "rustc --test" command instead of "cargo test" as - fallback. All tests are run regardless of adding ! since there - is no way to run specific test function with rustc. [options] - is passed to "rustc" command arguments in the case. - - Takes optional modifiers (see ||): > - :tab RustTest - :belowright 16RustTest - :leftabove vert 80RustTest -< -rust.vim Debugging ------------------- - -:RustInfo *:RustInfo* - Emits debugging info of the Vim Rust plugin. - -:RustInfoToClipboard *:RustInfoClipboard* - Saves debugging info of the Vim Rust plugin to the default - register. - -:RustInfoToFile [filename] *:RustInfoToFile* - Saves debugging info of the Vim Rust plugin to the the given - file, overwritting it. - -============================================================================== -MAPPINGS *rust-mappings* - -This plugin defines mappings for |[[| and |]]| to support hanging indents. - -============================================================================== - vim:tw=78:sw=4:noet:ts=8:ft=help:norl: - -endif diff --git a/doc/scala.txt b/doc/scala.txt deleted file mode 100644 index b9fe2cf7b..000000000 --- a/doc/scala.txt +++ /dev/null @@ -1,137 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 - -*scala.txt* Syntax highlighting and helper functions for the Scala language. - -This plugin is only available if 'compatible' is not set. -{Vi does not have any of this} - -============================================================================== -INTRODUCTION *scala* - -Syntax highlighting and helper functions for the scala language. Extras -include: - - - Sorting of import statements, configurable to your conventions. - - Tagbar support to navigate definitions within a file in the plugin's - sidebar window. - - ...and probably more that we've forgotten to update in this doc. - -============================================================================== -OPTIONS *scala-options* - -Use these options to control behavior of the plugin. Default values are -indicated in the examples. - - *'g:scala_use_builtin_tagbar_defs'* -If you are using the Tagbar Vim plugin, vim-scala includes a Tagbar type -definition and ctags definition for Scala, so you can use Tagbar immediately. -If you have your own ctags definition in `~/.ctags` and prefer to use it, set -this option to 0 (we would appreciate contributions if you've improved the -ctags definition!). - -Note that Tagbar's ctags definition for Scala is not used to generate a -|tags| file that Vim can use to navigate to definitions in other files, only -for the plugin sidebar. Feel free to copy `vim-scala/ctags/scala.ctags` into -your own `~/.ctags` if you wish to generate |tags| files. -> - let g:scala_use_builtin_tagbar_defs = 1 -< - *'g:scala_use_default_keymappings'* -Set this option to disable definition of all mappings provided by vim-scala. -See |scala-mappings|. -> - let g:scala_use_default_keymappings = 1 -< - - *'g:scala_scaladoc_indent'* -By default, the plugin indents documentation comments according to the -standard Javadoc format. - /** - * This is a doc comment using Javadoc-style indentation. - */ -Set this option to enable the indentation standard as recommended for Scaladoc -comments. - /** This is a Scaladoc comment using - * the recommended indentation. - */ -> - let g:scala_scaladoc_indent = 1 -< - -============================================================================== -COMMANDS *scala-commands* - - *:SortScalaImports* -:SortScalaImports There are two modes in which this command can operate. - By default it walks all import groups at the top of - the Scala file and orders their lines alphabetically. - A group is a series of lines starting with the - import keyword separated by one or more blank lines. - - The second, more advanced mode, can be activated by - setting - - let g:scala_sort_across_groups=1 - - This makes this command include all imports in the - sorting regardless of blank lines in between them and - puts them in three predefined groups instead. - The three groups in which the imports can fall are: - - 1. Scala and Java core - 2. Third party libraries - 3. First party code (ie. your own) - - Java and Scala core imports are identified by the - java(x) and scala namespaces. - Everything else that isn't a first party namespace - will be a third party import. - You can define a regex that matches first party - namespaces by setting - - g:scala_first_party_namespaces - - For example in a standard Play app this would be - set to - g:scala_first_party_namespaces= - \ '\(controllers\|views\|models\)' - -============================================================================== -MAPPINGS *scala-mappings* - -Currently the only mappings defined are for FuzzyFinder users--these will -only be enabled if FuzzyFinder is detected. - - *scala-leader-fs* -fs "Find src". Primes |:FufFile| with `src/main/scala`, - and goes deeper still if only a single directory - exists below that. Helpful for package namespacing - like `src/main/scala/com/myorg`. - - *scala-leader-ft* -ft "Find test". Like |scala-leader-fs|, but with - `src/test/scala`. - - *scala-leader-fr* -fr "Find from root". For the rarer cases when you want to - start FuzzyFinder at project root (parent of `src/`). - -Disabling Mappings~ - -If you wish to disable the default key mappings, write the following line in -your ~/.vimrc: > - - let g:scala_use_default_keymappings = 0 - -============================================================================== -CREDITS *scala-credits* - -Developed by Derek Wyatt, building on initial work by Stefan Matthias Aust. -Distributed under the Apache 2 license. - -Project's home and Git repository: https://github.com/derekwyatt/vim-scala - ------------------------------------------------------------------------------- - vim:tw=78:ts=8:ft=help:norl: - -endif diff --git a/doc/terraform.txt b/doc/terraform.txt deleted file mode 100644 index b609f5840..000000000 --- a/doc/terraform.txt +++ /dev/null @@ -1,18 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 - -*terraform.txt* basic vim/terraform integration - -Author: HashiVim -License: ISC license -Repo: https://github.com/hashivim/vim-terraform - -COMMANDS *terraform* - -This command is only available if terraform is in your PATH. - - *terraform-:terraform* -:Terraform [args] Invoke an arbitrary terraform command. - - vim:tw=78:et:ft=help:norl: - -endif diff --git a/doc/textile.txt b/doc/textile.txt deleted file mode 100644 index 2b28186ac..000000000 --- a/doc/textile.txt +++ /dev/null @@ -1,70 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'textile') == -1 - -*textile.txt* Textile for Vim Last Change: November 3, 2008 - -============================================================================== -REQUIREMENTS *textile-requirements* - -- ruby - http://ruby-lang.org/ (seperate executable, not compiled in) -- RedCloth - http://redcloth.org/ - -Files with the extension *.textile will auto-detected. If editing a new file, -or otherwise, run ":setf textile" to enable textile commands. - - -============================================================================== -CHANGELOG *textile-changelog* - -0.3 - Fixed keymappings in the documentation -0.2 - Added multiple colors for headers, and alternating colors for list - items - - Fixed error in the vim script for TextileRenderBufferToFile - - Changed shortcut keys from \tp to \rp (render preview instead of - textile preview, since it's file-type specific anyways) -0.1 - Initial Release - -============================================================================== -COMMANDS *textile-commands* - -:TextilePreview - Render the current buffer to a temp file, and open it in - your web browser (OSX only) - - rp - -:TextileRenderTab - ... to a new tab - - rt - -:TextileRenderFile - ... to a file - - rf - - is \ by default, so rp == \rp - -============================================================================== -CONFIG *textile-config* - -MAC OS X: - - Optional: - let g:TextileBrowser="Google Chrome" - Open preview in "Google Chrome" - rather than Safari (optional) - -Other: - - Mandatory: - let g:TextileOS="Linux" - let g:TextileBrowser="/path/to/browser_bin" - - -============================================================================== -CREDITS *textile-credits* - -- "Dominic Mitchell":http://happygiraffe.net/: initial syntax highlighting -- "Aaron Bieber":http://blog.aaronbieber.com/: improved syntax highlighting -- "Tim Harper":http://tim.theenchanter.com/ : improved syntax highlighting, - plugin - -vim:tw=78:noet:wrap:ts=2:expandtab:ft=help:norl: - -endif diff --git a/doc/vim-fsharp.txt b/doc/vim-fsharp.txt deleted file mode 100644 index bc2a4657d..000000000 --- a/doc/vim-fsharp.txt +++ /dev/null @@ -1,210 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 - -*vim-fsharp.txt* F# support for Vim -*FSharp* *F#* *fsharp* *vim-fsharp* -=============================================================================== -# # -# ███████╗███████╗██╗ ██╗ █████╗ ██████╗ ██████╗ # -# ██╔════╝██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗ # -# █████╗ ███████╗███████║███████║██████╔╝██████╔╝ # -# ██╔══╝ ╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝ # -# ██║ ███████║██║ ██║██║ ██║██║ ██║██║ # -# ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ # -# # -=============================================================================== -CONTENTS *fsharp-contents* - - 1. Dependencies.................................|fsharp-dependencies| - 2. Usage........................................|fsharp-usage| - 3. Options......................................|fsharp-options| - 4. Commands.....................................|fsharp-commands| - 5. Mappings.....................................|fsharp-mappings| - 6. Credits......................................|fsharp-credits| - -=============================================================================== -DEPENDENCIES *fsharp-dependencies* - -Required:~ - - Vim 7.3 or higher with Python 2 or 3 support - - Mono OR .NET Framework - - F# - -Optional:~ - - Syntastic plugin (for syntax and type checking) - NOTE: Must be enabled (see |'g:syntastic_fsharp_checkers'|) - -=============================================================================== -USAGE *fsharp-usage* - -Syntax highlighting and linting will trigger upon opening a `*.fs`, `*.fsi`, -or `*.fsx` file. Using omni completion will begin the fsautocomplete process. - -Suggestion: Install a completer such as NeoComplete or SuperTab - -=============================================================================== -OPTIONS *fsharp-options* - - *'g:syntastic_fsharp_checkers'* -Use this option to enable syntastic integration > - let g:syntastic_fsharp_checkers=['syntax'] -< - *'g:fsharp_only_check_errors_on_write'* -Use this option to disable "on the fly" syntax checking > - let g:fsharp_only_check_errors_on_write = 1 -< - *'g:fsharpbinding_debug'* -Use this option to enable debug-mode and inspect fsautocomplete behavior: > - let g:fsharpbinding_debug = 1 -< -This will create two log files `log.txt` and `log2.txt` in your temporary folder -(i.e. `/tmp/`) - - *'g:fsharp_xbuild_path'* -Use this option set the msbuild/xbuild path > - let g:fsharp_xbuild_path = "/path/to/xbuild/or/msbuild" -< - - *'g:fsharp_test_runner'* -Use this option to point to a suitable test runner (such as nunit-console.exe) > - let g:fsharp_test_runner = "/path/to/test/runner" -< - - *'g:fsharp_completion_helptext'* -Use this option to disable helptext during auto completion. Turn off if -completion is too slow > - let g:fsharp_completion_helptext = 0 -< - - *'g:fsharp_map_keys'* -Use this option to disable default bindings > - let g:fsharp_map_keys = 0 -< - - *'g:fsharp_map_prefix'* -Use this option to override the default prefix of `` > - let g:fsharp_map_prefix = 'cp' -< -Set to `cp` in this example - - *'g:fsharp_map_fsisendline'* -Use this option to override the default mapping to send the current line to -fsharp interactive > - let g:fsharp_map_fsisendline = 'p' -< -Set to `p` in this example - - *'g:fsharp_map_fsisendsel'* -Use this option to override the default mapping to send the current selection -to fsharp interactive > - let g:fsharp_map_fsisendsel = 'p' -< -Set to `p` in this example - - *'g:fsharp_map_gotodecl'* -Use this option to override the default mapping to go to declaration in the -current window > - let g:fsharp_map_gotodecl = 'g' -< -Set to `g` in this example - - *'g:fsharp_map_gobackfromdecl'* -Use this option to override the default mapping to go back to where go to -declaration was triggered > - let g:fsharp_map_gobackfromdecl = 'b' -< -Set to `b` in this example - - *'g:fsharp_map_fsiinput'* -Override the default mapping to evaluate an fsharp expression in the fsi > - let g:fsharp_map_fsiinput = 'i' -< - -=============================================================================== -COMMANDS *fsharp-commands* - -General commands:~ - *:make* -:make - Calls xbuild on the fsproj for the current file (if any). - - *:FSharpParseProject* -:FSharpParseProject - Reparses all the project files and dependencies (this is done automatically - when opening a .fs or .fsi file). - - *:FSharpBuildProject* -:FSharpBuildProject - Calls xbuild on the fsproj for the current file (if any). Can also take a - path to the proj file to build. - - *:FSharpRunProject* -:FSharpRunProject - Runs the project for the current file (if any). - - *:FSharpRunTests* -:FSharpRunTests - If `g:fsharp_test_runner` is set it will build the current project and run - any tests. (Currently only tested with nunit-console.exe) - - *:FSharpToggleHelptext* -:FSharpToggleHelptext - toggles g:fsharp_completion_helptext. (See below for details) - -FSharp interaction commands:~ - - `:FsiEval` -:FsiEval - Evaluates an fsharp expression in the fsi - - `:FsiEvalBuffer` -:FsiEvalBuffer - Evaluates the entire buffer in the fsi - - `:FsiReset` -:FsiReset - Resets the current fsharp interactive - - `:FsiRead` -:FsiRead - Outputs any lines written by the fsi but not yet output as vim messages - - `:FsiClear` -:FsiClear - Deletes all text from the fsi output buffer but doesn't reset the fsi - session. - - `:FsiShow` -:FsiShow - Opens the _fsi-out_ buffer in a split window - -=============================================================================== -MAPPINGS *fsharp-mappings* - -General:~ - - t - Echoes the type of the expression currently pointed to by the cursor - d - Go to declaration in current window - s - Takes you back from where go to declaration was triggered. Experimental - -FSharp Interactive:~ - OR - i - Send either the current selection or the current line to the fsharp - interactive and echoes the output the first line of the output. All - output will be written to the fsi-out buffer. - -=============================================================================== -CREDITS *fsharp-credits* - -Syntax and indent files by kongo2002 : - http://github.com/kongo2002/fsharp-vim - -Adapted from Tim Robinson : - http://github.com/timrobinson/fsharp-vim -> -=============================================================================== - -endif diff --git a/doc/vim-go.txt b/doc/vim-go.txt deleted file mode 100644 index e00dec9b1..000000000 --- a/doc/vim-go.txt +++ /dev/null @@ -1,2734 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 - -*vim-go.txt* Go development plugin -*vim-go* - -============================================================================== -# # -# ## ## #### ## ## ###### ####### # -# ## ## ## ### ### ## ## ## ## # -# ## ## ## #### #### ## ## ## # -# ## ## ## ## ### ## ####### ## #### ## ## # -# ## ## ## ## ## ## ## ## ## # -# ## ## ## ## ## ## ## ## ## # -# ### #### ## ## ###### ####### # -# # -============================================================================== -CONTENTS *go-contents* - - 1. Intro........................................|go-intro| - 2. Install......................................|go-install| - 3. Commands.....................................|go-commands| - 4. Mappings.....................................|go-mappings| - 5. Text Objects.................................|go-text-objects| - 6. Functions....................................|go-functions| - 7. Settings.....................................|go-settings| - 8. Syntax highlighting..........................|go-syntax| - 9. Debugger.....................................|go-debug| - 10. FAQ/Troubleshooting..........................|go-troubleshooting| - 11. Development..................................|go-development| - 12. Donation.....................................|go-donation| - 13. Credits......................................|go-credits| - -============================================================================== -INTRO *go-intro* - -Go (golang) support for Vim. vim-go comes with sensible predefined settings -(e.g. automatic `gofmt` on save), has code completion, snippet support, -improved syntax highlighting, go toolchain commands, etc. It is highly -customizable, and individual features can be toggled easily. vim-go leverages -a number of tools developed by the Go community to provide a seamless Vim -experience. - - * Compile your package with |:GoBuild|, install it with |:GoInstall| or - test it with |:GoTest|. Run a single test with |:GoTestFunc|). - * Quickly execute your current file(s) with |:GoRun|. - * Improved syntax highlighting and folding. - * Debug programs with integrated `delve` support with |:GoDebugStart|. - * Code completion support via `gocode` and `gopls`. - * `gofmt` or `goimports` on save keeps the cursor position and undo history. - * Go to symbol/declaration with |:GoDef|. - * Look up documentation with |:GoDoc| or |:GoDocBrowser|. - * Easily import packages via |:GoImport|, remove them via |:GoDrop|. - * Precise type-safe renaming of identifiers with |:GoRename|. - * See which code is covered by tests with |:GoCoverage|. - * Add or remove tags on struct fields with |:GoAddTags| and |:GoRemoveTags|. - * Call `golangci-lint` with |:GoMetaLinter| to invoke all possible linters - (`golint`, `vet`, `errcheck`, `deadcode`, etc.) and put the result in the - quickfix or location list. - * Lint your code with |:GoLint|, run your code through |:GoVet| to catch - static errors, or make sure errors are checked with |:GoErrCheck|. - * Advanced source analysis tools utilizing `guru`, such as |:GoImplements|, - |:GoCallees|, and |:GoReferrers|. - * Automatic `GOPATH` detection which works with `gb` and `godep`. Change or - display `GOPATH` with |:GoPath|. - * Integrated and improved snippets, supporting `ultisnips`, `neosnippet`, - and `vim-minisnip`. - * Share your current code to play.golang.org with |:GoPlay|. - * On-the-fly information about the word under the cursor. Plug it into your - custom Vim function. - * Text objects such as "a function" (|go-af|) or "inner function" (|go-if|). - * Most commands are run asynchronous in Neovim and Vim 8. Fully async - building and testing. - * Integrated with the Neovim terminal, launch |:GoRun| and other Go commands - in a terminal buffer. - * Switch between `file.go` and `file_test.go` code with |:GoAlternate|. - * Supports integration with the Tagbar and ctrlp.vim plugins. - * ...and more... - -============================================================================== -INSTALL *go-install* - -vim-go requires at least Vim 8.0.1453 or Neovim 0.4.0. On macOS, if you are -still using your system version of vim, you can use homebrew to keep your -version of Vim up-to-date with the following terminal command: -> - brew install vim - -The latest stable release, https://github.com/fatih/vim-go/releases/latest, is -the recommended version to use. If you choose to use the master branch -instead, please do so with caution; it is a _development_ branch. - -vim-go follows the standard runtime path structure and should work with any of -the major plugin managers. - -For Pathogen or Vim |packages|, just clone the repo. For other plugin managers -you may also need to add the lines to your vimrc to execute the plugin -manager's install command. - -* Vim 8 |packages| > - - git clone https://github.com/fatih/vim-go.git \ - ~/.vim/pack/plugins/start/vim-go -< -* https://github.com/tpope/vim-pathogen > - - git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go -< -* https://github.com/junegunn/vim-plug > - - Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' } -< -* https://github.com/Shougo/neobundle.vim > - - NeoBundle 'fatih/vim-go' -< -* https://github.com/gmarik/vundle > - - Plugin 'fatih/vim-go' -< -* Manual (not recommended) > - - Copy all of the files into your `~/.vim` directory -< - -You will also need to install all the necessary binaries. vim-go makes it easy -to install all of them by providing a command, |:GoInstallBinaries|, to -`go get` all the required binaries. The binaries will be installed to $GOBIN -or $GOPATH/bin (default: $HOME/go/bin). It requires `git`. - -Depending on your installation method, you may have to generate the plugin's -|:helptags| manually (e.g. `:helptags ALL`). - -Code completion is enabled by default via 'omnifunc', which you can trigger -with |i_CTRL-X_CTRL-O| (``). - -Supported Go plugins~ *vim-go-plugins* - -The following plugins are supported for use with vim-go: - -* Real-time completion (Vim): - https://github.com/Shougo/neocomplete.vim - -* Real-time completion (Neovim and Vim 8): - https://github.com/Shougo/deoplete.nvim - - Add the following line to your vimrc. This instructs deoplete to use omni - completion for Go files. - - call deoplete#custom#option('omni_patterns', { 'go': '[^. *\t]\.\w*' }) - -* Display source code navigation in a sidebar: - https://github.com/majutsushi/tagbar - -* Snippets: - https://github.com/Shougo/neosnippet.vim or - https://github.com/SirVer/ultisnips or - https://github.com/joereynolds/vim-minisnip - -* Interactive |:GoDecls| and |:GoDeclsDir|: - https://github.com/ctrlpvim/ctrlp.vim or - https://github.com/junegunn/fzf.vim or - https://github.com/Shougo/unite.vim or - https://github.com/Shougo/denite.nvim - -============================================================================== -COMMANDS *go-commands* - - *:GoReportGitHubIssue* -:GoReportGitHubIssue - GoReportGitHubIssue opens the default browser and starts a new bug report - with useful system information. - - *:GoPath* -:GoPath [path] - - GoPath sets and overrides GOPATH with the given {path}. If no {path} is - given it shows the current GOPATH. If `""` is given as path, it clears - current `GOPATH` which was set with |:GoPath| and restores `GOPATH` back - to the initial value which was sourced when Vim was started. - - *:GoImport* -:GoImport[!] [path] - - Import ensures that the provided package {path} is imported in the current - Go buffer, using proper style and ordering. If {path} is already being - imported, an error will be displayed and the buffer will be untouched. - - If [!] is given it will download the package with `go get` - - *:GoImportAs* -:GoImportAs [localname] [path] - - Same as Import, but uses a custom local name for the package. - - *:GoDrop* -:GoDrop [path] - - Remove the import line for the provided package {path}, if present in the - current Go buffer. If {path} is not being imported, an error will be - displayed and the buffer will be untouched. - - *:GoLint* -:GoLint! [packages] - - Run golint for the directory under your current file, or for the given - packages. - - If [!] is not given the first error is jumped to. - - *:GoDoc* -:GoDoc [word] - - Open the relevant GoDoc in split window for either the word[s] passed to - the command or by default, the word under the cursor. - - *:GoDocBrowser* -:GoDocBrowser [word] - - Open the relevant GoDoc in browser for either the word[s] passed to the - command or by default, the word under the cursor. By default it opens the - documentation in 'https://pkg.go.dev'. To change it see |'g:go_doc_url'|. - - *:GoFmt* -:GoFmt - - Filter the current Go buffer through gofmt. It tries to preserve cursor - position and avoids replacing the buffer with stderr output. - - *:GoImports* -:GoImports - - Filter the current Go buffer through goimports (needs to be installed). - `goimports` automatically discards/add import path based on the code. Like - |:GoFmt|, It tries to preserve cursor position and avoids replacing the - buffer with stderr output. - - *:GoPlay* -:[range]GoPlay - - Share snippet to play.golang.org. If no [range] is given it shares - the whole file, otherwise the selected lines are shared. Snippet URL - is copied to system clipboard if Vim is compiled with 'clipboard' or - 'xterm-clipboard' otherwise it's get yanked into the `""` register. - - *:GoVet* -:GoVet[!] [options] - - Run `go vet` for the directory under your current file. Vet examines Go - source code and reports suspicious constructs, such as Printf calls whose - arguments do not align with the format string. Vet uses heuristics that do - not guarantee all reports are genuine problems, but it can find errors not - caught by the compilers. - - You may optionally pass any valid go vet flags/options. - - If [!] is not given the first error is jumped to. - - *:GoDef* -:GoDef -gd -CTRL-] -g - - - Go to declaration/definition for the identifier under the cursor. By - default the CTRL-] shortcut, the mapping `gd` and , - g are enabled to invoke :GoDef for the identifier under the - cursor. See |'g:go_def_mapping_enabled'| to disable them. No explicit - arguments are supported. - - vim-go also keeps a per-window location stack, roughly analogous to how - Vim's internal |tags| functionality works. This is pushed to every time a - jump is made using the GoDef functionality. In essence, this is a LIFO - list of file locations you have visited with :GoDef that is retained to - help you navigate software. - - The per-window location stack is shared with |:GoDefType|. - - *:GoDefType* -:GoDefType - - Go to type definition for the identifier under the cursor. - - The per-window location stack is shared with |:GoDef|. - *:GoDefStack* -:GoDefStack [number] - - This command Jumps to a given location in the jumpstack, retaining all - other entries. Jumps to non-existent entries will print an informative - message, but are otherwise a noop. - - If no argument is given, it will print out an interactive list of all - items in the stack. Its output looks like this: - - 1 /path/first/file.go|1187 col 16|AddThing func(t *Thing) - > 2 /path/thing/thing.go|624 col 19|String() string - 3 /path/thing/thing.go|744 col 6|func Sprintln(a ...interface{}) string - - This list shows the identifiers that you jumped to and the file and cursor - position before that jump. The older jumps are at the top, the newer at - the bottom. - - The '>' points to the active entry. This entry and any newer entries - below it will be replaced if |:GoDef| is done from this location. The - CTRL-t and |:GoDefPop| command will jump to the position above the active - entry. - - Jumps to non-existent entries will print an informative message, but are - otherwise a noop. - - *:GoDefStackClear* -:GoDefStackClear - - Clears the current stack list and resets it. - - *:GoDefPop* -:GoDefPop [count] -CTRL-t - - Navigate to the [count] earlier entry in the jump stack, retaining the - newer entries. If no argument is given, it will jump to the next most - recent entry (`:GoDefPop 1`). If [count] is greater than the number of - prior entries, an error will be printed and no jump will be performed. - - If you have used :GoDefPop to jump to an earlier location, and you issue - another :GoDef command, the current entry will be replaced, and all newer - entries will be removed, effectively resuming the stack at that location. - - By default [count]CTRL-t is enabled to invoke :GoDefPop. Similarly, - hitting CTRL-t without a prior count is equivalent to `:GoDefPop 1`. See - |'g:go_def_mapping_enabled'| to disable this. - - *:GoRun* -:GoRun[!] [expand] - - Build and run your current main package. By default all main files for the - current file is used. If an argument is passed, [expand] is used as file - selector. For example use `:GoRun %` to select the current file only. - - You may optionally pass any valid go run flags/options. For a full list - please see `go help run`. - - If [!] is not given the first error is jumped to. - - If using neovim then `:GoRun` will run in a new terminal according to - |'g:go_term_mode'|. - - The working directory will be the directory containing the current buffer. - - - *:GoBuild* -:GoBuild[!] [expand] - - Build your package with `go build`. Errors are populated in the quickfix - window. It automatically builds only the files that depends on the current - file. `:GoBuild` doesn't produce a result file. - Use |:make| to create a result file. - - You may optionally pass any valid go build flags/options. For a full list - please see `go help build`. Options are expanded with [expand]. - - If [!] is not given the first error is jumped to. - - If using neovim then this command is fully async, it does not block the - UI. - - *:GoGenerate* -:GoGenerate[!] [expand] - - Creates or updates your auto-generated source files by running `go - generate`. - - You may optionally pass any valid go generate flags/options. For a full - list please see `go help generate`. Options are expanded with [expand]. - - If [!] is not given the first error is jumped to. - - *:GoInfo* -:GoInfo - Show type information about the identifier under the cursor. For example - putting it above a function call is going to show the full function - signature. By default it uses `gopls` to get the type informations. To - change the underlying tool from `gopls` to another tool, see - |'g:go_info_mode'|. - - - *:GoInstall* -:GoInstall[!] [options] - - Install your package with `go install`. - - You may optionally pass any valid go install flags/options. For a full - list please see `go help install`. - - If [!] is not given the first error is jumped to. - - *:GoTest* -:GoTest[!] [expand] - - Run the tests on your _test.go files via in your current directory. Errors - are populated in the quickfix window. If an argument is passed, [expand] - is used as file selector (useful for cases like `:GoTest ./...`). - - You may optionally pass any valid go test flags/options. For a full list - please see `go help test`. - - GoTest times out automatically after 10 seconds. To customize the timeout - use |'g:go_test_timeout'|. This feature is disabled if any arguments are - passed to the `:GoTest` command. - - If [!] is not given the first error is jumped to. - - If using neovim `:GoTest` will run in a new terminal or run asynchronously - in the background according to |'g:go_term_enabled'|. You can set the mode - of the new terminal with |'g:go_term_mode'|. - - *:GoTestFunc* -:GoTestFunc[!] [expand] - - Runs :GoTest, but only on the single test function immediate to your - cursor using 'go test's '-run' flag. - - Lookup is done starting at the cursor (including that line) moving up till - a matching `func Test` pattern is found or top of file is reached. Search - will not wrap around when at the top of the file. - - If [!] is not given the first error is jumped to. - - If using neovim `:GoTestFunc` will run in a new terminal or run - asynchronously in the background according to |'g:go_term_enabled'|. You - can set the mode of the new terminal with |'g:go_term_mode'|. - - *:GoTestCompile* -:GoTestCompile[!] [expand] - - Compile your _test.go files via in your current directory. Errors are - populated in the quickfix window. If an argument is passed, [expand] is - used as file selector (useful for cases like `:GoTest ./...`). Useful to - not run the tests and capture/fix errors before running the tests or to - create test binary. - - If [!] is not given the first error is jumped to. - - If using neovim `:GoTestCompile` will run in a new terminal or run - asynchronously in the background according to |'g:go_term_enabled'|. You - can set the mode of the new terminal with |'g:go_term_mode'|. - - *:GoCoverage* -:GoCoverage[!] [options] - - Create a coverage profile and annotates the current file's source code. If - called again it rerurns the tests. - - If [!] is not given the first error is jumped to. - - *:GoCoverageToggle* -:GoCoverageToggle[!] [options] - - Create a coverage profile and annotates the current file's source code. If - called again clears the annotation (works as a toggle). - - If [!] is not given the first error is jumped to. - - *:GoCoverageClear* -:GoCoverageClear [options] - - Clears the coverage annotation. - - - *:GoCoverageBrowser* -:GoCoverageBrowser[!] [options] - - Create a coverage profile and open a browser to display the annotated - source code of the current package. - - You may optionally pass any valid go test flags/options, such as - `-covermode set,count,atomic`. For a full list please see `go help test`. - - If [!] is not given the first error is jumped to. - - *:GoErrCheck* -:GoErrCheck! [options] - - Check for unchecked errors in you current package. Errors are populated in - the quickfix window. - - You may optionally pass any valid errcheck flags/options. See - `errcheck -h` for a full list. - - If [!] is not given the first error is jumped to. - - *:GoFiles* -:GoFiles [source_files] - - Show source files for the current package. The [source_files] specifies - which file types to list. See the "// Source files" section of - `go list -h` for possible values; multiple values are accepted. - Command-line completion also works for this command. - The default is to use `GoFiles` if no arguments are given. - - *:GoDeps* -:GoDeps - - Show dependencies for the current package. - - *:GoInstallBinaries* -:GoInstallBinaries [binaries] - - Download and install all necessary Go tool binaries such as `godef`, - `goimports`, `gopls`, etc. under |'g:go_bin_path'|. If [binaries] is - supplied, then only the specified binaries will be installed. The default - is to install everything. - - Set |'g:go_get_update'| to disable updating dependencies. - - *:GoUpdateBinaries* -:GoUpdateBinaries [binaries] - - Download and update previously installed Go tool binaries such as `godef`, - `goimports`, `gopls`, etc. under |'g:go_bin_path'|. If [binaries] is - supplied, then only the specified binaries will be updated. The default is - to update everything. - - Set |'g:go_get_update'| to disable updating dependencies. - - *:GoImplements* -:GoImplements - - Show "implements" relation for a selected package. A list of interfaces - for the type that implements an interface under the cursor (or selected - package) is shown in a location list. - *:GoRename* -:GoRename[!] [to] - - Rename the identifier under the cursor to the desired new name. If no - argument is given a prompt will ask for the desired identifier. - - If [!] is not given the first error is jumped to. - - - *:GoGuruScope* -:GoGuruScope [pattern] ... - - Changes the custom |'g:go_guru_scope'| setting and overrides it with the - given package patterns. The custom scope is cleared (unset) if `""` is - given as the only path. If no arguments is given it prints the current - custom scope. Example patterns are: -> - golang.org/x/tools/cmd/guru # a single package - golang.org/x/tools/... # all packages beneath dir - ... # the entire workspace. -< - Example usage, the following sets the scope to a `github.com/fatih/color` - and to all packages under `golang.org/x/tools/`: -> - :GoGuruScope github.com/fatih/color golang.org/x/tools/... -< - The following sets it to the entire workspace: -> - :GoGuruScope ... -< - Under the hood, the patterns are all joined to a comma-separated list and - passed to `guru`'s `-scope` flag. - - Also see |go-guru-scope|. - - *:GoCallees* -:GoCallees - - Show "callees" relation for a selected package. A list of possible call - targets for the type under the cursor (or selected package) is shown in a - location list. - - *:GoCallers* -:GoCallers - - Show "callers" relation for a selected function. A list of possible - callers for the selected function under the cursor is shown in a location - list. - - *:GoDescribe* -:GoDescribe - - Shows various properties of the selected syntax: its syntactic kind, its - type (for an expression), its value (for a constant expression), its size, - alignment, method set and interfaces (for a type), its declaration (for an - identifier), etc. Almost any piece of syntax may be described, and the - guru will try to print all the useful information it can. - - *:GoCallstack* -:GoCallstack - - Shows "callstack" relation for the selected function. An arbitrary path - from the root of the callgraph to the selected function is shown in a - location list. This may be useful to understand how the function is - reached in a given program. - - *:GoFreevars* -:GoFreevars - - Enumerates the free variables of the selection. "Free variables" is a - technical term meaning the set of variables that are referenced but not - defined within the selection, or loosely speaking, its inputs. - - This information is useful when considering whether to refactor the - selection into a function of its own, as the free variables would be the - necessary parameters of that function. It's also useful when you want to - understand what the inputs are to a complex block of code even if you - don’t plan to change it. - - *:GoChannelPeers* -:GoChannelPeers - - Shows the set of possible sends/receives on the channel operand of the - selected send or receive operation; the selection must be a `<-` token. - - For example, visually select a channel operand in the form of: -> - done <- true -< - And call |:GoChannelPeers| on it. It will show where it was allocated, and - the sending and receiving endings. - - *:GoReferrers* -:GoReferrers - - The referrers query shows the set of identifiers that refer to the same - object as does the selected identifier. - - *:GoSameIds* -:GoSameIds - - Highlights all identifiers that are equivalent to the identifier under the - cursor. - - *:GoSameIdsClear* -:GoSameIdsClear - - Clears all SameIds highlights from a |:GoSameIds| call. - - *:GoSameIdsToggle* -:GoSameIdsToggle - - Toggle between |:GoSameIds| and |:GoSameIdsClear|. - - *:GoSameIdsAutoToggle* -:GoSameIdsAutoToggle - - Enables or disables automatic highlighting of |:GoSameIds| while moving - the cursor. This basically toggles the option |'g:go_auto_sameids'| - on/off. - If enabled it starts highlighting whenever your cursor is staying at the - same position for a configurable period of time (see |'g:go_updatetime'|). - If disabled it clears and stops automatic highlighting. - - *:GoMetaLinter* -:GoMetaLinter! [path] - - Calls the underlying `golangci-lint` tool and displays all warnings and - errors in the |quickfix| window. By default the following linters are - enabled: `vet`, `golint`, and `errcheck`. This can be changed with the - |'g:go_metalinter_enabled'| variable. To override the command completely - use the variable |'g:go_metalinter_command'|. To override the maximum - linters execution time use |'g:go_metalinter_deadline'| variable. - - If [!] is not given the first error is jumped to. - - *:GoDiagnostics* -:GoDiagnostics! [packages] - - Displays the diagnostics from `gopls` for the given packages in a - |quickfix| window. The diagnostics for the current package are displayed - when no package is given. The diagnostics for all packages will be - displayed when `all` is as an argument. - - Disabled when |'g:go_diagnostics_enabled'| is not set. - - If [!] is not given the first error is jumped to. - - *:GoBuildTags* -:GoBuildTags [tags] - - Changes the build tags for various commands. If you have any file that - uses a custom build tag, such as `// +build integration` , this command - can be used to pass it to all tools that accepts tags, such as gopls, - guru, gorename, etc. - - The build tags is cleared (unset) if `""` is given. If no arguments are - given it prints the current build tags. - - *:AsmFmt* -:AsmFmt - - Filter the current Go asm buffer through asmfmt. It tries to preserve - cursor position and avoids replacing the buffer with stderr output. - - *:GoAlternate* -:GoAlternate[!] - - Alternates between the implementation and test code. For example if in - main.go, switch to main_test.go. Uses the |'g:go_alternate_mode'| setting - as the command to open the file. - - If [!] is given then it switches to the new file even if it does not - exist. - - If you would like to override the traditional commands for alternating, - add the following to your .vimrc: -> - augroup go - autocmd! - autocmd Filetype go - \ command! -bang A call go#alternate#Switch(0, 'edit') - \| command! -bang AV call go#alternate#Switch(0, 'vsplit') - \| command! -bang AS call go#alternate#Switch(0, 'split') - augroup END -< - - *:GoPointsTo* -:GoPointsTo - - Show all variables to which the pointer under the cursor may point to. - - *:GoWhicherrs* -:GoWhicherrs - - Show the list of possible constants, global variables, and concrete types - for the error type under the cursor in a location list. - - *:GoDecls* -:GoDecls [file] - - Show all function and type declarations for the current file. If - [file] is non empty it parses the given file. - Requires `ctrlp.vim` or `fzf`; it will autodetect the plugin if installed, - but you can use |'g:go_decls_mode'| to force using one or the other. - By default `type` and `func` declarations are shown. This can be changed - via |'g:go_decls_includes'|. Also see |unite-decls|, |denite-decls|. - - *:GoDeclsDir* -:GoDeclsDir [dir] - - Show all function and type declarations for the current directory. If - [dir] is given it parses the given directory. - - *unite-decls* - *denite-decls* -:Unite decls[:path] -:Denite decls[:path] - - Only enabled if `unite.vim` or `denite.nvim` is installed. Show - declarations for all functions and types on the current file or directory - or for [path] if given. - - Note: `denite.nvim` requires NeoVim or Vim 8 with |:python3| enabled. -> - " show declarations on the parent directory of the current file - :Unite decls - :Denite decls - - " show declarations in the file. - :Unite decls:foo/bar.go - :Denite decls:foo/bar.go - - " show declarations in the directory "foo". - :Unite decls:foo - :Denite decls:foo -< - *:GoImpl* -:GoImpl [receiver] [interface] - - Generates method stubs for implementing an interface. If no arguments is - passed it takes the identifier under the cursor to be the receiver and - asks for the interface type to be generated. If used with arguments, the - receiver and the interface needs to be specified. Example usages: -> - :GoImpl f *Foo io.Writer - :GoImpl t Type io.ReadWriteCloser -< - *:GoAddTags* -:[range]GoAddTags [key],[option] [key1],[option] ... - - Adds field tags for the fields of a struct. If called inside a struct it - automatically add field tags with the `json` key and the value - automatically generated based on the field name. An error message is given - if it's called outside a struct definition or if the file is not correctly - formatted. - - If [range] is given, only the selected fields will be changed. - - The default `json` can be changed by providing one or more [key] - arguments. An example of adding `xml` and `db` would be: -> - :GoAddTags xml db -< - If [option] is passed it'll either add a new tag with an option or will - modify existing tags. An example of adding `omitempty` to all `json` - fields would be: -> - :GoAddTags json,omitempty -< - You can define a constant value instead of the default field based value. - For example the following command will add ``valid:"1"`` to all fields. -> - :GoAddTags valid=1 -< - *:GoRemoveTags* -:[range]GoRemoveTags [key],[option] [key1],[option1] ... - - Remove field tags for the fields of a struct. If called inside a struct it - automatically remove all field tags. An error message is given if it's - called outside a struct definition or if the file is not correctly - formatted - - If [range] is given, only the selected fields will be changed. - - If [key] is given, it will only remove those keys. Example: -> - :GoRemoveTags json -< - If [option] is passed with a [key], it will only remove the options. - Example, this will only remove `omitempty` options from fields containing - `json`: -> - :GoRemoveTags json,omitempty -< - *:GoAutoTypeInfoToggle* -:GoAutoTypeInfoToggle - - Toggles |'g:go_auto_type_info'|. - - *:GoFmtAutoSaveToggle* -:GoFmtAutoSaveToggle - - Toggles |'g:go_fmt_autosave'|. - - *:GoModFmtAutoSaveToggle* -:GoModFmtAutoSaveToggle - - Toggles |'g:go_mod_fmt_autosave'|. - - *:GoAsmFmtAutoSaveToggle* -:GoAsmFmtAutoSaveToggle - - Toggles |'g:go_asmfmt_autosave'|. - - *:GoMetaLinterAutoSaveToggle* -:GoMetaLinterAutoSaveToggle - - Toggles |'g:go_metalinter_autosave'|. - - By default, `golangci-lint` messages will be shown in the |location-list| - window. The list to use can be set using |'g:go_list_type_commands'|. - - *:GoTemplateAutoCreateToggle* -:GoTemplateAutoCreateToggle - - Toggles |'g:go_template_autocreate'|. - - *:GoKeyify* -:GoKeyify - - Uses `keyify` to turn unkeyed struct literals into keyed ones. - - For example: -> - Person{"John", "Smith"} -< - Becomes: -> - Person{ - Name: "John", - Surname: "Smith", - } -< - *:GoFillStruct* -:GoFillStruct - - Use `fillstruct` to fill a struct literal with default values. Existing - values (if any) are preserved. The cursor must be on the struct you wish - to fill. - - For example: -> - addr := net.Address{Name: "Ford Prefect"} -< - Becomes: -> - addr := net.Address{ - Name: "Ford Prefect", - Email: "", - } -< - - *:GoIfErr* -:GoIfErr - - Generate if err != nil { return ... } automatically which infer the type - of return values and the numbers. - - For example: -> - func doSomething() (string, error) { - f, err := os.Open("file") - } -< - Becomes: -> - func doSomething() (string, error) { - f, err := os.Open("file") - if err != nil { - return "", err - } - } -< - *:GoModFmt* -:GoModFmt - - Filter the current go.mod buffer through "go mod edit -fmt" command. It - tries to preserve cursor position and avoids replacing the buffer with - stderr output. - - *:GoAddWorkspace* -:GoAddWorkspace [dir] ... - - Add directories to the `gopls` workspace. - - *:GoLSPDebugBrowser* -:GoLSPDebugBrowser - - Open a browser to see gopls debugging information. - -============================================================================== -MAPPINGS *go-mappings* - -vim-go has several keys which can be used to create custom mappings -For example, to create a mapping that calls `go run` for the current package, -create a mapping for the `(go-run)`: > - - au FileType go nmap r (go-run) - -As always one is free to create more advanced mappings or functions based with -|go-commands|. For more information please check out the mappings command -documentation in the |go-commands| section. Available keys are: - - *(go-run)* - -Calls `go run` for the current main package - - *(go-run-tab)* - -Calls `go run` for the current file in a new terminal tab -This option is neovim only. - - *(go-run-split)* - -Calls `go run` for the current file in a new terminal horizontal split -This option is neovim only. - - *(go-run-vertical)* - -Calls `go run` for the current file in a new terminal vertical split -This option is neovim only. - - *(go-build)* - -Calls `go build` for the current package - - *(go-generate)* - -Calls `go generate` for the current package - - *(go-info)* - -Shows type information for the word under the cursor - - *(go-install)* - -Calls `go install` for the current package - - *(go-test)* - -Calls `go test` for the current package - - *(go-test-func)* - -Calls `go test -run '...'` for the test function immediate to cursor - - *(go-test-compile)* - -Calls `go test -c` for the current package - - *(go-coverage)* - -Calls `go test -coverprofile-temp.out` for the current package and shows the -coverage annotation. - - *(go-coverage-clear)* - -Clears the coverage annotation - - *(go-coverage-toggle)* - -Calls `go test -coverprofile-temp.out` for the current package and shows the -coverage annotation. If run again it acts as a toggle and clears the -annotation. - - *(go-imports)* - -Calls `goimports` for the current package - - *(go-lint)* - -Calls `golint` for the current package - - *(go-vet)* - -Calls `go vet` for the current package - - - *(go-files)* - -Show source files that depends for the current package - - - *(go-deps)* - -Show dependencies for the current package - - *(go-doc)* - -Show the relevant GoDoc for the word under the cursor in a split window -leftabove (default mode). - - *(go-doc-split)* - -Show the relevant GoDoc for the word under the cursor in a split window. - - - *(go-doc-vertical)* - -Show the relevant GoDoc for the word under the cursor in a vertical split -window. - - *(go-doc-tab)* - -Show the relevant GoDoc for the word under the cursor in a tab window. - - - *(go-doc-browser)* - -Show the relevant GoDoc for the word under in browser - - *(go-def)* - -Goto declaration/definition. Results are shown in the current window. - - *(go-def-split)* - -Goto declaration/definition. Results are shown in a split window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-vertical)* - -Goto declaration/definition. Results are shown in a vertical split window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-tab)* - -Goto declaration/definition. Results are shown in a tab window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-type)* - -Goto type declaration/definition. Results are shown in the current window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-type-vertical)* -Goto type declaration/definition. Results are shown in a vertical split -window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-type-split)* -Goto type declaration/definition. Results are shown in a split window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-type-tab)* -Goto type declaration/definition. Results are shown in a tab window. -Jumps to an existing buffer if |'g:go_def_reuse_buffer'| is enabled. - - *(go-def-stack)* - -Shows the godef tag stack - - *(go-def-stack-clear)* - -Resets and clears the tag stack - - *(go-def-pop)* - -Jump to previous entry in the tag stack - - *(go-implements)* - -Show the interfaces that the type under the cursor implements. - - *(go-rename)* - -Rename the identifier under the cursor to the desired new name - - *(go-callees)* - -Show the call targets for the type under the cursor - - *(go-callers)* - -Show possible callers of selected function - - *(go-describe)* - -Describe selected syntax: definition, methods, etc - - *(go-callstack)* - -Show path from callgraph root to selected function - - *(go-freevars)* - -Show free variables of selection - - *(go-channelpeers)* - -Show send/receive corresponding to selected channel op - - *(go-referrers)* - -Show all refs to entity denoted by selected identifier - - *(go-pointsto)* - -Show all variables to which the pointer under the cursor may point to. - - *(go-metalinter)* - -Calls `go-metalinter` for the current directory - - *(go-alternate-edit)* - -Alternates between the implementation and test code in the current window - - *(go-alternate-split)* - -Alternates between the implementation and test code in a new horizontal split - - *(go-alternate-vertical)* - -Alternates between the implementation and test code in a new vertical split - - *(go-import)* - -Calls `:GoImport` for the current package - - *(go-iferr)* - -Generate if err != nil { return ... } automatically which infer the type of -return values and the numbers. - - *(go-mod-fmt)* - -Calls |:GoModFmt| for the current buffer - - *(go-diagnostics)* -Calls `:GoDiagnostics` - -============================================================================== -TEXT OBJECTS *go-text-objects* - -vim-go comes with several custom |text-objects| that can be used to operate -upon regions of text. vim-go currently defines the following text objects: - - *go-v_af* *go-af* -af "a function", select contents from a function definition to the - closing bracket. If |'g:go_textobj_include_function_doc'| is - enabled it also includes the comment doc for a function - declaration. This text-object also supports literal functions. - If |'g:go_textobj_include_variable'| is enabled it also - includes the variable of an function assignment - - *go-v_if* *go-if* -if "inside a function", select contents of a function, - excluding the function definition and the closing bracket. This - text-object also supports literal functions - - *go-v_ac* *go-ac* -ac "a comment", select contents of the current comment block. - - *go-v_ic* *go-ic* -ic "inner comment", select contents of the current comment block, - excluding the start and end comment markers. - -vim-go also defines the following text motion objects: - - *go-v_]]* *go-]]* -]] [count] forward to next function declaration. If - |'g:go_textobj_include_function_doc'| is enabled and if your - on a comment, it skips the function which the comment - belongs and forwards to the next function declaration. - - *go-v_[[* *go-[[* -[[ [count] backward to previous function declaration. - - - -============================================================================== -FUNCTIONS *go-functions* - - *go#statusline#Show()* - -Shows the status of a job running asynchronously. Can be used to plug into the -statusline. It works to show the status per package instead of per file. -Assume you have three files open, all belonging to the same package, if the -package build (`:GoBuild`) is successful, all statuslines will show `success`, -if it fails all windows' statuslines will show `failed`. - -To avoid always showing old status information, the status information is -cleaned for each package after `60` seconds. This can be changed with the -|'g:go_statusline_duration'| setting. - - *go#complete#GetInfo()* - -Returns the description of the identifer under the cursor. Can be used to plug -into the statusline. - - *go#complete#Complete()* - -Uses `gopls` for autocompletion. By default, it is hooked up to 'omnifunc'. - - *go#tool#DescribeBalloon()* - -Suitable to be used as an expression to show the evaluation balloon. See `help -balloonexpr`. - -============================================================================== -SETTINGS *go-settings* - - *'g:go_version_warning'* - -Enable warning when using an unsupported version of Vim. By default it is -enabled. -> - let g:go_version_warning = 1 -< - - *'g:go_code_completion_enabled'* - -Enable code completion with 'omnifunc'. By default it is enabled. -> - let g:go_code_completion_enabled = 1 -< - - *'g:go_code_completion_icase'* - -Override the icase field in 'omnifunc' results. By default it is set to 0. -See 'complete-items' for details. -> - let g:go_code_completion_icase = 0 -< - - *'g:go_test_show_name'* - -Show the name of each failed test before the errors and logs output by the -test. By default it is disabled. -> - let g:go_test_show_name = 0 -< - - *'g:go_test_timeout'* - -Use this option to change the test timeout of |:GoTest|. By default it is -set to 10 seconds . > - - let g:go_test_timeout= '10s' -< - *'g:go_play_browser_command'* - -Browser to use for |:GoPlay|, |:GoDocBrowser|, and |:GoLSPDebugBrowser|. The -url must be added with `%URL%`, and it's advisable to include `&` to make sure -the shell returns. For example: -> - let g:go_play_browser_command = 'firefox-developer %URL% &' -< - -By default it tries to find it automatically for the current OS. > - - let g:go_play_browser_command = '' -< - *'g:go_play_open_browser'* - -Use this option to open browser after posting the snippet to play.golang.org -with |:GoPlay|. By default it's enabled. > - - let g:go_play_open_browser = 1 -< - *'g:go_auto_type_info'* - -Use this option to show the type info (|:GoInfo|) for the word under the -cursor automatically. Whenever the cursor changes the type info will be -updated. By default it's disabled. The delay can be configured with the -|'g:go_updatetime'| setting. -> - let g:go_auto_type_info = 0 -< - - *'g:go_info_mode'* - -Use this option to define the command to be used for |:GoInfo|. By default -`gopls` is used, because it is the fastest and is known to be highly accurate. -One might also use `guru` for its accuracy. -Valid options are `gopls` and `guru`. -> - let g:go_info_mode = 'gopls' -< - *'g:go_auto_sameids'* - -Use this option to highlight all uses of the identifier under the cursor -(|:GoSameIds|) automatically. By default it's disabled. The delay can be -configured with the |'g:go_updatetime'| setting. -> - let g:go_auto_sameids = 0 -< - *'g:go_updatetime'* - -Use this option to configure the delay until it starts some jobs (see -|'g:go_auto_type_info'|, |'g:go_auto_sameids'|). If set to 0, it uses the -value from 'updatetime'. By default it's set to 800ms. -> - let g:go_updatetime = 800 -< - *'g:go_jump_to_error'* - -Use this option to enable/disable passing the bang attribute to the mappings -(e.g. |(go-build)|, |(go-run)|, etc.) and the metalinter on save. When -enabled it will jump to the first error automatically (means it will NOT pass -the bang attribute to the appropriate command, i.e: (go-run) -> :GoRun ). -Note, that calling this doesn't have any affect on calling the commands -manually. This setting is only useful for changing the behaviour of our custom -static mappings. By default it's enabled. -> - let g:go_jump_to_error = 1 -< - *'g:go_fmt_autosave'* - -Use this option to auto |:GoFmt| on save. When both 'g:go_imports_autosave' -and 'g:go_fmt_autosave' are enabled and both 'g:go_fmt_command' and -'g:go_imports_mode' are set to `goimports`, `goimports` will be run only once. -By default it's enabled > - - let g:go_fmt_autosave = 1 -< - *'g:go_fmt_command'* - -Use this option to define which tool is used to format code. Valid options are -`gofmt`, `goimports`, and `gopls`. By default `gofmt` is used. -> - - let g:go_fmt_command = "gofmt" -< - *'g:go_fmt_options'* - -Use this option to add additional options to the |'g:go_fmt_command'|. It's -value type can be either a string or a dictionary. This is due backwards -compatibility. The string version will be removed in the future so please use -the dictionary version. Default is empty. -> - let g:go_fmt_options = '' - - or - - let g:go_fmt_options = {} -< -The dictionary version allows you to define options for multiple binaries: -> - let g:go_fmt_options = { - \ 'gofmt': '-s', - \ 'goimports': '-local mycompany.com', - \ } -< - *'b:go_fmt_options'* - -This option is identical to |'g:go_fmt_options'|, but a buffer-level setting. -If present, it's used instead of the global setting. By default it is not set. - -As an example, the following autocmd will configure goimports to put imports -of packages from the current module in their own group: -> - autocmd FileType go let b:go_fmt_options = { - \ 'goimports': '-local ' . - \ trim(system('{cd '. shellescape(expand('%:h')) .' && go list -m;}')), - \ } -< - *'g:go_fmt_fail_silently'* - -Use this option to disable showing a location list when |'g:go_fmt_command'| -fails. By default the location list is shown. > - - let g:go_fmt_fail_silently = 0 -< - *'g:go_fmt_experimental'* - -Use this option to enable fmt's experimental mode. This experimental mode is -superior to the current mode as it fully saves the undo history, so undo/redo -doesn't break. However, it's slow (creates/deletes a file for every save) and -it's causing problems on some Vim versions. This has no effect if -`g:go_fmt_command` is set to `gopls`. By default it's disabled. -> - - let g:go_fmt_experimental = 0 - -< - - *'g:go_imports_autosave'* - -Use this option to auto |:GoImports| on save. When both -'g:go_imports_autosave' and 'g:go_fmt_autosave' are enabled and both -'g:go_fmt_command' and 'g:go_imports_mode' are set to `goimports`, `goimports` -will be run only once. By default it's disabled. -> - let g:go_imports_autosave = 0 -< - *'g:go_imports_mode'* - -Use this option to define which tool is used to adjust imports. Valid options -are `goimports` and `gopls`. The buffer will not be formatted when this is set -to `gopls`. By default `goimports` is used. -> - - let g:go_imports_mode = "goimports" -< - *'g:go_mod_fmt_autosave'* - -Use this option to auto |:GoModFmt| on save. By default it's enabled > - - let g:go_mod_fmt_autosave = 1 -< - - *'g:go_doc_keywordprg_enabled'* - -Use this option to run `godoc` on words under the cursor with |K|; this will -normally run the `man` program, but for Go using `godoc` is more idiomatic. It -will not override the 'keywordprg' setting, but will run |:GoDoc|. Default -is enabled. > - - let g:go_doc_keywordprg_enabled = 1 -< - *'g:go_doc_height'* - -Maximum height for the GoDoc window created with |:GoDoc|. Default is 20. > - - let g:go_doc_max_height = 20 -< - - *'g:go_doc_url'* - -godoc server URL used when |:GoDocBrowser| is used. Change if you want to use -a private internal service. Default is 'https://pkg.go.dev'. -> - let g:go_doc_url = 'https://pkg.go.dev' -< - - *'g:go_doc_popup_window'* - -Use this option to use the popup-window for |K| and |:GoDoc|, rather than the -|preview-window|. Default is disabled. -> - let g:go_doc_popup_window = 0 -< - - *'g:go_def_mode'* - -Use this option to define the command to be used for |:GoDef|. By default -`gopls` is used, because it is the fastest. One might also use `guru` for its -accuracy or `godef` for its performance. Valid options are `godef`, `gopls`, -and `guru`. -> - let g:go_def_mode = 'gopls' -< - *'g:go_referrers_mode'* - -Use this option to define the command to be used for |:GoReferrers|. By -default `gopls` is used, because it is the fastest and works with Go modules. -One might also use `guru` for its ability to show references from other -packages. This option will be removed after `gopls` can show references from -other packages. Valid options are `gopls` and `guru`. By default it's `gopls`. -> - let g:go_referrers_mode = 'gopls' -< - *'g:go_implements_mode'* - -Use this option to define the command to be used for |:GoImplements|. -The Implements feature in gopls is still new and being worked upon. -Valid options are `gopls` and `guru`. By default it's `guru`. -> - let g:go_implements_mode = 'guru' -< - *'g:go_def_mapping_enabled'* - -Use this option to enable/disable the default mapping of CTRL-], -, g and (`gd`) for GoDef and CTRL-t for :GoDefPop. -Disabling it allows you to map something else to these keys or mappings. -Default is enabled. > - - let g:go_def_mapping_enabled = 1 -< - *'g:go_def_reuse_buffer'* - -Use this option to jump to an existing buffer for the split, vsplit and tab -mappings of |:GoDef|. By default it's disabled. > - - let g:go_def_reuse_buffer = 0 -< - *'g:go_bin_path'* - -Use this option to change default path for vim-go tools when using -|:GoInstallBinaries| and |:GoUpdateBinaries|. If not set `$GOBIN` or -`$GOPATH/bin` is used. > - - let g:go_bin_path = "" -< - *'g:go_search_bin_path_first'* - -This option lets |'g:go_bin_path'| (or its default value) take precedence over -$PATH when invoking a tool command such as |:GoFmt| or |:GoImports|. - -Enabling this option ensures that the binaries installed via -|:GoInstallBinaries| and |:GoUpdateBinaries| are the same ones that are -invoked via the tool commands. - -By default it is enabled. > - - let g:go_search_bin_path_first = 1 -< - *'g:go_snippet_engine'* - -Define the snippet engine to use. The default is to auto-detect one. Valid -values are: - - automatic Automatically detect a snippet engine. - ultisnips https://github.com/SirVer/ultisnips - neosnippet https://github.com/Shougo/neosnippet.vim - minisnip https://github.com/joereynolds/vim-minisnip - Note: the original at KeyboardFire/vim-minisnip won't work. -> - let g:go_snippet_engine = "automatic" -< - *'g:go_get_update'* - -Use this option to disable updating dependencies with |:GoInstallBinaries|. By -default this is enabled. -> - let g:go_get_update = 1 -< - *'g:go_guru_scope'* - -Use this option to define the scope of the analysis to be passed for guru -related commands, such as |:GoImplements|, |:GoCallers|, etc. You can change -it on-the-fly with |:GoGuruScope|. The input should be a a list of package -pattern. An example input might be: -`["github.com/fatih/color","github.com/fatih/structs"]` - -Also see |go-guru-scope|. - -By default it's not set, so the relevant commands' defaults are being used. -> - let g:go_guru_scope = [] -< - *'g:go_build_tags'* - -Space-separated list of build tags passed to the `-tags` flag of tools that -support it. -There is also the |:GoBuildTags| convenience command to change or remove build -tags. -> - let g:go_build_tags = '' -< - *'g:go_autodetect_gopath'* - -Automatically modify GOPATH for certain directory structures, such as for -the `godep` tool which stores dependencies in the `Godeps` folder. What this -means is that all tools are now working with the newly modified GOPATH. So -|:GoDef| for example jumps to the source inside the `Godeps` (vendored) -source. Currently `godep` and `gb` are supported. By default it's disabled. -> - let g:go_autodetect_gopath = 0 -< - *'g:go_textobj_enabled'* - -Adds custom text objects. By default it's enabled. > - - let g:go_textobj_enabled = 1 -< - *'g:go_textobj_include_function_doc'* - -Consider the comment above a function to be part of the function when using -the `af` text object and `[[` motion. By default it's enabled. > - - let g:go_textobj_include_function_doc = 1 -< - *'g:go_textobj_include_variable'* - -Consider the variable of an function assignment to be part of the anonymous -function when using the `af` text object. By default it's enabled. > - - let g:go_textobj_include_variable = 1 -< - *'g:go_metalinter_autosave'* - -Use this option to auto |:GoMetaLinter| on save. Only linter messages for -the active buffer will be shown. - -By default, `golangci-lint` messages will be shown in the |location-list| -window. The list to use can be set using |'g:go_list_type_commands'|. - - By default it's disabled > - let g:go_metalinter_autosave = 0 -< - *'g:go_metalinter_autosave_enabled'* - -Specifies the enabled linters for auto |:GoMetaLinter| on save. By -default it's using `vet` and `golint`. If any are enabled, `--disable-all` -will be sent to the metalinter. -> - let g:go_metalinter_autosave_enabled = ['vet', 'golint'] -< - *'g:go_metalinter_enabled'* - -Specifies the linters to enable for the |:GoMetaLinter| command. By default -it's using `vet`, `golint` and `errcheck`. If any are enabled, `--disable-all` -will be sent to the metalinter. -> - let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck'] -< - *'g:go_metalinter_command'* - -Overrides the command to be executed when |:GoMetaLinter| is called. By -default it's `golangci-lint`. Valid options are `golangci-lint` and `gopls`. -When the value is `gopls`, users may want to consider setting -`g:go_gopls_staticcheck`. It can also be used as an advanced setting for -users who want to have more control over the metalinter. -> - let g:go_metalinter_command = "golangci-lint" -< - *'g:go_metalinter_deadline'* - -Overrides the maximum time the linters have to complete. By default it's 5 -seconds. -> - let g:go_metalinter_deadline = "5s" -< - *'g:go_list_height'* - -Specifies the window height for the quickfix and location list windows. The -default value (empty) automatically sets the height to the number of items -(maximum up to 10 items to prevent large heights). Setting the value -explicitly overrides this behavior. For standard Vim behavior, set it to 10. -> - let g:go_list_height = 0 -< - *'g:go_list_type'* - -Specifies the type of list to use for command outputs (such as errors from -builds, results from static analysis commands, etc...). The list type for -specific commands can be overridden with |'g:go_list_type_commands'|. The -default value (empty) will use the appropriate kind of list for the command -that was called. Supported values are "", "quickfix", and "locationlist". -> - let g:go_list_type = "" -< - - *'g:go_list_type_commands'* - -Specifies the type of list to use for command outputs (such as errors from -builds, results from static analysis commands, etc...). When an expected key -is not present in the dictionary, |'g:go_list_type'| will be used instead. -Supported keys are "GoBuild", "GoErrCheck", "GoFmt", "GoModFmt", "GoInstall", -"GoLint", "GoMetaLinter", "GoMetaLinterAutoSave", "GoModifyTags" (used for -both :GoAddTags and :GoRemoveTags), "GoRename", "GoRun", and "GoTest". -Supported values for each command are "quickfix" and "locationlist". -> - let g:go_list_type_commands = {} -< -As an example, the following settings will change all list types to -`locationlist` except for `:GoBuild` where `quickfix` is used: -> - let g:go_list_type = "locationlist" - let g:go_list_type_commands = {"GoBuild": "quickfix"} -< - - *'g:go_list_autoclose'* - -Specifies whether the quickfix/location list should be closed automatically -in the absence of errors. The default value is 1. -If you prefer to keep a long running error window open, you can disable -this by setting the value to 0. -> - let g:go_list_autoclose = 1 -< - *'g:go_asmfmt_autosave'* - -Use this option to auto |:AsmFmt| on save. By default it's disabled. > - - let g:go_asmfmt_autosave = 0 -< - *'g:go_term_mode'* - -The default command used to open a new terminal for go commands such as -|:GoRun|. The default is `:vsplit`. - -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'* - -Controls the height and width of a terminal split, respectively. By default -these are not set, meaning that the height and width are set automatically by -the editor. The height only applies to a horizontal split and width only -applies to a vertical split. - -Applicable to Neovim and Vim with `terminal` feature only. - -For example here is how to set each to 30. -> - let g:go_term_height = 30 - let g:go_term_width = 30 -< - *'g:go_term_enabled'* - -Causes some types of jobs to run inside a new terminal according to -|'g:go_term_mode'|. By default it is disabled. - -Applicable to Neovim and Vim with `terminal` feature only. -> - let g:go_term_enabled = 0 -< - *'g:go_term_close_on_exit'* - -Closes the terminal after the command run in it exits when the command fails. -By default it is enabled. - -Applicable to Neovim and Vim with `terminal` feature only. - -> - let g:go_term_close_on_exit = 1 -< - *'g:go_alternate_mode'* - -Specifies the command that |:GoAlternate| uses to open the alternate file. By -default it is set to edit. -> - let g:go_alternate_mode = "edit" -< - *'g:go_rename_command'* - -Use this option to define which tool is used to rename. By default `gopls` -is used. Valid options are `gorename` and `gopls`. -> - let g:go_rename_command = 'gopls' -< - *'g:go_gorename_prefill'* - -Expression to prefill the new identifier when using |:GoRename| without any -arguments. Use an empty string if you don't want to prefill anything. By -default it converts the identifier to camel case but preserves the -capitalisation of the first letter to ensure that the exported state stays the -same. -> - let g:go_gorename_prefill = 'expand("") =~# "^[A-Z]"' . - \ '? go#util#pascalcase(expand(""))' . - \ ': go#util#camelcase(expand(""))' -< - - *'g:go_gopls_enabled'* - -Specifies whether `gopls` can be used by vim-go. By default gopls is enabled. -When gopls is disabled completion will not work and other configuration -options may also need to be adjusted. - -> - let g:go_gopls_enabled = 1 -< - - *'g:go_gopls_options'* - -The commandline arguments to pass to gopls. By default, it's `-remote=auto`. -> - let g:go_gopls_options = [] -< - - *'g:go_gopls_analyses'* - -The analyses settings for `gopls`. By default, it's `v:null`. Valid map values -are `v:true` and `v:false`. -> - let g:go_gopls_analyses = v:null -< - - *'g:go_gopls_complete_unimported'* - -Specifies whether `gopls` should include suggestions from unimported packages. -When it is `v:null`, `gopls`' default will be used. By default it is -`v:null`. -> - let g:go_gopls_complete_unimported = v:null -< - - *'g:go_gopls_deep_completion'* - -Specifies whether `gopls` should use deep completion. When it is `v:null`, -`gopls`' default will be used. By default it is `v:null`. - -> - let g:go_gopls_deep_completion = v:null -< - - *'g:go_gopls_matcher'* - -Specifies how `gopls` should match for completions. Valid values are `v:null`, -`fuzzy`, and `caseSensitive`. When it is `v:null`, `gopls`' default will be -used. By default it is `v:null`. -> - let g:go_gopls_matcher = v:null -< - - *'g:go_gopls_staticcheck'* - -Specifies whether `gopls` should run staticcheck checks. When it is `v:null`, -`gopls`' default will be used. By default it is `v:null`. -> - let g:go_gopls_staticcheck = v:null -< - - *'g:go_gopls_use_placeholders'* - -Specifies whether `gopls` can provide placeholders for function parameters and -struct fields. When set, completion items will be treated as anonymous -snippets if UltiSnips is installed and configured to be used as -|'g:go_snippet_engine'|. When it is `v:null`, `gopls`' default will be used. -By default it is `v:null`. -> - let g:go_gopls_use_placeholders = v:null -< - - *'g:go_gopls_temp_modfile'* - -Specifies whether `gopls` should use a temp modfile and suggest edits rather -than modifying the ambient go.mod file. When it is `v:null`, `gopls`' default -will be used. By default it is `v:null`. -> - let g:go_gopls_temp_modfile = v:null -< - - *'g:go_gopls_local'* - -Specifies the prefix for imports that `gopls` should consider group -separately. When it is `v:null`, `gopls`' default will be used. By default it -is `v:null`. -> - let g:go_gopls_local = v:null -< - - *'g:go_diagnostics_enabled'* - -Specifies whether `gopls` diagnostics are enabled. Only the diagnostics for -the current buffer will be processed when it is not set; all others will be -ignored. By default it is disabled. -> - let g:go_diagnostics_enabled = 0 -< - - *'g:go_template_autocreate'* - -When a new Go file is created, vim-go automatically fills the buffer content -with a Go code template. By default, the templates under the `templates` -folder are used. This can be changed with the |'g:go_template_file'| and -|'g:go_template_test_file'| settings to either use a different file in the -same `templates` folder, or to use a file stored elsewhere. - -If the new file is created in an already prepopulated package (with other Go -files), in this case a Go code template with only the Go package declaration -(which is automatically determined according to the current package) is added. - -To always use the package name instead of the template, enable the -|'g:go_template_use_pkg'| setting. - -By default it is enabled. -> - let g:go_template_autocreate = 1 -< - *'g:go_template_file'* - -Specifies either the file under the `templates` folder that is used if a new -Go file is created. Checkout |'g:go_template_autocreate'| for more info. By -default the `hello_world.go` file is used. - -This variable can be set to an absolute path, so the template files don't have -to be stored inside the vim-go directory structure. Useful when you want to -use different templates for different projects. -> - let g:go_template_file = "hello_world.go" -< - *'g:go_template_test_file'* - -Like with |'g:go_template_file'|, this specifies the file to use for test -tempaltes. The template file should be under the `templates` folder, -alternatively absolute paths can be used, too. Checkout -|'g:go_template_autocreate'| for more info. By default, the -`hello_world_test.go` file is used. -> - let g:go_template_test_file = "hello_world_test.go" -< - *'g:go_template_use_pkg'* - -Specifies that, rather than using a template, the package name is used if a -new Go file is created. Checkout |'g:go_template_autocreate'| for more info. -By default the template file specified by |'g:go_template_file'| is used. - -> - let g:go_template_use_pkg = 0 -< - *'g:go_decls_includes'* - -Only useful if `ctrlp.vim`, `unite.vim`, `denite.nvim` or `fzf` are installed. -This sets which declarations to show for |:GoDecls| (`ctrp.vim`), -|unite-decls| (`unite.vim`) and |denite-decls| (`denite.nvim`). It is a Comma -delimited list. Possible options are: {func,type}. The default is: > - - let g:go_decls_includes = 'func,type' -< - *'g:go_decls_mode'* - -Define the tool to be used for |:GoDecls|. Valid options are `ctrlp.vim`, -`fzf`, or an empty string; in which case it will try to autodetect either -`ctrlp.vim` or `fzf`. -> - let g:go_decls_mode = '' -< - *'g:go_echo_command_info'* - -Echoes information about various Go commands, such as `:GoBuild`, `:GoTest`, -`:GoCoverage`, etc... Useful to disable if you use the statusline integration, -i.e: |go#statusline#Show()|. By default it's enabled -> - let g:go_echo_command_info = 1 -< - *'g:go_echo_go_info'* - -Use this option to show the identifier information when code completion is -done. By default it's enabled. > - - let g:go_echo_go_info = 1 -< -Please note that 'noshowmode' must be set for this feature to work correctly. - - *'g:go_statusline_duration'* - -Specifies the duration of statusline information being showed per package. By -default it's 60 seconds. Must be in milliseconds. -> - let g:go_statusline_duration = 60000 -< - *'g:go_addtags_transform'* - -Sets the `transform` option for `gomodifytags` when using |:GoAddTags| or if -it's being used for snippet expansion of single fields. Possible options are: -`snakecase`, `camelcase`, `lispcase`, `pascalcase`, `keep`. For the following -case, if `snakecase` is used the field will be transformed to: -> - type T struct { - FooBarQuz string `json:"foo_bar_quz"` - } -< - -If "camelcase" is used: -> - type T struct { - FooBarQuz string `json:"fooBarQuz"` - } -< -By default "snakecase" is used. Current values are: ["snakecase", -"camelcase", "lispcase", "pascalcase", "keep"]. -> - let g:go_addtags_transform = 'snakecase' -< - *'g:go_addtags_skip_unexported'* - -Sets the `skip-unexported` option for `gomodifytags` when using |:GoAddTags|. -If set it will prevent `gomodifytags` from adding tags to unexported fields: -> - type T struct { - FooBar string `json:"foo_bar"` - quz string - } -< -By default it is disabled. -> - let g:go_addtags_skip_unexported = 0 -< - *'g:go_debug'* - -A list of options to debug; useful for development and/or reporting bugs. - -Currently accepted values: - - shell-commands Echo all shell commands that vim-go runs. - debugger-state Expose debugger state in 'g:go_debug_diag'. - debugger-commands Echo communication between vim-go and `dlv`; requests and - responses are recorded in `g:go_debug_commands`. - lsp Echo communication between vim-go and `gopls`. All - communication is shown in a dedicated window. When - enabled before gopls is started, |:GoLSPDebugBrowser| can - be used to open a browser window to help debug gopls. -> - let g:go_debug = [] -< - -============================================================================== -SYNTAX HIGHLIGHTING *ft-go-syntax* *go-syntax* - -vim-go comes with an enhanced version of Vim's Go syntax highlighting. It -comes with a number of features, most of which are disabled by default. - -The recommended settings are the default values. If you're experiencing -slowdowns in Go files and you enabled some of these options then try disabling -them; some can be resource intensive. - - *'g:go_fold_enable'* - -Control syntax-based folding which takes effect when 'foldmethod' is set to -`syntax`. -You can enable specific fold regions by setting an array. Possible values are: - - block `{` .. `}` blocks. - import `import` block. - varconst `var` and `const` blocks. - package_comment The package comment. - comment Any comment that is not the package comment. - -By default all except "comment" are enabled: -> - let g:go_fold_enable = ['block', 'import', 'varconst', 'package_comment'] -< -Enable folding of only imports: -> - let g:go_fold_enable = ['import'] -< -Disable everything (same as not setting 'foldmethod' to `syntax`): -> - let g:go_fold_enable = [] -< - *'g:go_highlight_array_whitespace_error'* - -Highlight white space after `[]`. > - - let g:go_highlight_array_whitespace_error = 0 -< - *'g:go_highlight_chan_whitespace_error'* - -Highlight white space around the receive operator (`<-`) that doesn't follow -the standard style. > - - let g:go_highlight_chan_whitespace_error = 0 -< - *'g:go_highlight_extra_types'* - -Highlight commonly used library types (`io.Reader`, etc.). > - - let g:go_highlight_extra_types = 0 -< - *'g:go_highlight_space_tab_error'* - -Highlight instances of tabs following spaces. > - - let g:go_highlight_space_tab_error = 0 -< - *'g:go_highlight_trailing_whitespace_error'* - -Highlight trailing white space. > - - let g:go_highlight_trailing_whitespace_error = 0 -< - *'g:go_highlight_operators'* - -Highlight operators such as `:=` , `==`, `-=`, etc. -> - let g:go_highlight_operators = 0 -< - *'g:go_highlight_functions'* - -Highlight function and method declarations. -> - let g:go_highlight_functions = 0 -< - *'g:go_highlight_function_parameters'* - -Highlight the variable names in parameters (including named return parameters) -in function declarations. Setting this implies the functionality from -|'g:go_highlight_functions'|. -> - let g:go_highlight_function_parameters = 0 -< - *'g:go_highlight_function_calls'* - -Highlight function and method calls. -> - let g:go_highlight_function_calls = 0 -< - *'g:go_highlight_types'* - -Highlight struct and interface names. -> - let g:go_highlight_types = 0 -< - *'g:go_highlight_fields'* - -Highlight struct field names. -> - let g:go_highlight_fields = 0 -< - *'g:go_highlight_build_constraints'* - -Highlights build constraints. -> - let g:go_highlight_build_constraints = 0 -< - *'g:go_highlight_generate_tags'* - -Highlight go:generate directives. -> - let g:go_highlight_generate_tags = 0 -< - *'g:go_highlight_string_spellcheck'* - -Highlight spelling errors in strings when |spell| is enabled. -> - let g:go_highlight_string_spellcheck = 1 -< - *'g:go_highlight_format_strings'* - -Highlight printf-style formatting verbs inside string literals. -> - let g:go_highlight_format_strings = 1 -< - *'g:go_highlight_variable_declarations'* - -Highlight variable names in variable declarations (`x` in ` x :=`). -> - let g:go_highlight_variable_declarations = 0 -< - *'g:go_highlight_variable_assignments'* - -Highlight variable names in variable assignments (`x` in `x =`). -> - let g:go_highlight_variable_assignments = 0 -< - *'g:go_highlight_diagnostic_errors'* - -Highlight diagnostic errors. -> - let g:go_highlight_diagnostic_errors = 1 -< - *'g:go_highlight_diagnostic_warnings'* - -Highlight diagnostic warnings. -> - let g:go_highlight_diagnostic_warnings = 1 -< - -============================================================================== - *gohtmltmpl* *ft-gohtmltmpl-syntax* - *gotexttmpl* *ft-gotexttmpl-syntax* -Go template syntax~ - -The `gotexttmpl` 'filetype' provides syntax highlighting and indentation for -Go's `text/template` package. - -The `gohtmltmpl` filetype is for use with the `html/template` package and is -identical to `gotexttmpl` except that it will also load the standard `html` -filetype. - -The `gohtmltmpl` filetype is automatically set for `*.tmpl` files; the -`gotexttmpl` is never automatically set and needs to be set manually. - -============================================================================== - *gomod* *ft-gomod-syntax* -go.mod file syntax~ - -The `gomod` 'filetype' provides syntax highlighting for Go's module file -`go.mod` - - -============================================================================== -DEBUGGER *go-debug* - -Vim-go comes with a special "debugger mode". This starts a `dlv` process in -the background and provides various commands to communicate with it. - -This debugger is similar to Visual Studio or Eclipse and has the following -features: - - * Show stack trace and jumps. - * List local variables. - * List function arguments. - * Expand values of struct or array/slice. - * Show balloon on the symbol. - * Show output of stdout/stderr. - * Toggle breakpoint. - * Stack operation continue/next/step out. - -This feature requires either Vim 8.0.0087 or newer with the |+job| feature or -Neovim. This features also requires Delve 1.0.0 or newer, and it is -recommended to use Go 1.10 or newer, as its new caching will speed up -recompiles. - - *go-debug-intro* -GETTING STARTED WITH THE DEBUGGER~ - -Use |:GoDebugStart| or |:GoDebugTest| to start the debugger. The first -argument is the package name, and any arguments after that will be passed on -to the program; for example: -> - :GoDebugStart . -someflag value -< -This may take few seconds. After the code is compiled you'll see three new -windows: the stack trace on left side, the variable list on the bottom-left, -and program output at the bottom. - -You can add breakpoints with |:GoDebugBreakpoint| () and run your program -with |:GoDebugContinue| (). - -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| () or step -in with |:GoDebugStep| (). - -The program can also be halted with `:GoDebugHalt` (). - -The variable window in the bottom left (`GODEBUG_VARIABLES`) will display all -local variables. Struct values are displayed as `{...}`, array/slices as -`[4]`. Use on the variable name to expand the values. - -The `GODEBUG_OUTPUT` window displays output from the program and the Delve -debugger. - -The `GODEBUG_STACKTRACE` window can be used to jump to different places in the -call stack. - -When you're done use |:GoDebugStop| to close the debugging windows and halt -the `dlv` process, or |:GoDebugRestart| to recompile the code. - - *go-debug-commands* -DEBUGGER COMMANDS~ - -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] - - Start the debug mode for [pkg]; this does several things: - - * Setup the debug windows according to |'g:go_debug_windows'|. - * Make the `:GoDebug*` commands and `(go-debug-*)` mappings available. - - The directory of the current buffer is used if [pkg] is empty. Any other - arguments will be passed to the program. - - Use |:GoDebugStop| to stop `dlv` and exit debugging mode. - - *:GoDebugTest* -:GoDebugTest [pkg] [program-args] - - Behaves the same as |:GoDebugStart| but runs `dlv test` instead of - `dlv debug` so you can debug tests. - - Use `-test.flag` to pass flags to `go test` when debugging a test; for - example `-test.v` or `-test.run TestFoo` - - *:GoDebugRestart* -:GoDebugRestart - - 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 by default. - - *:GoDebugStop* - *(go-debug-stop)* -:GoDebugStop - - Stop `dlv` and remove all debug-specific commands, mappings, and windows. - - *:GoDebugBreakpoint* - *(go-debug-breakpoint)* -:GoDebugBreakpoint [linenr] - - Toggle breakpoint for the [linenr]. [linenr] defaults to the current line - if it is omitted. A line with a breakpoint will have the - {godebugbreakpoint} |:sign| placed on it. The line the program is - currently halted on will have the {godebugcurline} sign. - - *hl-GoDebugCurrent* *hl-GoDebugBreakpoint* - A line with a breakpoint will be highlighted with the {GoDebugBreakpoint} - group; the line the program is currently halted on will be highlighted - with {GoDebugCurrent}. - - Mapped to by default. - - *:GoDebugContinue* - *(go-debug-continue)* -:GoDebugContinue - - Continue execution until breakpoint or program termination. It will start - the program if it hasn't been started yet. - - Mapped to by default. - - *:GoDebugNext* - *(go-debug-next)* -:GoDebugNext - - Advance execution by one line, also called "step over" by some other - debuggers. - - Mapped to by default. - - *:GoDebugStep* - *(go-debug-step)* -:GoDebugStep - - Advance execution by one step, stopping at the next line of code that will - be executed (regardless of location). - - Mapped to by default. - - *:GoDebugStepOut* - *(go-debug-stepout)* - -:GoDebugStepOut - - Run all the code in the current function and halt when the function - returns ("step out of the current function"). - - *:GoDebugSet* -:GoDebugSet {var} {value} - - Set the variable {var} to {value}. Example: -> - :GoDebugSet truth 42 -< - This only works for `float`, `int` and variants, `uint` and variants, - `bool`, and pointers (this is a `delve` limitation, not a vim-go - limitation). - - *:GoDebugPrint* - *(go-debug-print)* -:GoDebugPrint {expr} - - Print the result of a Go expression. -> - :GoDebugPrint truth == 42 - truth == 42 true -< - Mapped to by default, which will evaluate the under the - cursor. - - *go-debug-settings* -DEBUGGER SETTINGS~ - - *'g:go_debug_windows'* - -Controls the window layout for debugging mode. This is a |dict| with four -possible keys: "vars", "stack", "goroutines", and "out"; each of the new -windows will be created in that that order with the commands in the value. The -current window is made the only window before creating the debug windows. - -A window will not be created if a key is missing or empty. - -Defaults: -> - let g:go_debug_windows = { - \ 'vars': 'leftabove 30vnew', - \ 'stack': 'leftabove 20new', - \ 'goroutines': 'botright 10new', - \ 'out': 'botright 5new', - \ } -< -Show only variables on the right-hand side: > - - let g:go_debug_windows = { - \ 'vars': 'rightbelow 60vnew', - \ } -< - *'g:go_debug_address'* - -Server address `dlv` will listen on; must be in `hostname:port` format. -Defaults to `127.0.0.1:8181`: -> - let g:go_debug_address = '127.0.0.1:8181' -< - - *'g:go_debug_log_output'* - -Specifies log output options for `dlv`. Value should be a single string of -comma-separated options suitable for passing to `dlv`. An empty string (`''`) -will suppress logging entirely. Default: `'debugger,rpc'`: -> - let g:go_debug_log_output = 'debugger,rpc' -< - - *'g:go_highlight_debug'* - -Highlight the current line and breakpoints in the debugger. - -> - let g:go_highlight_debug = 1 -< - - *'go:go_debug_breakpoint_sign_text'* - -Set the sign text used for breakpoints in the debugger. By default it's '>'. - -> - let g:go_debug_breakpoint_sign_text = '>' -< - -============================================================================== -FAQ TROUBLESHOOTING *go-troubleshooting* - -How do I troubleshoot problems?~ - -One of the best ways to understand what vim-go is doing and the output from -the tools to which it delegates is to use leverage the features described in -|'g:go_debug'|. - -Completion and other functions that use `gopls` don't work~ - -Vim-go is heavily reliant on `gopls` for completion and other functionality. -Many of the features that use `gopls` (e.g. completion, jumping to -definitions, showing identifier information, et al.) can be configured to -delegate to other tools. e.g. completion via 'omnifunc', |'g:go_info_mode'| -and |'g:go_def_mode'| can be set to use other tools for now (though some of -the alternatives to `gopls` are effectively at their end of life and support -for them from within vim-go may be removed soon). - -I want to disable `gopls`~ - -Vim-go's use of `gopls` can be disabled with 'g:go_gopls_enabled'. - -Some users want to do this to limit the load on their system when using vim-go -concurrently with an LSP client like vim-lsp. Instead of disabling vim-go's -use of `gopls`, you may prefer to configure vim-go to share the `gopls` -instance with other LSP plugins. 'g:go_gopls_options' can be used to configure -how vim-go starts `gopls` so that the instance can be shared with other -plugins and vim-go user's can leverage the full power of vim-go. - -I get a "Unknown function: go#config#..." error~ - -This often happens to vim-polyglot users when new config options are added to -vim-go. Run vim-polyglot's `build` script or make sure that vim-go is loaded -before vim-polyglot. - -It can also happen when multiple versions of vim-go are installed and the -version loaded by Vim doesn't have a function introduced by a later version. -To see where vim-go is being loaded from run -> - :verbose function go#config#FmtAutosave -< - -The output will show the path to the `autoload/go/config.vim` that was loaded -by Vim. Make sure the root of the path to output by the command is the path -from which vim-go is expected to sourced. If it is not rooted as expected, -then there are multiple copies of vim-go installed; remove the unexpected -copies. - -I get "not an editor command" error when I invoke :GoXXX~ - -This happens if vim-go is not installed properly. Be sure you have added this -line into your vimrc: -> - filetype plugin indent on -< - -I get a "command not found" error when I invoke :GoXXX~ - -If you try to call |:GoDef|, |:GoInfo| and get a command not found, check that -you have the binaries installed by using |:GoInstallBinaries|. - -Before opening vim, check your current $PATH: -> - echo $PATH -< -After opening vim, run `:echo $PATH`, the output must be your current `$PATH` -plus `$GOPATH/bin` (the location where |:GoInstallBinaries| installed the -binaries). - - *go-guru-scope* -What is the guru scope and how do I set it?~ - -Many vim-go commands use the `guru` commandline tool to get information. Some -`guru` commands require an expensive analysis of the source code. To still get -a reasonable amount of performance `guru` limits this analysis to a selected -list of packages. This is known as the "guru scope". - -The default is to use the package the current buffer belongs to, but this may -not always be correct. For example for the file `guthub.com/user/pkg/a/a.go` -the scope will be set to `github.com/user/pkg/a`, but you probably want -`github.com/user/pkg` - -Guessing what package(s) you do want is not easy so you may need to set this -manually, usually from an |autocommand|: -> - autocmd BufRead /home/martin/go/src/github.com/user/pkg/*.go - \ :GoGuruScope github.com/user/pkg -< - -If you have a lot of packages with the same prefix (`github.com/user`) you can -use a single autocommand: -> - autocmd BufRead /home/martin/go/src/*.go - \ let s:tmp = matchlist(expand('%:p'), - \ '/home/martin/go/src/\(github.com/user/[^/]\+\)') - \| if len(s:tmp) > 1 | exe 'silent :GoGuruScope ' . s:tmp[1] | endif - \| unlet s:tmp -< -Also see |:GoGuruScope| and |'g:go_guru_scope'|. - - -Vim becomes slow while editing Go files~ - -The most common cause for this is using an older version of Vim that doesn't -support asynchronous jobs. |'g:go_auto_sameids'| and |'g:go_auto_type_info'| -run jobs that can cause noticable delays when used with vim74. The problem is -most pronounced on vim74, but can occur on vim8 and nvim. On vim8 and nvim, -the problem should be restricted to a short period when the first buffer in a -package is first loaded. - -If you see unexpected characters rendered in the current window, the problem -is most likely due to |'g:go_auto_sameids'| or |'g:go_auto_type_info'|. First, -try using another mode for |'g:go_info_mode'|. If that doesn't work, try -disabling |'g:go_auto_sameids'| and |'g:go_auto_type_info'|. - -To a lesser extent, this can be caused by `g:go_highlight_*` options. If Vim -is just slower than normal, but doesn't render unexpected characters in the -currrent window, then the problem is most likely the `g:go_highlight_*` -options. Try disabling them if you've enabled some of them. - -I get errors when using GoInstallBinaries~ - -If you see errors like this: -> - Error installing golang.org/x/tools/cmd/goimports -< -that means your local Go setup is broken or the remote website is down. For -example sometimes code.google.com times out. To test, just execute a simple -`go get`: -> - go get golang.org/x/tools/cmd/goimports -< -You'll see a more detailed error. If this works, vim-go will work too. - - -I want to use a different binary name than "go", can I do this?~ - -There is no way to directly configure the binary name; but you can use a -wrapper script; for example if you would like to run `goapp` instead of `go`: - -1. In `~/gobin/go` (remember to make it executable): -> - #!/bin/sh - # Remove gobin from PATH and run goapp. - PATH=${PATH#$HOME/gobin} goapp "$@" -< -2. Start Vim with `~/gobin` as the first `PATH` entry so it will use the - wrapper script: -> - PATH="$HOME/gobin/:$PATH" vim -< - Alternatively you you could set `$PATH` in your vimrc with an |:autocmd|. - - -How do I use vim-go with syntastic?~ - -Sometimes when using both `vim-go` and `syntastic` Vim will start lagging -while saving and opening files. The following fixes this: -> - let g:syntastic_go_checkers = ['golint', 'govet'] - let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } -< -If you want to add errcheck you can use golangci-lint as a wrapper: -> - let g:syntastic_go_checkers = ['golint', 'govet', 'golangci-lint'] - let g:syntastic_go_gometalinter_args = ['--disable-all', '--enable=errcheck'] - let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } -< -Another issue with `vim-go` and `syntastic` is that the location list window -that contains the output of commands such as `:GoBuild` and `:GoTest` might -not appear. To resolve this: -> - let g:go_list_type = "quickfix" -< - -How do I run focused ginkgo tests?~ - -You must set this environment variable in your `.vimrc`: -> - let $GINKGO_EDITOR_INTEGRATION = "true" -< - -Using with NeoVim~ - -Note: Neovim currently is not a first class citizen for vim-go. You are free -to open bug, however I'm not using Neovim so it's hard for me to test it. -vim-go might not work as well in Neovim as it does in Vim. I'm happy to accept -pull requests or very detailed bug reports. If you're interested to improve -the state of Neovim in vim-go you're always welcome! - -Run `:GoRun` in a new tab, horizontal split or vertical split terminal -> - au FileType go nmap rt (go-run-tab) - au FileType go nmap rs (go-run-split) - au FileType go nmap rv (go-run-vertical) -< -By default new terminals are opened in a vertical split. To change it -> - let g:go_term_mode = "split" -> - -How can I customize the highlighting?~ - -All the highlight groups used by vim-go are prefixed with `go` (e.g. -`goType`) and are defined in the files in the `syntax` directory. To change -the highlighting for any group, add a `highlight` command for the group to -your vimrc. To turn off the highlighting for any group, add `highlight link -group-name NONE` (where `group-name` is the name of the group whose highlight -you'd like to turn off) to your vimrc. - -Some people may wish to highlight Go's builtins as keywords. To do so, one -should simply add `highlight link goBuiltins Keyword` to the `vimrc` file. - -============================================================================== -DEVELOPMENT *go-development* - -vim-go supports test files written in VimScript; the way they're run is -roughly similar to Go tests: - -- A `*.vim` file has a corresponding `*_test.vim`. -- All functions starting with `Test_` are run as test. -- A test is considered to be "failed" if |v:errors| has any entries. You can - use one of the |test-functions| to set this, or append to it directly. - -A simple example: -> - function Test_run_fmt() - call assert_equal(expected, actual) - ... - endfunction -< -To run tests vim-go comes with three small helper scripts: - - `scripts/install-vim` Install a pristine Vim to `/tmp/vim-go-test/`. - `scripts/run-vim` Run a Vim version from `/tmp/vim-go-test/`. - `scripts/test` Run all tests with a Vim from `/tmp/vim-go-test/`. - -All scripts accept a Vim version as the first argument, which can be -`vim-8.0` or `nvim`. You will need to install a Vim version with -`install-vim` before you can use `run-vim` or `test`. - -You can install and test all Vim versions by running `make`. - - -============================================================================== -DONATION *go-donation* - -People have asked for this for a long time, now you can be a fully supporter -by being a patreon at: https://www.patreon.com/bhcleek - -By being a patron, you are enabling vim-go to grow and mature, helping me to -invest in bug fixes, new documentation, and improving both current and future -features. It's completely optional and is just a direct way to support -vim-go's ongoing development. Thanks! - -Check it out: https://www.patreon.com/bhcleek - - -============================================================================== -CREDITS *go-credits* - -* Go Authors for official Vim plugins. -* Gocode, Godef, Golint, Guru, Goimports, Errcheck projects and authors of - those projects. -* Other vim-plugins, thanks for inspiration (vim-golang, go.vim, vim-gocode, - vim-godef). -* vim-go contributors: https://github.com/fatih/vim-go/graphs/contributors. - - - vim: ft=help tw=78 et ts=2 sw=2 sts=2 norl - -endif diff --git a/doc/vim-jsonnet.txt b/doc/vim-jsonnet.txt deleted file mode 100644 index 988453bc8..000000000 --- a/doc/vim-jsonnet.txt +++ /dev/null @@ -1,104 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 - -*vim-jsonnet.txt* Jsonnet development plugin -*vim-jsonnet* - -==================================================================================== - # # ### # # # ##### ####### # # # # ####### ####### - # # # ## ## # # # # # ## # ## # # # - # # # # # # # # # # # # # # # # # # # - # # # # # # ##### # ##### # # # # # # # # ##### # - # # # # # # # # # # # # # # # # # # - # # # # # # # # # # # # ## # ## # # - # ### # # ##### ##### ####### # # # # ####### # -==================================================================================== -CONTENTS *jsonnet-contents* - - 1. Intro........................................|jsonnet-intro| - 2. Install......................................|jsonnet-install| - 3. Commands.....................................|jsonnet-commands| - 4. Mappings.....................................|jsonnet-mappings| - 6. Functions....................................|jsonnet-functions| - 7. Settings.....................................|jsonnet-settings| - 8. Troubleshooting..............................|jsonnet-troubleshooting| - 9. Credits......................................|jsonnet-credits| - -============================================================================== -INTRO *jsonnet-intro* - -============================================================================== -INSTALL *jsonnet-install* - -============================================================================== -COMMANDS *jsonnet-commands* - - *:JsonnetFmt* -:JsonnetFmt - -Filter the current Jsonnet buffer through `jsonnetfmt`. It tries to -preserve cursor position and avoids replacing the buffer with stderr -output. - -============================================================================== -MAPPINGS *jsonnet-mappings* - -============================================================================== -FUNCTIONS *jsonnet-functions* - - *jsonnet#Format()* - -Filter the current Jsonnet buffer through `jsonnetfmt`. It tries to -preserve cursor position and avoids replacing the buffer with stderr -output. - -============================================================================== -SETTINGS *jsonnet-settings* - - *'g:jsonnet_fmt_on_save'* - -Use this option to auto |:JsonnetFmt| on save. By default it's enabled > - - let g:jsonnet_fmt_on_save = 1 -< - *'g:jsonnet_command'* - -Use this option to define which tool is used to fotmat. By default `jsonnet` is -used > - - let g:jsonnet_command = "jsonnet" -< - *'g:jsonnet_fmt_command'* - -Use this option to define which parameter is used with *g:jsonnet_command* tool. -By default `fmt` is used > - - let g:jsonnet_fmt_command = "fmt" -< - *'g:jsonnet_fmt_options'* - -Use this option to add additional options to the -|'g:jsonnet_command'| + |'g:jsonnet_fmt_command'|. Default is empty. > - - let g:jsonnet_fmt_options = '' -< - *'g:jsonnet_fmt_fail_silently'* - -Use this option to enable processing of -|'g:jsonnet_command'| + |'g:jsonnet_fmt_command'| command if it fails. By default -it is turned off. By default the error output from the -|'g:jsonnet_command'| + |'g:jsonnet_fmt_command'| command is ignored. -FixMe: The processing of the |'g:jsonnet_command'| + |'g:jsonnet_fmt_command'| -is not implemented yet. So clearing this option would not do anything at this time. > - - let g:jsonnet_fmt_fail_silently = 1 -< - -============================================================================== -TROUBLESHOOTING *jsonnet-troubleshooting* - -============================================================================== -CREDITS *jsonnet-credits* - - - -endif diff --git a/doc/vim-jsx-pretty-doc.txt b/doc/vim-jsx-pretty-doc.txt deleted file mode 100644 index a561e4754..000000000 --- a/doc/vim-jsx-pretty-doc.txt +++ /dev/null @@ -1,128 +0,0 @@ -if !exists('g:polyglot_disabled') || (index(g:polyglot_disabled, 'javascript') == -1 && index(g:polyglot_disabled, 'jsx') == -1) - -vim-jsx-pretty is syntax highlight for JSX (React.js). -(https://github.com/MaxMEllon/vim-jsx-pretty) - -version 1.0.6 -Author: maxmellon -License: MIT - -About |vim-jsx-pretty-about| -Usage |vim-jsx-pretty-usage| -Install |vim-jsx-pretty-install| -Config |vim-jsx-pretty-config| -Detail |vim-jsx-pretty-detail| -License |vim-jsx-pretty-license| -Thanks |vim-jsx-retty-thanks| -Inspiration |vim-jsx-pretty-inspiration| - -=============================================================================== -ABOUT *vim-jsx-pretty-about* - -*vim-jsx-pretty* is highlight and indentation JSX (React.js) syntax. - -Dependency Plugin: - - pangloss/vim-javascript - -=============================================================================== -USAGE *vim-jsx-pretty-usage* - -Just Install it. - -=============================================================================== -INSTALL *vim-jsx-pretty-install* - -If you used plugin manager `vim-plug`, As follows. > - - Plug 'pangloss/vim-javascript' " dependency plugin - Plug 'maxmellon/vim-jsx-pretty' -< -=============================================================================== -CONFIG *vim-jsx-pretty-config* - -- config list -> - | name | default | detail | - |---------------------------------------|---------|----------------------| - | g:vim_jsx_pretty_enable_jsx_highlight | 1 | jsx highlight flag | - | g:vim_jsx_pretty_colorful_config | 0 | colorful config flag | -< - -- *g:vim_jsx_pretty_enable_jsx_highlight* - -If you set 'g:vim_jsx_pretty_enable_jsx_highlight', Disable jsx highlight. -But highlight group is set to jsx syntax. So you should set manual -highlight setting. - - - Example: > - - let g:vim_jsx_pretty_enable_jsx_highlight = 0 - - highlight def link jsxTag Function - highlight def link jsxTagName Function - highlight def link jsxString String - highlight def link jsxNameSpace Function - highlight def link jsxComment Error - highlight def link jsxAttrib Type - highlight def link jsxCloseTag Identifier - highlight def link jsxCloseString Identifier - -- *g:vim_jsx_pretty_colorful_config* - -If you set 'g:vim_jsx_pretty_colorful_config', Enable colorful config. - -=============================================================================== -DETAIL *vim-jsx-pretty-detail* - -- Syntax group list -> - | name | match | | | - |--------------|--------------------|--------------|--------------------| - | jsxTag | ``| jsxjsxAttrib | ``| - | | `~~~~~~~~~~~~~~~~~`| | `_____~~__________`| - |--------------|--------------------|--------------|--------------------| - | jsxTagName | ``| jsxEqual | ``| - | | `_~~~_____________`| | `_______~_________`| - |--------------|--------------------|--------------|--------------------| - | jsxString | ``| jsxCloseTag | ``| - | | `________~~~~~~~~_`| | `~~~~~~ | _____~~| - |--------------|--------------------|--------------|--------------------| - -=============================================================================== -LICENSE *vim-jsx-pretty-license* - -Copyright (c) 2016-2017 MaxMEllon -MIT License -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. - -============================================================================== -THANKS *vim-jsx-pretty-thanks* - - - yuezk - - y0za - - cormacrelf - -=============================================================================== -INSPIREATION *vim-jsx-pretty-inspiration* - - - vim-jsx - See: https://github.com/mxw/vim-jsx - - vim:tw=78:ts=8:ft=help:norl: - -endif diff --git a/doc/vim-markdown.txt b/doc/vim-markdown.txt deleted file mode 100644 index c2337e690..000000000 --- a/doc/vim-markdown.txt +++ /dev/null @@ -1,667 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 - -*vim-markdown* Vim Markdown - -=============================================================================== -Contents ~ - - 1. Introduction |vim-markdown-introduction| - 2. Installation |vim-markdown-installation| - 3. Basic usage |vim-markdown-basic-usage| - 1. Folding |vim-markdown-folding| - 2. Concealing |vim-markdown-concealing| - 4. Options |vim-markdown-options| - 1. Disable Folding |vim-markdown-disable-folding| - 2. Change fold style |vim-markdown-change-fold-style| - 3. Set header folding level |vim-markdown-set-header-folding-level| - 4. Disable Default Key Mappings |vim-markdown-disable-default-key-mappings| - 5. Enable TOC window auto-fit |vim-markdown-enable-toc-window-auto-fit| - 6. Text emphasis restriction to single-lines - |vim-markdown-text-emphasis-restriction-to-single-lines| - 7. Syntax Concealing |vim-markdown-syntax-concealing| - 8. Fenced code block languages |vim-markdown-fenced-code-block-languages| - 9. Follow named anchors |vim-markdown-follow-named-anchors| - 10. Syntax extensions |vim-markdown-syntax-extensions| - 1. LaTeX math |vim-markdown-latex-math| - 2. YAML Front Matter |vim-markdown-yaml-front-matter| - 3. TOML Front Matter |vim-markdown-toml-front-matter| - 4. JSON Front Matter |vim-markdown-json-front-matter| - 5. Strikethrough |vim-markdown-strikethrough| - 11. Adjust new list item indent |vim-markdown-adjust-new-list-item-indent| - 12. Do not require .md extensions for Markdown links - |vim-markdown-do-not-require-.md-extensions-for-markdown-links| - 13. Auto-write when following link - |vim-markdown-auto-write-when-following-link| - 14. Change default file extension - |vim-markdown-change-default-file-extension| - 15. Do not automatically insert bulletpoints - |vim-markdown-do-not-automatically-insert-bulletpoints| - 16. Change how to open new files |vim-markdown-change-how-to-open-new-files| - 5. Mappings |vim-markdown-mappings| - 6. Commands |vim-markdown-commands| - 7. Credits |vim-markdown-credits| - 8. License |vim-markdown-license| - 9. References |vim-markdown-references| - -=============================================================================== - *vim-markdown-introduction* -Introduction ~ - -Syntax highlighting, matching rules and mappings for the original Markdown [1] -and extensions. - -=============================================================================== - *vim-markdown-installation* -Installation ~ - -If you use Vundle [2], add the following lines to your '~/.vimrc': -> - Plugin 'godlygeek/tabular' - Plugin 'plasticboy/vim-markdown' -< -The 'tabular' plugin must come _before_ 'vim-markdown'. - -Then run inside Vim: -> - :so ~/.vimrc - :PluginInstall -< -If you use Pathogen [3], do this: -> - cd ~/.vim/bundle - git clone https://github.com/plasticboy/vim-markdown.git -< -To install without Pathogen using the Debian vim-addon-manager [4], do this: -> - git clone https://github.com/plasticboy/vim-markdown.git - cd vim-markdown - sudo make install - vim-addon-manager install markdown -< -If you are not using any package manager, download the tarball [5] and do this: -> - cd ~/.vim - tar --strip=1 -zxf vim-markdown-master.tar.gz -< -=============================================================================== - *vim-markdown-basic-usage* -Basic usage ~ - -------------------------------------------------------------------------------- - *vim-markdown-folding* -Folding ~ - -Folding is enabled for headers by default. - -The following commands are useful to open and close folds: - - *vim-markdown-zr* -- 'zr': reduces fold level throughout the buffer - *vim-markdown-zR* -- 'zR': opens all folds - *vim-markdown-zm* -- 'zm': increases fold level throughout the buffer - *vim-markdown-zM* -- 'zM': folds everything all the way - *vim-markdown-za* -- 'za': open a fold your cursor is on - *vim-markdown-zA* -- 'zA': open a fold your cursor is on recursively - *vim-markdown-zc* -- 'zc': close a fold your cursor is on - *vim-markdown-zC* -- 'zC': close a fold your cursor is on recursively - -Options are available to disable folding or change folding style. - -Try ':help fold-expr' and ':help fold-commands' for details. - -------------------------------------------------------------------------------- - *vim-markdown-concealing* -Concealing ~ - -Concealing is set for some syntax such as bold, italic, code block and link. - -Concealing lets you conceal text with other text. The actual source text is not -modified. If you put your cursor on the concealed line, the conceal goes away. - -Options are available to disable or change concealing. - -Try ':help concealcursor' and ':help conceallevel' for details. - -=============================================================================== - *vim-markdown-options* -Options ~ - -------------------------------------------------------------------------------- - *vim-markdown-disable-folding* -Disable Folding ~ - - *g:vim_markdown_folding_disabled* -- 'g:vim_markdown_folding_disabled' - - Add the following line to your '.vimrc' to disable the folding - configuration: -> - let g:vim_markdown_folding_disabled = 1 -< - This option only controls Vim Markdown specific folding configuration. - - To enable/disable folding use Vim's standard folding configuration. -> - set [no]foldenable -< -------------------------------------------------------------------------------- - *vim-markdown-change-fold-style* -Change fold style ~ - - *g:vim_markdown_folding_style_pythonic* -- 'g:vim_markdown_folding_style_pythonic' - - To fold in a style like python-mode [6], add the following to your - '.vimrc': -> - let g:vim_markdown_folding_style_pythonic = 1 -< - 'g:vim_markdown_folding_level' setting (default 1) is set to 'foldlevel'. - Thus level 1 heading which is served as a document title is expanded by - default. - - *g:vim_markdown_override_foldtext* -- 'g:vim_markdown_override_foldtext' - - To prevent foldtext from being set add the following to your '.vimrc': -> - let g:vim_markdown_override_foldtext = 0 -< -------------------------------------------------------------------------------- - *vim-markdown-set-header-folding-level* -Set header folding level ~ - - *g:vim_markdown_folding_level* -- 'g:vim_markdown_folding_level' - - Folding level is a number between 1 and 6. By default, if not specified, it - is set to 1. -> - let g:vim_markdown_folding_level = 6 -< - Tip: it can be changed on the fly with: -> - :let g:vim_markdown_folding_level = 1 - :edit -< -------------------------------------------------------------------------------- - *vim-markdown-disable-default-key-mappings* -Disable Default Key Mappings ~ - - *g:vim_markdown_no_default_key_mappings* -- 'g:vim_markdown_no_default_key_mappings' - - Add the following line to your '.vimrc' to disable default key mappings: -> - let g:vim_markdown_no_default_key_mappings = 1 -< - You can also map them by yourself with '' mappings. - -------------------------------------------------------------------------------- - *vim-markdown-enable-toc-window-auto-fit* -Enable TOC window auto-fit ~ - - *g:vim_markdown_toc_autofit* -- 'g:vim_markdown_toc_autofit' - - Allow for the TOC window to auto-fit when it's possible for it to shrink. - It never increases its default size (half screen), it only shrinks. -> - let g:vim_markdown_toc_autofit = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-text-emphasis-restriction-to-single-lines* -Text emphasis restriction to single-lines ~ - - *g:vim_markdown_emphasis_multiline* -- 'g:vim_markdown_emphasis_multiline' - - By default text emphasis works across multiple lines until a closing token - is found. However, it's possible to restrict text emphasis to a single line - (i.e., for it to be applied a closing token must be found on the same - line). To do so: -> - let g:vim_markdown_emphasis_multiline = 0 -< -------------------------------------------------------------------------------- - *vim-markdown-syntax-concealing* -Syntax Concealing ~ - - *g:vim_markdown_conceal* -- 'g:vim_markdown_conceal' - - Concealing is set for some syntax. - - For example, conceal '[link text](link url)' as just 'link text'. Also, - '_italic_' and '*italic*' will conceal to just _italic_. Similarly - '__bold__', '**bold**', '___italic bold___', and '***italic bold***' will - conceal to just **bold**, **bold**, **_italic bold_**, and **_italic - bold_** respectively. - - To enable conceal use Vim's standard conceal configuration. -> - set conceallevel=2 -< - To disable conceal regardless of 'conceallevel' setting, add the following - to your '.vimrc': -> - let g:vim_markdown_conceal = 0 -< - To disable math conceal with LaTeX math syntax enabled, add the following - to your '.vimrc': -> - let g:tex_conceal = "" - let g:vim_markdown_math = 1 -< - *g:vim_markdown_conceal_code_blocks* -- 'g:vim_markdown_conceal_code_blocks' - - Disabling conceal for code fences requires an additional setting: -> - let g:vim_markdown_conceal_code_blocks = 0 -< -------------------------------------------------------------------------------- - *vim-markdown-fenced-code-block-languages* -Fenced code block languages ~ - - *g:vim_markdown_fenced_languages* -- 'g:vim_markdown_fenced_languages' - - You can use filetype name as fenced code block languages for syntax - highlighting. If you want to use different name from filetype, you can add - it in your '.vimrc' like so: -> - let g:vim_markdown_fenced_languages = ['csharp=cs'] -< - This will cause the following to be highlighted using the 'cs' filetype - syntax. -> - ```csharp - ... - ``` -< - Default is "['c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini']". - -------------------------------------------------------------------------------- - *vim-markdown-follow-named-anchors* -Follow named anchors ~ - - *g:vim_markdown_follow_anchor* -- 'g:vim_markdown_follow_anchor' - - This feature allows the 'ge' command to follow named anchors in links of - the form 'file#anchor' or just '#anchor', where file may omit the '.md' - extension as usual. Two variables control its operation: -> - let g:vim_markdown_follow_anchor = 1 -< - This tells vim-markdown whether to attempt to follow a named anchor in a - link or not. When it is 1, and only if a link can be split in two parts by - the pattern '#', then the first part is interpreted as the file and the - second one as the named anchor. This also includes urls of the form - '#anchor', for which the first part is considered empty, meaning that the - target file is the current one. After the file is opened, the anchor will - be searched. - - Default is '0'. - - *g:vim_markdown_anchorexpr* -- 'g:vim_markdown_anchorexpr' -> - let g:vim_markdown_anchorexpr = "'<<'.v:anchor.'>>'" -< - This expression will be evaluated substituting 'v:anchor' with a quoted - string that contains the anchor to visit. The result of the evaluation will - become the real anchor to search in the target file. This is useful in - order to convert anchors of the form, say, 'my-section-title' to searches - of the form 'My Section Title' or '<>'. - - Default is "''". - -------------------------------------------------------------------------------- - *vim-markdown-syntax-extensions* -Syntax extensions ~ - -The following options control which syntax extensions will be turned on. They -are off by default. - -------------------------------------------------------------------------------- - *vim-markdown-latex-math* -LaTeX math ~ - - *g:vim_markdown_math* -- 'g:vim_markdown_math' - - Used as '$x^2$', '$$x^2$$', escapable as '\$x\$' and '\$\$x\$\$'. -> - let g:vim_markdown_math = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-yaml-front-matter* -YAML Front Matter ~ - - *g:vim_markdown_frontmatter* -- 'g:vim_markdown_frontmatter' - - Highlight YAML front matter as used by Jekyll or Hugo [7]. -> - let g:vim_markdown_frontmatter = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-toml-front-matter* -TOML Front Matter ~ - - *g:vim_markdown_toml_frontmatter* -- 'g:vim_markdown_toml_frontmatter' - - Highlight TOML front matter as used by Hugo [7]. - - TOML syntax highlight requires vim-toml [8]. -> - let g:vim_markdown_toml_frontmatter = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-json-front-matter* -JSON Front Matter ~ - - *g:vim_markdown_json_frontmatter* -- 'g:vim_markdown_json_frontmatter' - - Highlight JSON front matter as used by Hugo [7]. - - JSON syntax highlight requires vim-json [9]. -> - let g:vim_markdown_json_frontmatter = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-strikethrough* -Strikethrough ~ - - *g:vim_markdown_strikethrough* -- 'g:vim_markdown_strikethrough' - - Strikethrough uses two tildes. '~~Scratch this.~~' -> - let g:vim_markdown_strikethrough = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-adjust-new-list-item-indent* -Adjust new list item indent ~ - - *g:vim_markdown_new_list_item_indent* -- 'g:vim_markdown_new_list_item_indent' - - You can adjust a new list indent. For example, you insert a single line - like below: -> - * item1 -< - Then if you type 'o' to insert new line in vim and type '* item2', the - result will be: -> - * item1 - * item2 -< - vim-markdown automatically insert the indent. By default, the number of - spaces of indent is 4. If you'd like to change the number as 2, just write: -> - let g:vim_markdown_new_list_item_indent = 2 -< -------------------------------------------------------------------------------- - *vim-markdown-do-not-require-.md-extensions-for-markdown-links* -Do not require .md extensions for Markdown links ~ - - *g:vim_markdown_no_extensions_in_markdown* -- 'g:vim_markdown_no_extensions_in_markdown' - - If you want to have a link like this '[link text](link-url)' and follow it - for editing in vim using the 'ge' command, but have it open the file "link- - url.md" instead of the file "link-url", then use this option: -> - let g:vim_markdown_no_extensions_in_markdown = 1 -< - This is super useful for GitLab and GitHub wiki repositories. - - Normal behaviour would be that vim-markup required you to do this '[link - text](link-url.md)', but this is not how the Gitlab and GitHub wiki - repositories work. So this option adds some consistency between the two. - -------------------------------------------------------------------------------- - *vim-markdown-auto-write-when-following-link* -Auto-write when following link ~ - - *g:vim_markdown_autowrite* -- 'g:vim_markdown_autowrite' - - If you follow a link like this '[link text](link-url)' using the 'ge' - shortcut, this option will automatically save any edits you made before - moving you: -> - let g:vim_markdown_autowrite = 1 -< -------------------------------------------------------------------------------- - *vim-markdown-change-default-file-extension* -Change default file extension ~ - - *g:vim_markdown_auto_extension_ext* -- 'g:vim_markdown_auto_extension_ext' - - If you would like to use a file extension other than '.md' you may do so - using the 'vim_markdown_auto_extension_ext' variable: -> - let g:vim_markdown_auto_extension_ext = 'txt' -< -------------------------------------------------------------------------------- - *vim-markdown-do-not-automatically-insert-bulletpoints* -Do not automatically insert bulletpoints ~ - - *g:vim_markdown_auto_insert_bullets* -- 'g:vim_markdown_auto_insert_bullets' - - Automatically inserting bulletpoints can lead to problems when wrapping - text (see issue #232 for details), so it can be disabled: -> - let g:vim_markdown_auto_insert_bullets = 0 -< - In that case, you probably also want to set the new list item indent to 0 - as well, or you will have to remove an indent each time you add a new list - item: -> - let g:vim_markdown_new_list_item_indent = 0 -< -------------------------------------------------------------------------------- - *vim-markdown-change-how-to-open-new-files* -Change how to open new files ~ - - *g:vim_markdown_edit_url_in* -- 'g:vim_markdown_edit_url_in' - - By default when following a link the target file will be opened in your - current buffer. This behavior can change if you prefer using splits or tabs - by using the 'vim_markdown_edit_url_in' variable. Possible values are - 'tab', 'vsplit', 'hsplit', 'current' opening in a new tab, vertical split, - horizontal split, and current buffer respectively. Defaults to current - buffer if not set: -> - let g:vim_markdown_edit_url_in = 'tab' -< -=============================================================================== - *vim-markdown-mappings* -Mappings ~ - -The following work on normal and visual modes: - - *vim-markdown-gx* -- 'gx': open the link under the cursor in the same browser as the standard - 'gx' command. 'Markdown_OpenUrlUnderCursor' - - The standard 'gx' is extended by allowing you to put your cursor anywhere - inside a link. - - For example, all the following cursor positions will work: -> - [Example](http://example.com) - ^ ^ ^^ ^ ^ - 1 2 34 5 6 - - - ^ ^ ^ - 1 2 3 -< - Known limitation: does not work for links that span multiple lines. - - *vim-markdown-ge* -- 'ge': open the link under the cursor in Vim for editing. Useful for - relative markdown links. 'Markdown_EditUrlUnderCursor' - - The rules for the cursor position are the same as the 'gx' command. - - *vim-markdown-]]* -- ']]': go to next header. 'Markdown_MoveToNextHeader' - - *vim-markdown-[[* -- '[[': go to previous header. Contrast with ']c'. - 'Markdown_MoveToPreviousHeader' - - *vim-markdown-][* -- '][': go to next sibling header if any. - 'Markdown_MoveToNextSiblingHeader' - - *vim-markdown-[]* -- '[]': go to previous sibling header if any. - 'Markdown_MoveToPreviousSiblingHeader' - - *vim-markdown-]c* -- ']c': go to Current header. 'Markdown_MoveToCurHeader' - - *vim-markdown-]u* -- ']u': go to parent header (Up). 'Markdown_MoveToParentHeader' - -This plugin follows the recommended Vim plugin mapping interface, so to change -the map ']u' to 'asdf', add to your '.vimrc': -> - map asdf Markdown_MoveToParentHeader -< -To disable a map use: -> - map Markdown_MoveToParentHeader -< -=============================================================================== - *vim-markdown-commands* -Commands ~ - -The following requires ':filetype plugin on'. - - *:HeaderDecrease* -- ':HeaderDecrease': - - Decrease level of all headers in buffer: 'h2' to 'h1', 'h3' to 'h2', etc. - - If range is given, only operate in the range. - - If an 'h1' would be decreased, abort. - - For simplicity of implementation, Setex headers are converted to Atx. - - *:HeaderIncrease* -- ':HeaderIncrease': Analogous to ':HeaderDecrease', but increase levels - instead. - - *:SetexToAtx* -- ':SetexToAtx': - - Convert all Setex style headers in buffer to Atx. - - If a range is given, e.g. hit ':' from visual mode, only operate on the - range. - - *:TableFormat* -- ':TableFormat': Format the table under the cursor like this [10]. - - Requires Tabular [11]. - - The input table _must_ already have a separator line as the second line of - the table. That line only needs to contain the correct pipes '|', nothing - else is required. - - *:Toc* -- ':Toc': create a quickfix vertical window navigable table of contents with - the headers. - - Hit '' on a line to jump to the corresponding line of the markdown - file. - - *:Toch* -- ':Toch': Same as ':Toc' but in an horizontal window. - - *:Toct* -- ':Toct': Same as ':Toc' but in a new tab. - - *:Tocv* -- ':Tocv': Same as ':Toc' for symmetry with ':Toch' and ':Tocv'. - -=============================================================================== - *vim-markdown-credits* -Credits ~ - -The main contributors of vim-markdown are: - -- **Ben Williams** (A.K.A. **plasticboy**). The original developer of vim- - markdown. Homepage [12]. - -If you feel that your name should be on this list, please make a pull request -listing your contributions. - -=============================================================================== - *vim-markdown-license* -License ~ - -The MIT License (MIT) - -Copyright (c) 2012 Benjamin D. Williams - -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. - -=============================================================================== - *vim-markdown-references* -References ~ - -[1] http://daringfireball.net/projects/markdown/ -[2] https://github.com/gmarik/vundle -[3] https://github.com/tpope/vim-pathogen -[4] http://packages.qa.debian.org/v/vim-addon-manager.html -[5] https://github.com/plasticboy/vim-markdown/archive/master.tar.gz -[6] https://github.com/klen/python-mode -[7] https://gohugo.io/content/front-matter/ -[8] https://github.com/cespare/vim-toml -[9] https://github.com/elzr/vim-json -[10] http://www.cirosantilli.com/markdown-style-guide/#tables -[11] https://github.com/godlygeek/tabular -[12] http://plasticboy.com/ - -vim: ft=help - -endif diff --git a/doc/vim-raml.txt b/doc/vim-raml.txt deleted file mode 100644 index ea26798c4..000000000 --- a/doc/vim-raml.txt +++ /dev/null @@ -1,64 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raml') == -1 - -# vim-raml -Vim syntax and language settings for RAML - -About ---- -vim-raml is a superset of Vim's own syntax settings for YAML, as RAML itself -is a superset of YAML. Obviously, filetype detection is provided for RAML -files as well to make use of the expanded syntax, as well language formatting -defaults. - -You'll notice several changes over using the default YAML syntax file: - - The RAML version header, manditory in RAML now stands out brightly, - rather than looking like a comment. - - Parameter interpolation i.e. ```<>``` is highlighted inside of blocks - and values. - - Delimiters and blocks i.e. ```-, |, etc``` are consistently highlighted - (flaky in YAML). - - HTTP verbs, response codes, data types, and route definitions are all - colored separately from regular keys to help immediately distingush - different levels of the data structure. - - HTTP verbs include all that are supported by RAML: get, post, put, delete, - head, patch, and options - - Response codes e.g. 200, 201, 404, 401, etc are colored like numbers - (for obvious reasons) - - Data types e.g. ```type: integer```. Supports all RAML datatypes. string, - number, integer, date, boolean, and file. - - Route definitions: these include ```/posts:``` or ```/{id}:``` - -Installation ---- -vim-raml doesn't have any strange or esoteric requirements. -Provided you're using Vundle, Pathogen or any of the other standard Vim -plugin managers. You can install vim-raml exactly how you'd expect. - -For completeness, to install via Vundle just add the following into your -.vimrc with your other plugins - -Plugin '.../.../' -Plugin 'IN3D/vim-raml' -Plugin '.../.../' - -Then run: - -:source % -:PluginInstall - - -Or for Pathogen: - -cd ~/.vim/bundle -git clone https://github.com/IN3D/vim-raml.git - -And Pathogen should pick it up the next time Vim is started. - - -Questions, suggestions, and issues ---- -If you have a question, suggestion, or have found an issue with vim-raml. -The best way to bring it to my attention is to open an issue at -https://github.com/IN3D/vim-raml/issues - -endif diff --git a/extras/filetype.vim b/extras/filetype.vim new file mode 100644 index 000000000..3da520b42 --- /dev/null +++ b/extras/filetype.vim @@ -0,0 +1,2523 @@ +" Vim support file to detect file types +" +" Maintainer: Bram Moolenaar +" Last Change: 2022 Jan 31 + +" Listen very carefully, I will say this only once +if exists("did_load_filetypes") + finish +endif +let did_load_filetypes = 1 + +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +augroup filetypedetect + +" Ignored extensions +if exists("*fnameescape") +au BufNewFile,BufRead ?\+.orig,?\+.bak,?\+.old,?\+.new,?\+.dpkg-dist,?\+.dpkg-old,?\+.dpkg-new,?\+.dpkg-bak,?\+.rpmsave,?\+.rpmnew,?\+.pacsave,?\+.pacnew + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) +au BufNewFile,BufRead *~ + \ let s:name = expand("") | + \ let s:short = substitute(s:name, '\~$', '', '') | + \ if s:name != s:short && s:short != "" | + \ exe "doau filetypedetect BufRead " . fnameescape(s:short) | + \ endif | + \ unlet! s:name s:short +au BufNewFile,BufRead ?\+.in + \ if expand(":t") != "configure.in" | + \ exe "doau filetypedetect BufRead " . fnameescape(expand(":r")) | + \ endif +elseif &verbose > 0 + echomsg "Warning: some filetypes will not be recognized because this version of Vim does not have fnameescape()" +endif + +" Pattern used to match file names which should not be inspected. +" Currently finds compressed files. +if !exists("g:ft_ignore_pat") + let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$' +endif + +" Function used for patterns that end in a star: don't set the filetype if the +" file name matches ft_ignore_pat. +" When using this, the entry should probably be further down below with the +" other StarSetf() calls. +func! s:StarSetf(ft) + if expand("") !~ g:ft_ignore_pat + exe 'setf ' . a:ft + endif +endfunc + +" Vim help file +au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help + +" Abaqus or Trasys +au BufNewFile,BufRead *.inp call polyglot#ft#Check_inp() + +" 8th (Firth-derivative) +au BufNewFile,BufRead *.8th setf 8th + +" A-A-P recipe +au BufNewFile,BufRead *.aap setf aap + +" A2ps printing utility +au BufNewFile,BufRead */etc/a2ps.cfg,*/etc/a2ps/*.cfg,a2psrc,.a2psrc setf a2ps + +" ABAB/4 +au BufNewFile,BufRead *.abap setf abap + +" ABC music notation +au BufNewFile,BufRead *.abc setf abc + +" ABEL +au BufNewFile,BufRead *.abl setf abel + +" AceDB +au BufNewFile,BufRead *.wrm setf acedb + +" Ada (83, 9X, 95) +au BufNewFile,BufRead *.adb,*.ads,*.ada setf ada +if has("vms") + au BufNewFile,BufRead *.gpr,*.ada_m,*.adc setf ada +else + au BufNewFile,BufRead *.gpr setf ada +endif + +" AHDL +au BufNewFile,BufRead *.tdf setf ahdl + +" AIDL +au BufNewFile,BufRead *.aidl setf aidl + +" AMPL +au BufNewFile,BufRead *.run setf ampl + +" Ant +au BufNewFile,BufRead build.xml setf ant + +" Arduino +au BufNewFile,BufRead *.ino,*.pde setf arduino + +" Apache config file +au BufNewFile,BufRead .htaccess,*/etc/httpd/*.conf setf apache +au BufNewFile,BufRead */etc/apache2/sites-*/*.com setf apache + +" XA65 MOS6510 cross assembler +au BufNewFile,BufRead *.a65 setf a65 + +" Applescript +au BufNewFile,BufRead *.scpt setf applescript + +" Applix ELF +au BufNewFile,BufRead *.am + \ if expand("") !~? 'Makefile.am\>' | setf elf | endif + +" ALSA configuration +au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf + +" Arc Macro Language +au BufNewFile,BufRead *.aml setf aml + +" APT config file +au BufNewFile,BufRead apt.conf setf aptconf +au BufNewFile,BufRead */.aptitude/config setf aptconf +" more generic pattern far down + +" Arch Inventory file +au BufNewFile,BufRead .arch-inventory,=tagging-method setf arch + +" ART*Enterprise (formerly ART-IM) +au BufNewFile,BufRead *.art setf art + +" AsciiDoc +au BufNewFile,BufRead *.asciidoc,*.adoc setf asciidoc + +" ASN.1 +au BufNewFile,BufRead *.asn,*.asn1 setf asn + +" Active Server Pages (with Visual Basic Script) +au BufNewFile,BufRead *.asa + \ if exists("g:filetype_asa") | + \ exe "setf " . g:filetype_asa | + \ else | + \ setf aspvbs | + \ endif + +" Active Server Pages (with Perl or Visual Basic Script) +au BufNewFile,BufRead *.asp + \ if exists("g:filetype_asp") | + \ exe "setf " . g:filetype_asp | + \ elseif getline(1) . getline(2) . getline(3) =~? "perlscript" | + \ setf aspperl | + \ else | + \ setf aspvbs | + \ endif + +" Grub (must be before catch *.lst) +au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub + +" 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 polyglot#ft#FTasm() + +" Macro (VAX) +au BufNewFile,BufRead *.mar setf vmasm + +" Atlas +au BufNewFile,BufRead *.atl,*.as setf atlas + +" Atom is based on XML +au BufNewFile,BufRead *.atom setf xml + +" Autoit v3 +au BufNewFile,BufRead *.au3 setf autoit + +" Autohotkey +au BufNewFile,BufRead *.ahk setf autohotkey + +" Automake +au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake + +" Autotest .at files are actually m4 +au BufNewFile,BufRead *.at setf m4 + +" Avenue +au BufNewFile,BufRead *.ave setf ave + +" Awk +au BufNewFile,BufRead *.awk,*.gawk setf awk + +" B +au BufNewFile,BufRead *.mch,*.ref,*.imp setf b + +" BASIC or Visual Basic +au BufNewFile,BufRead *.bas call polyglot#ft#FTbas() +au BufNewFile,BufRead *.bi,*.bm call polyglot#ft#FTbas() + +" Visual Basic Script (close to Visual Basic) or Visual Basic .NET +au BufNewFile,BufRead *.vb,*.vbs,*.dsm,*.ctl setf vb + +" IBasic file (similar to QBasic) +au BufNewFile,BufRead *.iba,*.ibi setf ibasic + +" FreeBasic file (similar to QBasic) +au BufNewFile,BufRead *.fb setf freebasic + +" Batch file for MSDOS. +au BufNewFile,BufRead *.bat,*.sys setf dosbatch +" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd. +au BufNewFile,BufRead *.cmd + \ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif + +" Batch file for 4DOS +au BufNewFile,BufRead *.btm call polyglot#ft#FTbtm() + +" BC calculator +au BufNewFile,BufRead *.bc setf bc + +" BDF font +au BufNewFile,BufRead *.bdf setf bdf + +" Beancount +au BufNewFile,BufRead *.beancount setf beancount + +" BibTeX bibliography database file +au BufNewFile,BufRead *.bib setf bib + +" BibTeX Bibliography Style +au BufNewFile,BufRead *.bst setf bst + +" BIND configuration +" sudoedit uses namedXXXX.conf +au BufNewFile,BufRead named*.conf,rndc*.conf,rndc*.key setf named + +" BIND zone +au BufNewFile,BufRead named.root setf bindzone +au BufNewFile,BufRead *.db call polyglot#ft#BindzoneCheck('') + +" Blank +au BufNewFile,BufRead *.bl setf blank + +" Blkid cache file +au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml + +" BSDL +au BufNewFile,BufRead *bsd,*.bsdl setf bsdl + +" Bazel (http://bazel.io) +autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl +if has("fname_case") + " There is another check for BUILD further below. + autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl +endif + +" C or lpc +au BufNewFile,BufRead *.c call polyglot#ft#FTlpc() +au BufNewFile,BufRead *.lpc,*.ulpc setf lpc + +" Calendar +au BufNewFile,BufRead calendar setf calendar + +" C# +au BufNewFile,BufRead *.cs,*.csx setf cs + +" CSDL +au BufNewFile,BufRead *.csdl setf csdl + +" Cabal +au BufNewFile,BufRead *.cabal setf cabal + +" Cdrdao TOC +au BufNewFile,BufRead *.toc setf cdrtoc + +" Cdrdao config +au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf + +" Cfengine +au BufNewFile,BufRead cfengine.conf setf cfengine + +" ChaiScript +au BufRead,BufNewFile *.chai setf chaiscript + +" Comshare Dimension Definition Language +au BufNewFile,BufRead *.cdl setf cdl + +" Conary Recipe +au BufNewFile,BufRead *.recipe setf conaryrecipe + +" Controllable Regex Mutilator +au BufNewFile,BufRead *.crm setf crm + +" Cyn++ +au BufNewFile,BufRead *.cyn setf cynpp + +" Cynlib +" .cc and .cpp files can be C++ or Cynlib. +au BufNewFile,BufRead *.cc + \ if exists("cynlib_syntax_for_cc")|setf cynlib|else|setf cpp|endif +au BufNewFile,BufRead *.cpp + \ if exists("cynlib_syntax_for_cpp")|setf cynlib|else|setf cpp|endif + +" C++ +au BufNewFile,BufRead *.cxx,*.c++,*.hh,*.hxx,*.hpp,*.ipp,*.moc,*.tcc,*.inl setf cpp +if has("fname_case") + au BufNewFile,BufRead *.C,*.H setf cpp +endif + +" .h files can be C, Ch C++, ObjC or ObjC++. +" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is +" detected automatically. +au BufNewFile,BufRead *.h call polyglot#ft#FTheader() + +" Ch (CHscript) +au BufNewFile,BufRead *.chf setf ch + +" TLH files are C++ headers generated by Visual C++'s #import from typelibs +au BufNewFile,BufRead *.tlh setf cpp + +" Cascading Style Sheets +au BufNewFile,BufRead *.css setf css + +" Century Term Command Scripts (*.cmd too) +au BufNewFile,BufRead *.con setf cterm + +" Changelog +au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog + \ setf debchangelog + +au BufNewFile,BufRead [cC]hange[lL]og + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| else + \| setf changelog + \| endif + +au BufNewFile,BufRead NEWS + \ if getline(1) =~ '; urgency=' + \| setf debchangelog + \| endif + +" CHILL +au BufNewFile,BufRead *..ch setf chill + +" Changes for WEB and CWEB or CHILL +au BufNewFile,BufRead *.ch call polyglot#ft#FTchange() + +" ChordPro +au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro + +" Clean +au BufNewFile,BufRead *.dcl,*.icl setf clean + +" Clever +au BufNewFile,BufRead *.eni setf cl + +" Clever or dtd +au BufNewFile,BufRead *.ent call polyglot#ft#FTent() + +" Clipper (or FoxPro; could also be eviews) +au BufNewFile,BufRead *.prg + \ if exists("g:filetype_prg") | + \ exe "setf " . g:filetype_prg | + \ else | + \ setf clipper | + \ endif + +" Clojure +au BufNewFile,BufRead *.clj,*.cljs,*.cljx,*.cljc setf clojure + +" Cmake +au BufNewFile,BufRead CMakeLists.txt,*.cmake,*.cmake.in setf cmake + +" Cmusrc +au BufNewFile,BufRead */.cmus/{autosave,rc,command-history,*.theme} setf cmusrc +au BufNewFile,BufRead */cmus/{rc,*.theme} setf cmusrc + +" Cobol +au BufNewFile,BufRead *.cbl,*.cob,*.lib setf cobol +" cobol or zope form controller python script? (heuristic) +au BufNewFile,BufRead *.cpy + \ if getline(1) =~ '^##' | + \ setf python | + \ else | + \ setf cobol | + \ endif + +" Coco/R +au BufNewFile,BufRead *.atg setf coco + +" Cold Fusion +au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf + +" Configure scripts +au BufNewFile,BufRead configure.in,configure.ac setf config + +" CUDA Compute Unified Device Architecture +au BufNewFile,BufRead *.cu,*.cuh setf cuda + +" Dockerfile; Podman uses the same syntax with name Containerfile +" Also see Dockerfile.* below. +au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile + +" WildPackets EtherPeek Decoder +au BufNewFile,BufRead *.dcd setf dcd + +" Enlightenment configuration files +au BufNewFile,BufRead *enlightenment/*.cfg setf c + +" Eterm +au BufNewFile,BufRead *Eterm/*.cfg setf eterm + +" Elixir or Euphoria +au BufNewFile,BufRead *.ex call polyglot#ft#ExCheck() + +" Elixir +au BufRead,BufNewFile mix.lock,*.exs setf elixir +au BufRead,BufNewFile *.eex,*.leex setf eelixir + +" Euphoria 3 or 4 +au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call polyglot#ft#EuphoriaCheck() +if has("fname_case") + au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call polyglot#ft#EuphoriaCheck() +endif + +" Lynx config files +au BufNewFile,BufRead lynx.cfg setf lynx + +" Modula-3 configuration language (must be before *.cfg and *makefile) +au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake +au BufNewFile,BufRead m3makefile,m3overrides setf m3build + +" Quake +au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake +au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake + +" Quake C +au BufNewFile,BufRead *.qc setf c + +" Configure files +au BufNewFile,BufRead *.cfg setf cfg + +" Cucumber +au BufNewFile,BufRead *.feature setf cucumber + +" Communicating Sequential Processes +au BufNewFile,BufRead *.csp,*.fdr setf csp + +" CUPL logic description and simulation +au BufNewFile,BufRead *.pld setf cupl +au BufNewFile,BufRead *.si setf cuplsim + +" Dart +au BufRead,BufNewfile *.dart,*.drt setf dart + +" Debian Control +au BufNewFile,BufRead */debian/control setf debcontrol +au BufNewFile,BufRead control + \ if getline(1) =~ '^Source:' + \| setf debcontrol + \| endif + +" Debian Copyright +au BufNewFile,BufRead */debian/copyright setf debcopyright +au BufNewFile,BufRead copyright + \ if getline(1) =~ '^Format:' + \| setf debcopyright + \| endif + +" Debian Sources.list +au BufNewFile,BufRead */etc/apt/sources.list setf debsources +au BufNewFile,BufRead */etc/apt/sources.list.d/*.list setf debsources + +" Deny hosts +au BufNewFile,BufRead denyhosts.conf setf denyhosts + +" dnsmasq(8) configuration files +au BufNewFile,BufRead */etc/dnsmasq.conf setf dnsmasq + +" ROCKLinux package description +au BufNewFile,BufRead *.desc setf desc + +" the D language or dtrace +au BufNewFile,BufRead *.d call polyglot#ft#DtraceCheck() + +" Desktop files +au BufNewFile,BufRead *.desktop,*.directory setf desktop + +" Dict config +au BufNewFile,BufRead dict.conf,.dictrc setf dictconf + +" Dictd config +au BufNewFile,BufRead dictd*.conf setf dictdconf + +" DEP3 formatted patch files +au BufNewFile,BufRead */debian/patches/* call polyglot#ft#Dep3patch() + +" Diff files +au BufNewFile,BufRead *.diff,*.rej setf diff +au BufNewFile,BufRead *.patch + \ if getline(1) =~# '^From [0-9a-f]\{40,\} Mon Sep 17 00:00:00 2001$' | + \ setf gitsendemail | + \ else | + \ setf diff | + \ endif + +" Dircolors +au BufNewFile,BufRead .dir_colors,.dircolors,*/etc/DIR_COLORS setf dircolors + +" Diva (with Skill) or InstallShield +au BufNewFile,BufRead *.rul + \ if getline(1).getline(2).getline(3).getline(4).getline(5).getline(6) =~? 'InstallShield' | + \ setf ishd | + \ else | + \ setf diva | + \ endif + +" DCL (Digital Command Language - vms) or DNS zone file +au BufNewFile,BufRead *.com call polyglot#ft#BindzoneCheck('dcl') + +" DOT +au BufNewFile,BufRead *.dot,*.gv setf dot + +" Dune +au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune + +" Dylan - lid files +au BufNewFile,BufRead *.lid setf dylanlid + +" Dylan - intr files (melange) +au BufNewFile,BufRead *.intr setf dylanintr + +" Dylan +au BufNewFile,BufRead *.dylan setf dylan + +" Microsoft Module Definition +au BufNewFile,BufRead *.def setf def + +" Dracula +au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe setf dracula + +" Datascript +au BufNewFile,BufRead *.ds setf datascript + +" dsl: DSSSL or Structurizr +au BufNewFile,BufRead *.dsl + \ if getline(1) =~ '^\s*<\!' | + \ setf dsl | + \ else | + \ setf structurizr | + \ endif + +" DTD (Document Type Definition for XML) +au BufNewFile,BufRead *.dtd setf dtd + +" DTS/DSTI (device tree files) +au BufNewFile,BufRead *.dts,*.dtsi setf dts + +" EDIF (*.edf,*.edif,*.edn,*.edo) or edn +au BufNewFile,BufRead *.ed\(f\|if\|o\) setf edif +au BufNewFile,BufRead *.edn + \ if getline(1) =~ '^\s*(\s*edif\>' | + \ setf edif | + \ else | + \ setf clojure | + \ endif + +" EditorConfig (close enough to dosini) +au BufNewFile,BufRead .editorconfig setf dosini + +" Embedix Component Description +au BufNewFile,BufRead *.ecd setf ecd + +" Eiffel or Specman or Euphoria +au BufNewFile,BufRead *.e,*.E call polyglot#ft#FTe() + +" Elinks configuration +au BufNewFile,BufRead elinks.conf setf elinks + +" ERicsson LANGuage; Yaws is erlang too +au BufNewFile,BufRead *.erl,*.hrl,*.yaws setf erlang + +" Elm +au BufNewFile,BufRead *.elm setf elm + +" Elm Filter Rules file +au BufNewFile,BufRead filter-rules setf elmfilt + +" ESMTP rc file +au BufNewFile,BufRead *esmtprc setf esmtprc + +" ESQL-C +au BufNewFile,BufRead *.ec,*.EC setf esqlc + +" Esterel +au BufNewFile,BufRead *.strl setf esterel + +" Essbase script +au BufNewFile,BufRead *.csc setf csc + +" Exim +au BufNewFile,BufRead exim.conf setf exim + +" Expect +au BufNewFile,BufRead *.exp setf expect + +" Exports +au BufNewFile,BufRead exports setf exports + +" Falcon +au BufNewFile,BufRead *.fal setf falcon + +" Fantom +au BufNewFile,BufRead *.fan,*.fwt setf fan + +" Factor +au BufNewFile,BufRead *.factor setf factor + +" Fennel +autocmd BufRead,BufNewFile *.fnl setf fennel + +" Fetchmail RC file +au BufNewFile,BufRead .fetchmailrc setf fetchmail + +" Fish shell +au BufNewFile,BufRead *.fish setf fish + +" FlexWiki - disabled, because it has side effects when a .wiki file +" is not actually FlexWiki +"au BufNewFile,BufRead *.wiki setf flexwiki + +" Focus Executable +au BufNewFile,BufRead *.fex,*.focexec setf focexec + +" Focus Master file (but not for auto.master) +au BufNewFile,BufRead auto.master setf conf +au BufNewFile,BufRead *.mas,*.master setf master + +" Forth +au BufNewFile,BufRead *.ft,*.fth setf forth + +" Reva Forth +au BufNewFile,BufRead *.frt setf reva + +" Fortran +if has("fname_case") + au BufNewFile,BufRead *.F,*.FOR,*.FPP,*.FTN,*.F77,*.F90,*.F95,*.F03,*.F08 setf fortran +endif +au BufNewFile,BufRead *.f,*.for,*.fortran,*.fpp,*.ftn,*.f77,*.f90,*.f95,*.f03,*.f08 setf fortran + +" Framescript +au BufNewFile,BufRead *.fsl setf framescript + +" FStab +au BufNewFile,BufRead fstab,mtab setf fstab + +" Fusion +au BufRead,BufNewFile *.fusion setf fusion + +" F# or Forth +au BufNewFile,BufRead *.fs call polyglot#ft#FTfs() + +" F# +au BufNewFile,BufRead *.fsi,*.fsx setf fsharp + +" GDB command files +au BufNewFile,BufRead .gdbinit,gdbinit setf gdb + +" GDMO +au BufNewFile,BufRead *.mo,*.gdmo setf gdmo + +" GDscript +au BufNewFile,BufRead *.gd setf gdscript + +" Godot resource +au BufRead,BufNewFile *.tscn,*.tres setf gdresource + +" Gedcom +au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom + +" Gemtext +au BufNewFile,BufRead *.gmi,*.gemini setf gemtext + +" Gift (Moodle) +autocmd BufRead,BufNewFile *.gift setf gift + +" Git +au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit +au BufNewFile,BufRead NOTES_EDITMSG,EDIT_DESCRIPTION setf gitcommit +au BufNewFile,BufRead *.git/config,.gitconfig,*/etc/gitconfig setf gitconfig +au BufNewFile,BufRead */.config/git/config setf gitconfig +au BufNewFile,BufRead *.git/config.worktree setf gitconfig +au BufNewFile,BufRead *.git/worktrees/*/config.worktree setf gitconfig +au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig +if !empty($XDG_CONFIG_HOME) + au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig +endif +au BufNewFile,BufRead git-rebase-todo setf gitrebase +au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail +au BufNewFile,BufRead *.git/* + \ if getline(1) =~# '^\x\{40,\}\>\|^ref: ' | + \ setf git | + \ endif + +" Gkrellmrc +au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc + +" GLSL +au BufNewFile,BufRead *.glsl setf glsl + +" GP scripts (2.0 and onward) +au BufNewFile,BufRead *.gp,.gprc setf gp + +" GPG +au BufNewFile,BufRead */.gnupg/options setf gpg +au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg +au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg +if !empty($GNUPGHOME) + au BufNewFile,BufRead $GNUPGHOME/options setf gpg + au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg +endif + +" gnash(1) configuration files +au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash + +" Gitolite +au BufNewFile,BufRead gitolite.conf setf gitolite +au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl + +" Gnuplot scripts +au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot + +" Go (Google) +au BufNewFile,BufRead *.go setf go +au BufNewFile,BufRead Gopkg.lock setf toml +au BufRead,BufNewFile go.work setf gowork + +" GrADS scripts +au BufNewFile,BufRead *.gs setf grads + +" GraphQL +au BufNewFile,BufRead *.graphql,*.graphqls,*.gql setf graphql + +" Gretl +au BufNewFile,BufRead *.gretl setf gretl + +" Groovy +au BufNewFile,BufRead *.gradle,*.groovy setf groovy + +" GNU Server Pages +au BufNewFile,BufRead *.gsp setf gsp + +" Group file +au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/etc/gshadow-,*/etc/gshadow.edit,*/var/backups/group.bak,*/var/backups/gshadow.bak setf group + +" GTK RC +au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc + +" Hack +au BufRead,BufNewFile *.hack,*.hackpartial setf hack + +" Haml +au BufNewFile,BufRead *.haml setf haml + +" Hamster Classic | Playground files +au BufNewFile,BufRead *.hsm setf hamster + +" Handlebars +au BufNewFile,BufRead *.hbs setf handlebars + +" Haskell +au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell +au BufNewFile,BufRead *.lhs setf lhaskell +au BufNewFile,BufRead *.chs setf chaskell +au BufNewFile,BufRead cabal.project setf cabalproject +au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig +au BufNewFile,BufRead cabal.config setf cabalconfig + +" Haste +au BufNewFile,BufRead *.ht setf haste +au BufNewFile,BufRead *.htpp setf hastepreproc + +" HCL +au BufRead,BufNewFile *.hcl setf hcl + +" Hercules +au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules + +" HEEx +au BufRead,BufNewFile *.heex setf heex + +" HEX (Intel) +au BufNewFile,BufRead *.hex,*.h32 setf hex + +" Hjson +au BufNewFile,BufRead *.hjson setf hjson + +" Hollywood +au BufRead,BufNewFile *.hws setf hollywood + +" Tilde (must be before HTML) +au BufNewFile,BufRead *.t.html setf tilde + +" HTML (.shtml and .stm for server side) +au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call polyglot#ft#FThtml() + +" HTML with Ruby - eRuby +au BufNewFile,BufRead *.erb,*.rhtml setf eruby + +" HTML with M4 +au BufNewFile,BufRead *.html.m4 setf htmlm4 + +" Some template. Used to be HTML Cheetah. +au BufNewFile,BufRead *.tmpl setf template + +" Host config +au BufNewFile,BufRead */etc/host.conf setf hostconf + +" Hosts access +au BufNewFile,BufRead */etc/hosts.allow,*/etc/hosts.deny setf hostsaccess + +" Hyper Builder +au BufNewFile,BufRead *.hb setf hb + +" Httest +au BufNewFile,BufRead *.htt,*.htb setf httest + +" i3 (and sway) +au BufNewFile,BufRead */i3/config,*/sway/config setf i3config +au BufNewFile,BufRead */.i3/config,*/.sway/config setf i3config + +" Icon +au BufNewFile,BufRead *.icn setf icon + +" IDL (Interface Description Language) +au BufNewFile,BufRead *.idl call polyglot#ft#FTidl() + +" Microsoft IDL (Interface Description Language) Also *.idl +" MOF = WMI (Windows Management Instrumentation) Managed Object Format +au BufNewFile,BufRead *.odl,*.mof setf msidl + +" Icewm menu +au BufNewFile,BufRead */.icewm/menu setf icemenu + +" Indent profile (must come before IDL *.pro!) +au BufNewFile,BufRead .indent.pro setf indent +au BufNewFile,BufRead indent.pro call polyglot#ft#ProtoCheck('indent') + +" IDL (Interactive Data Language) +au BufNewFile,BufRead *.pro call polyglot#ft#ProtoCheck('idlang') + +" Indent RC +au BufNewFile,BufRead indentrc setf indent + +" Inform +au BufNewFile,BufRead *.inf,*.INF setf inform + +" Initng +au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng + +" Innovation Data Processing +au BufRead,BufNewFile upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat +au BufRead,BufNewFile fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog +au BufRead,BufNewFile upstreaminstall.log\c,upstreaminstall.*.log\c,*.upstreaminstall.log\c setf upstreaminstalllog +au BufRead,BufNewFile usserver.log\c,usserver.*.log\c,*.usserver.log\c setf usserverlog +au BufRead,BufNewFile usw2kagt.log\c,usw2kagt.*.log\c,*.usw2kagt.log\c setf usw2kagtlog + +" Ipfilter +au BufNewFile,BufRead ipf.conf,ipf6.conf,ipf.rules setf ipfilter + +" Informix 4GL (source - canonical, include file, I4GL+M4 preproc.) +au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl + +" .INI file for MSDOS +au BufNewFile,BufRead *.ini setf dosini + +" SysV Inittab +au BufNewFile,BufRead inittab setf inittab + +" Inno Setup +au BufNewFile,BufRead *.iss setf iss + +" J +au BufNewFile,BufRead *.ijs setf j + +" JAL +au BufNewFile,BufRead *.jal,*.JAL setf jal + +" Jam +au BufNewFile,BufRead *.jpl,*.jpr setf jam + +" Java +au BufNewFile,BufRead *.java,*.jav setf java + +" JavaCC +au BufNewFile,BufRead *.jj,*.jjt setf javacc + +" JavaScript, ECMAScript, ES module script, CommonJS script +au BufNewFile,BufRead *.js,*.javascript,*.es,*.mjs,*.cjs setf javascript + +" JavaScript with React +au BufNewFile,BufRead *.jsx setf javascriptreact + +" Java Server Pages +au BufNewFile,BufRead *.jsp setf jsp + +" Java Properties resource file (note: doesn't catch font.properties.pl) +au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties + +" Jess +au BufNewFile,BufRead *.clp setf jess + +" Jgraph +au BufNewFile,BufRead *.jgr setf jgraph + +" Jovial +au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial + +" JSON +au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json + +" JSON5 +au BufNewFile,BufRead *.json5 setf json5 + +" JSON Patch (RFC 6902) +au BufNewFile,BufRead *.json-patch setf json + +" Jupyter Notebook is also json +au BufNewFile,BufRead *.ipynb setf json + +" Other files that look like json +au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json + +" JSONC +au BufNewFile,BufRead *.jsonc setf jsonc + +" Julia +au BufNewFile,BufRead *.jl setf julia + +" Kixtart +au BufNewFile,BufRead *.kix setf kix + +" Kimwitu[++] +au BufNewFile,BufRead *.k setf kwt + +" Kivy +au BufNewFile,BufRead *.kv setf kivy + +" Kotlin +au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin + +" KDE script +au BufNewFile,BufRead *.ks setf kscript + +" Kconfig +au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig + +" Lace (ISE) +au BufNewFile,BufRead *.ace,*.ACE setf lace + +" Latte +au BufNewFile,BufRead *.latte,*.lte setf latte + +" Limits +au BufNewFile,BufRead */etc/limits,*/etc/*limits.conf,*/etc/*limits.d/*.conf setf limits + +" LambdaProlog (*.mod too, see Modsim) +au BufNewFile,BufRead *.sig setf lprolog + +" LDAP LDIF +au BufNewFile,BufRead *.ldif setf ldif + +" Ld loader +au BufNewFile,BufRead *.ld setf ld + +" Ledger +au BufRead,BufNewFile *.ldg,*.ledger,*.journal setf ledger + +" Less +au BufNewFile,BufRead *.less setf less + +" Lex +au BufNewFile,BufRead *.lex,*.l,*.lxx,*.l++ setf lex + +" Libao +au BufNewFile,BufRead */etc/libao.conf,*/.libao setf libao + +" Libsensors +au BufNewFile,BufRead */etc/sensors.conf,*/etc/sensors3.conf setf sensors + +" LFTP +au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp + +" Lifelines (or Lex for C++!) +au BufNewFile,BufRead *.ll setf lifelines + +" Lilo: Linux loader +au BufNewFile,BufRead lilo.conf setf lilo + +" Lisp (*.el = ELisp, *.cl = Common Lisp) +" *.jl was removed, it's also used for Julia, better skip than guess wrong. +if has("fname_case") + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,*.L,.emacs,.sawfishrc setf lisp +else + au BufNewFile,BufRead *.lsp,*.lisp,*.asd,*.el,*.cl,.emacs,.sawfishrc setf lisp +endif + +" SBCL implementation of Common Lisp +au BufNewFile,BufRead sbclrc,.sbclrc setf lisp + +" Liquid +au BufNewFile,BufRead *.liquid setf liquid + +" Lite +au BufNewFile,BufRead *.lite,*.lt setf lite + +" LiteStep RC files +au BufNewFile,BufRead */LiteStep/*/*.rc setf litestep + +" Login access +au BufNewFile,BufRead */etc/login.access setf loginaccess + +" Login defs +au BufNewFile,BufRead */etc/login.defs setf logindefs + +" Logtalk +au BufNewFile,BufRead *.lgt setf logtalk + +" LOTOS +au BufNewFile,BufRead *.lot,*.lotos setf lotos + +" Lout (also: *.lt) +au BufNewFile,BufRead *.lou,*.lout setf lout + +" Lua +au BufNewFile,BufRead *.lua setf lua + +" Luarocks +au BufNewFile,BufRead *.rockspec setf lua + +" Linden Scripting Language (Second Life) +au BufNewFile,BufRead *.lsl setf lsl + +" Lynx style file (or LotusScript!) +au BufNewFile,BufRead *.lss setf lss + +" M4 +au BufNewFile,BufRead *.m4 + \ if expand("") !~? 'html.m4$\|fvwm2rc' | setf m4 | endif + +" MaGic Point +au BufNewFile,BufRead *.mgp setf mgp + +" Mail (for Elm, trn, mutt, muttng, rn, slrn, neomutt) +au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,/tmp/SLRN[0-9A-Z.]\+,*.eml setf mail + +" Mail aliases +au BufNewFile,BufRead */etc/mail/aliases,*/etc/aliases setf mailaliases + +" Mailcap configuration file +au BufNewFile,BufRead .mailcap,mailcap setf mailcap + +" Makefile +au BufNewFile,BufRead *[mM]akefile,*.mk,*.mak,*.dsp setf make + +" MakeIndex +au BufNewFile,BufRead *.ist,*.mst setf ist + +" Mallard +au BufNewFile,BufRead *.page setf mallard + +" Manpage +au BufNewFile,BufRead *.man setf man + +" Man config +au BufNewFile,BufRead */etc/man.conf,man.config setf manconf + +" Maple V +au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple + +" Map (UMN mapserver config file) +au BufNewFile,BufRead *.map setf map + +" Markdown +au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md setf markdown + +" Mason +au BufNewFile,BufRead *.mason,*.mhtml,*.comp setf mason + +" Mathematica, Matlab, Murphi, Objective C or Octave +au BufNewFile,BufRead *.m call polyglot#ft#FTm() + +" Mathematica notebook +au BufNewFile,BufRead *.nb setf mma + +" Maya Extension Language +au BufNewFile,BufRead *.mel setf mel + +" Mercurial (hg) commit file +au BufNewFile,BufRead hg-editor-*.txt setf hgcommit + +" Mercurial config (looks like generic config file) +au BufNewFile,BufRead *.hgrc,*hgrc setf cfg + +" Meson Build system config +au BufNewFile,BufRead meson.build,meson_options.txt setf meson +au BufNewFile,BufRead *.wrap setf dosini + +" Messages (logs mostly) +au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages + +" Metafont +au BufNewFile,BufRead *.mf setf mf + +" MetaPost +au BufNewFile,BufRead *.mp setf mp + +" MGL +au BufNewFile,BufRead *.mgl setf mgl + +" MIX - Knuth assembly +au BufNewFile,BufRead *.mix,*.mixal setf mix + +" MMIX or VMS makefile +au BufNewFile,BufRead *.mms call polyglot#ft#FTmms() + +" Symbian meta-makefile definition (MMP) +au BufNewFile,BufRead *.mmp setf mmp + +" Modsim III (or LambdaProlog) +au BufNewFile,BufRead *.mod + \ if expand("") =~ '\' | + \ setf lprolog | + \ else | + \ setf modsim3 | + \ endif + +" Modula-2 (.md removed in favor of Markdown) +au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2 + +" Modula-3 (.m3, .i3, .mg, .ig) +au BufNewFile,BufRead *.[mi][3g] setf modula3 + +" Monk +au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk + +" MOO +au BufNewFile,BufRead *.moo setf moo + +" Modconf +au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf + +" MPD is based on XML +au BufNewFile,BufRead *.mpd setf xml + +" Mplayer config +au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf + +" Motorola S record +au BufNewFile,BufRead *.s19,*.s28,*.s37,*.mot,*.srec setf srec + +" Mrxvtrc +au BufNewFile,BufRead mrxvtrc,.mrxvtrc setf mrxvtrc + +" Msql +au BufNewFile,BufRead *.msql setf msql + +" Mysql +au BufNewFile,BufRead *.mysql setf mysql + +" Tcl Shell RC file +au BufNewFile,BufRead tclsh.rc setf tcl + +" M$ Resource files +" /etc/Muttrc.d/file.rc is muttrc +au BufNewFile,BufRead *.rc,*.rch + \ if expand("") !~ "/etc/Muttrc.d/" | + \ setf rc | + \ endif + +" MuPAD source +au BufRead,BufNewFile *.mu setf mupad + +" Mush +au BufNewFile,BufRead *.mush setf mush + +" Mutt setup file (also for Muttng) +au BufNewFile,BufRead Mutt{ng,}rc setf muttrc + +" N1QL +au BufRead,BufNewfile *.n1ql,*.nql setf n1ql + +" Nano +au BufNewFile,BufRead */etc/nanorc,*.nanorc setf nanorc + +" Nastran input/DMAP +"au BufNewFile,BufRead *.dat setf nastran + +" Natural +au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural + +" Noemutt setup file +au BufNewFile,BufRead Neomuttrc setf neomuttrc + +" Netrc +au BufNewFile,BufRead .netrc setf netrc + +" Nginx +au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/nginx/conf/*,*/nginx/*.conf setf nginx + +" Ninja file +au BufNewFile,BufRead *.ninja setf ninja + +" Nix +au BufRead,BufNewFile *.nix setf nix + +" NPM RC file +au BufNewFile,BufRead npmrc,.npmrc setf dosini + +" Novell netware batch files +au BufNewFile,BufRead *.ncf setf ncf + +" Nroff/Troff (*.ms and *.t are checked below) +au BufNewFile,BufRead *.me + \ if expand("") != "read.me" && expand("") != "click.me" | + \ setf nroff | + \ endif +au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff +au BufNewFile,BufRead *.[1-9] call polyglot#ft#FTnroff() + +" Nroff or Objective C++ +au BufNewFile,BufRead *.mm call polyglot#ft#FTmm() + +" Not Quite C +au BufNewFile,BufRead *.nqc setf nqc + +" NSE - Nmap Script Engine - uses Lua syntax +au BufNewFile,BufRead *.nse setf lua + +" NSIS +au BufNewFile,BufRead *.nsi,*.nsh setf nsis + +" OCaml +au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml + +" Occam +au BufNewFile,BufRead *.occ setf occam + +" Octave +au BufNewFile,BufRead octave.conf,.octaverc,octaverc setf octave + +" Omnimark +au BufNewFile,BufRead *.xom,*.xin setf omnimark + +" OPAM +au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam + +" OpenFOAM +au BufNewFile,BufRead [a-zA-Z0-9]*Dict\(.*\)\=,[a-zA-Z]*Properties\(.*\)\=,*Transport\(.*\),fvSchemes,fvSolution,fvConstrains,fvModels,*/constant/g,*/0\(\.orig\)\=/* call polyglot#ft#FTfoam() + +" OpenROAD +au BufNewFile,BufRead *.or setf openroad + +" OPL +au BufNewFile,BufRead *.[Oo][Pp][Ll] setf opl + +" Oracle config file +au BufNewFile,BufRead *.ora setf ora + +" Packet filter conf +au BufNewFile,BufRead pf.conf setf pf + +" Pacman Config (close enough to dosini) +au BufNewFile,BufRead */etc/pacman.conf setf dosini + +" Pacman hooks +au BufNewFile,BufRead *.hook + \ if getline(1) == '[Trigger]' | + \ setf dosini | + \ endif + +" Pam conf +au BufNewFile,BufRead */etc/pam.conf setf pamconf + +" Pam environment +au BufNewFile,BufRead pam_env.conf,.pam_environment setf pamenv + +" PApp +au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp + +" Password file +au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd + +" Pascal (also *.p, *.pp, *.inc) +au BufNewFile,BufRead *.pas setf pascal + +" Pascal or Puppet manifest +au BufNewFile,BufRead *.pp call polyglot#ft#FTpp() + +" Delphi or Lazarus program file +au BufNewFile,BufRead *.dpr,*.lpr setf pascal + +" Free Pascal makefile definition file +au BufNewFile,BufRead *.fpc setf fpcmake + +" PDF +au BufNewFile,BufRead *.pdf setf pdf + +" PCMK - HAE - crm configure edit +au BufNewFile,BufRead *.pcmk setf pcmk + +" Perl +if has("fname_case") + au BufNewFile,BufRead *.pl,*.PL call polyglot#ft#FTpl() +else + au BufNewFile,BufRead *.pl call polyglot#ft#FTpl() +endif +au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl + +" Perl, XPM or XPM2 +au BufNewFile,BufRead *.pm + \ if getline(1) =~ "XPM2" | + \ setf xpm2 | + \ elseif getline(1) =~ "XPM" | + \ setf xpm | + \ else | + \ setf perl | + \ endif + +" Perl POD +au BufNewFile,BufRead *.pod setf pod + +" Php, php3, php4, etc. +" Also Phtml (was used for PHP 2 in the past) +" Also .ctp for Cake template file +au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php + +" PHP config +au BufNewFile,BufRead php.ini-* setf dosini + +" Pike and Cmod +au BufNewFile,BufRead *.pike,*.pmod setf pike +au BufNewFile,BufRead *.cmod setf cmod + +" Pinfo config +au BufNewFile,BufRead */etc/pinforc,*/.pinforc setf pinfo + +" Palm Resource compiler +au BufNewFile,BufRead *.rcp setf pilrc + +" Pine config +au BufNewFile,BufRead .pinerc,pinerc,.pinercex,pinercex setf pine + +" Pipenv Pipfiles +au BufNewFile,BufRead Pipfile setf toml +au BufNewFile,BufRead Pipfile.lock setf json + +" PL/1, PL/I +au BufNewFile,BufRead *.pli,*.pl1 setf pli + +" PL/M (also: *.inp) +au BufNewFile,BufRead *.plm,*.p36,*.pac setf plm + +" PL/SQL +au BufNewFile,BufRead *.pls,*.plsql setf plsql + +" PLP +au BufNewFile,BufRead *.plp setf plp + +" PO and PO template (GNU gettext) +au BufNewFile,BufRead *.po,*.pot setf po + +" Postfix main config +au BufNewFile,BufRead main.cf setf pfmain + +" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator) +au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr + +" PostScript Printer Description +au BufNewFile,BufRead *.ppd setf ppd + +" Povray +au BufNewFile,BufRead *.pov setf pov + +" Povray configuration +au BufNewFile,BufRead .povrayrc setf povini + +" Povray, Pascal, PHP or assembly +au BufNewFile,BufRead *.inc call polyglot#ft#FTinc() + +" PowerShell +au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1 +au BufNewFile,BufRead *.ps1xml setf ps1xml +au BufNewFile,BufRead *.cdxml,*.psc1 setf xml + +" Printcap and Termcap +au BufNewFile,BufRead *printcap + \ let b:ptcap_type = "print" | setf ptcap +au BufNewFile,BufRead *termcap + \ let b:ptcap_type = "term" | setf ptcap + +" Prisma +au BufRead,BufNewFile *.prisma setf prisma + +" PCCTS / ANTLR +"au BufNewFile,BufRead *.g setf antlr +au BufNewFile,BufRead *.g setf pccts + +" PPWizard +au BufNewFile,BufRead *.it,*.ih setf ppwiz + +" Pug +au BufRead,BufNewFile *.pug setf pug + +" Puppet +au BufNewFile,BufRead Puppetfile setf ruby + +" Embedded Puppet +au BufNewFile,BufRead *.epp setf epuppet + +" Obj 3D file format +" TODO: is there a way to avoid MS-Windows Object files? +au BufNewFile,BufRead *.obj setf obj + +" Oracle Pro*C/C++ +au BufNewFile,BufRead *.pc setf proc + +" Privoxy actions file +au BufNewFile,BufRead *.action setf privoxy + +" Procmail +au BufNewFile,BufRead .procmail,.procmailrc setf procmail + +" Progress or CWEB +au BufNewFile,BufRead *.w call polyglot#ft#FTprogress_cweb() + +" Progress or assembly +au BufNewFile,BufRead *.i call polyglot#ft#FTprogress_asm() + +" Progress or Pascal +au BufNewFile,BufRead *.p call polyglot#ft#FTprogress_pascal() + +" Software Distributor Product Specification File (POSIX 1387.2-1995) +au BufNewFile,BufRead *.psf setf psf +au BufNewFile,BufRead INDEX,INFO + \ if getline(1) =~ '^\s*\(distribution\|installed_software\|root\|bundle\|product\)\s*$' | + \ setf psf | + \ endif + +" Prolog +au BufNewFile,BufRead *.pdb setf prolog + +" Promela +au BufNewFile,BufRead *.pml setf promela + +" Property Specification Language (PSL) +au BufNewFile,BufRead *.psl setf psl + +" Google protocol buffers +au BufNewFile,BufRead *.proto setf proto +au BufNewFile,BufRead *.pbtxt setf pbtxt + +" Poke +au BufNewFile,BufRead *.pk setf poke + +" Protocols +au BufNewFile,BufRead */etc/protocols setf protocols + +" Pyret +au BufNewFile,BufRead *.arr setf pyret + +" Pyrex +au BufNewFile,BufRead *.pyx,*.pxd setf pyrex + +" Python, Python Shell Startup and Python Stub Files +" Quixote (Python-based web framework) +au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc setf python +au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python + +" QL +au BufRead,BufNewFile *.ql,*.qll setf ql + +" Radiance +au BufNewFile,BufRead *.rad,*.mat setf radiance + +" Raku (formerly Perl6) +au BufNewFile,BufRead *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest setf raku + +" Ratpoison config/command files +au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison + +" RCS file +au BufNewFile,BufRead *\,v setf rcs + +" Readline +au BufNewFile,BufRead .inputrc,inputrc setf readline + +" Registry for MS-Windows +au BufNewFile,BufRead *.reg + \ if getline(1) =~? '^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$' | setf registry | endif + +" Renderman Interface Bytestream +au BufNewFile,BufRead *.rib setf rib + +" Rego Policy Language +au BufNewFile,BufRead *.rego setf rego + +" Rexx +au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx + +" R Help file +if has("fname_case") + au BufNewFile,BufRead *.rd,*.Rd setf rhelp +else + au BufNewFile,BufRead *.rd setf rhelp +endif + +" R noweb file +if has("fname_case") + au BufNewFile,BufRead *.Rnw,*.rnw,*.Snw,*.snw setf rnoweb +else + au BufNewFile,BufRead *.rnw,*.snw setf rnoweb +endif + +" R Markdown file +if has("fname_case") + au BufNewFile,BufRead *.Rmd,*.rmd,*.Smd,*.smd setf rmd +else + au BufNewFile,BufRead *.rmd,*.smd setf rmd +endif + +" RSS looks like XML +au BufNewFile,BufRead *.rss setf xml + +" R reStructuredText file +if has("fname_case") + au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst +else + au BufNewFile,BufRead *.rrst,*.srst setf rrst +endif + +" Rexx, Rebol or R +au BufNewFile,BufRead *.r,*.R call polyglot#ft#FTr() + +" Remind +au BufNewFile,BufRead .reminders,*.remind,*.rem setf remind + +" Resolv.conf +au BufNewFile,BufRead resolv.conf setf resolv + +" Relax NG Compact +au BufNewFile,BufRead *.rnc setf rnc + +" Relax NG XML +au BufNewFile,BufRead *.rng setf rng + +" RPL/2 +au BufNewFile,BufRead *.rpl setf rpl + +" Robots.txt +au BufNewFile,BufRead robots.txt setf robots + +" Rpcgen +au BufNewFile,BufRead *.x setf rpcgen + +" MikroTik RouterOS script +au BufRead,BufNewFile *.rsc setf routeros + +" reStructuredText Documentation Format +au BufNewFile,BufRead *.rst setf rst + +" RTF +au BufNewFile,BufRead *.rtf setf rtf + +" Interactive Ruby shell +au BufNewFile,BufRead .irbrc,irbrc setf ruby + +" Ruby +au BufNewFile,BufRead *.rb,*.rbw setf ruby + +" RubyGems +au BufNewFile,BufRead *.gemspec setf ruby + +" RBS (Ruby Signature) +au BufNewFile,BufRead *.rbs setf rbs + +" Rackup +au BufNewFile,BufRead *.ru setf ruby + +" Bundler +au BufNewFile,BufRead Gemfile setf ruby + +" Ruby on Rails +au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby + +" Rantfile and Rakefile is like Ruby +au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby + +" Rust +au BufNewFile,BufRead *.rs setf rust +au BufNewFile,BufRead Cargo.lock,*/.cargo/config,*/.cargo/credentials setf toml + +" S-lang (or shader language, or SmallLisp) +au BufNewFile,BufRead *.sl setf slang + +" Samba config +au BufNewFile,BufRead smb.conf setf samba + +" SAS script +au BufNewFile,BufRead *.sas setf sas + +" Sass +au BufNewFile,BufRead *.sass setf sass + +" Sather +au BufNewFile,BufRead *.sa setf sather + +" Scala +au BufNewFile,BufRead *.scala,*.sc setf scala + +" SBT - Scala Build Tool +au BufNewFile,BufRead *.sbt setf sbt + +" Scilab +au BufNewFile,BufRead *.sci,*.sce setf scilab + +" scdoc +au BufNewFile,BufRead *.scd setf scdoc + +" SCSS +au BufNewFile,BufRead *.scss setf scss + +" SD: Streaming Descriptors +au BufNewFile,BufRead *.sd setf sd + +" SDL +au BufNewFile,BufRead *.sdl,*.pr setf sdl + +" sed +au BufNewFile,BufRead *.sed setf sed + +" svelte +au BufNewFile,BufRead *.svelte setf svelte + +" Sieve (RFC 3028, 5228) +au BufNewFile,BufRead *.siv,*.sieve setf sieve + +" Sendmail +au BufNewFile,BufRead sendmail.cf setf sm + +" Sendmail .mc files are actually m4. Could also be MS Message text file. +au BufNewFile,BufRead *.mc call polyglot#ft#McSetf() + +" Services +au BufNewFile,BufRead */etc/services setf services + +" Service Location config +au BufNewFile,BufRead */etc/slp.conf setf slpconf + +" Service Location registration +au BufNewFile,BufRead */etc/slp.reg setf slpreg + +" Service Location SPI +au BufNewFile,BufRead */etc/slp.spi setf slpspi + +" Setserial config +au BufNewFile,BufRead */etc/serial.conf setf setserial + +" SGML +au BufNewFile,BufRead *.sgm,*.sgml + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'linuxdoc' | + \ setf sgmllnx | + \ elseif getline(1) =~ '' | + \ setf xml | + \ else | + \ setf smil | + \ endif + +" SMIL or SNMP MIB file +au BufNewFile,BufRead *.smi + \ if getline(1) =~ '\' | + \ setf smil | + \ else | + \ setf mib | + \ endif + +" SMITH +au BufNewFile,BufRead *.smt,*.smith setf smith + +" Snobol4 and spitbol +au BufNewFile,BufRead *.sno,*.spt setf snobol4 + +" SNMP MIB files +au BufNewFile,BufRead *.mib,*.my setf mib + +" Snort Configuration +au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog +au BufNewFile,BufRead *.rules call polyglot#ft#FTRules() + +" SPARQL queries +au BufNewFile,BufRead *.rq,*.sparql setf sparql + +" Spec (Linux RPM) +au BufNewFile,BufRead *.spec setf spec + +" Speedup (AspenTech plant simulator) +au BufNewFile,BufRead *.speedup,*.spdata,*.spd setf spup + +" Slice +au BufNewFile,BufRead *.ice setf slice + +" Microsoft Visual Studio Solution +au BufNewFile,BufRead *.sln setf solution +au BufNewFile,BufRead *.slnf setf json + +" Spice +au BufNewFile,BufRead *.sp,*.spice setf spice + +" Spyce +au BufNewFile,BufRead *.spy,*.spi setf spyce + +" Squid +au BufNewFile,BufRead squid.conf setf squid + +" SQL for Oracle Designer +au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql + +" SQL +au BufNewFile,BufRead *.sql call polyglot#ft#SQL() + +" SQLJ +au BufNewFile,BufRead *.sqlj setf sqlj + +" SQR +au BufNewFile,BufRead *.sqr,*.sqi setf sqr + +" Squirrel +au BufNewFile,BufRead *.nut setf squirrel + +" OpenSSH configuration +au BufNewFile,BufRead ssh_config,*/.ssh/config,*/.ssh/*.conf setf sshconfig +au BufNewFile,BufRead */etc/ssh/ssh_config.d/*.conf setf sshconfig + +" OpenSSH server configuration +au BufNewFile,BufRead sshd_config setf sshdconfig +au BufNewFile,BufRead */etc/ssh/sshd_config.d/*.conf setf sshdconfig + +" Stata +au BufNewFile,BufRead *.ado,*.do,*.imata,*.mata setf stata +" Also *.class, but not when it's a Java bytecode file +au BufNewFile,BufRead *.class + \ if getline(1) !~ "^\xca\xfe\xba\xbe" | setf stata | endif + +" SMCL +au BufNewFile,BufRead *.hlp,*.ihlp,*.smcl setf smcl + +" Stored Procedures +au BufNewFile,BufRead *.stp setf stp + +" Standard ML +au BufNewFile,BufRead *.sml setf sml + +" Sratus VOS command macro +au BufNewFile,BufRead *.cm setf voscm + +" Swift +au BufNewFile,BufRead *.swift setf swift +au BufNewFile,BufRead *.swift.gyb setf swiftgyb + +" Swift Intermediate Language +au BufNewFile,BufRead *.sil setf sil + +" Sysctl +au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl + +" Systemd unit files +au BufNewFile,BufRead */systemd/*.{automount,dnssd,link,mount,netdev,network,nspawn,path,service,slice,socket,swap,target,timer} setf systemd +" Systemd overrides +au BufNewFile,BufRead */etc/systemd/*.conf.d/*.conf setf systemd +au BufNewFile,BufRead */etc/systemd/system/*.d/*.conf setf systemd +au BufNewFile,BufRead */.config/systemd/user/*.d/*.conf setf systemd +" Systemd temp files +au BufNewFile,BufRead */etc/systemd/system/*.d/.#* setf systemd +au BufNewFile,BufRead */etc/systemd/system/.#* setf systemd +au BufNewFile,BufRead */.config/systemd/user/*.d/.#* setf systemd +au BufNewFile,BufRead */.config/systemd/user/.#* setf systemd + +" Synopsys Design Constraints +au BufNewFile,BufRead *.sdc setf sdc + +" Sudoers +au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers + +" SVG (Scalable Vector Graphics) +au BufNewFile,BufRead *.svg setf svg + +" Surface +au BufRead,BufNewFile *.sface setf surface + +" Tads (or Nroff or Perl test file) +au BufNewFile,BufRead *.t + \ if !polyglot#ft#FTnroff() && !polyglot#ft#FTperl() | setf tads | endif + +" Tags +au BufNewFile,BufRead tags setf tags + +" TAK +au BufNewFile,BufRead *.tak setf tak + +" Task +au BufRead,BufNewFile {pending,completed,undo}.data setf taskdata +au BufRead,BufNewFile *.task setf taskedit + +" Tcl (JACL too) +au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc setf tcl + +" Teal +au BufRead,BufNewFile *.tl setf teal + +" TealInfo +au BufNewFile,BufRead *.tli setf tli + +" Telix Salt +au BufNewFile,BufRead *.slt setf tsalt + +" Tera Term Language or Turtle +au BufRead,BufNewFile *.ttl + \ if getline(1) =~ '^@\?\(prefix\|base\)' | + \ setf turtle | + \ else | + \ setf teraterm | + \ endif + +" Terminfo +au BufNewFile,BufRead *.ti setf terminfo + +" Terraform +au BufRead,BufNewFile *.tfvars setf terraform + +" TeX +au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex +au BufNewFile,BufRead *.tex call polyglot#ft#FTtex() + +" ConTeXt +au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context + +" Texinfo +au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo + +" TeX configuration +au BufNewFile,BufRead texmf.cnf setf texmf + +" Tidy config +au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy + +" TF mud client +au BufNewFile,BufRead .tfrc,tfrc setf tf + +" TF mud client or terraform +au BufNewFile,BufRead *.tf call polyglot#ft#FTtf() + +" TLA+ +au BufNewFile,BufRead *.tla setf tla + +" tmux configuration +au BufNewFile,BufRead {.,}tmux*.conf setf tmux + +" TOML +au BufNewFile,BufRead *.toml setf toml + +" TPP - Text Presentation Program +au BufNewFile,BufRead *.tpp setf tpp + +" Treetop +au BufRead,BufNewFile *.treetop setf treetop + +" Trustees +au BufNewFile,BufRead trustees.conf setf trustees + +" TSS - Geometry +au BufNewFile,BufReadPost *.tssgm setf tssgm + +" TSS - Optics +au BufNewFile,BufReadPost *.tssop setf tssop + +" TSS - Command Line (temporary) +au BufNewFile,BufReadPost *.tsscl setf tsscl + +" TWIG files +au BufNewFile,BufReadPost *.twig setf twig + +" Typescript or Qt translation file (which is XML) +au BufNewFile,BufReadPost *.ts + \ if getline(1) =~ '' | + \ let b:xf86conf_xfree86_version = 3 | + \ endif | + \ setf xf86conf +au BufNewFile,BufRead */xorg.conf.d/*.conf + \ let b:xf86conf_xfree86_version = 4 | + \ setf xf86conf + +" Xorg config +au BufNewFile,BufRead xorg.conf,xorg.conf-4 let b:xf86conf_xfree86_version = 4 | setf xf86conf + +" Xinetd conf +au BufNewFile,BufRead */etc/xinetd.conf setf xinetd + +" XS Perl extension interface language +au BufNewFile,BufRead *.xs setf xs + +" X resources file +au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults + +" Xmath +au BufNewFile,BufRead *.msc,*.msf setf xmath +au BufNewFile,BufRead *.ms + \ if !polyglot#ft#FTnroff() | setf xmath | endif + +" XML specific variants: docbk and xbl +au BufNewFile,BufRead *.xml call polyglot#ft#FTxml() + +" XMI (holding UML models) is also XML +au BufNewFile,BufRead *.xmi setf xml + +" CSPROJ files are Visual Studio.NET's XML-based C# project config files +au BufNewFile,BufRead *.csproj,*.csproj.user setf xml + +" FSPROJ files are Visual Studio.NET's XML-based F# project config files +au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml + +" VBPROJ files are Visual Studio.NET's XML-based Visual Basic project config files +au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml + +" Qt Linguist translation source and Qt User Interface Files are XML +" However, for .ts Typescript is more common. +au BufNewFile,BufRead *.ui setf xml + +" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull) +au BufNewFile,BufRead *.tpm setf xml + +" Xdg menus +au BufNewFile,BufRead */etc/xdg/menus/*.menu setf xml + +" ATI graphics driver configuration +au BufNewFile,BufRead fglrxrc setf xml + +" Web Services Description Language (WSDL) +au BufNewFile,BufRead *.wsdl setf xml + +" XLIFF (XML Localisation Interchange File Format) is also XML +au BufNewFile,BufRead *.xlf setf xml +au BufNewFile,BufRead *.xliff setf xml + +" XML User Interface Language +au BufNewFile,BufRead *.xul setf xml + +" X11 xmodmap (also see below) +au BufNewFile,BufRead *Xmodmap setf xmodmap + +" Xquery +au BufNewFile,BufRead *.xq,*.xql,*.xqm,*.xquery,*.xqy setf xquery + +" XSD +au BufNewFile,BufRead *.xsd setf xsd + +" Xslt +au BufNewFile,BufRead *.xsl,*.xslt setf xslt + +" Yacc +au BufNewFile,BufRead *.yy,*.yxx,*.y++ setf yacc + +" Yacc or racc +au BufNewFile,BufRead *.y call polyglot#ft#FTy() + +" Yaml +au BufNewFile,BufRead *.yaml,*.yml setf yaml + +" Raml +au BufNewFile,BufRead *.raml setf raml + +" yum conf (close enough to dosini) +au BufNewFile,BufRead */etc/yum.conf setf dosini + +" YANG +au BufRead,BufNewFile *.yang setf yang + +" Zimbu +au BufNewFile,BufRead *.zu setf zimbu +" Zimbu Templates +au BufNewFile,BufRead *.zut setf zimbutempl + +" Zope +" dtml (zope dynamic template markup language), pt (zope page template), +" cpt (zope form controller page template) +au BufNewFile,BufRead *.dtml,*.pt,*.cpt call polyglot#ft#FThtml() +" zsql (zope sql method) +au BufNewFile,BufRead *.zsql call polyglot#ft#SQL() + +" Z80 assembler asz80 +au BufNewFile,BufRead *.z8a setf z8a + +augroup END + + +" Source the user-specified filetype file, for backwards compatibility with +" Vim 5.x. +if exists("myfiletypefile") && filereadable(expand(myfiletypefile)) + execute "source " . myfiletypefile +endif + + +" Check for "*" after loading myfiletypefile, so that scripts.vim is only used +" when there are no matching file name extensions. +" Don't do this for compressed files. +augroup filetypedetect + + + + +" Plain text files, needs to be far down to not override others. This avoids +" the "conf" type being used if there is a line starting with '#'. +" But before patterns matching everything in a directory. +au BufNewFile,BufRead *.text,README,LICENSE,COPYING,AUTHORS setf text + + +" Extra checks for when no filetype has been detected now. Mostly used for +" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim +" script file. +" Most of these should call s:StarSetf() to avoid names ending in .gz and the +" like are used. + +" More Apache style config files +au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/* call s:StarSetf('apachestyle') +au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle') + +" More Apache config files +au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf* call s:StarSetf('apache') +au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf* call s:StarSetf('apache') + +" APT config file +au BufNewFile,BufRead */etc/apt/apt.conf.d/{[-_[:alnum:]]\+,[-_.[:alnum:]]\+.conf} call s:StarSetf('aptconf') + +" Asterisk config file +au BufNewFile,BufRead *asterisk/*.conf* call s:StarSetf('asterisk') +au BufNewFile,BufRead *asterisk*/*voicemail.conf* call s:StarSetf('asteriskvm') + +" Bazaar version control +au BufNewFile,BufRead bzr_log.* setf bzr + +" Bazel build file +if !has("fname_case") + au BufNewFile,BufRead *.BUILD,BUILD setf bzl +endif + +" BIND zone +au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone') + +au BufNewFile,BufRead cabal.project.* call s:StarSetf('cabalproject') + +" Calendar +au BufNewFile,BufRead */.calendar/*, + \*/share/calendar/*/calendar.*,*/share/calendar/calendar.* + \ call s:StarSetf('calendar') + +" Changelog +au BufNewFile,BufRead [cC]hange[lL]og* + \ if getline(1) =~ '; urgency=' + \| call s:StarSetf('debchangelog') + \|else + \| call s:StarSetf('changelog') + \|endif + +" Crontab +au BufNewFile,BufRead crontab,crontab.*,*/etc/cron.d/* call s:StarSetf('crontab') + +" dnsmasq(8) configuration +au BufNewFile,BufRead */etc/dnsmasq.d/* call s:StarSetf('dnsmasq') + +" Dockerfile +au BufNewFile,BufRead Dockerfile.*,Containerfile.* call s:StarSetf('dockerfile') + +" Dracula +au BufNewFile,BufRead drac.* call s:StarSetf('dracula') + +" Fvwm +au BufNewFile,BufRead */.fvwm/* call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook + \ let b:fvwm_version = 1 | call s:StarSetf('fvwm') +au BufNewFile,BufRead *fvwm2rc* + \ if expand(":e") == "m4" + \| call s:StarSetf('fvwm2m4') + \|else + \| let b:fvwm_version = 2 | call s:StarSetf('fvwm') + \|endif + +" Gedcom +au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom') + +" Git +au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig') + +" Gitolite +au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite') + +" GTK RC +au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc') + +" Jam +au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam') + +" Jargon +au! BufNewFile,BufRead *jarg* + \ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE' + \| call s:StarSetf('jargon') + \|endif + +" Java Properties resource file (note: doesn't catch font.properties.pl) +au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties') + +" Kconfig +au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig') + +" Lilo: Linux loader +au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo') + +" Libsensors +au BufNewFile,BufRead */etc/sensors.d/[^.]* call s:StarSetf('sensors') + +" Logcheck +au BufNewFile,BufRead */etc/logcheck/*.d*/* call s:StarSetf('logcheck') + +" Makefile +au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make') + +" Ruby Makefile +au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby') + +" Mail (also matches muttrc.vim, so this is below the other checks) +au BufNewFile,BufRead {neo,}mutt[[:alnum:]._-]\\\{6\} setf mail + +au BufNewFile,BufRead reportbug-* call s:StarSetf('mail') + +" Modconf +au BufNewFile,BufRead */etc/modutils/* + \ if executable(expand("")) != 1 + \| call s:StarSetf('modconf') + \|endif +au BufNewFile,BufRead */etc/modprobe.* call s:StarSetf('modconf') + +" Mutt setup files (must be before catch *.rc) +au BufNewFile,BufRead */etc/Muttrc.d/* call s:StarSetf('muttrc') + +" Mutt setup file +au BufNewFile,BufRead .mutt{ng,}rc*,*/.mutt{ng,}/mutt{ng,}rc* call s:StarSetf('muttrc') +au BufNewFile,BufRead mutt{ng,}rc*,Mutt{ng,}rc* call s:StarSetf('muttrc') + +" Neomutt setup file +au BufNewFile,BufRead .neomuttrc*,*/.neomutt/neomuttrc* call s:StarSetf('neomuttrc') +au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc') + +" Nroff macros +au BufNewFile,BufRead tmac.* call s:StarSetf('nroff') + +" OpenBSD hostname.if +au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config') + +" Pam conf +au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf') + +" Printcap and Termcap +au BufNewFile,BufRead *printcap* + \ if !did_filetype() + \| let b:ptcap_type = "print" | call s:StarSetf('ptcap') + \|endif +au BufNewFile,BufRead *termcap* + \ if !did_filetype() + \| let b:ptcap_type = "term" | call s:StarSetf('ptcap') + \|endif + +" ReDIF +" Only used when the .rdf file was not detected to be XML. +au BufRead,BufNewFile *.rdf call polyglot#ft#Redif() + +" Remind +au BufNewFile,BufRead .reminders* call s:StarSetf('remind') + +" SGML catalog file +au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') + +" avoid doc files being recognized a shell files +au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text + +" Shell scripts ending in a star +au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} call polyglot#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh") +au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1)) + +" Sudoers +au BufNewFile,BufRead */etc/sudoers.d/* call s:StarSetf('sudoers') + +" tcsh scripts ending in a star +au BufNewFile,BufRead .tcshrc* call polyglot#ft#SetFileTypeShell("tcsh") + +" csh scripts ending in a star +au BufNewFile,BufRead .login*,.cshrc* call polyglot#ft#CSH() + +" tmux configuration with arbitrary extension +au BufNewFile,BufRead {.,}tmux*.conf* setf tmux + +" VHDL +au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl') + +" Vim script +au BufNewFile,BufRead *vimrc* call s:StarSetf('vim') + +" Subversion commit file +au BufNewFile,BufRead svn-commit*.tmp setf svn + +" X resources file +au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults') + +" XFree86 config +au BufNewFile,BufRead XF86Config-4* + \ let b:xf86conf_xfree86_version = 4 | call s:StarSetf('xf86conf') +au BufNewFile,BufRead XF86Config* + \ if getline(1) =~ '\' + \| let b:xf86conf_xfree86_version = 3 + \|endif + \|call s:StarSetf('xf86conf') + +" X11 xmodmap +au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap') + +" Xinetd conf +au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd') + +" yum conf (close enough to dosini) +au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') + +" Z-Shell script ending in a star +au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh') +au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh') + + +" Help files match *.txt but should have a last line that is a modeline. +au BufNewFile,BufRead *.txt + \ if getline('$') !~ 'vim:.*ft=help' + \| setf text + \| endif + + +" Use the filetype detect plugins. They may overrule any of the previously +" detected filetypes. + + +" NOTE: The above command could have ended the filetypedetect autocmd group +" and started another one. Let's make sure it has ended to get to a consistent +" state. +augroup END + +" Generic configuration file. Use FALLBACK, it's just guessing! + + + +" If the GUI is already running, may still need to install the Syntax menu. +" Don't do it when the 'M' flag is included in 'guioptions'. +if has("menu") && has("gui_running") + \ && !exists("did_install_syntax_menu") && &guioptions !~# "M" + source :p:h/menu.vim +endif + +" Function called for testing all functions defined here. These are +" script-local, thus need to be executed here. +" Returns a string with error messages (hopefully empty). +func! TestPolyglotFiletypeFuncs(testlist) + let output = '' + for f in a:testlist + try + exe f + catch + let output = output . "\n" . f . ": " . v:exception + endtry + endfor + return output +endfunc + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/extras/flow.vim b/extras/flow.vim index 6bbd91f11..d4a1f36d2 100644 --- a/extras/flow.vim +++ b/extras/flow.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'javascript', 'extras/flow.vim') + finish +endif syntax region jsFlowDefinition contained start=/:/ end=/\%(\s*[,=;)\n]\)\@=/ contains=@jsFlowCluster containedin=jsParen syntax region jsFlowArgumentDef contained start=/:/ end=/\%(\s*[,)]\|=>\@!\)\@=/ contains=@jsFlowCluster @@ -109,5 +111,3 @@ if version >= 508 || !exists("did_javascript_syn_inits") HiLink jsFlowObjectFuncName jsObjectFuncName delcommand HiLink endif - -endif diff --git a/extras/jsdoc.vim b/extras/jsdoc.vim index bbb0bb574..1acbb0216 100644 --- a/extras/jsdoc.vim +++ b/extras/jsdoc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'javascript', 'extras/jsdoc.vim') + finish +endif "" syntax coloring for javadoc comments (HTML) syntax region jsComment matchgroup=jsComment start="/\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold @@ -20,7 +22,8 @@ syntax region jsDocTypeRecord contained start=/{/ end=/}/ contains=jsDocTypeRe syntax region jsDocTypeRecord contained start=/\[/ end=/\]/ contains=jsDocTypeRecord extend syntax region jsDocTypeNoParam contained start="{" end="}" oneline syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" -syntax match jsDocParam contained "\%(#\|\$\|-\|'\|\"\|{.\{-}}\|\w\|\.\|:\|\/\|\[.\{-}]\|=\)\+" +syntax match jsDocParam contained "\%(#\|\$\|-\|'\|\"\|{.\{-}}\|\w\|\~\|\.\|:\|\/\|\[.\{-}]\|=\)\+" + syntax region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags if version >= 508 || !exists("did_javascript_syn_inits") @@ -39,5 +42,3 @@ if version >= 508 || !exists("did_javascript_syn_inits") HiLink jsDocParam Label delcommand HiLink endif - -endif diff --git a/extras/menu.vim b/extras/menu.vim new file mode 100644 index 000000000..5f4e395e1 --- /dev/null +++ b/extras/menu.vim @@ -0,0 +1,1218 @@ +" Vim support file to define the default menus +" You can also use this as a start for your own set of menus. +" +" Maintainer: Bram Moolenaar +" Last Change: 2021 Dec 22 + +" Note that ":an" (short for ":anoremenu") is often used to make a menu work +" in all modes and avoid side effects from mappings defined by the user. + +" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise +" would not be recognized. See ":help 'cpoptions'". +let s:cpo_save = &cpo +set cpo&vim + +" Avoid installing the menus twice +if !exists("did_install_default_menus") +let did_install_default_menus = 1 + + +if exists("v:lang") || &langmenu != "" + " Try to find a menu translation file for the current language. + if &langmenu != "" + if &langmenu =~ "none" + let s:lang = "" + else + let s:lang = &langmenu + endif + else + let s:lang = v:lang + endif + " A language name must be at least two characters, don't accept "C" + " Also skip "en_US" to avoid picking up "en_gb" translations. + if strlen(s:lang) > 1 && s:lang !~? '^en_us' + " When the language does not include the charset add 'encoding' + if s:lang =~ '^\a\a$\|^\a\a_\a\a$' + let s:lang = s:lang . '.' . &enc + endif + + " We always use a lowercase name. + " Change "iso-8859" to "iso_8859" and "iso8859" to "iso_8859", some + " systems appear to use this. + " Change spaces to underscores. + let s:lang = substitute(tolower(s:lang), '\.iso-', ".iso_", "") + let s:lang = substitute(s:lang, '\.iso8859', ".iso_8859", "") + let s:lang = substitute(s:lang, " ", "_", "g") + " Remove "@euro", otherwise "LC_ALL=de_DE@euro gvim" will show English menus + let s:lang = substitute(s:lang, "@euro", "", "") + " Change "iso_8859-1" and "iso_8859-15" to "latin1", we always use the + " same menu file for them. + let s:lang = substitute(s:lang, 'iso_8859-15\=$', "latin1", "") + menutrans clear + exe "runtime! lang/menu_" . s:lang . ".vim" + + if !exists("did_menu_trans") + " There is no exact match, try matching with a wildcard added + " (e.g. find menu_de_de.iso_8859-1.vim if s:lang == de_DE). + let s:lang = substitute(s:lang, '\.[^.]*', "", "") + exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim" + + if !exists("did_menu_trans") && s:lang =~ '_' + " If the language includes a region try matching without that region. + " (e.g. find menu_de.vim if s:lang == de_DE). + let langonly = substitute(s:lang, '_.*', "", "") + exe "runtime! lang/menu_" . langonly . "[^a-z]*vim" + endif + + if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us' + " On windows locale names are complicated, try using $LANG, it might + " have been set by set_init_1(). But don't do this for "en" or "en_us". + " But don't match "slovak" when $LANG is "sl". + exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim" + endif + endif + endif +endif + + +" Help menu +an 9999.10 &Help.&Overview :help +an 9999.20 &Help.&User\ Manual :help usr_toc +an 9999.30 &Help.&How-To\ Links :help how-to +an 9999.40 &Help.&Find\.\.\. :call Helpfind() +an 9999.45 &Help.-sep1- +an 9999.50 &Help.&Credits :help credits +an 9999.60 &Help.Co&pying :help copying +an 9999.70 &Help.&Sponsor/Register :help sponsor +an 9999.70 &Help.O&rphans :help kcc +an 9999.75 &Help.-sep2- +an 9999.80 &Help.&Version :version +an 9999.90 &Help.&About :intro + +if exists(':tlmenu') + tlnoremenu 9999.10 &Help.&Overview :help + tlnoremenu 9999.20 &Help.&User\ Manual :help usr_toc + tlnoremenu 9999.30 &Help.&How-To\ Links :help how-to + tlnoremenu 9999.40 &Help.&Find\.\.\. :call Helpfind() + tlnoremenu 9999.45 &Help.-sep1- + tlnoremenu 9999.50 &Help.&Credits :help credits + tlnoremenu 9999.60 &Help.Co&pying :help copying + tlnoremenu 9999.70 &Help.&Sponsor/Register :help sponsor + tlnoremenu 9999.70 &Help.O&rphans :help kcc + tlnoremenu 9999.75 &Help.-sep2- + tlnoremenu 9999.80 &Help.&Version :version + tlnoremenu 9999.90 &Help.&About :intro +endif + +fun! s:Helpfind() + if !exists("g:menutrans_help_dialog") + let g:menutrans_help_dialog = "Enter a command or word to find help on:\n\nPrepend i_ for Input mode commands (e.g.: i_CTRL-X)\nPrepend c_ for command-line editing commands (e.g.: c_)\nPrepend ' for an option name (e.g.: 'shiftwidth')" + endif + let h = inputdialog(g:menutrans_help_dialog) + if h != "" + let v:errmsg = "" + silent! exe "help " . h + if v:errmsg != "" + echo v:errmsg + endif + endif +endfun + +" File menu +an 10.310 &File.&Open\.\.\.:e :browse confirm e +an 10.320 &File.Sp&lit-Open\.\.\.:sp :browse sp +an 10.320 &File.Open\ Tab\.\.\.:tabnew :browse tabnew +an 10.325 &File.&New:enew :confirm enew +an 10.330 &File.&Close:close + \ :if winheight(2) < 0 && tabpagewinnr(2) == 0 + \ confirm enew + \ else + \ confirm close + \ endif +an 10.335 &File.-SEP1- +an 10.340 &File.&Save:w :if expand("%") == ""browse confirm welseconfirm wendif +an 10.350 &File.Save\ &As\.\.\.:sav :browse confirm saveas + +if has("diff") + an 10.400 &File.-SEP2- + an 10.410 &File.Split\ &Diff\ With\.\.\. :browse vert diffsplit + an 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch +endif + +if has("printer") + an 10.500 &File.-SEP3- + an 10.510 &File.&Print :hardcopy + vunmenu &File.&Print + vnoremenu &File.&Print :hardcopy +elseif has("unix") + an 10.500 &File.-SEP3- + an 10.510 &File.&Print :w !lpr + vunmenu &File.&Print + vnoremenu &File.&Print :w !lpr +endif +an 10.600 &File.-SEP4- +an 10.610 &File.Sa&ve-Exit:wqa :confirm wqa +an 10.620 &File.E&xit:qa :confirm qa + +func s:SelectAll() + exe "norm! gg" . (&slm == "" ? "VG" : "gH\G") +endfunc + +func s:FnameEscape(fname) + if exists('*fnameescape') + return fnameescape(a:fname) + endif + return escape(a:fname, " \t\n*?[{`$\\%#'\"|!<") +endfunc + +" Edit menu +an 20.310 &Edit.&Undou u +an 20.320 &Edit.&Redo^R +an 20.330 &Edit.Rep&eat\. . + +an 20.335 &Edit.-SEP1- +vnoremenu 20.340 &Edit.Cu&t"+x "+x +vnoremenu 20.350 &Edit.&Copy"+y "+y +cnoremenu 20.350 &Edit.&Copy"+y +if exists(':tlmenu') + tlnoremenu 20.350 &Edit.&Copy"+y : +endif +nnoremenu 20.360 &Edit.&Paste"+gP "+gP +cnoremenu &Edit.&Paste"+gP + +if exists(':tlmenu') + tlnoremenu &Edit.&Paste"+gP "+ +endif +exe 'vnoremenu \n") -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.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 ") -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 deleted file mode 100644 index 86e2ff36d..000000000 --- a/scripts/test_filetypes.vim +++ /dev/null @@ -1,228 +0,0 @@ -function! TestFiletype(filetype) - try - enew - exec 'set ft=' . a:filetype - catch - echo 'Error loading filetype ' . a:filetype . ':' - echo v:exception - echo v:throwpoint - exec ':cq!' - 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') -call TestFiletype('carp') -call TestFiletype('clojure') -call TestFiletype('cmake') -call TestFiletype('coffee') -call TestFiletype('litcoffee') -call TestFiletype('cryptol') -call TestFiletype('crystal') -call TestFiletype('ecrystal') -call TestFiletype('csv') -call TestFiletype('cucumber') -call TestFiletype('cuesheet') -call TestFiletype('dart') -call TestFiletype('dhall') -call TestFiletype('grub') -call TestFiletype('d') -call TestFiletype('dcov') -call TestFiletype('dd') -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') -call TestFiletype('ember-script') -call TestFiletype('emblem') -call TestFiletype('erlang') -call TestFiletype('fennel') -call TestFiletype('ferm') -call TestFiletype('fish') -call TestFiletype('fbs') -call TestFiletype('forth') -call TestFiletype('fsharp') -call TestFiletype('gdscript3') -call TestFiletype('gitconfig') -call TestFiletype('gitrebase') -call TestFiletype('gitsendemail') -call TestFiletype('gitcommit') -call TestFiletype('glsl') -call TestFiletype('gmpl') -call TestFiletype('gnuplot') -call TestFiletype('go') -call TestFiletype('gomod') -call TestFiletype('gohtmltmpl') -call TestFiletype('graphql') -call TestFiletype('groovy') -call TestFiletype('haml') -call TestFiletype('mustache') -call TestFiletype('haproxy') -call TestFiletype('haskell') -call TestFiletype('haxe') -call TestFiletype('hcl') -call TestFiletype('hive') -call TestFiletype('html') -call TestFiletype('i3config') -call TestFiletype('icalendar') -call TestFiletype('idris') -call TestFiletype('ion') -call TestFiletype('javascript') -call TestFiletype('flow') -call TestFiletype('Jenkinsfile') -call TestFiletype('jinja.html') -call TestFiletype('jq') -call TestFiletype('json5') -call TestFiletype('json') -call TestFiletype('jsonnet') -call TestFiletype('jst') -call TestFiletype('javascriptreact') -call TestFiletype('julia') -call TestFiletype('kotlin') -call TestFiletype('ledger') -call TestFiletype('less') -call TestFiletype('lilypond') -call TestFiletype('livescript') -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') -call TestFiletype('objc') -call TestFiletype('ocaml') -call TestFiletype('omake') -call TestFiletype('opam') -call TestFiletype('oasis') -call TestFiletype('dune') -call TestFiletype('ocamlbuild_tags') -call TestFiletype('ocpbuild') -call TestFiletype('ocpbuildroot') -call TestFiletype('sexplib') -call TestFiletype('opencl') -call TestFiletype('perl') -call TestFiletype('sql') -call TestFiletype('cql') -call TestFiletype('blade') -call TestFiletype('php') -call TestFiletype('plantuml') -call TestFiletype('pony') -call TestFiletype('ps1') -call TestFiletype('ps1xml') -call TestFiletype('proto') -call TestFiletype('pug') -call TestFiletype('puppet') -call TestFiletype('embeddedpuppet') -call TestFiletype('purescript') -call TestFiletype('python') -call TestFiletype('requirements') -call TestFiletype('qmake') -call TestFiletype('qml') -call TestFiletype('r') -call TestFiletype('rhelp') -call TestFiletype('racket') -call TestFiletype('ragel') -call TestFiletype('raku') -call TestFiletype('raml') -call TestFiletype('razor') -call TestFiletype('reason') -call TestFiletype('rst') -call TestFiletype('ruby') -call TestFiletype('eruby') -call TestFiletype('ruby') -call TestFiletype('brewfile') -call TestFiletype('rust') -call TestFiletype('scala') -call TestFiletype('sbt.scala') -call TestFiletype('scss') -call TestFiletype('sh') -call TestFiletype('zsh') -call TestFiletype('slim') -call TestFiletype('slime') -call TestFiletype('smt2') -call TestFiletype('solidity') -call TestFiletype('stylus') -call TestFiletype('svelte') -call TestFiletype('svg') -call TestFiletype('swift') -call TestFiletype('sxhkdrc') -call TestFiletype('systemd') -call TestFiletype('terraform') -call TestFiletype('textile') -call TestFiletype('thrift') -call TestFiletype('tmux') -call TestFiletype('toml') -call TestFiletype('tptp') -call TestFiletype('html.twig') -call TestFiletype('xml.twig') -call TestFiletype('typescript') -call TestFiletype('typescriptreact') -call TestFiletype('unison') -call TestFiletype('v') -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.ansible') -call TestFiletype('yaml') -call TestFiletype('helm') -call TestFiletype('help') -call TestFiletype('zephir') -call TestFiletype('zir') -call TestFiletype('zig') -call TestFiletype('trasys') diff --git a/syntax/8th.vim b/syntax/8th.vim index 9eae523f6..b962e8559 100644 --- a/syntax/8th.vim +++ b/syntax/8th.vim @@ -1,8 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 +if polyglot#init#is_disabled(expand(':p'), '8th', 'syntax/8th.vim') + finish +endif " Vim syntax file " Language: 8th -" Version: 19.01d +" Version: 21.08 +" Last Change: 2021 Sep 20 " Maintainer: Ron Aaron " URL: https://8th-dev.com/ " Filetypes: *.8th @@ -32,246 +35,318 @@ syn match eighthClassWord "\<\S\+:.\+" contains=eighthClasses syn keyword eighthEndOfColonDef ; i; syn keyword eighthDefine var var, -" Built in words +" Built in words: com! -nargs=+ Builtin syn keyword eighthBuiltin -"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 args #:args b #:b dhm #:dhm exec# #:exec# id2ns #:id2ns id? #:id? idd #:idd key #:key oa #:oa +Builtin oid #:oid okey #:okey with #:with with! #:with! zip #:zip gen-secret 2fa:gen-secret gen-url 2fa:gen-url +Builtin validate-code 2fa:validate-code ! G:! #! G:#! ## G:## #> G:#> #if G:#if ' G:' ( G:( (* G:(* +Builtin (:) G:(:) (code) G:(code) (defer) G:(defer) (dump) G:(dump) (getc) G:(getc) (gets) G:(gets) +Builtin (interp) G:(interp) (log) G:(log) (needs) G:(needs) (parseln) G:(parseln) (putc) G:(putc) (puts) G:(puts) +Builtin (putslim) G:(putslim) (stat) G:(stat) (with) G:(with) ) G:) +hook G:+hook +listener G:+listener +Builtin +ref G:+ref ,# G:,# -- G:-- -----BEGIN G:-----BEGIN -Inf G:-Inf -Inf? G:-Inf? -hook G:-hook +Builtin -listener G:-listener -ref G:-ref -rot G:-rot . G:. .# G:.# .hook G:.hook .needs G:.needs .r G:.r +Builtin .s G:.s .s-truncate G:.s-truncate .stats G:.stats .ver G:.ver .with G:.with 0; G:0; 2dip G:2dip +Builtin 2drop G:2drop 2dup G:2dup 2over G:2over 2swap G:2swap 3drop G:3drop 3rev G:3rev 4drop G:4drop +Builtin 8thdt? G:8thdt? 8thsku G:8thsku 8thver? G:8thver? 8thvernum? G:8thvernum? : G:: ; G:; ;; G:;; +Builtin ;;; G:;;; ;with G:;with <# G:<# <#> G:<#> >clip G:>clip >json G:>json >kind G:>kind >n G:>n +Builtin >r G:>r >s G:>s ?: G:?: @ G:@ BITMAP: G:BITMAP: ENUM: G:ENUM: FLAG: G:FLAG: Inf G:Inf Inf? G:Inf? +Builtin NaN G:NaN NaN? G:NaN? SED-CHECK G:SED-CHECK SED: G:SED: SED: G:SED: \ G:\ _dup G:_dup _swap G:_swap +Builtin actor: G:actor: again G:again ahead G:ahead and G:and appname G:appname apropos G:apropos argc G:argc +Builtin args G:args array? G:array? assert G:assert base G:base bi G:bi bits G:bits break G:break break? G:break? +Builtin breakif G:breakif build? G:build? buildver? G:buildver? bye G:bye c# G:c# c/does G:c/does case: G:case: +Builtin catch G:catch chdir G:chdir clip> G:clip> clone G:clone clone-shallow G:clone-shallow cold G:cold +Builtin compile G:compile compile? G:compile? compiling? G:compiling? conflict G:conflict const G:const +Builtin container? G:container? counting-allocations G:counting-allocations cr G:cr curlang G:curlang +Builtin curry G:curry curry: G:curry: decimal G:decimal default: G:default: defer: G:defer: deferred: G:deferred: +Builtin deg>rad G:deg>rad depth G:depth die G:die dip G:dip drop G:drop dstack G:dstack dump G:dump +Builtin dup G:dup dup>r G:dup>r dup? G:dup? e# G:e# enum: G:enum: error? G:error? eval G:eval eval! G:eval! +Builtin eval0 G:eval0 execnull G:execnull expect G:expect extra! G:extra! extra@ G:extra@ false G:false +Builtin fnv G:fnv fourth G:fourth free G:free func: G:func: getc G:getc getcwd G:getcwd getenv G:getenv +Builtin gets G:gets handler G:handler header G:header help G:help hex G:hex i: G:i: i; G:i; isa? G:isa? +Builtin items-used G:items-used jcall G:jcall jclass G:jclass jmethod G:jmethod json! G:json! json-8th> G:json-8th> +Builtin json-nesting G:json-nesting json-pretty G:json-pretty json-throw G:json-throw json> G:json> +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 log G:log log-syslog G:log-syslog 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 longjmp G:longjmp lookup G:lookup loop G:loop +Builtin loop- G:loop- map? G:map? mark G:mark mark? G:mark? memfree G:memfree mobile? G:mobile? n# G:n# +Builtin name>os G:name>os name>sem G:name>sem ndrop G:ndrop needs G:needs new G:new next-arg G:next-arg +Builtin nip G:nip noop G:noop not G:not nothrow G:nothrow ns G:ns ns: G:ns: ns>ls G:ns>ls ns>s G:ns>s +Builtin ns? G:ns? null G:null null; G:null; null? G:null? number? G:number? of: G:of: off G:off on G:on +Builtin onexit G:onexit only G:only op! G:op! or G:or os G:os os-names G:os-names os>long-name G:os>long-name +Builtin os>name G:os>name over G:over p: G:p: pack G:pack parse G:parse parse-csv G:parse-csv parsech G:parsech +Builtin parseln G:parseln parsews G:parsews pick G:pick poke G:poke pool-clear G:pool-clear pool-clear-all G:pool-clear-all +Builtin prior G:prior private G:private process-args G:process-args process-args-fancy G:process-args-fancy +Builtin process-args-help G:process-args-help process-args-vars G:process-args-vars prompt G:prompt +Builtin public G:public putc G:putc puts G:puts putslim G:putslim quote G:quote r! G:r! r> G:r> r@ G:r@ +Builtin rad>deg G:rad>deg rand-jit G:rand-jit rand-jsf G:rand-jsf rand-native G:rand-native rand-normal G:rand-normal +Builtin rand-pcg G:rand-pcg rand-pcg-seed G:rand-pcg-seed rand-range G:rand-range rand-select G:rand-select +Builtin randbuf-pcg G:randbuf-pcg random G:random rdrop G:rdrop recurse G:recurse recurse-stack G:recurse-stack +Builtin ref@ G:ref@ reg! G:reg! reg@ G:reg@ regbin@ G:regbin@ remaining-args G:remaining-args repeat G:repeat +Builtin required? G:required? requires G:requires reset G:reset roll G:roll rop! G:rop! rot G:rot rpick G:rpick +Builtin rroll G:rroll rstack G:rstack rswap G:rswap rusage G:rusage s>ns G:s>ns same? G:same? scriptdir G:scriptdir +Builtin scriptfile G:scriptfile sem G:sem sem-post G:sem-post sem-rm G:sem-rm sem-wait G:sem-wait sem-wait? G:sem-wait? +Builtin sem>name G:sem>name semi-throw G:semi-throw set-wipe G:set-wipe setenv G:setenv setjmp G:setjmp +Builtin settings! G:settings! settings![] G:settings![] settings@ G:settings@ settings@? G:settings@? +Builtin settings@[] G:settings@[] sh G:sh sh$ G:sh$ short-days G:short-days short-months G:short-months +Builtin sleep G:sleep sleep-until G:sleep-until slog G:slog space G:space stack-check G:stack-check +Builtin stack-size G:stack-size step G:step sthrow G:sthrow string? G:string? struct: G:struct: swap G:swap 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 third G:third throw G:throw thrownull G:thrownull times G:times tlog G:tlog tri G:tri true G:true +Builtin tuck G:tuck type-check G:type-check typeassert G:typeassert uid G:uid uname G:uname unlock G:unlock +Builtin unpack G:unpack until G:until until! G:until! while G:while while! G:while! with: G:with: word? G:word? 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 (curry) I:(curry) notimpl I:notimpl sh I:sh 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:- / a:/ 2each a:2each +Builtin 2map a:2map 2map+ a:2map+ 2map= a:2map= = a:= @ a:@ @? a:@? _@ a:_@ all a:all any a:any bsearch a:bsearch +Builtin centroid a:centroid clear a:clear close a:close diff a:diff dot a:dot each a:each each! a:each! +Builtin each-slice a:each-slice exists? a:exists? filter a:filter generate a:generate group a:group +Builtin indexof a:indexof insert a:insert intersect a:intersect join a:join len a:len map a:map map+ a:map+ +Builtin map= a:map= mean a:mean mean&variance a:mean&variance merge a:merge new a:new op! a:op! open a:open +Builtin pop a:pop push a:push qsort a:qsort randeach a:randeach reduce a:reduce reduce+ a:reduce+ remove a:remove +Builtin rev a:rev shift a:shift shuffle a:shuffle slice a:slice slice+ a:slice+ slide a:slide smear a:smear +Builtin sort a:sort union a:union x a:x x-each a:x-each xchg a:xchg y a:y zip a:zip 8thdir app:8thdir +Builtin asset app:asset atrun app:atrun atrun app:atrun atrun app:atrun basedir app:basedir current app:current +Builtin datadir app:datadir exename app:exename lowmem app:lowmem main app:main name app:name oncrash app:oncrash +Builtin opts! app:opts! opts@ app:opts@ orientation app:orientation orientation! app:orientation! pid app:pid +Builtin post-main app:post-main pre-main app:pre-main raise app:raise request-perm app:request-perm +Builtin restart app:restart resumed app:resumed signal app:signal standalone app:standalone subdir app:subdir +Builtin suspended app:suspended sysquit app:sysquit terminated app:terminated trap app:trap (here) asm:(here) +Builtin >n asm:>n avail asm:avail c, asm:c, here! asm:here! n> asm:n> used asm:used w, asm:w, ! b:! +Builtin + b:+ / b:/ 1+ b:1+ 1- b:1- = b:= >base16 b:>base16 >base32 b:>base32 >base64 b:>base64 >base85 b:>base85 +Builtin >hex b:>hex >mpack b:>mpack @ b:@ append b:append base16> b:base16> base32> b:base32> base64> b:base64> +Builtin base85> b:base85> bit! b:bit! bit@ b:bit@ clear b:clear compress b:compress conv b:conv each b:each +Builtin each! b:each! each-slice b:each-slice expand b:expand fill b:fill getb b:getb hex> b:hex> len b:len +Builtin mem> b:mem> move b:move mpack-compat b:mpack-compat mpack-date b:mpack-date mpack-ignore b:mpack-ignore +Builtin mpack> b:mpack> n! b:n! n+ b:n+ n@ b:n@ new b:new op b:op pad b:pad rev b:rev search b:search +Builtin shmem b:shmem slice b:slice splice b:splice ungetb b:ungetb unpad b:unpad writable b:writable +Builtin 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 disconnect bt:disconnect init bt:init 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 conj c:conj conj c:conj im c:im n> c:n> new c:new new c:new re c:re >redir con:>redir accept con:accept +Builtin accept-pwd con:accept-pwd ansi? con:ansi? black con:black blue con:blue clreol con:clreol cls con:cls +Builtin cyan con:cyan down con:down free con:free getxy con:getxy gotoxy con:gotoxy green con:green +Builtin key con:key key? con:key? left con:left load-history con:load-history magenta con:magenta onBlack con:onBlack +Builtin onBlue con:onBlue onCyan con:onCyan onGreen con:onGreen onMagenta con:onMagenta onRed con:onRed +Builtin onWhite con:onWhite onYellow con:onYellow print con:print red con:red redir> con:redir> redir? con:redir? +Builtin right con:right save-history con:save-history size? con:size? up con:up white con:white yellow con:yellow +Builtin >aes128gcm cr:>aes128gcm >aes256gcm cr:>aes256gcm >cp cr:>cp >cpe cr:>cpe >decrypt cr:>decrypt +Builtin >edbox cr:>edbox >encrypt cr:>encrypt >nbuf cr:>nbuf >rsabox cr:>rsabox >uuid cr:>uuid CBC cr:CBC +Builtin CFB cr:CFB CTR cr:CTR ECB cr:ECB GCM cr:GCM OFB cr:OFB aad? cr:aad? aes128box-sig cr:aes128box-sig +Builtin aes128gcm> cr:aes128gcm> aes256box-sig cr:aes256box-sig aes256gcm> cr:aes256gcm> aesgcm cr:aesgcm +Builtin blakehash cr:blakehash chacha20box-sig cr:chacha20box-sig chachapoly cr:chachapoly cipher! cr:cipher! +Builtin cipher@ cr:cipher@ cp> cr:cp> cpe> cr:cpe> decrypt cr:decrypt decrypt+ cr:decrypt+ decrypt> cr:decrypt> +Builtin dh-genkey cr:dh-genkey dh-secret cr:dh-secret dh-sign cr:dh-sign dh-verify cr:dh-verify ebox-sig cr:ebox-sig +Builtin ecc-genkey cr:ecc-genkey ecc-secret cr:ecc-secret ecc-sign cr:ecc-sign ecc-verify cr:ecc-verify +Builtin edbox-sig cr:edbox-sig edbox> cr:edbox> encrypt cr:encrypt encrypt+ cr:encrypt+ encrypt> cr:encrypt> +Builtin ensurekey cr:ensurekey gcm-tag-size cr:gcm-tag-size genkey cr:genkey hash cr:hash hash! cr:hash! +Builtin hash+ cr:hash+ hash>b cr:hash>b hash>s cr:hash>s hash@ cr:hash@ hmac cr:hmac hotp cr:hotp iv? cr:iv? +Builtin mode cr:mode mode@ cr:mode@ rand cr:rand randbuf cr:randbuf randkey cr:randkey restore cr:restore +Builtin root-certs cr:root-certs rsa_decrypt cr:rsa_decrypt rsa_encrypt cr:rsa_encrypt rsa_sign cr:rsa_sign +Builtin rsa_verify cr:rsa_verify rsabox-sig cr:rsabox-sig rsabox> cr:rsabox> rsagenkey cr:rsagenkey +Builtin save cr:save sbox-sig cr:sbox-sig sha1-hmac cr:sha1-hmac shard cr:shard tag? cr:tag? totp cr:totp +Builtin totp-epoch cr:totp-epoch totp-time-step cr:totp-time-step unshard cr:unshard uuid cr:uuid uuid> cr:uuid> +Builtin validate-pgp-sig cr:validate-pgp-sig (.hebrew) d:(.hebrew) (.islamic) d:(.islamic) + d:+ +day d:+day +Builtin +hour d:+hour +min d:+min +msec d:+msec - d:- .hebrew d:.hebrew .islamic d:.islamic .time d:.time +Builtin / d:/ = d:= >fixed d:>fixed >hebepoch d:>hebepoch >jdn d:>jdn >msec d:>msec >unix d:>unix >ymd d:>ymd +Builtin ?= d:?= Adar d:Adar Adar2 d:Adar2 Adar2 d:Adar2 Av d:Av Elul d:Elul Fri d:Fri Heshvan d:Heshvan +Builtin Iyar d:Iyar Kislev d:Kislev Mon d:Mon Nissan d:Nissan Sat d:Sat Shevat d:Shevat Sivan d:Sivan +Builtin Sun d:Sun Tammuz d:Tammuz Tevet d:Tevet Thu d:Thu Tishrei d:Tishrei Tue d:Tue Wed d:Wed adjust-dst d:adjust-dst +Builtin approx! d:approx! approx? d:approx? approximates! d:approximates! between d:between d. d:d. +Builtin dawn d:dawn days-in-hebrew-year d:days-in-hebrew-year displaying-hebrew d:displaying-hebrew +Builtin do-dawn d:do-dawn do-dusk d:do-dusk do-rise d:do-rise doy d:doy dst? d:dst? dstquery d:dstquery +Builtin dstzones? d:dstzones? dusk d:dusk elapsed-timer d:elapsed-timer elapsed-timer-seconds d:elapsed-timer-seconds +Builtin first-dow d:first-dow fixed> d:fixed> fixed>dow d:fixed>dow fixed>hebrew d:fixed>hebrew fixed>islamic d:fixed>islamic +Builtin format d:format hanukkah d:hanukkah hebrew-epoch d:hebrew-epoch hebrew>fixed d:hebrew>fixed +Builtin hebrewtoday d:hebrewtoday hmonth-name d:hmonth-name islamic.epoch d:islamic.epoch islamic>fixed d:islamic>fixed +Builtin islamictoday d:islamictoday jdn> d:jdn> join d:join last-day-of-hebrew-month d:last-day-of-hebrew-month +Builtin last-dow d:last-dow last-month d:last-month last-week d:last-week last-year d:last-year latitude d:latitude +Builtin longitude d:longitude longitude d:longitude msec d:msec msec> d:msec> new d:new next-dow d:next-dow +Builtin next-month d:next-month next-week d:next-week next-year d:next-year number>hebrew d:number>hebrew +Builtin omer d:omer parse d:parse parse-approx d:parse-approx parse-range d:parse-range 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 ticks d:ticks ticks/sec d:ticks/sec timer d:timer timer-ctrl d:timer-ctrl tisha-beav d:tisha-beav +Builtin tzadjust d:tzadjust unix> d:unix> unknown d:unknown unknown? d:unknown? updatetz d:updatetz +Builtin year@ d:year@ ymd d:ymd ymd> d:ymd> yom-haatsmaut d:yom-haatsmaut yom-kippur d:yom-kippur add-func db:add-func +Builtin aes! db:aes! begin db:begin bind db:bind bind-exec db:bind-exec bind-exec[] db:bind-exec[] +Builtin close db:close col db:col col[] db:col[] col{} db:col{} commit db:commit each db:each exec db:exec +Builtin exec-cb db:exec-cb exec-name db:exec-name get db:get get-sub db:get-sub key db:key kind? db:kind? +Builtin last-rowid db:last-rowid mysql? db:mysql? odbc? db:odbc? open db:open open? db:open? prep-name db:prep-name +Builtin prepare db:prepare query db:query query-all db:query-all rekey db:rekey rollback db:rollback +Builtin set db:set set-sub db:set-sub sql@ db:sql@ bp dbg:bp except-task@ dbg:except-task@ go dbg:go +Builtin line-info dbg:line-info prompt dbg:prompt stop dbg:stop trace dbg:trace trace-enter dbg:trace-enter +Builtin trace-leave dbg:trace-leave / f:/ abspath f:abspath absrel f:absrel append f:append associate f:associate +Builtin atime f:atime canwrite? f:canwrite? chmod f:chmod close f:close copy f:copy copydir f:copydir +Builtin create f:create ctime f:ctime dir? f:dir? dname f:dname eachbuf f:eachbuf eachline f:eachline +Builtin enssep f:enssep eof? f:eof? exists? f:exists? flush f:flush fname f:fname getb f:getb getc f:getc +Builtin getline f:getline getmod f:getmod glob f:glob glob-nocase f:glob-nocase homedir f:homedir homedir! f:homedir! +Builtin include f:include ioctl f:ioctl join f:join launch f:launch link f:link link> f:link> link? f:link? +Builtin mkdir f:mkdir mmap f:mmap mmap-range f:mmap-range mmap-range? f:mmap-range? mtime f:mtime mv f:mv +Builtin name@ f:name@ open f:open open-ro f:open-ro popen f:popen print f:print read f:read read? f:read? +Builtin relpath f:relpath rglob f:rglob rm f:rm rmdir f:rmdir seek f:seek sep f:sep size f:size slurp f:slurp +Builtin sparse? f:sparse? spit f:spit stderr f:stderr stdin f:stdin stdout f:stdout tell f:tell times f:times +Builtin tmpspit f:tmpspit trash f:trash truncate f:truncate ungetb f:ungetb ungetc f:ungetc unzip f:unzip +Builtin unzip-entry f:unzip-entry watch f:watch write f:write writen f:writen zip+ f:zip+ zip@ f:zip@ +Builtin zipentry f:zipentry zipnew f:zipnew zipopen f:zipopen zipsave f:zipsave atlas! font:atlas! +Builtin atlas@ font:atlas@ default-size font:default-size info font:info ls font:ls measure font:measure +Builtin new font:new oversample font:oversample pixels font:pixels pixels? font:pixels? +edge gr:+edge +Builtin +edge+w gr:+edge+w +node gr:+node connect gr:connect edges gr:edges edges! gr:edges! m! gr:m! +Builtin m@ gr:m@ neighbors gr:neighbors new gr:new node-edges gr:node-edges nodes gr:nodes traverse gr:traverse +Builtin weight! gr:weight! + h:+ clear h:clear cmp! h:cmp! len h:len max! h:max! new h:new peek h:peek +Builtin pop h:pop push h:push unique h:unique arm? hw:arm? camera hw:camera camera-img hw:camera-img +Builtin camera-limits hw:camera-limits camera? hw:camera? cpu? hw:cpu? device? hw:device? displays? hw:displays? +Builtin displaysize? hw:displaysize? finger-match hw:finger-match finger-support hw:finger-support +Builtin gpio hw:gpio gpio! hw:gpio! gpio-mmap hw:gpio-mmap gpio@ hw:gpio@ i2c hw:i2c i2c! hw:i2c! i2c!reg hw:i2c!reg +Builtin i2c@ hw:i2c@ i2c@reg hw:i2c@reg isround? hw:isround? iswatch? hw:iswatch? mac? hw:mac? mem? hw:mem? +Builtin model? hw:model? poll hw:poll sensor hw:sensor start hw:start stop hw:stop uid? hw:uid? fetch-full imap:fetch-full +Builtin fetch-uid-mail imap:fetch-uid-mail login imap:login logout imap:logout new imap:new search imap:search +Builtin select-inbox imap:select-inbox >file img:>file >fmt img:>fmt copy img:copy crop img:crop data img:data +Builtin desat img:desat fill img:fill fillrect img:fillrect filter img:filter flip img:flip from-svg img:from-svg +Builtin new img:new pix! img:pix! pix@ img:pix@ qr-gen img:qr-gen qr-parse img:qr-parse rotate img:rotate +Builtin scale img:scale scroll img:scroll size img:size countries iso:countries find loc:find sort loc:sort +Builtin ! m:! !? m:!? + m:+ +? m:+? - m:- >arr m:>arr @ m:@ @? m:@? _! m:_! _@ m:_@ arr> m:arr> bitmap m:bitmap +Builtin clear m:clear data m:data each m:each exists? m:exists? filter m:filter iter m:iter iter-all m:iter-all +Builtin keys m:keys len m:len map m:map merge m:merge new m:new op! m:op! open m:open slice m:slice +Builtin vals m:vals xchg m:xchg zip m:zip ! mat:! * mat:* + mat:+ = mat:= @ mat:@ affine mat:affine +Builtin col mat:col data mat:data det mat:det dim? mat:dim? get-n mat:get-n ident mat:ident inv mat:inv +Builtin m. mat:m. minor mat:minor n* mat:n* new mat:new new-minor mat:new-minor rotate mat:rotate row mat:row +Builtin same-size? mat:same-size? scale mat:scale shear mat:shear trans mat:trans translate mat:translate +Builtin xform mat:xform 2console md:2console 2html md:2html 2nk md:2nk bounds meta:bounds color meta:color +Builtin console meta:console end meta:end ffi meta:ffi ! n:! * n:* */ n:*/ + n:+ +! n:+! - n:- / n:/ +Builtin /mod n:/mod 1+ n:1+ 1- n:1- < n:< = n:= > n:> BIGE n:BIGE BIGPI n:BIGPI E n:E PI n:PI ^ n:^ +Builtin _mod n:_mod abs n:abs acos n:acos acos n:acos asin n:asin asin n:asin atan n:atan atan n:atan +Builtin atan2 n:atan2 band n:band between n:between bfloat n:bfloat bic n:bic bint n:bint binv n:binv +Builtin bnot n:bnot bor n:bor bxor n:bxor cast n:cast ceil n:ceil clamp n:clamp cmp n:cmp comb n:comb +Builtin cos n:cos cosd n:cosd emod n:emod exp n:exp expm1 n:expm1 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 ln1p n:ln1p max n:max median n:median min n:min mod n:mod neg n:neg odd? n:odd? perm n:perm +Builtin prime? n:prime? quantize n:quantize quantize! n:quantize! r+ n:r+ range n:range rot32l n:rot32l +Builtin rot32r n:rot32r round n:round round2 n:round2 rounding n:rounding running-variance n:running-variance +Builtin running-variance-finalize n:running-variance-finalize sgn n:sgn shl n:shl shr n:shr sin n:sin +Builtin sind n:sind sqr n:sqr sqrt n:sqrt tan n:tan tand n:tand trunc n:trunc ~= n:~= ! net:! !? net:!? +Builtin - net:- >url net:>url @ net:@ @? net:@? DGRAM net:DGRAM INET4 net:INET4 INET6 net:INET6 PROTO_TCP net:PROTO_TCP +Builtin PROTO_UDP net:PROTO_UDP STREAM net:STREAM accept net:accept addrinfo>o net:addrinfo>o again? net:again? +Builtin alloc-and-read net:alloc-and-read alloc-buf net:alloc-buf bind net:bind close net:close closed? net:closed? +Builtin connect net:connect debug? net:debug? delete net:delete get net:get getaddrinfo net:getaddrinfo +Builtin getpeername net:getpeername head net:head ifaces? net:ifaces? listen net:listen map>url net:map>url +Builtin net-socket net:net-socket opts net:opts port-is-ssl? net:port-is-ssl? post net:post proxy! net:proxy! +Builtin put net:put read net:read read-all net:read-all recvfrom net:recvfrom s>url net:s>url sendto net:sendto +Builtin server net:server setsockopt net:setsockopt socket net:socket tlshello net:tlshello url> net:url> +Builtin user-agent net:user-agent wait net:wait write net:write (begin) nk:(begin) (chart-begin) nk:(chart-begin) +Builtin (chart-begin-colored) nk:(chart-begin-colored) (chart-end) nk:(chart-end) (end) nk:(end) (group-begin) nk:(group-begin) +Builtin (group-end) nk:(group-end) (property) nk:(property) >img nk:>img addfont nk:addfont anti-alias nk:anti-alias +Builtin any-clicked? nk:any-clicked? bounds nk:bounds bounds! nk:bounds! button nk:button button-color nk:button-color +Builtin button-label nk:button-label button-set-behavior nk:button-set-behavior button-symbol nk:button-symbol +Builtin button-symbol-label nk:button-symbol-label chart-add-slot nk:chart-add-slot chart-add-slot-colored nk:chart-add-slot-colored +Builtin chart-push nk:chart-push chart-push-slot nk:chart-push-slot checkbox nk:checkbox clicked? nk:clicked? +Builtin close-this! nk:close-this! close-this? nk:close-this? close? nk:close? color-picker nk:color-picker +Builtin combo nk:combo combo-begin-color nk:combo-begin-color combo-begin-label nk:combo-begin-label +Builtin combo-cb nk:combo-cb combo-end nk:combo-end contextual-begin nk:contextual-begin contextual-close nk:contextual-close +Builtin contextual-end nk:contextual-end contextual-item-image-text nk:contextual-item-image-text contextual-item-symbol-text nk:contextual-item-symbol-text +Builtin contextual-item-text nk:contextual-item-text cp! nk:cp! cp@ nk:cp@ display-info nk:display-info +Builtin display@ nk:display@ do nk:do down? nk:down? draw-image nk:draw-image draw-image-at nk:draw-image-at +Builtin draw-image-centered nk:draw-image-centered draw-sub-image nk:draw-sub-image draw-text nk:draw-text +Builtin draw-text-high nk:draw-text-high draw-text-wrap nk:draw-text-wrap edit-focus nk:edit-focus +Builtin edit-string nk:edit-string event nk:event event-boost nk:event-boost event-msec nk:event-msec +Builtin event-wait nk:event-wait fill-arc nk:fill-arc fill-circle nk:fill-circle fill-poly nk:fill-poly +Builtin fill-rect nk:fill-rect fill-rect-color nk:fill-rect-color fill-triangle nk:fill-triangle flags! nk:flags! +Builtin flags@ nk:flags@ fullscreen nk:fullscreen get nk:get get-row-height nk:get-row-height getfont nk:getfont +Builtin getmap nk:getmap gl? nk:gl? grid nk:grid grid-push nk:grid-push group-scroll-ofs nk:group-scroll-ofs +Builtin group-scroll-ofs! nk:group-scroll-ofs! hovered? nk:hovered? image nk:image init nk:init input-button nk:input-button +Builtin input-key nk:input-key input-motion nk:input-motion input-scroll nk:input-scroll input-string nk:input-string +Builtin key-down? nk:key-down? key-pressed? nk:key-pressed? key-released? nk:key-released? label nk:label +Builtin label-colored nk:label-colored label-wrap nk:label-wrap label-wrap-colored nk:label-wrap-colored +Builtin layout-bounds nk:layout-bounds layout-grid-begin nk:layout-grid-begin layout-grid-end nk:layout-grid-end +Builtin layout-push-dynamic nk:layout-push-dynamic layout-push-static nk:layout-push-static layout-push-variable nk:layout-push-variable +Builtin layout-ratio-from-pixel nk:layout-ratio-from-pixel layout-reset-row-height nk:layout-reset-row-height +Builtin layout-row nk:layout-row layout-row-begin nk:layout-row-begin layout-row-dynamic nk:layout-row-dynamic +Builtin layout-row-end nk:layout-row-end layout-row-height nk:layout-row-height layout-row-push nk:layout-row-push +Builtin layout-row-static nk:layout-row-static layout-row-template-begin nk:layout-row-template-begin +Builtin layout-row-template-end nk:layout-row-template-end layout-space-begin nk:layout-space-begin +Builtin layout-space-end nk:layout-space-end layout-space-push nk:layout-space-push layout-widget-bounds nk:layout-widget-bounds +Builtin list-begin nk:list-begin list-end nk:list-end list-new nk:list-new list-range nk:list-range +Builtin m! nk:m! m@ nk:m@ make-style nk:make-style max-vertex-element nk:max-vertex-element measure nk:measure +Builtin measure-font nk:measure-font menu-begin nk:menu-begin menu-close nk:menu-close menu-end nk:menu-end +Builtin menu-item-image nk:menu-item-image menu-item-label nk:menu-item-label menu-item-symbol nk:menu-item-symbol +Builtin menubar-begin nk:menubar-begin menubar-end nk:menubar-end mouse-pos nk:mouse-pos msgdlg nk:msgdlg +Builtin option nk:option plot nk:plot plot-fn nk:plot-fn pop-font nk:pop-font popup-begin nk:popup-begin +Builtin popup-close nk:popup-close popup-end nk:popup-end popup-scroll-ofs nk:popup-scroll-ofs popup-scroll-ofs! nk:popup-scroll-ofs! +Builtin progress nk:progress prop-int nk:prop-int pt>local nk:pt>local pt>screen nk:pt>screen pts>rect nk:pts>rect +Builtin push-font nk:push-font rect-center nk:rect-center rect-intersect nk:rect-intersect rect-ofs nk:rect-ofs +Builtin rect-pad nk:rect-pad rect-shrink nk:rect-shrink rect-union nk:rect-union rect/high nk:rect/high +Builtin rect/wide nk:rect/wide rect>center nk:rect>center rect>local nk:rect>local rect>pos nk:rect>pos +Builtin rect>pts nk:rect>pts rect>screen nk:rect>screen rect>size nk:rect>size released? nk:released? +Builtin render nk:render restore nk:restore rotate nk:rotate save nk:save scale nk:scale scancode? nk:scancode? +Builtin screen-saver nk:screen-saver screen-size nk:screen-size screen-win-close nk:screen-win-close +Builtin selectable nk:selectable set nk:set set-font nk:set-font set-num-vertices nk:set-num-vertices +Builtin setpos nk:setpos setwin nk:setwin slider nk:slider slider-int nk:slider-int space nk:space +Builtin spacing nk:spacing stroke-arc nk:stroke-arc stroke-circle nk:stroke-circle stroke-curve nk:stroke-curve +Builtin stroke-line nk:stroke-line stroke-polygon nk:stroke-polygon stroke-polyline nk:stroke-polyline +Builtin stroke-rect nk:stroke-rect stroke-tri nk:stroke-tri style-from-table nk:style-from-table sw-gl nk:sw-gl +Builtin text? nk:text? tooltip nk:tooltip translate nk:translate tree-pop nk:tree-pop tree-state-push nk:tree-state-push +Builtin use-style nk:use-style vsync nk:vsync widget nk:widget widget-bounds nk:widget-bounds widget-fitting nk:widget-fitting +Builtin widget-high nk:widget-high widget-hovered? nk:widget-hovered? widget-mouse-click-down? nk:widget-mouse-click-down? +Builtin widget-mouse-clicked? nk:widget-mouse-clicked? widget-pos nk:widget-pos widget-size nk:widget-size +Builtin widget-wide nk:widget-wide win nk:win win-bounds nk:win-bounds win-bounds! nk:win-bounds! win-close nk:win-close +Builtin win-closed? nk:win-closed? win-collapse nk:win-collapse win-collapsed? nk:win-collapsed? win-content-bounds nk:win-content-bounds +Builtin win-focus nk:win-focus win-focused? nk:win-focused? win-hidden? nk:win-hidden? win-high nk:win-high +Builtin win-hovered? nk:win-hovered? win-pos nk:win-pos win-scroll-ofs nk:win-scroll-ofs win-scroll-ofs! nk:win-scroll-ofs! +Builtin win-show nk:win-show win-size nk:win-size win-wide nk:win-wide win? nk:win? MAX ns:MAX ! o:! +Builtin + o:+ +? o:+? ??? o:??? @ o:@ class o:class exec o:exec isa o:isa method o:method mutate o:mutate +Builtin new o:new super o:super devname os:devname env os:env lang os:lang mem-arenas os:mem-arenas +Builtin notify os:notify region os:region cast ptr:cast len ptr:len null? ptr:null? pack ptr:pack unpack ptr:unpack +Builtin unpack_orig ptr:unpack_orig publish pubsub:publish qsize pubsub:qsize subscribe pubsub:subscribe 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 pop q:pop push q:push remove q:remove shift q:shift size q:size slide q:slide throwing q:throwing +Builtin wait q:wait ++match r:++match +/ r:+/ +match r:+match / r:/ @ r:@ len r:len match r:match new r:new +Builtin rx r:rx str r:str * rat:* + rat:+ - rat:- / rat:/ >n rat:>n >s rat:>s new rat:new proper rat:proper +Builtin ! s:! * s:* + s:+ - s:- / s:/ /scripts s:/scripts <+ s:<+ = s:= =ic s:=ic >base64 s:>base64 +Builtin >ucs2 s:>ucs2 @ s:@ append s:append base64> s:base64> clear s:clear cmp s:cmp cmpi s:cmpi compress s:compress +Builtin days! s:days! dist s:dist each s:each each! s:each! eachline s:eachline escape s:escape expand s:expand +Builtin fill s:fill fmt s:fmt fold s:fold gershayim s:gershayim globmatch s:globmatch hexupr s:hexupr +Builtin insert s:insert intl s:intl intl! s:intl! lang s:lang lc s:lc lc? s:lc? len s:len lsub s:lsub +Builtin ltrim s:ltrim map s:map months! s:months! new s:new norm s:norm reduce s:reduce repinsert s:repinsert +Builtin replace s:replace replace! s:replace! rev s:rev rsearch s:rsearch rsub s:rsub rtrim s:rtrim +Builtin script? s:script? search s:search size s:size slice s:slice soundex s:soundex strfmap s:strfmap +Builtin strfmt s:strfmt text-wrap s:text-wrap trim s:trim tsub s:tsub uc s:uc uc? s:uc? ucs2> s:ucs2> +Builtin utf8? s:utf8? zt s:zt close sio:close enum sio:enum open sio:open opts! sio:opts! opts@ sio:opts@ +Builtin read sio:read write sio:write @ slv:@ auto slv:auto build slv:build constraint slv:constraint +Builtin dump slv:dump edit slv:edit named-variable slv:named-variable new slv:new relation slv:relation +Builtin reset slv:reset suggest slv:suggest term slv:term update slv:update v[] slv:v[] variable slv:variable +Builtin v{} slv:v{} new smtp:new send smtp:send apply-filter snd:apply-filter devices? snd:devices? +Builtin end-record snd:end-record filter snd:filter formats? snd:formats? freq snd:freq gain snd:gain +Builtin gain? snd:gain? init snd:init len snd:len loop snd:loop loop? snd:loop? mix snd:mix new snd:new +Builtin pause snd:pause play snd:play played snd:played rate snd:rate ready? snd:ready? record snd:record +Builtin resume snd:resume seek snd:seek stop snd:stop stopall snd:stopall volume snd:volume volume? snd:volume? +Builtin + st:+ . st:. clear st:clear len st:len ndrop st:ndrop new st:new op! st:op! peek st:peek pick st:pick +Builtin pop st:pop push st:push roll st:roll shift st:shift size st:size slide st:slide swap st:swap +Builtin throwing st:throwing >buf struct:>buf arr> struct:arr> buf struct:buf buf> struct:buf> byte struct:byte +Builtin double struct:double field! struct:field! field@ struct:field@ float struct:float ignore struct:ignore +Builtin int struct:int long struct:long struct; struct:struct; word struct:word ! t:! @ t:@ by-name t:by-name +Builtin cor t:cor cor-drop t:cor-drop curtask t:curtask def-queue t:def-queue def-stack t:def-stack +Builtin done? t:done? err! t:err! err? t:err? errno? t:errno? getq t:getq handler t:handler handler@ t:handler@ +Builtin kill t:kill list t:list main t:main max-exceptions t:max-exceptions name! t:name! name@ t:name@ +Builtin notify t:notify parent t:parent pop t:pop priority t:priority push t:push q-notify t:q-notify +Builtin q-wait t:q-wait qlen t:qlen result t:result set-affinity t:set-affinity setq t:setq start t:start +Builtin task t:task task-n t:task-n task-stop t:task-stop wait t:wait yield t:yield yield! t:yield! +Builtin add tree:add binary tree:binary bk tree:bk btree tree:btree cmp! tree:cmp! data tree:data del tree:del +Builtin find tree:find iter tree:iter next tree:next nodes tree:nodes parent tree:parent parse tree:parse +Builtin prev tree:prev root tree:root search tree:search trie tree:trie ! w:! (is) w:(is) @ w:@ alias: w:alias: +Builtin cb w:cb deprecate w:deprecate dlcall w:dlcall dlopen w:dlopen dlsym w:dlsym exec w:exec exec? w:exec? +Builtin ffifail w:ffifail find w:find forget w:forget is w:is name w:name undo w:undo >s xml:>s >txt xml:>txt +Builtin md-init xml:md-init md-parse xml:md-parse 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! @@ -282,19 +357,16 @@ syn match eighthInteger "\<'.\>" syn region eighthString start=+\.\?\"+ skip=+"+ end=+$+ syn keyword jsonNull null syn keyword jsonBool /\(true\|false\)/ - syn region eighthString start=/\<"/ end=/"\>/ +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 @@ -322,18 +394,15 @@ if !exists("did_eighth_syntax_inits") 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 + 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 +" vim: ft=vim:ts=8:sw=4:nocindent:smartindent: diff --git a/syntax/Dockerfile.vim b/syntax/Dockerfile.vim deleted file mode 100644 index 2f68794c6..000000000 --- a/syntax/Dockerfile.vim +++ /dev/null @@ -1,63 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 - -" Vim syntax file -" Language: Dockerfile -" Maintainer: Eugene Kalinin -" Latest Revision: 11 September 2013 -" Source: http://docs.docker.io/en/latest/use/builder/ - -if exists("b:current_syntax") - finish -endif - -" case sensitivity (fix #17) -" syn case ignore - -" Keywords -syn keyword dockerfileKeywords FROM AS MAINTAINER RUN CMD COPY -syn keyword dockerfileKeywords EXPOSE ADD ENTRYPOINT -syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD -syn keyword dockerfileKeywords LABEL ARG HEALTHCHECK SHELL STOPSIGNAL - -" Bash statements -setlocal iskeyword+=- -syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle -syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep -syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln -syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby -syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum -syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl -syn keyword bashStatement wget gzip - -" Strings -syn region dockerfileString start=/"/ skip=/\\"|\\\\/ end=/"/ -syn region dockerfileString1 start=/'/ skip=/\\'|\\\\/ end=/'/ - -" Emails -syn region dockerfileEmail start=// contains=@ oneline - -" Urls -syn match dockerfileUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\._]\+/ - -" Task tags -syn keyword dockerfileTodo contained TODO FIXME XXX - -" Comments -syn region dockerfileComment start="#" end="\n" contains=dockerfileTodo -syn region dockerfileEnvWithComment start="^\s*ENV\>" end="\n" contains=dockerfileEnv -syn match dockerfileEnv contained /\/ - -" Highlighting -hi link dockerfileKeywords Keyword -hi link dockerfileEnv Keyword -hi link dockerfileString String -hi link dockerfileString1 String -hi link dockerfileComment Comment -hi link dockerfileEmail Identifier -hi link dockerfileUrl Identifier -hi link dockerfileTodo Todo -hi link bashStatement Function - -let b:current_syntax = "dockerfile" - -endif diff --git a/syntax/Jenkinsfile.vim b/syntax/Jenkinsfile.vim index 3f175903b..5959fd701 100644 --- a/syntax/Jenkinsfile.vim +++ b/syntax/Jenkinsfile.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1 +if polyglot#init#is_disabled(expand(':p'), 'jenkins', 'syntax/Jenkinsfile.vim') + finish +endif runtime syntax/groovy.vim syn keyword jenkinsfileBuiltInVariable currentBuild @@ -9,6 +11,7 @@ syn keyword jenkinsfileDirective environment options parameters triggers stage t syn keyword jenkinsfileOption contained buildDiscarder disableConcurrentBuilds overrideIndexTriggers skipDefaultCheckout nextgroup=jenkinsfileOptionParams syn keyword jenkinsfileOption contained skipStagesAfterUnstable checkoutToSubdirectory timeout retry timestamps nextgroup=jenkinsfileOptionParams +syn keyword jenkinsfileOption contained disableResume newContainerPerStage preserveStashes quietPeriod parallelsAlwaysFailFast nextgroup=jenkinsfileOptionParams syn region jenkinsfileOptionParams contained start='(' end=')' transparent contains=@groovyTop syn match jenkinsfileOptionO /[a-zA-Z]\+([^)]*)/ contains=jenkinsfileOption,jenkinsfileOptionParams transparent containedin=groovyParenT1 @@ -126,5 +129,3 @@ hi link jenkinsFileDockerKeyword jenkinsfilePipelineStep let b:current_syntax = 'Jenkinsfile' " vim:set et sw=0 ts=2 ft=vim tw=78: - -endif diff --git a/syntax/a2ps.vim b/syntax/a2ps.vim index 3c0900e94..d9f845f57 100644 --- a/syntax/a2ps.vim +++ b/syntax/a2ps.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 +if polyglot#init#is_disabled(expand(':p'), 'a2ps', 'syntax/a2ps.vim') + finish +endif " Vim syntax file " Language: a2ps(1) configuration file @@ -71,5 +73,3 @@ let b:current_syntax = "a2ps" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/a65.vim b/syntax/a65.vim index 01215767c..c40729b35 100644 --- a/syntax/a65.vim +++ b/syntax/a65.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a65') == -1 +if polyglot#init#is_disabled(expand(':p'), 'a65', 'syntax/a65.vim') + finish +endif " Vim syntax file " Language: xa 6502 cross assembler @@ -153,5 +155,3 @@ hi def link a65HiLo Number let b:current_syntax = "a65" - -endif diff --git a/syntax/aap.vim b/syntax/aap.vim index 7c443ac27..47ce8c1e5 100644 --- a/syntax/aap.vim +++ b/syntax/aap.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 +if polyglot#init#is_disabled(expand(':p'), 'aap', 'syntax/aap.vim') + finish +endif " Vim syntax file " Language: A-A-P recipe @@ -158,5 +160,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/abap.vim b/syntax/abap.vim index 7115c3d8a..534e06ef2 100644 --- a/syntax/abap.vim +++ b/syntax/abap.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 +if polyglot#init#is_disabled(expand(':p'), 'abap', 'syntax/abap.vim') + finish +endif " Vim ABAP syntax file " Language: SAP - ABAP/R4 " Maintainer: Marius Piedallu van Wyk -" Last Change: 2018 Dec 12 +" Last Change: 2021 Jan 02 " Comment: Thanks to EPI-USE Labs for all your assistance. :) " Quit when a syntax file was already loaded @@ -196,4 +198,3 @@ 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 index a54e9fe89..d7bc19076 100644 --- a/syntax/abaqus.vim +++ b/syntax/abaqus.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 +if polyglot#init#is_disabled(expand(':p'), 'abaqus', 'syntax/abaqus.vim') + finish +endif " Vim syntax file " Language: Abaqus finite element input file (www.hks.com) @@ -35,5 +37,3 @@ hi def link abaqusBadLine Error let b:current_syntax = "abaqus" - -endif diff --git a/syntax/abc.vim b/syntax/abc.vim index a44a929de..d81c9f482 100644 --- a/syntax/abc.vim +++ b/syntax/abc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abc') == -1 +if polyglot#init#is_disabled(expand(':p'), 'abc', 'syntax/abc.vim') + finish +endif " Vim syntax file " Language: abc music notation language @@ -51,5 +53,3 @@ hi def link abcNote Constant let b:current_syntax = "abc" " vim: ts=4 - -endif diff --git a/syntax/abel.vim b/syntax/abel.vim index 4cd9e35fb..c6adb940e 100644 --- a/syntax/abel.vim +++ b/syntax/abel.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abel') == -1 +if polyglot#init#is_disabled(expand(':p'), 'abel', 'syntax/abel.vim') + finish +endif " Vim syntax file " Language: ABEL @@ -61,7 +63,7 @@ syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelType syn match abelTypeIdChar "[,']" contained syn match abelTypeIdEnd ";" contained -" string contstants and special characters within them +" string constants and special characters within them syn match abelSpecial contained "\\['\\]" syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial @@ -161,5 +163,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8 - -endif diff --git a/syntax/acedb.vim b/syntax/acedb.vim index b382bdd3a..705cff1c0 100644 --- a/syntax/acedb.vim +++ b/syntax/acedb.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acedb') == -1 +if polyglot#init#is_disabled(expand(':p'), 'acedb', 'syntax/acedb.vim') + finish +endif " Vim syntax file " Language: AceDB model files @@ -110,5 +112,3 @@ let b:current_syntax = "acedb" " The structure of the model.wrm file is sensitive to mixed tab and space " indentation and assumes tabs are 8 so... se ts=8 - -endif diff --git a/syntax/ada.vim b/syntax/ada.vim index f8093d8a5..fcf74e397 100644 --- a/syntax/ada.vim +++ b/syntax/ada.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ada', 'syntax/ada.vim') + finish +endif "---------------------------------------------------------------------------- " Description: Vim Ada syntax file @@ -161,7 +163,7 @@ 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. +" begin, package, task etc. Assigning it to adaEnd. syntax match adaEnd /\/ syntax keyword adaPreproc pragma @@ -368,5 +370,3 @@ finish " 1}}} "------------------------------------------------------------------------------ "vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab "vim: foldmethod=marker - -endif diff --git a/syntax/ahdl.vim b/syntax/ahdl.vim index 1457255e5..80739e1f8 100644 --- a/syntax/ahdl.vim +++ b/syntax/ahdl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ahdl') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ahdl', 'syntax/ahdl.vim') + finish +endif " Vim syn file " Language: Altera AHDL @@ -40,7 +42,7 @@ syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc syn keyword ahdlTodo contained TODO -" String contstants +" String constants syn region ahdlString start=+"+ skip=+\\"+ end=+"+ " valid integer number formats (decimal, binary, octal, hex) @@ -81,5 +83,3 @@ hi def link ahdlTodo Todo let b:current_syntax = "ahdl" " vim:ts=8 - -endif diff --git a/syntax/aidl.vim b/syntax/aidl.vim index d9c88ab47..524a8938e 100644 --- a/syntax/aidl.vim +++ b/syntax/aidl.vim @@ -1,10 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aidl') == -1 +if polyglot#init#is_disabled(expand(':p'), 'aidl', 'syntax/aidl.vim') + finish +endif " Vim syntax file " Language: aidl (Android Interface Definition Language) " https://developer.android.com/guide/components/aidl " Maintainer: Dominique Pelle -" LastChange: 2020/07/25 +" LastChange: 2020/12/03 " Quit when a syntax file was already loaded. if exists("b:current_syntax") @@ -14,7 +16,7 @@ endif source :p:h/java.vim syn keyword aidlParamDir in out inout -syn keyword aidlKeyword oneway parcelable +syn keyword aidlKeyword const oneway parcelable " Needed for the 'in', 'out', 'inout' keywords to be highlighted. syn cluster javaTop add=aidlParamDir @@ -23,5 +25,3 @@ hi def link aidlParamDir StorageClass hi def link aidlKeyword Keyword let b:current_syntax = "aidl" - -endif diff --git a/syntax/alsaconf.vim b/syntax/alsaconf.vim index 152c2c9f5..e3673a222 100644 --- a/syntax/alsaconf.vim +++ b/syntax/alsaconf.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 +if polyglot#init#is_disabled(expand(':p'), 'alsaconf', 'syntax/alsaconf.vim') + finish +endif " Vim syntax file " Language: alsaconf(8) configuration file @@ -49,5 +51,3 @@ let b:current_syntax = "alsaconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/aml.vim b/syntax/aml.vim index 44f62facd..34a9f3d5a 100644 --- a/syntax/aml.vim +++ b/syntax/aml.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aml') == -1 +if polyglot#init#is_disabled(expand(':p'), 'aml', 'syntax/aml.vim') + finish +endif " Vim syntax file " Language: AML (ARC/INFO Arc Macro Language) @@ -144,5 +146,3 @@ hi def link amlTab amlArcCmd let b:current_syntax = "aml" - -endif diff --git a/syntax/ampl.vim b/syntax/ampl.vim index 699d33dcc..59f33cb11 100644 --- a/syntax/ampl.vim +++ b/syntax/ampl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ampl') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ampl', 'syntax/ampl.vim') + finish +endif " Language: ampl (A Mathematical Programming Language) " Maintainer: Krief David or @@ -140,5 +142,3 @@ let b:current_syntax = "ampl" " vim: ts=8 - -endif diff --git a/syntax/ansible.vim b/syntax/ansible.vim index 72dc977c9..1398a8c76 100644 --- a/syntax/ansible.vim +++ b/syntax/ansible.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ansible', 'syntax/ansible.vim') + finish +endif " Vim syntax file " Language: Ansible YAML/Jinja templates @@ -85,31 +87,44 @@ execute 'syn keyword ansible_debug_keywords debug containedin='.s:yamlKey.' cont highlight default link ansible_debug_keywords Debug if exists("g:ansible_extra_keywords_highlight") - execute 'syn keyword ansible_extra_special_keywords register always_run changed_when failed_when no_log args vars delegate_to ignore_errors containedin='.s:yamlKey.' contained' - highlight link ansible_extra_special_keywords Statement + execute 'syn keyword ansible_extra_special_keywords + \ become become_exe become_flags become_method become_user become_pass prompt_l10n + \ debugger always_run check_mode diff no_log args tags force_handlers + \ vars vars_files vars_prompt delegate_facts delegate_to + \ any_errors_fatal ignore_errors ignore_unreachable max_fail_percentage + \ connection children hosts port remote_user module_defaults + \ environment fact_path gather_facts gather_subset gather_timeout + \ async poll throttle timeout order run_once serial strategy + \ containedin='.s:yamlKey.' contained' + if exists("g:ansible_extra_keywords_highlight_group") + execute 'highlight link ansible_extra_special_keywords '.g:ansible_extra_keywords_highlight_group + else + highlight link ansible_extra_special_keywords Structure + endif endif -execute 'syn keyword ansible_normal_keywords include include_tasks import_tasks until retries delay when only_if become become_user block rescue always notify containedin='.s:yamlKey.' contained' +execute 'syn keyword ansible_normal_keywords + \ include include_role include_tasks include_vars import_role import_playbook import_tasks + \ when changed_when failed_when block rescue always notify listen register + \ action local_action post_tasks pre_tasks tasks handlers roles collections + \ containedin='.s:yamlKey.' contained' if exists("g:ansible_normal_keywords_highlight") execute 'highlight link ansible_normal_keywords '.g:ansible_normal_keywords_highlight else highlight default link ansible_normal_keywords Statement endif -execute 'syn match ansible_with_keywords "\vwith_.+" containedin='.s:yamlKey.' contained' -if exists("g:ansible_with_keywords_highlight") - execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight -else - highlight default link ansible_with_keywords Statement -endif - -execute 'syn keyword ansible_with_keywords loop containedin='.s:yamlKey.' contained' -if exists("g:ansible_with_keywords_highlight") - execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight +execute 'syn keyword ansible_loop_keywords + \ loop loop_control until retries delay + \ containedin='.s:yamlKey.' contained' +execute 'syn match ansible_loop_keywords "\vwith_.+" containedin='.s:yamlKey.' contained' +if exists("g:ansible_loop_keywords_highlight") + execute 'highlight link ansible_loop_keywords '.g:ansible_loop_keywords_highlight +" backward compatibility: ansible_with_keywords_highlight replaced by ansible_loop_keywords_highlight +elseif exists("g:ansible_with_keywords_highlight") + execute 'highlight link ansible_loop_keywords '.g:ansible_with_keywords_highlight else - highlight default link ansible_with_keywords Statement + highlight default link ansible_loop_keywords Statement endif let b:current_syntax = "ansible" - -endif diff --git a/syntax/ansible_hosts.vim b/syntax/ansible_hosts.vim index 5bdf05303..dcf1de8ed 100644 --- a/syntax/ansible_hosts.vim +++ b/syntax/ansible_hosts.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ansible', 'syntax/ansible_hosts.vim') + finish +endif " Vim syntax file " Language: Ansible hosts files @@ -31,5 +33,3 @@ if exists("g:ansible_attribute_highlight") endif let b:current_syntax = "ansible_hosts" - -endif diff --git a/syntax/ant.vim b/syntax/ant.vim index 0930401a7..c1729e0ef 100644 --- a/syntax/ant.vim +++ b/syntax/ant.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ant', 'syntax/ant.vim') + finish +endif " Vim syntax file " Language: ANT build file (xml) @@ -97,5 +99,3 @@ let &cpo = s:ant_cpo_save unlet s:ant_cpo_save " vim: ts=8 - -endif diff --git a/syntax/apache.vim b/syntax/apache.vim index b515c4114..3dc07a7fc 100644 --- a/syntax/apache.vim +++ b/syntax/apache.vim @@ -1,11 +1,13 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apache') == -1 +if polyglot#init#is_disabled(expand(':p'), 'apache', 'syntax/apache.vim') + finish +endif " Vim syntax file " Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess) " Maintainer: David Necas (Yeti) " License: This file can be redistribued and/or modified under the same terms " as Vim itself. -" Last Change: 2018-12-06 +" Last Change: 2020 Oct 07 " 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? @@ -44,6 +46,8 @@ syn keyword apacheOption user group syn match apacheOption "\" syn case match syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained +" Added as suggested by Mikko Koivunalho +syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL 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 @@ -201,5 +205,3 @@ hi def link apacheUserID Number let b:current_syntax = "apache" - -endif diff --git a/syntax/apachestyle.vim b/syntax/apachestyle.vim new file mode 100644 index 000000000..5d3fe2102 --- /dev/null +++ b/syntax/apachestyle.vim @@ -0,0 +1,58 @@ +if polyglot#init#is_disabled(expand(':p'), 'apachestyle', 'syntax/apachestyle.vim') + finish +endif + +" Vim syntax file +" Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) +" Maintainer: Ben RUBSON +" Former Maintainer: Christian Hammers +" ChangeLog: +" 2017-12-17,ch +" correctly detect comments +" 2001-05-04,ch +" adopted Vim 6.0 syntax style +" 1999-10-28,ch +" initial release + +" The following formats are recognised: +" Apache-style .conf +" # Comment +" Option value +" Option value1 value2 +" Option = value1 value2 #not apache but also allowed +"
+" Option value +" +" +"
+ +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match apOption /^\s*[^ \t#<=]*/ +syn match apComment /^\s*#.*$/ +"syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly + +" tags +syn region apTag start=// contains=apTagOption,apTagError +" the following should originally be " [^<>]+" but this didn't work :( +syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 +syn match apTagError contained /[^>]:p'), 'apiblueprint', 'syntax/apiblueprint.vim') + finish +endif runtime! syntax/markdown.vim unlet! b:current_syntax @@ -34,5 +36,3 @@ highlight default link apibActionRelationKey Identifier let b:current_syntax = 'apiblueprint' - -endif diff --git a/syntax/applescript.vim b/syntax/applescript.vim index 53066e071..d261caea3 100644 --- a/syntax/applescript.vim +++ b/syntax/applescript.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'applescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'applescript', 'syntax/applescript.vim') + finish +endif " Vim syntax file " Language: AppleScript @@ -245,5 +247,3 @@ hi def link scptTodo Todo let b:current_syntax = "applescript" - -endif diff --git a/syntax/aptconf.vim b/syntax/aptconf.vim index 4d88ce654..70f9d1c93 100644 --- a/syntax/aptconf.vim +++ b/syntax/aptconf.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aptconf') == -1 +if polyglot#init#is_disabled(expand(':p'), 'aptconf', 'syntax/aptconf.vim') + finish +endif " Vim syntax file " Language: APT config file " Maintainer: Yann Amar -" Last Change: 2015 Dec 22 +" Last Change: 2021 Jul 12 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -398,10 +400,13 @@ syn cluster aptconfSynaptic_ contains=aptconfSynaptic, " }}} " 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 + \ Allow-APT-Mark-Fallback Allow-downgrade AutoFixInterruptedDpkg + \ Automatic-Reboot Automatic-Reboot-Time Automatic-Reboot-WithUsers + \ Debug InstallOnShutdown Mail MailOnlyOnError MailReport MinimalSteps + \ OnlyOnACPower Origins-Pattern Package-Blacklist + \ Remove-New-Unused-Dependencies Remove-Unused-Dependencies + \ Remove-Unused-Kernel-Packages Skip-Updates-On-Metered-Connections + \ SyslogEnable SyslogFacility Verbose syn cluster aptconfUnattendedUpgrade_ contains=aptconfUnattendedUpgrade " }}} @@ -574,5 +579,3 @@ let b:current_syntax = "aptconf" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/arch.vim b/syntax/arch.vim index 1491b7234..c0ef61879 100644 --- a/syntax/arch.vim +++ b/syntax/arch.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 +if polyglot#init#is_disabled(expand(':p'), 'arch', 'syntax/arch.vim') + finish +endif " Vim syntax file " Language: GNU Arch inventory file @@ -41,5 +43,3 @@ let b:current_syntax = "arch" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/arduino.vim b/syntax/arduino.vim index 4511d6ccb..5c04d6c60 100644 --- a/syntax/arduino.vim +++ b/syntax/arduino.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arduino') == -1 +if polyglot#init#is_disabled(expand(':p'), 'arduino', 'syntax/arduino.vim') + finish +endif " Vim syntax file " Language: Arduino @@ -166,5 +168,3 @@ hi def link arduinoType Type hi def link arduinoConstant Constant hi def link arduinoFunc Function hi def link arduinoIdentifier Identifier - -endif diff --git a/syntax/art.vim b/syntax/art.vim index 0e032c2d9..501222173 100644 --- a/syntax/art.vim +++ b/syntax/art.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 +if polyglot#init#is_disabled(expand(':p'), 'art', 'syntax/art.vim') + finish +endif " Vim syntax file " Language: ART-IM and ART*Enterprise @@ -50,5 +52,3 @@ let b:current_syntax = "art" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/asciidoc.vim b/syntax/asciidoc.vim index d4c0962ec..05338d444 100644 --- a/syntax/asciidoc.vim +++ b/syntax/asciidoc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asciidoc') == -1 +if polyglot#init#is_disabled(expand(':p'), 'asciidoc', 'syntax/asciidoc.vim') + finish +endif " Vim syntax file " Language: AsciiDoc @@ -183,5 +185,3 @@ hi def link asciidocURL Macro let b:current_syntax = "asciidoc" " vim: wrap et sw=2 sts=2: - -endif diff --git a/syntax/asl.vim b/syntax/asl.vim index b108b1eb5..d9eea367c 100644 --- a/syntax/asl.vim +++ b/syntax/asl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'acpiasl') == -1 +if polyglot#init#is_disabled(expand(':p'), 'acpiasl', 'syntax/asl.vim') + finish +endif " Vim syntax file " Language: ACPI ASL files @@ -108,5 +110,3 @@ hi def link aslNumber Number let b:current_syntax = "asl" syn sync minlines=200 - -endif diff --git a/syntax/asn.vim b/syntax/asn.vim index 55d1b1fac..eab1ac4ab 100644 --- a/syntax/asn.vim +++ b/syntax/asn.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asn') == -1 +if polyglot#init#is_disabled(expand(':p'), 'asn', 'syntax/asn.vim') + finish +endif " Vim syntax file " Language: ASN.1 @@ -73,5 +75,3 @@ unlet s:cpo_save let b:current_syntax = "asn" " vim: ts=8 - -endif diff --git a/syntax/aspperl.vim b/syntax/aspperl.vim new file mode 100644 index 000000000..1858e256c --- /dev/null +++ b/syntax/aspperl.vim @@ -0,0 +1,29 @@ +if polyglot#init#is_disabled(expand(':p'), 'aspperl', 'syntax/aspperl.vim') + finish +endif + +" Vim syntax file +" Language: Active State's PerlScript (ASP) +" Maintainer: Aaron Hope +" URL: http://nim.dhs.org/~edh/aspperl.vim +" Last Change: 2001 May 09 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'perlscript' +endif + +runtime! syntax/html.vim +unlet b:current_syntax +syn include @AspPerlScript syntax/perl.vim + +syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags + +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ skip=+".*%>.*"+ end=+%>+ contains=@AspPerlScript +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+]*>+ end=++ contains=@AspPerlScript + +let b:current_syntax = "aspperl" diff --git a/syntax/aspvbs.vim b/syntax/aspvbs.vim new file mode 100644 index 000000000..7cf341641 --- /dev/null +++ b/syntax/aspvbs.vim @@ -0,0 +1,186 @@ +if polyglot#init#is_disabled(expand(':p'), 'aspvbs', 'syntax/aspvbs.vim') + finish +endif + +" Vim syntax file +" Language: Microsoft VBScript Web Content (ASP) +" Maintainer: Devin Weaver (non-functional) +" URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim (broken) +" Last Change: 2006 Jun 19 +" by Dan Casey +" Version: $Revision: 1.3 $ +" Thanks to Jay-Jay for a syntax sync hack, hungarian +" notation, and extra highlighting. +" Thanks to patrick dehne for the folding code. +" Thanks to Dean Hall for testing the use of classes in +" VBScripts which I've been too scared to do. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'aspvbs' +endif + +runtime! syntax/html.vim +unlet b:current_syntax + +syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags + + +" Colored variable names, if written in hungarian notation +hi def AspVBSVariableSimple term=standout ctermfg=3 guifg=#99ee99 +hi def AspVBSVariableComplex term=standout ctermfg=3 guifg=#ee9900 +syn match AspVBSVariableSimple contained "\<\(bln\|byt\|dtm\=\|dbl\|int\|str\)\u\w*" +syn match AspVBSVariableComplex contained "\<\(arr\|ary\|obj\)\u\w*" + + +" Functions and methods that are in VB but will cause errors in an ASP page +" This is helpful if your porting VB code to ASP +" I removed (Count, Item) because these are common variable names in AspVBScript +syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo +syn keyword AspVBSError contained Stop LinkExecute Add Type LinkPoke +syn keyword AspVBSError contained LinkRequest LinkSend Declare Optional Sleep +syn keyword AspVBSError contained ParamArray Static Erl TypeOf Like LSet RSet Mid StrConv +" It may seem that most of these can fit into a keyword clause but keyword takes +" priority over all so I can't get the multi-word matches +syn match AspVBSError contained "\" +syn match AspVBSError contained "^\s*Open\s\+" +syn match AspVBSError contained "Debug\.[a-zA-Z0-9_]*" +syn match AspVBSError contained "^\s*[a-zA-Z0-9_]\+:" +syn match AspVBSError contained "[a-zA-Z0-9_]\+![a-zA-Z0-9_]\+" +syn match AspVBSError contained "^\s*#.*$" +syn match AspVBSError contained "\\|\" +syn match AspVBSError contained "\\|\\|\\|\\|\" +syn match AspVBSError contained "\" +" This one I want 'cause I always seem to mis-spell it. +syn match AspVBSError contained "Respon\?ce\.\S*" +syn match AspVBSError contained "Respose\.\S*" +" When I looked up the VBScript syntax it mentioned that Property Get/Set/Let +" statements are illegal, however, I have received reports that they do work. +" So I commented it out for now. +" syn match AspVBSError contained "\" + +" AspVBScript Reserved Words. +syn match AspVBSStatement contained "\\|\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\\|\" +syn match AspVBSStatement contained "\" +syn keyword AspVBSStatement contained Call Class Const Default Dim Do Loop Erase And +syn keyword AspVBSStatement contained Function If Then Else ElseIf Or +syn keyword AspVBSStatement contained Private Public Randomize ReDim +syn keyword AspVBSStatement contained Select Case Sub While With Wend Not + +" AspVBScript Functions +syn keyword AspVBSFunction contained Abs Array Asc Atn CBool CByte CCur CDate CDbl +syn keyword AspVBSFunction contained Chr CInt CLng Cos CreateObject CSng CStr Date +syn keyword AspVBSFunction contained DateAdd DateDiff DatePart DateSerial DateValue +syn keyword AspVBSFunction contained Date Day Exp Filter Fix FormatCurrency +syn keyword AspVBSFunction contained FormatDateTime FormatNumber FormatPercent +syn keyword AspVBSFunction contained GetObject Hex Hour InputBox InStr InStrRev Int +syn keyword AspVBSFunction contained IsArray IsDate IsEmpty IsNull IsNumeric +syn keyword AspVBSFunction contained IsObject Join LBound LCase Left Len LoadPicture +syn keyword AspVBSFunction contained Log LTrim Mid Minute Month MonthName MsgBox Now +syn keyword AspVBSFunction contained Oct Replace RGB Right Rnd Round RTrim +syn keyword AspVBSFunction contained ScriptEngine ScriptEngineBuildVersion +syn keyword AspVBSFunction contained ScriptEngineMajorVersion +syn keyword AspVBSFunction contained ScriptEngineMinorVersion Second Sgn Sin Space +syn keyword AspVBSFunction contained Split Sqr StrComp StrReverse String Tan Time Timer +syn keyword AspVBSFunction contained TimeSerial TimeValue Trim TypeName UBound UCase +syn keyword AspVBSFunction contained VarType Weekday WeekdayName Year + +" AspVBScript Methods +syn keyword AspVBSMethods contained Add AddFolders BuildPath Clear Close Copy +syn keyword AspVBSMethods contained CopyFile CopyFolder CreateFolder CreateTextFile +syn keyword AspVBSMethods contained Delete DeleteFile DeleteFolder DriveExists +syn keyword AspVBSMethods contained Exists FileExists FolderExists +syn keyword AspVBSMethods contained GetAbsolutePathName GetBaseName GetDrive +syn keyword AspVBSMethods contained GetDriveName GetExtensionName GetFile +syn keyword AspVBSMethods contained GetFileName GetFolder GetParentFolderName +syn keyword AspVBSMethods contained GetSpecialFolder GetTempName Items Keys Move +syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream +syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine Remove +syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write WriteBlankLines +syn keyword AspVBSMethods contained WriteLine +syn match AspVBSMethods contained "Response\.\w*" +" Colorize boolean constants: +syn keyword AspVBSMethods contained true false + +" AspVBScript Number Constants +" Integer number, or floating point number without a dot. +syn match AspVBSNumber contained "\<\d\+\>" +" Floating point number, with dot +syn match AspVBSNumber contained "\<\d\+\.\d*\>" +" Floating point number, starting with a dot +syn match AspVBSNumber contained "\.\d\+\>" + +" String and Character Constants +" removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in +" strings (or does it?) +syn region AspVBSString contained start=+"+ end=+"+ keepend + +" AspVBScript Comments +syn region AspVBSComment contained start="^REM\s\|\sREM\s" end="$" contains=AspVBSTodo keepend +syn region AspVBSComment contained start="^'\|\s'" end="$" contains=AspVBSTodo keepend +" misc. Commenting Stuff +syn keyword AspVBSTodo contained TODO FIXME + +" Cosmetic syntax errors commanly found in VB but not in AspVBScript +" AspVBScript doesn't use line numbers +syn region AspVBSError contained start="^\d" end="\s" keepend +" AspVBScript also doesn't have type defining variables +syn match AspVBSError contained "[a-zA-Z0-9_][\$&!#]"ms=s+1 +" Since 'a%' is a VB variable with a type and in AspVBScript you can have 'a%>' +" I have to make a special case so 'a%>' won't show as an error. +syn match AspVBSError contained "[a-zA-Z0-9_]%\($\|[^>]\)"ms=s+1 + +" Top Cluster +syn cluster AspVBScriptTop contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,AspVBSComment,AspVBSError,AspVBSVariableSimple,AspVBSVariableComplex + +" Folding +syn region AspVBSFold start="^\s*\(class\)\s\+.*$" end="^\s*end\s\+\(class\)\>.*$" fold contained transparent keepend +syn region AspVBSFold start="^\s*\(private\|public\)\=\(\s\+default\)\=\s\+\(sub\|function\)\s\+.*$" end="^\s*end\s\+\(function\|sub\)\>.*$" fold contained transparent keepend + +" Define AspVBScript delimiters +" <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax. +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop, AspVBSFold +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+]*\s\+runatserver[^>]*>+ end=++ contains=@AspVBScriptTop + + +" Synchronization +" syn sync match AspVBSSyncGroup grouphere AspVBScriptInsideHtmlTags "<%" +" This is a kludge so the HTML will sync properly +syn sync match htmlHighlight grouphere htmlTag "%>" + + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +"hi def link AspVBScript Special +hi def link AspVBSLineNumber Comment +hi def link AspVBSNumber Number +hi def link AspVBSError Error +hi def link AspVBSStatement Statement +hi def link AspVBSString String +hi def link AspVBSComment Comment +hi def link AspVBSTodo Todo +hi def link AspVBSFunction Identifier +hi def link AspVBSMethods PreProc +hi def link AspVBSEvents Special +hi def link AspVBSTypeSpecifier Type + + +let b:current_syntax = "aspvbs" + +if main_syntax == 'aspvbs' + unlet main_syntax +endif + +" vim: ts=8:sw=2:sts=0:noet diff --git a/syntax/asterisk.vim b/syntax/asterisk.vim new file mode 100644 index 000000000..14eebdfe5 --- /dev/null +++ b/syntax/asterisk.vim @@ -0,0 +1,92 @@ +if polyglot#init#is_disabled(expand(':p'), 'asterisk', 'syntax/asterisk.vim') + finish +endif + +" Vim syntax file +" Language: Asterisk config file +" Maintainer: Jean Aunis +" Previous Maintainer: brc007 +" Updated for 1.2 by Tilghman Lesher (Corydon76) +" Last Change: 2015 Feb 27 +" version 0.4 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn sync clear +syn sync fromstart + +syn keyword asteriskTodo TODO contained +syn match asteriskComment ";.*" contains=asteriskTodo +syn match asteriskContext "\[.\{-}\]" +syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority +syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority +syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|l\?e\?switch\|\(no\)\?load\)\s*=>\?" +syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained +syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained +syn match asteriskApp ",\zs[a-zA-Z]\+\ze$" +syn match asteriskApp ",\zs[a-zA-Z]\+\ze(" +" Digits plus oldlabel (newlabel) +syn match asteriskPriority "\zs[[:digit:]]\+\(+[[:alpha:]][[:alnum:]_]*\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel +" oldlabel plus digits (newlabel) +syn match asteriskPriority "\zs[[:alpha:]][[:alnum:]_]*+[[:digit:]]\+\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel +" s or n plus digits (newlabel) +syn match asteriskPriority "\zs[sn]\(+[[:digit:]]\+\)\?\(([[:alpha:]][[:alnum:]_]*)\)\?\ze," contains=asteriskLabel +syn match asteriskLabel "(\zs[[:alpha:]][[:alnum:]]*\ze)" contained +syn match asteriskError "^\s*#\s*[[:alnum:]]*" +syn match asteriskInclude "^\s*#\s*\(include\|exec\)\s.*" +syn match asteriskVar "\${_\{0,2}[[:alpha:]][[:alnum:]_]*\(:-\?[[:digit:]]\+\(:[[:digit:]]\+\)\?\)\?}" +syn match asteriskVar "_\{0,2}[[:alpha:]][[:alnum:]_]*\ze=" +syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)}" contains=asteriskVar,asteriskVarLen,asteriskExp +syn match asteriskVarLen "(\zs[[:alpha:]][[:alnum:]_]*(.\{-})\ze=" contains=asteriskVar,asteriskVarLen,asteriskExp +syn match asteriskExp "\$\[.\{-}\]" contains=asteriskVar,asteriskVarLen,asteriskExp +syn match asteriskCodecsPermit "^\s*\(allow\|disallow\)\s*=\s*.*$" contains=asteriskCodecs +syn match asteriskCodecs "\(vp9\|vp8\|h264\|h263p\|h263\|h261\|jpeg\|opus\|g722\|g723\|gsm\|ulaw\|alaw\|g719\|g726\|g726aal2\|siren7\|siren14\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|wav\|all\s*$\)" +syn match asteriskError "^\(type\|auth\|permit\|deny\|bindaddr\|host\)\s*=.*$" +syn match asteriskType "^\zstype=\ze\<\(peer\|user\|friend\)\>$" contains=asteriskTypeType +syn match asteriskTypeType "\<\(peer\|user\|friend\)\>" contained +syn match asteriskAuth "^\zsauth\s*=\ze\s*\<\(md5\|rsa\|plaintext\)\>$" contains=asteriskAuthType +syn match asteriskAuthType "\<\(md5\|rsa\|plaintext\)\>" +syn match asteriskAuth "^\zs\(secret\|inkeys\|outkey\)\s*=\ze.*$" +syn match asteriskAuth "^\(permit\|deny\)\s*=\s*\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\s*$" contains=asteriskIPRange +syn match asteriskIPRange "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" contained +syn match asteriskIP "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" contained +syn match asteriskHostname "[[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}" contained +syn match asteriskPort "\d\{1,5}" contained +syn match asteriskSetting "^bindaddr\s*=\s*\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}$" contains=asteriskIP +syn match asteriskSetting "^port\s*=\s*\d\{1,5}\s*$" contains=asteriskPort +syn match asteriskSetting "^host\s*=\s*\(dynamic\|\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\|\([[:alnum:]][[:alnum:]\-\.]*\.[[:alpha:]]{2,10}\)\)" contains=asteriskIP,asteriskHostname + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link asteriskComment Comment +hi def link asteriskExten String +hi def link asteriskContext Preproc +hi def link asteriskPattern Type +hi def link asteriskApp Statement +hi def link asteriskInclude Preproc +hi def link asteriskIncludeBad Error +hi def link asteriskPriority Preproc +hi def link asteriskLabel Type +hi def link asteriskVar String +hi def link asteriskVarLen Function +hi def link asteriskExp Type +hi def link asteriskCodecsPermit Preproc +hi def link asteriskCodecs String +hi def link asteriskType Statement +hi def link asteriskTypeType Type +hi def link asteriskAuth String +hi def link asteriskAuthType Type +hi def link asteriskIPRange Identifier +hi def link asteriskIP Identifier +hi def link asteriskPort Identifier +hi def link asteriskHostname Identifier +hi def link asteriskSetting Statement +hi def link asteriskError Error + +let b:current_syntax = "asterisk" +" vim: ts=8 sw=2 + diff --git a/syntax/asteriskvm.vim b/syntax/asteriskvm.vim new file mode 100644 index 000000000..0551b0cad --- /dev/null +++ b/syntax/asteriskvm.vim @@ -0,0 +1,55 @@ +if polyglot#init#is_disabled(expand(':p'), 'asteriskvm', 'syntax/asteriskvm.vim') + finish +endif + +" Vim syntax file +" Language: Asterisk voicemail config file +" Maintainer: Tilghman Lesher (Corydon76) +" Last Change: 2006 Mar 21 +" version 0.2 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn sync clear +syn sync fromstart + + +syn keyword asteriskvmTodo TODO contained +syn match asteriskvmComment ";.*" contains=asteriskvmTodo +syn match asteriskvmContext "\[.\{-}\]" + +" ZoneMessages +syn match asteriskvmZone "^[[:alnum:]]\+\s*=>\?\s*[[:alnum:]/_]\+|.*$" contains=zoneName,zoneDef +syn match zoneName "=\zs[[:alnum:]/_]\+\ze" contained +syn match zoneDef "|\zs.*\ze$" contained + +syn match asteriskvmSetting "\<\(format\|serveremail\|minmessage\|maxmessage\|maxgreet\|skipms\|maxsilence\|silencethreshold\|maxlogins\)=" +syn match asteriskvmSetting "\<\(externnotify\|externpass\|directoryintro\|charset\|adsi\(fdn\|sec\|ver\)\|\(pager\)\?fromstring\|email\(subject\|body\|cmd\)\|tz\|cidinternalcontexts\|saydurationm\|dialout\|callback\)=" +syn match asteriskvmSettingBool "\<\(attach\|pbxskip\|usedirectory\|saycid\|sayduration\|sendvoicemail\|review\|operator\|envelope\|delete\|nextaftercmd\|forcename\|forcegreeting\)=\(yes\|no\|1\|0\|true\|false\|t\|f\)" + +" Individual mailbox definitions +syn match asteriskvmMailbox "^[[:digit:]]\+\s*=>\?\s*[[:digit:]]\+\(,[^,]*\(,[^,]*\(,[^,]*\(,[^,]*\)\?\)\?\)\?\)\?" contains=mailboxEmail,asteriskvmSetting,asteriskvmSettingBool,comma +syn match mailboxEmail ",\zs[^@=,]*@[[:alnum:]\-\.]\+\.[[:alpha:]]\{2,10}\ze" contains=comma +syn match comma "[,|]" contained + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link asteriskvmComment Comment +hi def link asteriskvmContext Identifier +hi def link asteriskvmZone Type +hi def link zoneName String +hi def link zoneDef String +hi def link asteriskvmSetting Type +hi def link asteriskvmSettingBool Type + +hi def link asteriskvmMailbox Statement +hi def link mailboxEmail String + +let b:current_syntax = "asteriskvm" + +" vim: ts=8 sw=2 + diff --git a/syntax/atlas.vim b/syntax/atlas.vim index d74e9c439..4e8ecfa7f 100644 --- a/syntax/atlas.vim +++ b/syntax/atlas.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'atlas') == -1 +if polyglot#init#is_disabled(expand(':p'), 'atlas', 'syntax/atlas.vim') + finish +endif " Vim syntax file " Language: ATLAS @@ -85,5 +87,3 @@ hi def link atlasSpecial Special let b:current_syntax = "atlas" " vim: ts=8 - -endif diff --git a/syntax/autodoc.vim b/syntax/autodoc.vim new file mode 100644 index 000000000..4c8c915f7 --- /dev/null +++ b/syntax/autodoc.vim @@ -0,0 +1,105 @@ +if polyglot#init#is_disabled(expand(':p'), 'autodoc', 'syntax/autodoc.vim') + finish +endif + +" Vim syntax file +" Language: Autodoc +" Maintainer: Stephen R. van den Berg +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Included by pike.vim, cmod.vim and optionally c.vim +" Remark: In order to make c.vim use it, set: c_autodoc + +" 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 case match + +" A bunch of useful autodoc keywords +syn keyword autodocStatement contained appears belongs global +syn keyword autodocStatement contained decl directive inherit +syn keyword autodocStatement contained deprecated obsolete bugs +syn keyword autodocStatement contained copyright example fixme note param returns +syn keyword autodocStatement contained seealso thanks throws constant +syn keyword autodocStatement contained member index elem +syn keyword autodocStatement contained value type item + +syn keyword autodocRegion contained enum mapping code multiset array +syn keyword autodocRegion contained int string section mixed ol ul dl +syn keyword autodocRegion contained class module namespace +syn keyword autodocRegion contained endenum endmapping endcode endmultiset +syn keyword autodocRegion contained endarray endint endstring endsection +syn keyword autodocRegion contained endmixed endol endul enddl +syn keyword autodocRegion contained endclass endmodule endnamespace + +syn keyword autodocIgnore contained ignore endignore + +syn keyword autodocStatAcc contained b i u tt url pre sub sup +syn keyword autodocStatAcc contained ref rfc xml dl expr image + +syn keyword autodocTodo contained TODO FIXME XXX + +syn match autodocLineStart display "\(//\|/\?\*\)\@2<=!" +syn match autodocWords "[^!@{}[\]]\+" display contains=@Spell + +syn match autodocLink "@\[[^[\]]\+]"hs=s+2,he=e-1 display contains=autodocLead +syn match autodocAtStmt "@[a-z]\+\%(\s\|$\)\@="hs=s+1 display contains=autodocStatement,autodocIgnore,autodocLead,autodocRegion + +" Due to limitations of the matching algorithm, we cannot highlight +" nested autodocNStmtAcc structures correctly +syn region autodocNStmtAcc start="@[a-z]\+{" end="@}" contains=autodocStatAcc,autodocLead keepend + +syn match autodocUrl contained display ".\+" +syn region autodocAtUrlAcc start="{"ms=s+1 end="@}"he=e-1,me=e-2 contained display contains=autodocUrl,autodocLead keepend +syn region autodocNUrlAcc start="@url{" end="@}" contains=autodocStatAcc,autodocAtUrlAcc,autodocLead transparent + +syn match autodocSpecial "@@" display +syn match autodocLead "@" display contained + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match autodocSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match autodocSpaceError display " \+\t"me=e-1 + endif +endif + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment autodocComment minlines=" . b:c_minlines + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link autodocStatement Statement +hi def link autodocStatAcc Statement +hi def link autodocRegion Structure +hi def link autodocAtStmt Error +hi def link autodocNStmtAcc Identifier +hi def link autodocLink Type +hi def link autodocTodo Todo +hi def link autodocSpaceError Error +hi def link autodocLineStart SpecialComment +hi def link autodocSpecial SpecialChar +hi def link autodocUrl Underlined +hi def link autodocLead Statement +hi def link autodocIgnore Delimiter + +let b:current_syntax = "autodoc" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/autoit.vim b/syntax/autoit.vim index 2cdac618a..53903e3eb 100644 --- a/syntax/autoit.vim +++ b/syntax/autoit.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autoit') == -1 +if polyglot#init#is_disabled(expand(':p'), 'autoit', 'syntax/autoit.vim') + finish +endif " Vim syntax file " @@ -7,6 +9,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'autoit') == -1 " Authored By: Riccardo Casini " Script URL: http://www.vim.org/scripts/script.php?script_id=1239 " ChangeLog: Please visit the script URL for detailed change information +" Included change from #970. " Quit when a syntax file was already loaded. if exists("b:current_syntax") @@ -934,7 +937,7 @@ 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_STRIPLEADING" syn match autoitConst "\$STR_STRIPTRAILING" syn match autoitConst "\$STR_STRIPSPACES" syn match autoitConst "\$STR_STRIPALL" @@ -1124,5 +1127,3 @@ syn sync minlines=50 let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/syntax/automake.vim b/syntax/automake.vim index be0cbb920..6f7f299a1 100644 --- a/syntax/automake.vim +++ b/syntax/automake.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 +if polyglot#init#is_disabled(expand(':p'), 'automake', 'syntax/automake.vim') + finish +endif " Vim syntax file " Language: automake Makefile.am @@ -77,5 +79,3 @@ hi def link automakeMakeBString makeBString let b:current_syntax = 'automake' " vi: ts=8 sw=4 sts=4 - -endif diff --git a/syntax/ave.vim b/syntax/ave.vim index 71a88cc3a..3ba6d753d 100644 --- a/syntax/ave.vim +++ b/syntax/ave.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ave') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ave', 'syntax/ave.vim') + finish +endif " Vim syntax file " Copyright by Jan-Oliver Wagner @@ -79,5 +81,3 @@ hi def link aveTypos Error let b:current_syntax = "ave" - -endif diff --git a/syntax/awk.vim b/syntax/awk.vim index 342a49b78..9dc05279c 100644 --- a/syntax/awk.vim +++ b/syntax/awk.vim @@ -1,9 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 +if polyglot#init#is_disabled(expand(':p'), 'awk', 'syntax/awk.vim') + finish +endif " Vim syntax file -" Language: awk, nawk, gawk, mawk -" Maintainer: Antonio Colombo -" Last Change: 2020 Aug 18 +" Language: awk, nawk, gawk, mawk +" Maintainer: Doug Kearns +" Previous Maintainer: Antonio Colombo +" Last Change: 2020 Aug 18 " AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger " The AWK Programming Language, Addison-Wesley, 1988 @@ -216,5 +219,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/b.vim b/syntax/b.vim new file mode 100644 index 000000000..d55b80697 --- /dev/null +++ b/syntax/b.vim @@ -0,0 +1,118 @@ +if polyglot#init#is_disabled(expand(':p'), 'b', 'syntax/b.vim') + finish +endif + +" Vim syntax file +" Language: B (A Formal Method with refinement and mathematical proof) +" Maintainer: Mathieu Clabaut +" Contributor: Csaba Hoch +" LastChange: 8 Dec 2007 + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + + +" A bunch of useful B keywords +syn keyword bStatement MACHINE MODEL SEES OPERATIONS INCLUDES DEFINITIONS CONSTRAINTS CONSTANTS VARIABLES CONCRETE_CONSTANTS CONCRETE_VARIABLES ABSTRACT_CONSTANTS ABSTRACT_VARIABLES HIDDEN_CONSTANTS HIDDEN_VARIABLES ASSERT ASSERTIONS EXTENDS IMPLEMENTATION REFINEMENT IMPORTS USES INITIALISATION INVARIANT PROMOTES PROPERTIES REFINES SETS VALUES VARIANT VISIBLE_CONSTANTS VISIBLE_VARIABLES THEORY XLS THEOREMS LOCAL_OPERATIONS +syn keyword bLabel CASE IN EITHER OR CHOICE DO OF +syn keyword bConditional IF ELSE SELECT ELSIF THEN WHEN +syn keyword bRepeat WHILE FOR +syn keyword bOps bool card conc closure closure1 dom first fnc front not or id inter iseq iseq1 iterate last max min mod perm pred prj1 prj2 ran rel rev seq seq1 size skip succ tail union +syn keyword bKeywords LET VAR BE IN BEGIN END POW POW1 FIN FIN1 PRE SIGMA STRING UNION IS ANY WHERE + +syn keyword bBoolean TRUE FALSE bfalse btrue +syn keyword bConstant PI MAXINT MININT User_Pass PatchProver PatchProverH0 PatchProverB0 FLAT ARI DED SUB RES +syn keyword bGuard binhyp band bnot bguard bsearch bflat bfresh bguardi bget bgethyp barith bgetresult bresult bgoal bmatch bmodr bnewv bnum btest bpattern bprintf bwritef bsubfrm bvrb blvar bcall bappend bclose + +syn keyword bLogic or not +syn match bLogic "\(!\|#\|%\|&\|+->>\|+->\|-->>\|->>\|-->\|->\|/:\|/<:\|/<<:\|/=\|/\\\|/|\\\|::\|:\|;:\|<+\|<->\|<--\|<-\|<:\|<<:\|<<|\|<=>\|<|\|==\|=>\|>+>>\|>->\|>+>\|||\||->\)" +syn match bNothing /:=/ + +syn keyword cTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match bSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region bString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bSpecial +syn match bCharacter "'[^\\]'" +syn match bSpecialCharacter "'\\.'" +syn match bSpecialCharacter "'\\[0-7][0-7]'" +syn match bSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +syn region bParen transparent start='(' end=')' contains=ALLBUT,bParenError,bIncluded,bSpecial,bTodo,bUserLabel,bBitField +syn match bParenError ")" +syn match bInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match bNumber "\<[0-9]\+\>" +"syn match bIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + + syn region bComment start="/\*" end="\*/" contains=bTodo + syn match bComment "//.*" contains=bTodo +syntax match bCommentError "\*/" + +syn keyword bType INT INTEGER BOOL NAT NATURAL NAT1 NATURAL1 + +syn region bPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=bComment,bString,bCharacter,bNumber,bCommentError +syn region bIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match bIncluded contained "<[^>]*>" +syn match bInclude "^\s*#\s*include\>\s*["<]" contains=bIncluded + +syn region bDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen +syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen + +syn sync ccomment bComment minlines=10 + +" 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 bLabel Label +hi def link bUserLabel Label +hi def link bConditional Conditional +hi def link bRepeat Repeat +hi def link bLogic Special +hi def link bCharacter Character +hi def link bSpecialCharacter bSpecial +hi def link bNumber Number +hi def link bFloat Float +hi def link bOctalError bError +hi def link bParenError bError +" hi def link bInParen bError +hi def link bCommentError bError +hi def link bBoolean Identifier +hi def link bConstant Identifier +hi def link bGuard Identifier +hi def link bOperator Operator +hi def link bKeywords Operator +hi def link bOps Identifier +hi def link bStructure Structure +hi def link bStorageClass StorageClass +hi def link bInclude Include +hi def link bPreProc PreProc +hi def link bDefine Macro +hi def link bIncluded bString +hi def link bError Error +hi def link bStatement Statement +hi def link bPreCondit PreCondit +hi def link bType Type +hi def link bCommentError bError +hi def link bCommentString bString +hi def link bComment2String bString +hi def link bCommentSkip bComment +hi def link bString String +hi def link bComment Comment +hi def link bSpecial SpecialChar +hi def link bTodo Todo +"hi link bIdentifier Identifier + +let b:current_syntax = "b" + +" vim: ts=8 diff --git a/syntax/basic.vim b/syntax/basic.vim new file mode 100644 index 000000000..2984c9af0 --- /dev/null +++ b/syntax/basic.vim @@ -0,0 +1,384 @@ +if polyglot#init#is_disabled(expand(':p'), 'basic', 'syntax/basic.vim') + finish +endif + +" Vim syntax file +" Language: BASIC (QuickBASIC 4.5) +" Maintainer: Doug Kearns +" Previous Maintainer: Allan Kelly +" Contributors: Thilo Six +" Last Change: 2021 Aug 08 + +" First version based on Micro$soft QBASIC circa 1989, as documented in +" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989. +" +" Second version attempts to match Microsoft QuickBASIC 4.5 while keeping FreeBASIC +" (-lang qb) and QB64 (excluding extensions) in mind. -- DJK + +" Prelude {{{1 +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn iskeyword @,48-57,.,!,#,%,&,$ +syn case ignore + +" Whitespace Errors {{{1 +if exists("basic_space_errors") + if !exists("basic_no_trail_space_error") + syn match basicSpaceError display excludenl "\s\+$" + endif + if !exists("basic_no_tab_space_error") + syn match basicSpaceError display " \+\t"me=e-1 + endif +endif + +" Comment Errors {{{1 +if !exists("basic_no_comment_errors") + syn match basicCommentError "\.*" +endif + +" Not Top Cluster {{{1 +syn cluster basicNotTop contains=@basicLineIdentifier,basicDataString,basicDataSeparator,basicTodo + +" Statements {{{1 + +syn cluster basicStatements contains=basicStatement,basicDataStatement,basicMetaRemStatement,basicPutStatement,basicRemStatement + +let s:statements =<< trim EOL " {{{2 + beep + bload + bsave + call + calls + case + chain + chdir + circle + clear + close + cls + color + com + common + const + declare + def + def\s\+seg + defdbl + defint + deflng + defsng + defstr + dim + do + draw + elseif + end + end\s\+\%(def\|function\|if\|select\|sub\|type\) + environ + erase + error + exit\s\+\%(def\|do\|for\|function\|sub\) + field + files + for + function + get + gosub + goto + if + input + ioctl + key + kill + let + line + line\s\+input + locate + lock + loop + lprint + lset + mkdir + name + next + on + on\s\+error + on\s\+uevent + open + open\s\+com + option + out + paint + palette + palette\s\+using + pcopy + pen + pmap + poke + preset + print + pset + randomize + read + redim + reset + restore + resume + return + rmdir + rset + run + select\s\+case + shared + shell + sleep + sound + static + stop + strig + sub + swap + system + troff + tron + type + uevent + unlock + using + view + view\s\+print + wait + wend + while + width + window + write +EOL +" }}} + +for s in s:statements + exe 'syn match basicStatement "\<' .. s .. '\>" contained' +endfor + +syn match basicStatement "\<\%(then\|else\)\>" nextgroup=@basicStatements skipwhite + +" DATA Statement +syn match basicDataSeparator "," contained +syn region basicDataStatement matchgroup=basicStatement start="\" matchgroup=basicStatementSeparator end=":\|$" contained contains=basicDataSeparator,basicDataString,basicNumber,basicFloat,basicString + +if !exists("basic_no_data_fold") + syn region basicMultilineData start="^\s*\.*\n\%(^\s*\\)\@=" end="^\s*\.*\n\%(^\s*\\)\@!" contains=basicDataStatement transparent fold keepend +endif + +" PUT File I/O and Graphics statements - needs special handling for graphics +" action verbs +syn match basicPutAction "\<\%(pset\|preset\|and\|or\|xor\)\>" contained +syn region basicPutStatement matchgroup=basicStatement start="\" matchgroup=basicStatementSeparator end=":\|$" contained contains=basicKeyword,basicPutAction,basicFilenumber + +" Keywords {{{1 +let s:keywords =<< trim EOL " {{{2 + absolute + access + alias + append + as + base + binary + byval + cdecl + com + def + do + for + function + gosub + goto + input + int86old + int86xold + interrupt + interruptx + is + key + len + list + local + lock + lprint + next + off + on + output + pen + play + random + read + resume + screen + seg + shared + signal + static + step + stop + strig + sub + timer + to + until + using + while + write +EOL +" }}} + +for k in s:keywords + exe 'syn match basicKeyword "\<' .. k .. '\>"' +endfor + +" Functions {{{1 +syn keyword basicFunction abs asc atn cdbl chr$ cint clng command$ cos csng +syn keyword basicFunction csrlin cvd cvdmbf cvi cvl cvs cvsmbf environ$ eof +syn keyword basicFunction erdev erdev$ erl err exp fileattr fix fre freefile +syn keyword basicFunction hex$ inkey$ inp input$ instr int ioctl$ left$ lbound +syn keyword basicFunction lcase$ len loc lof log lpos ltrim$ mkd$ mkdmbf$ mki$ +syn keyword basicFunction mkl$ mks$ mksmbf$ oct$ peek pen point pos right$ rnd +syn keyword basicFunction rtrim$ sadd setmem sgn sin space$ spc sqr stick str$ +syn keyword basicFunction strig string$ tab tan ubound ucase$ val valptr +syn keyword basicFunction valseg varptr varptr$ varseg + +" Functions and statements (same name) {{{1 +syn match basicStatement "\<\%(date\$\|mid\$\|play\|screen\|seek\|time\$\|timer\)\>" contained +syn match basicFunction "\<\%(date\$\|mid\$\|play\|screen\|seek\|time\$\|timer\)\>" + +" Types {{{1 +syn keyword basicType integer long single double string any + +" Strings {{{1 + +" Unquoted DATA strings - anything except [:,] and leading or trailing whitespace +" Needs lower priority than numbers +syn match basicDataString "[^[:space:],:]\+\%(\s\+[^[:space:],:]\+\)*" contained + +syn region basicString start=+"+ end=+"+ oneline + +" Booleans {{{1 +if exists("basic_booleans") + syn keyword basicBoolean true false +endif + +" Numbers {{{1 + +" Integers +syn match basicNumber "-\=&o\=\o\+[%&]\=\>" +syn match basicNumber "-\=&h\x\+[%&]\=\>" +syn match basicNumber "-\=\<\d\+[%&]\=\>" + +" Floats +syn match basicFloat "-\=\<\d\+\.\=\d*\%(\%([ed][+-]\=\d*\)\|[!#]\)\=\>" +syn match basicFloat "-\=\<\.\d\+\%(\%([ed][+-]\=\d*\)\|[!#]\)\=\>" + +" Statement anchors {{{1 +syn match basicLineStart "^" nextgroup=@basicStatements,@basicLineIdentifier skipwhite +syn match basicStatementSeparator ":" nextgroup=@basicStatements skipwhite + +" Line numbers and labels {{{1 + +" QuickBASIC limits these to 65,529 and 40 chars respectively +syn match basicLineNumber "\d\+" nextgroup=@basicStatements skipwhite contained +syn match basicLineLabel "\a[[:alnum:]]*\ze\s*:" nextgroup=@basicStatements skipwhite contained + +syn cluster basicLineIdentifier contains=basicLineNumber,basicLineLabel + +" Line Continuation {{{1 +syn match basicLineContinuation "\s*\zs_\ze\s*$" + +" Type suffixes {{{1 +if exists("basic_type_suffixes") + syn match basicTypeSuffix "\a[[:alnum:].]*\zs[$%&!#]" +endif + +" File numbers {{{1 +syn match basicFilenumber "#\d\+" +syn match basicFilenumber "#\a[[:alnum:].]*[%&!#]\=" + +" Operators {{{1 +if exists("basic_operators") + syn match basicArithmeticOperator "[-+*/\\^]" + syn match basicRelationalOperator "<>\|<=\|>=\|[><=]" +endif +syn match basicLogicalOperator "\<\%(not\|and\|or\|xor\|eqv\|imp\)\>" +syn match basicArithmeticOperator "\" + +" Metacommands {{{1 +" Note: No trailing word boundaries. Text may be freely mixed however there +" must be only leading whitespace prior to the first metacommand +syn match basicMetacommand "$INCLUDE\s*:\s*'[^']\+'" contained containedin=@basicMetaComments +syn match basicMetacommand "$\%(DYNAMIC\|STATIC\)" contained containedin=@basicMetaComments + +" Comments {{{1 +syn keyword basicTodo TODO FIXME XXX NOTE contained + +syn region basicRemStatement matchgroup=basicStatement start="REM\>" end="$" contains=basicTodo,@Spell contained +syn region basicComment start="'" end="$" contains=basicTodo,@Spell + +if !exists("basic_no_comment_fold") + syn region basicMultilineComment start="^\s*'.*\n\%(\s*'\)\@=" end="^\s*'.*\n\%(\s*'\)\@!" contains=@basicComments transparent fold keepend +endif + +" Metacommands +syn region basicMetaRemStatement matchgroup=basicStatement start="REM\>\s*\$\@=" end="$" contains=basicTodo contained +syn region basicMetaComment start="'\s*\$\@=" end="$" contains=basicTodo + +syn cluster basicMetaComments contains=basicMetaComment,basicMetaRemStatement +syn cluster basicComments contains=basicComment,basicMetaComment + +"syn sync ccomment basicComment + +" Default Highlighting {{{1 +hi def link basicArithmeticOperator basicOperator +hi def link basicBoolean Boolean +hi def link basicComment Comment +hi def link basicCommentError Error +hi def link basicDataString basicString +hi def link basicFilenumber basicTypeSuffix " TODO: better group +hi def link basicFloat Float +hi def link basicFunction Identifier +hi def link basicKeyword Keyword +hi def link basicLineIdentifier LineNr +hi def link basicLineContinuation Special +hi def link basicLineLabel basicLineIdentifier +hi def link basicLineNumber basicLineIdentifier +hi def link basicLogicalOperator basicOperator +hi def link basicMetacommand SpecialComment +hi def link basicMetaComment Comment +hi def link basicMetaRemStatement Comment +hi def link basicNumber Number +hi def link basicOperator Operator +hi def link basicPutAction Keyword +hi def link basicRelationalOperator basicOperator +hi def link basicRemStatement Comment +hi def link basicSpaceError Error +hi def link basicStatementSeparator Special +hi def link basicStatement Statement +hi def link basicString String +hi def link basicTodo Todo +hi def link basicType Type +hi def link basicTypeSuffix Special +if exists("basic_legacy_syntax_groups") + hi def link basicTypeSpecifier Type + hi def link basicTypeSuffix basicTypeSpecifier +endif + +" Postscript {{{1 +let b:current_syntax = "basic" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index 303d20776..d4343db08 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/class.vim') + finish +endif "don't add typescriptMembers to nextgroup, let outer scope match it " so we won't match abstract method outside abstract class @@ -65,5 +67,3 @@ syntax region typescriptInterfaceTypeArguments matchgroup=typescriptTypeBrackets \ contained skipwhite syntax match typescriptInterfaceComma /,/ contained nextgroup=typescriptInterfaceHeritage skipwhite skipnl - -endif diff --git a/syntax/basic/cluster.vim b/syntax/basic/cluster.vim index 8538c5171..cbe0424b1 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/cluster.vim') + finish +endif "Block VariableStatement EmptyStatement ExpressionStatement IfStatement IterationStatement ContinueStatement BreakStatement ReturnStatement WithStatement LabelledStatement SwitchStatement ThrowStatement TryStatement DebuggerStatement syntax cluster typescriptStatement @@ -38,5 +40,3 @@ syntax cluster typescriptValue \ contains=@typescriptExpression,typescriptObjectLiteral syntax cluster typescriptEventExpression contains=typescriptArrowFuncDef,typescriptParenExp,@typescriptValue,typescriptRegexpString,@typescriptEventTypes,typescriptOperator,typescriptGlobal,jsxRegion - -endif diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index 2a7a1dd13..02d93218c 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,7 +1,7 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/decorator.vim') + finish +endif syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments \ contains=@_semantic,typescriptDotNotation - -endif diff --git a/syntax/basic/doc.vim b/syntax/basic/doc.vim index 50f03e29b..996e7e3df 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/doc.vim') + finish +endif "Syntax coloring for Node.js shebang line syntax match shellbang "^#!.*node\>" @@ -84,5 +86,3 @@ if exists("main_syntax") && main_syntax == "typescript" endif syntax case match - -endif diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index e1743ab5b..f8d9722d1 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,16 +1,16 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/function.vim') + finish +endif syntax keyword typescriptAsyncFuncKeyword async - \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef + \ nextgroup=typescriptFuncKeyword,typescriptArrowFuncDef,typescriptArrowFuncTypeParameter \ skipwhite syntax keyword typescriptAsyncFuncKeyword await \ nextgroup=@typescriptValue \ skipwhite -syntax keyword typescriptFuncKeyword function - \ nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature - \ skipwhite skipempty +exec 'syntax keyword typescriptFuncKeyword '.(exists('g:typescript_conceal_function') ? 'conceal cchar='.g:typescript_conceal_function : '').' function nextgroup=typescriptAsyncFunc,typescriptFuncName,@typescriptCallSignature skipwhite skipempty' syntax match typescriptAsyncFunc contained /*/ \ nextgroup=typescriptFuncName,@typescriptCallSignature @@ -20,34 +20,28 @@ syntax match typescriptFuncName contained /\K\k*/ \ nextgroup=@typescriptCallSignature \ skipwhite -" destructuring ({ a: ee }) => -syntax match typescriptArrowFuncDef contained /(\(\s*\({\_[^}]*}\|\k\+\)\(:\_[^)]\)\?,\?\)\+)\s*=>/ +syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/ \ contains=typescriptArrowFuncArg,typescriptArrowFunc \ nextgroup=@typescriptExpression,typescriptBlock \ skipwhite skipempty -" matches `(a) =>` or `([a]) =>` or -" `( -" a) =>` -syntax match typescriptArrowFuncDef contained /(\(\_s*[a-zA-Z\$_\[.]\_[^)]*\)*)\s*=>/ - \ contains=typescriptArrowFuncArg,typescriptArrowFunc +syntax match typescriptArrowFuncDef contained /(\%(\_[^()]\+\|(\_[^()]*)\)*)\_s*=>/ + \ contains=typescriptArrowFuncArg,typescriptArrowFunc,@typescriptCallSignature \ nextgroup=@typescriptExpression,typescriptBlock \ skipwhite skipempty -syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/ - \ contains=typescriptArrowFuncArg,typescriptArrowFunc - \ nextgroup=@typescriptExpression,typescriptBlock - \ skipwhite skipempty - -" TODO: optimize this pattern -syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/ - \ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation +syntax region typescriptArrowFuncDef contained start=/(\%(\_[^()]\+\|(\_[^()]*)\)*):/ matchgroup=typescriptArrowFunc end=/=>/ + \ contains=typescriptArrowFuncArg,typescriptTypeAnnotation,@typescriptCallSignature \ nextgroup=@typescriptExpression,typescriptBlock \ skipwhite skipempty keepend +syntax region typescriptArrowFuncTypeParameter start=// + \ contains=@typescriptTypeParameterCluster + \ nextgroup=typescriptArrowFuncDef + \ contained skipwhite skipnl + syntax match typescriptArrowFunc /=>/ syntax match typescriptArrowFuncArg contained /\K\k*/ -syntax region typescriptArrowFuncArg contained start=/<\|(/ end=/\ze=>/ contains=@typescriptCallSignature syntax region typescriptReturnAnnotation contained start=/:/ end=/{/me=e-1 contains=@typescriptType nextgroup=typescriptBlock @@ -67,5 +61,3 @@ syntax region typescriptParamImpl matchgroup=typescriptParens \ contains=typescriptDecorator,@typescriptParameterList,@typescriptComments \ nextgroup=typescriptReturnAnnotation,typescriptBlock \ contained skipwhite skipnl - -endif diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim index 6a7ba4b0a..e238c8d22 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/identifiers.vim') + finish +endif syntax cluster afterIdentifier contains= \ typescriptDotNotation, @@ -20,13 +22,13 @@ syntax match typescriptProp contained /\K\k*!\?/ \ nextgroup=@afterIdentifier \ skipwhite skipempty -syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/rs=s+1 end=/]/he=e-1 contains=@typescriptValue nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty +syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/ end=/]/ contains=@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty syntax match typescriptDotNotation /\.\|?\.\|!\./ nextgroup=typescriptProp skipnl syntax match typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent " syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty -syntax region typescriptFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptValue,@typescriptComments nextgroup=@typescriptSymbols,typescriptDotNotation skipwhite skipempty skipnl +syntax region typescriptFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptValue,@typescriptComments,typescriptCastKeyword nextgroup=@typescriptSymbols,typescriptDotNotation skipwhite skipempty skipnl syntax region typescriptEventFuncCallArg contained matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptEventExpression syntax region typescriptEventString contained start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/ contains=typescriptASCII,@events @@ -79,5 +81,3 @@ syntax region typescriptObjectDestructure matchgroup=typescriptBraces \ contains=typescriptDestructureString,@typescriptDestructureVariables,@typescriptComments \ nextgroup=typescriptTypeAnnotation,typescriptAssign \ transparent contained skipwhite skipempty fold - -endif diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index a810b545a..adcd950bd 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/keyword.vim') + finish +endif "Import syntax keyword typescriptImport from as syntax keyword typescriptImport import - \ nextgroup=typescriptImportType + \ nextgroup=typescriptImportType,typescriptTypeBlock,typescriptDefaultImportName \ skipwhite syntax keyword typescriptImportType type \ contained @@ -14,20 +16,11 @@ syntax match typescriptExportType /\:p'), 'typescript', 'syntax/basic/literal.vim') + finish +endif "Syntax in the JavaScript code @@ -7,20 +9,33 @@ syntax match typescriptASCII contained /\\\d\d\d/ syntax region typescriptTemplateSubstitution matchgroup=typescriptTemplateSB \ start=/\${/ end=/}/ - \ contains=@typescriptValue + \ contains=@typescriptValue,typescriptCastKeyword \ contained -syntax region typescriptString +syntax region typescriptString \ start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ \ contains=typescriptSpecial,@Spell + \ nextgroup=@typescriptSymbols + \ skipwhite skipempty \ extend syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)" -" From vim runtime -" -syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gimuy]\{0,5\}\s*$+ end=+/[gimuy]\{0,5\}\s*[;.,)\]}:]+me=e-1 nextgroup=typescriptDotNotation oneline +" From pangloss/vim-javascript +" +syntax region typescriptRegexpCharClass contained start=+\[+ skip=+\\.+ end=+\]+ contains=typescriptSpecial extend +syntax match typescriptRegexpBoundary contained "\v\c[$^]|\\b" +syntax match typescriptRegexpBackRef contained "\v\\[1-9]\d*" +syntax match typescriptRegexpQuantifier contained "\v[^\\]%([?*+]|\{\d+%(,\d*)?})\??"lc=1 +syntax match typescriptRegexpOr contained "|" +syntax match typescriptRegexpMod contained "\v\(\?[:=!>]"lc=1 +syntax region typescriptRegexpGroup contained start="[^\\]("lc=1 skip="\\.\|\[\(\\.\|[^]]\+\)\]" end=")" contains=typescriptRegexpCharClass,@typescriptRegexpSpecial keepend +syntax region typescriptRegexpString + \ start=+\%(\%(\/ nextgroup=@typescript syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ - \ nextgroup=typescriptSymbols skipwhite skipempty - -endif + \ nextgroup=@typescriptSymbols skipwhite skipempty diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 343559b9e..b3705e302 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/members.vim') + finish +endif syntax keyword typescriptConstructor contained constructor \ nextgroup=@typescriptCallSignature @@ -34,7 +36,7 @@ syntax keyword typescriptClassStatic static syntax keyword typescriptAccessibilityModifier public private protected contained -syntax keyword typescriptReadonlyModifier readonly contained +syntax keyword typescriptReadonlyModifier readonly override contained syntax region typescriptStringMember contained \ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1/ @@ -43,8 +45,6 @@ syntax region typescriptStringMember contained syntax region typescriptComputedMember contained matchgroup=typescriptProperty \ start=/\[/rs=s+1 end=/]/ - \ contains=@typescriptValue,typescriptMember,typescriptMappedIn + \ contains=@typescriptValue,typescriptMember,typescriptMappedIn,typescriptCastKeyword \ nextgroup=@memberNextGroup \ skipwhite skipempty - -endif diff --git a/syntax/basic/object.vim b/syntax/basic/object.vim index 90c75a0a9..3c614e1a4 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,8 +1,10 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/object.vim') + finish +endif syntax region typescriptObjectLiteral matchgroup=typescriptBraces \ start=/{/ end=/}/ - \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword + \ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword,typescriptTernary,typescriptCastKeyword \ fold contained syntax keyword typescriptObjectAsyncKeyword async contained @@ -30,5 +32,3 @@ syntax match typescriptRestOrSpread /\.\.\./ contained syntax match typescriptObjectSpread /\.\.\./ contained containedin=typescriptObjectLiteral,typescriptArray nextgroup=@typescriptValue syntax match typescriptObjectColon contained /:/ nextgroup=@typescriptValue skipwhite skipempty - -endif diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim index 5531db798..d32500875 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,9 +1,9 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/patch.vim') + finish +endif " patch for generated code syntax keyword typescriptGlobal Promise \ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline syntax keyword typescriptGlobal Map WeakMap \ nextgroup=typescriptGlobalPromiseDot,typescriptFuncCallArg,typescriptTypeArguments oneline - -endif diff --git a/syntax/basic/reserved.vim b/syntax/basic/reserved.vim index 14ea7565e..c75851f29 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/reserved.vim') + finish +endif syntax cluster typescriptStrings contains=typescriptProp,typescriptString,typescriptTemplate,@typescriptComments,typescriptDocComment,typescriptRegexpString,typescriptPropertyName @@ -31,5 +33,3 @@ syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved volat syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved class syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved var syntax keyword typescriptReserved containedin=ALLBUT,@typescriptNoReserved function - -endif diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim index 2799ed39e..c88c9210b 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/symbols.vim') + finish +endif " + - ^ ~ syntax match typescriptUnaryOp /[+\-~!]/ @@ -40,5 +42,3 @@ syntax match typescriptBinaryOp contained /-\(-\|=\)\?/ nextgroup=@typescriptV syntax match typescriptBinaryOp contained /\*\*=\?/ nextgroup=@typescriptValue syntax cluster typescriptSymbols contains=typescriptBinaryOp,typescriptKeywordOp,typescriptTernary,typescriptAssign,typescriptCastKeyword - -endif diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 616c3271c..590dda1a6 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/basic/type.vim') + finish +endif " Types syntax match typescriptOptionalMark /?/ contained @@ -56,6 +58,7 @@ syntax cluster typescriptPrimaryType contains= \ typescriptTupleType, \ typescriptTypeQuery, \ typescriptStringLiteralType, + \ typescriptTemplateLiteralType, \ typescriptReadonlyArrayKeyword, \ typescriptAssertType @@ -64,6 +67,17 @@ syntax region typescriptStringLiteralType contained \ nextgroup=typescriptUnion \ skipwhite skipempty +syntax region typescriptTemplateLiteralType contained + \ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/ + \ contains=typescriptTemplateSubstitutionType + \ nextgroup=typescriptTypeOperator + \ skipwhite skipempty + +syntax region typescriptTemplateSubstitutionType matchgroup=typescriptTemplateSB + \ start=/\${/ end=/}/ + \ contains=@typescriptType + \ contained + syntax region typescriptParenthesizedType matchgroup=typescriptParens \ start=/(/ end=/)/ \ contains=@typescriptType @@ -103,10 +117,12 @@ syntax region typescriptTupleType matchgroup=typescriptBraces \ contained skipwhite syntax cluster typescriptTypeOperator - \ contains=typescriptUnion,typescriptTypeBracket + \ contains=typescriptUnion,typescriptTypeBracket,typescriptConstraint,typescriptConditionalType syntax match typescriptUnion /|\|&/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty +syntax match typescriptConditionalType /?\|:/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty + syntax cluster typescriptFunctionType contains=typescriptGenericFunc,typescriptFuncType syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets \ start=// @@ -116,7 +132,7 @@ syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets \ contained skipwhite skipnl syntax region typescriptFuncType matchgroup=typescriptParens - \ start=/(/ end=/)\s*=>/me=e-2 + \ start=/(\(\k\+:\|)\)\@=/ end=/)\s*=>/me=e-2 \ contains=@typescriptParameterList \ nextgroup=typescriptFuncTypeArrow \ contained skipwhite skipnl oneline @@ -126,7 +142,6 @@ syntax match typescriptFuncTypeArrow /=>/ \ containedin=typescriptFuncType \ contained skipwhite skipnl - syntax keyword typescriptConstructorType new \ nextgroup=@typescriptFunctionType \ contained skipwhite skipnl @@ -200,5 +215,3 @@ syntax region typescriptAliasDeclaration matchgroup=typescriptUnion syntax keyword typescriptReadonlyArrayKeyword readonly \ nextgroup=@typescriptPrimaryType \ skipwhite - -endif diff --git a/syntax/bc.vim b/syntax/bc.vim new file mode 100644 index 000000000..fa4fa96a6 --- /dev/null +++ b/syntax/bc.vim @@ -0,0 +1,70 @@ +if polyglot#init#is_disabled(expand(':p'), 'bc', 'syntax/bc.vim') + finish +endif + +" Vim syntax file +" Language: bc - An arbitrary precision calculator language +" Maintainer: Vladimir Scholtz +" Last change: 2012 Jun 01 +" (Dominique Pelle added @Spell) +" Available on: www.gjh.sk/~vlado/bc.vim + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" Keywords +syn keyword bcKeyword if else while for break continue return limits halt quit +syn keyword bcKeyword define +syn keyword bcKeyword length read sqrt print + +" Variable +syn keyword bcType auto + +" Constant +syn keyword bcConstant scale ibase obase last +syn keyword bcConstant BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX BC_STRING_MAX +syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH + +" Any other stuff +syn match bcIdentifier "[a-z_][a-z0-9_]*" + +" String + syn match bcString "\"[^"]*\"" contains=@Spell + +" Number +syn match bcNumber "[0-9]\+" + +" Comment +syn match bcComment "\#.*" contains=@Spell +syn region bcComment start="/\*" end="\*/" contains=@Spell + +" Parent () +syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError +syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll +syn region bcList matchgroup=Delimiter start="\[" skip="|.\{-}|" matchgroup=Delimiter end="\]" contains=@bcAll +syn match bcParenError "]" +syn match bcParenError ")" + + + +syn case match + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link bcKeyword Statement +hi def link bcType Type +hi def link bcConstant Constant +hi def link bcNumber Number +hi def link bcComment Comment +hi def link bcString String +hi def link bcSpecialChar SpecialChar +hi def link bcParenError Error + + +let b:current_syntax = "bc" +" vim: ts=8 diff --git a/syntax/bdf.vim b/syntax/bdf.vim new file mode 100644 index 000000000..f1ff85b10 --- /dev/null +++ b/syntax/bdf.vim @@ -0,0 +1,101 @@ +if polyglot#init#is_disabled(expand(':p'), 'bdf', 'syntax/bdf.vim') + finish +endif + +" Vim syntax file +" Language: BDF font definition +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn region bdfFontDefinition transparent matchgroup=bdfKeyword + \ start='^STARTFONT\>' end='^ENDFONT\>' + \ contains=bdfComment,bdfFont,bdfSize, + \ bdfBoundingBox,bdfProperties,bdfChars,bdfChar + +syn match bdfNumber contained display + \ '\<\%(\x\+\|[+-]\=\d\+\%(\.\d\+\)*\)' + +syn keyword bdfTodo contained FIXME TODO XXX NOTE + +syn region bdfComment contained start='^COMMENT\>' end='$' + \ contains=bdfTodo,@Spell + +syn region bdfFont contained matchgroup=bdfKeyword + \ start='^FONT\>' end='$' + +syn region bdfSize contained transparent matchgroup=bdfKeyword + \ start='^SIZE\>' end='$' contains=bdfNumber + +syn region bdfBoundingBox contained transparent matchgroup=bdfKeyword + \ start='^FONTBOUNDINGBOX' end='$' + \ contains=bdfNumber + +syn region bdfProperties contained transparent matchgroup=bdfKeyword + \ start='^STARTPROPERTIES' end='^ENDPROPERTIES' + \ contains=bdfNumber,bdfString,bdfProperty, + \ bdfXProperty + +syn keyword bdfProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR +syn match bdfProperty contained '^\S\+' + +syn keyword bdfXProperty contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR + \ FONTNAME_REGISTRY FOUNDRY FAMILY_NAME + \ WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE + \ POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING + \ CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT + \ ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT + \ QUAD_WIDTH FONT AVERAGE_WIDTH + +syn region bdfString contained start=+"+ skip=+""+ end=+"+ + +syn region bdfChars contained display transparent + \ matchgroup=bdfKeyword start='^CHARS' end='$' + \ contains=bdfNumber + +syn region bdfChar transparent matchgroup=bdfKeyword + \ start='^STARTCHAR' end='^ENDCHAR' + \ contains=bdfEncoding,bdfWidth,bdfAttributes, + \ bdfBitmap + +syn region bdfEncoding contained transparent matchgroup=bdfKeyword + \ start='^ENCODING' end='$' contains=bdfNumber + +syn region bdfWidth contained transparent matchgroup=bdfKeyword + \ start='^SWIDTH\|DWIDTH\|BBX' end='$' + \ contains=bdfNumber + +syn region bdfAttributes contained transparent matchgroup=bdfKeyword + \ start='^ATTRIBUTES' end='$' + +syn keyword bdfBitmap contained BITMAP + +if exists("bdf_minlines") + let b:bdf_minlines = bdf_minlines +else + let b:bdf_minlines = 30 +endif +exec "syn sync ccomment bdfChar minlines=" . b:bdf_minlines + + +hi def link bdfKeyword Keyword +hi def link bdfNumber Number +hi def link bdfTodo Todo +hi def link bdfComment Comment +hi def link bdfFont String +hi def link bdfProperty Identifier +hi def link bdfXProperty Identifier +hi def link bdfString String +hi def link bdfChars Keyword +hi def link bdfBitmap Keyword + +let b:current_syntax = "bdf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/bib.vim b/syntax/bib.vim new file mode 100644 index 000000000..69995d6e5 --- /dev/null +++ b/syntax/bib.vim @@ -0,0 +1,125 @@ +if polyglot#init#is_disabled(expand(':p'), 'bib', 'syntax/bib.vim') + finish +endif + +" Vim syntax file +" Language: BibTeX (bibliographic database format for (La)TeX) +" Maintainer: Bernd Feige +" Filenames: *.bib +" Last Change: 2017 Sep 29 + +" Thanks to those who pointed out problems with this file or supplied fixes! + +" Initialization +" ============== +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Ignore case +syn case ignore + +" Keywords +" ======== +syn keyword bibType contained article book booklet conference inbook +syn keyword bibType contained incollection inproceedings manual +syn keyword bibType contained mastersthesis misc phdthesis +syn keyword bibType contained proceedings techreport unpublished +syn keyword bibType contained string preamble + +syn keyword bibEntryKw contained address annote author booktitle chapter +syn keyword bibEntryKw contained crossref edition editor howpublished +syn keyword bibEntryKw contained institution journal key month note +syn keyword bibEntryKw contained number organization pages publisher +syn keyword bibEntryKw contained school series title type volume year + +" biblatex keywords, cf. http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf +syn keyword bibType contained mvbook bookinbook suppbook collection mvcollection suppcollection +syn keyword bibType contained online patent periodical suppperiodical mvproceedings reference +syn keyword bibType contained mvreference inreference report set thesis xdata customa customb +syn keyword bibType contained customc customd custome customf electronic www artwork audio bibnote +syn keyword bibType contained commentary image jurisdiction legislation legal letter movie music +syn keyword bibType contained performance review software standard video + +syn keyword bibEntryKw contained abstract isbn issn keywords url +syn keyword bibEntryKw contained addendum afterwordannotation annotation annotator authortype +syn keyword bibEntryKw contained bookauthor bookpagination booksubtitle booktitleaddon +syn keyword bibEntryKw contained commentator date doi editora editorb editorc editortype +syn keyword bibEntryKw contained editoratype editorbtype editorctype eid entrysubtype +syn keyword bibEntryKw contained eprint eprintclass eprinttype eventdate eventtitle +syn keyword bibEntryKw contained eventtitleaddon file foreword holder indextitle +syn keyword bibEntryKw contained introduction isan ismn isrn issue issuesubtitle +syn keyword bibEntryKw contained issuetitle iswc journalsubtitle journaltitle label +syn keyword bibEntryKw contained language library location mainsubtitle maintitle +syn keyword bibEntryKw contained maintitleaddon nameaddon origdate origlanguage +syn keyword bibEntryKw contained origlocation origpublisher origtitle pagetotal +syn keyword bibEntryKw contained pagination part pubstate reprinttitle shortauthor +syn keyword bibEntryKw contained shorteditor shorthand shorthandintro shortjournal +syn keyword bibEntryKw contained shortseries shorttitle subtitle titleaddon translator +syn keyword bibEntryKw contained urldate venue version volumes entryset execute gender +syn keyword bibEntryKw contained langid langidopts ids indexsorttitle options presort +syn keyword bibEntryKw contained related relatedoptions relatedtype relatedstring +syn keyword bibEntryKw contained sortkey sortname sortshorthand sorttitle sortyear xdata +syn keyword bibEntryKw contained xref namea nameb namec nameatype namebtype namectype +syn keyword bibEntryKw contained lista listb listc listd liste listf usera userb userc +syn keyword bibEntryKw contained userd usere userf verba verbb verbc archiveprefix pdf +syn keyword bibEntryKw contained primaryclass + +" Non-standard: +" AMS mref http://www.ams.org/mref +syn keyword bibNSEntryKw contained mrclass mrnumber mrreviewer fjournal coden + +" Clusters +" ======== +syn cluster bibVarContents contains=bibUnescapedSpecial,bibBrace,bibParen,bibMath +" This cluster is empty but things can be added externally: +"syn cluster bibCommentContents + +" Matches +" ======= +syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 +syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField +syn match bibVariable contained /[^{}," \t=]/ +syn region bibComment start=/./ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry +syn region bibMath contained start=/\(\\\)\@:p'), 'bicep', 'syntax/bicep.vim') + finish +endif + +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +if has('patch-7.4.1142') + syn iskeyword a-z,A-Z,48-57,_,- +endif + +syn case match + + +syn keyword bicepDataType array bool int object string contained + +syn keyword bicepStatement var module targetScope + +syn keyword bicepStatement param nextgroup=bicepParameterName skipwhite +syn match bicepParameterName /\h\w*/ nextgroup=bicepDataType skipwhite contained + +syn keyword bicepStatement output nextgroup=bicepOutputName skipwhite +syn match bicepOutputName /\h\w*/ nextgroup=bicepDataType skipwhite contained + +syn keyword bicepStatement resource nextgroup=bicepResourceName skipwhite +syn match bicepResourceName /\h\w*/ nextgroup=bicepResourceString skipwhite contained +syn region bicepResourceString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=bicepStringInterp nextgroup=bicepExisting skipwhite +syn keyword bicepExisting existing contained + +syn match bicepDecoratorName /@\s*\h\%(\w\|\.\)*/ contains=bicepDecorator +syn match bicepDecorator /@/ contained + +syn region bicepComment start="/\*" end="\*/" contains=bicepTodo,@Spell +syn region bicepComment start="//" end="$" contains=bicepTodo,@Spell +syn keyword bicepTodo TODO FIXME XXX BUG contained + +syn keyword bicepValueBool true false +syn keyword bicepValueNull null +syn match bicepValueDec /\<[0-9]\+\([kKmMgG]b\?\)\?\>/ + +syn region bicepValueString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=bicepStringInterp,bicepEscape +syn region bicepStringInterp start=/${/ end=/}/ contained +syn match bicepEscape /\\n/ contained +syn match bicepEscape /\\r/ contained + +syn keyword bicepRepeat for in +syn keyword bicepConditional if + +syn match bicepBraces /[{}\[\]]/ + + +hi def link bicepDataType Type +hi def link bicepStatement Statement +hi def link bicepResourceString String +hi def link bicepExisting Label + +hi def link bicepDecorator Define + +hi def link bicepComment Comment +hi def link bicepTodo Todo + +hi def link bicepValueBool Boolean +hi def link bicepValueDec Number +hi def link bicepValueNull Constant + +hi def link bicepValueString String +hi def link bicepStringInterp Identifier +hi def link bicepEscape Special + +hi def link bicepRepeat Repeat +hi def link bicepConditional Conditional + +hi def link bicepBraces Delimiter + + +let b:current_syntax = 'bicep' + +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/syntax/bindzone.vim b/syntax/bindzone.vim new file mode 100644 index 000000000..cc9d0d843 --- /dev/null +++ b/syntax/bindzone.vim @@ -0,0 +1,101 @@ +if polyglot#init#is_disabled(expand(':p'), 'bindzone', 'syntax/bindzone.vim') + finish +endif + +" Vim syntax file +" Language: BIND zone files (RFC 1035) +" Maintainer: Julian Mehnle +" URL: http://www.mehnle.net/source/odds+ends/vim/syntax/ +" Last Change: Thu 2011-07-16 20:42:00 UTC +" +" Based on an earlier version by Вячеслав Горбанев (Slava Gorbanev), with +" heavy modifications. +" +" $Id: bindzone.vim 12 2011-07-16 21:09:57Z julian $ + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" Directives +syn region zoneRRecord start=/^/ end=/$/ contains=zoneOwnerName,zoneSpecial,zoneTTL,zoneClass,zoneRRType,zoneComment,zoneUnknown + +syn match zoneDirective /^\$ORIGIN\s\+/ nextgroup=zoneOrigin,zoneUnknown +syn match zoneDirective /^\$TTL\s\+/ nextgroup=zoneTTL,zoneUnknown +syn match zoneDirective /^\$INCLUDE\s\+/ nextgroup=zoneText,zoneUnknown +syn match zoneDirective /^\$GENERATE\s/ + +syn match zoneUnknown contained /\S\+/ + +syn match zoneOwnerName contained /^[^[:space:]!"#$%&'()*+,\/:;<=>?@[\]\^`{|}~]\+\(\s\|;\)\@=/ nextgroup=zoneTTL,zoneClass,zoneRRType skipwhite +syn match zoneOrigin contained /[^[:space:]!"#$%&'()*+,\/:;<=>?@[\]\^`{|}~]\+\(\s\|;\|$\)\@=/ +syn match zoneDomain contained /[^[:space:]!"#$%&'()*+,\/:;<=>?@[\]\^`{|}~]\+\(\s\|;\|$\)\@=/ + +syn match zoneSpecial contained /^[@*.]\s/ +syn match zoneTTL contained /\s\@<=\d[0-9WwDdHhMmSs]*\(\s\|$\)\@=/ nextgroup=zoneClass,zoneRRType skipwhite +syn keyword zoneClass contained IN CHAOS CH HS HESIOD nextgroup=zoneRRType,zoneTTL skipwhite +syn keyword zoneRRType contained A AAAA CERT CNAME DNAME DNSKEY DS HINFO LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RP RRSIG SSHFP SOA SPF SRV TLSA TXT nextgroup=zoneRData skipwhite +syn match zoneRData contained /[^;]*/ contains=zoneDomain,zoneIPAddr,zoneIP6Addr,zoneText,zoneNumber,zoneParen,zoneUnknown + +syn match zoneIPAddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{,3}\>/ + +" Plain IPv6 address IPv6-embedded-IPv4 address +" 1111:2:3:4:5:6:7:8 1111:2:3:4:5:6:127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{6}\(\x\{1,4}:\x\{1,4}\|\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" ::[...:]8 ::[...:]127.0.0.1 +syn match zoneIP6Addr contained /\s\@<=::\(\(\x\{1,4}:\)\{,6}\x\{1,4}\|\(\x\{1,4}:\)\{,5}\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111::[...:]8 1111::[...:]127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{1}:\(\(\x\{1,4}:\)\{,5}\x\{1,4}\|\(\x\{1,4}:\)\{,4}\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111:2::[...:]8 1111:2::[...:]127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{2}:\(\(\x\{1,4}:\)\{,4}\x\{1,4}\|\(\x\{1,4}:\)\{,3}\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111:2:3::[...:]8 1111:2:3::[...:]127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{3}:\(\(\x\{1,4}:\)\{,3}\x\{1,4}\|\(\x\{1,4}:\)\{,2}\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111:2:3:4::[...:]8 1111:2:3:4::[...:]127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{4}:\(\(\x\{1,4}:\)\{,2}\x\{1,4}\|\(\x\{1,4}:\)\{,1}\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111:2:3:4:5::[...:]8 1111:2:3:4:5::127.0.0.1 +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{5}:\(\(\x\{1,4}:\)\{,1}\x\{1,4}\|\([0-2]\?\d\{1,2}\.\)\{3}[0-2]\?\d\{1,2}\)\>/ +" 1111:2:3:4:5:6::8 - +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{6}:\x\{1,4}\>/ +" 1111[:...]:: - +syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{1,7}:\(\s\|;\|$\)\@=/ + +syn match zoneText contained /"\([^"\\]\|\\.\)*"\(\s\|;\|$\)\@=/ +syn match zoneNumber contained /\<[0-9]\+\(\s\|;\|$\)\@=/ +syn match zoneSerial contained /\<[0-9]\{9,10}\(\s\|;\|$\)\@=/ + +syn match zoneErrParen /)/ +syn region zoneParen contained start="(" end=")" contains=zoneSerial,zoneTTL,zoneNumber,zoneComment +syn match zoneComment /;.*/ + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link zoneDirective Macro + +hi def link zoneUnknown Error + +hi def link zoneOrigin Statement +hi def link zoneOwnerName Statement +hi def link zoneDomain Identifier + +hi def link zoneSpecial Special +hi def link zoneTTL Constant +hi def link zoneClass Include +hi def link zoneRRType Type + +hi def link zoneIPAddr Number +hi def link zoneIP6Addr Number +hi def link zoneText String +hi def link zoneNumber Number +hi def link zoneSerial Special + +hi def link zoneErrParen Error +hi def link zoneComment Comment + + +let b:current_syntax = "bindzone" + +" vim:sts=2 sw=2 diff --git a/syntax/blade.vim b/syntax/blade.vim index 77f1f0833..d52dc2f36 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1 +if polyglot#init#is_disabled(expand(':p'), 'blade', 'syntax/blade.vim') + finish +endif " Vim syntax file " Language: Blade (Laravel) @@ -73,5 +75,3 @@ let b:current_syntax = 'blade' if exists('main_syntax') && main_syntax == 'blade' unlet main_syntax endif - -endif diff --git a/syntax/blank.vim b/syntax/blank.vim new file mode 100644 index 000000000..de8ccfe13 --- /dev/null +++ b/syntax/blank.vim @@ -0,0 +1,43 @@ +if polyglot#init#is_disabled(expand(':p'), 'blank', 'syntax/blank.vim') + finish +endif + +" Vim syntax file +" Language: Blank 1.4.1 +" Maintainer: Rafal M. Sulejman +" Last change: 2011 Dec 28 by Thilo Six + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore + +" Blank instructions +syn match blankInstruction "{[:;,\.+\-*$#@/\\`'"!\|><{}\[\]()?xspo\^&\~=_%]}" + +" Common strings +syn match blankString "\~[^}]" + +" Numbers +syn match blankNumber "\[[0-9]\+\]" + +syn case match + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link blankInstruction Statement +hi def link blankNumber Number +hi def link blankString String + + +let b:current_syntax = "blank" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/brewfile.vim b/syntax/brewfile.vim index 4056c8840..ad0fbf8dc 100644 --- a/syntax/brewfile.vim +++ b/syntax/brewfile.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'brewfile') == -1 +if polyglot#init#is_disabled(expand(':p'), 'brewfile', 'syntax/brewfile.vim') + finish +endif " Vim syntax file " Language: Brewfile @@ -19,5 +21,3 @@ syn keyword brewfileDirective brew cask tap mas cask_args hi def link brewfileDirective Keyword let b:current_syntax = "brewfile" - -endif diff --git a/syntax/bsdl.vim b/syntax/bsdl.vim new file mode 100644 index 000000000..fd0a8a596 --- /dev/null +++ b/syntax/bsdl.vim @@ -0,0 +1,21 @@ +if polyglot#init#is_disabled(expand(':p'), 'bsdl', 'syntax/bsdl.vim') + finish +endif + +" Vim syntax file +" Language: Boundary Scan Description Language (BSDL) +" Maintainer: Daniel Kho +" Last Changed: 2020 Mar 19 by Daniel Kho + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read in VHDL syntax files +runtime! syntax/vhdl.vim +unlet b:current_syntax + +let b:current_syntax = "bsdl" + +" vim: ts=8 diff --git a/syntax/bst.vim b/syntax/bst.vim new file mode 100644 index 000000000..4fa88f8e7 --- /dev/null +++ b/syntax/bst.vim @@ -0,0 +1,74 @@ +if polyglot#init#is_disabled(expand(':p'), 'bst', 'syntax/bst.vim') + finish +endif + +" Vim syntax file +" Language: BibTeX Bibliography Style +" Maintainer: Tim Pope +" Filenames: *.bst +" $Id: bst.vim,v 1.2 2007/05/05 18:24:42 vimboss Exp $ + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=48-57,#,$,',.,A-Z,a-z + +syn case ignore + +syn match bstString +"[^"]*\%("\|$\)+ contains=bstField,bstType,bstError +" Highlight the last character of an unclosed string, but only when the cursor +" is not beyond it (i.e., it is still being edited). Imperfect. +syn match bstError '[^"]\%#\@!$' contained + +syn match bstNumber "#-\=\d\+\>" +syn keyword bstNumber entry.max$ global.max$ +syn match bstComment "%.*" + +syn keyword bstCommand ENTRY FUNCTION INTEGERS MACRO STRINGS +syn keyword bstCommand READ EXECUTE ITERATE REVERSE SORT +syn match bstBuiltIn "\s[-<>=+*]\|\s:=" +syn keyword bstBuiltIn add.period$ +syn keyword bstBuiltIn call.type$ change.case$ chr.to.int$ cite$ +syn keyword bstBuiltIn duplicate$ empty$ format.name$ +syn keyword bstBuiltIn if$ int.to.chr$ int.to.str$ +syn keyword bstBuiltIn missing$ +syn keyword bstBuiltIn newline$ num.names$ +syn keyword bstBuiltIn pop$ preamble$ purify$ quote$ +syn keyword bstBuiltIn skip$ stack$ substring$ swap$ +syn keyword bstBuiltIn text.length$ text.prefix$ top$ type$ +syn keyword bstBuiltIn warning$ while$ width$ write$ +syn match bstIdentifier "'\k*" +syn keyword bstType article book booklet conference +syn keyword bstType inbook incollection inproceedings +syn keyword bstType manual mastersthesis misc +syn keyword bstType phdthesis proceedings +syn keyword bstType techreport unpublished +syn keyword bstField abbr address annote author +syn keyword bstField booktitle chapter crossref comment +syn keyword bstField edition editor +syn keyword bstField howpublished institution journal key month +syn keyword bstField note number +syn keyword bstField organization +syn keyword bstField pages publisher +syn keyword bstField school series +syn keyword bstField title type +syn keyword bstField volume year + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link bstComment Comment +hi def link bstString String +hi def link bstCommand PreProc +hi def link bstBuiltIn Statement +hi def link bstField Special +hi def link bstNumber Number +hi def link bstType Type +hi def link bstIdentifier Identifier +hi def link bstError Error + +let b:current_syntax = "bst" + +" vim:set ft=vim sts=4 sw=4: diff --git a/syntax/bzl.vim b/syntax/bzl.vim new file mode 100644 index 000000000..1af768a29 --- /dev/null +++ b/syntax/bzl.vim @@ -0,0 +1,20 @@ +if polyglot#init#is_disabled(expand(':p'), 'bzl', 'syntax/bzl.vim') + finish +endif + +" Vim syntax file +" Language: Bazel (http://bazel.io) +" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl) +" Last Change: 2015 Aug 11 + +if exists('b:current_syntax') + finish +endif + + +runtime! syntax/python.vim + +let b:current_syntax = 'bzl' + +syn region bzlRule start='^\w\+($' end='^)\n*' transparent fold +syn region bzlList start='\[' end='\]' transparent fold diff --git a/syntax/bzr.vim b/syntax/bzr.vim new file mode 100644 index 000000000..15762ce16 --- /dev/null +++ b/syntax/bzr.vim @@ -0,0 +1,54 @@ +if polyglot#init#is_disabled(expand(':p'), 'bzr', 'syntax/bzr.vim') + finish +endif + +" Vim syntax file +" Language: Bazaar (bzr) commit file +" Maintainer: Dmitry Vasiliev +" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/bzr.vim +" Last Change: 2012-02-11 +" Filenames: bzr_log.* +" Version: 1.2.2 +" +" Thanks: +" +" Gioele Barabucci +" for idea of diff highlighting + +" quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +if exists("bzr_highlight_diff") + syn include @Diff syntax/diff.vim +endif + +syn match bzrRemoved "^removed:$" contained +syn match bzrAdded "^added:$" contained +syn match bzrRenamed "^renamed:$" contained +syn match bzrModified "^modified:$" contained +syn match bzrUnchanged "^unchanged:$" contained +syn match bzrUnknown "^unknown:$" contained +syn cluster Statuses contains=bzrRemoved,bzrAdded,bzrRenamed,bzrModified,bzrUnchanged,bzrUnknown +if exists("bzr_highlight_diff") + syn cluster Statuses add=@Diff +endif +syn region bzrRegion start="^-\{14} This line and the following will be ignored -\{14}$" end="\%$" contains=@NoSpell,@Statuses + +" Synchronization. +syn sync clear +syn sync match bzrSync grouphere bzrRegion "^-\{14} This line and the following will be ignored -\{14}$"me=s-1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet. + +hi def link bzrRemoved Constant +hi def link bzrAdded Identifier +hi def link bzrModified Special +hi def link bzrRenamed Special +hi def link bzrUnchanged Special +hi def link bzrUnknown Special + + +let b:current_syntax = "bzr" diff --git a/syntax/c.vim b/syntax/c.vim index ff1cf9dbc..714746007 100644 --- a/syntax/c.vim +++ b/syntax/c.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 +if polyglot#init#is_disabled(expand(':p'), 'c/c++', 'syntax/c.vim') + finish +endif " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2019 Nov 29 +" Last Change: 2021 May 24 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -15,6 +17,9 @@ set cpo&vim let s:ft = matchstr(&ft, '^\([^.]\)\+') +" check if this was included from cpp.vim +let s:in_cpp_family = exists("b:filetype_in_cpp_family") + " Optional embedded Autodoc parsing " To enable it add: let g:c_autodoc = 1 " to your .vimrc @@ -57,7 +62,7 @@ if !exists("c_no_cformat") endif " cCppString: same as cString, but ends at end of line -if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat") +if s:in_cpp_family && !exists("cpp_no_cpp11") && !exists("c_no_cformat") " ISO C++11 syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell @@ -89,7 +94,7 @@ syn match cSpecialCharacter display "L\='\\\o\{1,3}'" syn match cSpecialCharacter display "'\\x\x\{1,2}'" syn match cSpecialCharacter display "L'\\x\x\+'" -if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11")) +if (s:ft ==# "c" && !exists("c_no_c11")) || (s:in_cpp_family && !exists("cpp_no_cpp11")) " ISO C11 or ISO C++ 11 if exists("c_no_cformat") syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend @@ -132,7 +137,7 @@ endif " But avoid matching <::. syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom if exists("c_no_curly_error") - if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") + if s:in_cpp_family && !exists("cpp_no_cpp11") syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell " cCppParen: same as cParen but ends at end-of-line; used in cDefine syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell @@ -146,7 +151,7 @@ if exists("c_no_curly_error") syn match cErrInParen display contained "^[{}]\|^<%\|^%>" endif elseif exists("c_no_bracket_error") - if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") + if s:in_cpp_family && !exists("cpp_no_cpp11") syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell " cCppParen: same as cParen but ends at end-of-line; used in cDefine syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell @@ -160,7 +165,7 @@ elseif exists("c_no_bracket_error") syn match cErrInParen display contained "[{}]\|<%\|%>" endif else - if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") + if s:in_cpp_family && !exists("cpp_no_cpp11") syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell " cCppParen: same as cParen but ends at end-of-line; used in cDefine syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell @@ -274,12 +279,13 @@ if exists("c_gnu") syn keyword cType __label__ __complex__ __volatile__ endif -syn keyword cStructure struct union enum typedef +syn keyword cTypedef typedef +syn keyword cStructure struct union enum syn keyword cStorageClass static register auto volatile extern const if exists("c_gnu") syn keyword cStorageClass inline __attribute__ endif -if !exists("c_no_c99") && s:ft !=# 'cpp' +if !exists("c_no_c99") && !s:in_cpp_family syn keyword cStorageClass inline restrict endif if !exists("c_no_c11") @@ -313,8 +319,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") if exists("c_gnu") syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ endif - syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ - syn keyword cConstant __STDC_VERSION__ + syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ __STDC_VERSION__ __STDC_HOSTED__ syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN @@ -348,6 +353,8 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX + " used in assert.h + syn keyword cConstant NDEBUG " POSIX 2001 syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ " non-POSIX signals @@ -411,6 +418,9 @@ if exists("c_autodoc") syn cluster cPreProcGroup add=cAutodocReal endif +" be able to fold #pragma regions +syn region cPragma start="^\s*#pragma\s\+region\>" end="^\s*#pragma\s\+endregion\>" transparent keepend extend fold + " Highlight User Labels syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString if s:ft ==# 'c' || exists("cpp_no_cpp11") @@ -420,7 +430,7 @@ endif syn cluster cLabelGroup contains=cUserLabel syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup -if s:ft ==# 'cpp' +if s:in_cpp_family syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup else @@ -477,6 +487,7 @@ hi def link cSpecialError cError hi def link cCurlyError cError hi def link cOperator Operator hi def link cStructure Structure +hi def link cTypedef Structure hi def link cStorageClass StorageClass hi def link cInclude Include hi def link cPreProc PreProc @@ -510,5 +521,3 @@ unlet s:ft let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 - -endif diff --git a/syntax/cabal-1.vim b/syntax/cabal-1.vim new file mode 100644 index 000000000..e7a892a36 --- /dev/null +++ b/syntax/cabal-1.vim @@ -0,0 +1,55 @@ +if polyglot#init#is_disabled(expand(':p'), 'haskell', 'syntax/cabal.vim') + finish +endif + +" syntax highlighting for cabal +" +" author: raichoo (raichoo@googlemail.com) + +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn match cabalLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell +syn match cabalIdentifier "[A-Za-z\-]*" contained +syn match cabalOperator "[<=>&|!]" +syn match cabalColon ":" contained +syn match cabalNumber "\<[0-9][0-9\.*]*\>" +syn match cabalDelimiter "[,()]" +syn keyword cabalBool True False +syn keyword cabalConditional if else +syn match cabalCompilerFlag "\s\+-[^ -][^ ]*" +syn match cabalDocBulletPoint "^\s\+\*" +syn match cabalDocHeadline "^\s\+=.*$" +syn match cabalDocCode "^\s\+>.*$" +syn match cabalDocNewline "^\s\+\.\s*$" +syn match cabalSection "^\c\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\|common\)" +syn match cabalEntry "^\s*[A-Za-z][a-zA-Z\-]*:" contains=cabalIdentifier,cabalColon + +syn region cabalDescription start="^\s*[dD]escription:" end="^\<" keepend + \ contains= + \ cabalEntry, + \ cabalLineComment, + \ cabalDocBulletPoint, + \ cabalDocHeadline, + \ cabalDocNewline, + \ cabalDocCode + +highlight def link cabalIdentifier Identifier +highlight def link cabalLineComment Comment +highlight def link cabalOperator Operator +highlight def link cabalColon Operator +highlight def link cabalNumber Number +highlight def link cabalSection Structure +highlight def link cabalDelimiter Delimiter +highlight def link cabalBool Boolean +highlight def link cabalCompilerFlag Macro +highlight def link cabalConditional Conditional +highlight def link cabalDocBulletPoint Structure +highlight def link cabalDocHeadline Include +highlight def link cabalDocNewline Operator +highlight def link cabalDocCode Macro + +let b:current_syntax = "cabal" diff --git a/syntax/cabal-2.vim b/syntax/cabal-2.vim new file mode 100644 index 000000000..f71cb4a53 --- /dev/null +++ b/syntax/cabal-2.vim @@ -0,0 +1,267 @@ +if polyglot#init#is_disabled(expand(':p'), 'cabal', 'syntax/cabal-2.vim') + finish +endif + +" Vim syntax file +" Language: Haskell Cabal Build file +" Author: Vincent Berthoux +" Maintainer: Marcin Szamotulski +" Previous Maintainer: Vincent Berthoux +" File Types: .cabal +" Last Change: 21 Nov 2020 +" v1.5: Incorporated changes from +" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim +" Use `syn keyword` instead of `syn match`. +" Added cabalStatementRegion to limit matches of keywords, which fixes +" the highlighting of description's value. +" Added cabalVersionRegion to limit the scope of cabalVersionOperator +" and cabalVersion matches. +" Added cabalLanguage keyword. +" Added calbalTitle, cabalAuthor and cabalMaintainer syntax groups. +" Added ! and ^>= operators (calbal 2.0) +" Added build-type keywords +" v1.4: Add benchmark support, thanks to Simon Meier +" v1.3: Updated to the last version of cabal +" Added more highlighting for cabal function, true/false +" and version number. Also added missing comment highlighting. +" Cabal known compiler are highlighted too. +" +" V1.2: Added cpp-options which was missing. Feature implemented +" by GHC, found with a GHC warning, but undocumented. +" Whatever... +" +" v1.1: Fixed operator problems and added ftdetect file +" (thanks to Sebastian Schwarz) +" +" v1.0: Cabal syntax in vimball format +" (thanks to Magnus Therning) + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" this file uses line continuation +let s:cpo_save = &cpo +set cpo&vim + +" set iskeyword for this syntax script +syn iskeyword @,48-57,192-255,- + +" Case sensitive matches +syn case match + +syn keyword cabalConditional if else +syn keyword cabalFunction os arche impl flag +syn match cabalComment /--.*$/ + +" Case insensitive matches +syn case ignore + +syn keyword cabalCategory contained + \ executable + \ library + \ benchmark + \ test-suite + \ source-repository + \ flag + \ custom-setup + \ common +syn match cabalCategoryTitle contained /[^{]*\ze{\?/ +syn match cabalCategoryRegion + \ contains=cabalCategory,cabalCategoryTitle + \ nextgroup=cabalCategory skipwhite + \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/ +syn keyword cabalTruth true false + +" cabalStatementRegion which limits the scope of cabalStatement keywords, this +" way they are not highlighted in description. +syn region cabalStatementRegion start=+^\s*\(--\)\@=\|<=\|<\|>/ +" match version: `[%]\@/ +" cabalVersionRegion which limits the scope of cabalVersion pattern. +syn match cabalVersionRegionA + \ contains=cabalVersionOperator,cabalVersion + \ keepend + \ /\%(==\|\^\?>=\|<=\|<\|>\)\s*\d\+\%(\.\d\+\)*\%(\.\*\)\?\>/ +" version inside `version: ...` +syn match cabalVersionRegionB + \ contains=cabalStatementRegion,cabalVersionOperator,cabalVersion + \ /^\s*\%(cabal-\)\?version\s*:.*$/ + +syn keyword cabalLanguage Haskell98 Haskell2010 + +" title region +syn match cabalName contained /:\@<=.*/ +syn match cabalNameRegion + \ contains=cabalStatementRegion,cabalName + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*name\s*:.*$/ + +" author region +syn match cabalAuthor contained /:\@<=.*/ +syn match cabalAuthorRegion + \ contains=cabalStatementRegion,cabalStatement,cabalAuthor + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*author\s*:.*$/ + +" maintainer region +syn match cabalMaintainer contained /:\@<=.*/ +syn match cabalMaintainerRegion + \ contains=cabalStatementRegion,cabalStatement,cabalMaintainer + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*maintainer\s*:.*$/ + +" license region +syn match cabalLicense contained /:\@<=.*/ +syn match cabalLicenseRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicense + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license\s*:.*$/ + +" license-file region +syn match cabalLicenseFile contained /:\@<=.*/ +syn match cabalLicenseFileRegion + \ contains=cabalStatementRegion,cabalStatement,cabalLicenseFile + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*license-file\s*:.*$/ + +" tested-with region with compilers and versions +syn keyword cabalCompiler contained ghc nhc yhc hugs hbc helium jhc lhc +syn match cabalTestedWithRegion + \ contains=cabalStatementRegion,cabalStatement,cabalCompiler,cabalVersionRegionA + \ nextgroup=cabalStatementRegion + \ oneline + \ /^\c\s*tested-with\s*:.*$/ + +" build type keywords +syn keyword cabalBuildType contained + \ simple custom configure +syn match cabalBuildTypeRegion + \ contains=cabalStatementRegion,cabalStatement,cabalBuildType + \ nextgroup=cabalStatementRegion + \ /^\c\s*build-type\s*:.*$/ + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link cabalName Title +hi def link cabalAuthor Normal +hi def link cabalMaintainer Normal +hi def link cabalCategoryTitle Title +hi def link cabalLicense Normal +hi def link cabalLicenseFile Normal +hi def link cabalBuildType Keyword +hi def link cabalVersion Number +hi def link cabalTruth Boolean +hi def link cabalComment Comment +hi def link cabalStatement Statement +hi def link cabalLanguage Type +hi def link cabalCategory Type +hi def link cabalFunction Function +hi def link cabalConditional Conditional +hi def link cabalOperator Operator +hi def link cabalVersionOperator Operator +hi def link cabalCompiler Constant + +let b:current_syntax = "cabal" + +let &cpo = s:cpo_save +unlet! s:cpo_save + +" vim: ts=8 diff --git a/syntax/cabal.vim b/syntax/cabal.vim index 7b9724bd5..6cbc36137 100644 --- a/syntax/cabal.vim +++ b/syntax/cabal.vim @@ -1,55 +1,3 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 - -" syntax highlighting for cabal -" -" author: raichoo (raichoo@googlemail.com) - -if version < 600 - syn clear -elseif exists("b:current_syntax") - finish -endif - -syn match cabalLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contains=@Spell -syn match cabalIdentifier "[A-Za-z\-]*" contained -syn match cabalOperator "[<=>&|!]" -syn match cabalColon ":" contained -syn match cabalNumber "\<[0-9][0-9\.*]*\>" -syn match cabalDelimiter "[,()]" -syn keyword cabalBool True False -syn keyword cabalConditional if else -syn match cabalCompilerFlag "\s\+-[^ -][^ ]*" -syn match cabalDocBulletPoint "^\s\+\*" -syn match cabalDocHeadline "^\s\+=.*$" -syn match cabalDocCode "^\s\+>.*$" -syn match cabalDocNewline "^\s\+\.\s*$" -syn match cabalSection "^\c\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\)" -syn match cabalEntry "^\s*[A-Za-z][a-zA-Z\-]*:" contains=cabalIdentifier,cabalColon - -syn region cabalDescription start="^\s*[dD]escription:" end="^\<" keepend - \ contains= - \ cabalEntry, - \ cabalLineComment, - \ cabalDocBulletPoint, - \ cabalDocHeadline, - \ cabalDocNewline, - \ cabalDocCode - -highlight def link cabalIdentifier Identifier -highlight def link cabalLineComment Comment -highlight def link cabalOperator Operator -highlight def link cabalColon Operator -highlight def link cabalNumber Number -highlight def link cabalSection Structure -highlight def link cabalDelimiter Delimiter -highlight def link cabalBool Boolean -highlight def link cabalCompilerFlag Macro -highlight def link cabalConditional Conditional -highlight def link cabalDocBulletPoint Structure -highlight def link cabalDocHeadline Include -highlight def link cabalDocNewline Operator -highlight def link cabalDocCode Macro - -let b:current_syntax = "cabal" - -endif +" Polyglot metafile +source :h/cabal-1.vim +source :h/cabal-2.vim diff --git a/syntax/caddyfile.vim b/syntax/caddyfile.vim index da12cd77a..12300a7c0 100644 --- a/syntax/caddyfile.vim +++ b/syntax/caddyfile.vim @@ -1,33 +1,52 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 +if polyglot#init#is_disabled(expand(':p'), 'caddyfile', 'syntax/caddyfile.vim') + finish +endif -" Language: Caddyfile -" Author: Josh Glendenning +" Language: Caddyfile +" Maintainer: 0az <0az@afzhou.com> +" Original Author: Josh Glendenning if exists("b:current_syntax") finish endif -syn match caddyDirective "^\s*\([a-zA-Z0-9_]\+\)" nextgroup=caddyDirectiveArgs skipwhite -syn region caddyDirectiveArgs start="" end="\({\|#\|$\)"me=s-1 oneline contained contains=caddyPlaceholder,caddyString nextgroup=caddyDirectiveBlock skipwhite -syn region caddyDirectiveBlock start="{" skip="\\}" end="}" contained contains=caddySubdirective,caddyComment +syn match caddyDirective "\v^\s*(\w\S*)" nextgroup=caddyDirectiveArgs skipwhite +syn region caddyDirectiveArgs start="" end="\({\|#\|$\)"me=s-1 oneline contained contains=caddyPlaceholder,caddyString,caddyNamedMatcher nextgroup=caddyDirectiveBlock skipwhite +syn region caddyDirectiveBlock start="{" skip="\\}" end="}" contained contains=caddySubdirective,caddyComment,caddyImport + +syn match caddySubdirective "\v^\s*(\w\S*)" contained nextgroup=caddySubdirectiveArgs skipwhite +syn region caddySubdirectiveArgs start="" end="\(#\|$\)"me=s-1 oneline contained contains=caddyPlaceholder,caddyString,caddyNamedMatcher + +" Needs priority over Directive +syn match caddyImport "\v^\s*" nextgroup=caddyImportPattern skipwhite +syn match caddyImportPattern "\v\c\S+" contained nextgroup=caddyImportArgs skipwhite +syn region caddyImportArgs start="" end="$"me=s-1 oneline contained contains=caddyPlaceholder,caddyString,caddyNamedMatcher -syn match caddySubdirective "^\s*\([a-zA-Z0-9_]\+\)" contained nextgroup=caddySubdirectiveArgs skipwhite -syn region caddySubdirectiveArgs start="" end="\(#\|$\)"me=s-1 oneline contained contains=caddyPlaceholder,caddyString +syn match caddyHost "\v\c^\s*\zs(https?://)?(([0-9a-z-]+\.)([0-9a-z-]+\.?)+|[0-9a-z-]+)?(:\d{1,5})?" nextgroup=caddyHostBlock skipwhite +syn region caddyHostBlock start="{" skip="\\}" end="}" contained contains=caddyDirective,caddyComment,caddyNamedMatcherDef,caddyImport -syn match caddyHost "\(https\?:\/\/\)\?\(\(\w\{1,}\.\)\(\w\{2,}\.\?\)\+\|localhost\)\(:[0-9]\{1,5}\)\?" nextgroup=caddyHostBlock skipwhite -syn region caddyHostBlock start="{" skip="\\}" end="}" contained contains=caddyDirective,caddyComment +" Needs priority over Host +syn region caddySnippetDef start="("rs=e+1 end=")"re=s-1 oneline keepend contains=caddySnippet +syn match caddySnippet "\v\w+" contained nextgroup=caddySnippetBlock skipwhite + +syn match caddyNamedMatcher "\v^\s*\zs\@\S+" contained skipwhite +syn match caddyNamedMatcherDef "\v\s*\zs\@\S+" nextgroup=caddyNamedMatcherDefBlock +syn region caddyNamedMatcherDefBlock start="{" skip="\\}" end="}" contained contains=caddySubdirective,caddyComment,caddyImport syn region caddyPlaceholder start="{" skip="\\}" end="}" oneline contained syn region caddyString start='"' skip='\\\\\|\\"' end='"' oneline -syn match caddyComment "#.*$" +syn region caddyComment start="#" end="$" oneline hi link caddyDirective Keyword hi link caddySubdirective Structure hi link caddyHost Identifier +hi link caddyImport PreProc +hi link caddySnippetDef PreProc +hi link caddySnippet Identifier hi link caddyPlaceholder Special hi link caddyString String hi link caddyComment Comment +hi link caddyNamedMatcherDef caddyNamedMatcher +hi link caddyNamedMatcher Identifier let b:current_syntax = "caddyfile" - -endif diff --git a/syntax/calendar.vim b/syntax/calendar.vim new file mode 100644 index 000000000..7f581c22c --- /dev/null +++ b/syntax/calendar.vim @@ -0,0 +1,114 @@ +if polyglot#init#is_disabled(expand(':p'), 'calendar', 'syntax/calendar.vim') + finish +endif + +" Vim syntax file +" Language: calendar(1) input file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword calendarTodo contained TODO FIXME XXX NOTE + +syn region calendarComment start='/\*' end='\*/' + \ contains=calendarTodo,@Spell + +syn region calendarCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl + \ end=+"+ end='$' contains=calendarSpecial +syn match calendarSpecial display contained '\\\%(x\x\+\|\o\{1,3}\|.\|$\)' +syn match calendarSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" + +syn region calendarPreCondit start='^\s*#\s*\%(if\|ifdef\|ifndef\|elif\)\>' + \ skip='\\$' end='$' + \ contains=calendarComment,calendarCppString +syn match calendarPreCondit display '^\s*#\s*\%(else\|endif\)\>' +syn region calendarCppOut start='^\s*#\s*if\s\+0\+' end='.\@=\|$' + \ contains=calendarCppOut2 +syn region calendarCppOut2 contained start='0' + \ end='^\s*#\s*\%(endif\|else\|elif\)\>' + \ contains=calendarSpaceError,calendarCppSkip +syn region calendarCppSkip contained + \ start='^\s*#\s*\%(if\|ifdef\|ifndef\)\>' + \ skip='\\$' end='^\s*#\s*endif\>' + \ contains=calendarSpaceError,calendarCppSkip +syn region calendarIncluded display contained start=+"+ skip=+\\\\\|\\"+ + \ end=+"+ +syn match calendarIncluded display contained '<[^>]*>' +syn match calendarInclude display '^\s*#\s*include\>\s*["<]' + \ contains=calendarIncluded +syn cluster calendarPreProcGroup contains=calendarPreCondit,calendarIncluded, + \ calendarInclude,calendarDefine, + \ calendarCppOut,calendarCppOut2, + \ calendarCppSkip,calendarString, + \ calendarSpecial,calendarTodo +syn region calendarDefine start='^\s*#\s*\%(define\|undef\)\>' + \ skip='\\$' end='$' + \ contains=ALLBUT,@calendarPreProcGroup +syn region calendarPreProc start='^\s*#\s*\%(pragma\|line\|warning\|warn\|error\)\>' + \ skip='\\$' end='$' keepend + \ contains=ALLBUT,@calendarPreProcGroup + +syn keyword calendarKeyword CHARSET BODUN LANG +syn case ignore +syn keyword calendarKeyword Easter Pashka +syn case match + +syn case ignore +syn match calendarNumber display '\<\d\+\>' +syn keyword calendarMonth Jan[uary] Feb[ruary] Mar[ch] Apr[il] May + \ Jun[e] Jul[y] Aug[ust] Sep[tember] + \ Oct[ober] Nov[ember] Dec[ember] +syn match calendarMonth display '\<\%(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\.' +syn keyword calendarWeekday Mon[day] Tue[sday] Wed[nesday] Thu[rsday] +syn keyword calendarWeekday Fri[day] Sat[urday] Sun[day] +syn match calendarWeekday display '\<\%(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\)\.' + \ nextgroup=calendarWeekdayMod +syn match calendarWeekdayMod display '[+-]\d\+\>' +syn case match + +syn match calendarTime display '\<\%([01]\=\d\|2[0-3]\):[0-5]\d\%(:[0-5]\d\)\=' +syn match calendarTime display '\<\%(0\=[1-9]\|1[0-2]\):[0-5]\d\%(:[0-5]\d\)\=\s*[AaPp][Mm]' + +syn match calendarVariable '\*' + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment calendarComment minlines=" . b:c_minlines + +hi def link calendarTodo Todo +hi def link calendarComment Comment +hi def link calendarCppString String +hi def link calendarSpecial SpecialChar +hi def link calendarPreCondit PreCondit +hi def link calendarCppOut Comment +hi def link calendarCppOut2 calendarCppOut +hi def link calendarCppSkip calendarCppOut +hi def link calendarIncluded String +hi def link calendarInclude Include +hi def link calendarDefine Macro +hi def link calendarPreProc PreProc +hi def link calendarKeyword Keyword +hi def link calendarNumber Number +hi def link calendarMonth String +hi def link calendarWeekday String +hi def link calendarWeekdayMod Special +hi def link calendarTime Number +hi def link calendarVariable Identifier + +let b:current_syntax = "calendar" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/carp.vim b/syntax/carp.vim index 7266360dc..849c3247b 100644 --- a/syntax/carp.vim +++ b/syntax/carp.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'carp') == -1 +if polyglot#init#is_disabled(expand(':p'), 'carp', 'syntax/carp.vim') + finish +endif " Vim syntax file " Language: Carp @@ -31,6 +33,7 @@ syn keyword carpSyntax str* println* break doc sig hidden private syn keyword carpSyntax while-do const-assert save-docs defproject syn keyword carpSyntax relative-include not-on-windows load-and-use syn keyword carpSyntax deftest +syn keyword carpSyntax quasiquote unquote unquote-splicing syn match carpSyntax "\vc(a|d){1,4}r" syn keyword carpFunc λ @@ -53,7 +56,7 @@ syn keyword carpFunc string-join free sleep-seconds sleep-micros substitute syn keyword carpFunc neg to-float match matches? find global-match match-str syn keyword carpFunc from-float tan asin atan cosh sinh tanh exp frexp ldexp syn keyword carpFunc log log10 modf pow ceil clamp approx refstr foreach -syn keyword carpFunc => ==> repeat nth replicate range raw aset aset! +syn keyword carpFunc -> --> => ==> repeat nth replicate range raw aset aset! syn keyword carpFunc push-back pop-back sort index-of element-count syn keyword carpFunc apply unsafe-from from just? nothing? ptr from-ptr syn keyword carpFunc map and-then unwrap-or-zero or-else unwrap-or-else @@ -124,6 +127,13 @@ syn match carpComment /;.*$/ contains=@Spell syn region carpQuoted matchgroup=Delimiter start="#['`]"rs=s+2 end=![ \t()\[\]";]!re=e-1,me=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal syn region carpQuoted matchgroup=Delimiter start="#['`]("rs=s+3 matchgroup=Delimiter end=")"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal +syn region carpUnquote matchgroup=Delimiter start="%"rs=s+1 end=![ \t\[\]()";]!re=e-1,me=e-1 contained contains=@carpNormal +syn region carpUnquote matchgroup=Delimiter start="%@"rs=s+2 end=![ \t\[\]()";]!re=e-1,me=e-1 contained contains=@carpNormal +syn region carpUnquote matchgroup=Delimiter start="%@("rs=s+2 end=")"re=e-1 contained contains=@carpNormal +syn region carpUnquote matchgroup=Delimiter start="%("rs=s+2 end=")"re=e-1 contained contains=@carpNormal + +syn cluster carpQuotedStuff add=carpUnquote + syn cluster carpNormal add=carpQuoted,carpComment syn cluster carpQuotedOrNormal add=carpComment @@ -165,5 +175,3 @@ if version >= 508 || !exists("carp_syntax_init") endif let b:current_syntax = "carp" - -endif diff --git a/syntax/catalog.vim b/syntax/catalog.vim new file mode 100644 index 000000000..c9b54a71e --- /dev/null +++ b/syntax/catalog.vim @@ -0,0 +1,34 @@ +if polyglot#init#is_disabled(expand(':p'), 'catalog', 'syntax/catalog.vim') + finish +endif + +" Vim syntax file +" Language: sgml catalog file +" Maintainer: Johannes Zellner +" Last Change: Fr, 04 Nov 2005 12:46:45 CET +" Filenames: /etc/sgml.catalog +" $Id: catalog.vim,v 1.2 2005/11/23 21:11:10 vimboss Exp $ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" strings +syn region catalogString start=+"+ skip=+\\\\\|\\"+ end=+"+ keepend +syn region catalogString start=+'+ skip=+\\\\\|\\'+ end=+'+ keepend + +syn region catalogComment start=+--+ end=+--+ contains=catalogTodo +syn keyword catalogTodo TODO FIXME XXX NOTE contained +syn keyword catalogKeyword DOCTYPE OVERRIDE PUBLIC DTDDECL ENTITY CATALOG + + +" The default highlighting. +hi def link catalogString String +hi def link catalogComment Comment +hi def link catalogTodo Todo +hi def link catalogKeyword Statement + +let b:current_syntax = "catalog" diff --git a/syntax/cdl.vim b/syntax/cdl.vim new file mode 100644 index 000000000..10b5cc610 --- /dev/null +++ b/syntax/cdl.vim @@ -0,0 +1,82 @@ +if polyglot#init#is_disabled(expand(':p'), 'cdl', 'syntax/cdl.vim') + finish +endif + +" Vim syntax file +" Language: Comshare Dimension Definition Language +" Maintainer: Raul Segura Acevedo +" Last change: 2016 Sep 20 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +sy case ignore +sy sync fromstart +sy keyword cdlStatement dimension hierarchy group grouphierarchy schedule class +sy keyword cdlType add update file category main altername removeall required notrequired +sy keyword cdlConditional if then elseif else endif and or not cons rpt xlt +sy keyword cdlFunction ChildOf IChildOf LeafChildOf DescendantOf IDescendantOf LeafDescendantOf MemberIs CountOf + +sy keyword cdlIdentifier contained id name desc description xlttype precision symbol curr_ name group_name rate_name +sy keyword cdlIdentifier contained xcheck endbal accounttype natsign consolidate formula pctown usage periodicity +sy match cdlIdentifier contained 'child\s*name' +sy match cdlIdentifier contained 'parent\s*name' +sy match cdlIdentifier contained 'grp\s*description' +sy match cdlIdentifier contained 'grpchild\s*name' +sy match cdlIdentifier contained 'grpparent\s*name' +sy match cdlIdentifier contained 'preceding\s*member' +sy match cdlIdentifier contained 'unit\s*name' +sy match cdlIdentifier contained 'unit\s*id' +sy match cdlIdentifier contained 'schedule\s*name' +sy match cdlIdentifier contained 'schedule\s*id' + +sy match cdlString /\[[^]]*]/ contains=cdlRestricted,cdlNotSupported +sy match cdlRestricted contained /[&*,_]/ +" not supported +sy match cdlNotSupported contained /[:"!']/ + +sy keyword cdlTodo contained TODO FIXME XXX +sy cluster cdlCommentGroup contains=cdlTodo +sy match cdlComment '//.*' contains=@cdlCommentGroup +sy region cdlComment start="/\*" end="\*/" contains=@cdlCommentGroup fold +sy match cdlCommentE "\*/" + +sy region cdlParen transparent start='(' end=')' contains=ALLBUT,cdlParenE,cdlRestricted,cdlNotSupported +"sy region cdlParen transparent start='(' end=')' contains=cdlIdentifier,cdlComment,cdlParenWordE +sy match cdlParenE ")" +"sy match cdlParenWordE contained "\k\+" + +sy keyword cdlFxType allocation downfoot expr xltgain +"sy keyword cdlFxType contained allocation downfoot expr xltgain +"sy region cdlFx transparent start='\k\+(' end=')' contains=cdlConditional,cdlFunction,cdlString,cdlComment,cdlFxType + +set foldmethod=expr +set foldexpr=(getline(v:lnum+1)=~'{'\|\|getline(v:lnum)=~'//\\s\\*\\{5}.*table')?'>1':1 +%foldo! +set foldmethod=manual +let b:match_words='\:\:\:\:\' + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link cdlStatement Statement +hi def link cdlType Type +hi def link cdlFxType Type +hi def link cdlIdentifier Identifier +hi def link cdlString String +hi def link cdlRestricted WarningMsg +hi def link cdlNotSupported ErrorMsg +hi def link cdlTodo Todo +hi def link cdlComment Comment +hi def link cdlCommentE ErrorMsg +hi def link cdlParenE ErrorMsg +hi def link cdlParenWordE ErrorMsg +hi def link cdlFunction Function +hi def link cdlConditional Conditional + + +let b:current_syntax = "cdl" + +" vim: ts=8 diff --git a/syntax/cdrdaoconf.vim b/syntax/cdrdaoconf.vim new file mode 100644 index 000000000..a083fe2b7 --- /dev/null +++ b/syntax/cdrdaoconf.vim @@ -0,0 +1,143 @@ +if polyglot#init#is_disabled(expand(':p'), 'cdrdaoconf', 'syntax/cdrdaoconf.vim') + finish +endif + +" Vim syntax file +" Language: cdrdao(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-09-02 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword cdrdaoconfTodo + \ TODO FIXME XXX NOTE + +syn match cdrdaoconfBegin + \ display + \ nextgroup=@cdrdaoconfKeyword,cdrdaoconfComment + \ '^' + +syn cluster cdrdaoconfKeyword + \ contains=cdrdaoconfIntegerKeyword, + \ cdrdaoconfDriverKeyword, + \ cdrdaoconfDeviceKeyword, + \ cdrdaoconfPathKeyword + +syn keyword cdrdaoconfIntegerKeyword + \ contained + \ nextgroup=cdrdaoconfIntegerDelimiter + \ write_speed + \ write_buffers + \ user_capacity + \ full_burn + \ read_speed + \ cddb_timeout + +syn keyword cdrdaoconfIntegerKeyword + \ contained + \ nextgroup=cdrdaoconfParanoiaModeDelimiter + \ read_paranoia_mode + +syn keyword cdrdaoconfDriverKeyword + \ contained + \ nextgroup=cdrdaoconfDriverDelimiter + \ write_driver + \ read_driver + +syn keyword cdrdaoconfDeviceKeyword + \ contained + \ nextgroup=cdrdaoconfDeviceDelimiter + \ write_device + \ read_device + +syn keyword cdrdaoconfPathKeyword + \ contained + \ nextgroup=cdrdaoconfPathDelimiter + \ cddb_directory + \ tmp_file_dir + +syn match cdrdaoconfIntegerDelimiter + \ contained + \ nextgroup=cdrdaoconfInteger + \ skipwhite + \ ':' + +syn match cdrdaoconfParanoiaModeDelimiter + \ contained + \ nextgroup=cdrdaoconfParanoiaMode + \ skipwhite + \ ':' + +syn match cdrdaoconfDriverDelimiter + \ contained + \ nextgroup=cdrdaoconfDriver + \ skipwhite + \ ':' + +syn match cdrdaoconfDeviceDelimiter + \ contained + \ nextgroup=cdrdaoconfDevice + \ skipwhite + \ ':' + +syn match cdrdaoconfPathDelimiter + \ contained + \ nextgroup=cdrdaoconfPath + \ skipwhite + \ ':' + +syn match cdrdaoconfInteger + \ contained + \ '\<\d\+\>' + +syn match cdrdaoParanoiaMode + \ contained + \ '[0123]' + +syn match cdrdaoconfDriver + \ contained + \ '\<\(cdd2600\|generic-mmc\%(-raw\)\=\|plextor\%(-scan\)\|ricoh-mp6200\|sony-cdu9\%(20\|48\)\|taiyo-yuden\|teac-cdr55\|toshiba\|yamaha-cdr10x\)\>' + +syn region cdrdaoconfDevice + \ contained + \ matchgroup=cdrdaoconfDevice + \ start=+"+ + \ end=+"+ + +syn region cdrdaoconfPath + \ contained + \ matchgroup=cdrdaoconfPath + \ start=+"+ + \ end=+"+ + +syn match cdrdaoconfComment + \ contains=cdrdaoconfTodo,@Spell + \ '^.*#.*$' + +hi def link cdrdaoconfTodo Todo +hi def link cdrdaoconfComment Comment +hi def link cdrdaoconfKeyword Keyword +hi def link cdrdaoconfIntegerKeyword cdrdaoconfKeyword +hi def link cdrdaoconfDriverKeyword cdrdaoconfKeyword +hi def link cdrdaoconfDeviceKeyword cdrdaoconfKeyword +hi def link cdrdaoconfPathKeyword cdrdaoconfKeyword +hi def link cdrdaoconfDelimiter Delimiter +hi def link cdrdaoconfIntegerDelimiter cdrdaoconfDelimiter +hi def link cdrdaoconfDriverDelimiter cdrdaoconfDelimiter +hi def link cdrdaoconfDeviceDelimiter cdrdaoconfDelimiter +hi def link cdrdaoconfPathDelimiter cdrdaoconfDelimiter +hi def link cdrdaoconfInteger Number +hi def link cdrdaoconfParanoiaMode Number +hi def link cdrdaoconfDriver Identifier +hi def link cdrdaoconfDevice cdrdaoconfPath +hi def link cdrdaoconfPath String + +let b:current_syntax = "cdrdaoconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cdrtoc.vim b/syntax/cdrtoc.vim new file mode 100644 index 000000000..8fa0aee92 --- /dev/null +++ b/syntax/cdrtoc.vim @@ -0,0 +1,541 @@ +if polyglot#init#is_disabled(expand(':p'), 'cdrtoc', 'syntax/cdrtoc.vim') + finish +endif + +" Vim syntax file +" Language: cdrdao(1) TOC file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-05-10 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword cdrtocTodo + \ contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn cluster cdrtocCommentContents + \ contains= + \ cdrtocTodo, + \ @Spell + +syn cluster cdrtocHeaderFollowsInitial + \ contains= + \ cdrtocHeaderCommentInitial, + \ cdrtocHeaderCatalog, + \ cdrtocHeaderTOCType, + \ cdrtocHeaderCDText, + \ cdrtocTrack + +syn match cdrtocHeaderBegin + \ nextgroup=@cdrtocHeaderFollowsInitial + \ skipwhite skipempty + \ '\%^' + +let s:mmssff_pattern = '\%([0-5]\d\|\d\):\%([0-5]\d\|\d\):\%([0-6]\d\|7[0-5]\|\d\)\>' +let s:byte_pattern = '\<\%([01]\=\d\{1,2}\|2\%([0-4]\d\|5[0-5]\)\)\>' +let s:length_pattern = '\%(\%([0-5]\d\|\d\):\%([0-5]\d\|\d\):\%([0-6]\d\|7[0-5]\|\d\)\|\d\+\)\>' + +function s:def_comment(name, nextgroup) + execute 'syn match' a:name + \ 'nextgroup=' . a:nextgroup . ',' . a:name + \ 'skipwhite skipempty' + \ 'contains=@cdrtocCommentContents' + \ 'contained' + \ "'//.*$'" + execute 'hi def link' a:name 'cdrtocComment' +endfunction + +function s:def_keywords(name, nextgroup, keywords) + let comment_group = a:name . 'FollowComment' + execute 'syn keyword' a:name + \ 'nextgroup=' . a:nextgroup . ',' . comment_group + \ 'skipwhite skipempty' + \ 'contained' + \ join(a:keywords) + + call s:def_comment(comment_group, a:nextgroup) +endfunction + +function s:def_keyword(name, nextgroup, keyword) + call s:def_keywords(a:name, a:nextgroup, [a:keyword]) +endfunction + +" NOTE: Pattern needs to escape any “@”s. +function s:def_match(name, nextgroup, pattern) + let comment_group = a:name . 'FollowComment' + execute 'syn match' a:name + \ 'nextgroup=' . a:nextgroup . ',' . comment_group + \ 'skipwhite skipempty' + \ 'contained' + \ '@' . a:pattern . '@' + + call s:def_comment(comment_group, a:nextgroup) +endfunction + +function s:def_region(name, nextgroup, start, skip, end, matchgroup, contains) + let comment_group = a:name . 'FollowComment' + execute 'syn region' a:name + \ 'nextgroup=' . a:nextgroup . ',' . comment_group + \ 'skipwhite skipempty' + \ 'contained' + \ 'matchgroup=' . a:matchgroup + \ 'contains=' . a:contains + \ 'start=@' . a:start . '@' + \ (a:skip != "" ? ('skip=@' . a:skip . '@') : "") + \ 'end=@' . a:end . '@' + + call s:def_comment(comment_group, a:nextgroup) +endfunction + +call s:def_comment('cdrtocHeaderCommentInitial', '@cdrtocHeaderFollowsInitial') + +call s:def_keyword('cdrtocHeaderCatalog', 'cdrtocHeaderCatalogNumber', 'CATALOG') + +call s:def_match('cdrtocHeaderCatalogNumber', '@cdrtocHeaderFollowsInitial', '"\d\{13\}"') + +call s:def_keywords('cdrtocHeaderTOCType', '@cdrtocHeaderFollowsInitial', ['CD_DA', 'CD_ROM', 'CD_ROM_XA']) + +call s:def_keyword('cdrtocHeaderCDText', 'cdrtocHeaderCDTextStart', 'CD_TEXT') + +" TODO: Actually, language maps aren’t required by TocParser.g, but let’s keep +" things simple (and in agreement with what the manual page says). +call s:def_match('cdrtocHeaderCDTextStart', 'cdrtocHeaderCDTextLanguageMap', '{') + +call s:def_keyword('cdrtocHeaderCDTextLanguageMap', 'cdrtocHeaderLanguageMapStart', 'LANGUAGE_MAP') + +call s:def_match('cdrtocHeaderLanguageMapStart', 'cdrtocHeaderLanguageMapLanguageNumber', '{') + +call s:def_match('cdrtocHeaderLanguageMapLanguageNumber', 'cdrtocHeaderLanguageMapColon', '\<[0-7]\>') + +call s:def_match('cdrtocHeaderLanguageMapColon', 'cdrtocHeaderLanguageMapCountryCode,cdrtocHeaderLanguageMapCountryCodeName', ':') + +syn cluster cdrtocHeaderLanguageMapCountryCodeFollow + \ contains= + \ cdrtocHeaderLanguageMapLanguageNumber, + \ cdrtocHeaderLanguageMapEnd + +call s:def_match('cdrtocHeaderLanguageMapCountryCode', + \ '@cdrtocHeaderLanguageMapCountryCodeFollow', + \ s:byte_pattern) + +call s:def_keyword('cdrtocHeaderLanguageMapCountryCodeName', + \ '@cdrtocHeaderLanguageMapCountryCodeFollow', + \ 'EN') + +call s:def_match('cdrtocHeaderLanguageMapEnd', + \ 'cdrtocHeaderLanguage,cdrtocHeaderCDTextEnd', + \ '}') + +call s:def_keyword('cdrtocHeaderLanguage', 'cdrtocHeaderLanguageNumber', 'LANGUAGE') + +call s:def_match('cdrtocHeaderLanguageNumber', 'cdrtocHeaderLanguageStart', '\<[0-7]\>') + +call s:def_match('cdrtocHeaderLanguageStart', + \ 'cdrtocHeaderCDTextItem,cdrtocHeaderLanguageEnd', + \ '{') + +syn cluster cdrtocHeaderCDTextData + \ contains= + \ cdrtocHeaderCDTextDataString, + \ cdrtocHeaderCDTextDataBinaryStart + +call s:def_keywords('cdrtocHeaderCDTextItem', + \ '@cdrtocHeaderCDTextData', + \ ['TITLE', 'PERFORMER', 'SONGWRITER', 'COMPOSER', + \ 'ARRANGER', 'MESSAGE', 'DISC_ID', 'GENRE', 'TOC_INFO1', + \ 'TOC_INFO2', 'UPC_EAN', 'ISRC', 'SIZE_INFO']) + +call s:def_region('cdrtocHeaderCDTextDataString', + \ 'cdrtocHeaderCDTextItem,cdrtocHeaderLanguageEnd', + \ '"', + \ '\\\\\|\\"', + \ '"', + \ 'cdrtocHeaderCDTextDataStringDelimiters', + \ 'cdrtocHeaderCDTextDataStringSpecialChar') + +syn match cdrtocHeaderCDTextDataStringSpecialChar + \ contained + \ display + \ '\\\%(\o\o\o\|["\\]\)' + +call s:def_match('cdrtocHeaderCDTextDataBinaryStart', + \ 'cdrtocHeaderCDTextDataBinaryInteger', + \ '{') + +call s:def_match('cdrtocHeaderCDTextDataBinaryInteger', + \ 'cdrtocHeaderCDTextDataBinarySeparator,cdrtocHeaderCDTextDataBinaryEnd', + \ s:byte_pattern) + +call s:def_match('cdrtocHeaderCDTextDataBinarySeparator', + \ 'cdrtocHeaderCDTextDataBinaryInteger', + \ ',') + +call s:def_match('cdrtocHeaderCDTextDataBinaryEnd', + \ 'cdrtocHeaderCDTextItem,cdrtocHeaderLanguageEnd', + \ '}') + +call s:def_match('cdrtocHeaderLanguageEnd', + \ 'cdrtocHeaderLanguage,cdrtocHeaderCDTextEnd', + \ '}') + +call s:def_match('cdrtocHeaderCDTextEnd', + \ 'cdrtocTrack', + \ '}') + +syn cluster cdrtocTrackFollow + \ contains= + \ @cdrtocTrackFlags, + \ cdrtocTrackCDText, + \ cdrtocTrackPregap, + \ @cdrtocTrackContents + +call s:def_keyword('cdrtocTrack', 'cdrtocTrackMode', 'TRACK') + +call s:def_keywords('cdrtocTrackMode', + \ 'cdrtocTrackSubChannelMode,@cdrtocTrackFollow', + \ ['AUDIO', 'MODE1', 'MODE1_RAW', 'MODE2', 'MODE2_FORM1', + \ 'MODE2_FORM2', 'MODE2_FORM_MIX', 'MODE2_RAW']) + +call s:def_keywords('cdrtocTrackSubChannelMode', + \ '@cdrtocTrackFollow', + \ ['RW', 'RW_RAW']) + +syn cluster cdrtocTrackFlags + \ contains= + \ cdrtocTrackFlagNo, + \ cdrtocTrackFlagCopy, + \ cdrtocTrackFlagPreEmphasis, + \ cdrtocTrackFlag + +call s:def_keyword('cdrtocTrackFlagNo', + \ 'cdrtocTrackFlagCopy,cdrtocTrackFlagPreEmphasis', + \ 'NO') + +call s:def_keyword('cdrtocTrackFlagCopy', '@cdrtocTrackFollow', 'COPY') + +call s:def_keyword('cdrtocTrackFlagPreEmphasis', '@cdrtocTrackFollow', 'PRE_EMPHASIS') + +call s:def_keywords('cdrtocTrackFlag', + \ '@cdrtocTrackFollow', + \ ['TWO_CHANNEL_AUDIO', 'FOUR_CHANNEL_AUDIO']) + +call s:def_keyword('cdrtocTrackFlag', 'cdrtocTrackISRC', 'ISRC') + +call s:def_match('cdrtocTrackISRC', + \ '@cdrtocTrackFollow', + \ '"[[:upper:][:digit:]]\{5}\d\{7}"') + +call s:def_keyword('cdrtocTrackCDText', 'cdrtocTrackCDTextStart', 'CD_TEXT') + +call s:def_match('cdrtocTrackCDTextStart', 'cdrtocTrackCDTextLanguage', '{') + +call s:def_keyword('cdrtocTrackCDTextLanguage', 'cdrtocTrackCDTextLanguageNumber', 'LANGUAGE') + +call s:def_match('cdrtocTrackCDTextLanguageNumber', 'cdrtocTrackCDTextLanguageStart', '\<[0-7]\>') + +call s:def_match('cdrtocTrackCDTextLanguageStart', + \ 'cdrtocTrackCDTextItem,cdrtocTrackCDTextLanguageEnd', + \ '{') + +syn cluster cdrtocTrackCDTextData + \ contains= + \ cdrtocTrackCDTextDataString, + \ cdrtocTrackCDTextDataBinaryStart + +call s:def_keywords('cdrtocTrackCDTextItem', + \ '@cdrtocTrackCDTextData', + \ ['TITLE', 'PERFORMER', 'SONGWRITER', 'COMPOSER', 'ARRANGER', + \ 'MESSAGE', 'ISRC']) + +call s:def_region('cdrtocTrackCDTextDataString', + \ 'cdrtocTrackCDTextItem,cdrtocTrackCDTextLanguageEnd', + \ '"', + \ '\\\\\|\\"', + \ '"', + \ 'cdrtocTrackCDTextDataStringDelimiters', + \ 'cdrtocTrackCDTextDataStringSpecialChar') + +syn match cdrtocTrackCDTextDataStringSpecialChar + \ contained + \ display + \ '\\\%(\o\o\o\|["\\]\)' + +call s:def_match('cdrtocTrackCDTextDataBinaryStart', + \ 'cdrtocTrackCDTextDataBinaryInteger', + \ '{') + +call s:def_match('cdrtocTrackCDTextDataBinaryInteger', + \ 'cdrtocTrackCDTextDataBinarySeparator,cdrtocTrackCDTextDataBinaryEnd', + \ s:byte_pattern) + +call s:def_match('cdrtocTrackCDTextDataBinarySeparator', + \ 'cdrtocTrackCDTextDataBinaryInteger', + \ ',') + +call s:def_match('cdrtocTrackCDTextDataBinaryEnd', + \ 'cdrtocTrackCDTextItem,cdrtocTrackCDTextLanguageEnd', + \ '}') + +call s:def_match('cdrtocTrackCDTextLanguageEnd', + \ 'cdrtocTrackCDTextLanguage,cdrtocTrackCDTextEnd', + \ '}') + +call s:def_match('cdrtocTrackCDTextEnd', + \ 'cdrtocTrackPregap,@cdrtocTrackContents', + \ '}') + +call s:def_keyword('cdrtocTrackPregap', 'cdrtocTrackPregapMMSSFF', 'PREGAP') + +call s:def_match('cdrtocTrackPregapMMSSFF', + \ '@cdrtocTrackContents', + \ s:mmssff_pattern) + +syn cluster cdrtocTrackContents + \ contains= + \ cdrtocTrackSubTrack, + \ cdrtocTrackMarker + +syn cluster cdrtocTrackContentsFollow + \ contains= + \ @cdrtocTrackContents, + \ cdrtocTrackIndex, + \ cdrtocTrack + +call s:def_keywords('cdrtocTrackSubTrack', + \ 'cdrtocTrackSubTrackFileFilename', + \ ['FILE', 'AUDIOFILE']) + +call s:def_region('cdrtocTrackSubTrackFileFilename', + \ 'cdrtocTrackSubTrackFileStart', + \ '"', + \ '\\\\\|\\"', + \ '"', + \ 'cdrtocTrackSubTrackFileFilenameDelimiters', + \ 'cdrtocTrackSubTrackFileFilenameSpecialChar') + +syn match cdrtocTrackSubTrackFileFilenameSpecialChar + \ contained + \ display + \ '\\\%(\o\o\o\|["\\]\)' + +call s:def_match('cdrtocTrackSubTrackFileStart', + \ 'cdrtocTrackSubTrackFileLength,@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_match('cdrtocTrackSubTrackFileLength', + \ '@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_keyword('cdrtocTrackSubTrack', 'cdrtocTrackContentDatafileFilename', 'DATAFILE') + +call s:def_region('cdrtocTrackSubTrackDatafileFilename', + \ 'cdrtocTrackSubTrackDatafileLength', + \ '"', + \ '\\\\\|\\"', + \ '"', + \ 'cdrtocTrackSubTrackDatafileFilenameDelimiters', + \ 'cdrtocTrackSubTrackDatafileFilenameSpecialChar') + +syn match cdrtocTrackSubTrackdatafileFilenameSpecialChar + \ contained + \ display + \ '\\\%(\o\o\o\|["\\]\)' + +call s:def_match('cdrtocTrackDatafileLength', + \ '@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_keyword('cdrtocTrackSubTrack', 'cdrtocTrackContentFifoFilename', 'DATAFILE') + +call s:def_region('cdrtocTrackSubTrackFifoFilename', + \ 'cdrtocTrackSubTrackFifoLength', + \ '"', + \ '\\\\\|\\"', + \ '"', + \ 'cdrtocTrackSubTrackFifoFilenameDelimiters', + \ 'cdrtocTrackSubTrackFifoFilenameSpecialChar') + +syn match cdrtocTrackSubTrackdatafileFilenameSpecialChar + \ contained + \ display + \ '\\\%(\o\o\o\|["\\]\)' + +call s:def_match('cdrtocTrackFifoLength', + \ '@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_keyword('cdrtocTrackSubTrack', 'cdrtocTrackSilenceLength', 'SILENCE') + +call s:def_match('cdrtocTrackSilenceLength', + \ '@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_keyword('cdrtocTrackSubTrack', + \ 'cdrtocTrackSubTrackZeroDataMode,' . + \ 'cdrtocTrackSubTrackZeroDataSubChannelMode,' . + \ 'cdrtocTrackSubTrackZeroDataLength', + \ 'ZERO') + +call s:def_keywords('cdrtocTrackSubTrackZeroDataMode', + \ 'cdrtocTrackSubTrackZeroSubChannelMode,cdrtocTrackSubTrackZeroDataLength', + \ ['AUDIO', 'MODE1', 'MODE1_RAW', 'MODE2', 'MODE2_FORM1', + \ 'MODE2_FORM2', 'MODE2_FORM_MIX', 'MODE2_RAW']) + +call s:def_keywords('cdrtocTrackSubTrackZeroDataSubChannelMode', + \ 'cdrtocTrackSubTrackZeroDataLength', + \ ['RW', 'RW_RAW']) + +call s:def_match('cdrtocTrackSubTrackZeroDataLength', + \ '@cdrtocTrackContentsFollow', + \ s:length_pattern) + +call s:def_keyword('cdrtocTrackMarker', + \ '@cdrtocTrackContentsFollow,cdrtocTrackMarkerStartMMSSFF', + \ 'START') + +call s:def_match('cdrtocTrackMarkerStartMMSSFF', + \ '@cdrtocTrackContentsFollow', + \ s:mmssff_pattern) + +call s:def_keyword('cdrtocTrackMarker', + \ '@cdrtocTrackContentsFollow,cdrtocTrackMarkerEndMMSSFF', + \ 'END') + +call s:def_match('cdrtocTrackMarkerEndMMSSFF', + \ '@cdrtocTrackContentsFollow', + \ s:mmssff_pattern) + +call s:def_keyword('cdrtocTrackIndex', 'cdrtocTrackIndexMMSSFF', 'INDEX') + +call s:def_match('cdrtocTrackIndexMMSSFF', + \ 'cdrtocTrackIndex,cdrtocTrack', + \ s:mmssff_pattern) + +delfunction s:def_region +delfunction s:def_match +delfunction s:def_keyword +delfunction s:def_keywords +delfunction s:def_comment + +syn sync fromstart + +hi def link cdrtocKeyword Keyword +hi def link cdrtocHeaderKeyword cdrtocKeyword +hi def link cdrtocHeaderCDText cdrtocHeaderKeyword +hi def link cdrtocDelimiter Delimiter +hi def link cdrtocCDTextDataBinaryEnd cdrtocDelimiter +hi def link cdrtocHeaderCDTextDataBinaryEnd cdrtocHeaderCDTextDataBinaryEnd +hi def link cdrtocNumber Number +hi def link cdrtocCDTextDataBinaryInteger cdrtocNumber +hi def link cdrtocHeaderCDTextDataBinaryInteger cdrtocCDTextDataBinaryInteger +hi def link cdrtocCDTextDataBinarySeparator cdrtocDelimiter +hi def link cdrtocHeaderCDTextDataBinarySeparator cdrtocCDTextDataBinarySeparator +hi def link cdrtocCDTextDataBinaryStart cdrtocDelimiter +hi def link cdrtocHeaderCDTextDataBinaryStart cdrtocCDTextDataBinaryStart +hi def link cdrtocString String +hi def link cdrtocCDTextDataString cdrtocString +hi def link cdrtocHeaderCDTextDataString cdrtocCDTextDataString +hi def link cdrtocCDTextDataStringDelimiters cdrtocDelimiter +hi def link cdrtocHeaderCDTextDataStringDelimiters cdrtocCDTextDataStringDelimiters +hi def link cdrtocCDTextDataStringSpecialChar SpecialChar +hi def link cdrtocHeaderCDTextDataStringSpecialChar cdrtocCDTextDataStringSpecialChar +hi def link cdrtocCDTextEnd cdrtocDelimiter +hi def link cdrtocHeaderCDTextEnd cdrtocCDTextEnd +hi def link cdrtocType Type +hi def link cdrtocCDTextItem cdrtocType +hi def link cdrtocHeaderCDTextItem cdrtocCDTextItem +hi def link cdrtocHeaderCDTextLanguageMap cdrtocHeaderKeyword +hi def link cdrtocCDTextStart cdrtocDelimiter +hi def link cdrtocHeaderCDTextStart cdrtocCDTextStart +hi def link cdrtocHeaderCatalog cdrtocHeaderKeyword +hi def link cdrtocHeaderCatalogNumber cdrtocString +hi def link cdrtocComment Comment +hi def link cdrtocHeaderCommentInitial cdrtocComment +hi def link cdrtocHeaderLanguage cdrtocKeyword +hi def link cdrtocLanguageEnd cdrtocDelimiter +hi def link cdrtocHeaderLanguageEnd cdrtocLanguageEnd +hi def link cdrtocHeaderLanguageMapColon cdrtocDelimiter +hi def link cdrtocIdentifier Identifier +hi def link cdrtocHeaderLanguageMapCountryCode cdrtocNumber +hi def link cdrtocHeaderLanguageMapCountryCodeName cdrtocIdentifier +hi def link cdrtocHeaderLanguageMapEnd cdrtocDelimiter +hi def link cdrtocHeaderLanguageMapLanguageNumber cdrtocNumber +hi def link cdrtocHeaderLanguageMapStart cdrtocDelimiter +hi def link cdrtocLanguageNumber cdrtocNumber +hi def link cdrtocHeaderLanguageNumber cdrtocLanguageNumber +hi def link cdrtocLanguageStart cdrtocDelimiter +hi def link cdrtocHeaderLanguageStart cdrtocLanguageStart +hi def link cdrtocHeaderTOCType cdrtocType +hi def link cdrtocTodo Todo +hi def link cdrtocTrackKeyword cdrtocKeyword +hi def link cdrtocTrack cdrtocTrackKeyword +hi def link cdrtocTrackCDText cdrtocTrackKeyword +hi def link cdrtocTrackCDTextDataBinaryEnd cdrtocHeaderCDTextDataBinaryEnd +hi def link cdrtocTrackCDTextDataBinaryInteger cdrtocHeaderCDTextDataBinaryInteger +hi def link cdrtocTrackCDTextDataBinarySeparator cdrtocHeaderCDTextDataBinarySeparator +hi def link cdrtocTrackCDTextDataBinaryStart cdrtocHeaderCDTextDataBinaryStart +hi def link cdrtocTrackCDTextDataString cdrtocHeaderCDTextDataString +hi def link cdrtocTrackCDTextDataStringDelimiters cdrtocCDTextDataStringDelimiters +hi def link cdrtocTrackCDTextDataStringSpecialChar cdrtocCDTextDataStringSpecialChar +hi def link cdrtocTrackCDTextEnd cdrtocCDTextEnd +hi def link cdrtocTrackCDTextItem cdrtocCDTextItem +hi def link cdrtocTrackCDTextStart cdrtocCDTextStart +hi def link cdrtocLength cdrtocNumber +hi def link cdrtocTrackDatafileLength cdrtocLength +hi def link cdrtocTrackFifoLength cdrtocLength +hi def link cdrtocPreProc PreProc +hi def link cdrtocTrackFlag cdrtocPreProc +hi def link cdrtocTrackFlagCopy cdrtocTrackFlag +hi def link cdrtocSpecial Special +hi def link cdrtocTrackFlagNo cdrtocSpecial +hi def link cdrtocTrackFlagPreEmphasis cdrtocTrackFlag +hi def link cdrtocTrackISRC cdrtocTrackFlag +hi def link cdrtocTrackIndex cdrtocTrackKeyword +hi def link cdrtocMMSSFF cdrtocLength +hi def link cdrtocTrackIndexMMSSFF cdrtocMMSSFF +hi def link cdrtocTrackCDTextLanguage cdrtocTrackKeyword +hi def link cdrtocTrackCDTextLanguageEnd cdrtocLanguageEnd +hi def link cdrtocTrackCDTextLanguageNumber cdrtocLanguageNumber +hi def link cdrtocTrackCDTextLanguageStart cdrtocLanguageStart +hi def link cdrtocTrackContents StorageClass +hi def link cdrtocTrackMarker cdrtocTrackContents +hi def link cdrtocTrackMarkerEndMMSSFF cdrtocMMSSFF +hi def link cdrtocTrackMarkerStartMMSSFF cdrtocMMSSFF +hi def link cdrtocTrackMode Type +hi def link cdrtocTrackPregap cdrtocTrackContents +hi def link cdrtocTrackPregapMMSSFF cdrtocMMSSFF +hi def link cdrtocTrackSilenceLength cdrtocLength +hi def link cdrtocTrackSubChannelMode cdrtocPreProc +hi def link cdrtocTrackSubTrack cdrtocTrackContents +hi def link cdrtocFilename cdrtocString +hi def link cdrtocTrackSubTrackDatafileFilename cdrtocFilename +hi def link cdrtocTrackSubTrackDatafileFilenameDelimiters cdrtocTrackSubTrackDatafileFilename +hi def link cdrtocSpecialChar SpecialChar +hi def link cdrtocTrackSubTrackDatafileFilenameSpecialChar cdrtocSpecialChar +hi def link cdrtocTrackSubTrackDatafileLength cdrtocLength +hi def link cdrtocTrackSubTrackFifoFilename cdrtocFilename +hi def link cdrtocTrackSubTrackFifoFilenameDelimiters cdrtocTrackSubTrackFifoFilename +hi def link cdrtocTrackSubTrackFifoFilenameSpecialChar cdrtocSpecialChar +hi def link cdrtocTrackSubTrackFifoLength cdrtocLength +hi def link cdrtocTrackSubTrackFileFilename cdrtocFilename +hi def link cdrtocTrackSubTrackFileFilenameDelimiters cdrtocTrackSubTrackFileFilename +hi def link cdrtocTrackSubTrackFileFilenameSpecialChar cdrtocSpecialChar +hi def link cdrtocTrackSubTrackFileLength cdrtocLength +hi def link cdrtocTrackSubTrackFileStart cdrtocLength +hi def link cdrtocTrackSubTrackZeroDataLength cdrtocLength +hi def link cdrtocTrackSubTrackZeroDataMode Type +hi def link cdrtocTrackSubTrackZeroDataSubChannelMode cdrtocPreProc +hi def link cdrtocTrackSubTrackdatafileFilenameSpecialChar cdrtocSpecialChar + +let b:current_syntax = "cdrtoc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cf.vim b/syntax/cf.vim new file mode 100644 index 000000000..92c2ca15f --- /dev/null +++ b/syntax/cf.vim @@ -0,0 +1,1022 @@ +if polyglot#init#is_disabled(expand(':p'), 'cf', 'syntax/cf.vim') + finish +endif + +" Vim syntax file +" +" Language: CFML (ColdFusion) +" Author: Ernst M. van der Linden +" License: The MIT License (MIT) +" +" Maintainer: Ernst M. van der Linden +" URL: https://github.com/ernstvanderlinden/vim-coldfusion +" Last Change: 2017 Nov 28 +" +" Filenames: *.cfc *.cfm + +" Quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +" Using line continuation here. +let s:cpo_save=&cpo +set cpo-=C + +sy sync fromstart +" 20171126: disabled as we have fast computers now. +"sy sync maxlines=2000 +sy case ignore + +" INCLUDES {{{ +sy include @sqlSyntax $VIMRUNTIME/syntax/sql.vim +" 20161010: Disabled include html highlighting as it contains huge keywords +" regex, so it will have impact on performance. Use own simple SGML tag +" coloring instead. +"runtime! syntax/html.vim +" / INCLUDES }}} + +" NUMBER {{{ +sy match cfmlNumber + \ "\v<\d+>" +" / NUMBER }}} + +" EQUAL SIGN {{{ +sy match cfmlEqualSign + \ "\v\=" +" / EQUAL SIGN }}} + +" BOOLEAN {{{ +sy match cfmlBoolean + \ "\v<(true|false)>" +" / BOOLEAN }}} + +" HASH SURROUNDED {{{ +sy region cfmlHashSurround + \ keepend + \ oneline + \ start="#" + \ end="#" + \ skip="##" + \ contains= + \@cfmlOperator, + \@cfmlPunctuation, + \cfmlBoolean, + \cfmlCoreKeyword, + \cfmlCoreScope, + \cfmlCustomKeyword, + \cfmlCustomScope, + \cfmlEqualSign, + \cfmlFunctionName, + \cfmlNumber +" / HASH SURROUNDED }}} + +" OPERATOR {{{ + +" OPERATOR - ARITHMETIC {{{ +" +7 -7 +" ++i --i +" i++ i-- +" + - * / % +" += -= *= /= %= +" ^ mod +sy match cfmlArithmeticOperator + \ "\v + \(\+|-)\ze\d + \|(\+\+|--)\ze\w + \|\w\zs(\+\+|--) + \|(\s( + \(\+|-|\*|\/|\%){1}\={,1} + \|\^ + \|mod + \)\s) + \" +" / OPERATOR - ARITHMETIC }}} + +" OPERATOR - BOOLEAN {{{ +" not and or xor eqv imp +" ! && || +sy match cfmlBooleanOperator + \ "\v\s + \(not|and|or|xor|eqv|imp + \|\!|\&\&|\|\| + \)(\s|\)) + \|\s\!\ze\w + \" +" / OPERATOR - BOOLEAN }}} + +" OPERATOR - DECISION {{{ +"is|equal|eq +"is not|not equal|neq +"contains|does not contain +"greater than|gt +"less than|lt +"greater than or equal to|gte|ge +"less than or equal to|lte|le +"==|!=|>|<|>=|<= +sy match cfmlDecisionOperator + \ "\v\s + \(is|equal|eq + \|is not|not equal|neq + \|contains|does not contain + \|greater than|gt + \|less than|lt + \|greater than or equal to|gte|ge + \|less than or equal to|lte|le + \|(!|\<|\>|\=){1}\= + \|\< + \|\> + \)\s" +" / OPERATOR - DECISION }}} + +" OPERATOR - STRING {{{ +" & +" &= +sy match cfmlStringOperator + \ "\v\s\&\={,1}\s" +" / OPERATOR - STRING }}} + +" OPERATOR - TERNARY {{{ +" ? : +sy match cfmlTernaryOperator + \ "\v\s + \\?|\: + \\s" +" / OPERATOR - TERNARY }}} + +sy cluster cfmlOperator + \ contains= + \cfmlArithmeticOperator, + \cfmlBooleanOperator, + \cfmlDecisionOperator, + \cfmlStringOperator, + \cfmlTernaryOperator +" / OPERATOR }}} + +" PARENTHESIS {{{ +sy cluster cfmlParenthesisRegionContains + \ contains= + \@cfmlAttribute, + \@cfmlComment, + \@cfmlFlowStatement, + \@cfmlOperator, + \@cfmlPunctuation, + \cfmlBoolean, + \cfmlBrace, + \cfmlCoreKeyword, + \cfmlCoreScope, + \cfmlCustomKeyword, + \cfmlCustomScope, + \cfmlEqualSign, + \cfmlFunctionName, + \cfmlNumber, + \cfmlStorageKeyword, + \cfmlStorageType + +sy region cfmlParenthesisRegion1 + \ extend + \ matchgroup=cfmlParenthesis1 + \ transparent + \ start=/(/ + \ end=/)/ + \ contains= + \cfmlParenthesisRegion2, + \@cfmlParenthesisRegionContains +sy region cfmlParenthesisRegion2 + \ matchgroup=cfmlParenthesis2 + \ transparent + \ start=/(/ + \ end=/)/ + \ contains= + \cfmlParenthesisRegion3, + \@cfmlParenthesisRegionContains +sy region cfmlParenthesisRegion3 + \ matchgroup=cfmlParenthesis3 + \ transparent + \ start=/(/ + \ end=/)/ + \ contains= + \cfmlParenthesisRegion1, + \@cfmlParenthesisRegionContains +sy cluster cfmlParenthesisRegion + \ contains= + \cfmlParenthesisRegion1, + \cfmlParenthesisRegion2, + \cfmlParenthesisRegion3 +" / PARENTHESIS }}} + +" BRACE {{{ +sy match cfmlBrace + \ "{\|}" + +sy region cfmlBraceRegion + \ extend + \ fold + \ keepend + \ transparent + \ start="{" + \ end="}" +" / BRACE }}} + +" PUNCTUATION {{{ + +" PUNCTUATION - BRACKET {{{ +sy match cfmlBracket + \ "\(\[\|\]\)" + \ contained +" / PUNCTUATION - BRACKET }}} + +" PUNCTUATION - CHAR {{{ +sy match cfmlComma "," +sy match cfmlDot "\." +sy match cfmlSemiColon ";" + +" / PUNCTUATION - CHAR }}} + +" PUNCTUATION - QUOTE {{{ +sy region cfmlSingleQuotedValue + \ matchgroup=cfmlSingleQuote + \ start=/'/ + \ skip=/''/ + \ end=/'/ + \ contains= + \cfmlHashSurround + +sy region cfmlDoubleQuotedValue + \ matchgroup=cfmlDoubleQuote + \ start=/"/ + \ skip=/""/ + \ end=/"/ + \ contains= + \cfmlHashSurround + +sy cluster cfmlQuotedValue + \ contains= + \cfmlDoubleQuotedValue, + \cfmlSingleQuotedValue + +sy cluster cfmlQuote + \ contains= + \cfmlDoubleQuote, + \cfmlSingleQuote +" / PUNCTUATION - QUOTE }}} + +sy cluster cfmlPunctuation + \ contains= + \@cfmlQuote, + \@cfmlQuotedValue, + \cfmlBracket, + \cfmlComma, + \cfmlDot, + \cfmlSemiColon + +" / PUNCTUATION }}} + +" TAG START AND END {{{ +" tag start +" +" s^^ e +sy region cfmlTagStart + \ keepend + \ transparent + \ start="\c +" s^^^ e +sy match cfmlTagEnd + \ transparent + \ "\c]*>" + \ contains= + \cfmlTagBracket, + \cfmlTagName + +" tag bracket +" +" ^^ ^ +sy match cfmlTagBracket + \ contained + \ "\(<\|>\|\/\)" + +" tag name +" +" s^^^e +sy match cfmlTagName + \ contained + \ "\v<\/*\zs\ccf\w*" +" / TAG START AND END }}} + +" ATTRIBUTE NAME AND VALUE {{{ +sy match cfmlAttrName + \ contained + \ "\v(var\s)@ +" ^^^^^^^^^^^^^e +sy region cfmlComponentTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^^^^^e +sy region cfmlFunctionTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^e +sy region cfmlIfTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^e +sy region cfmlLoopTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^^^e +sy region cfmlOutputTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^^e + "\@cfmlSqlStatement, +sy region cfmlQueryTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^^^^^^e +sy region cfmlSavecontentTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" s^^^^^^^^^ +" +" ^^^^^^^^^^e +"\cfmlCustomScope, +sy region cfmlScriptTagRegion + \ fold + \ keepend + \ transparent + \ start="\c" + \ end="\c" + \ contains= + \@cfmlComment, + \@cfmlFlowStatement, + \cfmlHashSurround, + \@cfmlOperator, + \@cfmlParenthesisRegion, + \@cfmlPunctuation, + \cfmlBoolean, + \cfmlBrace, + \cfmlCoreKeyword, + \cfmlCoreScope, + \cfmlCustomKeyword, + \cfmlCustomScope, + \cfmlEqualSign, + \cfmlFunctionDefinition, + \cfmlFunctionName, + \cfmlNumber, + \cfmlOddFunction, + \cfmlStorageKeyword, + \cfmlTagEnd, + \cfmlTagStart +" / CFSCRIPT REGION AND FOLD }}} + +" CFSWITCH REGION AND FOLD {{{ +" +" ^^^^^^^^^^e +sy region cfmlSwitchTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" ^^^^^^^^^^^^^^^e +sy region cfmlTransactionTagRegion + \ fold + \ keepend + \ transparent + \ start="\c +" s^^^ ^ +" +" ^^^^^ e +sy region cfmlCustomTagRegion + \ fold + \ keepend + \ transparent + \ start="\c]*>" + \ end="\c]*>" +" / CUSTOM TAG REGION AND FOLD }}} + +" / TAG REGION AND FOLDING }}} + +" COMMENT {{{ + +" COMMENT BLOCK {{{ +" /*...*/ +" s^ ^e +sy region cfmlCommentBlock + \ keepend + \ start="/\*" + \ end="\*/" + \ contains= + \cfmlMetaData +" / COMMENT BLOCK }}} + +" COMMENT LINE {{{ +" //... +" s^ +sy match cfmlCommentLine + \ "\/\/.*" +" / COMMENT LINE }}} + +sy cluster cfmlComment + \ contains= + \cfmlCommentBlock, + \cfmlCommentLine +" / COMMENT }}} + +" TAG COMMENT {{{ +" +" s^^^^ ^^^e +sy region cfmlTagComment + \ keepend + \ start="" + \ contains= + \cfmlTagComment +" / TAG COMMENT }}} + +" FLOW STATEMENT {{{ +" BRANCH FLOW KEYWORD {{{ +sy keyword cfmlBranchFlowKeyword + \ break + \ continue + \ return + +" / BRANCH KEYWORD }}} + +" DECISION FLOW KEYWORD {{{ +sy keyword cfmlDecisionFlowKeyword + \ case + \ defaultcase + \ else + \ if + \ switch + +" / DECISION FLOW KEYWORD }}} + +" LOOP FLOW KEYWORD {{{ +sy keyword cfmlLoopFlowKeyword + \ do + \ for + \ in + \ while + +" / LOOP FLOW KEYWORD }}} + +" TRY FLOW KEYWORD {{{ +sy keyword cfmlTryFlowKeyword + \ catch + \ finally + \ rethrow + \ throw + \ try + +" / TRY FLOW KEYWORD }}} + +sy cluster cfmlFlowStatement + \ contains= + \cfmlBranchFlowKeyword, + \cfmlDecisionFlowKeyword, + \cfmlLoopFlowKeyword, + \cfmlTryFlowKeyword + +" / FLOW STATEMENT }}} + +" STORAGE KEYWORD {{{ +sy keyword cfmlStorageKeyword + \ var +" / STORAGE KEYWORD }}} + +" STORAGE TYPE {{{ +sy match cfmlStorageType + \ contained + \ "\v< + \(any + \|array + \|binary + \|boolean + \|date + \|numeric + \|query + \|string + \|struct + \|uuid + \|void + \|xml + \){1}\ze(\s*\=)@!" +" / STORAGE TYPE }}} + +" CORE KEYWORD {{{ +sy match cfmlCoreKeyword + \ "\v< + \(new + \|required + \)\ze\s" +" / CORE KEYWORD }}} + +" CORE SCOPE {{{ +sy match cfmlCoreScope + \ "\v< + \(application + \|arguments + \|attributes + \|caller + \|cfcatch + \|cffile + \|cfhttp + \|cgi + \|client + \|cookie + \|form + \|local + \|request + \|server + \|session + \|super + \|this + \|thisTag + \|thread + \|variables + \|url + \){1}\ze(,|\.|\[|\)|\s)" +" / CORE SCOPE }}} + +" SQL STATEMENT {{{ +sy cluster cfmlSqlStatement + \ contains= + \@cfmlParenthesisRegion, + \@cfmlQuote, + \@cfmlQuotedValue, + \@sqlSyntax, + \cfmlBoolean, + \cfmlDot, + \cfmlEqualSign, + \cfmlFunctionName, + \cfmlHashSurround, + \cfmlNumber +" / SQL STATEMENT }}} + +" TAG IN SCRIPT {{{ +sy match cfmlTagNameInScript + \ "\vcf_*\w+\s*\ze\(" +" / TAG IN SCRIPT }}} + +" METADATA {{{ +sy region cfmlMetaData + \ contained + \ keepend + \ start="@\w\+" + \ end="$" + \ contains= + \cfmlMetaDataName + +sy match cfmlMetaDataName + \ contained + \ "@\w\+" +" / METADATA }}} + +" COMPONENT DEFINITION {{{ +sy region cfmlComponentDefinition + \ start="component" + \ end="{"me=e-1 + \ contains= + \@cfmlAttribute, + \cfmlComponentKeyword + +sy match cfmlComponentKeyword + \ contained + \ "\v" +" / COMPONENT DEFINITION }}} + +" INTERFACE DEFINITION {{{ +sy match cfmlInterfaceDefinition + \ "interface\s.*{"me=e-1 + \ contains= + \cfmlInterfaceKeyword + +sy match cfmlInterfaceKeyword + \ contained + \ "\v" +" / INTERFACE DEFINITION }}} + +" PROPERTY {{{ +sy region cfmlProperty + \ transparent + \ start="\v" + \ end=";"me=e-1 + \ contains= + \@cfmlQuotedValue, + \cfmlAttrEqualSign, + \cfmlAttrName, + \cfmlAttrValue, + \cfmlPropertyKeyword + +sy match cfmlPropertyKeyword + \ contained + \ "\v" +" / PROPERTY }}} + +" FUNCTION DEFINITION {{{ +sy match cfmlFunctionDefinition + \ "\v + \(<(public|private|package)\s){,1} + \(< + \(any + \|array + \|binary + \|boolean + \|date + \|numeric + \|query + \|string + \|struct + \|uuid + \|void + \|xml + \)\s){,1} + \" +" / FUNCTION KEYWORD }}} + +" FUNCTION MODIFIER {{{ +sy match cfmlFunctionModifier + \ contained + \ "\v< + \(public + \|private + \|package + \)>" +" / FUNCTION MODIFIER }}} + +" FUNCTION RETURN TYPE {{{ +sy match cfmlFunctionReturnType + \ contained + \ "\v + \(any + \|array + \|binary + \|boolean + \|date + \|numeric + \|query + \|string + \|struct + \|uuid + \|void + \|xml + \)" +" / FUNCTION RETURN TYPE }}} + +" FUNCTION NAME {{{ +" specific regex for core functions decreases performance +" so use the same highlighting for both function types +sy match cfmlFunctionName + \ "\v<(cf|if|elseif|throw)@!\w+\s*\ze\(" +" / FUNCTION NAME }}} + +" / FUNCTION DEFINITION }}} + +" ODD FUNCTION {{{ +sy region cfmlOddFunction + \ transparent + \ start="\v< + \(abort + \|exit + \|import + \|include + \|lock + \|pageencoding + \|param + \|savecontent + \|thread + \|transaction + \){1}" + \ end="\v(\{|;)"me=e-1 + \ contains= + \@cfmlQuotedValue, + \cfmlAttrEqualSign, + \cfmlAttrName, + \cfmlAttrValue, + \cfmlCoreKeyword, + \cfmlOddFunctionKeyword, + \cfmlCoreScope + +" ODD FUNCTION KEYWORD {{{ +sy match cfmlOddFunctionKeyword + \ contained + \ "\v< + \(abort + \|exit + \|import + \|include + \|lock + \|pageencoding + \|param + \|savecontent + \|thread + \|transaction + \)\ze(\s|$|;)" +" / ODD FUNCTION KEYWORD }}} + +" / ODD FUNCTION }}} + +" CUSTOM {{{ + +" CUSTOM KEYWORD {{{ +sy match cfmlCustomKeyword + \ contained + \ "\v< + \(customKeyword1 + \|customKeyword2 + \|customKeyword3 + \)>" +" / CUSTOM KEYWORD }}} + +" CUSTOM SCOPE {{{ +sy match cfmlCustomScope + \ contained + \ "\v< + \(prc + \|rc + \|event + \|(\w+Service) + \){1}\ze(\.|\[)" +" / CUSTOM SCOPE }}} + +" / CUSTOM }}} + +" SGML TAG START AND END {{{ +" SGML tag start +" <...> +" s^^^e +sy region cfmlSGMLTagStart + \ keepend + \ transparent + \ start="\v(\ +" s^^^^e +sy match cfmlSGMLTagEnd + \ transparent + \ "\v(\<\/cf)@!\zs\<\/\w+\>" + \ contains= + \cfmlTagBracket, + \cfmlSGMLTagName + +" SGML tag name +" <...> +" s^^^e +sy match cfmlSGMLTagName + \ contained + \ "\v(\<\/*)\zs\w+" + +" / SGML TAG START AND END }}} + +" HIGHLIGHTING {{{ + +hi link cfmlNumber Number +hi link cfmlBoolean Boolean +hi link cfmlEqualSign Keyword +" HASH SURROUND +hi link cfmlHash PreProc +hi link cfmlHashSurround PreProc +" OPERATOR +hi link cfmlArithmeticOperator Function +hi link cfmlBooleanOperator Function +hi link cfmlDecisionOperator Function +hi link cfmlStringOperator Function +hi link cfmlTernaryOperator Function +" PARENTHESIS +hi link cfmlParenthesis1 Statement +hi link cfmlParenthesis2 String +hi link cfmlParenthesis3 Delimiter +" BRACE +hi link cfmlBrace PreProc +" PUNCTUATION - BRACKET +hi link cfmlBracket Statement +" PUNCTUATION - CHAR +hi link cfmlComma Comment +hi link cfmlDot Comment +hi link cfmlSemiColon Comment +" PUNCTUATION - QUOTE +hi link cfmlDoubleQuote String +hi link cfmlDoubleQuotedValue String +hi link cfmlSingleQuote String +hi link cfmlSingleQuotedValue String +" TAG START AND END +hi link cfmlTagName Function +hi link cfmlTagBracket Comment +" ATTRIBUTE NAME AND VALUE +hi link cfmlAttrName Type +hi link cfmlAttrValue Special +" COMMENT +hi link cfmlCommentBlock Comment +hi link cfmlCommentLine Comment +hi link cfmlTagComment Comment +" FLOW STATEMENT +hi link cfmlDecisionFlowKeyword Conditional +hi link cfmlLoopFlowKeyword Repeat +hi link cfmlTryFlowKeyword Exception +hi link cfmlBranchFlowKeyword Keyword +" STORAGE KEYWORD +hi link cfmlStorageKeyword Keyword +" STORAGE TYPE +hi link cfmlStorageType Keyword +" CORE KEYWORD +hi link cfmlCoreKeyword PreProc +" CORE SCOPE +hi link cfmlCoreScope Keyword +" TAG IN SCRIPT +hi link cfmlTagNameInScript Function +" METADATA +" meta data value = cfmlMetaData +hi link cfmlMetaData String +hi link cfmlMetaDataName Type +" COMPONENT DEFINITION +hi link cfmlComponentKeyword Keyword +" INTERFACE DEFINITION +hi link cfmlInterfaceKeyword Keyword +" PROPERTY +hi link cfmlPropertyKeyword Keyword +" FUNCTION DEFINITION +hi link cfmlFunctionKeyword Keyword +hi link cfmlFunctionModifier Keyword +hi link cfmlFunctionReturnType Keyword +hi link cfmlFunctionName Function +" ODD FUNCTION +hi link cfmlOddFunctionKeyword Function +" CUSTOM +hi link cfmlCustomKeyword Keyword +hi link cfmlCustomScope Structure +" SGML TAG +hi link cfmlSGMLTagName Ignore + +" / HIGHLIGHTING }}} + +let b:current_syntax = "cfml" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cfg.vim b/syntax/cfg.vim new file mode 100644 index 000000000..cd6a91c4d --- /dev/null +++ b/syntax/cfg.vim @@ -0,0 +1,52 @@ +if polyglot#init#is_disabled(expand(':p'), 'cfg', 'syntax/cfg.vim') + finish +endif + +" Vim syntax file +" Language: Good old CFG files +" Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) +" Last change: 2012 Aug 11 + +" quit when a syntax file was already loaded +if exists ("b:current_syntax") + finish +endif + +" case off +syn case ignore +syn keyword CfgOnOff ON OFF YES NO TRUE FALSE contained +syn match UncPath "\\\\\p*" contained +"Dos Drive:\Path +syn match CfgDirectory "[a-zA-Z]:\\\p*" contained +"Parameters +syn match CfgParams ".\{0}="me=e-1 contains=CfgComment +"... and their values (don't want to highlight '=' sign) +syn match CfgValues "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff + +" Sections +syn match CfgSection "\[.*\]" +syn match CfgSection "{.*}" + +" String +syn match CfgString "\".*\"" contained +syn match CfgString "'.*'" contained + +" Comments (Everything before '#' or '//' or ';') +syn match CfgComment "#.*" +syn match CfgComment ";.*" +syn match CfgComment "\/\/.*" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link CfgOnOff Label +hi def link CfgComment Comment +hi def link CfgSection Type +hi def link CfgString String +hi def link CfgParams Keyword +hi def link CfgValues Constant +hi def link CfgDirectory Directory +hi def link UncPath Directory + + +let b:current_syntax = "cfg" +" vim:ts=8 diff --git a/syntax/ch.vim b/syntax/ch.vim new file mode 100644 index 000000000..79eeaac86 --- /dev/null +++ b/syntax/ch.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand(':p'), 'ch', 'syntax/ch.vim') + finish +endif + +" Vim syntax file +" Language: Ch +" Maintainer: SoftIntegration, Inc. +" URL: http://www.softintegration.com/download/vim/syntax/ch.vim +" Last change: 2004 Sep 01 +" Created based on cpp.vim +" +" Ch is a C/C++ interpreter with many high level extensions +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +" Ch extentions + +syn keyword chStatement new delete this foreach +syn keyword chAccess public private +syn keyword chStorageClass __declspec(global) __declspec(local) +syn keyword chStructure class +syn keyword chType string_t array + +" Default highlighting + +hi def link chAccess chStatement +hi def link chExceptions Exception +hi def link chStatement Statement +hi def link chType Type +hi def link chStructure Structure + +let b:current_syntax = "ch" + +" vim: ts=8 diff --git a/syntax/chaiscript.vim b/syntax/chaiscript.vim new file mode 100644 index 000000000..8b2e1152a --- /dev/null +++ b/syntax/chaiscript.vim @@ -0,0 +1,98 @@ +if polyglot#init#is_disabled(expand(':p'), 'chaiscript', 'syntax/chaiscript.vim') + finish +endif + +" Vim syntax file +" Language: ChaiScript +" Maintainer: Jason Turner + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +end + +syn case match + +" syncing method +syn sync fromstart + +" Strings +syn region chaiscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=chaiscriptSpecial,chaiscriptEval,@Spell + +" Escape characters +syn match chaiscriptSpecial contained "\\[\\abfnrtv\'\"]\|\\\d\{,3}" + +" String evals +syn region chaiscriptEval contained start="${" end="}" + +" integer number +syn match chaiscriptNumber "\<\d\+\>" + +" floating point number, with dot, optional exponent +syn match chaiscriptFloat "\<\d\+\.\d*\%(e[-+]\=\d\+\)\=\>" + +" floating point number, starting with a dot, optional exponent +syn match chaiscriptFloat "\.\d\+\%(e[-+]\=\d\+\)\=\>" + +" floating point number, without dot, with exponent +syn match chaiscriptFloat "\<\d\+e[-+]\=\d\+\>" + +" Hex strings +syn match chaiscriptNumber "\<0x\x\+\>" + +" Binary strings +syn match chaiscriptNumber "\<0b[01]\+\>" + +" Various language features +syn keyword chaiscriptCond if else +syn keyword chaiscriptRepeat while for do +syn keyword chaiscriptStatement break continue return +syn keyword chaiscriptExceptions try catch throw + +"Keyword +syn keyword chaiscriptKeyword def true false attr + +"Built in types +syn keyword chaiscriptType fun var + +"Built in funcs, keep it simple +syn keyword chaiscriptFunc eval throw + +"Let's treat all backtick operator function lookups as built in too +syn region chaiscriptFunc matchgroup=chaiscriptFunc start="`" end="`" + +" Account for the "[1..10]" syntax, treating it as an operator +" Intentionally leaving out all of the normal, well known operators +syn match chaiscriptOperator "\.\." + +" Guard seperator as an operator +syn match chaiscriptOperator ":" + +" Comments +syn match chaiscriptComment "//.*$" contains=@Spell +syn region chaiscriptComment matchgroup=chaiscriptComment start="/\*" end="\*/" contains=@Spell + + + +hi def link chaiscriptExceptions Exception +hi def link chaiscriptKeyword Keyword +hi def link chaiscriptStatement Statement +hi def link chaiscriptRepeat Repeat +hi def link chaiscriptString String +hi def link chaiscriptNumber Number +hi def link chaiscriptFloat Float +hi def link chaiscriptOperator Operator +hi def link chaiscriptConstant Constant +hi def link chaiscriptCond Conditional +hi def link chaiscriptFunction Function +hi def link chaiscriptComment Comment +hi def link chaiscriptTodo Todo +hi def link chaiscriptError Error +hi def link chaiscriptSpecial SpecialChar +hi def link chaiscriptFunc Identifier +hi def link chaiscriptType Type +hi def link chaiscriptEval Special + +let b:current_syntax = "chaiscript" + +" vim: nowrap sw=2 sts=2 ts=8 noet diff --git a/syntax/chaskell.vim b/syntax/chaskell.vim new file mode 100644 index 000000000..754a415c5 --- /dev/null +++ b/syntax/chaskell.vim @@ -0,0 +1,18 @@ +if polyglot#init#is_disabled(expand(':p'), 'chaskell', 'syntax/chaskell.vim') + finish +endif + +" Vim syntax file +" Language: Haskell supporting c2hs binding hooks +" Maintainer: Armin Sander +" Last Change: 2001 November 1 +" +" 2001 November 1: Changed commands for sourcing haskell.vim + +" Enable binding hooks +let b:hs_chs=1 + +" Include standard Haskell highlighting +runtime! syntax/haskell.vim + +" vim: ts=8 diff --git a/syntax/chill.vim b/syntax/chill.vim new file mode 100644 index 000000000..2adc0137a --- /dev/null +++ b/syntax/chill.vim @@ -0,0 +1,182 @@ +if polyglot#init#is_disabled(expand(':p'), 'chill', 'syntax/chill.vim') + finish +endif + +" Vim syntax file +" Language: CHILL +" Maintainer: YoungSang Yoon +" Last change: 2004 Jan 21 +" + +" first created by image@lgic.co.kr & modified by paris@lgic.co.kr + +" CHILL (CCITT High Level Programming Language) is used for +" developing software of ATM switch at LGIC (LG Information +" & Communications LTd.) + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of useful CHILL keywords +syn keyword chillStatement goto GOTO return RETURN returns RETURNS +syn keyword chillLabel CASE case ESAC esac +syn keyword chillConditional if IF else ELSE elsif ELSIF switch SWITCH THEN then FI fi +syn keyword chillLogical NOT not +syn keyword chillRepeat while WHILE for FOR do DO od OD TO to +syn keyword chillProcess START start STACKSIZE stacksize PRIORITY priority THIS this STOP stop +syn keyword chillBlock PROC proc PROCESS process +syn keyword chillSignal RECEIVE receive SEND send NONPERSISTENT nonpersistent PERSISTENT peristent SET set EVER ever + +syn keyword chillTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match chillSpecial contained "\\x\x\+\|\\\o\{1,3\}\|\\.\|\\$" +syn region chillString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=chillSpecial +syn match chillCharacter "'[^\\]'" +syn match chillSpecialCharacter "'\\.'" +syn match chillSpecialCharacter "'\\\o\{1,3\}'" + +"when wanted, highlight trailing white space +if exists("chill_space_errors") + syn match chillSpaceError "\s*$" + syn match chillSpaceError " \+\t"me=e-1 +endif + +"catch errors caused by wrong parenthesis +syn cluster chillParenGroup contains=chillParenError,chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField +syn region chillParen transparent start='(' end=')' contains=ALLBUT,@chillParenGroup +syn match chillParenError ")" +syn match chillInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match chillNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match chillFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match chillFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match chillFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match chillNumber "\<0x\x\+\(u\=l\=\|lu\)\>" +"syn match chillIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match chillOctalError "\<0\o*[89]" + +if exists("chill_comment_strings") + " A comment can contain chillString, chillCharacter and chillNumber. + " But a "*/" inside a chillString in a chillComment DOES end the comment! So we + " need to use a special type of chillString: chillCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match chillCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region chillCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=chillSpecial,chillCommentSkip + syntax region chillComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=chillSpecial + syntax region chillComment start="/\*" end="\*/" contains=chillTodo,chillCommentString,chillCharacter,chillNumber,chillFloat,chillSpaceError + syntax match chillComment "//.*" contains=chillTodo,chillComment2String,chillCharacter,chillNumber,chillSpaceError +else + syn region chillComment start="/\*" end="\*/" contains=chillTodo,chillSpaceError + syn match chillComment "//.*" contains=chillTodo,chillSpaceError +endif +syntax match chillCommentError "\*/" + +syn keyword chillOperator SIZE size +syn keyword chillType dcl DCL int INT char CHAR bool BOOL REF ref LOC loc INSTANCE instance +syn keyword chillStructure struct STRUCT enum ENUM newmode NEWMODE synmode SYNMODE +"syn keyword chillStorageClass +syn keyword chillBlock PROC proc END end +syn keyword chillScope GRANT grant SEIZE seize +syn keyword chillEDML select SELECT delete DELETE update UPDATE in IN seq SEQ WHERE where INSERT insert include INCLUDE exclude EXCLUDE +syn keyword chillBoolConst true TRUE false FALSE + +syn region chillPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=chillComment,chillString,chillCharacter,chillNumber,chillCommentError,chillSpaceError +syn region chillIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match chillIncluded contained "<[^>]*>" +syn match chillInclude "^\s*#\s*include\>\s*["<]" contains=chillIncluded +"syn match chillLineSkip "\\$" +syn cluster chillPreProcGroup contains=chillPreCondit,chillIncluded,chillInclude,chillDefine,chillInParen,chillUserLabel +syn region chillDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup +syn region chillPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup + +" Highlight User Labels +syn cluster chillMultiGroup contains=chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField +syn region chillMulti transparent start='?' end=':' contains=ALLBUT,@chillMultiGroup +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn match chillUserCont "^\s*\I\i*\s*:$" contains=chillUserLabel +syn match chillUserCont ";\s*\I\i*\s*:$" contains=chillUserLabel +syn match chillUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel +syn match chillUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel + +syn match chillUserLabel "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match chillBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match chillBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +syn match chillBracket contained "[<>]" +if !exists("chill_minlines") + let chill_minlines = 15 +endif +exec "syn sync ccomment chillComment minlines=" . chill_minlines + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link chillLabel Label +hi def link chillUserLabel Label +hi def link chillConditional Conditional +" hi def link chillConditional term=bold ctermfg=red guifg=red gui=bold + +hi def link chillRepeat Repeat +hi def link chillProcess Repeat +hi def link chillSignal Repeat +hi def link chillCharacter Character +hi def link chillSpecialCharacter chillSpecial +hi def link chillNumber Number +hi def link chillFloat Float +hi def link chillOctalError chillError +hi def link chillParenError chillError +hi def link chillInParen chillError +hi def link chillCommentError chillError +hi def link chillSpaceError chillError +hi def link chillOperator Operator +hi def link chillStructure Structure +hi def link chillBlock Operator +hi def link chillScope Operator +"hi def link chillEDML term=underline ctermfg=DarkRed guifg=Red +hi def link chillEDML PreProc +"hi def link chillBoolConst term=bold ctermfg=brown guifg=brown +hi def link chillBoolConst Constant +"hi def link chillLogical term=bold ctermfg=brown guifg=brown +hi def link chillLogical Constant +hi def link chillStorageClass StorageClass +hi def link chillInclude Include +hi def link chillPreProc PreProc +hi def link chillDefine Macro +hi def link chillIncluded chillString +hi def link chillError Error +hi def link chillStatement Statement +hi def link chillPreCondit PreCondit +hi def link chillType Type +hi def link chillCommentError chillError +hi def link chillCommentString chillString +hi def link chillComment2String chillString +hi def link chillCommentSkip chillComment +hi def link chillString String +hi def link chillComment Comment +" hi def link chillComment term=None ctermfg=lightblue guifg=lightblue +hi def link chillSpecial SpecialChar +hi def link chillTodo Todo +hi def link chillBlock Statement +"hi def link chillIdentifier Identifier +hi def link chillBracket Delimiter + + +let b:current_syntax = "chill" + +" vim: ts=8 diff --git a/syntax/chordpro.vim b/syntax/chordpro.vim new file mode 100644 index 000000000..ff8a9302a --- /dev/null +++ b/syntax/chordpro.vim @@ -0,0 +1,71 @@ +if polyglot#init#is_disabled(expand(':p'), 'chordpro', 'syntax/chordpro.vim') + finish +endif + +" Vim syntax file +" Language: ChordPro (v. 3.6.2) +" Maintainer: Niels Bo Andersen +" Last Change: 2006 Apr 30 +" Remark: Requires VIM version 6.00 or greater + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn case ignore + +syn keyword chordproDirective contained + \ start_of_chorus soc end_of_chorus eoc new_song ns no_grid ng grid g + \ new_page np new_physical_page npp start_of_tab sot end_of_tab eot + \ column_break colb + +syn keyword chordproDirWithOpt contained + \ comment c comment_italic ci comment_box cb title t subtitle st define + \ textfont textsize chordfont chordsize columns col + +syn keyword chordproDefineKeyword contained base-fret frets + +syn match chordproDirMatch /{\w*}/ contains=chordproDirective contained transparent +syn match chordproDirOptMatch /{\w*:/ contains=chordproDirWithOpt contained transparent + +" Workaround for a bug in VIM 6, which causes incorrect coloring of the first { +if version < 700 + syn region chordproOptions start=/{\w*:/ end=/}/ contains=chordproDirOptMatch contained transparent + syn region chordproOptions start=/{define:/ end=/}/ contains=chordproDirOptMatch, chordproDefineKeyword contained transparent +else + syn region chordproOptions start=/{\w*:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch contained + syn region chordproOptions start=/{define:/hs=e+1 end=/}/he=s-1 contains=chordproDirOptMatch, chordproDefineKeyword contained +endif + +syn region chordproTag start=/{/ end=/}/ contains=chordproDirMatch,chordproOptions oneline + +syn region chordproChord matchgroup=chordproBracket start=/\[/ end=/]/ oneline + +syn region chordproTab start=/{start_of_tab}\|{sot}/hs=e+1 end=/{end_of_tab}\|{eot}/he=s-1 contains=chordproTag,chordproComment keepend + +syn region chordproChorus start=/{start_of_chorus}\|{soc}/hs=e+1 end=/{end_of_chorus}\|{eoc}/he=s-1 contains=chordproTag,chordproChord,chordproComment keepend + +syn match chordproComment /^#.*/ + +" Define the default highlighting. +hi def link chordproDirective Statement +hi def link chordproDirWithOpt Statement +hi def link chordproOptions Special +hi def link chordproChord Type +hi def link chordproTag Constant +hi def link chordproTab PreProc +hi def link chordproComment Comment +hi def link chordproBracket Constant +hi def link chordproDefineKeyword Type +hi def chordproChorus term=bold cterm=bold gui=bold + +let b:current_syntax = "chordpro" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cl.vim b/syntax/cl.vim new file mode 100644 index 000000000..796abec7a --- /dev/null +++ b/syntax/cl.vim @@ -0,0 +1,102 @@ +if polyglot#init#is_disabled(expand(':p'), 'cl', 'syntax/cl.vim') + finish +endif + +" Vim syntax file +" Language: CL +" (pronounced alphabetically: "Cee-El". +" CL stands for Clever Language, +" but the language is CL, not "Clever". +" CL was created by Multibase, http://www.mbase.com.au) +" Filename extensions: *.ent +" *.eni +" Maintainer: Philip Uren Remove SPAX spam block +" Version: 6 +" Last Change: Mar 06 2013 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=@,48-57,_,- + +syn case ignore + +syn sync lines=300 + +"If/else/elsif/endif and while/wend mismatch errors +syn match clifError "\" +syn match clifError "\" +syn match clifError "\" +syn match clifError "\" + +syn match clSpaceError "\s\+$" + +" If and while regions +syn region clLoop transparent matchgroup=clWhile start="\" matchgroup=clWhile end="\" contains=ALLBUT,clBreak,clProcedure +syn region clIf transparent matchgroup=clConditional start="\" matchgroup=clConditional end="\" contains=ALLBUT,clBreak,clProcedure + +" Make those TODO notes and debugging stand out! +syn keyword clTodo contained TODO BUG DEBUG FIX +syn match clNeedsWork contained "NEED[S]*\s\s*WORK" +syn keyword clDebug contained debug + +syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell +syn region clProcedure oneline start="^\s*[{}]" end="$" +syn match clInclude "^\s*include\s.*" + +" We don't put "debug" in the clSetOptions; +" we contain it in clSet so we can make it stand out. +syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim +syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug + +syn match clPreProc "^\s*#P.*" + +syn keyword clConditional else elsif +syn keyword clWhile continue endloop +" 'break' needs to be a region so we can sync on it above. +syn region clBreak oneline start="^\s*break" end="$" + +syn match clOperator "[!;|)(:.><+*=-]" + +syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" + +syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell +syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell + +syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH + +syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match + +syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link clifError Error +hi def link clSpaceError Error +hi def link clWhile Repeat +hi def link clConditional Conditional +hi def link clDebug Debug +hi def link clNeedsWork Todo +hi def link clTodo Todo +hi def link clComment Comment +hi def link clProcedure Procedure +hi def link clBreak Procedure +hi def link clInclude Include +hi def link clSetOption Statement +hi def link clSet Identifier +hi def link clPreProc PreProc +hi def link clOperator Operator +hi def link clNumber Number +hi def link clString String +hi def link clQuote Delimiter +hi def link clReserved Identifier +hi def link clFunction Function +hi def link clStatement Statement + + +let b:current_syntax = "cl" + +" vim: ts=8 sw=8 diff --git a/syntax/clean.vim b/syntax/clean.vim new file mode 100644 index 000000000..e65901605 --- /dev/null +++ b/syntax/clean.vim @@ -0,0 +1,94 @@ +if polyglot#init#is_disabled(expand(':p'), 'clean', 'syntax/clean.vim') + finish +endif + +" Vim syntax file +" Language: Clean +" Author: Pieter van Engelen +" Co-Author: Arthur van Leeuwen +" Last Change: 2013 Oct 15 by Jurriën Stutterheim + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Some Clean-keywords +syn keyword cleanConditional if case +syn keyword cleanLabel let! with where in of +syn keyword cleanSpecial Start +syn keyword cleanKeyword infixl infixr infix +syn keyword cleanBasicType Int Real Char Bool String +syn keyword cleanSpecialType World ProcId Void Files File +syn keyword cleanModuleSystem module implementation definition system +syn keyword cleanTypeClass class instance export + +" Import highlighting +syn region cleanIncludeRegion start="^\s*\(from\|import\|\s\+\(as\|qualified\)\)" end="\n" contains=cleanIncludeKeyword keepend +syn keyword cleanIncludeKeyword contained from import as qualified + +" To do some Denotation Highlighting +syn keyword cleanBoolDenot True False +syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display +syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display +syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display +syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display + +" To highlight the use of lists, tuples and arrays +syn region cleanList start="\[" end="\]" contains=ALL +syn region cleanRecord start="{" end="}" contains=ALL +syn region cleanArray start="{:" end=":}" contains=ALL +syn match cleanTuple "([^=]*,[^=]*)" contains=ALL + +" To do some Comment Highlighting +syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold +syn region cleanComment start="//.*" end="$" display contains=cleanTodo +syn keyword cleanTodo TODO FIXME XXX contained + +" Now for some useful type definition recognition +syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + + " Comments + hi def link cleanComment Comment + " Constants and denotations + hi def link cleanStringDenot String + hi def link cleanCharDenot Character + hi def link cleanIntegerDenot Number + hi def link cleanBoolDenot Boolean + hi def link cleanRealDenot Float + " Identifiers + " Statements + hi def link cleanTypeClass Keyword + hi def link cleanConditional Conditional + hi def link cleanLabel Label + hi def link cleanKeyword Keyword + " Generic Preprocessing + hi def link cleanIncludeKeyword Include + hi def link cleanModuleSystem PreProc + " Type + hi def link cleanBasicType Type + hi def link cleanSpecialType Type + hi def link cleanFuncTypeDef Typedef + " Special + hi def link cleanSpecial Special + hi def link cleanList Special + hi def link cleanArray Special + hi def link cleanRecord Special + hi def link cleanTuple Special + " Error + " Todo + hi def link cleanTodo Todo + + +let b:current_syntax = "clean" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=4 diff --git a/syntax/clojure.vim b/syntax/clojure.vim index 6ef9369be..4397b89be 100644 --- a/syntax/clojure.vim +++ b/syntax/clojure.vim @@ -1,17 +1,17 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 - -" Vim syntax file -" Language: Clojure -" Authors: Toralf Wittner -" modified by Meikel Brandmeyer -" URL: http://kotka.de/projects/clojure/vimclojure.html -" -" Contributors: Joel Holdbrooks (Regexp support, bug fixes) -" -" Maintainer: Sung Pae -" URL: https://github.com/guns/vim-clojure-static -" License: Same as Vim -" Last Change: %%RELEASE_DATE%% +if polyglot#init#is_disabled(expand(':p'), 'clojure', 'syntax/clojure.vim') + finish +endif + +" Vim indent file +" Language: Clojure +" Maintainer: Alex Vear +" Former Maintainers: Sung Pae +" Meikel Brandmeyer +" Toralf Wittner +" Contributors: Joel Holdbrooks (Regexp support, bug fixes) +" URL: https://github.com/clojure-vim/clojure.vim +" License: Vim (see :h license) +" Last Change: %%RELEASE_DATE%% if exists("b:current_syntax") finish @@ -25,20 +25,20 @@ if has("folding") && exists("g:clojure_fold") && g:clojure_fold > 0 endif " -*- KEYWORDS -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj -" Clojure version 1.8.0 +" Generated from https://github.com/clojure-vim/clojure.vim/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj +" Clojure version 1.11.1 let s:clojure_syntax_keywords = { - \ 'clojureBoolean': ["false","true"] - \ , 'clojureCond': ["case","clojure.core/case","clojure.core/cond","clojure.core/cond->","clojure.core/cond->>","clojure.core/condp","clojure.core/if-let","clojure.core/if-not","clojure.core/if-some","clojure.core/when","clojure.core/when-first","clojure.core/when-let","clojure.core/when-not","clojure.core/when-some","cond","cond->","cond->>","condp","if-let","if-not","if-some","when","when-first","when-let","when-not","when-some"] - \ , 'clojureConstant': ["nil"] - \ , 'clojureDefine': ["clojure.core/definline","clojure.core/definterface","clojure.core/defmacro","clojure.core/defmethod","clojure.core/defmulti","clojure.core/defn","clojure.core/defn-","clojure.core/defonce","clojure.core/defprotocol","clojure.core/defrecord","clojure.core/defstruct","clojure.core/deftype","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype"] - \ , 'clojureException': ["catch","finally","throw","try"] - \ , 'clojureFunc': ["*","*'","+","+'","-","-'","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","/","<","<=","=","==",">",">=","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","ancestors","apply","array-map","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn*","bound?","butlast","byte","byte-array","bytes","cast","cat","char","char-array","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","clojure.core/*","clojure.core/*'","clojure.core/+","clojure.core/+'","clojure.core/-","clojure.core/-'","clojure.core/->ArrayChunk","clojure.core/->Eduction","clojure.core/->Vec","clojure.core/->VecNode","clojure.core/->VecSeq","clojure.core/-cache-protocol-fn","clojure.core/-reset-methods","clojure.core//","clojure.core/<","clojure.core/<=","clojure.core/=","clojure.core/==","clojure.core/>","clojure.core/>=","clojure.core/Throwable->map","clojure.core/accessor","clojure.core/aclone","clojure.core/add-classpath","clojure.core/add-watch","clojure.core/agent","clojure.core/agent-error","clojure.core/agent-errors","clojure.core/aget","clojure.core/alength","clojure.core/alias","clojure.core/all-ns","clojure.core/alter","clojure.core/alter-meta!","clojure.core/alter-var-root","clojure.core/ancestors","clojure.core/apply","clojure.core/array-map","clojure.core/aset","clojure.core/aset-boolean","clojure.core/aset-byte","clojure.core/aset-char","clojure.core/aset-double","clojure.core/aset-float","clojure.core/aset-int","clojure.core/aset-long","clojure.core/aset-short","clojure.core/assoc","clojure.core/assoc!","clojure.core/assoc-in","clojure.core/associative?","clojure.core/atom","clojure.core/await","clojure.core/await-for","clojure.core/await1","clojure.core/bases","clojure.core/bean","clojure.core/bigdec","clojure.core/bigint","clojure.core/biginteger","clojure.core/bit-and","clojure.core/bit-and-not","clojure.core/bit-clear","clojure.core/bit-flip","clojure.core/bit-not","clojure.core/bit-or","clojure.core/bit-set","clojure.core/bit-shift-left","clojure.core/bit-shift-right","clojure.core/bit-test","clojure.core/bit-xor","clojure.core/boolean","clojure.core/boolean-array","clojure.core/booleans","clojure.core/bound-fn*","clojure.core/bound?","clojure.core/butlast","clojure.core/byte","clojure.core/byte-array","clojure.core/bytes","clojure.core/cast","clojure.core/cat","clojure.core/char","clojure.core/char-array","clojure.core/char?","clojure.core/chars","clojure.core/chunk","clojure.core/chunk-append","clojure.core/chunk-buffer","clojure.core/chunk-cons","clojure.core/chunk-first","clojure.core/chunk-next","clojure.core/chunk-rest","clojure.core/chunked-seq?","clojure.core/class","clojure.core/class?","clojure.core/clear-agent-errors","clojure.core/clojure-version","clojure.core/coll?","clojure.core/commute","clojure.core/comp","clojure.core/comparator","clojure.core/compare","clojure.core/compare-and-set!","clojure.core/compile","clojure.core/complement","clojure.core/completing","clojure.core/concat","clojure.core/conj","clojure.core/conj!","clojure.core/cons","clojure.core/constantly","clojure.core/construct-proxy","clojure.core/contains?","clojure.core/count","clojure.core/counted?","clojure.core/create-ns","clojure.core/create-struct","clojure.core/cycle","clojure.core/dec","clojure.core/dec'","clojure.core/decimal?","clojure.core/dedupe","clojure.core/delay?","clojure.core/deliver","clojure.core/denominator","clojure.core/deref","clojure.core/derive","clojure.core/descendants","clojure.core/destructure","clojure.core/disj","clojure.core/disj!","clojure.core/dissoc","clojure.core/dissoc!","clojure.core/distinct","clojure.core/distinct?","clojure.core/doall","clojure.core/dorun","clojure.core/double","clojure.core/double-array","clojure.core/doubles","clojure.core/drop","clojure.core/drop-last","clojure.core/drop-while","clojure.core/eduction","clojure.core/empty","clojure.core/empty?","clojure.core/ensure","clojure.core/ensure-reduced","clojure.core/enumeration-seq","clojure.core/error-handler","clojure.core/error-mode","clojure.core/eval","clojure.core/even?","clojure.core/every-pred","clojure.core/every?","clojure.core/ex-data","clojure.core/ex-info","clojure.core/extend","clojure.core/extenders","clojure.core/extends?","clojure.core/false?","clojure.core/ffirst","clojure.core/file-seq","clojure.core/filter","clojure.core/filterv","clojure.core/find","clojure.core/find-keyword","clojure.core/find-ns","clojure.core/find-protocol-impl","clojure.core/find-protocol-method","clojure.core/find-var","clojure.core/first","clojure.core/flatten","clojure.core/float","clojure.core/float-array","clojure.core/float?","clojure.core/floats","clojure.core/flush","clojure.core/fn?","clojure.core/fnext","clojure.core/fnil","clojure.core/force","clojure.core/format","clojure.core/frequencies","clojure.core/future-call","clojure.core/future-cancel","clojure.core/future-cancelled?","clojure.core/future-done?","clojure.core/future?","clojure.core/gensym","clojure.core/get","clojure.core/get-in","clojure.core/get-method","clojure.core/get-proxy-class","clojure.core/get-thread-bindings","clojure.core/get-validator","clojure.core/group-by","clojure.core/hash","clojure.core/hash-combine","clojure.core/hash-map","clojure.core/hash-ordered-coll","clojure.core/hash-set","clojure.core/hash-unordered-coll","clojure.core/identical?","clojure.core/identity","clojure.core/ifn?","clojure.core/in-ns","clojure.core/inc","clojure.core/inc'","clojure.core/init-proxy","clojure.core/instance?","clojure.core/int","clojure.core/int-array","clojure.core/integer?","clojure.core/interleave","clojure.core/intern","clojure.core/interpose","clojure.core/into","clojure.core/into-array","clojure.core/ints","clojure.core/isa?","clojure.core/iterate","clojure.core/iterator-seq","clojure.core/juxt","clojure.core/keep","clojure.core/keep-indexed","clojure.core/key","clojure.core/keys","clojure.core/keyword","clojure.core/keyword?","clojure.core/last","clojure.core/line-seq","clojure.core/list","clojure.core/list*","clojure.core/list?","clojure.core/load","clojure.core/load-file","clojure.core/load-reader","clojure.core/load-string","clojure.core/loaded-libs","clojure.core/long","clojure.core/long-array","clojure.core/longs","clojure.core/macroexpand","clojure.core/macroexpand-1","clojure.core/make-array","clojure.core/make-hierarchy","clojure.core/map","clojure.core/map-entry?","clojure.core/map-indexed","clojure.core/map?","clojure.core/mapcat","clojure.core/mapv","clojure.core/max","clojure.core/max-key","clojure.core/memoize","clojure.core/merge","clojure.core/merge-with","clojure.core/meta","clojure.core/method-sig","clojure.core/methods","clojure.core/min","clojure.core/min-key","clojure.core/mix-collection-hash","clojure.core/mod","clojure.core/munge","clojure.core/name","clojure.core/namespace","clojure.core/namespace-munge","clojure.core/neg?","clojure.core/newline","clojure.core/next","clojure.core/nfirst","clojure.core/nil?","clojure.core/nnext","clojure.core/not","clojure.core/not-any?","clojure.core/not-empty","clojure.core/not-every?","clojure.core/not=","clojure.core/ns-aliases","clojure.core/ns-imports","clojure.core/ns-interns","clojure.core/ns-map","clojure.core/ns-name","clojure.core/ns-publics","clojure.core/ns-refers","clojure.core/ns-resolve","clojure.core/ns-unalias","clojure.core/ns-unmap","clojure.core/nth","clojure.core/nthnext","clojure.core/nthrest","clojure.core/num","clojure.core/number?","clojure.core/numerator","clojure.core/object-array","clojure.core/odd?","clojure.core/parents","clojure.core/partial","clojure.core/partition","clojure.core/partition-all","clojure.core/partition-by","clojure.core/pcalls","clojure.core/peek","clojure.core/persistent!","clojure.core/pmap","clojure.core/pop","clojure.core/pop!","clojure.core/pop-thread-bindings","clojure.core/pos?","clojure.core/pr","clojure.core/pr-str","clojure.core/prefer-method","clojure.core/prefers","clojure.core/print","clojure.core/print-ctor","clojure.core/print-dup","clojure.core/print-method","clojure.core/print-simple","clojure.core/print-str","clojure.core/printf","clojure.core/println","clojure.core/println-str","clojure.core/prn","clojure.core/prn-str","clojure.core/promise","clojure.core/proxy-call-with-super","clojure.core/proxy-mappings","clojure.core/proxy-name","clojure.core/push-thread-bindings","clojure.core/quot","clojure.core/rand","clojure.core/rand-int","clojure.core/rand-nth","clojure.core/random-sample","clojure.core/range","clojure.core/ratio?","clojure.core/rational?","clojure.core/rationalize","clojure.core/re-find","clojure.core/re-groups","clojure.core/re-matcher","clojure.core/re-matches","clojure.core/re-pattern","clojure.core/re-seq","clojure.core/read","clojure.core/read-line","clojure.core/read-string","clojure.core/reader-conditional","clojure.core/reader-conditional?","clojure.core/realized?","clojure.core/record?","clojure.core/reduce","clojure.core/reduce-kv","clojure.core/reduced","clojure.core/reduced?","clojure.core/reductions","clojure.core/ref","clojure.core/ref-history-count","clojure.core/ref-max-history","clojure.core/ref-min-history","clojure.core/ref-set","clojure.core/refer","clojure.core/release-pending-sends","clojure.core/rem","clojure.core/remove","clojure.core/remove-all-methods","clojure.core/remove-method","clojure.core/remove-ns","clojure.core/remove-watch","clojure.core/repeat","clojure.core/repeatedly","clojure.core/replace","clojure.core/replicate","clojure.core/require","clojure.core/reset!","clojure.core/reset-meta!","clojure.core/resolve","clojure.core/rest","clojure.core/restart-agent","clojure.core/resultset-seq","clojure.core/reverse","clojure.core/reversible?","clojure.core/rseq","clojure.core/rsubseq","clojure.core/run!","clojure.core/satisfies?","clojure.core/second","clojure.core/select-keys","clojure.core/send","clojure.core/send-off","clojure.core/send-via","clojure.core/seq","clojure.core/seq?","clojure.core/seque","clojure.core/sequence","clojure.core/sequential?","clojure.core/set","clojure.core/set-agent-send-executor!","clojure.core/set-agent-send-off-executor!","clojure.core/set-error-handler!","clojure.core/set-error-mode!","clojure.core/set-validator!","clojure.core/set?","clojure.core/short","clojure.core/short-array","clojure.core/shorts","clojure.core/shuffle","clojure.core/shutdown-agents","clojure.core/slurp","clojure.core/some","clojure.core/some-fn","clojure.core/some?","clojure.core/sort","clojure.core/sort-by","clojure.core/sorted-map","clojure.core/sorted-map-by","clojure.core/sorted-set","clojure.core/sorted-set-by","clojure.core/sorted?","clojure.core/special-symbol?","clojure.core/spit","clojure.core/split-at","clojure.core/split-with","clojure.core/str","clojure.core/string?","clojure.core/struct","clojure.core/struct-map","clojure.core/subs","clojure.core/subseq","clojure.core/subvec","clojure.core/supers","clojure.core/swap!","clojure.core/symbol","clojure.core/symbol?","clojure.core/tagged-literal","clojure.core/tagged-literal?","clojure.core/take","clojure.core/take-last","clojure.core/take-nth","clojure.core/take-while","clojure.core/test","clojure.core/the-ns","clojure.core/thread-bound?","clojure.core/to-array","clojure.core/to-array-2d","clojure.core/trampoline","clojure.core/transduce","clojure.core/transient","clojure.core/tree-seq","clojure.core/true?","clojure.core/type","clojure.core/unchecked-add","clojure.core/unchecked-add-int","clojure.core/unchecked-byte","clojure.core/unchecked-char","clojure.core/unchecked-dec","clojure.core/unchecked-dec-int","clojure.core/unchecked-divide-int","clojure.core/unchecked-double","clojure.core/unchecked-float","clojure.core/unchecked-inc","clojure.core/unchecked-inc-int","clojure.core/unchecked-int","clojure.core/unchecked-long","clojure.core/unchecked-multiply","clojure.core/unchecked-multiply-int","clojure.core/unchecked-negate","clojure.core/unchecked-negate-int","clojure.core/unchecked-remainder-int","clojure.core/unchecked-short","clojure.core/unchecked-subtract","clojure.core/unchecked-subtract-int","clojure.core/underive","clojure.core/unreduced","clojure.core/unsigned-bit-shift-right","clojure.core/update","clojure.core/update-in","clojure.core/update-proxy","clojure.core/use","clojure.core/val","clojure.core/vals","clojure.core/var-get","clojure.core/var-set","clojure.core/var?","clojure.core/vary-meta","clojure.core/vec","clojure.core/vector","clojure.core/vector-of","clojure.core/vector?","clojure.core/volatile!","clojure.core/volatile?","clojure.core/vreset!","clojure.core/with-bindings*","clojure.core/with-meta","clojure.core/with-redefs-fn","clojure.core/xml-seq","clojure.core/zero?","clojure.core/zipmap","coll?","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","dedupe","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","double","double-array","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn?","fnext","fnil","force","format","frequencies","future-call","future-cancel","future-cancelled?","future-done?","future?","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","ifn?","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","long","long-array","longs","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy-call-with-super","proxy-mappings","proxy-name","push-thread-bindings","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","use","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","with-bindings*","with-meta","with-redefs-fn","xml-seq","zero?","zipmap"] - \ , 'clojureMacro': ["->","->>","..","amap","and","areduce","as->","assert","binding","bound-fn","clojure.core/->","clojure.core/->>","clojure.core/..","clojure.core/amap","clojure.core/and","clojure.core/areduce","clojure.core/as->","clojure.core/assert","clojure.core/binding","clojure.core/bound-fn","clojure.core/comment","clojure.core/declare","clojure.core/delay","clojure.core/dosync","clojure.core/doto","clojure.core/extend-protocol","clojure.core/extend-type","clojure.core/for","clojure.core/future","clojure.core/gen-class","clojure.core/gen-interface","clojure.core/import","clojure.core/io!","clojure.core/lazy-cat","clojure.core/lazy-seq","clojure.core/letfn","clojure.core/locking","clojure.core/memfn","clojure.core/ns","clojure.core/or","clojure.core/proxy","clojure.core/proxy-super","clojure.core/pvalues","clojure.core/refer-clojure","clojure.core/reify","clojure.core/some->","clojure.core/some->>","clojure.core/sync","clojure.core/time","clojure.core/vswap!","clojure.core/with-bindings","clojure.core/with-in-str","clojure.core/with-loading-context","clojure.core/with-local-vars","clojure.core/with-open","clojure.core/with-out-str","clojure.core/with-precision","clojure.core/with-redefs","comment","declare","delay","dosync","doto","extend-protocol","extend-type","for","future","gen-class","gen-interface","import","io!","lazy-cat","lazy-seq","letfn","locking","memfn","ns","or","proxy","proxy-super","pvalues","refer-clojure","reify","some->","some->>","sync","time","vswap!","with-bindings","with-in-str","with-loading-context","with-local-vars","with-open","with-out-str","with-precision","with-redefs"] - \ , 'clojureRepeat': ["clojure.core/doseq","clojure.core/dotimes","clojure.core/while","doseq","dotimes","while"] - \ , 'clojureSpecial': [".","clojure.core/fn","clojure.core/let","clojure.core/loop","def","do","fn","if","let","loop","monitor-enter","monitor-exit","new","quote","recur","set!","var"] - \ , 'clojureVariable': ["*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","EMPTY-NODE","char-escape-string","char-name-string","clojure.core/*1","clojure.core/*2","clojure.core/*3","clojure.core/*agent*","clojure.core/*allow-unresolved-vars*","clojure.core/*assert*","clojure.core/*clojure-version*","clojure.core/*command-line-args*","clojure.core/*compile-files*","clojure.core/*compile-path*","clojure.core/*compiler-options*","clojure.core/*data-readers*","clojure.core/*default-data-reader-fn*","clojure.core/*e","clojure.core/*err*","clojure.core/*file*","clojure.core/*flush-on-newline*","clojure.core/*fn-loader*","clojure.core/*in*","clojure.core/*math-context*","clojure.core/*ns*","clojure.core/*out*","clojure.core/*print-dup*","clojure.core/*print-length*","clojure.core/*print-level*","clojure.core/*print-meta*","clojure.core/*print-readably*","clojure.core/*read-eval*","clojure.core/*source-path*","clojure.core/*suppress-read*","clojure.core/*unchecked-math*","clojure.core/*use-context-classloader*","clojure.core/*verbose-defrecords*","clojure.core/*warn-on-reflection*","clojure.core/EMPTY-NODE","clojure.core/char-escape-string","clojure.core/char-name-string","clojure.core/default-data-readers","clojure.core/primitives-classnames","clojure.core/unquote","clojure.core/unquote-splicing","default-data-readers","primitives-classnames","unquote","unquote-splicing"] - \ } + \ 'clojureBoolean': ["false","true"], + \ 'clojureCond': ["case","case*","clojure.core/case","clojure.core/cond","clojure.core/cond->","clojure.core/cond->>","clojure.core/condp","clojure.core/if-let","clojure.core/if-not","clojure.core/if-some","clojure.core/when","clojure.core/when-first","clojure.core/when-let","clojure.core/when-not","clojure.core/when-some","cond","cond->","cond->>","condp","if","if-let","if-not","if-some","when","when-first","when-let","when-not","when-some"], + \ 'clojureConstant': ["nil"], + \ 'clojureDefine': ["clojure.core/definline","clojure.core/definterface","clojure.core/defmacro","clojure.core/defmethod","clojure.core/defmulti","clojure.core/defn","clojure.core/defn-","clojure.core/defonce","clojure.core/defprotocol","clojure.core/defrecord","clojure.core/defstruct","clojure.core/deftype","def","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","deftype*"], + \ 'clojureException': ["catch","finally","throw","try"], + \ 'clojureFunc': ["*","*'","+","+'","-","-'","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","/","<","<=","=","==",">",">=","NaN?","PrintWriter-on","StackTraceElement->vec","Throwable->map","abs","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","ancestors","any?","apply","array-map","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","cast","cat","char","char-array","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","clojure.core/*","clojure.core/*'","clojure.core/+","clojure.core/+'","clojure.core/-","clojure.core/-'","clojure.core/->ArrayChunk","clojure.core/->Eduction","clojure.core/->Vec","clojure.core/->VecNode","clojure.core/->VecSeq","clojure.core/-cache-protocol-fn","clojure.core/-reset-methods","clojure.core//","clojure.core/<","clojure.core/<=","clojure.core/=","clojure.core/==","clojure.core/>","clojure.core/>=","clojure.core/NaN?","clojure.core/PrintWriter-on","clojure.core/StackTraceElement->vec","clojure.core/Throwable->map","clojure.core/abs","clojure.core/accessor","clojure.core/aclone","clojure.core/add-classpath","clojure.core/add-tap","clojure.core/add-watch","clojure.core/agent","clojure.core/agent-error","clojure.core/agent-errors","clojure.core/aget","clojure.core/alength","clojure.core/alias","clojure.core/all-ns","clojure.core/alter","clojure.core/alter-meta!","clojure.core/alter-var-root","clojure.core/ancestors","clojure.core/any?","clojure.core/apply","clojure.core/array-map","clojure.core/aset","clojure.core/aset-boolean","clojure.core/aset-byte","clojure.core/aset-char","clojure.core/aset-double","clojure.core/aset-float","clojure.core/aset-int","clojure.core/aset-long","clojure.core/aset-short","clojure.core/assoc","clojure.core/assoc!","clojure.core/assoc-in","clojure.core/associative?","clojure.core/atom","clojure.core/await","clojure.core/await-for","clojure.core/await1","clojure.core/bases","clojure.core/bean","clojure.core/bigdec","clojure.core/bigint","clojure.core/biginteger","clojure.core/bit-and","clojure.core/bit-and-not","clojure.core/bit-clear","clojure.core/bit-flip","clojure.core/bit-not","clojure.core/bit-or","clojure.core/bit-set","clojure.core/bit-shift-left","clojure.core/bit-shift-right","clojure.core/bit-test","clojure.core/bit-xor","clojure.core/boolean","clojure.core/boolean-array","clojure.core/boolean?","clojure.core/booleans","clojure.core/bound-fn*","clojure.core/bound?","clojure.core/bounded-count","clojure.core/butlast","clojure.core/byte","clojure.core/byte-array","clojure.core/bytes","clojure.core/bytes?","clojure.core/cast","clojure.core/cat","clojure.core/char","clojure.core/char-array","clojure.core/char?","clojure.core/chars","clojure.core/chunk","clojure.core/chunk-append","clojure.core/chunk-buffer","clojure.core/chunk-cons","clojure.core/chunk-first","clojure.core/chunk-next","clojure.core/chunk-rest","clojure.core/chunked-seq?","clojure.core/class","clojure.core/class?","clojure.core/clear-agent-errors","clojure.core/clojure-version","clojure.core/coll?","clojure.core/commute","clojure.core/comp","clojure.core/comparator","clojure.core/compare","clojure.core/compare-and-set!","clojure.core/compile","clojure.core/complement","clojure.core/completing","clojure.core/concat","clojure.core/conj","clojure.core/conj!","clojure.core/cons","clojure.core/constantly","clojure.core/construct-proxy","clojure.core/contains?","clojure.core/count","clojure.core/counted?","clojure.core/create-ns","clojure.core/create-struct","clojure.core/cycle","clojure.core/dec","clojure.core/dec'","clojure.core/decimal?","clojure.core/dedupe","clojure.core/delay?","clojure.core/deliver","clojure.core/denominator","clojure.core/deref","clojure.core/derive","clojure.core/descendants","clojure.core/destructure","clojure.core/disj","clojure.core/disj!","clojure.core/dissoc","clojure.core/dissoc!","clojure.core/distinct","clojure.core/distinct?","clojure.core/doall","clojure.core/dorun","clojure.core/double","clojure.core/double-array","clojure.core/double?","clojure.core/doubles","clojure.core/drop","clojure.core/drop-last","clojure.core/drop-while","clojure.core/eduction","clojure.core/empty","clojure.core/empty?","clojure.core/ensure","clojure.core/ensure-reduced","clojure.core/enumeration-seq","clojure.core/error-handler","clojure.core/error-mode","clojure.core/eval","clojure.core/even?","clojure.core/every-pred","clojure.core/every?","clojure.core/ex-cause","clojure.core/ex-data","clojure.core/ex-info","clojure.core/ex-message","clojure.core/extend","clojure.core/extenders","clojure.core/extends?","clojure.core/false?","clojure.core/ffirst","clojure.core/file-seq","clojure.core/filter","clojure.core/filterv","clojure.core/find","clojure.core/find-keyword","clojure.core/find-ns","clojure.core/find-protocol-impl","clojure.core/find-protocol-method","clojure.core/find-var","clojure.core/first","clojure.core/flatten","clojure.core/float","clojure.core/float-array","clojure.core/float?","clojure.core/floats","clojure.core/flush","clojure.core/fn?","clojure.core/fnext","clojure.core/fnil","clojure.core/force","clojure.core/format","clojure.core/frequencies","clojure.core/future-call","clojure.core/future-cancel","clojure.core/future-cancelled?","clojure.core/future-done?","clojure.core/future?","clojure.core/gensym","clojure.core/get","clojure.core/get-in","clojure.core/get-method","clojure.core/get-proxy-class","clojure.core/get-thread-bindings","clojure.core/get-validator","clojure.core/group-by","clojure.core/halt-when","clojure.core/hash","clojure.core/hash-combine","clojure.core/hash-map","clojure.core/hash-ordered-coll","clojure.core/hash-set","clojure.core/hash-unordered-coll","clojure.core/ident?","clojure.core/identical?","clojure.core/identity","clojure.core/ifn?","clojure.core/in-ns","clojure.core/inc","clojure.core/inc'","clojure.core/indexed?","clojure.core/infinite?","clojure.core/init-proxy","clojure.core/inst-ms","clojure.core/inst-ms*","clojure.core/inst?","clojure.core/instance?","clojure.core/int","clojure.core/int-array","clojure.core/int?","clojure.core/integer?","clojure.core/interleave","clojure.core/intern","clojure.core/interpose","clojure.core/into","clojure.core/into-array","clojure.core/ints","clojure.core/isa?","clojure.core/iterate","clojure.core/iteration","clojure.core/iterator-seq","clojure.core/juxt","clojure.core/keep","clojure.core/keep-indexed","clojure.core/key","clojure.core/keys","clojure.core/keyword","clojure.core/keyword?","clojure.core/last","clojure.core/line-seq","clojure.core/list","clojure.core/list*","clojure.core/list?","clojure.core/load","clojure.core/load-file","clojure.core/load-reader","clojure.core/load-string","clojure.core/loaded-libs","clojure.core/long","clojure.core/long-array","clojure.core/longs","clojure.core/macroexpand","clojure.core/macroexpand-1","clojure.core/make-array","clojure.core/make-hierarchy","clojure.core/map","clojure.core/map-entry?","clojure.core/map-indexed","clojure.core/map?","clojure.core/mapcat","clojure.core/mapv","clojure.core/max","clojure.core/max-key","clojure.core/memoize","clojure.core/merge","clojure.core/merge-with","clojure.core/meta","clojure.core/method-sig","clojure.core/methods","clojure.core/min","clojure.core/min-key","clojure.core/mix-collection-hash","clojure.core/mod","clojure.core/munge","clojure.core/name","clojure.core/namespace","clojure.core/namespace-munge","clojure.core/nat-int?","clojure.core/neg-int?","clojure.core/neg?","clojure.core/newline","clojure.core/next","clojure.core/nfirst","clojure.core/nil?","clojure.core/nnext","clojure.core/not","clojure.core/not-any?","clojure.core/not-empty","clojure.core/not-every?","clojure.core/not=","clojure.core/ns-aliases","clojure.core/ns-imports","clojure.core/ns-interns","clojure.core/ns-map","clojure.core/ns-name","clojure.core/ns-publics","clojure.core/ns-refers","clojure.core/ns-resolve","clojure.core/ns-unalias","clojure.core/ns-unmap","clojure.core/nth","clojure.core/nthnext","clojure.core/nthrest","clojure.core/num","clojure.core/number?","clojure.core/numerator","clojure.core/object-array","clojure.core/odd?","clojure.core/parents","clojure.core/parse-boolean","clojure.core/parse-double","clojure.core/parse-long","clojure.core/parse-uuid","clojure.core/partial","clojure.core/partition","clojure.core/partition-all","clojure.core/partition-by","clojure.core/pcalls","clojure.core/peek","clojure.core/persistent!","clojure.core/pmap","clojure.core/pop","clojure.core/pop!","clojure.core/pop-thread-bindings","clojure.core/pos-int?","clojure.core/pos?","clojure.core/pr","clojure.core/pr-str","clojure.core/prefer-method","clojure.core/prefers","clojure.core/print","clojure.core/print-ctor","clojure.core/print-dup","clojure.core/print-method","clojure.core/print-simple","clojure.core/print-str","clojure.core/printf","clojure.core/println","clojure.core/println-str","clojure.core/prn","clojure.core/prn-str","clojure.core/promise","clojure.core/proxy-call-with-super","clojure.core/proxy-mappings","clojure.core/proxy-name","clojure.core/push-thread-bindings","clojure.core/qualified-ident?","clojure.core/qualified-keyword?","clojure.core/qualified-symbol?","clojure.core/quot","clojure.core/rand","clojure.core/rand-int","clojure.core/rand-nth","clojure.core/random-sample","clojure.core/random-uuid","clojure.core/range","clojure.core/ratio?","clojure.core/rational?","clojure.core/rationalize","clojure.core/re-find","clojure.core/re-groups","clojure.core/re-matcher","clojure.core/re-matches","clojure.core/re-pattern","clojure.core/re-seq","clojure.core/read","clojure.core/read+string","clojure.core/read-line","clojure.core/read-string","clojure.core/reader-conditional","clojure.core/reader-conditional?","clojure.core/realized?","clojure.core/record?","clojure.core/reduce","clojure.core/reduce-kv","clojure.core/reduced","clojure.core/reduced?","clojure.core/reductions","clojure.core/ref","clojure.core/ref-history-count","clojure.core/ref-max-history","clojure.core/ref-min-history","clojure.core/ref-set","clojure.core/refer","clojure.core/release-pending-sends","clojure.core/rem","clojure.core/remove","clojure.core/remove-all-methods","clojure.core/remove-method","clojure.core/remove-ns","clojure.core/remove-tap","clojure.core/remove-watch","clojure.core/repeat","clojure.core/repeatedly","clojure.core/replace","clojure.core/replicate","clojure.core/require","clojure.core/requiring-resolve","clojure.core/reset!","clojure.core/reset-meta!","clojure.core/reset-vals!","clojure.core/resolve","clojure.core/rest","clojure.core/restart-agent","clojure.core/resultset-seq","clojure.core/reverse","clojure.core/reversible?","clojure.core/rseq","clojure.core/rsubseq","clojure.core/run!","clojure.core/satisfies?","clojure.core/second","clojure.core/select-keys","clojure.core/send","clojure.core/send-off","clojure.core/send-via","clojure.core/seq","clojure.core/seq-to-map-for-destructuring","clojure.core/seq?","clojure.core/seqable?","clojure.core/seque","clojure.core/sequence","clojure.core/sequential?","clojure.core/set","clojure.core/set-agent-send-executor!","clojure.core/set-agent-send-off-executor!","clojure.core/set-error-handler!","clojure.core/set-error-mode!","clojure.core/set-validator!","clojure.core/set?","clojure.core/short","clojure.core/short-array","clojure.core/shorts","clojure.core/shuffle","clojure.core/shutdown-agents","clojure.core/simple-ident?","clojure.core/simple-keyword?","clojure.core/simple-symbol?","clojure.core/slurp","clojure.core/some","clojure.core/some-fn","clojure.core/some?","clojure.core/sort","clojure.core/sort-by","clojure.core/sorted-map","clojure.core/sorted-map-by","clojure.core/sorted-set","clojure.core/sorted-set-by","clojure.core/sorted?","clojure.core/special-symbol?","clojure.core/spit","clojure.core/split-at","clojure.core/split-with","clojure.core/str","clojure.core/string?","clojure.core/struct","clojure.core/struct-map","clojure.core/subs","clojure.core/subseq","clojure.core/subvec","clojure.core/supers","clojure.core/swap!","clojure.core/swap-vals!","clojure.core/symbol","clojure.core/symbol?","clojure.core/tagged-literal","clojure.core/tagged-literal?","clojure.core/take","clojure.core/take-last","clojure.core/take-nth","clojure.core/take-while","clojure.core/tap>","clojure.core/test","clojure.core/the-ns","clojure.core/thread-bound?","clojure.core/to-array","clojure.core/to-array-2d","clojure.core/trampoline","clojure.core/transduce","clojure.core/transient","clojure.core/tree-seq","clojure.core/true?","clojure.core/type","clojure.core/unchecked-add","clojure.core/unchecked-add-int","clojure.core/unchecked-byte","clojure.core/unchecked-char","clojure.core/unchecked-dec","clojure.core/unchecked-dec-int","clojure.core/unchecked-divide-int","clojure.core/unchecked-double","clojure.core/unchecked-float","clojure.core/unchecked-inc","clojure.core/unchecked-inc-int","clojure.core/unchecked-int","clojure.core/unchecked-long","clojure.core/unchecked-multiply","clojure.core/unchecked-multiply-int","clojure.core/unchecked-negate","clojure.core/unchecked-negate-int","clojure.core/unchecked-remainder-int","clojure.core/unchecked-short","clojure.core/unchecked-subtract","clojure.core/unchecked-subtract-int","clojure.core/underive","clojure.core/unreduced","clojure.core/unsigned-bit-shift-right","clojure.core/update","clojure.core/update-in","clojure.core/update-keys","clojure.core/update-proxy","clojure.core/update-vals","clojure.core/uri?","clojure.core/use","clojure.core/uuid?","clojure.core/val","clojure.core/vals","clojure.core/var-get","clojure.core/var-set","clojure.core/var?","clojure.core/vary-meta","clojure.core/vec","clojure.core/vector","clojure.core/vector-of","clojure.core/vector?","clojure.core/volatile!","clojure.core/volatile?","clojure.core/vreset!","clojure.core/with-bindings*","clojure.core/with-meta","clojure.core/with-redefs-fn","clojure.core/xml-seq","clojure.core/zero?","clojure.core/zipmap","coll?","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","dedupe","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-cause","ex-data","ex-info","ex-message","extend","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn?","fnext","fnil","force","format","frequencies","future-call","future-cancel","future-cancelled?","future-done?","future?","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","ifn?","in-ns","inc","inc'","indexed?","infinite?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","isa?","iterate","iteration","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","long","long-array","longs","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","parents","parse-boolean","parse-double","parse-long","parse-uuid","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy-call-with-super","proxy-mappings","proxy-name","push-thread-bindings","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","random-uuid","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read+string","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-tap","remove-watch","repeat","repeatedly","replace","replicate","require","requiring-resolve","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq-to-map-for-destructuring","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","tap>","test","the-ns","thread-bound?","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unreduced","unsigned-bit-shift-right","update","update-in","update-keys","update-proxy","update-vals","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","with-bindings*","with-meta","with-redefs-fn","xml-seq","zero?","zipmap"], + \ 'clojureMacro': ["->","->>","..","amap","and","areduce","as->","assert","binding","bound-fn","clojure.core/->","clojure.core/->>","clojure.core/..","clojure.core/amap","clojure.core/and","clojure.core/areduce","clojure.core/as->","clojure.core/assert","clojure.core/binding","clojure.core/bound-fn","clojure.core/comment","clojure.core/declare","clojure.core/delay","clojure.core/dosync","clojure.core/doto","clojure.core/extend-protocol","clojure.core/extend-type","clojure.core/for","clojure.core/future","clojure.core/gen-class","clojure.core/gen-interface","clojure.core/import","clojure.core/io!","clojure.core/lazy-cat","clojure.core/lazy-seq","clojure.core/locking","clojure.core/memfn","clojure.core/ns","clojure.core/or","clojure.core/proxy","clojure.core/proxy-super","clojure.core/pvalues","clojure.core/refer-clojure","clojure.core/reify","clojure.core/some->","clojure.core/some->>","clojure.core/sync","clojure.core/time","clojure.core/vswap!","clojure.core/with-bindings","clojure.core/with-in-str","clojure.core/with-loading-context","clojure.core/with-local-vars","clojure.core/with-open","clojure.core/with-out-str","clojure.core/with-precision","clojure.core/with-redefs","comment","declare","delay","dosync","doto","extend-protocol","extend-type","for","future","gen-class","gen-interface","import","io!","lazy-cat","lazy-seq","locking","memfn","ns","or","proxy","proxy-super","pvalues","refer-clojure","reify","some->","some->>","sync","time","vswap!","with-bindings","with-in-str","with-loading-context","with-local-vars","with-open","with-out-str","with-precision","with-redefs"], + \ 'clojureRepeat': ["clojure.core/doseq","clojure.core/dotimes","clojure.core/loop","clojure.core/while","doseq","dotimes","loop","loop*","recur","while"], + \ 'clojureSpecial': ["&",".","clojure.core/fn","clojure.core/import*","clojure.core/let","clojure.core/letfn","do","fn","fn*","let","let*","letfn","letfn*","monitor-enter","monitor-exit","new","quote","reify*","set!","var"], + \ 'clojureVariable': ["*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","EMPTY-NODE","Inst","char-escape-string","char-name-string","clojure.core/*1","clojure.core/*2","clojure.core/*3","clojure.core/*agent*","clojure.core/*allow-unresolved-vars*","clojure.core/*assert*","clojure.core/*clojure-version*","clojure.core/*command-line-args*","clojure.core/*compile-files*","clojure.core/*compile-path*","clojure.core/*compiler-options*","clojure.core/*data-readers*","clojure.core/*default-data-reader-fn*","clojure.core/*e","clojure.core/*err*","clojure.core/*file*","clojure.core/*flush-on-newline*","clojure.core/*fn-loader*","clojure.core/*in*","clojure.core/*math-context*","clojure.core/*ns*","clojure.core/*out*","clojure.core/*print-dup*","clojure.core/*print-length*","clojure.core/*print-level*","clojure.core/*print-meta*","clojure.core/*print-namespace-maps*","clojure.core/*print-readably*","clojure.core/*read-eval*","clojure.core/*reader-resolver*","clojure.core/*source-path*","clojure.core/*suppress-read*","clojure.core/*unchecked-math*","clojure.core/*use-context-classloader*","clojure.core/*verbose-defrecords*","clojure.core/*warn-on-reflection*","clojure.core/EMPTY-NODE","clojure.core/Inst","clojure.core/char-escape-string","clojure.core/char-name-string","clojure.core/default-data-readers","clojure.core/primitives-classnames","clojure.core/print-dup","clojure.core/print-method","clojure.core/unquote","clojure.core/unquote-splicing","default-data-readers","primitives-classnames","print-dup","print-method","unquote","unquote-splicing"] + \ } function! s:syntax_keyword(dict) for key in keys(a:dict) @@ -72,40 +72,21 @@ delfunction s:syntax_keyword " * Must not end in a : or / " * Must not have two adjacent colons except at the beginning " * Must not contain any reader metacharacters except for ' and # -syntax match clojureKeyword "\v<:{1,2}%([^ \n\r\t()\[\]{}";@^`~\\%/]+/)*[^ \n\r\t()\[\]{}";@^`~\\%/]+:@" +syntax match clojureKeyword "\v<:{1,2}([^ \n\r\t()\[\]{}";@^`~\\/]+/)*[^ \n\r\t()\[\]{}";@^`~\\/]+:@1" syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=clojureStringEscape,@Spell -syntax match clojureCharacter "\\." -syntax match clojureCharacter "\\o\%([0-3]\o\{2\}\|\o\{1,2\}\)" -syntax match clojureCharacter "\\u\x\{4\}" -syntax match clojureCharacter "\\space" -syntax match clojureCharacter "\\tab" -syntax match clojureCharacter "\\newline" -syntax match clojureCharacter "\\return" -syntax match clojureCharacter "\\backspace" -syntax match clojureCharacter "\\formfeed" - -syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@"' -endfor -unlet! s:radix_chars s:radix - -syntax match clojureNumber "\v<[-+]?%(0\o*|0x\x+|[1-9]\d*)N?>" -syntax match clojureNumber "\v<[-+]?%(0|[1-9]\d*|%(0|[1-9]\d*)\.\d*)%(M|[eE][-+]?\d+)?>" -syntax match clojureNumber "\v<[-+]?%(0|[1-9]\d*)/%(0|[1-9]\d*)>" - -syntax match clojureVarArg "&" - -syntax match clojureQuote "'" -syntax match clojureQuote "`" -syntax match clojureUnquote "\~" -syntax match clojureUnquote "\~@" +syntax match clojureCharacter "\v\\%(o%([0-3]\o{2}|\o{1,2})|u\x{4}|newline|tab|space|return|backspace|formfeed|.)" + +syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@1" + +syntax match clojureQuote "\v['`]" +syntax match clojureUnquote "\v\~\@?" syntax match clojureMeta "\^" syntax match clojureDeref "@" syntax match clojureDispatch "\v#[\^'=<_]?" @@ -118,16 +99,16 @@ syntax region clojureRegexpQuoted start=/\\Q/ms=e+1 skip=/\\\\\|\\"/ end=/\\E/me syntax region clojureRegexpQuote start=/\\Q/ skip=/\\\\\|\\"/ end=/\\E/ end=/"/me=s-1 contains=clojureRegexpQuoted keepend contained " -*- CHARACTER PROPERTY CLASSES -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj -" Java version 1.8.0_92 +" Generated from https://github.com/clojure-vim/clojure.vim/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj +" Java version 18.0.1 syntax match clojureRegexpPosixCharClass "\v\\[pP]\{%(Cntrl|A%(l%(pha|num)|SCII)|Space|Graph|Upper|P%(rint|unct)|Blank|XDigit|Digit|Lower)\}" contained display syntax match clojureRegexpJavaCharClass "\v\\[pP]\{java%(Whitespace|JavaIdentifier%(Part|Start)|SpaceChar|Mirrored|TitleCase|I%(SOControl|de%(ographic|ntifierIgnorable))|D%(efined|igit)|U%(pperCase|nicodeIdentifier%(Part|Start))|L%(etter%(OrDigit)?|owerCase)|Alphabetic)\}" contained display syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\cIs%(l%(owercase|etter)|hex%(digit|_digit)|w%(hite%(_space|space)|ord)|noncharacter%(_code_point|codepoint)|p%(rint|unctuation)|ideographic|graph|a%(l%(num|phabetic)|ssigned)|uppercase|join%(control|_control)|titlecase|blank|digit|control)\}" contained display syntax match clojureRegexpUnicodeCharClass "\v\\[pP][NSCMZPL]" contained display syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{%(Is|gc\=|general_category\=)?%(N[dlo]?|P[dcifeos]?|C[ncfos]?|M[nce]?|Z[lsp]?|S[mcko]?|L[muCDlto]?)\}" contained display -syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(Is|sc\=|script\=)%(l%(epc%(ha)?|y%([dc]i%(an)?)|a%(t%(n|in)|na|oo?)|i%(n%(b|ear_b)|mbu?|su))|p%(rti|lrd|h%(oenician|li|ag%(s_pa)?|nx))|vaii?|d%(srt|e%(seret|va%(nagari)?))|g%(lag%(olitic)?|eor%(gian)?|oth%(ic)?|re%(k|ek)|u%(j%(arati|r)|r%(u|mukhi)))|u%(gar%(itic)?|nknown)|a%(r%(ab%(ic)?|m%([ni]|enian))|v%(st|estan))|e%(thi%(opic)?|gyp%(tian_hieroglyphs)?)|z%(inh|yyy|zzz)|r%(un%(ic|r)|ejang|jng)|s%(inh%(ala)?|h%(rd|a%(vian|rada|w))|a%(ur%(ashtra)?|m%(r|aritan)|rb)|y%(r%(c|iac)|lo%(ti_nagri)?)|und%(anese)?|ora%(_sompeng)?)|i%(n%(scriptional_pa%(rthian|hlavi)|herited)|mperial_aramaic|tal)|b%(eng%(ali)?|a%(t%(ak|k)|li%(nese)?|mum?)|ra%(i%(lle)?|h%(mi)?)|opo%(mofo)?|u%(gi%(nese)?|h%(d|id)))|o%(g%(am|ham)|r%(iya|kh|ya)|sma%(nya)?|l%(d_%(south_arabian|persian|italic|turkic)|ck|_chiki))|k%(h%(m%(r|er)|ar%(oshthi)?)|nda|a%(li|n%(a|nada)|takana|yah_li|ithi)|thi)|m%(a%(nd%(aic)?|layalam)|lym|y%(anmar|mr)|tei|e%(r%(c|o%(itic_%(hieroglyphs|cursive))?)|etei_mayek)|ong%(olian)?|iao)|yi%(ii)?|x%(peo|sux)|n%(ew_tai_lue|koo?)|h%(ira%(gana)?|an%([io]|unoo|g%(ul)?)?|ebr%(ew)?)|c%(y%(priot|r%(l|illic))|a%(km|n%(adian_aboriginal|s)|ri%(an)?)|prt|h%(er%(okee)?|a%(m|kma))|uneiform|o%(pt%(ic)?|mmon))|t%(elu%(gu)?|i%(finagh|b%(t|etan))|ha%(i|a%(na)?)|a%(i_%(le|tham|viet)|g%(alog|b%(anwa)?)|vt|kri?|l[ue]|m%(il|l))|fng|glg)|java%(nese)?)\}" contained display -syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(In|blk\=|block\=)%(javanese|h%(a%(lfwidth%( and fullwidth forms|andfullwidthforms|_and_fullwidth_forms)|n%(unoo|gul%(compatibilityjamo|syllables|jamo%(extended\-[ab])?|_%(syllables|jamo%(_extended_[ab])?|compatibility_jamo)| %(syllables|compatibility jamo|jamo%( extended\-[ab])?))))|i%(ragana|gh%( %(private use surrogates|surrogates)|_%(private_use_surrogates|surrogates)|surrogates|privateusesurrogates))|ebrew)|i%(pa%([ _]extensions|extensions)|deographic%( description characters|_description_characters|descriptioncharacters)|nscriptional%(%([ _]pa%(rthian|hlavi))|pa%(rthian|hlavi))|mperial%(aramaic|[_ ]aramaic))|l%(e%(tterlike%([_ ]symbols|symbols)|pcha)|ow%([_ ]surrogates|surrogates)|i%(mbu|near%(_b_%(ideograms|syllabary)|b%(ideograms|syllabary)| b %(ideograms|syllabary))|su)|a%(tin%(extended%(additional|\-[dacb])| extended%( additional|\-[dacb])|\-1%(supplement| supplement)|_%(extended_%([dcb]|a%(dditional)?)|1_supplement))|o)|y[cd]ian)|b%(u%(ginese|hid)|ra%(hmi|ille%(patterns|[_ ]patterns))|o%(x%([ _]drawing|drawing)|pomofo%([ _]extended|extended)?)|lock%([ _]elements|elements)|yzantine%( musical symbols|musicalsymbols|_musical_symbols)|engali|a%(linese|mum%(supplement|[ _]supplement)?|tak|sic%([ _]latin|latin)))|e%(gyptian%([ _]hieroglyphs|hieroglyphs)|moticons|nclosed%( %(cjk letters and months|ideographic supplement|alphanumeric%( supplement|s))|cjklettersandmonths|_%(ideographic_supplement|alphanumeric%(_supplement|s)|cjk_letters_and_months)|alphanumerics%(upplement)?|ideographicsupplement)|thiopic%(supplement|_%(supplement|extended%(_a)?)| %(supplement|extended%(\-a)?)|extended%(\-a)?)?)|k%(h%(aroshthi|mer%([_ ]symbols|symbols)?)|a%(takana%(_phonetic_extensions|phoneticextensions| phonetic extensions)?|n%(gxi%([_ ]radicals|radicals)|a%(supplement|[ _]supplement)|bun|nada)|ithi|yah%([ _]li|li)))|m%(i%(ao|scellaneous%(technical|symbols%(and%(pictographs|arrows))?|mathematicalsymbols\-[ab]| %(technical|mathematical symbols\-[ab]|symbols%( and %(pictographs|arrows))?)|_%(technical|symbols%(_and_%(pictographs|arrows))?|mathematical_symbols_[ab])))|usical%([_ ]symbols|symbols)|e%(etei%(mayek%(extensions)?|_mayek%(_extensions)?| mayek%( extensions)?)|roitic%(hieroglyphs|%([_ ]%(hieroglyphs|cursive))|cursive))|a%(ndaic|hjong%([ _]tiles|tiles)|layalam|thematical%(alphanumericsymbols| %(alphanumeric symbols|operators)|_%(alphanumeric_symbols|operators)|operators))|yanmar%(extended\-a|_extended_a| extended\-a)?|o%(difier%(_tone_letters| tone letters|toneletters)|ngolian))|r%(u%(nic|mi%(numeralsymbols| numeral symbols|_numeral_symbols))|ejang)|n%(umber%(forms|[ _]forms)|ko|ew%(_tai_lue|tailue| tai lue))|c%(o%(ntrol%(pictures|[ _]pictures)|m%(bining%(diacriticalmarks%(supplement|forsymbols)?|halfmarks| %(diacritical marks%( %(supplement|for symbols))?|half marks|marks for symbols)|marksforsymbols|_%(marks_for_symbols|half_marks|diacritical_marks%(_supplement)?))|mon%(_indic_number_forms|indicnumberforms| indic number forms))|ptic|unting%( rod numerals|_rod_numerals|rodnumerals))|y%(rillic%(extended\-[ab]|_%(extended_[ab]|supplementary)|supplement%(ary)?| %(extended\-[ab]|supplement%(ary)?))?|priot%(syllabary|[ _]syllabary))|u%(rrency%([_ ]symbols|symbols)|neiform%(_numbers_and_punctuation|numbersandpunctuation| numbers and punctuation)?)|h%(a%(m|kma)|erokee)|arian|jk%(s%(ymbolsandpunctuation|trokes)|compatibility%(forms|ideographs%(supplement)?)?|radicalssupplement| %(compatibility%( %(ideographs%( supplement)?|forms))?|radicals supplement|unified ideographs%( extension [dacb])?|s%(ymbols and punctuation|trokes))|_%(s%(trokes|ymbols_and_punctuation)|radicals_supplement|compatibility%(_%(forms|ideographs%(_supplement)?))?|unified_ideographs%(_extension_[dacb])?)|unifiedideographs%(extension[dacb])?))|d%(e%(seret|vanagari%([ _]extended|extended)?)|ingbats|omino%([ _]tiles|tiles))|yi%(syllables|%([_ ]%(syllables|radicals))|radicals|jing%(hexagramsymbols| hexagram symbols|_hexagram_symbols))|s%(mall%( form variants|formvariants|_form_variants)|p%(acing%(_modifier_letters| modifier letters|modifierletters)|ecials)|ora%(sompeng|[ _]sompeng)|ha%(vian|rada)|a%(maritan|urashtra)|inhala|y%(riac|loti%([_ ]nagri|nagri))|u%(ndanese%(supplement|[ _]supplement)?|p%(erscripts%(_and_subscripts|andsubscripts| and subscripts)|plementa%(ry%(_private_use_area_[ab]|privateusearea\-[ab]| private use area\-[ab])|l%(_%(arrows_[ab]|mathematical_operators|punctuation)| %(mathematical operators|punctuation|arrows\-[ab])|mathematicaloperators|punctuation|arrows\-[ab])))|rrogates_area))|p%(h%(o%(enician|netic%( extensions%( supplement)?|extensions%(supplement)?|_extensions%(_supplement)?))|a%(istos%([ _]disc|disc)|gs[_\-]pa))|laying%(cards|[_ ]cards)|rivate%(usearea| use area|_use_area))|o%(smanya|l%([ _]chiki|d%( %(south arabian|persian|italic|turkic)|southarabian|_%(south_arabian|persian|italic|turkic)|persian|italic|turkic)|chiki)|riya|ptical%( character recognition|_character_recognition|characterrecognition)|gham)|g%(u%(jarati|rmukhi)|othic|lagolitic|e%(o%(rgian%(supplement|[ _]supplement)?|metric%(shapes|[ _]shapes))|neral%([_ ]punctuation|punctuation))|reek%( %(and coptic|extended)|andcoptic|_extended|extended)?)|t%(i%(betan|finagh)|elugu|ransport%( and map symbols|_and_map_symbols|andmapsymbols)|a%(mil|kri|i%(xuanjingsymbols|_%(le|xuan_jing_symbols|tham|viet)|le| %(xuan jing symbols|le|tham|viet)|tham|viet)|g%(alog|s|banwa))|ha%(i|ana))|a%(l%(chemical%([_ ]symbols|symbols)|phabetic%( presentation forms|_presentation_forms|presentationforms))|r%(menian|abic%(extended\-a|mathematicalalphabeticsymbols|supplement|_%(presentation_forms_[ab]|supplement|extended_a|mathematical_alphabetic_symbols)| %(extended\-a|mathematical alphabetic symbols|supplement|presentation forms\-[ab])|presentationforms\-[ab])?|rows)|ncient%(_%(greek_%(musical_notation|numbers)|symbols)|greek%(numbers|musicalnotation)| %(greek %(numbers|musical notation)|symbols)|symbols)|egean%(numbers|[ _]numbers)|vestan)|u%(garitic|nified%(canadianaboriginalsyllabics%(extended)?|_canadian_aboriginal_syllabics%(_extended)?| canadian aboriginal syllabics%( extended)?))|v%(a%(i|riation%( selectors%( supplement)?|selectors%(supplement)?|_selectors%(_supplement)?))|e%(rtical%(forms|[ _]forms)|dic%([ _]extensions|extensions))))\}" contained display +syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(Is|sc\=|script\=)%(k%(its|h%(oj%(ki)?|m%(r|er)|itan_small_script|udawadi|ar%(oshthi)?)|a%(li|n%(a|nada)|takana%(_or_hiragana)?|yah_li|ithi)|nda|thi)|r%(ohg|un%(ic|r)|ejang|jng)|l%(epc%(ha)?|i%(mbu?|n%([ab]|ear_[ab])|su)|y%([dc]i%(an)?)|a%(t%(n|in)|na|oo?))|t%(elu%(gu)?|ha%(i|a%(na)?)|i%(finagh|rh%(uta)?|b%(t|etan))|fng|glg|a%(i_%(le|tham|viet)|g%(alog|b%(anwa)?)|vt|kri?|ng%(ut)?|l[ue]|m%(il|l)))|vaii?|y%(i%(ii)?|ezi%(di)?)|e%(thi%(opic)?|l%(ym%(aic)?|ba%(san)?)|gyp%(tian_hieroglyphs)?)|u%(gar%(itic)?|nknown)|h%(ung|ira%(gana)?|rkt|mn[gp]|a%(n%(i%(fi_rohingya)?|unoo|o|g%(ul)?)?|tr%(an)?)|luw|ebr%(ew)?)|g%(r%(e%(k|ek)|an%(tha)?)|lag%(olitic)?|eor%(gian)?|o%(n[mg]|th%(ic)?)|u%(j%(arati|r)|r%(u|mukhi)|njala_gondi))|m%(lym|a%(n%(d%(aic)?|i%(chaean)?)|saram_gondi|h%(ajani|j)|ka%(sar)?|rc%(hen)?|layalam)|o%(di|ng%(olian)?)|e%(r%(c|o%(itic_%(hieroglyphs|cursive))?)|etei_mayek|nd%(e_kikakui)?|d%(f|efaidrin))|roo?|y%(anmar|mr)|tei|iao|ult%(ani)?)|d%(upl%(oyan)?|srt|i%(ak|ves_akuru)|ogra?|e%(seret|va%(nagari)?))|z%(an%(abazar_square|b)|inh|yyy|zzz)|n%(yiakeng_puachue_hmong|bat|koo?|ew%(_tai_lue|a)|ushu|shu|a%(bataean|rb|nd%(inagari)?))|s%(h%(rd|a%(vian|rada|w))|o%(yo%(mbo)?|g%(d%(ian)?|o)|ra%(_sompeng)?)|i%(n%(d|h%(ala)?)|dd%(ham)?|gnwriting)|a%(ur%(ashtra)?|m%(r|aritan)|rb)|y%(r%(c|iac)|lo%(ti_nagri)?)|und%(anese)?|gnw)|w%(cho|a%(ncho|ra%(ng_citi)?))|c%(y%(priot|r%(l|illic))|h%(er%(okee)?|a%(m|kma)|rs|orasmian)|a%(km|ucasian_albanian|n%(adian_aboriginal|s)|ri%(an)?)|prt|uneiform|o%(pt%(ic)?|mmon))|i%(n%(scriptional_pa%(rthian|hlavi)|herited)|mperial_aramaic|tal)|p%(h%(l[ip]|oenician|ag%(s_pa)?|nx)|a%(lm%(yrene)?|u%(_cin_hau|c)|hawh_hmong)|rti|salter_pahlavi|lrd|erm)|x%(peo|sux)|b%(eng%(ali)?|ra%(i%(lle)?|h%(mi)?)|opo%(mofo)?|u%(gi%(nese)?|h%(d|id))|h%(ks|aiksuki)|a%(ss%(a_vah)?|t%(ak|k)|li%(nese)?|mum?))|java%(nese)?|o%(g%(am|ham)|s%(age|ge|ma%(nya)?)|l%(d_%(hungarian|north_arabian|so%(gdian|uth_arabian)|per%(mic|sian)|italic|turkic)|ck|_chiki)|r%(iya|kh|ya))|a%(r%(ab%(ic)?|m%([ni]|enian))|dl%(m|am)|natolian_hieroglyphs|hom|v%(st|estan)|ghb))\}" contained display +syntax match clojureRegexpUnicodeCharClass "\v\\[pP]\{\c%(In|blk\=|block\=)%(zanabazar%([ _]square|square)|javanese|h%(a%(lfwidth%( and fullwidth forms|andfullwidthforms|_and_fullwidth_forms)|tran|n%(unoo|gul%(compatibilityjamo|syllables|jamo%(extended\-[ab])?|_%(syllables|jamo%(_extended_[ab])?|compatibility_jamo)| %(syllables|compatibility jamo|jamo%( extended\-[ab])?))|ifi%([_ ]rohingya|rohingya)))|i%(ragana|gh%( %(private use surrogates|surrogates)|_%(private_use_surrogates|surrogates)|surrogates|privateusesurrogates))|ebrew)|i%(pa%([ _]extensions|extensions)|n%(scriptional%(%([ _]pa%(rthian|hlavi))|pa%(rthian|hlavi))|dic%(siyaqnumbers|_siyaq_numbers| siyaq numbers))|deographic%(symbolsandpunctuation|_%(description_characters|symbols_and_punctuation)| %(description characters|symbols and punctuation)|descriptioncharacters)|mperial%(aramaic|[_ ]aramaic))|c%(o%(ntrol%(pictures|[ _]pictures)|ptic%(epactnumbers|_epact_numbers| epact numbers)?|m%(mon%(_indic_number_forms|indicnumberforms| indic number forms)|bining%(halfmarks|_%(diacritical_marks%(_%(supplement|for_symbols|extended))?|marks_for_symbols|half_marks)| %(half marks|diacritical marks%( %(supplement|for symbols|extended))?|marks for symbols)|diacriticalmarks%(supplement|forsymbols|extended)?|marksforsymbols))|unting%( rod numerals|_rod_numerals|rodnumerals))|a%(rian|ucasian%([ _]albanian|albanian))|jk%(unifiedideographs%(extension[dgacfbe])?|s%(ymbolsandpunctuation|trokes)|_%(s%(trokes|ymbols_and_punctuation)|radicals_supplement|unified_ideographs%(_extension_[dgacfbe])?|compatibility%(_%(forms|ideographs%(_supplement)?))?)|compatibility%(forms|ideographs%(supplement)?)?|radicalssupplement| %(compatibility%( %(ideographs%( supplement)?|forms))?|unified ideographs%( extension [dgacfbe])?|radicals supplement|s%(ymbols and punctuation|trokes)))|y%(rillic%(supplement%(ary)?| %(supplement%(ary)?|extended\-[acb])|extended\-[acb]|_%(extended_[acb]|supplement%(ary)?))?|priot%(syllabary|[ _]syllabary))|u%(rrency%([_ ]symbols|symbols)|neiform%(_numbers_and_punctuation|numbersandpunctuation| numbers and punctuation)?)|h%(e%(ss%([_ ]symbols|symbols)|rokee%(supplement|[ _]supplement)?)|a%(m|kma)|orasmian))|g%(othic|u%(njala%(gondi|[_ ]gondi)|jarati|rmukhi)|lagolitic%(supplement|[ _]supplement)?|e%(o%(rgian%(supplement|%([_ ]%(supplement|extended))|extended)?|metric%( shapes%( extended)?|shapes%(extended)?|_shapes%(_extended)?))|neral%([_ ]punctuation|punctuation))|r%(eek%( %(and coptic|extended)|andcoptic|_%(and_coptic|extended)|extended)?|antha))|s%(h%(orthand%( format controls|_format_controls|formatcontrols)|a%(vian|rada))|u%(ndanese%(supplement|[ _]supplement)?|p%(erscripts%(_and_subscripts|andsubscripts| and subscripts)|plementa%(ry%(_private_use_area_[ab]|privateusearea\-[ab]| private use area\-[ab])|l%( %(mathematical operators|symbols and pictographs|punctuation|arrows\-[acb])|symbolsandpictographs|mathematicaloperators|punctuation|arrows\-[acb]|_%(arrows_[acb]|symbols_and_pictographs|mathematical_operators|punctuation))))|tton%(signwriting|[_ ]signwriting))|i%(nhala%( archaic numbers|archaicnumbers|_archaic_numbers)?|ddham)|y%(loti%([_ ]nagri|nagri)|mbols%( %(for legacy computing|and pictographs extended\-a)|forlegacycomputing|andpictographsextended\-a|_%(and_pictographs_extended_a|for_legacy_computing))|riac%(supplement|[ _]supplement)?)|p%(acing%(_modifier_letters| modifier letters|modifierletters)|ecials)|a%(maritan|urashtra)|o%(yombo|gdian|ra%(sompeng|[ _]sompeng))|mall%(kanaextension| %(kana extension|form variants)|_%(kana_extension|form_variants)|formvariants))|y%(i%(syllables|%([_ ]%(syllables|radicals))|radicals|jing%(hexagramsymbols| hexagram symbols|_hexagram_symbols))|ezidi)|p%(h%(o%(enician|netic%( extensions%( supplement)?|extensions%(supplement)?|_extensions%(_supplement)?))|a%(istos%([ _]disc|disc)|gs[_\-]pa))|laying%(cards|[_ ]cards)|rivate%(usearea| use area|_use_area)|a%(hawh%(hmong|[_ ]hmong)|u%(_cin_hau|cinhau| cin hau)|lmyrene)|salter%(pahlavi|[ _]pahlavi))|e%(l%(basan|ymaic)|arly%(_dynastic_cuneiform|dynasticcuneiform| dynastic cuneiform)|moticons|gyptian%(hieroglyph%(formatcontrols|s)| hieroglyph%( format controls|s)|_hieroglyph%(_format_controls|s))|nclosed%( %(cjk letters and months|ideographic supplement|alphanumeric%( supplement|s))|cjklettersandmonths|_%(ideographic_supplement|alphanumeric%(_supplement|s)|cjk_letters_and_months)|alphanumerics%(upplement)?|ideographicsupplement)|thiopic%(supplement|_%(supplement|extended%(_a)?)| %(supplement|extended%(\-a)?)|extended%(\-a)?)?)|r%(u%(nic|mi%(numeralsymbols| numeral symbols|_numeral_symbols))|ejang)|d%(o%(gra|mino%([ _]tiles|tiles))|e%(seret|vanagari%([ _]extended|extended)?)|uployan|i%(ngbats|ves%([_ ]akuru|akuru)))|m%(e%(defaidrin|nde%([ _]kikakui|kikakui)|etei%(mayek%(extensions)?|_mayek%(_extensions)?| mayek%( extensions)?)|roitic%(hieroglyphs|%([_ ]%(hieroglyphs|cursive))|cursive))|o%(ngolian%(supplement|[ _]supplement)?|di%(fier%(_tone_letters| tone letters|toneletters))?)|ro|u%(ltani|sical%([_ ]symbols|symbols))|i%(ao|scellaneous%(technical|symbols%(and%(pictographs|arrows))?|mathematicalsymbols\-[ab]| %(technical|mathematical symbols\-[ab]|symbols%( and %(pictographs|arrows))?)|_%(technical|symbols%(_and_%(pictographs|arrows))?|mathematical_symbols_[ab])))|yanmar%( extended\-[ab]|extended\-[ab]|_extended_[ab])?|a%(h%(ajani|jong%([ _]tiles|tiles))|rchen|n%(daic|ichaean)|yan%([_ ]numerals|numerals)|saram%(gondi|[_ ]gondi)|layalam|thematical%(alphanumericsymbols| %(alphanumeric symbols|operators)|_%(alphanumeric_symbols|operators)|operators)|kasar))|o%(s%(age|manya)|ttoman%(siyaqnumbers|_siyaq_numbers| siyaq numbers)|r%(namental%([ _]dingbats|dingbats)|iya)|ptical%( character recognition|_character_recognition|characterrecognition)|gham|l%([ _]chiki|d%(hungarian| %(hungarian|so%(uth arabian|gdian)|per%(mic|sian)|north arabian|italic|turkic)|per%(mic|sian)|so%(utharabian|gdian)|italic|turkic|_%(hungarian|north_arabian|so%(gdian|uth_arabian)|per%(mic|sian)|italic|turkic)|northarabian)|chiki))|n%(ew%(_tai_lue|a|tailue| tai lue)|ko|yiakeng%( puachue hmong|puachuehmong|_puachue_hmong)|a%(bataean|ndinagari)|u%(shu|mber%(forms|[ _]forms)))|b%(u%(ginese|hid)|a%(s%(sa%([ _]vah|vah)|ic%([ _]latin|latin))|linese|mum%(supplement|[ _]supplement)?|tak)|ra%(hmi|ille%(patterns|[_ ]patterns))|o%(x%([ _]drawing|drawing)|pomofo%([ _]extended|extended)?)|lock%([ _]elements|elements)|haiksuki|yzantine%( musical symbols|musicalsymbols|_musical_symbols)|engali)|l%(i%(mbu|near%(a| %(a|b %(ideograms|syllabary))|b%(ideograms|syllabary)|_%(a|b_%(ideograms|syllabary)))|su%(supplement|[ _]supplement)?)|a%(tin%(extended%(\-[dacbe]|additional)|_%(extended_%([dcbe]|a%(dditional)?)|1_supplement)|\-1%(supplement| supplement)| extended%(\-[dacbe]| additional))|o)|e%(tterlike%([_ ]symbols|symbols)|pcha)|ow%([_ ]surrogates|surrogates)|y[cd]ian)|k%(h%(aroshthi|ojki|mer%([_ ]symbols|symbols)?|udawadi|itan%( small script|smallscript|_small_script))|a%(takana%(_phonetic_extensions|phoneticextensions| phonetic extensions)?|n%(gxi%([_ ]radicals|radicals)|a%(extended\-a|supplement| %(extended\-a|supplement)|_%(supplement|extended_a))|bun|nada)|ithi|yah%([ _]li|li)))|wa%(ncho|rang%(citi|[ _]citi))|t%(elugu|ransport%( and map symbols|_and_map_symbols|andmapsymbols)|i%(rhuta|betan|finagh)|a%(mil%(supplement|[ _]supplement)?|kri|ngut%(supplement|%([ _]%(supplement|components))|components)?|i%(xuanjingsymbols|_%(le|xuan_jing_symbols|tham|viet)|le| %(xuan jing symbols|le|tham|viet)|tham|viet)|g%(alog|s|banwa))|ha%(i|ana))|a%(l%(chemical%([_ ]symbols|symbols)|phabetic%( presentation forms|_presentation_forms|presentationforms))|n%(cient%(_%(greek_%(musical_notation|numbers)|symbols)|greek%(numbers|musicalnotation)| %(greek %(numbers|musical notation)|symbols)|symbols)|atolian%([ _]hieroglyphs|hieroglyphs))|dlam|r%(menian|abic%(extended\-a|mathematicalalphabeticsymbols|supplement|_%(presentation_forms_[ab]|supplement|extended_a|mathematical_alphabetic_symbols)| %(extended\-a|mathematical alphabetic symbols|supplement|presentation forms\-[ab])|presentationforms\-[ab])?|rows)|egean%(numbers|[ _]numbers)|vestan|hom)|u%(garitic|nified%(canadianaboriginalsyllabics%(extended)?|_canadian_aboriginal_syllabics%(_extended)?| canadian aboriginal syllabics%( extended)?))|v%(a%(i|riation%( selectors%( supplement)?|selectors%(supplement)?|_selectors%(_supplement)?))|e%(rtical%(forms|[ _]forms)|dic%([ _]extensions|extensions))))\}" contained display syntax match clojureRegexpPredefinedCharClass "\v%(\\[dDsSwW]|\.)" contained display syntax cluster clojureRegexpCharPropertyClasses contains=clojureRegexpPosixCharClass,clojureRegexpJavaCharClass,clojureRegexpUnicodeCharClass @@ -138,26 +119,40 @@ syntax match clojureRegexpBoundary "[$^]" contained display syntax match clojureRegexpQuantifier "[?*+][?+]\=" contained display syntax match clojureRegexpQuantifier "\v\{\d+%(,|,\d+)?}\??" contained display syntax match clojureRegexpOr "|" contained display -syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[a-zA-z]+\>)" contained display +syntax match clojureRegexpBackRef "\v\\%([1-9]\d*|k\<[[:alpha:]]+\>)" contained display " Mode modifiers, mode-modified spans, lookaround, regular and atomic " grouping, and named-capturing. syntax match clojureRegexpMod "\v\(@<=\?:" contained display syntax match clojureRegexpMod "\v\(@<=\?[xdsmiuU]*-?[xdsmiuU]+:?" contained display syntax match clojureRegexpMod "\v\(@<=\?%(\)" contained display -syntax match clojureRegexpMod "\v\(@<=\?\<[a-zA-Z]+\>" contained display +syntax match clojureRegexpMod "\v\(@<=\?\<[[:alpha:]]+\>" contained display syntax region clojureRegexpGroup start="(" skip=/\\\\\|\\)/ end=")" matchgroup=clojureRegexpGroup contained contains=clojureRegexpMod,clojureRegexpQuantifier,clojureRegexpBoundary,clojureRegexpEscape,@clojureRegexpCharClasses -syntax region clojureRegexp start=/\#"/ skip=/\\\\\|\\"/ end=/"/ contains=@clojureRegexpCharClasses,clojureRegexpEscape,clojureRegexpQuote,clojureRegexpBoundary,clojureRegexpQuantifier,clojureRegexpOr,clojureRegexpBackRef,clojureRegexpGroup keepend +syntax region clojureRegexp matchgroup=clojureRegexpDelimiter start=/\#"/ skip=/\\\\\|\\"/ end=/"/ contains=@clojureRegexpCharClasses,clojureRegexpEscape,clojureRegexpQuote,clojureRegexpBoundary,clojureRegexpQuantifier,clojureRegexpOr,clojureRegexpBackRef,clojureRegexpGroup keepend -syntax keyword clojureCommentTodo contained FIXME XXX TODO FIXME: XXX: TODO: +syntax keyword clojureCommentTodo contained FIXME XXX TODO BUG NOTE HACK FIXME: XXX: TODO: BUG: NOTE: HACK: syntax match clojureComment ";.*$" contains=clojureCommentTodo,@Spell syntax match clojureComment "#!.*$" +syntax match clojureComment "," + +" Comment out discarded forms. +if exists('g:clojure_discard_macro') && g:clojure_discard_macro + syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*/ end=/[, \t\n()\[\]{}";]/me=e-1 + syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*"/ skip=/\\[\\"]/ end=/"/ + syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*(/ end=/)/ contains=clojureDiscardForm + syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*\[/ end=/\]/ contains=clojureDiscardForm + syntax region clojureDiscard matchgroup=clojureDiscard start=/#_[ ,\t\n`'~]*{/ end=/}/ contains=clojureDiscardForm + + syntax region clojureDiscardForm start="(" end=")" contained contains=clojureDiscardForm + syntax region clojureDiscardForm start="{" end="}" contained contains=clojureDiscardForm + syntax region clojureDiscardForm start="\[" end="\]" contained contains=clojureDiscardForm +endif " -*- TOP CLUSTER -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj -syntax cluster clojureTop contains=@Spell,clojureAnonArg,clojureBoolean,clojureCharacter,clojureComment,clojureCond,clojureConstant,clojureDefine,clojureDeref,clojureDispatch,clojureError,clojureException,clojureFunc,clojureKeyword,clojureMacro,clojureMap,clojureMeta,clojureNumber,clojureQuote,clojureRegexp,clojureRepeat,clojureSexp,clojureSpecial,clojureString,clojureSymbol,clojureUnquote,clojureVarArg,clojureVariable,clojureVector +" Generated from https://github.com/clojure-vim/clojure.vim/blob/%%RELEASE_TAG%%/clj/src/vim_clojure_static/generate.clj +syntax cluster clojureTop contains=@Spell,clojureAnonArg,clojureBoolean,clojureCharacter,clojureComment,clojureCond,clojureConstant,clojureDefine,clojureDeref,clojureDiscard,clojureDispatch,clojureError,clojureException,clojureFunc,clojureKeyword,clojureMacro,clojureMap,clojureMeta,clojureNumber,clojureQuote,clojureRegexp,clojureRepeat,clojureSexp,clojureSpecial,clojureString,clojureSymbol,clojureUnquote,clojureVariable,clojureVector syntax region clojureSexp matchgroup=clojureParen start="(" end=")" contains=@clojureTop fold syntax region clojureVector matchgroup=clojureParen start="\[" end="]" contains=@clojureTop fold @@ -178,6 +173,7 @@ highlight default link clojureStringDelimiter String highlight default link clojureStringEscape Character highlight default link clojureRegexp Constant +highlight default link clojureRegexpDelimiter Constant highlight default link clojureRegexpEscape Character highlight default link clojureRegexpCharClass SpecialChar highlight default link clojureRegexpPosixCharClass clojureRegexpCharClass @@ -202,7 +198,6 @@ highlight default link clojureMacro Macro highlight default link clojureRepeat Repeat highlight default link clojureSpecial Special -highlight default link clojureVarArg Special highlight default link clojureQuote SpecialChar highlight default link clojureUnquote SpecialChar highlight default link clojureMeta SpecialChar @@ -212,6 +207,8 @@ highlight default link clojureDispatch SpecialChar highlight default link clojureComment Comment highlight default link clojureCommentTodo Todo +highlight default link clojureDiscard clojureComment +highlight default link clojureDiscardForm clojureDiscard highlight default link clojureError Error @@ -223,5 +220,3 @@ let &cpo = s:cpo_sav unlet! s:cpo_sav " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/syntax/cmake.vim b/syntax/cmake.vim index a7c929536..28a7aed14 100644 --- a/syntax/cmake.vim +++ b/syntax/cmake.vim @@ -1,15 +1,17 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cmake', 'syntax/cmake.vim') + finish +endif " Vim syntax file " Program: CMake - Cross-Platform Makefile Generator -" Version: cmake version 3.16.20191028-g0e4190b +" Version: cmake version 3.19.20201028-gdab947f " Language: CMake " Author: Andy Cedilnik , " Nicholas Hutchinson , " Patrick Boettcher " Maintainer: Dimitri Merejkowsky " Former Maintainer: Karthik Krishnan -" Last Change: 2019 oct. 29 +" Last Change: 2020 oct. 28 " " Licence: The CMake license applies to this file. See " https://cmake.org/licensing @@ -46,7 +48,9 @@ syn keyword cmakeProperty contained \ ADDITIONAL_CLEAN_FILES \ ADDITIONAL_MAKE_CLEAN_FILES \ ADVANCED + \ AIX_EXPORT_ALL_SYMBOLS \ ALIASED_TARGET + \ ALIAS_GLOBAL \ ALLOW_DUPLICATE_CUSTOM_TARGETS \ ANDROID_ANT_ADDITIONAL_OPTIONS \ ANDROID_API @@ -103,6 +107,7 @@ syn keyword cmakeProperty contained \ CACHE_VARIABLES \ CLEAN_NO_CUSTOM \ CMAKE_CONFIGURE_DEPENDS + \ CMAKE_CUDA_KNOWN_FEATURES \ CMAKE_CXX_KNOWN_FEATURES \ CMAKE_C_KNOWN_FEATURES \ CMAKE_ROLE @@ -125,9 +130,11 @@ syn keyword cmakeProperty contained \ CPACK_START_MENU_SHORTCUTS \ CPACK_WIX_ACL \ CROSSCOMPILING_EMULATOR + \ CUDA_ARCHITECTURES \ CUDA_EXTENSIONS \ CUDA_PTX_COMPILATION \ CUDA_RESOLVE_DEVICE_SYMBOLS + \ CUDA_RUNTIME_LIBRARY \ CUDA_SEPARABLE_COMPILATION \ CUDA_STANDARD \ CUDA_STANDARD_REQUIRED @@ -144,9 +151,11 @@ syn keyword cmakeProperty contained \ DEPENDS \ DEPLOYMENT_ADDITIONAL_FILES \ DEPLOYMENT_REMOTE_DIRECTORY + \ DEPRECATION \ DISABLED \ DISABLED_FEATURES \ DISABLE_PRECOMPILE_HEADERS + \ DOTNET_TARGET_FRAMEWORK \ DOTNET_TARGET_FRAMEWORK_VERSION \ ECLIPSE_EXTRA_CPROJECT_CONTENTS \ ECLIPSE_EXTRA_NATURES @@ -173,6 +182,7 @@ syn keyword cmakeProperty contained \ FRAMEWORK_VERSION \ Fortran_FORMAT \ Fortran_MODULE_DIRECTORY + \ Fortran_PREPROCESS \ GENERATED \ GENERATOR_FILE_NAME \ GENERATOR_IS_MULTI_CONFIG @@ -223,9 +233,12 @@ syn keyword cmakeProperty contained \ INTERPROCEDURAL_OPTIMIZATION \ IN_TRY_COMPILE \ IOS_INSTALL_COMBINED + \ ISPC_HEADER_DIRECTORY + \ ISPC_INSTRUCTION_SETS \ JOB_POOLS \ JOB_POOL_COMPILE \ JOB_POOL_LINK + \ JOB_POOL_PRECOMPILE_HEADER \ KEEP_EXTENSION \ LABELS \ LANGUAGE @@ -245,6 +258,8 @@ syn keyword cmakeProperty contained \ LINK_WHAT_YOU_USE \ LISTFILE_STACK \ LOCATION + \ MACHO_COMPATIBILITY_VERSION + \ MACHO_CURRENT_VERSION \ MACOSX_BUNDLE \ MACOSX_BUNDLE_INFO_PLIST \ MACOSX_FRAMEWORK_INFO_PLIST @@ -258,14 +273,23 @@ syn keyword cmakeProperty contained \ NAME \ NO_SONAME \ NO_SYSTEM_FROM_IMPORTED + \ OBJCXX_EXTENSIONS + \ OBJCXX_STANDARD + \ OBJCXX_STANDARD_REQUIRED + \ OBJC_EXTENSIONS + \ OBJC_STANDARD + \ OBJC_STANDARD_REQUIRED \ OBJECT_DEPENDS \ OBJECT_OUTPUTS + \ OPTIMIZE_DEPENDENCIES \ OSX_ARCHITECTURES \ OUTPUT_NAME \ PACKAGES_FOUND \ PACKAGES_NOT_FOUND \ PARENT_DIRECTORY \ PASS_REGULAR_EXPRESSION + \ PCH_INSTANTIATE_TEMPLATES + \ PCH_WARN_INVALID \ PDB_NAME \ PDB_OUTPUT_DIRECTORY \ POSITION_INDEPENDENT_CODE @@ -276,7 +300,6 @@ syn keyword cmakeProperty contained \ PREFIX \ PRE_INSTALL_SCRIPT \ PRIVATE_HEADER - \ PROCESSES \ PROCESSORS \ PROCESSOR_AFFINITY \ PROJECT_LABEL @@ -284,6 +307,7 @@ syn keyword cmakeProperty contained \ REPORT_UNDEFINED_PROPERTIES \ REQUIRED_FILES \ RESOURCE + \ RESOURCE_GROUPS \ RESOURCE_LOCK \ RULE_LAUNCH_COMPILE \ RULE_LAUNCH_CUSTOM @@ -328,6 +352,8 @@ syn keyword cmakeProperty contained \ UNITY_BUILD_BATCH_SIZE \ UNITY_BUILD_CODE_AFTER_INCLUDE \ UNITY_BUILD_CODE_BEFORE_INCLUDE + \ UNITY_BUILD_MODE + \ UNITY_GROUP \ USE_FOLDERS \ VALUE \ VARIABLES @@ -358,6 +384,7 @@ syn keyword cmakeProperty contained \ VS_MOBILE_EXTENSIONS_VERSION \ VS_NO_SOLUTION_DEPLOY \ VS_PACKAGE_REFERENCES + \ VS_PLATFORM_TOOLSET \ VS_PROJECT_IMPORT \ VS_RESOURCE_GENERATOR \ VS_SCC_AUXPATH @@ -365,6 +392,7 @@ syn keyword cmakeProperty contained \ VS_SCC_PROJECTNAME \ VS_SCC_PROVIDER \ VS_SDK_REFERENCES + \ VS_SETTINGS \ VS_SHADER_DISABLE_OPTIMIZATIONS \ VS_SHADER_ENABLE_DEBUG \ VS_SHADER_ENTRYPOINT @@ -374,6 +402,7 @@ syn keyword cmakeProperty contained \ VS_SHADER_OUTPUT_HEADER_FILE \ VS_SHADER_TYPE \ VS_SHADER_VARIABLE_NAME + \ VS_SOLUTION_DEPLOY \ VS_STARTUP_PROJECT \ VS_TOOL_OVERRIDE \ VS_USER_PROPS @@ -392,6 +421,7 @@ syn keyword cmakeProperty contained \ XCODE_FILE_ATTRIBUTES \ XCODE_GENERATE_SCHEME \ XCODE_LAST_KNOWN_FILE_TYPE + \ XCODE_LINK_BUILD_PHASE_MODE \ XCODE_PRODUCT_TYPE \ XCODE_SCHEME_ADDRESS_SANITIZER \ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN @@ -412,6 +442,7 @@ syn keyword cmakeProperty contained \ XCODE_SCHEME_THREAD_SANITIZER_STOP \ XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER \ XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP + \ XCODE_SCHEME_WORKING_DIRECTORY \ XCODE_SCHEME_ZOMBIE_OBJECTS \ XCTEST @@ -422,6 +453,7 @@ syn keyword cmakeVariable contained \ BUILD_SHARED_LIBS \ CACHE \ CMAKE_ABSOLUTE_DESTINATION_FILES + \ CMAKE_AIX_EXPORT_ALL_SYMBOLS \ CMAKE_ANDROID_ANT_ADDITIONAL_OPTIONS \ CMAKE_ANDROID_API \ CMAKE_ANDROID_API_MIN @@ -667,6 +699,7 @@ syn keyword cmakeVariable contained \ CMAKE_CACHE_MINOR_VERSION \ CMAKE_CACHE_PATCH_VERSION \ CMAKE_CFG_INTDIR + \ CMAKE_CLANG_VFS_OVERLAY \ CMAKE_CL_64 \ CMAKE_CODEBLOCKS_COMPILER_ID \ CMAKE_CODEBLOCKS_EXCLUDE_EXTERNAL_FILES @@ -682,6 +715,7 @@ syn keyword cmakeVariable contained \ CMAKE_CPACK_COMMAND \ CMAKE_CROSSCOMPILING \ CMAKE_CROSSCOMPILING_EMULATOR + \ CMAKE_CROSS_CONFIGS \ CMAKE_CSharp \ CMAKE_CSharp_ANDROID_TOOLCHAIN_MACHINE \ CMAKE_CSharp_ANDROID_TOOLCHAIN_PREFIX @@ -744,11 +778,13 @@ syn keyword cmakeVariable contained \ CMAKE_CSharp_STANDARD_INCLUDE_DIRECTORIES \ CMAKE_CSharp_STANDARD_LIBRARIES \ CMAKE_CSharp_VISIBILITY_PRESET + \ CMAKE_CTEST_ARGUMENTS \ CMAKE_CTEST_COMMAND \ CMAKE_CUDA \ CMAKE_CUDA_ANDROID_TOOLCHAIN_MACHINE \ CMAKE_CUDA_ANDROID_TOOLCHAIN_PREFIX \ CMAKE_CUDA_ANDROID_TOOLCHAIN_SUFFIX + \ CMAKE_CUDA_ARCHITECTURES \ CMAKE_CUDA_ARCHIVE_APPEND \ CMAKE_CUDA_ARCHIVE_CREATE \ CMAKE_CUDA_ARCHIVE_FINISH @@ -766,6 +802,7 @@ syn keyword cmakeVariable contained \ CMAKE_CUDA_COMPILER_TARGET \ CMAKE_CUDA_COMPILER_VERSION \ CMAKE_CUDA_COMPILER_VERSION_INTERNAL + \ CMAKE_CUDA_COMPILE_FEATURES \ CMAKE_CUDA_COMPILE_OBJECT \ CMAKE_CUDA_CPPCHECK \ CMAKE_CUDA_CPPLINT @@ -803,6 +840,7 @@ syn keyword cmakeVariable contained \ CMAKE_CUDA_OUTPUT_EXTENSION \ CMAKE_CUDA_PLATFORM_ID \ CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS + \ CMAKE_CUDA_RUNTIME_LIBRARY \ CMAKE_CUDA_SEPARABLE_COMPILATION \ CMAKE_CUDA_SIMULATE_ID \ CMAKE_CUDA_SIMULATE_VERSION @@ -815,6 +853,10 @@ syn keyword cmakeVariable contained \ CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES \ CMAKE_CUDA_VISIBILITY_PRESET \ CMAKE_CURRENT_BINARY_DIR + \ CMAKE_CURRENT_FUNCTION + \ CMAKE_CURRENT_FUNCTION_LIST_DIR + \ CMAKE_CURRENT_FUNCTION_LIST_FILE + \ CMAKE_CURRENT_FUNCTION_LIST_LINE \ CMAKE_CURRENT_LIST_DIR \ CMAKE_CURRENT_LIST_FILE \ CMAKE_CURRENT_LIST_LINE @@ -952,10 +994,13 @@ syn keyword cmakeVariable contained \ CMAKE_C_VISIBILITY_PRESET \ CMAKE_DEBUG_POSTFIX \ CMAKE_DEBUG_TARGET_PROPERTIES + \ CMAKE_DEFAULT_BUILD_TYPE + \ CMAKE_DEFAULT_CONFIGS \ CMAKE_DEPENDS_IN_PROJECT_ONLY \ CMAKE_DIRECTORY_LABELS \ CMAKE_DISABLE_PRECOMPILE_HEADERS \ CMAKE_DL_LIBS + \ CMAKE_DOTNET_TARGET_FRAMEWORK \ CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION \ CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES \ CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT @@ -976,6 +1021,7 @@ syn keyword cmakeVariable contained \ CMAKE_EXTRA_GENERATOR \ CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES \ CMAKE_FIND_APPBUNDLE + \ CMAKE_FIND_DEBUG_MODE \ CMAKE_FIND_FRAMEWORK \ CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX \ CMAKE_FIND_LIBRARY_PREFIXES @@ -1000,6 +1046,7 @@ syn keyword cmakeVariable contained \ CMAKE_FIND_USE_PACKAGE_REGISTRY \ CMAKE_FIND_USE_PACKAGE_ROOT_PATH \ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH + \ CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY \ CMAKE_FOLDER \ CMAKE_FRAMEWORK \ CMAKE_FRAMEWORK_PATH @@ -1063,6 +1110,7 @@ syn keyword cmakeVariable contained \ CMAKE_Fortran_MODULE_DIRECTORY \ CMAKE_Fortran_OUTPUT_EXTENSION \ CMAKE_Fortran_PLATFORM_ID + \ CMAKE_Fortran_PREPROCESS \ CMAKE_Fortran_SIMULATE_ID \ CMAKE_Fortran_SIMULATE_VERSION \ CMAKE_Fortran_SIZEOF_DATA_PTR @@ -1109,9 +1157,12 @@ syn keyword cmakeVariable contained \ CMAKE_INTERNAL_PLATFORM_ABI \ CMAKE_INTERPROCEDURAL_OPTIMIZATION \ CMAKE_IOS_INSTALL_COMBINED + \ CMAKE_ISPC_HEADER_DIRECTORY + \ CMAKE_ISPC_INSTRUCTION_SETS \ CMAKE_JOB_POOLS \ CMAKE_JOB_POOL_COMPILE \ CMAKE_JOB_POOL_LINK + \ CMAKE_JOB_POOL_PRECOMPILE_HEADER \ CMAKE_Java \ CMAKE_Java_ANDROID_TOOLCHAIN_MACHINE \ CMAKE_Java_ANDROID_TOOLCHAIN_PREFIX @@ -1213,12 +1264,21 @@ syn keyword cmakeVariable contained \ CMAKE_NOT_USING_CONFIG_FLAGS \ CMAKE_NO_BUILTIN_CHRPATH \ CMAKE_NO_SYSTEM_FROM_IMPORTED + \ CMAKE_OBJCXX_EXTENSIONS + \ CMAKE_OBJCXX_STANDARD + \ CMAKE_OBJCXX_STANDARD_REQUIRED + \ CMAKE_OBJC_EXTENSIONS + \ CMAKE_OBJC_STANDARD + \ CMAKE_OBJC_STANDARD_REQUIRED \ CMAKE_OBJECT_PATH_MAX + \ CMAKE_OPTIMIZE_DEPENDENCIES \ CMAKE_OSX_ARCHITECTURES \ CMAKE_OSX_DEPLOYMENT_TARGET \ CMAKE_OSX_SYSROOT \ CMAKE_PARENT_LIST_FILE \ CMAKE_PATCH_VERSION + \ CMAKE_PCH_INSTANTIATE_TEMPLATES + \ CMAKE_PCH_WARN_INVALID \ CMAKE_PDB_OUTPUT_DIRECTORY \ CMAKE_POSITION_INDEPENDENT_CODE \ CMAKE_PREFIX_PATH @@ -1446,13 +1506,16 @@ syn keyword cmakeVariable contained \ CMAKE_VS_SDK_REFERENCE_DIRECTORIES \ CMAKE_VS_SDK_SOURCE_DIRECTORIES \ CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION + \ CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION_MAXIMUM \ CMAKE_VS_WINRT_BY_DEFAULT \ CMAKE_WARN_DEPRECATED \ CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION \ CMAKE_WIN32_EXECUTABLE \ CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS + \ CMAKE_XCODE_BUILD_SYSTEM \ CMAKE_XCODE_GENERATE_SCHEME \ CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY + \ CMAKE_XCODE_LINK_BUILD_PHASE_MODE \ CMAKE_XCODE_PLATFORM_TOOLSET \ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER \ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN @@ -1470,6 +1533,7 @@ syn keyword cmakeVariable contained \ CMAKE_XCODE_SCHEME_THREAD_SANITIZER_STOP \ CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER \ CMAKE_XCODE_SCHEME_UNDEFINED_BEHAVIOUR_SANITIZER_STOP + \ CMAKE_XCODE_SCHEME_WORKING_DIRECTORY \ CMAKE_XCODE_SCHEME_ZOMBIE_OBJECTS \ CPACK_ABSOLUTE_DESTINATION_FILES \ CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY @@ -1535,6 +1599,7 @@ syn keyword cmakeVariable contained \ CTEST_P4_COMMAND \ CTEST_P4_OPTIONS \ CTEST_P4_UPDATE_OPTIONS + \ CTEST_RESOURCE_SPEC_FILE \ CTEST_RUN_CURRENT_SCRIPT \ CTEST_SCP_COMMAND \ CTEST_SITE @@ -1877,9 +1942,11 @@ syn keyword cmakeKWExternalProject contained \ BUILD_BYPRODUCTS \ BUILD_COMMAND \ BUILD_IN_SOURCE + \ CHECKOUT \ CMAKE_ARGS \ CMAKE_CACHE_ARGS \ CMAKE_CACHE_DEFAULT_ARGS + \ CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY \ CMAKE_TLS_CAINFO \ CMAKE_TLS_VERIFY \ COMMENT @@ -1904,14 +1971,17 @@ syn keyword cmakeKWExternalProject contained \ EP_STEP_TARGETS \ EP_UPDATE_DISCONNECTED \ EXCLUDE_FROM_ALL + \ FALSE \ FORCE \ GHS \ GIT_CONFIG \ GIT_PROGRESS \ GIT_REMOTE_NAME + \ GIT_REMOTE_UPDATE_STRATEGY \ GIT_REPOSITORY \ GIT_SHALLOW \ GIT_SUBMODULES + \ GIT_SUBMODULES_RECURSE \ GIT_TAG \ HG_REPOSITORY \ HG_TAG @@ -1919,6 +1989,7 @@ syn keyword cmakeKWExternalProject contained \ HTTP_PASSWORD \ HTTP_USERNAME \ IGNORED + \ INACTIVITY_TIMEOUT \ INDEPENDENT_STEP_TARGETS \ INSTALL_COMMAND \ INSTALL_DIR @@ -1945,6 +2016,8 @@ syn keyword cmakeKWExternalProject contained \ PATCH_COMMAND \ PREFIX \ PROPERTY + \ REBASE + \ REBASE_CHECKOUT \ REQUIRED \ SOURCE_DIR \ SOURCE_SUBDIR @@ -2013,7 +2086,10 @@ syn keyword cmakeKWadd_custom_command contained \ PRE_LINK \ SYMBOLIC \ TARGET_FILE + \ TARGET_LINKER_FILE + \ TARGET_PDB_FILE \ TARGET_PROPERTY + \ TARGET_SONAME_FILE \ USES_TERMINAL \ VERBATIM \ WORKING_DIRECTORY @@ -2035,7 +2111,10 @@ syn keyword cmakeKWadd_custom_target contained \ PATH \ SOURCES \ TARGET_FILE + \ TARGET_LINKER_FILE + \ TARGET_PDB_FILE \ TARGET_PROPERTY + \ TARGET_SONAME_FILE \ USES_TERMINAL \ VERBATIM \ WORKING_DIRECTORY @@ -2049,6 +2128,7 @@ syn keyword cmakeKWadd_dependencies contained syn keyword cmakeKWadd_executable contained \ ALIAS + \ ALIAS_GLOBAL \ CONFIG \ EXCLUDE_FROM_ALL \ GLOBAL @@ -2064,6 +2144,7 @@ syn keyword cmakeKWadd_executable contained syn keyword cmakeKWadd_library contained \ ALIAS + \ ALIAS_GLOBAL \ ARCHIVE_OUTPUT_DIRECTORY \ CLI \ CONFIG @@ -2074,11 +2155,15 @@ syn keyword cmakeKWadd_library contained \ HEADER_FILE_ONLY \ IMPORTED \ IMPORTED_ + \ IMPORTED_IMPLIB + \ IMPORTED_IMPLIB_ \ IMPORTED_LOCATION \ IMPORTED_LOCATION_ \ IMPORTED_OBJECTS \ IMPORTED_OBJECTS_ + \ INTERFACE \ INTERFACE_ + \ INTERFACE_SOURCES \ LIBRARY_OUTPUT_DIRECTORY \ MODULE \ OBJECT @@ -2088,17 +2173,23 @@ syn keyword cmakeKWadd_library contained \ POST_BUILD \ PRE_BUILD \ PRE_LINK - \ PUBLIC_HEADER + \ PRIVATE + \ PUBLIC \ RUNTIME_OUTPUT_DIRECTORY \ SHARED + \ SOURCES \ STATIC \ TARGET_OBJECTS \ UNKNOWN syn keyword cmakeKWadd_link_options contained \ CMAKE_ + \ CUDA_RESOLVE_DEVICE_SYMBOLS + \ CUDA_SEPARABLE_COMPILATION + \ DEVICE_LINK \ GCC \ GNU + \ HOST_LINK \ LANG \ LINKER \ LINK_OPTIONS @@ -2156,6 +2247,23 @@ syn keyword cmakeKWcmake_host_system_information contained \ TOTAL_PHYSICAL_MEMORY \ TOTAL_VIRTUAL_MEMORY +syn keyword cmakeKWcmake_language contained + \ AND + \ CALL + \ CANCEL_CALL + \ CODE + \ DEFER + \ DIRECTORY + \ EVAL + \ FALSE + \ GET_CALL_IDS + \ ID + \ ID_VAR + \ OR + \ STATUS + \ TRUE + \ WRITE + syn keyword cmakeKWcmake_minimum_required contained \ FATAL_ERROR \ VERSION @@ -2185,6 +2293,72 @@ syn keyword cmakeKWcmake_parse_arguments contained \ _KEYWORDS_MISSING_VALUES \ _UNPARSED_ARGUMENTS +syn keyword cmakeKWcmake_path contained + \ ABSOLUTE_PATH + \ AND + \ APPEND + \ BASE_DIRECTORY + \ CMAKE_PATH + \ COMPARE + \ CONCAT + \ CONVERT + \ ELSEIF + \ ENDIF + \ EXTENSION + \ EXTENSION_DEF + \ FALSE + \ FILENAME_DEF + \ GET + \ GET_EXTENSION + \ GET_FILENAME + \ GET_PARENT_PATH + \ GET_RELATIVE_PATH + \ GET_ROOT_DIRECTORY + \ GET_ROOT_NAME + \ GET_ROOT_PATH + \ GET_STEM + \ HASH + \ HAS_EXTENSION + \ HAS_FILENAME + \ HAS_PARENT_PATH + \ HAS_RELATIVE_PATH + \ HAS_ROOT_DIRECTORY + \ HAS_ROOT_NAME + \ HAS_ROOT_PATH + \ HAS_STEM + \ IF + \ IS_ABSOLUTE + \ IS_PREFIX + \ IS_RELATIVE + \ LAST_ONLY + \ MATCHES + \ NATIVE_PATH + \ NORMALIZE + \ NORMAL_PATH + \ NOT + \ NOT_EQUAL + \ OP + \ OS + \ OUTPUT_VARIABLE + \ PARENT_PATH + \ PROXIMATE_PATH + \ REAL_PATH + \ RELATIVE_PATH + \ REMOVE_EXTENSION + \ REMOVE_FILENAME + \ REPLACE_EXTENSION + \ REPLACE_FILENAME + \ RETURN + \ ROOT_DIRECTORY + \ ROOT_NAME + \ ROOT_PATH + \ STEM + \ STREQUAL + \ TO_CMAKE_PATH_LIST + \ TO_NATIVE_PATH_LIST + \ TRUE + \ XOR + syn keyword cmakeKWcmake_policy contained \ CMAKE_POLICY_DEFAULT_CMP \ CMP @@ -2202,10 +2376,13 @@ syn keyword cmakeKWconfigure_file contained \ CRLF \ DOS \ ESCAPE_QUOTES + \ FILE_PERMISSIONS \ FOO_ENABLE \ FOO_STRING \ LF \ NEWLINE_STYLE + \ NO_SOURCE_PERMISSIONS + \ USE_SOURCE_PERMISSIONS \ VAR syn keyword cmakeKWcreate_test_sourcelist contained @@ -2298,6 +2475,7 @@ syn keyword cmakeKWctest_submit contained \ SUBMIT_URL syn keyword cmakeKWctest_test contained + \ AFTER_TIMEOUT \ APPEND \ BUILD \ CAPTURE_CMAKE_ERROR @@ -2307,19 +2485,23 @@ syn keyword cmakeKWctest_test contained \ EXCLUDE_FIXTURE_CLEANUP \ EXCLUDE_FIXTURE_SETUP \ EXCLUDE_LABEL - \ HARDWARE_SPEC_FILE \ INCLUDE \ INCLUDE_LABEL \ OFF \ ON \ PARALLEL_LEVEL \ QUIET + \ REPEAT + \ RESOURCE_SPEC_FILE \ RETURN_VALUE \ SCHEDULE_RANDOM \ START + \ STOP_ON_FAILURE \ STOP_TIME \ STRIDE \ TEST_LOAD + \ UNTIL_FAIL + \ UNTIL_PASS syn keyword cmakeKWctest_update contained \ CAPTURE_CMAKE_ERROR @@ -2356,6 +2538,7 @@ syn keyword cmakeKWdoxygen_add_docs contained syn keyword cmakeKWenable_language contained \ ASM \ CUDA + \ ISPC \ OBJC \ OBJCXX \ OPTIONAL @@ -2370,15 +2553,20 @@ syn keyword cmakeKWexec_program contained syn keyword cmakeKWexecute_process contained \ ANSI + \ ANY \ AUTO \ COMMAND \ COMMAND_ECHO + \ COMMAND_ERROR_IS_FATAL + \ ECHO_ERROR_VARIABLE + \ ECHO_OUTPUT_VARIABLE \ ENCODING \ ERROR_FILE \ ERROR_QUIET \ ERROR_STRIP_TRAILING_WHITESPACE \ ERROR_VARIABLE \ INPUT_FILE + \ LAST \ NONE \ OEM \ OUTPUT_FILE @@ -2420,47 +2608,63 @@ syn keyword cmakeKWexport_library_dependencies contained syn keyword cmakeKWfile contained \ ALGO \ APPEND + \ ARCHIVE_CREATE + \ ARCHIVE_EXTRACT \ ASCII - \ BUNDLE_EXECTUBLE + \ BASE_DIRECTORY \ BUNDLE_EXECUTABLE + \ CHMOD + \ CHMOD_RECURSE \ CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND \ CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM \ CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL + \ CMAKE_OBJDUMP \ CMAKE_TLS_CAINFO \ CMAKE_TLS_VERIFY \ CODE + \ COMPILE_FEATURES + \ COMPRESSION + \ COMPRESSION_LEVEL \ CONDITION - \ CONFIG + \ CONFIGURE \ CONFIGURE_DEPENDS \ CONFLICTING_DEPENDENCIES_PREFIX - \ CONFLICTING_DEPENDENICES_PREFIX \ CONTENT + \ CONVERT \ COPY \ COPY_ON_ERROR \ CREATE_LINK + \ CRLF \ DESTINATION \ DIRECTORIES \ DIRECTORY_PERMISSIONS \ DLL + \ DOS \ DOWNLOAD \ ENCODING + \ ESCAPE_QUOTES \ EXECUTABLES \ EXPECTED_HASH \ FILES_MATCHING \ FILE_PERMISSIONS \ FOLLOW_SYMLINKS \ FOLLOW_SYMLINK_CHAIN + \ FORMAT \ FUNCTION \ GENERATE \ GET_RUNTIME_DEPENDENCIES \ GLOB \ GLOB_RECURSE + \ GROUP_EXECUTE + \ GROUP_READ + \ GROUP_WRITE \ GUARD \ HASH \ HEX \ HTTPHEADER \ IGNORED \ INACTIVITY_TIMEOUT + \ INPUT \ INSTALL \ IS_ABSOLUTE \ LENGTH_MAXIMUM @@ -2472,22 +2676,31 @@ syn keyword cmakeKWfile contained \ LIMIT_INPUT \ LIMIT_OUTPUT \ LIST_DIRECTORIES + \ LIST_ONLY \ LOCK \ LOG \ MAKE_DIRECTORY \ MODULES + \ MTIME \ MYLIBRARY \ NETRC \ NETRC_FILE \ NEWLINE_CONSUME + \ NEWLINE_STYLE \ NOT \ NO_HEX_CONVERSION \ NO_SOURCE_PERMISSIONS \ OFFSET - \ OLD + \ ONLY \ OPTIONAL \ OUTPUT + \ OWNER_EXECUTE + \ OWNER_READ + \ OWNER_WRITE + \ PATHS \ PATTERN + \ PATTERNS + \ PERMISSIONS \ POST_EXCLUDE_REGEXES \ POST_INCLUDE_REGEXES \ PRE_EXCLUDE_REGEXES @@ -2495,6 +2708,7 @@ syn keyword cmakeKWfile contained \ PROCESS \ READ \ READ_SYMLINK + \ REAL_PATH \ REGEX \ RELATIVE_PATH \ RELEASE @@ -2516,13 +2730,17 @@ syn keyword cmakeKWfile contained \ STATUS \ STRINGS \ SYMBOLIC + \ TARGET + \ TARGET_PROPERTY \ TIMESTAMP \ TLS_CAINFO \ TLS_VERIFY \ TOUCH \ TOUCH_NOCREATE \ TO_CMAKE_PATH + \ TO_CMAKE_PATH_LIST \ TO_NATIVE_PATH + \ TO_NATIVE_PATH_LIST \ UNRESOLVED_DEPENDENCIES_VAR \ UPLOAD \ URL @@ -2530,7 +2748,12 @@ syn keyword cmakeKWfile contained \ USE_SOURCE_PERMISSIONS \ UTC \ UTF + \ VERBOSE + \ WORLD_EXECUTE + \ WORLD_READ + \ WORLD_WRITE \ WRITE + \ XZ \ _FILENAMES syn keyword cmakeKWfind_file contained @@ -2551,6 +2774,7 @@ syn keyword cmakeKWfind_file contained \ ONLY_CMAKE_FIND_ROOT_PATH \ PATHS \ PATH_SUFFIXES + \ REQUIRED \ VAR syn keyword cmakeKWfind_library contained @@ -2572,6 +2796,7 @@ syn keyword cmakeKWfind_library contained \ ONLY_CMAKE_FIND_ROOT_PATH \ PATHS \ PATH_SUFFIXES + \ REQUIRED \ VAR syn keyword cmakeKWfind_package contained @@ -2585,9 +2810,12 @@ syn keyword cmakeKWfind_package contained \ DEC \ DVAR \ EXACT + \ EXCLUDE \ FALSE + \ FIND_PACKAGE_VERSION_FORMAT \ FRAMEWORK \ HINTS + \ INCLUDE \ MODULE \ NAMES \ NATURAL @@ -2607,12 +2835,26 @@ syn keyword cmakeKWfind_package contained \ OPTIONAL_COMPONENTS \ PACKAGE_FIND_NAME \ PACKAGE_FIND_VERSION + \ PACKAGE_FIND_VERSION_COMPLETE \ PACKAGE_FIND_VERSION_COUNT \ PACKAGE_FIND_VERSION_MAJOR + \ PACKAGE_FIND_VERSION_MAX + \ PACKAGE_FIND_VERSION_MAX_COUNT + \ PACKAGE_FIND_VERSION_MAX_MAJOR + \ PACKAGE_FIND_VERSION_MAX_MINOR + \ PACKAGE_FIND_VERSION_MAX_PATCH + \ PACKAGE_FIND_VERSION_MAX_TWEAK \ PACKAGE_FIND_VERSION_MINOR + \ PACKAGE_FIND_VERSION_MIN_COUNT + \ PACKAGE_FIND_VERSION_MIN_MAJOR + \ PACKAGE_FIND_VERSION_MIN_MINOR + \ PACKAGE_FIND_VERSION_MIN_PATCH + \ PACKAGE_FIND_VERSION_MIN_TWEAK \ PACKAGE_FIND_VERSION_PATCH + \ PACKAGE_FIND_VERSION_RANGE + \ PACKAGE_FIND_VERSION_RANGE_MAX + \ PACKAGE_FIND_VERSION_RANGE_MIN \ PACKAGE_FIND_VERSION_TWEAK - \ PACKAGE_VERSION \ PACKAGE_VERSION_COMPATIBLE \ PACKAGE_VERSION_EXACT \ PACKAGE_VERSION_UNSUITABLE @@ -2651,6 +2893,7 @@ syn keyword cmakeKWfind_path contained \ ONLY_CMAKE_FIND_ROOT_PATH \ PATHS \ PATH_SUFFIXES + \ REQUIRED \ VAR syn keyword cmakeKWfind_program contained @@ -2671,22 +2914,26 @@ syn keyword cmakeKWfind_program contained \ ONLY_CMAKE_FIND_ROOT_PATH \ PATHS \ PATH_SUFFIXES + \ REQUIRED \ VAR syn keyword cmakeKWfltk_wrap_ui contained \ FLTK syn keyword cmakeKWforeach contained + \ APPEND \ IN \ ITEMS \ LISTS \ RANGE \ STATUS + \ ZIP_LISTS syn keyword cmakeKWfunction contained \ ARGC \ ARGN \ ARGV + \ CALL \ FOO \ PARENT_SCOPE @@ -2714,6 +2961,7 @@ syn keyword cmakeKWget_filename_component contained \ PROGRAM \ PROGRAM_ARGS \ REALPATH + \ REAL_PATH syn keyword cmakeKWget_property contained \ BRIEF_DOCS @@ -2726,13 +2974,15 @@ syn keyword cmakeKWget_property contained \ SET \ SOURCE \ TARGET + \ TARGET_DIRECTORY \ TEST \ VARIABLE syn keyword cmakeKWget_source_file_property contained + \ DIRECTORY \ INHERITED \ LOCATION - \ VAR + \ TARGET_DIRECTORY syn keyword cmakeKWget_target_property contained \ INHERITED @@ -2948,6 +3198,7 @@ syn keyword cmakeKWlist contained \ INTERNAL \ JOIN \ LENGTH + \ NATURAL \ ORDER \ OUTPUT_VARIABLE \ PARENT_SCOPE @@ -2983,6 +3234,7 @@ syn keyword cmakeKWmacro contained \ ARGC \ ARGN \ ARGV + \ CALL \ DEFINED \ FOO \ GREATER @@ -2999,12 +3251,18 @@ syn keyword cmakeKWmath contained \ OUTPUT_FORMAT syn keyword cmakeKWmessage contained + \ APPEND \ AUTHOR_WARNING + \ CHECK_ + \ CHECK_FAIL + \ CHECK_PASS + \ CHECK_START \ DEBUG \ DEPRECATION \ FATAL_ERROR \ GUI \ NOTICE + \ POP_BACK \ SEND_ERROR \ STATUS \ TRACE @@ -3021,6 +3279,7 @@ syn keyword cmakeKWproject contained \ CUDA \ DESCRIPTION \ HOMEPAGE_URL + \ ISPC \ LANGUAGES \ NAME \ NONE @@ -3049,9 +3308,14 @@ syn keyword cmakeKWremove contained \ VALUE \ VAR +syn keyword cmakeKWreturn contained + \ DEFER + syn keyword cmakeKWseparate_arguments contained \ MSDN \ NATIVE_COMMAND + \ PROGRAM + \ SEPARATE_ARGS \ UNIX_COMMAND \ WINDOWS_COMMAND @@ -3080,12 +3344,15 @@ syn keyword cmakeKWset_property contained \ PROPERTY \ SOURCE \ TARGET + \ TARGET_DIRECTORY \ TEST \ WIX syn keyword cmakeKWset_source_files_properties contained + \ DIRECTORY \ PROPERTIES \ SOURCE + \ TARGET_DIRECTORY syn keyword cmakeKWset_target_properties contained \ PROPERTIES @@ -3095,6 +3362,9 @@ syn keyword cmakeKWset_tests_properties contained \ PROPERTIES \ TEST +syn keyword cmakeKWsite_name contained + \ HOSTNAME + syn keyword cmakeKWsource_group contained \ FILES \ PREFIX @@ -3104,20 +3374,27 @@ syn keyword cmakeKWsource_group contained syn keyword cmakeKWstring contained \ ALPHABET \ APPEND + \ ARRAY \ ASCII + \ BOOLEAN \ CMAKE_MATCH_ \ COMPARE \ CONCAT \ CONFIGURE \ EQUAL + \ ERROR_VARIABLE \ ESCAPE_QUOTES \ FIND \ GENEX_STRIP + \ GET \ GREATER \ GREATER_EQUAL \ GUID \ HASH + \ HEX \ JOIN + \ JSON + \ JSONLENGTH \ LENGTH \ LESS \ LESS_EQUAL @@ -3125,17 +3402,24 @@ syn keyword cmakeKWstring contained \ MATCH \ MATCHALL \ MATCHES + \ MEMBER \ NAMESPACE \ NOTEQUAL + \ NULL + \ NUMBER + \ OBJECT + \ OFF \ ONLY \ PREPEND \ RANDOM \ RANDOM_SEED \ REGEX + \ REMOVE \ REPEAT \ REPLACE \ REVERSE \ RFC + \ SET \ SHA \ SOURCE_DATE_EPOCH \ STRIP @@ -3238,8 +3522,12 @@ syn keyword cmakeKWtarget_link_options contained \ ALIAS \ BEFORE \ CMAKE_ + \ CUDA_RESOLVE_DEVICE_SYMBOLS + \ CUDA_SEPARABLE_COMPILATION + \ DEVICE_LINK \ GCC \ GNU + \ HOST_LINK \ IMPORTED \ INTERFACE \ INTERFACE_LINK_OPTIONS @@ -3256,8 +3544,11 @@ syn keyword cmakeKWtarget_link_options contained syn keyword cmakeKWtarget_precompile_headers contained \ ALIAS + \ ANGLE + \ BUILD_INTERFACE \ COMPILE_LANGUAGE \ DISABLE_PRECOMPILE_HEADERS + \ EXPORT \ FI \ GCC \ IMPORTED @@ -3307,6 +3598,12 @@ syn keyword cmakeKWtry_compile contained \ LINK_OPTIONS \ MULTI \ NOT + \ OBJCXX_EXTENSIONS + \ OBJCXX_STANDARD + \ OBJCXX_STANDARD_REQUIRED + \ OBJC_EXTENSIONS + \ OBJC_STANDARD + \ OBJC_STANDARD_REQUIRED \ OUTPUT_VARIABLE \ PRIVATE \ SOURCES @@ -3352,7 +3649,14 @@ syn keyword cmakeKWvariable_requires contained \ TEST_VARIABLE syn keyword cmakeKWvariable_watch contained + \ APPEND \ COMMAND + \ DEFINED + \ MODIFIED_ACCESS + \ READ_ACCESS + \ REMOVED_ACCESS + \ UNKNOWN_MODIFIED_ACCESS + \ UNKNOWN_READ_ACCESS syn keyword cmakeKWwrite_file contained \ APPEND @@ -3384,15 +3688,20 @@ syn keyword cmakeGeneratorExpressions contained \ CONFIGURATION \ CUDA_COMPILER_ID \ CUDA_COMPILER_VERSION + \ CUDA_RESOLVE_DEVICE_SYMBOLS + \ CUDA_SEPARABLE_COMPILATION \ CUSTOM_KEYS \ CXX_COMPILER_ID \ CXX_COMPILER_VERSION + \ CXX_CONFIG \ CXX_STANDARD \ C_COMPILER_ID \ C_COMPILER_VERSION \ C_STANDARD \ DEBUG_MODE \ DEBUG_POSTFIX + \ DEVICE_LINK + \ DLL \ EXCLUDE \ EXPORT \ FALSE @@ -3401,20 +3710,27 @@ syn keyword cmakeGeneratorExpressions contained \ GENERATE \ GENEX_EVAL \ GNU + \ HOST_LINK \ IF \ IGNORE \ IMPORT_PREFIX \ IMPORT_SUFFIX \ INCLUDE_DIRECTORIES \ INSTALL_INTERFACE + \ INSTALL_NAME_DIR \ INSTALL_PREFIX + \ INTERFACE \ INTERFACE_LINK_LIBRARIES \ IN_LIST + \ ISPC_COMPILER_ID + \ ISPC_COMPILER_VERSION \ JOIN \ LANG \ LANG_COMPILER_ID \ LIBRARY_OUTPUT_NAME \ LIBRARY_OUTPUT_NAME_ + \ LINK_LANGUAGE + \ LINK_LANG_AND_ID \ LINK_LIBRARIES \ LINK_ONLY \ LOWER_CASE @@ -3444,6 +3760,7 @@ syn keyword cmakeGeneratorExpressions contained \ SDK \ SEMICOLON \ SHELL_PATH + \ STATIC \ STREQUAL \ TARGET_BUNDLE_CONTENT_DIR \ TARGET_BUNDLE_DIR @@ -3498,8 +3815,10 @@ syn keyword cmakeCommand \ break \ build_command \ cmake_host_system_information + \ cmake_language \ cmake_minimum_required \ cmake_parse_arguments + \ cmake_path \ cmake_policy \ configure_file \ continue @@ -3656,8 +3975,10 @@ hi def link cmakeKWadd_subdirectory ModeMsg hi def link cmakeKWadd_test ModeMsg hi def link cmakeKWbuild_command ModeMsg hi def link cmakeKWcmake_host_system_information ModeMsg +hi def link cmakeKWcmake_language ModeMsg hi def link cmakeKWcmake_minimum_required ModeMsg hi def link cmakeKWcmake_parse_arguments ModeMsg +hi def link cmakeKWcmake_path ModeMsg hi def link cmakeKWcmake_policy ModeMsg hi def link cmakeKWconfigure_file ModeMsg hi def link cmakeKWcreate_test_sourcelist ModeMsg @@ -3717,6 +4038,7 @@ hi def link cmakeKWproject ModeMsg hi def link cmakeKWqt_wrap_cpp ModeMsg hi def link cmakeKWqt_wrap_ui ModeMsg hi def link cmakeKWremove ModeMsg +hi def link cmakeKWreturn ModeMsg hi def link cmakeKWseparate_arguments ModeMsg hi def link cmakeKWset ModeMsg hi def link cmakeKWset_directory_properties ModeMsg @@ -3724,6 +4046,7 @@ hi def link cmakeKWset_property ModeMsg hi def link cmakeKWset_source_files_properties ModeMsg hi def link cmakeKWset_target_properties ModeMsg hi def link cmakeKWset_tests_properties ModeMsg +hi def link cmakeKWsite_name ModeMsg hi def link cmakeKWsource_group ModeMsg hi def link cmakeKWstring ModeMsg hi def link cmakeKWsubdirs ModeMsg @@ -3774,5 +4097,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim: set nowrap: - -endif diff --git a/syntax/cmod.vim b/syntax/cmod.vim new file mode 100644 index 000000000..3e8073428 --- /dev/null +++ b/syntax/cmod.vim @@ -0,0 +1,148 @@ +if polyglot#init#is_disabled(expand(':p'), 'cmod', 'syntax/cmod.vim') + finish +endif + +" Vim syntax file +" Language: Cmod +" Current Maintainer: Stephen R. van den Berg +" Last Change: 2018 Jan 23 +" Version: 2.9 +" Remark: Is used to edit Cmod files for Pike development. +" Remark: Includes a highlighter for any embedded Autodoc format. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Read the C syntax to start with +runtime! syntax/c.vim +unlet b:current_syntax + +if !exists("c_autodoc") + " For embedded Autodoc documentation + syn include @cmodAutodoc :p:h/autodoc.vim + unlet b:current_syntax +endif + +" Supports rotating amongst several same-level preprocessor conditionals +packadd! matchit +let b:match_words = "({:}\\@1<=),^\s*#\s*\%(if\%(n\?def\)\|else\|el\%(se\)\?if\|endif\)\>" + +" Cmod extensions +syn keyword cmodStatement __INIT INIT EXIT GC_RECURSE GC_CHECK +syn keyword cmodStatement EXTRA OPTIMIZE RETURN +syn keyword cmodStatement ADD_EFUN ADD_EFUN2 ADD_FUNCTION +syn keyword cmodStatement MK_STRING MK_STRING_SVALUE CONSTANT_STRLEN + +syn keyword cmodStatement SET_SVAL pop_n_elems pop_stack +syn keyword cmodStatement SIMPLE_ARG_TYPE_ERROR Pike_sp Pike_fp MKPCHARP +syn keyword cmodStatement SET_SVAL_TYPE REF_MAKE_CONST_STRING INC_PCHARP +syn keyword cmodStatement PTR_FROM_INT INHERIT_FROM_PTR +syn keyword cmodStatement DECLARE_CYCLIC BEGIN_CYCLIC END_CYCLIC +syn keyword cmodStatement UPDATE_LOCATION UNSAFE_IS_ZERO SAFE_IS_ZERO +syn keyword cmodStatement MKPCHARP_STR APPLY_MASTER current_storage +syn keyword cmodStatement PIKE_MAP_VARIABLE size_shift +syn keyword cmodStatement THREADS_ALLOW THREADS_DISALLOW + +syn keyword cmodStatement add_integer_constant ref_push_object +syn keyword cmodStatement push_string apply_svalue free_svalue +syn keyword cmodStatement get_inherit_storage get_storage +syn keyword cmodStatement make_shared_binary_string push_int64 +syn keyword cmodStatement begin_shared_string end_shared_string +syn keyword cmodStatement add_ref fast_clone_object clone_object +syn keyword cmodStatement push_undefined push_int ref_push_string +syn keyword cmodStatement free_string push_ulongest free_object +syn keyword cmodStatement convert_stack_top_to_bignum push_array +syn keyword cmodStatement push_object reduce_stack_top_bignum +syn keyword cmodStatement push_static_text apply_current +syn keyword cmodStatement assign_svalue free_program destruct_object +syn keyword cmodStatement start_new_program low_inherit stack_swap +syn keyword cmodStatement generic_error_program end_program +syn keyword cmodStatement free_array apply_external copy_mapping +syn keyword cmodStatement push_constant_text ref_push_mapping +syn keyword cmodStatement mapping_insert mapping_string_insert_string +syn keyword cmodStatement f_aggregate_mapping f_aggregate apply +syn keyword cmodStatement push_mapping push_svalue low_mapping_lookup +syn keyword cmodStatement assign_svalues_no_free f_add +syn keyword cmodStatement push_empty_string stack_dup assign_lvalue +syn keyword cmodStatement low_mapping_string_lookup allocate_mapping +syn keyword cmodStatement copy_shared_string make_shared_binary_string0 +syn keyword cmodStatement f_call_function f_index f_utf8_to_string +syn keyword cmodStatement finish_string_builder init_string_builder +syn keyword cmodStatement reset_string_builder free_string_builder +syn keyword cmodStatement string_builder_putchar get_all_args +syn keyword cmodStatement add_shared_strings check_all_args +syn keyword cmodStatement do_inherit add_string_constant +syn keyword cmodStatement add_program_constant set_init_callback +syn keyword cmodStatement simple_mapping_string_lookup +syn keyword cmodStatement f_sprintf push_text string_has_null +syn keyword cmodStatement end_and_resize_shared_string + +syn keyword cmodStatement args sp + +syn keyword cmodStatement free + +syn keyword cmodConstant ID_PROTECTED ID_FINAL PIKE_DEBUG +syn keyword cmodConstant NUMBER_NUMBER +syn keyword cmodConstant PIKE_T_INT PIKE_T_STRING PIKE_T_ARRAY +syn keyword cmodConstant PIKE_T_MULTISET PIKE_T_OBJECT PIKE_T_MAPPING +syn keyword cmodConstant NUMBER_UNDEFINED PIKE_T_PROGRAM PIKE_T_FUNCTION +syn keyword cmodConstant T_OBJECT T_STRING T_ARRAY T_MAPPING + +syn keyword cmodException SET_ONERROR UNSET_ONERROR ONERROR +syn keyword cmodException CALL_AND_UNSET_ONERROR + +syn keyword cmodDebug Pike_fatal Pike_error check_stack + +syn keyword cmodAccess public protected private INHERIT +syn keyword cmodAccess CTYPE CVAR PIKEVAR PIKEFUN + +syn keyword cmodModifier efun export flags optflags optfunc +syn keyword cmodModifier type rawtype errname name c_name prototype +syn keyword cmodModifier program_flags gc_trivial PMOD_EXPORT +syn keyword cmodModifier ATTRIBUTE noclone noinline +syn keyword cmodModifier tOr tFuncV tInt tMix tVoid tStr tMap tPrg +syn keyword cmodModifier tSetvar tArr tMult tMultiset +syn keyword cmodModifier tArray tMapping tString tSetvar tVar + +syn keyword cmodType bool mapping string multiset array mixed +syn keyword cmodType object function program auto svalue +syn keyword cmodType bignum longest zero pike_string +syn keyword cmodType this this_program THIS INT_TYPE INT64 INT32 +syn keyword cmodType p_wchar2 PCHARP p_wchar1 p_wchar0 MP_INT + +syn keyword cmodOperator _destruct create __hash _sizeof _indices _values +syn keyword cmodOperator _is_type _sprintf _equal _m_delete _get_iterator +syn keyword cmodOperator _search _types _serialize _deserialize +syn keyword cmodOperator _size_object _random _sqrt TYPEOF SUBTYPEOF +syn keyword cmodOperator LIKELY UNLIKELY + +syn keyword cmodStructure DECLARATIONS PIKECLASS DECLARE_STORAGE + +if !exists("c_autodoc") + syn match cmodAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cmodAutodoc containedin=cComment,cCommentL + syn cluster cCommentGroup add=cmodAutodocReal + syn cluster cPreProcGroup add=cmodAutodocReal +endif + +" Default highlighting +hi def link cmodAccess Statement +hi def link cmodOperator Operator +hi def link cmodStatement Statement +hi def link cmodConstant Constant +hi def link cmodModifier Type +hi def link cmodType Type +hi def link cmodStorageClass StorageClass +hi def link cmodStructure Structure +hi def link cmodException Exception +hi def link cmodDebug Debug + +let b:current_syntax = "cmod" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/cmusrc.vim b/syntax/cmusrc.vim new file mode 100644 index 000000000..2b611bcf5 --- /dev/null +++ b/syntax/cmusrc.vim @@ -0,0 +1,313 @@ +if polyglot#init#is_disabled(expand(':p'), 'cmusrc', 'syntax/cmusrc.vim') + finish +endif + +" Vim syntax file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword cmusrcTodo contained TODO FIXME XXX NOTE + +syn match cmusrcComment contained display '^\s*#.*$' + +syn match cmusrcBegin display '^' + \ nextgroup=cmusrcKeyword,cmusrcComment + \ skipwhite + +syn keyword cmusrcKeyword contained add + \ nextgroup=cmusrcAddSwitches,cmusrcURI + \ skipwhite + +syn match cmusrcAddSwitches contained display '-[lpqQ]' + \ nextgroup=cmusrcURI + \ skipwhite + +syn match cmusrcURI contained display '.\+' + +syn keyword cmusrcKeyword contained bind + \ nextgroup=cmusrcBindSwitches, + \ cmusrcBindContext + \ skipwhite + +syn match cmusrcBindSwitches contained display '-[f]' + \ nextgroup=cmusrcBindContext + \ skipwhite + +syn keyword cmusrcBindContext contained common library playlist queue + \ browser filters + \ nextgroup=cmusrcBindKey + \ skipwhite + +syn match cmusrcBindKey contained display '\S\+' + \ nextgroup=cmusrcKeyword + \ skipwhite + +syn keyword cmusrcKeyword contained browser-up colorscheme echo factivate + \ filter invert player-next player-pause + \ player-play player-prev player-stop quit + \ refresh run search-next search-prev shuffle + \ unmark win-activate win-add-l win-add-p + \ win-add-Q win-add-q win-bottom win-down + \ win-mv-after win-mv-before win-next + \ win-page-down win-page-up win-remove + \ win-sel-cur win-toggle win-top win-up + \ win-update + +syn keyword cmusrcKeyword contained cd + \ nextgroup=cmusrcDirectory + \ skipwhite + +syn match cmusrcDirectory contained display '.\+' + +syn keyword cmusrcKeyword contained clear + \ nextgroup=cmusrcClearSwitches + +syn match cmusrcClearSwitches contained display '-[lpq]' + +syn keyword cmusrcKeyword contained fset + \ nextgroup=cmusrcFSetName + \ skipwhite + +syn match cmusrcFSetName contained display '[^=]\+' + \ nextgroup=cmusrcFSetEq + +syn match cmusrcFSetEq contained display '=' + \ nextgroup=cmusrcFilterExpr + +syn match cmusrcFilterExpr contained display '.\+' + +syn keyword cmusrcKeyword contained load + \ nextgroup=cmusrcLoadSwitches,cmusrcURI + \ skipwhite + +syn match cmusrcLoadSwitches contained display '-[lp]' + \ nextgroup=cmusrcURI + \ skipwhite + +syn keyword cmusrcKeyword contained mark + \ nextgroup=cmusrcFilterExpr + +syn keyword cmusrcKeyword contained save + \ nextgroup=cmusrcSaveSwitches,cmusrcFile + \ skipwhite + +syn match cmusrcSaveSwitches contained display '-[lp]' + \ nextgroup=cmusrcFile + \ skipwhite + +syn match cmusrcFile contained display '.\+' + +syn keyword cmusrcKeyword contained seek + \ nextgroup=cmusrcSeekOffset + \ skipwhite + +syn match cmusrcSeekOffset contained display + \ '[+-]\=\%(\d\+[mh]\=\|\%(\%(0\=\d\|[1-5]\d\):\)\=\%(0\=\d\|[1-5]\d\):\%(0\=\d\|[1-5]\d\)\)' + +syn keyword cmusrcKeyword contained set + \ nextgroup=cmusrcOption + \ skipwhite + +syn keyword cmusrcOption contained auto_reshuffle confirm_run + \ continue play_library play_sorted repeat + \ show_hidden show_remaining_time shuffle + \ nextgroup=cmusrcSetTest,cmusrcOptEqBoolean + +syn match cmusrcSetTest contained display '?' + +syn match cmusrcOptEqBoolean contained display '=' + \ nextgroup=cmusrcOptBoolean + +syn keyword cmusrcOptBoolean contained true false + +syn keyword cmusrcOption contained aaa_mode + \ nextgroup=cmusrcOptEqAAA + +syn match cmusrcOptEqAAA contained display '=' + \ nextgroup=cmusrcOptAAA + +syn keyword cmusrcOptAAA contained all artist album + +syn keyword cmusrcOption contained buffer_seconds + \ nextgroup=cmusrcOptEqNumber + +syn match cmusrcOptEqNumber contained display '=' + \ nextgroup=cmusrcOptNumber + +syn match cmusrcOptNumber contained display '\d\+' + +syn keyword cmusrcOption contained altformat_current altformat_playlist + \ altformat_title altformat_trackwin + \ format_current format_playlist format_title + \ format_trackwin + \ nextgroup=cmusrcOptEqFormat + +syn match cmusrcOptEqFormat contained display '=' + \ nextgroup=cmusrcOptFormat + +syn match cmusrcOptFormat contained display '.\+' + \ contains=cmusrcFormatSpecial + +syn match cmusrcFormatSpecial contained display '%[0-]*\d*[alDntgydfF=%]' + +syn keyword cmusrcOption contained color_cmdline_bg color_cmdline_fg + \ color_error color_info color_separator + \ color_statusline_bg color_statusline_fg + \ color_titleline_bg color_titleline_fg + \ color_win_bg color_win_cur + \ color_win_cur_sel_bg color_win_cur_sel_fg + \ color_win_dir color_win_fg + \ color_win_inactive_cur_sel_bg + \ color_win_inactive_cur_sel_fg + \ color_win_inactive_sel_bg + \ color_win_inactive_sel_fg + \ color_win_sel_bg color_win_sel_fg + \ color_win_title_bg color_win_title_fg + \ nextgroup=cmusrcOptEqColor + +syn match cmusrcOptEqColor contained display '=' + \ nextgroup=@cmusrcOptColor + +syn cluster cmusrcOptColor contains=cmusrcOptColorName,cmusrcOptColorValue + +syn keyword cmusrcOptColorName contained default black red green yellow blue + \ magenta cyan gray darkgray lightred lightred + \ lightgreen lightyellow lightblue lightmagenta + \ lightcyan white + +syn match cmusrcOptColorValue contained display + \ '-1\|0*\%(\d\|[1-9]\d\|1\d\d\|2\%([0-4]\d\|5[0-5]\)\)' + +syn keyword cmusrcOption contained id3_default_charset output_plugin + \ status_display_program + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOption contained + \ '\%(dsp\|mixer\)\.\%(alsa\|oss\|sun\)\.\%(channel\|device\)' + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOption contained + \ 'dsp\.ao\.\%(buffer_size\|driver\|wav_counter\|wav_dir\)' + \ nextgroup=cmusrcOptEqString + +syn match cmusrcOptEqString contained display '=' + \ nextgroup=cmusrcOptString + +syn match cmusrcOptString contained display '.\+' + +syn keyword cmusrcOption contained lib_sort pl_sort + \ nextgroup=cmusrcOptEqSortKeys + +syn match cmusrcOptEqSortKeys contained display '=' + \ nextgroup=cmusrcOptSortKeys + +syn keyword cmusrcOptSortKeys contained artist album title tracknumber + \ discnumber date genre filename + \ nextgroup=cmusrcOptSortKeys + \ skipwhite + +syn keyword cmusrcKeyword contained showbind + \ nextgroup=cmusrcSBindContext + \ skipwhite + +syn keyword cmusrcSBindContext contained common library playlist queue + \ browser filters + \ nextgroup=cmusrcSBindKey + \ skipwhite + +syn match cmusrcSBindKey contained display '\S\+' + +syn keyword cmusrcKeyword contained toggle + \ nextgroup=cmusrcTogglableOpt + \ skipwhite + +syn keyword cmusrcTogglableOpt contained auto_reshuffle aaa_mode + \ confirm_run continue play_library play_sorted + \ repeat show_hidden show_remaining_time shuffle + +syn keyword cmusrcKeyword contained unbind + \ nextgroup=cmusrcUnbindSwitches, + \ cmusrcSBindContext + \ skipwhite + +syn match cmusrcUnbindSwitches contained display '-[f]' + \ nextgroup=cmusrcSBindContext + \ skipwhite + +syn keyword cmusrcKeyword contained view + \ nextgroup=cmusrcView + \ skipwhite + +syn keyword cmusrcView contained library playlist queue browser filters +syn match cmusrcView contained display '[1-6]' + +syn keyword cmusrcKeyword contained vol + \ nextgroup=cmusrcVolume1 + \ skipwhite + +syn match cmusrcVolume1 contained display '[+-]\=\d\+%' + \ nextgroup=cmusrcVolume2 + \ skipwhite + +syn match cmusrcVolume2 contained display '[+-]\=\d\+%' + +hi def link cmusrcTodo Todo +hi def link cmusrcComment Comment +hi def link cmusrcKeyword Keyword +hi def link cmusrcSwitches Special +hi def link cmusrcAddSwitches cmusrcSwitches +hi def link cmusrcURI Normal +hi def link cmusrcBindSwitches cmusrcSwitches +hi def link cmusrcContext Type +hi def link cmusrcBindContext cmusrcContext +hi def link cmusrcKey String +hi def link cmusrcBindKey cmusrcKey +hi def link cmusrcDirectory Normal +hi def link cmusrcClearSwitches cmusrcSwitches +hi def link cmusrcFSetName PreProc +hi def link cmusrcEq Normal +hi def link cmusrcFSetEq cmusrcEq +hi def link cmusrcFilterExpr Normal +hi def link cmusrcLoadSwitches cmusrcSwitches +hi def link cmusrcSaveSwitches cmusrcSwitches +hi def link cmusrcFile Normal +hi def link cmusrcSeekOffset Number +hi def link cmusrcOption PreProc +hi def link cmusrcSetTest Normal +hi def link cmusrcOptBoolean Boolean +hi def link cmusrcOptEqAAA cmusrcEq +hi def link cmusrcOptAAA Identifier +hi def link cmusrcOptEqNumber cmusrcEq +hi def link cmusrcOptNumber Number +hi def link cmusrcOptEqFormat cmusrcEq +hi def link cmusrcOptFormat String +hi def link cmusrcFormatSpecial SpecialChar +hi def link cmusrcOptEqColor cmusrcEq +hi def link cmusrcOptColor Normal +hi def link cmusrcOptColorName cmusrcOptColor +hi def link cmusrcOptColorValue cmusrcOptColor +hi def link cmusrcOptEqString cmusrcEq +hi def link cmusrcOptString Normal +hi def link cmusrcOptEqSortKeys cmusrcEq +hi def link cmusrcOptSortKeys Identifier +hi def link cmusrcSBindContext cmusrcContext +hi def link cmusrcSBindKey cmusrcKey +hi def link cmusrcTogglableOpt cmusrcOption +hi def link cmusrcUnbindSwitches cmusrcSwitches +hi def link cmusrcView Normal +hi def link cmusrcVolume1 Number +hi def link cmusrcVolume2 Number + +let b:current_syntax = "cmusrc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cobol.vim b/syntax/cobol.vim new file mode 100644 index 000000000..10d4f9606 --- /dev/null +++ b/syntax/cobol.vim @@ -0,0 +1,264 @@ +if polyglot#init#is_disabled(expand(':p'), 'cobol', 'syntax/cobol.vim') + finish +endif + +" Vim syntax file +" Language: COBOL +" Maintainer: Ankit Jain +" (formerly Tim Pope ) +" (formerly Davyd Ondrejko ) +" (formerly Sitaram Chamarty and +" James Mitchell ) +" Last Change: 2019 Mar 22 +" Ankit Jain 22.03.2019 Changes & fixes: +" 1. Include inline comments +" 2. Use comment highlight for bad lines +" 3. Change certain 'keywords' to 'matches' +" for additional highlighting +" 4. Different highlighting for COPY, GO TO & +" CALL lines +" 5. Fix for COMP keyword +" 6. Fix for PROCEDURE DIVISION highlighting +" 7. Highlight EXIT PROGRAM like STOP RUN +" 8. Highlight X & A in PIC clause +" Tag: #C22032019 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" MOST important - else most of the keywords wont work! +setlocal isk=@,48-57,-,_ + +if !exists('g:cobol_inline_comment') + let g:cobol_inline_comment=0 +endif + +syn case ignore + +syn cluster cobolStart contains=cobolAreaA,cobolAreaB,cobolComment,cobolCompiler +syn cluster cobolAreaA contains=cobolParagraph,cobolSection,cobolDivision +"syn cluster cobolAreaB contains= +syn cluster cobolAreaAB contains=cobolLine +syn cluster cobolLine contains=cobolReserved +syn match cobolMarker "^\%( \{,5\}[^ ]\)\@=.\{,6}" nextgroup=@cobolStart +syn match cobolSpace "^ \{6\}" nextgroup=@cobolStart +syn match cobolAreaA " \{1,4\}" contained nextgroup=@cobolAreaA,@cobolAreaAB +syn match cobolAreaB " \{5,\}\|- *" contained nextgroup=@cobolAreaB,@cobolAreaAB +syn match cobolComment "[/*C].*$" contained +syn match cobolCompiler "$.*$" contained +syn match cobolLine ".*$" contained contains=cobolReserved,@cobolLine + +"#C22032019: Fix for PROCEDURE DIVISION USING highlighting, removed . from the +"end of the regex +"syn match cobolDivision \"[A-Z][A-Z0-9-]*[A-Z0-9]\s\+DIVISION\."he=e-1 contained contains=cobolDivisionName +syn match cobolDivision "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+DIVISION" contained contains=cobolDivisionName +syn keyword cobolDivisionName contained IDENTIFICATION ENVIRONMENT DATA PROCEDURE +syn match cobolSection "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+SECTION\."he=e-1 contained contains=cobolSectionName +syn keyword cobolSectionName contained CONFIGURATION INPUT-OUTPUT FILE WORKING-STORAGE LOCAL-STORAGE LINKAGE +syn match cobolParagraph "\a[A-Z0-9-]*[A-Z0-9]\.\|\d[A-Z0-9-]*[A-Z]\."he=e-1 contained contains=cobolParagraphName +syn keyword cobolParagraphName contained PROGRAM-ID SOURCE-COMPUTER OBJECT-COMPUTER SPECIAL-NAMES FILE-CONTROL I-O-CONTROL + + +"syn match cobolKeys "^\a\{1,6\}" contains=cobolReserved +"#C22032019: Remove BY, REPLACING, PROGRAM, TO, IN from 'keyword' group and add +"to 'match' group or other 'keyword' group +syn keyword cobolReserved contained ACCEPT ACCESS ADD ADDRESS ADVANCING AFTER ALPHABET ALPHABETIC +syn keyword cobolReserved contained ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALS +syn keyword cobolReserved contained ALTERNATE AND ANY ARE AREA AREAS ASCENDING ASSIGN AT AUTHOR BEFORE BINARY +syn keyword cobolReserved contained BLANK BLOCK BOTTOM CANCEL CBLL CD CF CH CHARACTER CHARACTERS CLASS +syn keyword cobolReserved contained CLOCK-UNITS CLOSE COBOL CODE CODE-SET COLLATING COLUMN COMMA COMMON +syn keyword cobolReserved contained COMMUNICATIONS COMPUTATIONAL COMPUTE CONTENT CONTINUE +syn keyword cobolReserved contained CONTROL CONVERTING CORR CORRESPONDING COUNT CURRENCY DATE DATE-COMPILED +syn keyword cobolReserved contained DATE-WRITTEN DAY DAY-OF-WEEK DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE +syn keyword cobolReserved contained DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT +syn keyword cobolReserved contained DELARATIVES DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESTINATION +syn keyword cobolReserved contained DETAIL DISABLE DISPLAY DIVIDE DIVISION DOWN DUPLICATES DYNAMIC EGI ELSE EMI +syn keyword cobolReserved contained ENABLE END-ADD END-COMPUTE END-DELETE END-DIVIDE END-EVALUATE END-IF +syn keyword cobolReserved contained END-MULTIPLY END-OF-PAGE END-READ END-RECEIVE END-RETURN +syn keyword cobolReserved contained END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING +syn keyword cobolReserved contained END-WRITE EQUAL ERROR ESI EVALUATE EVERY EXCEPTION EXIT +syn keyword cobolReserved contained EXTEND EXTERNAL FALSE FD FILLER FINAL FIRST FOOTING FOR FROM +syn keyword cobolReserved contained GENERATE GIVING GLOBAL GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES I-O +syn keyword cobolReserved contained INDEX INDEXED INDICATE INITIAL INITIALIZE +syn keyword cobolReserved contained INITIATE INPUT INSPECT INSTALLATION INTO IS JUST +syn keyword cobolReserved contained JUSTIFIED KEY LABEL LAST LEADING LEFT LENGTH LOCK MEMORY +syn keyword cobolReserved contained MERGE MESSAGE MODE MODULES MOVE MULTIPLE MULTIPLY NATIVE NEGATIVE NEXT NO NOT +syn keyword cobolReserved contained NUMBER NUMERIC NUMERIC-EDITED OCCURS OF OFF OMITTED ON OPEN +syn keyword cobolReserved contained OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW PACKED-DECIMAL PADDING +syn keyword cobolReserved contained PAGE PAGE-COUNTER PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE +syn keyword cobolReserved contained PRINTING PROCEDURES PROCEDD PURGE QUEUE QUOTES +syn keyword cobolReserved contained RANDOM RD READ RECEIVE RECORD RECORDS REDEFINES REEL REFERENCE REFERENCES +syn keyword cobolReserved contained RELATIVE RELEASE REMAINDER REMOVAL REPLACE REPORT REPORTING +syn keyword cobolReserved contained REPORTS RERUN RESERVE RESET RETURN RETURNING REVERSED REWIND REWRITE RF RH +syn keyword cobolReserved contained RIGHT ROUNDED RUN SAME SD SEARCH SECTION SECURITY SEGMENT SEGMENT-LIMITED +syn keyword cobolReserved contained SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SIGN SIZE SORT +syn keyword cobolReserved contained SORT-MERGE SOURCE STANDARD +syn keyword cobolReserved contained STANDARD-1 STANDARD-2 START STATUS STOP STRING SUB-QUEUE-1 SUB-QUEUE-2 +syn keyword cobolReserved contained SUB-QUEUE-3 SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED TABLE TALLYING +syn keyword cobolReserved contained TAPE TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TOP +syn keyword cobolReserved contained TRAILING TRUE TYPE UNIT UNSTRING UNTIL UP UPON USAGE USE USING VALUE VALUES +syn keyword cobolReserved contained VARYING WHEN WITH WORDS WRITE +syn match cobolReserved contained "\" +syn match cobolReserved contained "\<\(IF\|INVALID\|END\|EOP\)\>" +syn match cobolReserved contained "\" +" #C22032019: Add BY as match instead of keyword: BY not followed by == +syn match cobolReserved contained "\\s\+\(==\)\@!" +syn match cobolReserved contained "\" + +syn cluster cobolLine add=cobolConstant,cobolNumber,cobolPic +syn keyword cobolConstant SPACE SPACES NULL ZERO ZEROES ZEROS LOW-VALUE LOW-VALUES + +" #C22032019: Fix for many pic clauses +syn match cobolNumber "\<-\=\d*\.\=\d\+\>" contained +" syn match cobolPic \"\" contained +syn match cobolPic "\" contained +syn match cobolPic "\<$*\.\=9\+\>" contained +syn match cobolPic "\" contained +syn match cobolPic "\" contained +syn match cobolPic "\<9\+V\>" contained +" syn match cobolPic \"\<-\+[Z9]\+\>" contained +syn match cobolPic "\<-*[Z9]\+-*\>" contained +" #C22032019: Add Z,X and A to cobolPic +syn match cobolPic "\<[ZXA]\+\>" contained +syn match cobolTodo "todo" contained containedin=cobolInlineComment,cobolComment + +" For MicroFocus or other inline comments, include this line. +if g:cobol_inline_comment == 1 + syn region cobolInlineComment start="*>" end="$" contains=cobolTodo,cobolMarker + syn cluster cobolLine add=cobolInlineComment +endif + +syn match cobolBadLine "[^ D\*$/-].*" contained + +" If comment mark somehow gets into column past Column 7. +if g:cobol_inline_comment == 1 + " #C22032019: It is a bad line only if * is not followed by > when inline + " comments enabled + syn match cobolBadLine "\s\+\*\(>\)\@!.*" contained +else + syn match cobolBadLine "\s\+\*.*" contained +endif +syn cluster cobolStart add=cobolBadLine + +" #C22032019: Different highlighting for GO TO statements +" syn keyword cobolGoTo GO GOTO +syn keyword cobolGoTo GOTO +syn match cobolGoTo /\\s\+\/ +syn match cobolGoToPara /\\s\+\\s\+[A-Z0-9-]\+/ contains=cobolGoTo +" #C22032019: Highlight copybook name and location in using different group +" syn keyword cobolCopy COPY +syn match cobolCopy "\\|\" +syn match cobolCopy "\\s\+\(==\)\@=" +syn match cobolCopy "\\s\+\(==\)\@=" +syn match cobolCopyName "\\s\+[A-Z0-9]\+\(\s\+\\s\+[A-Z0-9]\+\)\?" contains=cobolCopy +syn cluster cobolLine add=cobolGoToPara,cobolCopyName + +" cobolBAD: things that are BAD NEWS! +syn keyword cobolBAD ALTER ENTER RENAMES + +syn cluster cobolLine add=cobolGoTo,cobolCopy,cobolBAD,cobolWatch,cobolEXECs + +" cobolWatch: things that are important when trying to understand a program +syn keyword cobolWatch OCCURS DEPENDING VARYING BINARY COMP REDEFINES +" #C22032019: Remove REPLACING from cobolWatch 'keyword' group and add to cobolCopy & +" cobolWatch 'match' group +" syn keyword cobolWatch REPLACING RUN +syn keyword cobolWatch RUN PROGRAM +syn match cobolWatch contained "\\s\+\(==\)\@!" +" #C22032019: Look for word starting with COMP +" syn match cobolWatch \"COMP-[123456XN]" +syn match cobolWatch "\" +syn match cobolCALLProg /\\s\+"\{0,1\}[A-Z0-9]\+"\{0,1\}/ contains=cobolCALLs +syn match cobolExtras /\:p'), 'coco', 'syntax/coco.vim') + finish +endif + +" Vim syntax file +" Language: Coco/R +" Maintainer: Ashish Shukla +" Last Change: 2007 Aug 10 +" Remark: Coco/R syntax partially implemented. +" License: Vim license + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn keyword cocoKeywords ANY CHARACTERS COMMENTS COMPILER CONTEXT END FROM IF IGNORE IGNORECASE NESTED PRAGMAS PRODUCTIONS SYNC TO TOKENS WEAK +syn match cocoUnilineComment #//.*$# +syn match cocoIdentifier /[[:alpha:]][[:alnum:]]*/ +syn region cocoMultilineComment start=#/[*]# end=#[*]/# +syn region cocoString start=/"/ skip=/\\"\|\\\\/ end=/"/ +syn region cocoCharacter start=/'/ skip=/\\'\|\\\\/ end=/'/ +syn match cocoOperator /+\||\|\.\.\|-\|(\|)\|{\|}\|\[\|\]\|=\|<\|>/ +syn region cocoProductionCode start=/([.]/ end=/[.])/ +syn match cocoPragma /[$][[:alnum:]]*/ + +hi def link cocoKeywords Keyword +hi def link cocoUnilineComment Comment +hi def link cocoMultilineComment Comment +hi def link cocoIdentifier Identifier +hi def link cocoString String +hi def link cocoCharacter Character +hi def link cocoOperator Operator +hi def link cocoProductionCode Statement +hi def link cocoPragma Special + diff --git a/syntax/coffee.vim b/syntax/coffee.vim index 2037d02d6..76f28b766 100644 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 +if polyglot#init#is_disabled(expand(':p'), 'coffee-script', 'syntax/coffee.vim') + finish +endif " Language: CoffeeScript " Maintainer: Mick Koch @@ -221,5 +223,3 @@ syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional, if !exists('b:current_syntax') let b:current_syntax = 'coffee' endif - -endif diff --git a/syntax/common.vim b/syntax/common.vim index 0fca4de11..62f7a374c 100644 --- a/syntax/common.vim +++ b/syntax/common.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'typescript', 'syntax/common.vim') + finish +endif " Define the default highlighting. " For version 5.8 and later: only when an item doesn't have highlighting yet @@ -71,6 +73,7 @@ if exists("did_typescript_hilink") HiLink typescriptString String HiLink typescriptSpecial Special HiLink typescriptStringLiteralType String + HiLink typescriptTemplateLiteralType String HiLink typescriptStringMember String HiLink typescriptTemplate String HiLink typescriptEventString String @@ -171,5 +174,3 @@ if exists("did_typescript_hilink") delcommand HiLink unlet did_typescript_hilink endif - -endif diff --git a/syntax/conaryrecipe.vim b/syntax/conaryrecipe.vim new file mode 100644 index 000000000..9d702af50 --- /dev/null +++ b/syntax/conaryrecipe.vim @@ -0,0 +1,141 @@ +if polyglot#init#is_disabled(expand(':p'), 'conaryrecipe', 'syntax/conaryrecipe.vim') + finish +endif + +" Vim syntax file +" Language: Conary Recipe +" Maintainer: rPath Inc +" Updated: 2007-12-08 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/python.vim + +syn keyword conarySFunction mainDir addAction addSource addArchive addPatch +syn keyword conarySFunction addRedirect addSvnSnapshot addMercurialSnapshot +syn keyword conarySFunction addCvsSnapshot addGitSnapshot addBzrSnapshot + +syn keyword conaryGFunction add addAll addNewGroup addReference createGroup +syn keyword conaryGFunction addNewGroup startGroup remove removeComponents +syn keyword conaryGFunction replace setByDefault setDefaultGroup +syn keyword conaryGFunction setLabelPath addCopy setSearchPath AddAllFlags +syn keyword conaryGFunction GroupRecipe GroupReference TroveCacheWrapper +syn keyword conaryGFunction TroveCache buildGroups findTrovesForGroups +syn keyword conaryGFunction followRedirect processAddAllDirectives +syn keyword conaryGFunction processOneAddAllDirective removeDifferences +syn keyword conaryGFunction addTrovesToGroup addCopiedComponents +syn keyword conaryGFunction findAllWeakTrovesToRemove checkForRedirects +syn keyword conaryGFunction addPackagesForComponents getResolveSource +syn keyword conaryGFunction resolveGroupDependencies checkGroupDependencies +syn keyword conaryGFunction calcSizeAndCheckHashes findSourcesForGroup +syn keyword conaryGFunction addPostInstallScript addPostRollbackScript +syn keyword conaryGFunction addPostUpdateScript addPreUpdateScript +syn keyword conaryGFunction addTrove moveComponents copyComponents +syn keyword conaryGFunction removeItemsAlsoInNewGroup removeItemsAlsoInGroup +syn keyword conaryGFunction addResolveSource iterReplaceSpecs +syn keyword conaryGFunction setCompatibilityClass getLabelPath +syn keyword conaryGFunction getResolveTroveSpecs getSearchFlavor +syn keyword conaryGFunction getChildGroups getGroupMap + +syn keyword conaryBFunction Run Automake Configure ManualConfigure +syn keyword conaryBFunction Make MakeParallelSubdir MakeInstall +syn keyword conaryBFunction MakePathsInstall CompilePython +syn keyword conaryBFunction Ldconfig Desktopfile Environment SetModes +syn keyword conaryBFunction Install Copy Move Symlink Link Remove Doc +syn keyword conaryBFunction Create MakeDirs disableParallelMake +syn keyword conaryBFunction ConsoleHelper Replace SGMLCatalogEntry +syn keyword conaryBFunction XInetdService XMLCatalogEntry TestSuite +syn keyword conaryBFunction PythonSetup CMake Ant JavaCompile ClassPath +syn keyword conaryBFunction JavaDoc IncludeLicense MakeFIFO + +syn keyword conaryPFunction NonBinariesInBindirs FilesInMandir +syn keyword conaryPFunction ImproperlyShared CheckSonames CheckDestDir +syn keyword conaryPFunction ComponentSpec PackageSpec +syn keyword conaryPFunction Config InitScript GconfSchema SharedLibrary +syn keyword conaryPFunction ParseManifest MakeDevices DanglingSymlinks +syn keyword conaryPFunction AddModes WarnWriteable IgnoredSetuid +syn keyword conaryPFunction Ownership ExcludeDirectories +syn keyword conaryPFunction BadFilenames BadInterpreterPaths ByDefault +syn keyword conaryPFunction ComponentProvides ComponentRequires Flavor +syn keyword conaryPFunction EnforceConfigLogBuildRequirements Group +syn keyword conaryPFunction EnforceSonameBuildRequirements InitialContents +syn keyword conaryPFunction FilesForDirectories LinkCount +syn keyword conaryPFunction MakdeDevices NonMultilibComponent ObsoletePaths +syn keyword conaryPFunction NonMultilibDirectories NonUTF8Filenames TagSpec +syn keyword conaryPFunction Provides RequireChkconfig Requires TagHandler +syn keyword conaryPFunction TagDescription Transient User UtilizeGroup +syn keyword conaryPFunction WorldWritableExecutables UtilizeUser +syn keyword conaryPFunction WarnWritable Strip CheckDesktopFiles +syn keyword conaryPFunction FixDirModes LinkType reportMissingBuildRequires +syn keyword conaryPFunction reportErrors FixupManpagePaths FixObsoletePaths +syn keyword conaryPFunction NonLSBPaths PythonEggs +syn keyword conaryPFunction EnforcePythonBuildRequirements +syn keyword conaryPFunction EnforceJavaBuildRequirements +syn keyword conaryPFunction EnforceCILBuildRequirements +syn keyword conaryPFunction EnforcePerlBuildRequirements +syn keyword conaryPFunction EnforceFlagBuildRequirements +syn keyword conaryPFunction FixupMultilibPaths ExecutableLibraries +syn keyword conaryPFunction NormalizeLibrarySymlinks NormalizeCompression +syn keyword conaryPFunction NormalizeManPages NormalizeInfoPages +syn keyword conaryPFunction NormalizeInitscriptLocation +syn keyword conaryPFunction NormalizeInitscriptContents +syn keyword conaryPFunction NormalizeAppDefaults NormalizeInterpreterPaths +syn keyword conaryPFunction NormalizePamConfig ReadableDocs +syn keyword conaryPFunction WorldWriteableExecutables NormalizePkgConfig +syn keyword conaryPFunction EtcConfig InstallBucket SupplementalGroup +syn keyword conaryPFunction FixBuilddirSymlink RelativeSymlinks + +" Most destdirPolicy aren't called from recipes, except for these +syn keyword conaryPFunction AutoDoc RemoveNonPackageFiles TestSuiteFiles +syn keyword conaryPFunction TestSuiteLinks + +syn match conaryMacro "%(\w\+)[sd]" contained +syn match conaryBadMacro "%(\w*)[^sd]" contained " no final marker +syn keyword conaryArches contained x86 x86_64 alpha ia64 ppc ppc64 s390 +syn keyword conaryArches contained sparc sparc64 +syn keyword conarySubArches contained sse2 3dnow 3dnowext cmov i486 i586 +syn keyword conarySubArches contained i686 mmx mmxext nx sse sse2 +syn keyword conaryBad RPM_BUILD_ROOT EtcConfig InstallBucket subDir +syn keyword conaryBad RPM_OPT_FLAGS subdir +syn cluster conaryArchFlags contains=conaryArches,conarySubArches +syn match conaryArch "Arch\.[a-z0-9A-Z]\+" contains=conaryArches,conarySubArches +syn match conaryArch "Arch\.[a-z0-9A-Z]\+" contains=conaryArches,conarySubArches +syn keyword conaryKeywords name buildRequires version clearBuildReqs +syn keyword conaryUseFlag contained pcre tcpwrappers gcj gnat selinux pam +syn keyword conaryUseFlag contained bootstrap python perl +syn keyword conaryUseFlag contained readline gdbm emacs krb builddocs +syn keyword conaryUseFlag contained alternatives tcl tk X gtk gnome qt +syn keyword conaryUseFlag contained xfce gd ldap sasl pie desktop ssl kde +syn keyword conaryUseFlag contained slang netpbm nptl ipv6 buildtests +syn keyword conaryUseFlag contained ntpl xen dom0 domU +syn match conaryUse "Use\.[a-z0-9A-Z]\+" contains=conaryUseFlag + +" strings +syn region pythonString matchgroup=Normal start=+[uU]\='+ end=+'+ skip=+\\\\\|\\'+ contains=pythonEscape,conaryMacro,conaryBadMacro +syn region pythonString matchgroup=Normal start=+[uU]\="+ end=+"+ skip=+\\\\\|\\"+ contains=pythonEscape,conaryMacro,conaryBadMacro +syn region pythonString matchgroup=Normal start=+[uU]\="""+ end=+"""+ contains=pythonEscape,conaryMacro,conaryBadMacro +syn region pythonString matchgroup=Normal start=+[uU]\='''+ end=+'''+ contains=pythonEscape,conaryMacro,conaryBadMacro +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'+ end=+'+ skip=+\\\\\|\\'+ contains=conaryMacro,conaryBadMacro +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"+ end=+"+ skip=+\\\\\|\\"+ contains=conaryMacro,conaryBadMacro +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"""+ end=+"""+ contains=conaryMacro,conaryBadMacro +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'''+ end=+'''+ contains=conaryMacro,conaryBadMacro + +hi def link conaryMacro Special +hi def link conaryrecipeFunction Function +hi def link conaryError Error +hi def link conaryBFunction conaryrecipeFunction +hi def link conaryGFunction conaryrecipeFunction +hi def link conarySFunction Operator +hi def link conaryPFunction Typedef +hi def link conaryFlags PreCondit +hi def link conaryArches Special +hi def link conarySubArches Special +hi def link conaryBad conaryError +hi def link conaryBadMacro conaryError +hi def link conaryKeywords Special +hi def link conaryUseFlag Typedef + +let b:current_syntax = "conaryrecipe" + diff --git a/syntax/conf.vim b/syntax/conf.vim new file mode 100644 index 000000000..92a9002b7 --- /dev/null +++ b/syntax/conf.vim @@ -0,0 +1,30 @@ +if polyglot#init#is_disabled(expand(':p'), 'conf', 'syntax/conf.vim') + finish +endif + +" Vim syntax file +" Language: generic configure file +" Maintainer: Bram Moolenaar +" Last Change: 2021 May 01 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn keyword confTodo contained TODO FIXME XXX +" Avoid matching "text#text", used in /etc/disktab and /etc/gettytab +syn match confComment "^#.*" contains=confTodo,@Spell +syn match confComment "\s#.*"ms=s+1 contains=confTodo,@Spell +syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline +syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link confComment Comment +hi def link confTodo Todo +hi def link confString String + +let b:current_syntax = "conf" + +" vim: ts=8 sw=2 diff --git a/syntax/config.vim b/syntax/config.vim new file mode 100644 index 000000000..711006e2e --- /dev/null +++ b/syntax/config.vim @@ -0,0 +1,58 @@ +if polyglot#init#is_disabled(expand(':p'), 'config', 'syntax/config.vim') + finish +endif + +" Vim syntax file +" Language: configure.in script: M4 with sh +" Former Maintainer: Christian Hammesr +" Last Change: 2018 Feb 03 +" (patch from Yngve Inntjore Levinsen to detect AC_MSG) +" (patch from Khym Chanur to add @Spell) +" (patch from James McCoy to fix paren matching) + +" Well, I actually even do not know much about m4. This explains why there +" is probably very much missing here, yet ! +" But I missed good highlighting when editing my GNU autoconf/automake +" script, so I wrote this quick and dirty patch. + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" define the config syntax +syn match configdelimiter "[()\[\];,]" +syn match configoperator "[=|&\*\+\<\>]" +syn match configcomment "\(dnl.*\)\|\(#.*\)" contains=configDnl,@Spell +syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" +syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" +syn keyword configDnl dnl contained +syn keyword configkeyword if then else fi test for in do done +syn keyword configspecial cat rm eval + +" This shortens the script, see syn-ext-match.. +syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell + +" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string. +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell +syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link configdelimiter Delimiter +hi def link configoperator Operator +hi def link configcomment Comment +hi def link configDnl Comment +hi def link configfunction Function +hi def link confignumber Number +hi def link configkeyword Keyword +hi def link configspecial Special +hi def link configstring String +hi def link configmsg String + + +let b:current_syntax = "config" + +" vim: ts=4 diff --git a/syntax/cpp.vim b/syntax/cpp.vim index 5ccc7d3d8..db95a78dc 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -1,16 +1,21 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1 +if polyglot#init#is_disabled(expand(':p'), 'c/c++', 'syntax/cpp.vim') + finish +endif " Vim syntax file " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan -" Last Change: 2017 Jun 05 +" Last Change: 2021 May 04 " quit when a syntax file was already loaded if exists("b:current_syntax") finish endif +" inform C syntax that the file was included from cpp.vim +let b:filetype_in_cpp_family = 1 + " Read the C syntax to start with runtime! syntax/c.vim unlet b:current_syntax @@ -43,28 +48,54 @@ if !exists("cpp_no_cpp11") syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE - syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell + syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"\(sv\|s\|_[_a-zA-Z][_a-zA-Z0-9]*\)\=+ contains=@Spell syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1 syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$" endif " C++ 14 extensions if !exists("cpp_no_cpp14") - syn case ignore - syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" - syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat - syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" - syn case match + syn match cppNumbers display transparent "\<\d\|\.\d" contains=cppNumber,cppFloat + syn match cppNumber display contained "\<0\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppNumber display contained "\<0\o\+\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\([Uu]\=\([Ll]\|LL\|ll\)\|\([Ll]\|LL\|ll\)\=[Uu]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppFloat display contained "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppFloat display contained "\<\.\d\+\(e[-+]\=\d\+\)\=\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn match cppFloat display contained "\<\d\+e[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + syn region cppString start=+\(L\|u\|u8\|U\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"\(sv\|s\|_\i*\)\=+ end='$' contains=cSpecial,cFormat,@Spell endif " C++ 17 extensions if !exists("cpp_no_cpp17") syn match cppCast "\" + syn match cppFloat display contained "\<0x\x\+\.\=p[-+]\=\d\+\([FfLl]\|i[fl]\=\|h\|min\|s\|ms\|us\|ns\|_\i*\)\=\>" + + " TODO: push this up to c.vim if/when supported in C23 + syn match cppCharacter "u8'[^\\]'" + syn match cppCharacter "u8'[^']*'" contains=cSpecial + if exists("c_gnu") + syn match cppSpecialError "u8'\\[^'\"?\\abefnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abefnrtv]'" + else + syn match cppSpecialError "u8'\\[^'\"?\\abfnrtv]'" + syn match cppSpecialCharacter "u8'\\['\"?\\abfnrtv]'" + endif + syn match cppSpecialCharacter display "u8'\\\o\{1,3}'" + syn match cppSpecialCharacter display "u8'\\x\x\+'" + endif " C++ 20 extensions if !exists("cpp_no_cpp20") + syn match cppNumber display contained "\<0\(y\|d\)\>" + syn match cppNumber display contained "\<[1-9]\('\=\d\+\)*\(y\|d\)\>" + syn match cppNumber display contained "\<0\o\+\(y\|d\)\>" + syn match cppNumber display contained "\<0b[01]\('\=[01]\+\)*\(y\|d\)\>" + syn match cppNumber display contained "\<0x\x\('\=\x\+\)*\(y\|d\)\>" syn keyword cppStatement co_await co_return co_yield requires syn keyword cppStorageClass consteval constinit syn keyword cppStructure concept @@ -76,24 +107,27 @@ endif syn match cppMinMax "[<>]?" " Default highlighting -hi def link cppAccess cppStatement -hi def link cppCast cppStatement +hi def link cppAccess cppStatement +hi def link cppCast cppStatement hi def link cppExceptions Exception -hi def link cppOperator Operator +hi def link cppOperator Operator hi def link cppStatement Statement -hi def link cppModifier Type -hi def link cppType Type -hi def link cppStorageClass StorageClass +hi def link cppModifier Type +hi def link cppType Type +hi def link cppStorageClass StorageClass hi def link cppStructure Structure -hi def link cppBoolean Boolean -hi def link cppConstant Constant +hi def link cppBoolean Boolean +hi def link cppCharacter cCharacter +hi def link cppSpecialCharacter cSpecialCharacter +hi def link cppSpecialError cSpecialError +hi def link cppConstant Constant hi def link cppRawStringDelimiter Delimiter hi def link cppRawString String -hi def link cppNumber Number -hi def link cppModule Include +hi def link cppString String +hi def link cppNumber Number +hi def link cppFloat Number +hi def link cppModule Include let b:current_syntax = "cpp" " vim: ts=8 - -endif diff --git a/syntax/cql.vim b/syntax/cql.vim index 2b6eeea57..8e5002e94 100644 --- a/syntax/cql.vim +++ b/syntax/cql.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cql', 'syntax/cql.vim') + finish +endif " Vim syntax file " Language: cql @@ -131,5 +133,3 @@ endif let b:current_syntax = "cql" - -endif diff --git a/syntax/crm.vim b/syntax/crm.vim new file mode 100644 index 000000000..105a6591e --- /dev/null +++ b/syntax/crm.vim @@ -0,0 +1,45 @@ +if polyglot#init#is_disabled(expand(':p'), 'crm', 'syntax/crm.vim') + finish +endif + +" Vim syntax file +" Language: CRM114 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword crmTodo contained TODO FIXME XXX NOTE + +syn region crmComment display oneline start='#' end='\\#' + \ contains=crmTodo,@Spell + +syn match crmVariable display ':[*#@]:[^:]\{-1,}:' + +syn match crmSpecial display '\\\%(x\x\x\|o\o\o\o\|[]nrtabvf0>)};/\\]\)' + +syn keyword crmStatement insert noop accept alius alter classify eval exit +syn keyword crmStatement fail fault goto hash intersect isolate input learn +syn keyword crmStatement liaf match output syscall trap union window + +syn region crmRegex start='/' skip='\\/' end='/' contains=crmVariable + +syn match crmLabel display '^\s*:[[:graph:]]\+:' + +hi def link crmTodo Todo +hi def link crmComment Comment +hi def link crmVariable Identifier +hi def link crmSpecial SpecialChar +hi def link crmStatement Statement +hi def link crmRegex String +hi def link crmLabel Label + +let b:current_syntax = "crm" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/crontab.vim b/syntax/crontab.vim new file mode 100644 index 000000000..9bb0db175 --- /dev/null +++ b/syntax/crontab.vim @@ -0,0 +1,71 @@ +if polyglot#init#is_disabled(expand(':p'), 'crontab', 'syntax/crontab.vim') + finish +endif + +" Vim syntax file +" Language: crontab +" Maintainer: David Necas (Yeti) +" Original Maintainer: John Hoelzel johnh51@users.sourceforge.net +" License: This file can be redistribued and/or modified under the same terms +" as Vim itself. +" Filenames: /tmp/crontab.* used by "crontab -e" +" Last Change: 2015-01-20 +" +" crontab line format: +" Minutes Hours Days Months Days_of_Week Commands # comments + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite + +syntax match crontabVar "^\s*\k\w*\s*="me=e-1 + +syntax case ignore + +syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite +syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained +syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained + +syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained +syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec + +syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained +syntax keyword crontabDow7 contained sun mon tue wed thu fri sat + +syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent +syntax match crontabCmnt "^\s*#.*" contains=@Spell +syntax match crontabPercent "[^\\]%.*"lc=1 contained + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link crontabMin Number +hi def link crontabHr PreProc +hi def link crontabDay Type + +hi def link crontabMnth Number +hi def link crontabMnth12 Number +hi def link crontabMnthS Number +hi def link crontabMnthN Number + +hi def link crontabDow PreProc +hi def link crontabDow7 PreProc +hi def link crontabDowS PreProc +hi def link crontabDowN PreProc + +hi def link crontabNick Special +hi def link crontabVar Identifier +hi def link crontabPercent Special + +" comment out next line for to suppress unix commands coloring. +hi def link crontabCmd Statement + +hi def link crontabCmnt Comment + + +let b:current_syntax = "crontab" + +" vim: ts=8 diff --git a/syntax/cryptol.vim b/syntax/cryptol.vim index 97992369a..8cb7804d0 100644 --- a/syntax/cryptol.vim +++ b/syntax/cryptol.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cryptol', 'syntax/cryptol.vim') + finish +endif " Vim syntax file " Language: Cryptol @@ -113,5 +115,3 @@ endif let b:current_syntax = "cryptol" " Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim - -endif diff --git a/syntax/crystal.vim b/syntax/crystal.vim index fb1b200f9..ebac0b235 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'syntax/crystal.vim') + finish +endif " Language: Crystal " Maintainer: @@ -91,14 +93,8 @@ syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" syn match crystalStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=TOP -syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable -syn match crystalInterpolationDelim "#\ze\%(\$\|@@\=\)\w\+" display contained -syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable -syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained syn region crystalNoInterpolation start="\\#{" end="}" contained syn match crystalNoInterpolation "\\#{" display contained -syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained -syn match crystalNoInterpolation "\\#\$\W" display contained syn match crystalDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE @@ -141,7 +137,7 @@ syn match crystalFloat "\<\d[[:digit:]_]*\%(\.\d[[:digit:]_]*\)\=\%([eE][-+] syn match crystalInvalidInteger "\%(\.\|[eE][+-]\)\@2" contained containedin=crystalFloat,crystalInteger display " Identifiers -syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent +syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display syn match crystalBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent syn match crystalTypeName "\%(\%([.@$]\@1\|::\)\@=" contained @@ -154,7 +150,6 @@ syn match crystalAnnotationName "\%(\%([.@$]\@1\|::\)\@=" syn match crystalClassVariable "@@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display syn match crystalInstanceVariable "@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display -syn match crystalGlobalVariable "$\%(\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\|-.\)" syn match crystalFreshVariable "\%(\h\|[^\x00-\x7F]\)\@1\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" syn match crystalSymbol "[]})\"':]\@1_,;:!?/.'"@$*\&+0]\)" @@ -170,17 +165,11 @@ SynFold ':' syn region crystalSymbol start="[]})\"':]\@1\|{\)\s*\)\@<=|" end="|" oneline display contains=crystalBlockParameter -syn match crystalInvalidVariable "$[^ %A-Za-z_-]" -syn match crystalPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# -syn match crystalPredefinedVariable "$\d\+" display -syn match crystalPredefinedVariable "$_\>" display -syn match crystalPredefinedVariable "$-[0FIKadilpvw]\>" display -syn match crystalPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display -syn match crystalPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display -syn match crystalPredefinedConstant "\%(\%(\.\@1\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@1\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@1\%(\s*(\)\@!" -syn match crystalPredefinedConstant "\%(\%(\.\@1\%(\s*(\)\@!" +" In Crystal, almost all special variables were removed and global variables +" are not supported https://github.com/crystal-lang/crystal/commit/e872c716d0e936557b34c614efc5a4c24d845f79 +" NOTE: Only $~ and $? are supported since they are actually not global. +syn match crystalPredefinedVariable "$[~?]" +syn match crystalPredefinedConstant "\%(\%(\.\@1\%(\s*(\)\@!" " Normal Regular Expression SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|in\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial @@ -248,9 +237,9 @@ SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\ SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@[?!]\@!" -syn match crystalKeyword "\<\%(super\|previous_def\|yield\|of\|with\|uninitialized\|union\)\>[?!]\@!" +syn match crystalKeyword "\<\%(super\|previous_def\|yield\|of\|with\|uninitialized\|union\|out\)\>[?!]\@!" syn match crystalBoolean "\<\%(true\|false\)\>[?!]\@!" syn match crystalPseudoVariable "\<\%(nil\|__DIR__\|__FILE__\|__LINE__\|__END_LINE__\)\>[?!]\@!" " TODO: reorganise -syn match crystalPseudoVariable "\" +syn match crystalPseudoVariable "\[?!]\@!" " Expensive Mode - match 'end' with the appropriate opening keyword for syntax " based folding and special highlighting of module/class/method definitions @@ -281,7 +270,6 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive') syn match crystalDefine "\" nextgroup=crystalAliasDeclaration skipwhite skipnl syn match crystalDefine "\" nextgroup=crystalMethodDeclaration skipwhite skipnl syn match crystalDefine "\" nextgroup=crystalFunctionDeclaration skipwhite skipnl - syn match crystalDefine "\" nextgroup=crystalFunction skipwhite skipnl syn match crystalDefine "\<\%(type\|alias\)\>\%(\s*\h\w*\s*=\)\@=" nextgroup=crystalTypeDeclaration skipwhite skipnl syn match crystalClass "\" nextgroup=crystalClassDeclaration skipwhite skipnl syn match crystalModule "\" nextgroup=crystalModuleDeclaration skipwhite skipnl @@ -291,13 +279,17 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive') syn match crystalEnum "\" nextgroup=crystalEnumDeclaration skipwhite skipnl syn match crystalAnnotation "\" nextgroup=crystalAnnotationDeclaration skipwhite skipnl - SynFold 'def' syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@" contains=TOP - SynFold 'class' syn region crystalBlock start="\" matchgroup=crystalClass end="\" contains=TOP - SynFold 'module' syn region crystalBlock start="\" matchgroup=crystalModule end="\" contains=TOP - SynFold 'struct' syn region crystalBlock start="\" matchgroup=crystalStruct end="\" contains=TOP - SynFold 'lib' syn region crystalBlock start="\" matchgroup=crystalLib end="\" contains=TOP - SynFold 'enum' syn region crystalBlock start="\" matchgroup=crystalEnum end="\" contains=TOP - SynFold 'annotation' syn region crystalBlock start="\" matchgroup=crystalAnnotation end="\" contains=TOP + SynFold 'def' syn region crystalMethodBlock start="\" matchgroup=crystalDefine end="\%(\" contains=TOP,crystalForallKeyword + SynFold 'macro' syn region crystalMethodBlock start="\" matchgroup=crystalDefine end="\%(\" contains=TOP + SynFold 'class' syn region crystalBlock start="\" matchgroup=crystalClass end="\" contains=TOP + SynFold 'module' syn region crystalBlock start="\" matchgroup=crystalModule end="\" contains=TOP + SynFold 'struct' syn region crystalBlock start="\" matchgroup=crystalStruct end="\" contains=TOP + SynFold 'lib' syn region crystalBlock start="\" matchgroup=crystalLib end="\" contains=TOP + SynFold 'enum' syn region crystalBlock start="\" matchgroup=crystalEnum end="\" contains=TOP + SynFold 'annotation' syn region crystalBlock start="\" matchgroup=crystalAnnotation end="\" contains=TOP + + " keywords in method declaration + syn match crystalForallKeyword "\[?!]\@!" contained containedin=crystalMethodBlock " modifiers syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display @@ -339,8 +331,9 @@ else syn match crystalControl "\[?!]\@!" nextgroup=crystalMacroDeclaration skipwhite skipnl syn match crystalControl "\[?!]\@!" nextgroup=crystalEnumDeclaration skipwhite skipnl syn match crystalControl "\[?!]\@!" nextgroup=crystalAnnotationDeclaration skipwhite skipnl - syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!" - syn match crystalKeyword "\<\%(alias\|undef\)\>[?!]\@!" + syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|select\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!" + syn match crystalKeyword "\[?!]\@!" + syn match crystalForallKeyword "\[?!]\@!" endif " Link attribute @@ -351,13 +344,13 @@ if !exists('g:crystal_no_special_methods') syn keyword crystalAccess protected private " attr is a common variable name syn keyword crystalAttribute abstract - syn match crystalAttribute "\<\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\s" display + syn match crystalAttribute "\<\%(\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\|def_\%(clone\|equals\|equals_and_hash\|hash\)\|delegate\|forward_missing_to\)\s" display syn match crystalControl "\<\%(abort\|at_exit\|exit\|fork\|loop\)\>[?!]\@!" display syn keyword crystalException raise " false positive with 'include?' syn match crystalInclude "\[?!]\@!" display syn keyword crystalInclude extend require - syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof + syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof offsetof syn match crystalRecord "\\)" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell + syn match crystalComment "#.*\ze\%($\|-\=%>\)" contains=crystalSharpBang,crystalSpaceError,crystalTodo,crystalCommentDirective,@Spell else - syn match crystalComment "#.*" contains=crystalSharpBang,crystalSpaceError,crystalTodo,@Spell + syn match crystalComment "#.*" contains=crystalSharpBang,crystalSpaceError,crystalTodo,crystalCommentDirective,@Spell endif SynFold '#' syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE +syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE syn match crystalKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE -syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE +syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|unless\|until\|while\)[?!]" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE -syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE +syn match crystalKeywordAsMethod "\%(\%(\.\@1" transparent contains=NONE hi def link crystalClass crystalDefine hi def link crystalModule crystalDefine @@ -448,7 +442,6 @@ hi def link crystalStructName crystalConstant hi def link crystalLibName crystalConstant hi def link crystalEnumName crystalConstant hi def link crystalAnnotationName crystalConstant -hi def link crystalGlobalVariable crystalIdentifier hi def link crystalBlockParameter crystalIdentifier hi def link crystalInstanceVariable crystalIdentifier hi def link crystalFreshVariable crystalIdentifier @@ -464,6 +457,7 @@ hi def link crystalPseudoVariable Constant hi def link crystalCharLiteral Character hi def link crystalComment Comment hi def link crystalTodo Todo +hi def link crystalCommentDirective SpecialComment hi def link crystalStringEscape Special hi def link crystalInterpolationDelim Delimiter hi def link crystalNoInterpolation crystalString @@ -484,9 +478,9 @@ hi def link crystalRegexp crystalString hi def link crystalMacro PreProc hi def link crystalMacroDelim crystalMacro hi def link crystalMacroKeyword crystalKeyword +hi def link crystalForallKeyword crystalDefine hi def link crystalLinkAttrDelim crystalMacroDelim hi def link crystalError Error -hi def link crystalInvalidVariable crystalError hi def link crystalSpaceError crystalError hi def link crystalInvalidInteger crystalError @@ -495,5 +489,3 @@ let b:current_syntax = 'crystal' delc SynFold " vim: sw=2 sts=2 et: - -endif diff --git a/syntax/cs.vim b/syntax/cs.vim new file mode 100644 index 000000000..ca7995613 --- /dev/null +++ b/syntax/cs.vim @@ -0,0 +1,228 @@ +if polyglot#init#is_disabled(expand(':p'), 'cs', 'syntax/cs.vim') + finish +endif + +" Vim syntax file +" Language: C# +" Maintainer: Nick Jensen +" Former Maintainers: Anduin Withers +" Johannes Zellner +" Last Change: 2020-11-23 +" Filenames: *.cs +" License: Vim (see :h license) +" Repository: https://github.com/nickspoons/vim-cs +" +" REFERENCES: +" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc) + +if exists('b:current_syntax') + finish +endif + +let s:save_cpo = &cpoptions +set cpoptions&vim + +syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic +syn keyword csStorage delegate enum interface namespace struct +syn keyword csRepeat break continue do for foreach goto return while +syn keyword csConditional else if switch +syn keyword csLabel case default +syn match csOperatorError display +::+ +syn match csGlobal display +global::+ +" user labels (see [1] 8.6 Statements) +syn match csLabel display +^\s*\I\i*\s*:\%([^:]\)\@=+ +syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile +syn keyword csConstant false null true +syn keyword csException try catch finally throw when +syn keyword csLinq ascending by descending equals from group in into join let on orderby select where +syn keyword csAsync async await + +syn keyword csUnspecifiedStatement as base checked event fixed in is lock nameof operator out params ref sizeof stackalloc this unchecked unsafe using +syn keyword csUnsupportedStatement add remove value +syn keyword csUnspecifiedKeyword explicit implicit + +" Contextual Keywords +syn match csContextualStatement /\/me=s+3 +syn match csContextualStatement /\[^:]\+:/me=s+5 + +" Operators +syn keyword csTypeOf typeof contained +syn region csTypeOfStatement start="typeof(" end=")" contains=csType, csTypeOf + +" Punctuation +syn match csBraces "[{}\[\]]" display +syn match csParens "[()]" display +syn match csOpSymbols "+\{1,2}" display +syn match csOpSymbols "-\{1,2}" display +syn match csOpSymbols "=\{1,2}" display +syn match csOpSymbols ">\{1,2}" display +syn match csOpSymbols "<\{1,2}" display +syn match csOpSymbols "[!><+\-*/]=" display +syn match csOpSymbols "[!*/^]" display +syn match csOpSymbols "=>" display +syn match csEndColon ";" display +syn match csLogicSymbols "&&" display +syn match csLogicSymbols "||" display +syn match csLogicSymbols "?" display +syn match csLogicSymbols ":" display + +" Generics +syn region csGeneric matchgroup=csGenericBraces start="<" end=">" oneline contains=csType,csGeneric,csUserType,csUserIdentifier,csUserInterface,csUserMethod + +" Comments +" +" PROVIDES: @csCommentHook +syn keyword csTodo contained TODO FIXME XXX NOTE HACK TBD +syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell +syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell + +" xml markup inside '///' comments +syn cluster xmlRegionHook add=csXmlCommentLeader +syn cluster xmlCdataHook add=csXmlCommentLeader +syn cluster xmlStartTagHook add=csXmlCommentLeader +syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName +syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo +syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base +syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute +syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue +syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage +syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary +syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote +syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript +syn keyword csXmlTag contained list listheader item term description altcompliant altmember + +syn cluster xmlTagHook add=csXmlTag + +syn match csXmlCommentLeader "///" contained +syn match csXmlComment "///.*$" contains=csXmlCommentLeader,@csXml,@Spell keepend +syn include @csXml syntax/xml.vim +hi def link xmlRegion Comment + +" Since syntax/xml.vim contains `syn spell toplevel`, we need to set it back to `default` here. +syn spell default + +" [1] 9.5 Pre-processing directives +syn region csPreCondit start="^\s*#\s*\%(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\|pragma\)\>" skip="\\$" end="$" contains=csComment keepend +syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$" end="^\s*#\s*endregion" transparent fold contains=TOP +syn region csSummary start="^\s*/// " display +syn match csNumber "\<0[xX][[:xdigit:]_]\+[lL]\=\>" display +syn match csNumber "\<0[bB][01_]\+[lL]\=\>" display +syn match csNumber "\<[[:digit:]_]\+[lL]\=\>" display +syn match csNumber "\<[[:digit:]_]\+\.[[:digit:]_]*\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\=" display +syn match csNumber "\.[[:digit:]_]\+\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\=" display +syn match csNumber "\<[[:digit:]_]\+[eE][-+]\=[[:digit:]_]\+[fFdDmM]\=\>" display +syn match csNumber "\<[[:digit:]_]\+\%\([eE][-+]\=[[:digit:]_]\+\)\=[fFdDmM]\>" display + +syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell + +syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat +syn match csEscapedInterpolation "{{" transparent contains=NONE display +syn match csEscapedInterpolation "}}" transparent contains=NONE display +syn region csInterpolationAlign matchgroup=csInterpolationAlignDel start=+,+ end=+}+ end=+:+me=e-1 contained contains=csNumber,csConstant,csCharacter,csParens,csOpSymbols,csString,csBracketed display +syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFormatDel display +syn match csInterpolationAlignDel +,+ contained display +syn match csInterpolationFormatDel +:+ contained display + +syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell +syn match csVerbatimQuote +""+ contained +syn match csQuoteError +@$"+he=s+2,me=s+2 + +syn region csInterVerbString matchgroup=csQuote start=+\$@"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell + +syn region csBracketed matchgroup=csParens start=+(+ end=+)+ extend contained transparent contains=@csAll,csBraced,csBracketed +syn region csBraced matchgroup=csParens start=+{+ end=+}+ extend contained transparent contains=@csAll,csBraced,csBracketed + +syn cluster csAll contains=csCharacter,csClassType,csComment,csContextualStatement,csEndColon,csIsType,csLabel,csLogicSymbols,csNewType,csConstant,csNumber,csOpSymbols,csOperatorError,csParens,csPreCondit,csRegion,csString,csSummary,csType,csUnicodeNumber,csUnicodeSpecifier,csInterpolatedString,csVerbatimString,csInterVerbString,csUserType,csUserIdentifier,csUserInterface,csUserMethod + +" The default highlighting. +hi def link csType Type +hi def link csClassType Type +hi def link csIsType Type +hi def link csStorage Structure +hi def link csClass Structure +hi def link csRepeat Repeat +hi def link csConditional Conditional +hi def link csLabel Label +hi def link csModifier StorageClass +hi def link csConstant Constant +hi def link csException Exception +hi def link csTypeOf Keyword +hi def link csTypeOfStatement Typedef +hi def link csUnspecifiedStatement Statement +hi def link csUnsupportedStatement Statement +hi def link csUnspecifiedKeyword Keyword +hi def link csNew Statement +hi def link csLinq Statement +hi def link csIsAs Keyword +hi def link csAsync Keyword +hi def link csContextualStatement Statement +hi def link csOperatorError Error + +hi def link csTodo Todo +hi def link csComment Comment + +hi def link csOpSymbols Operator +hi def link csLogicSymbols Operator + +hi def link csSpecialError Error +hi def link csSpecialCharError Error +hi def link csString String +hi def link csQuote String +hi def link csQuoteError Error +hi def link csInterpolatedString String +hi def link csVerbatimString String +hi def link csInterVerbString String +hi def link csVerbatimQuote SpecialChar +hi def link csPreCondit PreCondit +hi def link csCharacter Character +hi def link csSpecialChar SpecialChar +hi def link csNumber Number +hi def link csUnicodeNumber SpecialChar +hi def link csUnicodeSpecifier SpecialChar +hi def link csInterpolationDelimiter Delimiter +hi def link csInterpolationAlignDel csInterpolationDelimiter +hi def link csInterpolationFormat csInterpolationDelimiter +hi def link csInterpolationFormatDel csInterpolationDelimiter + +hi def link csGenericBraces csBraces + +" xml markup +hi def link csXmlCommentLeader Comment +hi def link csXmlComment Comment +hi def link csXmlTag Statement + +let b:current_syntax = 'cs' + +let &cpoptions = s:save_cpo +unlet s:save_cpo + +" vim: vts=16,28 diff --git a/syntax/csc.vim b/syntax/csc.vim new file mode 100644 index 000000000..04f58950e --- /dev/null +++ b/syntax/csc.vim @@ -0,0 +1,195 @@ +if polyglot#init#is_disabled(expand(':p'), 'csc', 'syntax/csc.vim') + finish +endif + +" Vim syntax file +" Language: Essbase script +" Maintainer: Raul Segura Acevedo +" Last change: 2011 Dec 25 by Thilo Six + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" folds: fix/endfix and comments +sy region EssFold start="\" +"hex number +sy match cscNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +sy match cscOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" +sy match cscFloat contained "\d\+f" +"floating point number, with dot, optional exponent +sy match cscFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +sy match cscFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +sy match cscFloat contained "\d\+e[-+]\=\d\+[fl]\=\>" + +sy region cscComment start="/\*" end="\*/" contains=@cscCommentGroup,cscSpaceE fold +sy match cscCommentE "\*/" + +sy keyword cscIfError IF ELSE ENDIF ELSEIF +sy keyword cscCondition contained IF ELSE ENDIF ELSEIF +sy keyword cscFunction contained VARPER VAR UDA TRUNCATE SYD SUMRANGE SUM +sy keyword cscFunction contained STDDEVRANGE STDDEV SPARENTVAL SLN SIBLINGS SHIFT +sy keyword cscFunction contained SANCESTVAL RSIBLINGS ROUND REMAINDER RELATIVE PTD +sy keyword cscFunction contained PRIOR POWER PARENTVAL NPV NEXT MOD MINRANGE MIN +sy keyword cscFunction contained MDSHIFT MDPARENTVAL MDANCESTVAL MAXRANGE MAX MATCH +sy keyword cscFunction contained LSIBLINGS LEVMBRS LEV +sy keyword cscFunction contained ISUDA ISSIBLING ISSAMELEV ISSAMEGEN ISPARENT ISMBR +sy keyword cscFunction contained ISLEV ISISIBLING ISIPARENT ISIDESC ISICHILD ISIBLINGS +sy keyword cscFunction contained ISIANCEST ISGEN ISDESC ISCHILD ISANCEST ISACCTYPE +sy keyword cscFunction contained IRSIBLINGS IRR INTEREST INT ILSIBLINGS IDESCENDANTS +sy keyword cscFunction contained ICHILDREN IANCESTORS IALLANCESTORS +sy keyword cscFunction contained GROWTH GENMBRS GEN FACTORIAL DISCOUNT DESCENDANTS +sy keyword cscFunction contained DECLINE CHILDREN CURRMBRRANGE CURLEV CURGEN +sy keyword cscFunction contained COMPOUNDGROWTH COMPOUND AVGRANGE AVG ANCESTVAL +sy keyword cscFunction contained ANCESTORS ALLANCESTORS ACCUM ABS +sy keyword cscFunction contained @VARPER @VAR @UDA @TRUNCATE @SYD @SUMRANGE @SUM +sy keyword cscFunction contained @STDDEVRANGE @STDDEV @SPARENTVAL @SLN @SIBLINGS @SHIFT +sy keyword cscFunction contained @SANCESTVAL @RSIBLINGS @ROUND @REMAINDER @RELATIVE @PTD +sy keyword cscFunction contained @PRIOR @POWER @PARENTVAL @NPV @NEXT @MOD @MINRANGE @MIN +sy keyword cscFunction contained @MDSHIFT @MDPARENTVAL @MDANCESTVAL @MAXRANGE @MAX @MATCH +sy keyword cscFunction contained @LSIBLINGS @LEVMBRS @LEV +sy keyword cscFunction contained @ISUDA @ISSIBLING @ISSAMELEV @ISSAMEGEN @ISPARENT @ISMBR +sy keyword cscFunction contained @ISLEV @ISISIBLING @ISIPARENT @ISIDESC @ISICHILD @ISIBLINGS +sy keyword cscFunction contained @ISIANCEST @ISGEN @ISDESC @ISCHILD @ISANCEST @ISACCTYPE +sy keyword cscFunction contained @IRSIBLINGS @IRR @INTEREST @INT @ILSIBLINGS @IDESCENDANTS +sy keyword cscFunction contained @ICHILDREN @IANCESTORS @IALLANCESTORS +sy keyword cscFunction contained @GROWTH @GENMBRS @GEN @FACTORIAL @DISCOUNT @DESCENDANTS +sy keyword cscFunction contained @DECLINE @CHILDREN @CURRMBRRANGE @CURLEV @CURGEN +sy keyword cscFunction contained @COMPOUNDGROWTH @COMPOUND @AVGRANGE @AVG @ANCESTVAL +sy keyword cscFunction contained @ANCESTORS @ALLANCESTORS @ACCUM @ABS +sy match cscFunction contained "@" +sy match cscError "@\s*\a*" contains=cscFunction + +sy match cscStatement "&" +sy keyword cscStatement AGG ARRAY VAR CCONV CLEARDATA DATACOPY + +sy match cscComE contained "^\s*CALC.*" +sy match cscComE contained "^\s*CLEARBLOCK.*" +sy match cscComE contained "^\s*SET.*" +sy match cscComE contained "^\s*FIX" +sy match cscComE contained "^\s*ENDFIX" +sy match cscComE contained "^\s*ENDLOOP" +sy match cscComE contained "^\s*LOOP" +" sy keyword cscCom FIX ENDFIX LOOP ENDLOOP + +sy match cscComW "^\s*CALC.*" +sy match cscCom "^\s*CALC\s*ALL" +sy match cscCom "^\s*CALC\s*AVERAGE" +sy match cscCom "^\s*CALC\s*DIM" +sy match cscCom "^\s*CALC\s*FIRST" +sy match cscCom "^\s*CALC\s*LAST" +sy match cscCom "^\s*CALC\s*TWOPASS" + +sy match cscComW "^\s*CLEARBLOCK.*" +sy match cscCom "^\s*CLEARBLOCK\s\+ALL" +sy match cscCom "^\s*CLEARBLOCK\s\+UPPER" +sy match cscCom "^\s*CLEARBLOCK\s\+NONINPUT" + +sy match cscComW "^\s*\{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' + sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition + sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained + sy match cscEq "==" +endif + +if !exists("csc_minlines") + let csc_minlines = 50 " mostly for () constructs +endif +exec "sy sync ccomment cscComment minlines=" . csc_minlines + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue + +hi def link cscNumber Number +hi def link cscOctal Number +hi def link cscFloat Float +hi def link cscParenE Error +hi def link cscCommentE Error +hi def link cscSpaceE Error +hi def link cscError Error +hi def link cscString String +hi def link cscComment Comment +hi def link cscTodo Todo +hi def link cscStatement Statement +hi def link cscIfError Error +hi def link cscEqError Error +hi def link cscFunction Statement +hi def link cscCondition Statement +hi def link cscWarn WarningMsg + +hi def link cscComE Error +hi def link cscCom Statement +hi def link cscComW WarningMsg + +hi def link cscBPMacro Identifier +hi def link cscBPW WarningMsg + + +let b:current_syntax = "csc" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/csdl.vim b/syntax/csdl.vim new file mode 100644 index 000000000..289e0e448 --- /dev/null +++ b/syntax/csdl.vim @@ -0,0 +1,540 @@ +if polyglot#init#is_disabled(expand(':p'), 'csdl', 'syntax/csdl.vim') + finish +endif + +" Vim syntax file +" Language: Curated Stream Definition Language (CSDL) +" Maintainer: Jacek Artymiak +" Latest Revision: 25 February 2013 + +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=.,@,48-57,_,192-255 +syn case ignore + +syn match csdlKeyword "tag " +syn match csdlKeyword "stream " +syn match csdlKeyword "return " + +syn keyword csdlOperator contains +syn match csdlOperator "cs contains" +syn keyword csdlOperator substr +syn match csdlOperator "cs substr" +syn keyword csdlOperator contains_any +syn match csdlOperator "cs contains_any" +syn keyword csdlOperator any +syn match csdlOperator "cs any" +syn keyword csdlOperator contains_near +syn match csdlOperator "cs contains_near" +syn keyword csdlOperator exists +syn keyword csdlOperator in +syn keyword csdlOperator url_in +syn match csdlOperator "==" +syn match csdlOperator "!=" +syn match csdlOperator "cs ==" +syn match csdlOperator "cs !=" +syn match csdlOperator ">" +syn match csdlOperator ">=" +syn match csdlOperator "<" +syn match csdlOperator "<=" +syn keyword csdlOperator regex_partial +syn keyword csdlOperator regex_exact +syn keyword csdlOperator geo_box +syn keyword csdlOperator geo_radius +syn keyword csdlOperator geo_polygon + +syn keyword csdlLogicalOperator and +syn keyword csdlLogicalOperator or +syn keyword csdlLogicalOperator not + +syn match csdlTarget 'reddit\.title' +syn match csdlTarget 'reddit\.content' +syn match csdlTarget 'reddit\.contenttype' +syn match csdlTarget 'reddit\.link' +syn match csdlTarget 'reddit\.author\.name' +syn match csdlTarget 'reddit\.author\.link' +syn match csdlTarget 'reddit\.type' +syn match csdlTarget 'reddit\.thread' +syn match csdlTarget 'interaction\.type' +syn match csdlTarget 'interaction\.title' +syn match csdlTarget 'interaction\.content' +syn match csdlTarget 'interaction\.source' +syn match csdlTarget 'interaction\.geo' +syn match csdlTarget 'interaction\.link' +syn match csdlTarget 'interaction\.author\.username' +syn match csdlTarget 'interaction\.author\.name' +syn match csdlTarget 'interaction\.author\.id' +syn match csdlTarget 'interaction\.author\.avatar' +syn match csdlTarget 'interaction\.author\.link' +syn match csdlTarget 'interaction\.sample' +syn match csdlTarget 'links\.title' +syn match csdlTarget 'links\.url' +syn keyword csdlTarget links.normalized_url +syn match csdlTarget 'links\.hops' +syn match csdlTarget 'links\.code' +syn match csdlTarget 'links\.domain' +syn keyword csdlTarget links.retweet_count +syn match csdlTarget 'links\.age' +syn keyword csdlTarget links.meta.content_type +syn match csdlTarget 'links\.meta\.charset' +syn match csdlTarget 'links\.meta\.lang' +syn match csdlTarget 'links\.meta\.keywords' +syn match csdlTarget 'links\.meta\.description' +syn match csdlTarget 'links\.meta\.newskeywords' +syn match csdlTarget 'links\.meta\.standout' +syn match csdlTarget 'links\.meta\.opengraph\.type' +syn match csdlTarget 'links\.meta\.opengraph\.title' +syn match csdlTarget 'links\.meta\.opengraph\.image' +syn match csdlTarget 'links\.meta\.opengraph\.url' +syn match csdlTarget 'links\.meta\.opengraph\.description' +syn keyword csdlTarget links.meta.opengraph.site_name +syn match csdlTarget 'links\.meta\.opengraph\.email' +syn keyword csdlTarget links.meta.opengraph.phone_number +syn keyword csdlTarget links.meta.opengraph.fax_number +syn match csdlTarget 'links\.meta\.opengraph\.geo' +syn keyword csdlTarget links.meta.opengraph.street_address +syn match csdlTarget 'links\.meta\.opengraph\.locality' +syn match csdlTarget 'links\.meta\.opengraph\.region' +syn keyword csdlTarget links.meta.opengraph.postal_code +syn match csdlTarget 'links\.meta\.opengraph\.activity' +syn match csdlTarget 'links\.meta\.opengraph\.sport' +syn match csdlTarget 'links\.meta\.opengraph\.bar' +syn match csdlTarget 'links\.meta\.opengraph\.company' +syn match csdlTarget 'links\.meta\.opengraph\.cafe' +syn match csdlTarget 'links\.meta\.opengraph\.hotel' +syn match csdlTarget 'links\.meta\.opengraph\.restaurant' +syn match csdlTarget 'links\.meta\.opengraph\.cause' +syn keyword csdlTarget links.meta.opengraph.sports_league +syn keyword csdlTarget links.meta.opengraph.sports_team +syn match csdlTarget 'links\.meta\.opengraph\.band' +syn match csdlTarget 'links\.meta\.opengraph\.government' +syn keyword csdlTarget links.meta.opengraph.non_profit +syn match csdlTarget 'links\.meta\.opengraph\.school' +syn match csdlTarget 'links\.meta\.opengraph\.university' +syn match csdlTarget 'links\.meta\.opengraph\.actor' +syn match csdlTarget 'links\.meta\.opengraph\.athlete' +syn match csdlTarget 'links\.meta\.opengraph\.author' +syn match csdlTarget 'links\.meta\.opengraph\.director' +syn match csdlTarget 'links\.meta\.opengraph\.musician' +syn match csdlTarget 'links\.meta\.opengraph\.politician' +syn keyword csdlTarget links.meta.opengraph.public_figure +syn match csdlTarget 'links\.meta\.opengraph\.city' +syn match csdlTarget 'links\.meta\.opengraph\.country' +syn match csdlTarget 'links\.meta\.opengraph\.landmark' +syn keyword csdlTarget links.meta.opengraph.state_province +syn match csdlTarget 'links\.meta\.opengraph\.album' +syn match csdlTarget 'links\.meta\.opengraph\.book' +syn match csdlTarget 'links\.meta\.opengraph\.drink' +syn match csdlTarget 'links\.meta\.opengraph\.food' +syn match csdlTarget 'links\.meta\.opengraph\.game' +syn match csdlTarget 'links\.meta\.opengraph\.movie' +syn match csdlTarget 'links\.meta\.opengraph\.product' +syn match csdlTarget 'links\.meta\.opengraph\.song' +syn keyword csdlTarget links.meta.opengraph.tv_show +syn match csdlTarget 'links\.meta\.opengraph\.blog' +syn match csdlTarget 'links\.meta\.opengraph\.website' +syn match csdlTarget 'links\.meta\.opengraph\.article' +syn match csdlTarget 'links\.meta\.twitter\.card' +syn match csdlTarget 'links\.meta\.twitter\.site' +syn keyword csdlTarget links.meta.twitter.site_id +syn match csdlTarget 'links\.meta\.twitter\.creator' +syn keyword csdlTarget links.meta.twitter.creator_id +syn match csdlTarget 'links\.meta\.twitter\.url' +syn match csdlTarget 'links\.meta\.twitter\.description' +syn match csdlTarget 'links\.meta\.twitter\.title' +syn match csdlTarget 'links\.meta\.twitter\.image' +syn keyword csdlTarget links.meta.twitter.image_width +syn keyword csdlTarget links.meta.twitter.image_height +syn match csdlTarget 'links\.meta\.twitter\.player' +syn keyword csdlTarget links.meta.twitter.player_width +syn keyword csdlTarget links.meta.twitter.player_height +syn keyword csdlTarget links.meta.twitter.player_stream +syn keyword csdlTarget links.meta.twitter.player_stream_content_type +syn match csdlTarget 'myspace\.link' +syn match csdlTarget 'myspace\.content' +syn match csdlTarget 'myspace\.contenttype' +syn match csdlTarget 'myspace\.category' +syn match csdlTarget 'myspace\.author\.username' +syn match csdlTarget 'myspace\.author\.name' +syn match csdlTarget 'myspace\.author\.id' +syn match csdlTarget 'myspace\.author\.link' +syn match csdlTarget 'myspace\.author\.avatar' +syn match csdlTarget 'myspace\.geo' +syn match csdlTarget 'myspace\.verb' +syn match csdlTarget 'newscred\.type' +syn match csdlTarget 'newscred\.article\.domain' +syn match csdlTarget 'newscred\.video\.domain' +syn match csdlTarget 'newscred\.article\.topics' +syn match csdlTarget 'newscred\.video\.topics' +syn match csdlTarget 'newscred\.article\.category' +syn match csdlTarget 'newscred\.video\.category' +syn match csdlTarget 'newscred\.article\.title' +syn match csdlTarget 'newscred\.video\.title' +syn match csdlTarget 'newscred\.article\.content' +syn match csdlTarget 'newscred\.article\.fulltext' +syn match csdlTarget 'newscred\.article\.authors' +syn match csdlTarget 'newscred\.image\.caption' +syn match csdlTarget 'newscred\.video\.caption' +syn match csdlTarget 'newscred\.image\.attribution\.text' +syn match csdlTarget 'newscred\.image\.attribution\.link' +syn match csdlTarget 'newscred\.source\.name' +syn match csdlTarget 'newscred\.source\.link' +syn match csdlTarget 'newscred\.source\.domain' +syn keyword csdlTarget newscred.source.media_type +syn keyword csdlTarget newscred.source.company_type +syn match csdlTarget 'newscred\.source\.country' +syn match csdlTarget 'newscred\.source\.circulation' +syn match csdlTarget 'newscred\.source\.founded' +syn match csdlTarget 'imdb\.title' +syn match csdlTarget 'imdb\.content' +syn match csdlTarget 'imdb\.contenttype' +syn match csdlTarget 'imdb\.link' +syn match csdlTarget 'imdb\.author\.name' +syn match csdlTarget 'imdb\.author\.link' +syn match csdlTarget 'imdb\.type' +syn match csdlTarget 'imdb\.thread' +syn match csdlTarget 'amazon\.title' +syn match csdlTarget 'amazon\.content' +syn match csdlTarget 'amazon\.contenttype' +syn match csdlTarget 'amazon\.link' +syn match csdlTarget 'amazon\.author\.name' +syn match csdlTarget 'amazon\.author\.link' +syn match csdlTarget 'amazon\.type' +syn match csdlTarget 'amazon\.thread' +syn match csdlTarget 'salience\.content\.sentiment' +syn match csdlTarget 'salience\.content\.topics' +syn match csdlTarget 'salience\.title\.sentiment' +syn match csdlTarget 'salience\.title\.topics' +syn match csdlTarget 'salience\.content\.entities\.name' +syn match csdlTarget 'salience\.content\.entities\.type' +syn match csdlTarget 'salience\.title\.entities\.name' +syn match csdlTarget 'salience\.title\.entities\.type' +syn match csdlTarget 'klout\.score' +syn match csdlTarget 'klout\.network' +syn match csdlTarget 'klout\.amplification' +syn keyword csdlTarget klout.true_reach +syn match csdlTarget 'klout\.topics' +syn match csdlTarget 'wikipedia\.author\.talk' +syn match csdlTarget 'wikipedia\.author\.contributions' +syn match csdlTarget 'wikipedia\.author\.username' +syn match csdlTarget 'wikipedia\.body' +syn match csdlTarget 'wikipedia\.title' +syn match csdlTarget 'wikipedia\.images' +syn match csdlTarget 'wikipedia\.categories' +syn match csdlTarget 'wikipedia\.externallinks' +syn match csdlTarget 'wikipedia\.ns' +syn match csdlTarget 'wikipedia\.namespace' +syn match csdlTarget 'wikipedia\.pageid' +syn match csdlTarget 'wikipedia\.parentid' +syn match csdlTarget 'wikipedia\.oldlen' +syn match csdlTarget 'wikipedia\.newlen' +syn match csdlTarget 'wikipedia\.changetype' +syn match csdlTarget 'wikipedia\.diff\.from' +syn match csdlTarget 'wikipedia\.diff\.to' +syn match csdlTarget 'wikipedia\.diff\.changes\.added' +syn match csdlTarget 'wikipedia\.diff\.changes\.removed' +syn keyword csdlTarget demographic.twitter_activity +syn match csdlTarget 'demographic\.location\.country' +syn keyword csdlTarget demographic.location.us_state +syn match csdlTarget 'demographic\.location\.city' +syn match csdlTarget 'demographic\.type' +syn match csdlTarget 'demographic\.sex' +syn match csdlTarget 'demographic\.status\.relationship' +syn match csdlTarget 'demographic\.status\.work' +syn keyword csdlTarget demographic.likes_and_interests +syn keyword csdlTarget demographic.first_language +syn match csdlTarget 'demographic\.professions' +syn match csdlTarget 'demographic\.services' +syn keyword csdlTarget demographic.large_accounts_followed +syn keyword csdlTarget demographic.age_range.start +syn keyword csdlTarget demographic.age_range.end +syn match csdlTarget 'demographic\.income\.start' +syn match csdlTarget 'demographic\.income\.end' +syn keyword csdlTarget demographic.main_street.dressed_by +syn keyword csdlTarget demographic.main_street.shop_at +syn keyword csdlTarget demographic.main_street.eat_and_drink_at +syn match csdlTarget 'demographic\.accounts\.categories' +syn match csdlTarget 'tumblr\.activity' +syn match csdlTarget 'tumblr\.source\.blogid' +syn match csdlTarget 'tumblr\.dest\.blogid' +syn match csdlTarget 'tumblr\.dest\.postid' +syn match csdlTarget 'tumblr\.root\.blogid' +syn match csdlTarget 'tumblr\.root\.postid' +syn match csdlTarget 'tumblr\.blogid' +syn keyword csdlTarget tumblr.blog_name +syn match csdlTarget 'tumblr\.type' +syn match csdlTarget 'tumblr\.title' +syn match csdlTarget 'tumblr\.body' +syn match csdlTarget 'tumblr\.text' +syn match csdlTarget 'tumblr\.tags' +syn keyword csdlTarget tumblr.track_name +syn match csdlTarget 'tumblr\.album' +syn match csdlTarget 'tumblr\.link' +syn match csdlTarget 'tumblr\.meta\.url' +syn match csdlTarget 'tumblr\.meta\.type' +syn match csdlTarget 'tumblr\.meta\.description' +syn keyword csdlTarget tumblr.meta.likes_local +syn keyword csdlTarget tumblr.meta.likes_global +syn keyword csdlTarget tumblr.meta.reblogged_global +syn match csdlTarget 'demographic\.gender' +syn match csdlTarget 'flickr\.title' +syn match csdlTarget 'flickr\.content' +syn match csdlTarget 'flickr\.contenttype' +syn match csdlTarget 'flickr\.link' +syn match csdlTarget 'flickr\.author\.name' +syn match csdlTarget 'flickr\.author\.link' +syn match csdlTarget 'flickr\.author\.username' +syn match csdlTarget 'flickr\.type' +syn match csdlTarget 'flickr\.thread' +syn match csdlTarget 'twitter\.text' +syn match csdlTarget 'twitter\.source' +syn match csdlTarget 'twitter\.mentions' +syn keyword csdlTarget twitter.mention_ids +syn match csdlTarget 'twitter\.links' +syn match csdlTarget 'twitter\.domains' +syn keyword csdlTarget twitter.in_reply_to_screen_name +syn keyword csdlTarget twitter.in_reply_to_user_id +syn keyword csdlTarget twitter.in_reply_to_status_id +syn keyword csdlTarget twitter.filter_level +syn match csdlTarget 'twitter\.lang' +syn match csdlTarget 'twitter\.geo' +syn match csdlTarget 'twitter\.user\.description' +syn match csdlTarget 'twitter\.user\.location' +syn keyword csdlTarget twitter.user.statuses_count +syn keyword csdlTarget twitter.user.followers_count +syn keyword csdlTarget twitter.user.follower_ratio +syn keyword csdlTarget twitter.user.profile_age +syn keyword csdlTarget twitter.user.friends_count +syn keyword csdlTarget twitter.user.screen_name +syn match csdlTarget 'twitter\.user\.lang' +syn keyword csdlTarget twitter.user.time_zone +syn match csdlTarget 'twitter\.user\.name' +syn match csdlTarget 'twitter\.user\.id' +syn keyword csdlTarget twitter.user.listed_count +syn match csdlTarget 'twitter\.user\.url' +syn match csdlTarget 'twitter\.user\.verified' +syn keyword csdlTarget twitter.place.place_type +syn match csdlTarget 'twitter\.place\.country' +syn keyword csdlTarget twitter.place.country_code +syn keyword csdlTarget twitter.place.full_name +syn match csdlTarget 'twitter\.place\.name' +syn match csdlTarget 'twitter\.place\.url' +syn match csdlTarget 'twitter\.place\.attributes\.locality' +syn match csdlTarget 'twitter\.place\.attributes\.region' +syn keyword csdlTarget twitter.place.attributes.street_address +syn match csdlTarget 'twitter\.status' +syn match csdlTarget 'twitter\.retweet\.text' +syn match csdlTarget 'twitter\.retweet\.elapsed' +syn match csdlTarget 'twitter\.retweet\.source' +syn keyword csdlTarget twitter.retweet.filter_level +syn match csdlTarget 'twitter\.retweet\.lang' +syn match csdlTarget 'twitter\.retweet\.user\.description' +syn match csdlTarget 'twitter\.retweet\.user\.location' +syn keyword csdlTarget twitter.retweet.user.statuses_count +syn keyword csdlTarget twitter.retweet.user.followers_count +syn keyword csdlTarget twitter.retweet.user.follower_ratio +syn keyword csdlTarget twitter.retweet.user.profile_age +syn keyword csdlTarget twitter.retweet.user.friends_count +syn keyword csdlTarget twitter.retweet.user.screen_name +syn match csdlTarget 'twitter\.retweet\.user\.lang' +syn keyword csdlTarget twitter.retweet.user.time_zone +syn match csdlTarget 'twitter\.retweet\.user\.name' +syn match csdlTarget 'twitter\.retweet\.user\.id' +syn keyword csdlTarget twitter.retweet.user.listed_count +syn match csdlTarget 'twitter\.retweet\.user\.url' +syn match csdlTarget 'twitter\.retweet\.user\.verified' +syn match csdlTarget 'twitter\.retweeted\.id' +syn match csdlTarget 'twitter\.retweeted\.source' +syn keyword csdlTarget twitter.retweeted.in_reply_to_screen_name +syn keyword csdlTarget twitter.retweeted.in_reply_to_user_id_str +syn keyword csdlTarget twitter.retweeted.in_reply_to_status_id +syn match csdlTarget 'twitter\.retweet\.count' +syn match csdlTarget 'twitter\.retweet\.mentions' +syn keyword csdlTarget twitter.retweet.mention_ids +syn match csdlTarget 'twitter\.retweet\.links' +syn match csdlTarget 'twitter\.retweet\.domains' +syn match csdlTarget 'twitter\.retweeted\.user\.description' +syn match csdlTarget 'twitter\.retweeted\.user\.location' +syn keyword csdlTarget twitter.retweeted.user.statuses_count +syn keyword csdlTarget twitter.retweeted.user.followers_count +syn keyword csdlTarget twitter.retweeted.user.follower_ratio +syn keyword csdlTarget twitter.retweeted.user.profile_age +syn keyword csdlTarget twitter.retweeted.user.friends_count +syn keyword csdlTarget twitter.retweeted.user.screen_name +syn match csdlTarget 'twitter\.retweeted\.user\.lang' +syn keyword csdlTarget twitter.retweeted.user.time_zone +syn match csdlTarget 'twitter\.retweeted\.user\.name' +syn match csdlTarget 'twitter\.retweeted\.user\.id' +syn keyword csdlTarget twitter.retweeted.user.listed_count +syn match csdlTarget 'twitter\.retweeted\.user\.url' +syn match csdlTarget 'twitter\.retweeted\.user\.verified' +syn match csdlTarget 'twitter\.retweeted\.geo' +syn keyword csdlTarget twitter.retweeted.place.place_type +syn match csdlTarget 'twitter\.retweeted\.place\.country' +syn keyword csdlTarget twitter.retweeted.place.country_code +syn keyword csdlTarget twitter.retweeted.place.full_name +syn match csdlTarget 'twitter\.retweeted\.place\.name' +syn match csdlTarget 'twitter\.retweeted\.place\.url' +syn match csdlTarget 'twitter\.retweeted\.place\.attributes' +syn match csdlTarget 'twitter\.hashtags' +syn match csdlTarget 'twitter\.retweet\.hashtags' +syn match csdlTarget 'twitter\.media\.type' +syn keyword csdlTarget twitter.media.media_url +syn keyword csdlTarget twitter.media.display_url +syn match csdlTarget 'twitter\.retweet\.media\.type' +syn keyword csdlTarget twitter.retweet.media.media_url +syn keyword csdlTarget twitter.retweet.media.display_url +syn match csdlTarget 'blog\.title' +syn match csdlTarget 'blog\.content' +syn match csdlTarget 'blog\.contenttype' +syn match csdlTarget 'blog\.link' +syn match csdlTarget 'blog\.domain' +syn match csdlTarget 'blog\.author\.name' +syn match csdlTarget 'blog\.author\.link' +syn match csdlTarget 'blog\.author\.avatar' +syn match csdlTarget 'blog\.author\.username' +syn match csdlTarget 'blog\.type' +syn match csdlTarget 'blog\.post\.link' +syn match csdlTarget 'blog\.post\.title' +syn match csdlTarget 'facebook\.author\.name' +syn match csdlTarget 'facebook\.author\.link' +syn match csdlTarget 'facebook\.author\.id' +syn match csdlTarget 'facebook\.author\.avatar' +syn match csdlTarget 'facebook\.message' +syn match csdlTarget 'facebook\.description' +syn match csdlTarget 'facebook\.caption' +syn match csdlTarget 'facebook\.type' +syn match csdlTarget 'facebook\.application' +syn match csdlTarget 'facebook\.source' +syn match csdlTarget 'facebook\.link' +syn match csdlTarget 'facebook\.name' +syn match csdlTarget 'facebook\.to\.names' +syn match csdlTarget 'facebook\.to\.ids' +syn match csdlTarget 'facebook\.og\.title' +syn match csdlTarget 'facebook\.og\.location' +syn match csdlTarget 'facebook\.og\.photos' +syn match csdlTarget 'facebook\.og\.by' +syn match csdlTarget 'facebook\.og\.description' +syn match csdlTarget 'facebook\.og\.type' +syn match csdlTarget 'facebook\.og\.length' +syn match csdlTarget 'facebook\.likes\.count' +syn match csdlTarget 'facebook\.likes\.names' +syn match csdlTarget 'facebook\.likes\.ids' +syn match csdlTarget 'topix\.title' +syn match csdlTarget 'topix\.content' +syn match csdlTarget 'topix\.contenttype' +syn match csdlTarget 'topix\.link' +syn match csdlTarget 'topix\.author\.name' +syn match csdlTarget 'topix\.type' +syn match csdlTarget 'topix\.thread' +syn match csdlTarget 'topix\.author\.location' +syn match csdlTarget 'bitly\.user\.agent' +syn keyword csdlTarget bitly.url_hash +syn match csdlTarget 'bitly\.share\.hash' +syn match csdlTarget 'bitly\.cname' +syn keyword csdlTarget bitly.referring_url +syn keyword csdlTarget bitly.referring_domain +syn match csdlTarget 'bitly\.url' +syn match csdlTarget 'bitly\.domain' +syn keyword csdlTarget bitly.country_code +syn keyword csdlTarget bitly.geo_region_code +syn match csdlTarget 'bitly\.country' +syn keyword csdlTarget bitly.geo_region +syn keyword csdlTarget bitly.geo_city +syn match csdlTarget 'bitly\.geo' +syn match csdlTarget 'bitly\.timezone' +syn match csdlTarget 'trends\.type' +syn match csdlTarget 'trends\.content' +syn match csdlTarget 'trends\.source' +syn match csdlTarget 'board\.title' +syn match csdlTarget 'board\.content' +syn match csdlTarget 'board\.contenttype' +syn match csdlTarget 'board\.link' +syn match csdlTarget 'board\.domain' +syn match csdlTarget 'board\.author\.name' +syn match csdlTarget 'board\.author\.link' +syn match csdlTarget 'board\.author\.avatar' +syn match csdlTarget 'board\.author\.username' +syn match csdlTarget 'board\.type' +syn match csdlTarget 'board\.thread' +syn match csdlTarget 'board\.author\.location' +syn match csdlTarget 'board\.author\.signature' +syn match csdlTarget 'board\.author\.registered' +syn match csdlTarget 'board\.author\.age' +syn match csdlTarget 'board\.author\.gender' +syn match csdlTarget 'video\.title' +syn match csdlTarget 'video\.content' +syn match csdlTarget 'video\.contenttype' +syn match csdlTarget 'video\.domain' +syn match csdlTarget 'video\.author\.name' +syn match csdlTarget 'video\.author\.link' +syn match csdlTarget 'video\.author\.avatar' +syn match csdlTarget 'video\.author\.username' +syn match csdlTarget 'video\.type' +syn match csdlTarget 'video\.videolink' +syn match csdlTarget 'video\.commentslink' +syn match csdlTarget 'video\.duration' +syn match csdlTarget 'video\.thumbnail' +syn match csdlTarget 'video\.category' +syn match csdlTarget 'video\.tags' +syn match csdlTarget '2ch\.title' +syn match csdlTarget '2ch\.content' +syn match csdlTarget '2ch\.contenttype' +syn match csdlTarget '2ch\.link' +syn match csdlTarget '2ch\.author\.name' +syn match csdlTarget '2ch\.type' +syn match csdlTarget '2ch\.thread' +syn match csdlTarget 'dailymotion\.title' +syn match csdlTarget 'dailymotion\.content' +syn match csdlTarget 'dailymotion\.contenttype' +syn match csdlTarget 'dailymotion\.author\.link' +syn match csdlTarget 'dailymotion\.author\.username' +syn match csdlTarget 'dailymotion\.videolink' +syn match csdlTarget 'dailymotion\.duration' +syn match csdlTarget 'dailymotion\.thumbnail' +syn match csdlTarget 'dailymotion\.category' +syn match csdlTarget 'dailymotion\.tags' +syn match csdlTarget 'language\.tag' +syn match csdlTarget 'language\.confidence' +syn match csdlTarget 'digg\.type' +syn match csdlTarget 'digg\.user\.name' +syn match csdlTarget 'digg\.user\.fullname' +syn match csdlTarget 'digg\.user\.registered' +syn match csdlTarget 'digg\.user\.profileviews' +syn match csdlTarget 'digg\.user\.icon' +syn match csdlTarget 'digg\.user\.links' +syn match csdlTarget 'digg\.item\.status' +syn match csdlTarget 'digg\.item\.description' +syn match csdlTarget 'digg\.item\.title' +syn match csdlTarget 'digg\.item\.diggs' +syn match csdlTarget 'digg\.item\.comments' +syn match csdlTarget 'digg\.item\.topic' +syn match csdlTarget 'digg\.comment\.buries' +syn match csdlTarget 'digg\.comment\.diggs' +syn match csdlTarget 'digg\.comment\.text' +syn match csdlTarget 'youtube\.title' +syn match csdlTarget 'youtube\.content' +syn match csdlTarget 'youtube\.contenttype' +syn match csdlTarget 'youtube\.author\.name' +syn match csdlTarget 'youtube\.author\.link' +syn match csdlTarget 'youtube\.type' +syn match csdlTarget 'youtube\.videolink' +syn match csdlTarget 'youtube\.commentslink' +syn match csdlTarget 'youtube\.duration' +syn match csdlTarget 'youtube\.thumbnail' +syn match csdlTarget 'youtube\.category' +syn match csdlTarget 'youtube\.tags' + +syn match csdlComment "^\/\/.*$" +syn match csdlComment "^\/\*.*$" +syn match csdlComment "^.*\*\/$" + +highlight link csdlKeyword Statement +highlight link csdlOperator Operator +highlight link csdlLogicalOperator Operator +highlight link csdlTarget Constant +highlight link csdlComment Comment +" +let b:current_syntax = "csdl" diff --git a/syntax/csp.vim b/syntax/csp.vim new file mode 100644 index 000000000..888dbf955 --- /dev/null +++ b/syntax/csp.vim @@ -0,0 +1,186 @@ +if polyglot#init#is_disabled(expand(':p'), 'csp', 'syntax/csp.vim') + finish +endif + +" Vim syntax file +" Language: CSP (Communication Sequential Processes, using FDR input syntax) +" Maintainer: Jan Bredereke +" Version: 0.6.0 +" Last change: Mon Mar 25, 2002 +" URL: http://www.tzi.de/~brederek/vim/ +" Copying: You may distribute and use this file freely, in the same +" way as the vim editor itself. +" +" To Do: - Probably I missed some keywords or operators, please +" fix them and notify me, the maintainer. +" - Currently, we do lexical highlighting only. It would be +" nice to have more actual syntax checks, including +" highlighting of wrong syntax. +" - The additional syntax for the RT-Tester (pseudo-comments) +" should be optional. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" case is significant to FDR: +syn case match + +" Block comments in CSP are between {- and -} +syn region cspComment start="{-" end="-}" contains=cspTodo +" Single-line comments start with -- +syn region cspComment start="--" end="$" contains=cspTodo,cspOldRttComment,cspSdlRttComment keepend + +" Numbers: +syn match cspNumber "\<\d\+\>" + +" Conditionals: +syn keyword cspConditional if then else + +" Operators on processes: +" -> ? : ! ' ; /\ \ [] |~| [> & [[..<-..]] ||| [|..|] || [..<->..] ; : @ ||| +syn match cspOperator "->" +syn match cspOperator "/\\" +syn match cspOperator "[^/]\\"lc=1 +syn match cspOperator "\[\]" +syn match cspOperator "|\~|" +syn match cspOperator "\[>" +syn match cspOperator "\[\[" +syn match cspOperator "\]\]" +syn match cspOperator "<-" +syn match cspOperator "|||" +syn match cspOperator "[^|]||[^|]"lc=1,me=e-1 +syn match cspOperator "[^|{\~]|[^|}\~]"lc=1,me=e-1 +syn match cspOperator "\[|" +syn match cspOperator "|\]" +syn match cspOperator "\[[^>]"me=e-1 +syn match cspOperator "\]" +syn match cspOperator "<->" +syn match cspOperator "[?:!';@]" +syn match cspOperator "&" +syn match cspOperator "\." + +" (not on processes:) +" syn match cspDelimiter "{|" +" syn match cspDelimiter "|}" +" syn match cspDelimiter "{[^-|]"me=e-1 +" syn match cspDelimiter "[^-|]}"lc=1 + +" Keywords: +syn keyword cspKeyword length null head tail concat elem +syn keyword cspKeyword union inter diff Union Inter member card +syn keyword cspKeyword empty set Set Seq +syn keyword cspKeyword true false and or not within let +syn keyword cspKeyword nametype datatype diamond normal +syn keyword cspKeyword sbisim tau_loop_factor model_compress +syn keyword cspKeyword explicate +syn match cspKeyword "transparent" +syn keyword cspKeyword external chase prioritize +syn keyword cspKeyword channel Events +syn keyword cspKeyword extensions productions +syn keyword cspKeyword Bool Int + +" Reserved keywords: +syn keyword cspReserved attribute embed module subtype + +" Include: +syn region cspInclude matchgroup=cspIncludeKeyword start="^include" end="$" keepend contains=cspIncludeArg +syn region cspIncludeArg start='\s\+\"' end= '\"\s*' contained + +" Assertions: +syn keyword cspAssert assert deterministic divergence free deadlock +syn keyword cspAssert livelock +syn match cspAssert "\[T=" +syn match cspAssert "\[F=" +syn match cspAssert "\[FD=" +syn match cspAssert "\[FD\]" +syn match cspAssert "\[F\]" + +" Types and Sets +" (first char a capital, later at least one lower case, no trailing underscore): +syn match cspType "\<_*[A-Z][A-Z_0-9]*[a-z]\(\|[A-Za-z_0-9]*[A-Za-z0-9]\)\>" + +" Processes (all upper case, no trailing underscore): +" (For identifiers that could be types or sets, too, this second rule set +" wins.) +syn match cspProcess "\<[A-Z_][A-Z_0-9]*[A-Z0-9]\>" +syn match cspProcess "\<[A-Z_]\>" + +" reserved identifiers for tool output (ending in underscore): +syn match cspReservedIdentifier "\<[A-Za-z_][A-Za-z_0-9]*_\>" + +" ToDo markers: +syn match cspTodo "FIXME" contained +syn match cspTodo "TODO" contained +syn match cspTodo "!!!" contained + +" RT-Tester pseudo comments: +" (The now obsolete syntax:) +syn match cspOldRttComment "^--\$\$AM_UNDEF"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_ERROR"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_WARNING"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_SET_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_RESET_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_ELAPSED_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_OUTPUT"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_INPUT"lc=2 contained +" (The current syntax:) +syn region cspRttPragma matchgroup=cspRttPragmaKeyword start="^pragma\s\+" end="\s*$" oneline keepend contains=cspRttPragmaArg,cspRttPragmaSdl +syn keyword cspRttPragmaArg AM_ERROR AM_WARNING AM_SET_TIMER contained +syn keyword cspRttPragmaArg AM_RESET_TIMER AM_ELAPSED_TIMER contained +syn keyword cspRttPragmaArg AM_OUTPUT AM_INPUT AM_INTERNAL contained +" the "SDL_MATCH" extension: +syn region cspRttPragmaSdl matchgroup=cspRttPragmaKeyword start="SDL_MATCH\s\+" end="\s*$" contains=cspRttPragmaSdlArg contained +syn keyword cspRttPragmaSdlArg TRANSLATE nextgroup=cspRttPragmaSdlTransName contained +syn keyword cspRttPragmaSdlArg PARAM SKIP OPTIONAL CHOICE ARRAY nextgroup=cspRttPragmaSdlName contained +syn match cspRttPragmaSdlName "\s*\S\+\s*" nextgroup=cspRttPragmaSdlTail contained +syn region cspRttPragmaSdlTail start="" end="\s*$" contains=cspRttPragmaSdlTailArg contained +syn keyword cspRttPragmaSdlTailArg SUBSET_USED DEFAULT_VALUE Present contained +syn match cspRttPragmaSdlTransName "\s*\w\+\s*" nextgroup=cspRttPragmaSdlTransTail contained +syn region cspRttPragmaSdlTransTail start="" end="\s*$" contains=cspRttPragmaSdlTransTailArg contained +syn keyword cspRttPragmaSdlTransTailArg sizeof contained +syn match cspRttPragmaSdlTransTailArg "\*" contained +syn match cspRttPragmaSdlTransTailArg "(" contained +syn match cspRttPragmaSdlTransTailArg ")" contained + +" temporary syntax extension for commented-out "pragma SDL_MATCH": +syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlArg contained + +syn sync lines=250 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default methods for highlighting. Can be overridden later +" (For vim version <=5.7, the command groups are defined in +" $VIMRUNTIME/syntax/synload.vim ) +hi def link cspComment Comment +hi def link cspNumber Number +hi def link cspConditional Conditional +hi def link cspOperator Delimiter +hi def link cspKeyword Keyword +hi def link cspReserved SpecialChar +hi def link cspInclude Error +hi def link cspIncludeKeyword Include +hi def link cspIncludeArg Include +hi def link cspAssert PreCondit +hi def link cspType Type +hi def link cspProcess Function +hi def link cspTodo Todo +hi def link cspOldRttComment Define +hi def link cspRttPragmaKeyword Define +hi def link cspSdlRttComment Define +hi def link cspRttPragmaArg Define +hi def link cspRttPragmaSdlArg Define +hi def link cspRttPragmaSdlName Default +hi def link cspRttPragmaSdlTailArg Define +hi def link cspRttPragmaSdlTransName Default +hi def link cspRttPragmaSdlTransTailArg Define +hi def link cspReservedIdentifier Error +" (Currently unused vim method: Debug) + + +let b:current_syntax = "csp" + +" vim: ts=8 diff --git a/syntax/css.vim b/syntax/css.vim new file mode 100644 index 000000000..ccaa6d696 --- /dev/null +++ b/syntax/css.vim @@ -0,0 +1,669 @@ +if polyglot#init#is_disabled(expand(':p'), 'css', 'syntax/css.vim') + finish +endif + +" Vim syntax file +" Language: Cascading Style Sheets +" Previous Contributor List: +" Jules Wang +" Claudio Fleiner +" Yeti (Add full CSS2, HTML4 support) +" Nikolai Weibull (Add CSS2 support) +" URL: https://github.com/vim-language-dept/css-syntax.vim +" Maintainer: Jay Sitter +" Last Change: 2021 Oct 20 + +" quit when a syntax file was already loaded +if !exists("main_syntax") + if exists("b:current_syntax") + finish + endif + let main_syntax = 'css' +elseif exists("b:current_syntax") && b:current_syntax == "css" + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case ignore +" Add dash to allowed keyword characters. +syn iskeyword @,48-57,_,192-255,- + +" HTML4 tags +syn keyword cssTagName abbr address area a b base +syn keyword cssTagName bdo blockquote body br button +syn keyword cssTagName caption cite code col colgroup dd del +syn keyword cssTagName dfn div dl dt em fieldset form +syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i +syn keyword cssTagName iframe input ins isindex kbd label legend li +syn keyword cssTagName link map menu meta noscript ol optgroup +syn keyword cssTagName option p param picture pre q s samp script small +syn keyword cssTagName span strong sub sup tbody td +syn keyword cssTagName textarea tfoot th thead title tr ul u var +syn keyword cssTagName object svg +syn match cssTagName /\\|\\|\/ + +" 34 HTML5 tags +syn keyword cssTagName article aside audio bdi canvas command data +syn keyword cssTagName datalist details dialog embed figcaption figure footer +syn keyword cssTagName header hgroup keygen main mark menuitem meter nav +syn keyword cssTagName output progress rt rp ruby section +syn keyword cssTagName source summary time track video wbr + +" Tags not supported in HTML5 +" acronym applet basefont big center dir +" font frame frameset noframes strike tt + +syn match cssTagName "\*" + +" selectors +syn match cssSelectorOp "[,>+~]" +syn match cssSelectorOp2 "[~|^$*]\?=" contained +syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ + +" .class and #id +syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot +syn match cssClassNameDot contained '\.' + +try +syn match cssIdentifier "#[A-Za-z\u00ac-\uffff_@][A-Za-z\u00ac-\uffff0-9_@-]*" +catch /^.*/ +syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*" +endtry + +" digits +syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators +syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\|fr\|vw\|vh\|vmin\|vmax\|ch\)\>" contains=cssUnitDecorators +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=%" contains=cssUnitDecorators +syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators +syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators +syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators + +" The 16 basic color names +syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow + +" 130 more color names +syn keyword cssColor contained aliceblue antiquewhite aquamarine azure +syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood +syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick +syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold +syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink +syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen +syn keyword cssColor contained lemonchiffon limegreen linen magenta +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn match cssColor contained /\/ +syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite +syn keyword cssColor contained oldlace olivedrab orange orangered orchid +syn match cssColor contained /\/ +syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue +syn keyword cssColor contained rosybrown royalblue rebeccapurple saddlebrown salmon +syn keyword cssColor contained sandybrown seagreen seashell sienna skyblue slateblue +syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan +syn keyword cssColor contained thistle tomato turquoise violet wheat +syn keyword cssColor contained whitesmoke yellowgreen + +" FIXME: These are actually case-insensitive too, but (a) specs recommend using +" mixed-case (b) it's hard to highlight the word `Background' correctly in +" all situations +syn case match +syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background +syn case ignore + +syn match cssImportant contained "!\s*important\>" +syn match cssCustomProp contained "\<--[a-zA-Z0-9-_]*\>" + +syn match cssColor contained "\" +syn match cssColor contained "\" +syn match cssColor contained "\" +syn match cssColor contained "#\x\{3,4\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{6\}\>" contains=cssUnitDecorators +syn match cssColor contained "#\x\{8\}\>" contains=cssUnitDecorators + +syn region cssURL contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline +syn region cssMathGroup contained matchgroup=cssMathParens start="(" end=")" containedin=cssFunction,cssMathGroup contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(var\|calc\)\s*(" end=")" contains=cssCustomProp,cssValue.*,cssFunction,cssColor,cssStringQ,cssStringQQ oneline +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\|conic-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(blur\|brightness\|contrast\|drop-shadow\|grayscale\|hue-rotate\|invert\|opacity\|saturate\|sepia\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma +syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at +syn match cssFunctionComma contained "," + +" Common Prop and Attr +syn keyword cssCommonAttr contained auto none inherit all default normal +syn keyword cssCommonAttr contained top bottom center stretch hidden visible +syn match cssCommonAttr contained "\<\(max-\|min-\|fit-\)content\>" +"------------------------------------------------ +" CSS Animations +" http://www.w3.org/TR/css3-animations/ +syn match cssAnimationProp contained "\" + +" animation-direction attributes +syn keyword cssAnimationAttr contained alternate reverse +syn match cssAnimationAttr contained "\" + +" animation-fill-mode attributes +syn keyword cssAnimationAttr contained forwards backwards both + +" animation-play-state attributes +syn keyword cssAnimationAttr contained running paused + +" animation-iteration-count attributes +syn keyword cssAnimationAttr contained infinite +"------------------------------------------------ +" CSS Backgrounds and Borders Module Level 3 +" http://www.w3.org/TR/css3-background/ +syn match cssBackgroundProp contained "\" +" background-attachment attributes +syn keyword cssBackgroundAttr contained scroll fixed local + +" background-position attributes +syn keyword cssBackgroundAttr contained left center right top bottom + +" background-repeat attributes +syn match cssBackgroundAttr contained "\" +syn match cssBackgroundAttr contained "\" + +" background-size attributes +syn keyword cssBackgroundAttr contained cover contain + +syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" +syn match cssBorderProp contained "\" + +" border-image attributes +syn keyword cssBorderAttr contained stretch round fill + +" border-style attributes +syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset + +" border-width attributes +syn keyword cssBorderAttr contained thin thick medium + +" box-decoration-break attributes +syn keyword cssBorderAttr contained clone slice +"------------------------------------------------ + +syn match cssBoxProp contained "\" +syn match cssBoxProp contained "\" +syn match cssBoxProp contained "\" +syn match cssBoxProp contained "\" +syn keyword cssBoxAttr contained visible hidden scroll auto +syn match cssBoxAttr contained "\" + +syn keyword cssCascadeProp contained all +syn keyword cssCascadeAttr contained initial unset revert + +syn keyword cssColorProp contained opacity +syn match cssColorProp contained "\" +syn match cssColorProp contained "\" + + +syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>" +syn keyword cssDimensionProp contained height +syn keyword cssDimensionProp contained width + +" CSS Flexible Box Layout Module Level 1 +" http://www.w3.org/TR/css3-flexbox/ +" CSS Box Alignment Module Level 3 +" http://www.w3.org/TR/css-align-3/ +syn match cssFlexibleBoxProp contained "\" +syn match cssFlexibleBoxProp contained "\<\(align\|justify\)\(-\(items\|self\|content\)\)\=\>" +syn keyword cssFlexibleBoxProp contained order + +syn match cssFlexibleBoxAttr contained "\<\(row\|column\|wrap\)\(-reverse\)\=\>" +syn keyword cssFlexibleBoxAttr contained nowrap stretch baseline center +syn match cssFlexibleBoxAttr contained "\" +syn match cssFlexibleBoxAttr contained "\" + +" CSS Fonts Module Level 3 +" http://www.w3.org/TR/css-fonts-3/ +syn match cssFontProp contained "\" + +" font attributes +syn keyword cssFontAttr contained icon menu caption +syn match cssFontAttr contained "\" +syn match cssFontAttr contained "\" +syn keyword cssFontAttr contained larger smaller +syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>" +syn match cssFontAttr contained "\" +" font-family attributes +syn keyword cssFontAttr contained sans-serif serif cursive fantasy monospace +" font-feature-settings attributes +syn keyword cssFontAttr contained on off +" font-stretch attributes +syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>" +" font-style attributes +syn keyword cssFontAttr contained italic oblique +" font-synthesis attributes +syn keyword cssFontAttr contained weight style +" font-weight attributes +syn keyword cssFontAttr contained bold bolder lighter +" TODO: font-variant-* attributes +"------------------------------------------------ + +" Webkit specific property/attributes +syn match cssFontProp contained "\" +syn match cssFontAttr contained "\<\(subpixel-\)\=\antialiased\>" + + +" CSS Multi-column Layout Module +" http://www.w3.org/TR/css3-multicol/ +syn match cssMultiColumnProp contained "\" +syn match cssMultiColumnProp contained "\" +syn keyword cssMultiColumnProp contained columns +syn keyword cssMultiColumnAttr contained balance medium +syn keyword cssMultiColumnAttr contained always left right page column +syn match cssMultiColumnAttr contained "\" + +" http://www.w3.org/TR/css3-break/#page-break +syn match cssMultiColumnProp contained "\" + +" http://www.w3.org/TR/SVG11/interact.html +syn match cssInteractProp contained "\" +syn match cssInteractAttr contained "\<\(visible\)\=\(Painted\|Fill\|Stroke\)\=\>" + +" TODO find following items in w3c docs. +syn keyword cssGeneratedContentProp contained quotes crop +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentProp contained "\" +syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" + +" https://www.w3.org/TR/css-grid-1/ +syn match cssGridProp contained "\" +syn match cssGridProp contained "\" +syn match cssGridProp contained "\" +syn match cssGridProp contained "\" +syn match cssGridProp contained "\" +syn match cssGridProp contained "\" + +syn match cssHyerlinkProp contained "\" + +syn match cssListProp contained "\" +syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" +syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" +syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" +syn keyword cssListAttr contained disc circle square hebrew armenian georgian +syn keyword cssListAttr contained inside outside + +" object-fit https://www.w3.org/TR/css-images-3/#the-object-fit +syn match cssObjectProp contained "\" +syn keyword cssObjectAttr contained fill contain cover scale-down + +syn keyword cssPositioningProp contained bottom clear clip display float left +syn keyword cssPositioningProp contained position right top visibility +syn match cssPositioningProp contained "\" +syn keyword cssPositioningAttr contained block compact grid +syn match cssPositioningAttr contained "\" +syn keyword cssPositioningAttr contained left right both +syn match cssPositioningAttr contained "\" +syn match cssPositioningAttr contained "\" +syn match cssPositioningAttr contained "\" +syn keyword cssPositioningAttr contained static relative absolute fixed subgrid sticky + +syn keyword cssPrintAttr contained landscape portrait crop cross always + +syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>" +syn keyword cssTableAttr contained fixed collapse separate show hide once always + + +syn keyword cssTextProp contained color direction hyphens +syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\<\(word\|line\)-break\|\(overflow\|word\)-wrap\>" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextProp contained "\" +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" +syn keyword cssTextAttr contained ltr rtl embed nowrap +syn keyword cssTextAttr contained underline overline blink sub super middle +syn keyword cssTextAttr contained capitalize uppercase lowercase +syn keyword cssTextAttr contained justify baseline sub super +syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed geometricPrecision +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\<\(allow\|force\)-end\>" +syn keyword cssTextAttr contained start end adjacent +syn match cssTextAttr contained "\" +syn keyword cssTextAttr contained distribute kashida first last +syn keyword cssTextAttr contained clip ellipsis unrestricted suppress +syn match cssTextAttr contained "\" +syn match cssTextAttr contained "\" +syn keyword cssTextAttr contained manual +syn match cssTextAttr contained "\" + +syn match cssTransformProp contained "\" +syn match cssTransformProp contained "\" +syn match cssTransformProp contained "\" + +" CSS Transitions +" http://www.w3.org/TR/css3-transitions/ +syn match cssTransitionProp contained "\" + +" transition-time-function attributes +syn match cssTransitionAttr contained "\" +syn match cssTransitionAttr contained "\" +syn match cssTransitionAttr contained "\" +"------------------------------------------------ +" CSS Basic User Interface Module Level 3 (CSS3 UI) +" http://www.w3.org/TR/css3-ui/ +syn match cssUIProp contained "\" +syn match cssUIAttr contained "\<\(content\|padding\|border\)\(-box\)\=\>" + +syn keyword cssUIProp contained cursor +syn match cssUIAttr contained "\<\(\([ns]\=[ew]\=\)\|col\|row\|nesw\|nwse\)-resize\>" +syn keyword cssUIAttr contained crosshair help move pointer alias copy +syn keyword cssUIAttr contained progress wait text cell move +syn match cssUIAttr contained "\" +syn match cssUIAttr contained "\" +syn match cssUIAttr contained "\" +syn match cssUIAttr contained "\" +syn match cssUIAttr contained "\<\(vertical-\)\=text\>" +syn match cssUIAttr contained "\" + +syn match cssUIProp contained "\" +syn keyword cssUIAttr contained active inactive disabled + +syn match cssUIProp contained "\" +syn match cssUIProp contained "\" +syn keyword cssUIAttr contained invert + +syn keyword cssUIProp contained icon resize +syn keyword cssUIAttr contained both horizontal vertical + +syn match cssUIProp contained "\" +syn keyword cssUIAttr contained clip ellipsis + +syn match cssUIProp contained "\" +syn keyword cssUIAttr contained pixellated +syn match cssUIAttr contained "\" + +"------------------------------------------------ +" Webkit/iOS specific attributes +syn match cssUIAttr contained '\' +" IE specific attributes +syn match cssIEUIAttr contained '\' + +" Webkit/iOS specific properties +syn match cssUIProp contained '\<\(tap-highlight-color\|user-select\|touch-callout\)\>' +" IE specific properties +syn match cssIEUIProp contained '\<\(interpolation-mode\|zoom\|filter\)\>' + +" Webkit/Firebox specific properties/attributes +syn keyword cssUIProp contained appearance +syn keyword cssUIAttr contained window button field icon document menu + + +syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>" +syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numeral\|header\)\)\=\)\>" +syn keyword cssAuralProp contained volume during azimuth elevation stress richness +syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>" +syn keyword cssAuralAttr contained silent +syn match cssAuralAttr contained "\" +syn keyword cssAuralAttr contained non mix +syn match cssAuralAttr contained "\<\(left\|right\)-side\>" +syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>" +syn keyword cssAuralAttr contained leftwards rightwards behind +syn keyword cssAuralAttr contained below level above lower higher +syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\|low\|high\)\>" +syn keyword cssAuralAttr contained faster slower +syn keyword cssAuralAttr contained male female child code digits continuous + +" mobile text +syn match cssMobileTextProp contained "\" + +syn keyword cssMediaProp contained width height orientation scan +syn keyword cssMediaProp contained any-hover any-pointer color-gamut grid hover +syn keyword cssMediaProp contained overflow-block overflow-inline pointer update +syn match cssMediaProp contained /\<\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio\>/ +syn match cssMediaProp contained /\<\(\(max\|min\)-\)\=device-pixel-ratio\>/ +syn match cssMediaProp contained /\<\(\(max\|min\)-\)\=device-\(height\|width\)\>/ +syn match cssMediaProp contained /\<\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)\>/ +syn keyword cssMediaAttr contained portrait landscape progressive interlace +syn keyword cssMediaAttr contained coarse fast fine hover infinite p3 paged +syn keyword cssMediaAttr contained rec2020 scroll slow srgb +syn match cssKeyFrameProp contained /\(\d\+\(\.\d\+\)\?%\|\(\\)\)/ nextgroup=cssDefinition +syn match cssPageMarginProp /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition +syn keyword cssPageProp contained content size +syn keyword cssPageProp contained orphans widows +syn keyword cssFontDescriptorProp contained src +syn match cssFontDescriptorProp contained "\" +" unicode-range attributes +syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+" +syn match cssFontDescriptorAttr contained "U+\x\+-\x\+" + +syn match cssBraces contained "[{}]" +syn match cssError contained "{@<>" +syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssAttributeSelector,cssClassName,cssIdentifier,cssAtRule,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssCustomProp,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold +syn match cssBraceError "}" +syn match cssAttrComma "," + +" Pseudo class +" https://www.w3.org/TR/selectors-4/ +syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn +syn keyword cssPseudoClassId contained link visited active hover before after left right +syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid +syn match cssPseudoClassId contained "\" +syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" +syn match cssPseudoClassId contained "\" +syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier +" ------------------------------------ +" Vendor specific properties +syn match cssPseudoClassId contained "\" +syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>" + +" Misc highlight groups +syntax match cssUnitDecorators /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained +syntax match cssNoise contained /\(:\|;\|\/\)/ + +" Comment +syn region cssComment start="/\*" end="\*/" contains=@Spell fold + +syn match cssUnicodeEscape "\\\x\{1,6}\s\?" +syn match cssSpecialCharQQ +\\\\\|\\"+ contained +syn match cssSpecialCharQ +\\\\\|\\'+ contained +syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ +syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ + +" Vendor Prefix +syn match cssVendor contained "-\(webkit\|moz\|o\|ms\)-" + +" Various CSS Hack characters +" In earlier versions of IE (6 and 7), one can prefix property names +" with a _ or * to isolate those definitions to particular versions of IE +" This is purely decorative and therefore we assign to the same highlight +" group to cssVendor, for more information: +" http://www.paulirish.com/2009/browser-specific-css-hacks/ +syn match cssHacks contained /\(_\|*\)/ + +" Attr Enhance +" Some keywords are both Prop and Attr, so we have to handle them +" cssPseudoClassId is hidden by cssAttrRegion, so we add it here. see #69 +syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\|{\)/ contained contains=cssPseudoClassId,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise + +" Hack for transition +" 'transition' has Props after ':'. +syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise + +syn match cssAtKeyword /@\(font-face\|media\|keyframes\|import\|charset\|namespace\|page\|supports\)/ + +syn keyword cssAtRuleLogical only not and contained + +" @media +" Reference: http://www.w3.org/TR/css3-mediaqueries/ +syn region cssAtRule start=/@media\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssComment,cssCustomProp,cssFunctionName nextgroup=cssDefinition +syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained + +" @page +" http://www.w3.org/TR/css3-page/ +syn region cssAtRule start=/@page\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssPagePseudo,cssComment nextgroup=cssDefinition +syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl +" @keyframe +" http://www.w3.org/TR/css3-animations/#keyframes +syn region cssAtRule start=/@\(-[a-z]\+-\)\=keyframes\>/ end=/\ze{/ skipwhite skipnl matchgroup=cssAtKeyword contains=cssVendor,cssComment nextgroup=cssDefinition + +syn region cssAtRule start=/@import\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword,cssURL,cssMediaProp,cssValueLength,cssAtRuleLogical,cssValueInteger,cssMediaAttr,cssMediaType +syn region cssAtRule start=/@charset\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword +syn region cssAtRule start=/@namespace\>/ end=/\ze;/ contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssAtKeyword + +" @supports +" https://www.w3.org/TR/css3-conditional/#at-supports +syn region cssAtRule start=/@supports\>/ end=/\ze{/ skipwhite skipnl contains=cssAtRuleLogical,cssAttrRegion,css.*Prop,cssValue.*,cssVendor,cssAtKeyword,cssComment nextgroup=cssDefinition + + +if main_syntax == "css" + syn sync minlines=10 +endif + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link cssComment Comment +hi def link cssVendor Comment +hi def link cssHacks Comment +hi def link cssTagName Statement +hi def link cssDeprecated Error +hi def link cssSelectorOp Special +hi def link cssSelectorOp2 Special +hi def link cssAttrComma Special + +hi def link cssAnimationProp cssProp +hi def link cssBackgroundProp cssProp +hi def link cssBorderProp cssProp +hi def link cssBoxProp cssProp +hi def link cssCascadeProp cssProp +hi def link cssColorProp cssProp +hi def link cssContentForPagedMediaProp cssProp +hi def link cssDimensionProp cssProp +hi def link cssFlexibleBoxProp cssProp +hi def link cssFontProp cssProp +hi def link cssGeneratedContentProp cssProp +hi def link cssGridProp cssProp +hi def link cssHyerlinkProp cssProp +hi def link cssInteractProp cssProp +hi def link cssLineboxProp cssProp +hi def link cssListProp cssProp +hi def link cssMarqueeProp cssProp +hi def link cssMultiColumnProp cssProp +hi def link cssPagedMediaProp cssProp +hi def link cssPositioningProp cssProp +hi def link cssObjectProp cssProp +hi def link cssPrintProp cssProp +hi def link cssRubyProp cssProp +hi def link cssSpeechProp cssProp +hi def link cssTableProp cssProp +hi def link cssTextProp cssProp +hi def link cssTransformProp cssProp +hi def link cssTransitionProp cssProp +hi def link cssUIProp cssProp +hi def link cssIEUIProp cssProp +hi def link cssAuralProp cssProp +hi def link cssRenderProp cssProp +hi def link cssMobileTextProp cssProp + +hi def link cssAnimationAttr cssAttr +hi def link cssBackgroundAttr cssAttr +hi def link cssBorderAttr cssAttr +hi def link cssBoxAttr cssAttr +hi def link cssContentForPagedMediaAttr cssAttr +hi def link cssDimensionAttr cssAttr +hi def link cssFlexibleBoxAttr cssAttr +hi def link cssFontAttr cssAttr +hi def link cssGeneratedContentAttr cssAttr +hi def link cssGridAttr cssAttr +hi def link cssHyerlinkAttr cssAttr +hi def link cssInteractAttr cssAttr +hi def link cssLineboxAttr cssAttr +hi def link cssListAttr cssAttr +hi def link cssMarginAttr cssAttr +hi def link cssMarqueeAttr cssAttr +hi def link cssMultiColumnAttr cssAttr +hi def link cssPaddingAttr cssAttr +hi def link cssPagedMediaAttr cssAttr +hi def link cssPositioningAttr cssAttr +hi def link cssObjectAttr cssAttr +hi def link cssGradientAttr cssAttr +hi def link cssPrintAttr cssAttr +hi def link cssRubyAttr cssAttr +hi def link cssSpeechAttr cssAttr +hi def link cssTableAttr cssAttr +hi def link cssTextAttr cssAttr +hi def link cssTransformAttr cssAttr +hi def link cssTransitionAttr cssAttr +hi def link cssUIAttr cssAttr +hi def link cssIEUIAttr cssAttr +hi def link cssAuralAttr cssAttr +hi def link cssRenderAttr cssAttr +hi def link cssCascadeAttr cssAttr +hi def link cssCommonAttr cssAttr + +hi def link cssPseudoClassId PreProc +hi def link cssPseudoClassLang Constant +hi def link cssValueLength Number +hi def link cssValueInteger Number +hi def link cssValueNumber Number +hi def link cssValueAngle Number +hi def link cssValueTime Number +hi def link cssValueFrequency Number +hi def link cssFunction Constant +hi def link cssURL String +hi def link cssFunctionName Function +hi def link cssFunctionComma Function +hi def link cssColor Constant +hi def link cssIdentifier Function +hi def link cssAtRule Include +hi def link cssAtKeyword PreProc +hi def link cssImportant Special +hi def link cssCustomProp Special +hi def link cssBraces Function +hi def link cssBraceError Error +hi def link cssError Error +hi def link cssUnicodeEscape Special +hi def link cssStringQQ String +hi def link cssStringQ String +hi def link cssAttributeSelector String +hi def link cssMediaType Special +hi def link cssMediaComma Normal +hi def link cssAtRuleLogical Statement +hi def link cssMediaProp cssProp +hi def link cssMediaAttr cssAttr +hi def link cssPagePseudo PreProc +hi def link cssPageMarginProp cssAtKeyword +hi def link cssPageProp cssProp +hi def link cssKeyFrameProp Constant +hi def link cssFontDescriptor Special +hi def link cssFontDescriptorProp cssProp +hi def link cssFontDescriptorAttr cssAttr +hi def link cssUnicodeRange Constant +hi def link cssClassName Function +hi def link cssClassNameDot Function +hi def link cssProp StorageClass +hi def link cssAttr Constant +hi def link cssUnitDecorators Number +hi def link cssNoise Noise + +let b:current_syntax = "css" + +if main_syntax == 'css' + unlet main_syntax +endif + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/syntax/csv.vim b/syntax/csv.vim index e212e2f3c..0e1d3a02b 100644 --- a/syntax/csv.vim +++ b/syntax/csv.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 +if polyglot#init#is_disabled(expand(':p'), 'csv', 'syntax/csv.vim') + finish +endif " A simple syntax highlighting, simply alternate colors between two " adjacent columns @@ -22,7 +24,7 @@ fu! Warning(msg) "{{{3 echohl Normal endfu -fu! Esc(val, char) "{{{3 +fu! Esc(val, char) "{{{3 if empty(a:val) return a:val endif @@ -34,7 +36,7 @@ fu! CheckSaneSearchPattern() "{{{3 let s:col_def = '\%([^' . s:del_def . ']*' . s:del_def . '\|$\)' let s:col_def_end = '\%([^' . s:del_def . ']*' . s:del_def . '\)' - " First: + " First: " Check for filetype plugin. This syntax script relies on the filetype " plugin, else, it won't work properly. redir => s:a |sil filetype | redir end @@ -53,6 +55,12 @@ fu! CheckSaneSearchPattern() "{{{3 let b:csv_cmt = [g:csv_comment] endif + " Make sure, b:csv_cmt always has 2 items + " can happen with e.g. :set cms="#%s + if b:csv_cmt == [] + let b:csv_cmt = ['', ''] + endif + " Second: Check for sane defaults for the column pattern " Not necessary to check for fixed width columns @@ -66,10 +74,10 @@ fu! CheckSaneSearchPattern() "{{{3 let s:col = get(b:, 'col', s:col_def) let s:col_end = get(b:, 'col_end', s:col_def_end) let s:del = get(b:, 'delimiter', s:del_def) - let s:cmts = b:csv_cmt[0] - let s:cmte = len(b:csv_cmt) == 2 ? b:csv_cmt[1] : '' + let s:cmts = get(get(b:, 'csv_cmt', ['']), 0) + let s:cmte = len(get(b:, 'csv_cmt', [])) == 2 ? b:csv_cmt[1] : '' " Make the file start at the first actual CSV record (issue #71) - if !exists("b:csv_headerline") + if !exists("b:csv_headerline") && !empty(s:cmts) let cmts = Esc(s:cmts, '') let pattern = '\%^\(\%('.cmts.'.*\n\)\|\%(\s*\n\)\)\+' let start = search(pattern, 'nWe', 10) @@ -85,6 +93,7 @@ fu! CheckSaneSearchPattern() "{{{3 if line('$') > 1 && (!exists("b:col") || empty(b:col)) " check for invalid pattern, ftplugin hasn't been loaded yet call Warning("Invalid column pattern, using default pattern " . s:col_def) + call Warning("Or ftplugin hasn't been sourced before the syntax script") endif endfu @@ -92,7 +101,7 @@ endfu fu! DoHighlight() "{{{3 if has("conceal") && !exists("g:csv_no_conceal") && \ !exists("b:csv_fixed_width_cols") - exe "syn match CSVDelimiter /" . s:col_end . + exe "syn match CSVDelimiter /" . s:col_end . \ '/ms=e,me=e contained conceal cchar=' . \ (&enc == "utf-8" ? "│" : '|') hi def link CSVDelimiter Conceal @@ -119,7 +128,7 @@ fu! DoHighlight() "{{{3 else for i in range(len(b:csv_fixed_width_cols)) let pat = '/\%' . b:csv_fixed_width_cols[i] . 'v.*' . - \ ((i == len(b:csv_fixed_width_cols)-1) ? '/' : + \ ((i == len(b:csv_fixed_width_cols)-1) ? '/' : \ '\%' . b:csv_fixed_width_cols[i+1] . 'v/') let group = "CSVColumn" . (i%2 ? "Odd" : "Even" ) @@ -128,9 +137,11 @@ fu! DoHighlight() "{{{3 endfor endif " Comment regions - exe 'syn match CSVComment /'. s:cmts. '.*'. - \ (!empty(s:cmte) ? '\%('. s:cmte. '\)\?' - \: ''). '/' + if !empty(s:cmts) + exe 'syn match CSVComment /'. s:cmts. '.*'. + \ (!empty(s:cmte) ? '\%('. s:cmte. '\)\?' + \: ''). '/' + endif hi def link CSVComment Comment endfun @@ -155,7 +166,7 @@ fu! DoSyntaxDefinitions() "{{{3 endif endfun -" Main: {{{2 +" Main: {{{2 " Make sure, we are using a sane, valid pattern for syntax " highlighting call CheckSaneSearchPattern() @@ -169,5 +180,3 @@ let b:current_syntax="csv" let &cpo = s:cpo_save unlet s:cpo_save " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/syntax/cterm.vim b/syntax/cterm.vim new file mode 100644 index 000000000..9bb9b3daa --- /dev/null +++ b/syntax/cterm.vim @@ -0,0 +1,181 @@ +if polyglot#init#is_disabled(expand(':p'), 'cterm', 'syntax/cterm.vim') + finish +endif + +" Vim syntax file +" Language: Century Term Command Script +" Maintainer: Sean M. McKee +" Last Change: 2002 Apr 13 +" Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +"FUNCTIONS +syn keyword ctermFunction abort addcr addlf answer at attr batch baud +syn keyword ctermFunction break call capture cd cdelay charset cls color +syn keyword ctermFunction combase config commect copy cread +syn keyword ctermFunction creadint devprefix dialer dialog dimint +syn keyword ctermFunction dimlog dimstr display dtimeout dwait edit +syn keyword ctermFunction editor emulate erase escloop fcreate +syn keyword ctermFunction fflush fillchar flags flush fopen fread +syn keyword ctermFunction freadln fseek fwrite fwriteln get hangup +syn keyword ctermFunction help hiwait htime ignore init itime +syn keyword ctermFunction keyboard lchar ldelay learn lockfile +syn keyword ctermFunction locktime log login logout lowait +syn keyword ctermFunction lsend ltime memlist menu mkdir mode +syn keyword ctermFunction modem netdialog netport noerror pages parity +syn keyword ctermFunction pause portlist printer protocol quit rcv +syn keyword ctermFunction read readint readn redial release +syn keyword ctermFunction remote rename restart retries return +syn keyword ctermFunction rmdir rtime run runx scrollback send +syn keyword ctermFunction session set setcap setcolor setkey +syn keyword ctermFunction setsym setvar startserver status +syn keyword ctermFunction stime stopbits stopserver tdelay +syn keyword ctermFunction terminal time trans type usend version +syn keyword ctermFunction vi vidblink vidcard vidout vidunder wait +syn keyword ctermFunction wildsize wclose wopen wordlen wru wruchar +syn keyword ctermFunction xfer xmit xprot +syn match ctermFunction "?" +"syn keyword ctermFunction comment remark + +"END FUNCTIONS +"INTEGER FUNCTIONS +syn keyword ctermIntFunction asc atod eval filedate filemode filesize ftell +syn keyword ctermIntFunction len termbits opsys pos sum time val mdmstat +"END INTEGER FUNCTIONS + +"STRING FUNCTIONS +syn keyword ctermStrFunction cdate ctime chr chrdy chrin comin getenv +syn keyword ctermStrFunction gethomedir left midstr right str tolower +syn keyword ctermStrFunction toupper uniq comst exists feof hascolor + +"END STRING FUNCTIONS + +"PREDEFINED TERM VARIABLES R/W +syn keyword ctermPreVarRW f _escloop _filename _kermiteol _obufsiz +syn keyword ctermPreVarRW _port _rcvsync _cbaud _reval _turnchar +syn keyword ctermPreVarRW _txblksiz _txwindow _vmin _vtime _cparity +syn keyword ctermPreVarRW _cnumber false t true _cwordlen _cstopbits +syn keyword ctermPreVarRW _cmode _cemulate _cxprot _clogin _clogout +syn keyword ctermPreVarRW _cstartsrv _cstopsrv _ccmdfile _cwru +syn keyword ctermPreVarRW _cprotocol _captfile _cremark _combufsiz +syn keyword ctermPreVarRW logfile +"END PREDEFINED TERM VARIABLES R/W + +"PREDEFINED TERM VARIABLES R/O +syn keyword ctermPreVarRO _1 _2 _3 _4 _5 _6 _7 _8 _9 _cursess +syn keyword ctermPreVarRO _lockfile _baud _errno _retval _sernum +syn keyword ctermPreVarRO _timeout _row _col _version +"END PREDEFINED TERM VARIABLES R/O + +syn keyword ctermOperator not mod eq ne gt le lt ge xor and or shr not shl + +"SYMBOLS +syn match CtermSymbols "|" +"syn keyword ctermOperators + - * / % = != > < >= <= & | ^ ! << >> +"END SYMBOLS + +"STATEMENT +syn keyword ctermStatement off +syn keyword ctermStatement disk overwrite append spool none +syn keyword ctermStatement echo view wrap +"END STATEMENT + +"TYPE +"syn keyword ctermType +"END TYPE + +"USERLIB FUNCTIONS +"syn keyword ctermLibFunc +"END USERLIB FUNCTIONS + +"LABEL +syn keyword ctermLabel case default +"END LABEL + +"CONDITIONAL +syn keyword ctermConditional on endon +syn keyword ctermConditional proc endproc +syn keyword ctermConditional for in do endfor +syn keyword ctermConditional if else elseif endif iferror +syn keyword ctermConditional switch endswitch +syn keyword ctermConditional repeat until +"END CONDITIONAL + +"REPEAT +syn keyword ctermRepeat while +"END REPEAT + +" Function arguments (eg $1 $2 $3) +syn match ctermFuncArg "\$[1-9]" + +syn keyword ctermTodo contained TODO + +syn match ctermNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match ctermNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match ctermNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match ctermNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match ctermNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" + +syn match ctermComment "![^=].*$" contains=ctermTodo +syn match ctermComment "!$" +syn match ctermComment "\*.*$" contains=ctermTodo +syn region ctermComment start="comment" end="$" contains=ctermTodo +syn region ctermComment start="remark" end="$" contains=ctermTodo + +syn region ctermVar start="\$(" end=")" + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match ctermSpecial contained "\\\d\d\d\|\\." +syn match ctermSpecial contained "\^." +syn region ctermString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=ctermSpecial,ctermVar,ctermSymbols +syn match ctermCharacter "'[^\\]'" +syn match ctermSpecialCharacter "'\\.'" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link ctermStatement Statement +hi def link ctermFunction Statement +hi def link ctermStrFunction Statement +hi def link ctermIntFunction Statement +hi def link ctermLabel Statement +hi def link ctermConditional Statement +hi def link ctermRepeat Statement +hi def link ctermLibFunc UserDefFunc +hi def link ctermType Type +hi def link ctermFuncArg PreCondit + +hi def link ctermPreVarRO PreCondit +hi def link ctermPreVarRW PreConditBold +hi def link ctermVar Type + +hi def link ctermComment Comment + +hi def link ctermCharacter SpecialChar +hi def link ctermSpecial Special +hi def link ctermSpecialCharacter SpecialChar +hi def link ctermSymbols Special +hi def link ctermString String +hi def link ctermTodo Todo +hi def link ctermOperator Statement +hi def link ctermNumber Number + +" redefine the colors +"hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold +"hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline + + +let b:current_syntax = "cterm" + +" vim: ts=8 diff --git a/syntax/cucumber.vim b/syntax/cucumber.vim index 6cc43cf97..20edd2d99 100644 --- a/syntax/cucumber.vim +++ b/syntax/cucumber.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cucumber', 'syntax/cucumber.vim') + finish +endif " Vim syntax file " Language: Cucumber @@ -142,5 +144,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:set sts=2 sw=2: - -endif diff --git a/syntax/cuda.vim b/syntax/cuda.vim new file mode 100644 index 000000000..bbac1c4a3 --- /dev/null +++ b/syntax/cuda.vim @@ -0,0 +1,69 @@ +if polyglot#init#is_disabled(expand(':p'), 'cuda', 'syntax/cuda.vim') + finish +endif + +" Vim syntax file +" Language: CUDA (NVIDIA Compute Unified Device Architecture) +" Maintainer: Timothy B. Terriberry +" Last Change: 2018 Feb 06 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +runtime! syntax/cpp.vim + +" CUDA extentions +syn keyword cudaStorageClass __device__ __global__ __host__ +syn keyword cudaStorageClass __constant__ __shared__ +syn keyword cudaStorageClass __inline__ __align__ __thread__ +"syn keyword cudaStorageClass __import__ __export__ __location__ +syn keyword cudaStructure template +syn keyword cudaType char1 char2 char3 char4 +syn keyword cudaType uchar1 uchar2 uchar3 uchar4 +syn keyword cudaType short1 short2 short3 short4 +syn keyword cudaType ushort1 ushort2 ushort3 ushort4 +syn keyword cudaType int1 int2 int3 int4 +syn keyword cudaType uint1 uint2 uint3 uint4 +syn keyword cudaType long1 long2 long3 long4 +syn keyword cudaType ulong1 ulong2 ulong3 ulong4 +syn keyword cudaType float1 float2 float3 float4 +syn keyword cudaType ufloat1 ufloat2 ufloat3 ufloat4 +syn keyword cudaType dim3 texture textureReference +syn keyword cudaType cudaError_t cudaDeviceProp cudaMemcpyKind +syn keyword cudaType cudaArray cudaChannelFormatKind +syn keyword cudaType cudaChannelFormatDesc cudaTextureAddressMode +syn keyword cudaType cudaTextureFilterMode cudaTextureReadMode +syn keyword cudaVariable gridDim blockIdx blockDim threadIdx +syn keyword cudaConstant __DEVICE_EMULATION__ +syn keyword cudaConstant cudaSuccess +" Many more errors are defined, but only these are listed in the maunal +syn keyword cudaConstant cudaErrorMemoryAllocation +syn keyword cudaConstant cudaErrorInvalidDevicePointer +syn keyword cudaConstant cudaErrorInvalidSymbol +syn keyword cudaConstant cudaErrorMixedDeviceExecution +syn keyword cudaConstant cudaMemcpyHostToHost +syn keyword cudaConstant cudaMemcpyHostToDevice +syn keyword cudaConstant cudaMemcpyDeviceToHost +syn keyword cudaConstant cudaMemcpyDeviceToDevice +syn keyword cudaConstant cudaReadModeElementType +syn keyword cudaConstant cudaReadModeNormalizedFloat +syn keyword cudaConstant cudaFilterModePoint +syn keyword cudaConstant cudaFilterModeLinear +syn keyword cudaConstant cudaAddressModeClamp +syn keyword cudaConstant cudaAddressModeWrap +syn keyword cudaConstant cudaChannelFormatKindSigned +syn keyword cudaConstant cudaChannelFormatKindUnsigned +syn keyword cudaConstant cudaChannelFormatKindFloat + +hi def link cudaStorageClass StorageClass +hi def link cudaStructure Structure +hi def link cudaType Type +hi def link cudaVariable Identifier +hi def link cudaConstant Constant + +let b:current_syntax = "cuda" + +" vim: ts=8 diff --git a/syntax/cuesheet.vim b/syntax/cuesheet.vim index 4e30b725c..b0e87e41f 100644 --- a/syntax/cuesheet.vim +++ b/syntax/cuesheet.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cue') == -1 +if polyglot#init#is_disabled(expand(':p'), 'cue', 'syntax/cuesheet.vim') + finish +endif " Language: Cue sheet " Maintainer: Matěj Grabovský @@ -26,5 +28,3 @@ syn match Number /\<\d\+\%(:\d\{2}\)\{2}\>/ let b:current_syntax='cuesheet' " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/syntax/cupl.vim b/syntax/cupl.vim new file mode 100644 index 000000000..913e6579a --- /dev/null +++ b/syntax/cupl.vim @@ -0,0 +1,128 @@ +if polyglot#init#is_disabled(expand(':p'), 'cupl', 'syntax/cupl.vim') + finish +endif + +" Vim syntax file +" Language: CUPL +" Maintainer: John Cook +" 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 cuplHeader name partno date revision rev designer company nextgroup=cuplHeaderContents +syn keyword cuplHeader assembly assy location device nextgroup=cuplHeaderContents + +syn keyword cuplTodo contained TODO XXX FIXME + +" cuplHeaderContents uses default highlighting except for numbers +syn match cuplHeaderContents ".\+;"me=e-1 contains=cuplNumber contained + +" String constants +syn region cuplString start=+'+ end=+'+ +syn region cuplString start=+"+ end=+"+ + +syn keyword cuplStatement append condition +syn keyword cuplStatement default else +syn keyword cuplStatement field fld format function fuse +syn keyword cuplStatement group if jump loc +syn keyword cuplStatement macro min node out +syn keyword cuplStatement pin pinnode present table +syn keyword cuplStatement sequence sequenced sequencejk sequencers sequencet + +syn keyword cuplFunction log2 log8 log16 log + +" Valid integer number formats (decimal, binary, octal, hex) +syn match cuplNumber "\<[-+]\=[0-9]\+\>" +syn match cuplNumber "'d'[0-9]\+\>" +syn match cuplNumber "'b'[01x]\+\>" +syn match cuplNumber "'o'[0-7x]\+\>" +syn match cuplNumber "'h'[0-9a-fx]\+\>" + +" operators +syn match cuplLogicalOperator "[!#&$]" +syn match cuplArithmeticOperator "[-+*/%]" +syn match cuplArithmeticOperator "\*\*" +syn match cuplAssignmentOperator ":\==" +syn match cuplEqualityOperator ":" +syn match cuplTruthTableOperator "=>" + +" Signal extensions +syn match cuplExtension "\.[as][pr]\>" +syn match cuplExtension "\.oe\>" +syn match cuplExtension "\.oemux\>" +syn match cuplExtension "\.[dlsrjk]\>" +syn match cuplExtension "\.ck\>" +syn match cuplExtension "\.dq\>" +syn match cuplExtension "\.ckmux\>" +syn match cuplExtension "\.tec\>" +syn match cuplExtension "\.cnt\>" + +syn match cuplRangeOperator "\.\." contained + +" match ranges like memadr:[0000..1FFF] +" and highlight both the numbers and the .. operator +syn match cuplNumberRange "\<\x\+\.\.\x\+\>" contains=cuplRangeOperator + +" match vectors of type [name3..0] (decimal numbers only) +" but assign them no special highlighting except for the .. operator +syn match cuplBitVector "\<\a\+\d\+\.\.\d\+\>" contains=cuplRangeOperator + +" other special characters +syn match cuplSpecialChar "[\[\](){},;]" + +" directives +" (define these after cuplOperator so $xxx overrides $) +syn match cuplDirective "\$msg" +syn match cuplDirective "\$macro" +syn match cuplDirective "\$mend" +syn match cuplDirective "\$repeat" +syn match cuplDirective "\$repend" +syn match cuplDirective "\$define" +syn match cuplDirective "\$include" + +" multi-line comments +syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo + +syn sync minlines=1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" The default highlighting. +hi def link cuplHeader cuplStatement +hi def link cuplLogicalOperator cuplOperator +hi def link cuplRangeOperator cuplOperator +hi def link cuplArithmeticOperator cuplOperator +hi def link cuplAssignmentOperator cuplOperator +hi def link cuplEqualityOperator cuplOperator +hi def link cuplTruthTableOperator cuplOperator +hi def link cuplOperator cuplStatement +hi def link cuplFunction cuplStatement +hi def link cuplStatement Statement +hi def link cuplNumberRange cuplNumber +hi def link cuplNumber cuplString +hi def link cuplString String +hi def link cuplComment Comment +hi def link cuplExtension cuplSpecial +hi def link cuplSpecialChar cuplSpecial +hi def link cuplSpecial Special +hi def link cuplDirective PreProc +hi def link cuplTodo Todo + + +let b:current_syntax = "cupl" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:ts=8 diff --git a/syntax/cuplsim.vim b/syntax/cuplsim.vim new file mode 100644 index 000000000..189b3e348 --- /dev/null +++ b/syntax/cuplsim.vim @@ -0,0 +1,67 @@ +if polyglot#init#is_disabled(expand(':p'), 'cuplsim', 'syntax/cuplsim.vim') + finish +endif + +" Vim syntax file +" Language: CUPL simulation +" Maintainer: John Cook +" Last Change: 2001 Apr 25 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the CUPL syntax to start with +runtime! syntax/cupl.vim +unlet b:current_syntax + +" omit definition-specific stuff +syn clear cuplStatement +syn clear cuplFunction +syn clear cuplLogicalOperator +syn clear cuplArithmeticOperator +syn clear cuplAssignmentOperator +syn clear cuplEqualityOperator +syn clear cuplTruthTableOperator +syn clear cuplExtension + +" simulation order statement +syn match cuplsimOrder "order:" nextgroup=cuplsimOrderSpec skipempty +syn region cuplsimOrderSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimOrderFormat,cuplBitVector,cuplSpecialChar,cuplLogicalOperator,cuplCommaOperator contained + +" simulation base statement +syn match cuplsimBase "base:" nextgroup=cuplsimBaseSpec skipempty +syn region cuplsimBaseSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimBaseType contained +syn keyword cuplsimBaseType octal decimal hex contained + +" simulation vectors statement +syn match cuplsimVectors "vectors:" + +" simulator format control +syn match cuplsimOrderFormat "%\d\+\>" contained + +" simulator control +syn match cuplsimStimulus "[10ckpx]\+" +syn match cuplsimStimulus +'\(\x\|x\)\+'+ +syn match cuplsimOutput "[lhznx*]\+" +syn match cuplsimOutput +"\x\+"+ + +syn sync minlines=1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +" append to the highlighting links in cupl.vim +" The default highlighting. +hi def link cuplsimOrder cuplStatement +hi def link cuplsimBase cuplStatement +hi def link cuplsimBaseType cuplStatement +hi def link cuplsimVectors cuplStatement +hi def link cuplsimStimulus cuplNumber +hi def link cuplsimOutput cuplNumber +hi def link cuplsimOrderFormat cuplNumber + + +let b:current_syntax = "cuplsim" +" vim:ts=8 diff --git a/syntax/cvs.vim b/syntax/cvs.vim new file mode 100644 index 000000000..219341bc8 --- /dev/null +++ b/syntax/cvs.vim @@ -0,0 +1,33 @@ +if polyglot#init#is_disabled(expand(':p'), 'cvs', 'syntax/cvs.vim') + finish +endif + +" Vim syntax file +" Language: CVS commit file +" Maintainer: Matt Dunford (zenmatic@gmail.com) +" Last Change: Sat Nov 24 23:25:11 CET 2001 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn region cvsLine start="^CVS: " end="$" contains=cvsFile,cvsCom,cvsFiles,cvsTag +syn match cvsFile contained " \t\(\(\S\+\) \)\+" +syn match cvsTag contained " Tag:" +syn match cvsFiles contained "\(Added\|Modified\|Removed\) Files:" +syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend keepend +syn match cvsDir contained "\S\+$" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link cvsLine Comment +hi def link cvsDir cvsFile +hi def link cvsFile Constant +hi def link cvsFiles cvsCom +hi def link cvsTag cvsCom +hi def link cvsCom Statement + + +let b:current_syntax = "cvs" diff --git a/syntax/cvsrc.vim b/syntax/cvsrc.vim new file mode 100644 index 000000000..80fcd5874 --- /dev/null +++ b/syntax/cvsrc.vim @@ -0,0 +1,43 @@ +if polyglot#init#is_disabled(expand(':p'), 'cvsrc', 'syntax/cvsrc.vim') + finish +endif + +" Vim syntax file +" Language: cvs(1) RC file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn region cvsrcString display oneline start=+"+ skip=+\\\\\|\\\\"+ end=+"+ +syn region cvsrcString display oneline start=+'+ skip=+\\\\\|\\\\'+ end=+'+ + +syn match cvsrcNumber display '\<\d\+\>' + +syn match cvsrcBegin display '^' nextgroup=cvsrcCommand skipwhite + +syn region cvsrcCommand contained transparent matchgroup=cvsrcCommand + \ start='add\|admin\|checkout\|commit\|cvs\|diff' + \ start='export\|history\|import\|init\|log' + \ start='rdiff\|release\|remove\|rtag\|status\|tag' + \ start='update' + \ end='$' + \ contains=cvsrcOption,cvsrcString,cvsrcNumber + \ keepend + +syn match cvsrcOption contained display '-\a\+' + +hi def link cvsrcString String +hi def link cvsrcNumber Number +hi def link cvsrcCommand Keyword +hi def link cvsrcOption Identifier + +let b:current_syntax = "cvsrc" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/cynpp.vim b/syntax/cynpp.vim new file mode 100644 index 000000000..1de37e7c7 --- /dev/null +++ b/syntax/cynpp.vim @@ -0,0 +1,54 @@ +if polyglot#init#is_disabled(expand(':p'), 'cynpp', 'syntax/cynpp.vim') + finish +endif + +" Vim syntax file +" Language: Cyn++ +" Maintainer: Phil Derrick +" Last change: 2001 Sep 02 +" +" Language Information +" +" Cynpp (Cyn++) is a macro language to ease coding in Cynlib. +" Cynlib is a library of C++ classes to allow hardware +" modelling in C++. Combined with a simulation kernel, +" the compiled and linked executable forms a hardware +" simulation of the described design. +" +" Cyn++ is designed to be HDL-like. +" +" Further information can be found from www.forteds.com + + + + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the Cynlib syntax to start with - this includes the C++ syntax +runtime! syntax/cynlib.vim +unlet b:current_syntax + + + +" Cyn++ extensions + +syn keyword cynppMacro Always EndAlways +syn keyword cynppMacro Module EndModule +syn keyword cynppMacro Initial EndInitial +syn keyword cynppMacro Posedge Negedge Changed +syn keyword cynppMacro At +syn keyword cynppMacro Thread EndThread +syn keyword cynppMacro Instantiate + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link cLabel Label +hi def link cynppMacro Statement + + +let b:current_syntax = "cynpp" diff --git a/syntax/d.vim b/syntax/d.vim index 69100b9cc..108dbd22c 100644 --- a/syntax/d.vim +++ b/syntax/d.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dlang', 'syntax/d.vim') + finish +endif " Vim syntax file for the D programming language (version 1.076 and 2.069). " @@ -573,5 +575,3 @@ syn keyword dAsmOpCode contained adc let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/dart.vim b/syntax/dart.vim index 68035dc86..b91d7a688 100644 --- a/syntax/dart.vim +++ b/syntax/dart.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dart', 'syntax/dart.vim') + finish +endif " Vim syntax file " Language: Dart " Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file @@ -51,7 +53,7 @@ syntax match dartLibrary "^\(library\|part of\|part\)\>" syntax match dartMetadata "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>" " Numbers -syntax match dartNumber "\<\d\+\(\.\d\+\)\=\>" +syntax match dartNumber "\<0[xX]\x\+\>\|\<\d\+\(\.\d\+\)\=\([eE][+-]\=\d\+\)\=\>" " User Types syntax match dartUserType "\<[_$]*\u[a-zA-Z0-9_$]*\>" @@ -142,5 +144,3 @@ let b:spell_options = 'contained' if g:main_syntax is# 'dart' unlet g:main_syntax endif - -endif diff --git a/syntax/datascript.vim b/syntax/datascript.vim new file mode 100644 index 000000000..32c02a450 --- /dev/null +++ b/syntax/datascript.vim @@ -0,0 +1,106 @@ +if polyglot#init#is_disabled(expand(':p'), 'datascript', 'syntax/datascript.vim') + finish +endif + +" Vim syntax file +" Language: DataScript +" Maintainer: Dominique Pelle +" Last Change: 2015 Jul 30 +" +" DataScript is a formal language for modelling binary datatypes, +" bitstreams or file formats. For more information, see: +" +" http://dstools.sourceforge.net/DataScriptLanguageOverview.html + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +syn keyword dsPackage import package +syn keyword dsType bit bool string +syn keyword dsType int int8 int16 int32 int64 +syn keyword dsType uint8 uint16 uint32 uint64 +syn keyword dsType varint16 varint32 varint64 +syn keyword dsType varuint16 varuint32 varuint64 +syn keyword dsType leint16 leint32 leint64 +syn keyword dsType leuint16 leuint32 leuint64 +syn keyword dsEndian little big +syn keyword dsAlign align +syn keyword dsLabel case default +syn keyword dsConditional if condition +syn keyword dsBoolean true false +syn keyword dsCompound union choice on enum bitmask subtype explicit +syn keyword dsKeyword function return +syn keyword dsOperator sizeof bitsizeof lengthof is sum forall in +syn keyword dsStorageClass const +syn keyword dsTodo contained TODO FIXME XXX +syn keyword dsSql sql sql_table sql_database sql_pragma sql_index +syn keyword dsSql sql_integer sql_metadata sql_key sql_virtual +syn keyword dsSql using reference_key foreign_key to + +" dsCommentGroup allows adding matches for special things in comments. +syn cluster dsCommentGroup contains=dsTodo + +syn match dsOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:" + +syn match dsNumber display "\<\d\+\>" +syn match dsNumberHex display "\<0[xX]\x\+\>" +syn match dsNumberBin display "\<[01]\+[bB]\>" contains=dsBinaryB +syn match dsBinaryB display contained "[bB]\>" +syn match dsOctal display "\<0\o\+\>" contains=dsOctalZero +syn match dsOctalZero display contained "\<0" + +syn match dsOctalError display "\<0\o*[89]\d*\>" + +syn match dsCommentError display "\*/" +syn match dsCommentStartError display "/\*"me=e-1 contained + +syn region dsCommentL + \ start="//" skip="\\$" end="$" keepend + \ contains=@dsCommentGroup,@Spell +syn region dsComment + \ matchgroup=dsCommentStart start="/\*" end="\*/" + \ contains=@dsCommentGroup,dsCommentStartError,@Spell extend + +syn region dsString + \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell + +syn sync ccomment dsComment + +" Define the default highlighting. +hi def link dsType Type +hi def link dsEndian StorageClass +hi def link dsStorageClass StorageClass +hi def link dsAlign Label +hi def link dsLabel Label +hi def link dsOffset Label +hi def link dsSql PreProc +hi def link dsCompound Structure +hi def link dsConditional Conditional +hi def link dsBoolean Boolean +hi def link dsKeyword Statement +hi def link dsString String +hi def link dsNumber Number +hi def link dsNumberBin Number +hi def link dsBinaryB Special +hi def link dsOctal Number +hi def link dsOctalZero Special +hi def link dsOctalError Error +hi def link dsNumberHex Number +hi def link dsTodo Todo +hi def link dsOperator Operator +hi def link dsPackage Include +hi def link dsCommentError Error +hi def link dsCommentStartError Error +hi def link dsCommentStart dsComment +hi def link dsCommentL dsComment +hi def link cCommentL dsComment +hi def link dsComment Comment + +let b:current_syntax = "datascript" + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/syntax/dcd.vim b/syntax/dcd.vim new file mode 100644 index 000000000..a37cd8d11 --- /dev/null +++ b/syntax/dcd.vim @@ -0,0 +1,55 @@ +if polyglot#init#is_disabled(expand(':p'), 'dcd', 'syntax/dcd.vim') + finish +endif + +" Vim syntax file +" Language: WildPackets EtherPeek Decoder (.dcd) file +" Maintainer: Christopher Shinn +" Last Change: 2003 Apr 25 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Keywords +syn keyword dcdFunction DCod TRTS TNXT CRLF +syn match dcdFunction display "\(STR\)\#" +syn keyword dcdLabel LABL +syn region dcdLabel start="[A-Z]" end=";" +syn keyword dcdConditional CEQU CNEQ CGTE CLTE CBIT CLSE +syn keyword dcdConditional LSTS LSTE LSTZ +syn keyword dcdConditional TYPE TTST TEQU TNEQ TGTE TLTE TBIT TLSE TSUB SKIP +syn keyword dcdConditional MARK WHOA +syn keyword dcdConditional SEQU SNEQ SGTE SLTE SBIT +syn match dcdConditional display "\(CST\)\#" "\(TST\)\#" +syn keyword dcdDisplay HBIT DBIT BBIT +syn keyword dcdDisplay HBYT DBYT BBYT +syn keyword dcdDisplay HWRD DWRD BWRD +syn keyword dcdDisplay HLNG DLNG BLNG +syn keyword dcdDisplay D64B +syn match dcdDisplay display "\(HEX\)\#" "\(CHR\)\#" "\(EBC\)\#" +syn keyword dcdDisplay HGLB DGLB BGLB +syn keyword dcdDisplay DUMP +syn keyword dcdStatement IPLG IPV6 ATLG AT03 AT01 ETHR TRNG PRTO PORT +syn keyword dcdStatement TIME OSTP PSTR CSTR NBNM DMPE FTPL CKSM FCSC +syn keyword dcdStatement GBIT GBYT GWRD GLNG +syn keyword dcdStatement MOVE ANDG ORRG NOTG ADDG SUBG MULG DIVG MODG INCR DECR +syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8 + +" Comment +syn region dcdComment start="\*" end="\;" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dcdFunction Identifier +hi def link dcdLabel Constant +hi def link dcdConditional Conditional +hi def link dcdDisplay Type +hi def link dcdStatement Statement +hi def link dcdSpecial Special +hi def link dcdComment Comment + + +let b:current_syntax = "dcd" diff --git a/syntax/dcov.vim b/syntax/dcov.vim index bfd7b91c3..0a646a63f 100644 --- a/syntax/dcov.vim +++ b/syntax/dcov.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dlang', 'syntax/dcov.vim') + finish +endif " Vim syntax file for coverage information for the reference compiler (DMD) of " the D programming language. @@ -51,5 +53,3 @@ hi def link dcovLow Operator hi def link dcovPartial Structure let b:current_syntax = "dcov" - -endif diff --git a/syntax/dd.vim b/syntax/dd.vim index 2bfc2b0ec..e24cd372b 100644 --- a/syntax/dd.vim +++ b/syntax/dd.vim @@ -1,5 +1,5 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dlang', 'syntax/dd.vim') + finish +endif runtime! /syntax/ddoc.vim - -endif diff --git a/syntax/ddoc.vim b/syntax/ddoc.vim index 0a4a9d495..52a9a382d 100644 --- a/syntax/ddoc.vim +++ b/syntax/ddoc.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dlang', 'syntax/ddoc.vim') + finish +endif if &filetype == "ddoc" "ddoc file type @@ -82,5 +84,3 @@ elseif &filetype == "d" hi! def link ddocIdentifierNestedDecl Macro hi! def link ddocKeyword Macro endif - -endif diff --git a/syntax/debchangelog.vim b/syntax/debchangelog.vim new file mode 100644 index 000000000..7b0f6528f --- /dev/null +++ b/syntax/debchangelog.vim @@ -0,0 +1,81 @@ +if polyglot#init#is_disabled(expand(':p'), 'debchangelog', 'syntax/debchangelog.vim') + finish +endif + +" Vim syntax file +" Language: Debian changelog files +" Maintainer: Debian Vim Maintainers +" Former Maintainers: Gerfried Fuchs +" Wichert Akkerman +" Last Change: 2021 Oct 19 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +" Case doesn't matter for us +syn case ignore + +let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\=' +let s:binNMU='binary-only=yes' + +let s:cpo = &cpo +set cpo-=C +let s:supported = [ + \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', + \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', + \ 'trixie', 'sid', 'rc-buggy', + \ + \ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy', + \ 'devel' + \ ] +let s:unsupported = [ + \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', + \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', + \ + \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', + \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', + \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', + \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', + \ 'disco', 'eoan', 'groovy' + \ ] +let &cpo=s:cpo + +" Define some common expressions we can use later on +syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " +exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"' +exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"' +exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"' +exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"' +syn match debchangelogUnreleased contained / UNRELEASED/ +syn match debchangelogVersion contained "(.\{-})" +syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" +syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" +syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" +syn match debchangelogEmail contained "<.\{-}>" + +" Define the entries that make up the changelog +syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogFirstKV,debchangelogOtherKV,debchangelogTarget,debchangelogUnsupportedTarget,debchangelogUnreleased,debchangelogVersion,debchangelogBinNMU oneline +syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline +syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline + +" Associate our matches and regions with pretty colours +hi def link debchangelogHeader Error +hi def link debchangelogFooter Identifier +hi def link debchangelogEntry Normal +hi def link debchangelogCloses Statement +hi def link debchangelogLP Statement +hi def link debchangelogFirstKV Identifier +hi def link debchangelogOtherKV Identifier +hi def link debchangelogName Comment +hi def link debchangelogVersion Identifier +hi def link debchangelogTarget Identifier +hi def link debchangelogUnsupportedTarget Identifier +hi def link debchangelogUnreleased WarningMsg +hi def link debchangelogEmail Special + +let b:current_syntax = 'debchangelog' + +" vim: ts=8 sw=2 diff --git a/syntax/debcontrol.vim b/syntax/debcontrol.vim new file mode 100644 index 000000000..630c17733 --- /dev/null +++ b/syntax/debcontrol.vim @@ -0,0 +1,149 @@ +if polyglot#init#is_disabled(expand(':p'), 'debcontrol', 'syntax/debcontrol.vim') + finish +endif + +" Vim syntax file +" Language: Debian control files +" Maintainer: Debian Vim Maintainers +" Former Maintainers: Gerfried Fuchs +" Wichert Akkerman +" Last Change: 2021 Nov 26 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Should match case except for the keys of each field +syn case match + +syn iskeyword @,48-57,-,/ + +" Everything that is not explicitly matched by the rules below +syn match debcontrolElse "^.*$" + +" Common seperators +syn match debControlComma ",[ \t]*" +syn match debControlSpace "[ \t]" + +let s:kernels = ['linux', 'hurd', 'kfreebsd', 'knetbsd', 'kopensolaris', 'netbsd'] +let s:archs = [ + \ 'alpha', 'amd64', 'armeb', 'armel', 'armhf', 'arm64', 'avr32', 'hppa' + \, 'i386', 'ia64', 'lpia', 'm32r', 'm68k', 'mipsel', 'mips64el', 'mips' + \, 'powerpcspe', 'powerpc', 'ppc64el', 'ppc64', 'riscv64', 's390x', 's390', 'sh3eb' + \, 'sh3', 'sh4eb', 'sh4', 'sh', 'sparc64', 'sparc', 'x32' + \ ] +let s:pairs = [ + \ 'hurd-i386', 'kfreebsd-i386', 'kfreebsd-amd64', 'knetbsd-i386' + \, 'kopensolaris-i386', 'netbsd-alpha', 'netbsd-i386' + \ ] + +" Define some common expressions we can use later on +syn keyword debcontrolArchitecture contained all any +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:kernels), {k,v -> v .'-any'})) +exe 'syn keyword debcontrolArchitecture contained '. join(map(copy(s:archs), {k,v -> 'any-'.v})) +exe 'syn keyword debcontrolArchitecture contained '. join(s:archs) +exe 'syn keyword debcontrolArchitecture contained '. join(s:pairs) + +unlet s:kernels s:archs s:pairs + +" Keep in sync with https://metadata.ftp-master.org/sections.822 +" curl -q https://metadata.ftp-master.debian.org/sections.822 2>/dev/null| grep-dctrl -n --not -FSection -sSection / - +let s:sections = [ + \ 'admin', 'cli-mono', 'comm', 'database', 'debian-installer', 'debug' + \, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded' + \, 'fonts', 'games', 'gnome', 'gnu-r', 'gnustep', 'golang', 'graphics' + \, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection' + \, 'java', 'javascript', 'kde', 'kernel', 'libdevel', 'libs', 'lisp' + \, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net', 'news' + \, 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python', 'raku' + \, 'ruby', 'rust', 'science', 'shells', 'sound', 'tasks', 'tex', 'text' + \, 'utils', 'vcs', 'video', 'web', 'x11', 'xfce', 'zope' + \ ] + +syn keyword debcontrolMultiArch contained no foreign allowed same +syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" +syn keyword debcontrolPriority contained extra important optional required standard +exe 'syn match debcontrolSection contained "\%(\%(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\|restricted\|universe\|multiverse\)/\)\=\<\%('.join(s:sections, '\|').'\)\>"' +syn keyword debcontrolPackageType contained udeb deb +syn match debcontrolVariable contained "\${.\{-}}" +syn keyword debcontrolDmUpload contained yes +syn keyword debcontrolYesNo contained yes no +syn match debcontrolR3 contained "\<\%(no\|binary-targets\|[[:graph:]]\+/[[:graph:]]\+\%( \+[[:graph:]]\+/[[:graph:]]\+\)*\)\>" + +unlet s:sections + +" A URL (using the domain name definitions from RFC 1034 and 1738), right now +" only enforce protocol and some sanity on the server/path part; +syn match debcontrolHTTPUrl contained "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcontrolVcsSvn contained "\vsvn%(\+ssh)?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcontrolVcsCvs contained "\v%(\-d *)?:pserver:[^@]+\@[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?:/[^[:space:]]*%( [^[:space:]]+)?$" +syn match debcontrolVcsGit contained "\v%(git|https?)://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?%(\s+-b\s+[^ ~^:?*[\\]+)?$" + +" An email address +syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcontrolEmail "<.\{-}>" + +" #-Comments +syn match debcontrolComment "^#.*$" contains=@Spell + +syn case ignore + +" Handle all fields from deb-src-control(5) + +" Catch-all for the legal fields +syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment +syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell + +" Fields for which we do strict syntax checking +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Architecture: *" end="$" contains=debcontrolArchitecture,debcontrolSpace oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Multi-Arch: *" end="$" contains=debcontrolMultiArch oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Package\|Source\): *" end="$" contains=debcontrolName oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Priority: *" end="$" contains=debcontrolPriority oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Section: *" end="$" contains=debcontrolSection oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XC-\)\=Package-Type: *" end="$" contains=debcontrolPackageType oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Homepage: *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-[-a-zA-Z0-9]\+-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\): *" end="$" contains=debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-[-a-zA-Z0-9]\+-\)\=Vcs-Svn: *" end="$" contains=debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-[-a-zA-Z0-9]\+-\)\=Vcs-Cvs: *" end="$" contains=debcontrolVcsCvs oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-[-a-zA-Z0-9]\+-\)\=Vcs-Git: *" end="$" contains=debcontrolVcsGit oneline keepend +syn region debcontrolStrictField matchgroup=debcontrolKey start="^Rules-Requires-Root: *" end="$" contains=debcontrolR3 oneline +syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Build-\)\=Essential: *" end="$" contains=debcontrolYesNo oneline + +syn region debcontrolStrictField matchgroup=debcontrolDeprecatedKey start="^\%(XS-\)\=DM-Upload-Allowed: *" end="$" contains=debcontrolDmUpload oneline + +" Associate our matches and regions with pretty colours +hi def link debcontrolKey Keyword +hi def link debcontrolField Normal +hi def link debcontrolStrictField Error +hi def link debcontrolDeprecatedKey Error +hi def link debcontrolMultiField Normal +hi def link debcontrolArchitecture Normal +hi def link debcontrolMultiArch Normal +hi def link debcontrolName Normal +hi def link debcontrolPriority Normal +hi def link debcontrolSection Normal +hi def link debcontrolPackageType Normal +hi def link debcontrolVariable Identifier +hi def link debcontrolEmail Identifier +hi def link debcontrolVcsSvn Identifier +hi def link debcontrolVcsCvs Identifier +hi def link debcontrolVcsGit Identifier +hi def link debcontrolHTTPUrl Identifier +hi def link debcontrolDmUpload Identifier +hi def link debcontrolYesNo Identifier +hi def link debcontrolR3 Identifier +hi def link debcontrolComment Comment +hi def link debcontrolElse Special + +let b:current_syntax = 'debcontrol' + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 diff --git a/syntax/debcopyright.vim b/syntax/debcopyright.vim new file mode 100644 index 000000000..0cb60cfbc --- /dev/null +++ b/syntax/debcopyright.vim @@ -0,0 +1,37 @@ +if polyglot#init#is_disabled(expand(':p'), 'debcopyright', 'syntax/debcopyright.vim') + finish +endif + +" Vim syntax file +" Language: Debian copyright file +" Maintainer: Debian Vim Maintainers +" Last Change: 2019 Sep 07 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\|Files-Excluded\%(-[-a-zA-Z0-9]\+\)\=\): *" +syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcopyrightEmail "<.\{-}>" +syn match debcopyrightComment "^#.*$" contains=@Spell + +hi def link debcopyrightUrl Identifier +hi def link debcopyrightKey Keyword +hi def link debcopyrightEmail Identifier +hi def link debcopyrightComment Comment + +let b:current_syntax = 'debcopyright' + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 diff --git a/syntax/debsources.vim b/syntax/debsources.vim new file mode 100644 index 000000000..9929e6296 --- /dev/null +++ b/syntax/debsources.vim @@ -0,0 +1,61 @@ +if polyglot#init#is_disabled(expand(':p'), 'debsources', 'syntax/debsources.vim') + finish +endif + +" Vim syntax file +" Language: Debian sources.list +" Maintainer: Debian Vim Maintainers +" Former Maintainer: Matthijs Mohlmann +" Last Change: 2021 Oct 19 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +" case sensitive +syn case match + +" A bunch of useful keywords +syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/ + +" Match comments +syn match debsourcesComment /#.*/ contains=@Spell + +let s:cpo = &cpo +set cpo-=C +let s:supported = [ + \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', + \ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm', + \ 'trixie', 'sid', 'rc-buggy', + \ + \ 'trusty', 'xenial', 'bionic', 'focal', 'hirsute', 'impish', 'jammy', + \ 'devel' + \ ] +let s:unsupported = [ + \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', + \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', + \ + \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', + \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', + \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', + \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', + \ 'disco', 'eoan', 'groovy' + \ ] +let &cpo=s:cpo + +" Match uri's +syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' +exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' +exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' + +" Associate our matches and regions with pretty colours +hi def link debsourcesLine Error +hi def link debsourcesKeyword Statement +hi def link debsourcesDistrKeyword Type +hi def link debsourcesUnsupportedDistrKeyword WarningMsg +hi def link debsourcesComment Comment +hi def link debsourcesUri Constant + +let b:current_syntax = 'debsources' diff --git a/syntax/def.vim b/syntax/def.vim new file mode 100644 index 000000000..409957869 --- /dev/null +++ b/syntax/def.vim @@ -0,0 +1,48 @@ +if polyglot#init#is_disabled(expand(':p'), 'def', 'syntax/def.vim') + finish +endif + +" Vim syntax file +" Language: Microsoft Module-Definition (.def) File +" Orig Author: Rob Brady +" Maintainer: Wu Yongwei +" Last Change: $Date: 2007/10/02 13:51:24 $ +" $Revision: 1.2 $ + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match defComment ";.*" + +syn keyword defKeyword LIBRARY STUB EXETYPE DESCRIPTION CODE WINDOWS DOS +syn keyword defKeyword RESIDENTNAME PRIVATE EXPORTS IMPORTS SEGMENTS +syn keyword defKeyword HEAPSIZE DATA +syn keyword defStorage LOADONCALL MOVEABLE DISCARDABLE SINGLE +syn keyword defStorage FIXED PRELOAD + +syn match defOrdinal "\s\+@\d\+" + +syn region defString start=+'+ end=+'+ + +syn match defNumber "\d+" +syn match defNumber "0x\x\+" + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link defComment Comment +hi def link defKeyword Keyword +hi def link defStorage StorageClass +hi def link defString String +hi def link defNumber Number +hi def link defOrdinal Operator + + +let b:current_syntax = "def" + +" vim: ts=8 diff --git a/syntax/denyhosts.vim b/syntax/denyhosts.vim new file mode 100644 index 000000000..2a4aa7212 --- /dev/null +++ b/syntax/denyhosts.vim @@ -0,0 +1,293 @@ +if polyglot#init#is_disabled(expand(':p'), 'denyhosts', 'syntax/denyhosts.vim') + finish +endif + +" Vim syntax file +" Language: denyhosts configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword denyhostsTodo + \ contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn case ignore + +syn match denyhostsComment + \ contained + \ display + \ '#.*' + \ contains=denyhostsTodo, + \ @Spell + +syn match denyhostsBegin + \ display + \ '^' + \ nextgroup=@denyhostsSetting, + \ denyhostsComment + \ skipwhite + +syn cluster denyhostsSetting + \ contains=denyhostsStringSetting, + \ denyhostsBooleanSetting, + \ denyhostsPathSetting, + \ denyhostsNumericSetting, + \ denyhostsTimespecSetting, + \ denyhostsFormatSetting, + \ denyhostsRegexSetting + +syn keyword denyhostsStringSetting + \ contained + \ ADMIN_EMAIL + \ SMTP_HOST + \ SMTP_USERNAME + \ SMTP_PASSWORD + \ SMTP_FROM + \ SMTP_SUBJECT + \ BLOCK_SERVICE + \ nextgroup=denyhostsStringDelimiter + \ skipwhite + +syn keyword denyhostsBooleanSetting + \ contained + \ SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS + \ HOSTNAME_LOOKUP + \ SYSLOG_REPORT + \ RESET_ON_SUCCESS + \ SYNC_UPLOAD + \ SYNC_DOWNLOAD + \ ALLOWED_HOSTS_HOSTNAME_LOOKUP + \ nextgroup=denyhostsBooleanDelimiter + \ skipwhite + +syn keyword denyhostsPathSetting + \ contained + \ DAEMON_LOG + \ PLUGIN_DENY + \ PLUGIN_PURGE + \ SECURE_LOG + \ LOCK_FILE + \ HOSTS_DENY + \ WORK_DIR + \ nextgroup=denyhostsPathDelimiter + \ skipwhite + +syn keyword denyhostsNumericSetting + \ contained + \ SYNC_DOWNLOAD_THRESHOLD + \ SMTP_PORT + \ PURGE_THRESHOLD + \ DENY_THRESHOLD_INVALID + \ DENY_THRESHOLD_VALID + \ DENY_THRESHOLD_ROOT + \ DENY_THRESHOLD_RESTRICTED + \ nextgroup=denyhostsNumericDelimiter + \ skipwhite + +syn keyword denyhostsTimespecSetting + \ contained + \ DAEMON_SLEEP + \ DAEMON_PURGE + \ AGE_RESET_INVALID + \ AGE_RESET_VALID + \ AGE_RESET_ROOT + \ AGE_RESET_RESTRICTED + \ SYNC_INTERVAL + \ SYNC_DOWNLOAD_RESILIENCY + \ PURGE_DENY + \ nextgroup=denyhostsTimespecDelimiter + \ skipwhite + +syn keyword denyhostsFormatSetting + \ contained + \ DAEMON_LOG_TIME_FORMAT + \ DAEMON_LOG_MESSAGE_FORMAT + \ SMTP_DATE_FORMAT + \ nextgroup=denyhostsFormatDelimiter + \ skipwhite + +syn keyword denyhostsRegexSetting + \ contained + \ SSHD_FORMAT_REGEX + \ FAILED_ENTRY_REGEX + \ FAILED_ENTRY_REGEX2 + \ FAILED_ENTRY_REGEX3 + \ FAILED_ENTRY_REGEX4 + \ FAILED_ENTRY_REGEX5 + \ FAILED_ENTRY_REGEX6 + \ FAILED_ENTRY_REGEX7 + \ USERDEF_FAILED_ENTRY_REGEX + \ SUCCESSFUL_ENTRY_REGEX + \ nextgroup=denyhostsRegexDelimiter + \ skipwhite + +syn keyword denyhostURLSetting + \ contained + \ SYNC_SERVER + \ nextgroup=denyhostsURLDelimiter + \ skipwhite + +syn match denyhostsStringDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsString + \ skipwhite + +syn match denyhostsBooleanDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=@denyhostsBoolean + \ skipwhite + +syn match denyhostsPathDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsPath + \ skipwhite + +syn match denyhostsNumericDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsNumber + \ skipwhite + +syn match denyhostsTimespecDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsTimespec + \ skipwhite + +syn match denyhostsFormatDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsFormat + \ skipwhite + +syn match denyhostsRegexDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsRegex + \ skipwhite + +syn match denyhostsURLDelimiter + \ contained + \ display + \ '[:=]' + \ nextgroup=denyhostsURL + \ skipwhite + +syn match denyhostsString + \ contained + \ display + \ '.\+' + +syn cluster denyhostsBoolean + \ contains=denyhostsBooleanTrue, + \ denyhostsBooleanFalse + +syn match denyhostsBooleanFalse + \ contained + \ display + \ '.\+' + +syn match denyhostsBooleanTrue + \ contained + \ display + \ '\s*\%(1\|t\%(rue\)\=\|y\%(es\)\=\)\>\s*$' + +syn match denyhostsPath + \ contained + \ display + \ '.\+' + +syn match denyhostsNumber + \ contained + \ display + \ '\d\+\>' + +syn match denyhostsTimespec + \ contained + \ display + \ '\d\+[mhdwy]\>' + +syn match denyhostsFormat + \ contained + \ display + \ '.\+' + \ contains=denyhostsFormattingExpandos + +syn match denyhostsFormattingExpandos + \ contained + \ display + \ '%.' + +syn match denyhostsRegex + \ contained + \ display + \ '.\+' + +" TODO: Perhaps come up with a better regex here? There should really be a +" library for these kinds of generic regexes, that is, URLs, mail addresses, … +syn match denyhostsURL + \ contained + \ display + \ '.\+' + +hi def link denyhostsTodo Todo +hi def link denyhostsComment Comment +hi def link denyhostsSetting Keyword +hi def link denyhostsStringSetting denyhostsSetting +hi def link denyhostsBooleanSetting denyhostsSetting +hi def link denyhostsPathSetting denyhostsSetting +hi def link denyhostsNumericSetting denyhostsSetting +hi def link denyhostsTimespecSetting denyhostsSetting +hi def link denyhostsFormatSetting denyhostsSetting +hi def link denyhostsRegexSetting denyhostsSetting +hi def link denyhostURLSetting denyhostsSetting +hi def link denyhostsDelimiter Normal +hi def link denyhostsStringDelimiter denyhostsDelimiter +hi def link denyhostsBooleanDelimiter denyhostsDelimiter +hi def link denyhostsPathDelimiter denyhostsDelimiter +hi def link denyhostsNumericDelimiter denyhostsDelimiter +hi def link denyhostsTimespecDelimiter denyhostsDelimiter +hi def link denyhostsFormatDelimiter denyhostsDelimiter +hi def link denyhostsRegexDelimiter denyhostsDelimiter +hi def link denyhostsURLDelimiter denyhostsDelimiter +hi def link denyhostsString String +if exists('g:syntax_booleans_simple') || exists('b:syntax_booleans_simple') + hi def link denyhostsBoolean Boolean + hi def link denyhostsBooleanFalse denyhostsBoolean + hi def link denyhostsBooleanTrue denyhostsBoolean +else + hi def denyhostsBooleanTrue term=bold ctermfg=Green guifg=Green + hi def denyhostsBooleanFalse ctermfg=Red guifg=Red +endif +hi def link denyhostsPath String +hi def link denyhostsNumber Number +hi def link denyhostsTimespec Number +hi def link denyhostsFormat String +hi def link denyhostsFormattingExpandos Special +hi def link denyhostsRegex String +hi def link denyhostsURL String + +let b:current_syntax = "denyhosts" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/desc.vim b/syntax/desc.vim new file mode 100644 index 000000000..8002fc914 --- /dev/null +++ b/syntax/desc.vim @@ -0,0 +1,92 @@ +if polyglot#init#is_disabled(expand(':p'), 'desc', 'syntax/desc.vim') + finish +endif + +" Vim syntax file +" Language: T2 / ROCK Linux .desc +" Maintainer: René Rebe , Piotr Esden-Tempski +" Last Change: 2006 Aug 14 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" syntax definitions + +setl iskeyword+=- +syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained +syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained + +" tags +syn match descTag /^\[\(COPY\)\]/ +syn match descTag /^\[\(I\|TITLE\)\]/ +syn match descTag /^\[\(T\|TEXT\)\]/ contained +syn match descTag /^\[\(U\|URL\)\]/ +syn match descTag /^\[\(A\|AUTHOR\)\]/ +syn match descTag /^\[\(M\|MAINTAINER\)\]/ +syn match descTag /^\[\(C\|CATEGORY\)\]/ contained +syn match descTag /^\[\(F\|FLAG\)\]/ contained +syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/ +syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/ +syn match descTag /^\[\(L\|LICENSE\)\]/ contained +syn match descTag /^\[\(S\|STATUS\)\]/ +syn match descTag /^\[\(O\|CONF\)\]/ +syn match descTag /^\[\(V\|VER\|VERSION\)\]/ +syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite +syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite + +" misc +syn match descUrl /\w\+:\/\/\S\+/ +syn match descCategory /\w\+\/\w\+/ contained +syn match descEmail /<[\.A-Za-z0-9]\+@[\.A-Za-z0-9]\+>/ + +" priority tag +syn match descInstallX /X/ contained +syn match descInstallO /O/ contained +syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite +syn match descDash /-/ contained +syn match descDigit /\d/ contained +syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite +syn match descCompilePriority /\d\{3}\.\d\{3}/ contained + +" download tag +syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite +syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite + + +" tag regions +syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail + +syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory + +syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag + +syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense + +" Only when an item doesn't have highlighting yet + +hi def link descFlag Identifier +hi def link descLicense Identifier +hi def link descCategory Identifier + +hi def link descTag Type +hi def link descUrl Underlined +hi def link descEmail Underlined + +" priority tag colors +hi def link descInstallX Boolean +hi def link descInstallO Type +hi def link descDash Operator +hi def link descDigit Number +hi def link descCompilePriority Number + +" download tag colors +hi def link descSum Number +hi def link descTarball Underlined + +" tag region colors +hi def link descText Comment + + +let b:current_syntax = "desc" diff --git a/syntax/desktop.vim b/syntax/desktop.vim new file mode 100644 index 000000000..94964e3d4 --- /dev/null +++ b/syntax/desktop.vim @@ -0,0 +1,271 @@ +if polyglot#init#is_disabled(expand(':p'), 'desktop', 'syntax/desktop.vim') + finish +endif + +" Vim syntax file +" Language: XDG desktop entry +" Filenames: *.desktop, *.directory +" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com ) +" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2020-06-11 +" Version Info: desktop.vim 1.5 +" References: +" - https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.5.html (2020-04-27) +" - https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-0.11.html (2006-02-07) + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim +syn case match + +" Variable {{{1 +" This syntax file can be used to all *nix configuration files similar to dos +" ini format (eg. .xawtv, .radio, kde rc files) - this is default mode. +" By default strict following of freedesktop.org standard is enforced. +" To highlight nonstandard extensions that does not begin with X-, set +" let g:desktop_enable_nonstd = v:true +" Note that this may cause wrong highlight. +" To highlight KDE-reserved features, set +" let g:desktop_enable_kde = v:true +" g:desktop_enable_kde follows g:desktop_enable_nonstd if not supplied + +if exists("g:desktop_enable_nonstd") && g:desktop_enable_nonstd + let s:desktop_enable_nonstd = v:true +else + let s:desktop_enable_nonstd = v:false +endif + +if exists("g:desktop_enable_kde") && g:desktop_enable_kde || s:desktop_enable_nonstd + let s:desktop_enable_kde = v:true +else + let s:desktop_enable_kde = v:false +endif + +" Comment {{{1 +syn match dtComment /^#.*$/ + +" Error {{{1 +syn match dtError /\%(^\s.*\|\s\+$\)/ + +" Group Header {{{1 +" ASCII printable characters except for brackets [ (0x5B) and ] (0x5D) +syn match dtGroup /^\[[\x20-\x5A\x5C\x5E-\x7E]\+\]$/ + +" Entries {{{1 +syn match dtDelim /=/ contained +" lang_territory.codeset@modifier +syn match dtLocaleSuffix + \ /\[\%(C\|POSIX\|[a-z]\{2,4}\%(_[A-Z0-9]\{2,3}\)\?\)\%(\.[A-Za-z0-9_-]\+\)\?\%(@[A-Za-z]\+\)\?\]\ze\s*=/ + \ contained + +" Boolean Value {{{2 +syn match dtBoolean + \ /^\%(DBusActivatable\|Hidden\|NoDisplay\|PrefersNonDefaultGPU\|StartupNotify\|Terminal\)\s*=\s*\%(true\|false\)/ + \ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent +syn keyword dtBooleanKey + \ DBusActivatable Hidden NoDisplay PrefersNonDefaultGPU StartupNotify Terminal + \ contained nextgroup=dtDelim + +if s:desktop_enable_kde + syn match dtBoolean + \ /^ReadOnly\s*=\s*\%(true\|false\)/ + \ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent + syn keyword dtBooleanKey + \ ReadOnly + \ contained nextgroup=dtDelim +endif +syn keyword dtBooleanValue true false contained + +" Numeric Value {{{2 +" icon theme +syn match dtNumeric /^\%(MaxSize\|MinSize\|Size\|Threshold\)\s*=\s*\d\+/ contains=dtNumericKey,dtDelim,dtNumericDecimal +syn keyword dtNumericKey + \ MaxSize MinSize Size Threshold + \ contained nextgroup=dtDelim + +if s:desktop_enable_kde + syn match dtNumeric /^InitialPreference\s*=\s*\d\+/ contains=dtNumericKey,dtDelim,dtNumericDecimal + syn keyword dtNumericKey + \ InitialPreference + \ contained nextgroup=dtDelim +endif + +syn match dtNumericDecimal /\<\d\+$/ contained + +" String Value {{{2 +syn match dtString + \ /^\%(Actions\|Implements\|MimeType\|NotShowIn\|OnlyShowIn\|Path\|StartupWMClass\|URL\)\s*=.*\S/ + \ contains=dtStringKey,dtDelim transparent +syn keyword dtStringKey + \ Actions Implements MimeType NotShowIn OnlyShowIn Path StartupWMClass URL Version + \ contained nextgroup=dtDelim + +" icon theme +syn match dtString + \ /^\%(Context\|Directories\|Example\|Inherits\)\s*=.*\S/ + \ contains=dtStringKey,dtDelim transparent +syn keyword dtStringKey + \ Context Directories Example Inherits + \ contained nextgroup=dtDelim + +if s:desktop_enable_kde + syn match dtString + \ /^\%(Dev\|DocPath\|FSType\|MountPoint\|ServiceTypes\)\s*=.*\S/ + \ contains=dtStringKey,dtDelim transparent + syn keyword dtStringKey + \ Dev DocPath FSType MountPoint ServiceTypes + \ contained nextgroup=dtDelim +endif + +" Categories {{{3 +" https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry +syn match dtCategories /^Categories\s*=.\+\S/ contains=dtCategoriesKey,dtDelim,dtCategoriesValue transparent +syn keyword dtCategoriesKey + \ Categories + \ contained nextgroup=dtDelim + +" Main Categories +syn keyword dtCategoriesValue + \ Audio AudioVideo Development Education Game Graphics Network Office + \ Settings System Utility Video + \ contained + +" Additional Categories +syn keyword dtCategoriesValue + \ BoardGame Chat Clock Geoscience Presentation 2DGraphics 3DGraphics + \ Accessibility ActionGame AdventureGame Amusement ArcadeGame Archiving + \ Art ArtificialIntelligence Astronomy AudioVideoEditing Biology + \ BlocksGame BoardGame Building Calculator Calendar CardGame Chart Chat + \ Chemistry Clock Compression ComputerScience ConsoleOnly Construction + \ ContactManagement Core DataVisualization Database Debugger + \ DesktopSettings Dialup Dictionary DiscBurning Documentation Economy + \ Electricity Electronics Email Emulator Engineering FileManager + \ FileTools FileTransfer Filesystem Finance FlowChart GNOME GTK + \ GUIDesigner Geography Geology Geoscience HamRadio HardwareSettings + \ History IDE IRCClient ImageProcessing InstantMessaging Java KDE + \ KidsGame Languages Literature LogicGame Math MedicalSoftware Midi + \ Mixer Monitor Motif Music News NumericalAnalysis OCR P2P PDA + \ PackageManager ParallelComputing Photography Physics Player + \ Presentation Printing Profiling ProjectManagement Publishing Qt + \ RasterGraphics Recorder RemoteAccess RevisionControl Robotics + \ RolePlaying Scanning Science Security Sequencer Simulation Sports + \ SportsGame Spreadsheet StrategyGame TV Telephony TelephonyTools + \ TerminalEmulator TextEditor TextTools Translation Tuner VectorGraphics + \ VideoConference Viewer WebBrowser WebDevelopment WordProcessor + \ contained + +" Reserved Category +syn keyword dtCategoriesValue + \ Applet Screensaver Shell TrayIcon + \ contained + +" Exec/TryExec {{{3 +syn match dtExec /^\%(Exec\|TryExec\)\s*=.\+\S/ contains=dtExecKey,dtDelim,dtExecParam transparent +syn keyword dtExecKey + \ Exec TryExec + \ contained nextgroup=dtDelim +" code for file(s), URL(s), etc +syn match dtExecParam /\s\zs%[fFuUick]\ze\%(\W\|$\)/ contained + +" Type {{{3 +syn match dtType /^Type\s*=\s*\S\+/ contains=dtTypeKey,dtDelim,dtTypeValue transparent +syn keyword dtTypeKey + \ Type + \ contained nextgroup=dtDelim +syn keyword dtTypeValue + \ Application Directory Link + \ contained + +if s:desktop_enable_kde + syn keyword dtTypeValue + \ FSDevice Service ServiceType + \ contained +endif + + +" Version {{{3 +syn match dtVersion /^Version\s*=\s*\S\+/ contains=dtVersionKey,dtDelim,dtVersionValue transparent +syn keyword dtVersionKey + \ Version + \ contained nextgroup=dtDelim +syn match dtVersionValue /[0-9]\+\%(\.[0-9]\+\)\{1,2}$/ contained + +" Localestring Value {{{2 +syn match dtLocalestring + \ /^\%(Comment\|GenericName\|Keywords\|Name\)\%(\[.\{-}\]\)\?\s*=.*\S/ + \ contains=dtLocalestringKey,dtLocaleSuffix,dtDelim transparent +syn keyword dtLocalestringKey + \ Comment GenericName Keywords Name + \ contained nextgroup=dtLocaleSuffix,dtDelim skipwhite + +" Iconstring Value {{{2 +syn match dtIconstring + \ /^Icon\s*=.*\S/ + \ contains=dtIconstringKey,dtDelim transparent +syn keyword dtIconstringKey + \ Icon + \ contained nextgroup=dtDelim skipwhite + +if s:desktop_enable_kde + syn match dtIconstring + \ /^UnmountIcon\>\%(\[.\{-}\]\)\?\s*=.*\S/ + \ contains=dtIconstringKey,dtLocaleSuffix,dtDelim transparent + syn keyword dtIconstringKey + \ UnmountIcon + \ contained nextgroup=dtLocaleSuffix,dtDelim skipwhite +endif + +" X-Extension {{{2 +syn match dtXExtension /^X-[0-9A-Za-z-]*\%(\[.\{-}\]\)\?\s*=.*\S/ + \ contains=dtXExtensionKey,dtLocaleSuffix,dtDelim transparent +syn match dtXExtensionKey /^X-[0-9A-Za-z-]*/ contained nextgroup=dtLocaleSuffix,dtDelim + +" non standard {{{2 +if s:desktop_enable_nonstd + syn match dtNonStdLabel /^[0-9A-Za-z-]\+\%(\[.\{-}\]\)\?\s*=.*\S/ + \ contains=dtNonStdLabelKey,dtLocaleSuffix,dtDelim transparent + syn match dtNonStdLabelKey /^[0-9A-Za-z-]\+/ contained nextgroup=dtLocaleSuffix,dtDelim +endif + +" Highlight {{{1 +hi def link dtComment Comment +hi def link dtError Error + +hi def link dtGroup Special + +hi def link dtDelim Delimiter +hi def link dtLocaleSuffix Identifier + +hi def link dtBooleanKey Type +hi def link dtBooleanValue Boolean + +hi def link dtNumericKey Type +hi def link dtNumericDecimal Number + +hi def link dtStringKey Type +hi def link dtCategoriesKey Type +hi def link dtCategoriesValue Constant +hi def link dtExecKey Type +hi def link dtExecParam Special +hi def link dtTypeKey Type +hi def link dtTypeValue Constant +hi def link dtVersionKey Type +hi def link dtVersionValue Constant + +hi def link dtLocalestringKey Type + +hi def link dtIconStringKey Type + +hi def link dtXExtensionKey Type + +hi def link dtNonStdLabelKey Type + +" Clean Up {{{1 +let b:current_syntax = "desktop" +let &cpo = s:cpo_save + +" vim:ts=8:sw=2:fdm=marker diff --git a/syntax/dhall.vim b/syntax/dhall.vim index c42e20d2d..5cea85b8f 100644 --- a/syntax/dhall.vim +++ b/syntax/dhall.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dhall', 'syntax/dhall.vim') + finish +endif scriptencoding utf-8 @@ -64,5 +66,3 @@ highlight link dhallMultilineComment Comment highlight link dhallHash Keyword let b:current_syntax = 'dhall' - -endif diff --git a/syntax/dictconf.vim b/syntax/dictconf.vim new file mode 100644 index 000000000..0cbf2f6fd --- /dev/null +++ b/syntax/dictconf.vim @@ -0,0 +1,84 @@ +if polyglot#init#is_disabled(expand(':p'), 'dictconf', 'syntax/dictconf.vim') + finish +endif + +" Vim syntax file +" Language: dict(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword dictconfTodo contained TODO FIXME XXX NOTE + +syn region dictconfComment display oneline start='#' end='$' + \ contains=dictconfTodo,@Spell + +syn match dictconfBegin display '^' + \ nextgroup=dictconfKeyword,dictconfComment + \ skipwhite + +syn keyword dictconfKeyword contained server + \ nextgroup=dictconfServer skipwhite + +syn keyword dictconfKeyword contained pager + \ nextgroup=dictconfPager + +syn match dictconfServer contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictconfServerOptG skipwhite + +syn region dictconfServer contained display oneline + \ start=+"+ skip=+""+ end=+"+ + \ nextgroup=dictconfServerOptG skipwhite + +syn region dictconfServerOptG contained transparent + \ matchgroup=dictconfServerOptsD start='{' + \ matchgroup=dictconfServerOptsD end='}' + \ contains=dictconfServerOpts,dictconfComment + +syn keyword dictconfServerOpts contained port + \ nextgroup=dictconfNumber skipwhite + +syn keyword dictconfServerOpts contained user + \ nextgroup=dictconfUsername skipwhite + +syn match dictconfUsername contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictconfSecret skipwhite +syn region dictconfUsername contained display oneline + \ start=+"+ skip=+""+ end=+"+ + \ nextgroup=dictconfSecret skipwhite + +syn match dictconfSecret contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' +syn region dictconfSecret contained display oneline + \ start=+"+ skip=+""+ end=+"+ + +syn match dictconfNumber contained '\<\d\+\>' + +syn match dictconfPager contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' +syn region dictconfPager contained display oneline + \ start=+"+ skip=+""+ end=+"+ + +hi def link dictconfTodo Todo +hi def link dictconfComment Comment +hi def link dictconfKeyword Keyword +hi def link dictconfServer String +hi def link dictconfServerOptsD Delimiter +hi def link dictconfServerOpts Identifier +hi def link dictconfUsername String +hi def link dictconfSecret Special +hi def link dictconfNumber Number +hi def link dictconfPager String + +let b:current_syntax = "dictconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/dictdconf.vim b/syntax/dictdconf.vim new file mode 100644 index 000000000..67f6bbd9b --- /dev/null +++ b/syntax/dictdconf.vim @@ -0,0 +1,150 @@ +if polyglot#init#is_disabled(expand(':p'), 'dictdconf', 'syntax/dictdconf.vim') + finish +endif + +" Vim syntax file +" Language: dictd(8) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword dictdconfTodo contained TODO FIXME XXX NOTE + +syn region dictdconfComment display oneline start='#' end='$' + \ contains=dictdconfTodo,dictdconfSpecialC, + \ @Spell + +syn keyword dictdconfSpecialC LASTLINE + +syn match dictdconfBegin display '^' + \ nextgroup=dictdconfKeyword,dictdconfComment + \ skipwhite + +syn keyword dictdconfKeyword contained access + \ nextgroup=dictdconfAccessG skipwhite + +syn region dictdconfAccessG contained transparent + \ matchgroup=dictdconfDelimiter start='{' + \ matchgroup=dictdconfDelimiter end='}' + \ contains=dictdconfAccess,dictdconfComment + +syn keyword dictdconfAccess contained allow deny authonly user + \ nextgroup=dictdconfString skipwhite + +syn keyword dictdconfKeyword contained database + \ nextgroup=dictdconfDatabase skipwhite + +syn match dictdconfDatabase contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictdconfSpecG skipwhite +syn region dictdconfDatabase contained display oneline + \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+ + \ nextgroup=dictdconfSpecG skipwhite + +syn region dictdconfSpecG contained transparent + \ matchgroup=dictdconfDelimiter start='{' + \ matchgroup=dictdconfDelimiter end='}' + \ contains=dictdconfSpec,dictdconfAccess, + \ dictdconfComment + +syn keyword dictdconfSpec contained data index index_suffix index_word + \ filter prefilter postfilter name info + \ disable_strat + \ nextgroup=dictdconfString skipwhite + +syn keyword dictdconfSpec contained invisible + +syn keyword dictdconfKeyword contained database_virtual + \ nextgroup=dictdconfVDatabase skipwhite + +syn match dictdconfVDatabase contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictdconfVSpecG skipwhite +syn region dictdconfVDatabase contained display oneline + \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+ + \ nextgroup=dictdconfVSpecG skipwhite + +syn region dictdconfVSpecG contained transparent + \ matchgroup=dictdconfDelimiter start='{' + \ matchgroup=dictdconfDelimiter end='}' + \ contains=dictdconfVSpec,dictdconfAccess, + \ dictdconfComment + +syn keyword dictdconfVSpec contained name info database_list disable_strat + \ nextgroup=dictdconfString skipwhite + +syn keyword dictdconfVSpec contained invisible + +syn keyword dictdconfKeyword contained database_plugin + \ nextgroup=dictdconfPDatabase skipwhite + +syn match dictdconfPDatabase contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictdconfPSpecG skipwhite +syn region dictdconfPDatabase contained display oneline + \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+ + \ nextgroup=dictdconfPSpecG skipwhite + +syn region dictdconfPSpecG contained transparent + \ matchgroup=dictdconfDelimiter start='{' + \ matchgroup=dictdconfDelimiter end='}' + \ contains=dictdconfPSpec,dictdconfAccess, + \ dictdconfComment + +syn keyword dictdconfPSpec contained name info plugin data disable_strat + \ nextgroup=dictdconfString skipwhite + +syn keyword dictdconfPSpec contained invisible + +syn keyword dictdconfKeyword contained database_exit + +syn keyword dictdconfKeyword contained site + \ nextgroup=dictdconfString skipwhite + +syn keyword dictdconfKeyword contained user + \ nextgroup=dictdconfUsername skipwhite + +syn match dictdconfUsername contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' + \ nextgroup=dictdconfSecret skipwhite +syn region dictdconfUsername contained display oneline + \ start=+"+ skip=+""+ end=+"+ + \ nextgroup=dictdconfSecret skipwhite + +syn match dictdconfSecret contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' +syn region dictdconfSecret contained display oneline + \ start=+"+ skip=+""+ end=+"+ + +syn match dictdconfString contained display + \ '[[:alnum:]_/.*-][[:alnum:]_/.*-]*' +syn region dictdconfString contained display oneline + \ start=+"+ skip=+""\|\\\\\|\\"+ end=+"+ + +hi def link dictdconfTodo Todo +hi def link dictdconfComment Comment +hi def link dictdconfSpecialC Special +hi def link dictdconfKeyword Keyword +hi def link dictdconfIdentifier Identifier +hi def link dictdconfAccess dictdconfIdentifier +hi def link dictdconfDatabase dictdconfString +hi def link dictdconfSpec dictdconfIdentifier +hi def link dictdconfVDatabase dictdconfDatabase +hi def link dictdconfVSpec dictdconfSpec +hi def link dictdconfPDatabase dictdconfDatabase +hi def link dictdconfPSpec dictdconfSpec +hi def link dictdconfUsername dictdconfString +hi def link dictdconfSecret Special +hi def link dictdconfString String +hi def link dictdconfDelimiter Delimiter + +let b:current_syntax = "dictdconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/diff.vim b/syntax/diff.vim new file mode 100644 index 000000000..e897a9179 --- /dev/null +++ b/syntax/diff.vim @@ -0,0 +1,393 @@ +if polyglot#init#is_disabled(expand(':p'), 'diff', 'syntax/diff.vim') + finish +endif + +" Vim syntax file +" Language: Diff (context or unified) +" Maintainer: Bram Moolenaar +" Translations by Jakson Alves de Aquino. +" Last Change: 2020 Dec 30 + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif +scriptencoding utf-8 + +syn match diffOnly "^Only in .*" +syn match diffIdentical "^Files .* and .* are identical$" +syn match diffDiffer "^Files .* and .* differ$" +syn match diffBDiffer "^Binary files .* and .* differ$" +syn match diffIsA "^File .* is a .* while file .* is a .*" +syn match diffNoEOL "^\\ No newline at end of file .*" +syn match diffCommon "^Common subdirectories: .*" + +" Disable the translations by setting diff_translations to zero. +if !exists("diff_translations") || diff_translations + +" ca +syn match diffOnly "^Només a .*" +syn match diffIdentical "^Els fitxers .* i .* són idèntics$" +syn match diffDiffer "^Els fitxers .* i .* difereixen$" +syn match diffBDiffer "^Els fitxers .* i .* difereixen$" +syn match diffIsA "^El fitxer .* és un .* mentre que el fitxer .* és un .*" +syn match diffNoEOL "^\\ No hi ha cap caràcter de salt de línia al final del fitxer" +syn match diffCommon "^Subdirectoris comuns: .* i .*" + +" cs +syn match diffOnly "^Pouze v .*" +syn match diffIdentical "^Soubory .* a .* jsou identické$" +syn match diffDiffer "^Soubory .* a .* jsou různé$" +syn match diffBDiffer "^Binární soubory .* a .* jsou rozdílné$" +syn match diffBDiffer "^Soubory .* a .* jsou různé$" +syn match diffIsA "^Soubor .* je .* pokud soubor .* je .*" +syn match diffNoEOL "^\\ Chybí znak konce řádku na konci souboru" +syn match diffCommon "^Společné podadresáře: .* a .*" + +" da +syn match diffOnly "^Kun i .*" +syn match diffIdentical "^Filerne .* og .* er identiske$" +syn match diffDiffer "^Filerne .* og .* er forskellige$" +syn match diffBDiffer "^Binære filer .* og .* er forskellige$" +syn match diffIsA "^Filen .* er en .* mens filen .* er en .*" +syn match diffNoEOL "^\\ Intet linjeskift ved filafslutning" +syn match diffCommon "^Identiske underkataloger: .* og .*" + +" de +syn match diffOnly "^Nur in .*" +syn match diffIdentical "^Dateien .* und .* sind identisch.$" +syn match diffDiffer "^Dateien .* und .* sind verschieden.$" +syn match diffBDiffer "^Binärdateien .* and .* sind verschieden.$" +syn match diffBDiffer "^Binärdateien .* und .* sind verschieden.$" +syn match diffIsA "^Datei .* ist ein .* während Datei .* ein .* ist.$" +syn match diffNoEOL "^\\ Kein Zeilenumbruch am Dateiende." +syn match diffCommon "^Gemeinsame Unterverzeichnisse: .* und .*.$" + +" el +syn match diffOnly "^Μόνο στο .*" +syn match diffIdentical "^Τα αρχεία .* καί .* είναι πανομοιότυπα$" +syn match diffDiffer "^Τα αρχεία .* και .* διαφέρουν$" +syn match diffBDiffer "^Τα αρχεία .* και .* διαφέρουν$" +syn match diffIsA "^Το αρχείο .* είναι .* ενώ το αρχείο .* είναι .*" +syn match diffNoEOL "^\\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου" +syn match diffCommon "^Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$" + +" eo +syn match diffOnly "^Nur en .*" +syn match diffIdentical "^Dosieroj .* kaj .* estas samaj$" +syn match diffDiffer "^Dosieroj .* kaj .* estas malsamaj$" +syn match diffBDiffer "^Dosieroj .* kaj .* estas malsamaj$" +syn match diffIsA "^Dosiero .* estas .*, dum dosiero .* estas .*" +syn match diffNoEOL "^\\ Mankas linifino ĉe fino de dosiero" +syn match diffCommon "^Komunaj subdosierujoj: .* kaj .*" + +" es +syn match diffOnly "^Sólo en .*" +syn match diffIdentical "^Los ficheros .* y .* son idénticos$" +syn match diffDiffer "^Los ficheros .* y .* son distintos$" +syn match diffBDiffer "^Los ficheros binarios .* y .* son distintos$" +syn match diffIsA "^El fichero .* es un .* mientras que el .* es un .*" +syn match diffNoEOL "^\\ No hay ningún carácter de nueva línea al final del fichero" +syn match diffCommon "^Subdirectorios comunes: .* y .*" + +" fi +syn match diffOnly "^Vain hakemistossa .*" +syn match diffIdentical "^Tiedostot .* ja .* ovat identtiset$" +syn match diffDiffer "^Tiedostot .* ja .* eroavat$" +syn match diffBDiffer "^Binääritiedostot .* ja .* eroavat$" +syn match diffIsA "^Tiedosto .* on .*, kun taas tiedosto .* on .*" +syn match diffNoEOL "^\\ Ei rivinvaihtoa tiedoston lopussa" +syn match diffCommon "^Yhteiset alihakemistot: .* ja .*" + +" fr +syn match diffOnly "^Seulement dans .*" +syn match diffIdentical "^Les fichiers .* et .* sont identiques.*" +syn match diffDiffer "^Les fichiers .* et .* sont différents.*" +syn match diffBDiffer "^Les fichiers binaires .* et .* sont différents.*" +syn match diffIsA "^Le fichier .* est un .* alors que le fichier .* est un .*" +syn match diffNoEOL "^\\ Pas de fin de ligne à la fin du fichier.*" +syn match diffCommon "^Les sous-répertoires .* et .* sont identiques.*" + +" ga +syn match diffOnly "^I .* amháin: .*" +syn match diffIdentical "^Is comhionann iad na comhaid .* agus .*" +syn match diffDiffer "^Tá difríocht idir na comhaid .* agus .*" +syn match diffBDiffer "^Tá difríocht idir na comhaid .* agus .*" +syn match diffIsA "^Tá comhad .* ina .* ach tá comhad .* ina .*" +syn match diffNoEOL "^\\ Gan líne nua ag an chomhadchríoch" +syn match diffCommon "^Fochomhadlanna i gcoitianta: .* agus .*" + +" gl +syn match diffOnly "^Só en .*" +syn match diffIdentical "^Os ficheiros .* e .* son idénticos$" +syn match diffDiffer "^Os ficheiros .* e .* son diferentes$" +syn match diffBDiffer "^Os ficheiros binarios .* e .* son diferentes$" +syn match diffIsA "^O ficheiro .* é un .* mentres que o ficheiro .* é un .*" +syn match diffNoEOL "^\\ Non hai un salto de liña na fin da liña" +syn match diffCommon "^Subdirectorios comúns: .* e .*" + +" he +" ^.* are expansive patterns for long lines, so disabled unless we can match +" some specific hebrew chars +if search('\%u05d5\|\%u05d1', 'nw', '', 100) + syn match diffOnly "^.*-ב קר אצמנ .*" + syn match diffIdentical "^םיהז םניה .*-ו .* םיצבקה$" + syn match diffDiffer "^הזמ הז םינוש `.*'-ו `.*' םיצבקה$" + syn match diffBDiffer "^הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$" + syn match diffIsA "^.* .*-ל .* .* תוושהל ןתינ אל$" + syn match diffNoEOL "^\\ ץבוקה ףוסב השד.-הרוש ות רס." + syn match diffCommon "^.*-ו .* :תוהז תויקית-תת$" +endif + +" hr +syn match diffOnly "^Samo u .*" +syn match diffIdentical "^Datoteke .* i .* su identične$" +syn match diffDiffer "^Datoteke .* i .* se razlikuju$" +syn match diffBDiffer "^Binarne datoteke .* i .* se razlikuju$" +syn match diffIsA "^Datoteka .* je .*, a datoteka .* je .*" +syn match diffNoEOL "^\\ Nema novog retka na kraju datoteke" +syn match diffCommon "^Uobičajeni poddirektoriji: .* i .*" + +" hu +syn match diffOnly "^Csak .* -ben: .*" +syn match diffIdentical "^.* és .* fájlok azonosak$" +syn match diffDiffer "^A(z) .* és a(z) .* fájlok különböznek$" +syn match diffBDiffer "^A(z) .* és a(z) .* fájlok különböznek$" +syn match diffIsA "^A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*" +syn match diffNoEOL "^\\ Nincs újsor a fájl végén" +syn match diffCommon "^Közös alkönyvtárak: .* és .*" + +" id +syn match diffOnly "^Hanya dalam .*" +syn match diffIdentical "^File .* dan .* identik$" +syn match diffDiffer "^Berkas .* dan .* berbeda$" +syn match diffBDiffer "^File biner .* dan .* berbeda$" +syn match diffIsA "^File .* adalah .* sementara file .* adalah .*" +syn match diffNoEOL "^\\ Tidak ada baris-baru di akhir dari berkas" +syn match diffCommon "^Subdirektori sama: .* dan .*" + +" it +syn match diffOnly "^Solo in .*" +syn match diffIdentical "^I file .* e .* sono identici$" +syn match diffDiffer "^I file .* e .* sono diversi$" +syn match diffBDiffer "^I file .* e .* sono diversi$" +syn match diffBDiffer "^I file binari .* e .* sono diversi$" +syn match diffIsA "^File .* è un .* mentre file .* è un .*" +syn match diffNoEOL "^\\ Manca newline alla fine del file" +syn match diffCommon "^Sottodirectory in comune: .* e .*" + +" ja +syn match diffOnly "^.*だけに発見: .*" +syn match diffIdentical "^ファイル.*と.*は同一$" +syn match diffDiffer "^ファイル.*と.*は違います$" +syn match diffBDiffer "^バイナリー・ファイル.*と.*は違います$" +syn match diffIsA "^ファイル.*は.*、ファイル.*は.*" +syn match diffNoEOL "^\\ ファイル末尾に改行がありません" +syn match diffCommon "^共通の下位ディレクトリー: .*と.*" + +" ja DiffUtils 3.3 +syn match diffOnly "^.* のみに存在: .*" +syn match diffIdentical "^ファイル .* と .* は同一です$" +syn match diffDiffer "^ファイル .* と .* は異なります$" +syn match diffBDiffer "^バイナリーファイル .* と.* は異なります$" +syn match diffIsA "^ファイル .* は .* です。一方、ファイル .* は .* です$" +syn match diffNoEOL "^\\ ファイル末尾に改行がありません" +syn match diffCommon "^共通のサブディレクトリー: .* と .*" + +" lv +syn match diffOnly "^Tikai iekš .*" +syn match diffIdentical "^Fails .* un .* ir identiski$" +syn match diffDiffer "^Faili .* un .* atšķiras$" +syn match diffBDiffer "^Faili .* un .* atšķiras$" +syn match diffBDiffer "^Binārie faili .* un .* atšķiras$" +syn match diffIsA "^Fails .* ir .* kamēr fails .* ir .*" +syn match diffNoEOL "^\\ Nav jaunu rindu faila beigās" +syn match diffCommon "^Kopējās apakšdirektorijas: .* un .*" + +" ms +syn match diffOnly "^Hanya dalam .*" +syn match diffIdentical "^Fail .* dan .* adalah serupa$" +syn match diffDiffer "^Fail .* dan .* berbeza$" +syn match diffBDiffer "^Fail .* dan .* berbeza$" +syn match diffIsA "^Fail .* adalah .* manakala fail .* adalah .*" +syn match diffNoEOL "^\\ Tiada baris baru pada penghujung fail" +syn match diffCommon "^Subdirektori umum: .* dan .*" + +" nl +syn match diffOnly "^Alleen in .*" +syn match diffIdentical "^Bestanden .* en .* zijn identiek$" +syn match diffDiffer "^Bestanden .* en .* zijn verschillend$" +syn match diffBDiffer "^Bestanden .* en .* zijn verschillend$" +syn match diffBDiffer "^Binaire bestanden .* en .* zijn verschillend$" +syn match diffIsA "^Bestand .* is een .* terwijl bestand .* een .* is$" +syn match diffNoEOL "^\\ Geen regeleindeteken (LF) aan einde van bestand" +syn match diffCommon "^Gemeenschappelijke submappen: .* en .*" + +" pl +syn match diffOnly "^Tylko w .*" +syn match diffIdentical "^Pliki .* i .* są identyczne$" +syn match diffDiffer "^Pliki .* i .* różnią się$" +syn match diffBDiffer "^Pliki .* i .* różnią się$" +syn match diffBDiffer "^Binarne pliki .* i .* różnią się$" +syn match diffIsA "^Plik .* jest .*, podczas gdy plik .* jest .*" +syn match diffNoEOL "^\\ Brak znaku nowej linii na końcu pliku" +syn match diffCommon "^Wspólne podkatalogi: .* i .*" + +" pt_BR +syn match diffOnly "^Somente em .*" +syn match diffOnly "^Apenas em .*" +syn match diffIdentical "^Os aquivos .* e .* são idênticos$" +syn match diffDiffer "^Os arquivos .* e .* são diferentes$" +syn match diffBDiffer "^Os arquivos binários .* e .* são diferentes$" +syn match diffIsA "^O arquivo .* é .* enquanto o arquivo .* é .*" +syn match diffNoEOL "^\\ Falta o caracter nova linha no final do arquivo" +syn match diffCommon "^Subdiretórios idênticos: .* e .*" + +" ro +syn match diffOnly "^Doar în .*" +syn match diffIdentical "^Fişierele .* şi .* sunt identice$" +syn match diffDiffer "^Fişierele .* şi .* diferă$" +syn match diffBDiffer "^Fişierele binare .* şi .* diferă$" +syn match diffIsA "^Fişierul .* este un .* pe când fişierul .* este un .*.$" +syn match diffNoEOL "^\\ Nici un element de linie nouă la sfârşitul fişierului" +syn match diffCommon "^Subdirectoare comune: .* şi .*.$" + +" ru +syn match diffOnly "^Только в .*" +syn match diffIdentical "^Файлы .* и .* идентичны$" +syn match diffDiffer "^Файлы .* и .* различаются$" +syn match diffBDiffer "^Файлы .* и .* различаются$" +syn match diffIsA "^Файл .* это .*, тогда как файл .* -- .*" +syn match diffNoEOL "^\\ В конце файла нет новой строки" +syn match diffCommon "^Общие подкаталоги: .* и .*" + +" sr +syn match diffOnly "^Само у .*" +syn match diffIdentical "^Датотеке „.*“ и „.*“ се подударају$" +syn match diffDiffer "^Датотеке .* и .* различите$" +syn match diffBDiffer "^Бинарне датотеке .* и .* различите$" +syn match diffIsA "^Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$" +syn match diffNoEOL "^\\ Без новог реда на крају датотеке" +syn match diffCommon "^Заједнички поддиректоријуми: .* и .*" + +" sv +syn match diffOnly "^Endast i .*" +syn match diffIdentical "^Filerna .* och .* är lika$" +syn match diffDiffer "^Filerna .* och .* skiljer$" +syn match diffBDiffer "^Filerna .* och .* skiljer$" +syn match diffIsA "^Fil .* är en .* medan fil .* är en .*" +syn match diffBDiffer "^De binära filerna .* och .* skiljer$" +syn match diffIsA "^Filen .* är .* medan filen .* är .*" +syn match diffNoEOL "^\\ Ingen nyrad vid filslut" +syn match diffCommon "^Lika underkataloger: .* och .*" + +" tr +syn match diffOnly "^Yalnızca .*'da: .*" +syn match diffIdentical "^.* ve .* dosyaları birbirinin aynı$" +syn match diffDiffer "^.* ve .* dosyaları birbirinden farklı$" +syn match diffBDiffer "^.* ve .* dosyaları birbirinden farklı$" +syn match diffBDiffer "^İkili .* ve .* birbirinden farklı$" +syn match diffIsA "^.* dosyası, bir .*, halbuki .* dosyası bir .*" +syn match diffNoEOL "^\\ Dosya sonunda yenisatır yok." +syn match diffCommon "^Ortak alt dizinler: .* ve .*" + +" uk +syn match diffOnly "^Лише у .*" +syn match diffIdentical "^Файли .* та .* ідентичні$" +syn match diffDiffer "^Файли .* та .* відрізняються$" +syn match diffBDiffer "^Файли .* та .* відрізняються$" +syn match diffBDiffer "^Двійкові файли .* та .* відрізняються$" +syn match diffIsA "^Файл .* це .*, тоді як файл .* -- .*" +syn match diffNoEOL "^\\ Наприкінці файлу немає нового рядка" +syn match diffCommon "^Спільні підкаталоги: .* та .*" + +" vi +syn match diffOnly "^Chỉ trong .*" +syn match diffIdentical "^Hai tập tin .* và .* là bằng nhau.$" +syn match diffIdentical "^Cả .* và .* là cùng một tập tin$" +syn match diffDiffer "^Hai tập tin .* và .* là khác nhau.$" +syn match diffBDiffer "^Hai tập tin nhị phân .* và .* khác nhau$" +syn match diffIsA "^Tập tin .* là một .* trong khi tập tin .* là một .*.$" +syn match diffBDiffer "^Hai tập tin .* và .* là khác nhau.$" +syn match diffIsA "^Tập tin .* là một .* còn tập tin .* là một .*.$" +syn match diffNoEOL "^\\ Không có ký tự dòng mới tại kêt thức tập tin." +syn match diffCommon "^Thư mục con chung: .* và .*" + +" zh_CN +syn match diffOnly "^只在 .* 存在:.*" +syn match diffIdentical "^檔案 .* 和 .* 相同$" +syn match diffDiffer "^文件 .* 和 .* 不同$" +syn match diffBDiffer "^文件 .* 和 .* 不同$" +syn match diffIsA "^文件 .* 是.*而文件 .* 是.*" +syn match diffNoEOL "^\\ 文件尾没有 newline 字符" +syn match diffCommon "^.* 和 .* 有共同的子目录$" + +" zh_TW +syn match diffOnly "^只在 .* 存在:.*" +syn match diffIdentical "^檔案 .* 和 .* 相同$" +syn match diffDiffer "^檔案 .* 與 .* 不同$" +syn match diffBDiffer "^二元碼檔 .* 與 .* 不同$" +syn match diffIsA "^檔案 .* 是.*而檔案 .* 是.*" +syn match diffNoEOL "^\\ 檔案末沒有 newline 字元" +syn match diffCommon "^.* 和 .* 有共同的副目錄$" + +endif + + +syn match diffRemoved "^-.*" +syn match diffRemoved "^<.*" +syn match diffAdded "^+.*" +syn match diffAdded "^>.*" +syn match diffChanged "^! .*" + +syn match diffSubname " @@..*"ms=s+3 contained +syn match diffLine "^@.*" contains=diffSubname +syn match diffLine "^\<\d\+\>.*" +syn match diffLine "^\*\*\*\*.*" +syn match diffLine "^---$" + +" Some versions of diff have lines like "#c#" and "#d#" (where # is a number) +syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*" + +syn match diffFile "^diff\>.*" +syn match diffFile "^Index: .*" +syn match diffFile "^==== .*" + +if search('^@@ -\S\+ +\S\+ @@', 'nw', '', 100) + " unified + syn match diffOldFile "^--- .*" + syn match diffNewFile "^+++ .*" +else + " context / old style + syn match diffOldFile "^\*\*\* .*" + syn match diffNewFile "^--- .*" +endif + +" Used by git +syn match diffIndexLine "^index \x\x\x\x.*" + +syn match diffComment "^#.*" + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link diffOldFile diffFile +hi def link diffNewFile diffFile +hi def link diffIndexLine PreProc +hi def link diffFile Type +hi def link diffOnly Constant +hi def link diffIdentical Constant +hi def link diffDiffer Constant +hi def link diffBDiffer Constant +hi def link diffIsA Constant +hi def link diffNoEOL Constant +hi def link diffCommon Constant +hi def link diffRemoved Special +hi def link diffChanged PreProc +hi def link diffAdded Identifier +hi def link diffLine Statement +hi def link diffSubname PreProc +hi def link diffComment Comment + +let b:current_syntax = "diff" + +" vim: ts=8 sw=2 diff --git a/syntax/dircolors.vim b/syntax/dircolors.vim new file mode 100644 index 000000000..9a0e1cda8 --- /dev/null +++ b/syntax/dircolors.vim @@ -0,0 +1,226 @@ +if polyglot#init#is_disabled(expand(':p'), 'dircolors', 'syntax/dircolors.vim') + finish +endif + +" Vim syntax file +" Language: dircolors(1) input file +" Maintainer: Jan Larres +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2018-02-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syntax keyword dircolorsTodo FIXME TODO XXX NOTE contained + +syntax region dircolorsComment start='#' end='$' contains=dircolorsTodo,@Spell + +syntax keyword dircolorsKeyword TERM LEFT LEFTCODE RIGHT RIGHTCODE END ENDCODE + +syntax keyword dircolorsKeyword NORMAL NORM FILE RESET DIR LNK LINK SYMLINK + \ MULTIHARDLINK FIFO SOCK DOOR BLK CHR ORPHAN + \ MISSING PIPE BLOCK CHR EXEC SETUID SETGID + \ CAPABILITY STICKY_OTHER_WRITABLE + \ OTHER_WRITABLE STICKY + +" Slackware only, ignored by GNU dircolors. +syntax keyword dircolorsKeyword COLOR OPTIONS EIGHTBIT + +syntax match dircolorsExtension '^\s*\zs[.*]\S\+' + +syntax match dircolorsEscape '\\[abefnrtv?_\\^#]' +syntax match dircolorsEscape '\\[0-9]\{3}' +syntax match dircolorsEscape '\\x[0-9a-f]\{3}' + +if !has('gui_running') && &t_Co == '' + syntax match dircolorsNumber '\<\d\+\>' + highlight default link dircolorsNumber Number +endif + +highlight default link dircolorsTodo Todo +highlight default link dircolorsComment Comment +highlight default link dircolorsKeyword Keyword +highlight default link dircolorsExtension Identifier +highlight default link dircolorsEscape Special + +function! s:set_guicolors() abort + let s:termguicolors = {} + + let s:termguicolors[0] = "Black" + let s:termguicolors[1] = "DarkRed" + let s:termguicolors[2] = "DarkGreen" + let s:termguicolors[3] = "DarkYellow" + let s:termguicolors[4] = "DarkBlue" + let s:termguicolors[5] = "DarkMagenta" + let s:termguicolors[6] = "DarkCyan" + let s:termguicolors[7] = "Gray" + let s:termguicolors[8] = "DarkGray" + let s:termguicolors[9] = "Red" + let s:termguicolors[10] = "Green" + let s:termguicolors[11] = "Yellow" + let s:termguicolors[12] = "Blue" + let s:termguicolors[13] = "Magenta" + let s:termguicolors[14] = "Cyan" + let s:termguicolors[15] = "White" + + let xterm_palette = ["00", "5f", "87", "af", "d7", "ff"] + + let cur_col = 16 + + for r in xterm_palette + for g in xterm_palette + for b in xterm_palette + let s:termguicolors[cur_col] = '#' . r . g . b + let cur_col += 1 + endfor + endfor + endfor + + for i in range(24) + let g = i * 0xa + 8 + let s:termguicolors[i + 232] = '#' . g . g . g + endfor +endfunction + +function! s:get_hi_str(color, place) abort + if a:color >= 0 && a:color <= 255 + if has('gui_running') + return ' gui' . a:place . '=' . s:termguicolors[a:color] + elseif a:color <= 7 || &t_Co == 256 || &t_Co == 88 + return ' cterm' . a:place . '=' . a:color + endif + endif + return '' +endfunction + +function! s:get_256color(colors) abort + if len(a:colors) >= 2 " May be fewer while editing + let [_five, color] = remove(a:colors, 0, 1) + if _five != '5' || color == '' + return -1 + else + return str2nr(color) + endif + else + return -1 + endif +endfunction + +function! s:preview_color(linenr) abort + let line = getline(a:linenr) + let defline = matchlist(line, '^\v([A-Z_]+|[*.]\S+)\s+([0-9;]+)') + if empty(defline) + return + endif + + let colordef = defline[2] + + let colors = split(colordef, ';') + + let hi_str = '' + let hi_attrs = [] + while len(colors) > 0 + let item = str2nr(remove(colors, 0)) + if item == 1 + call add(hi_attrs, 'bold') + elseif item == 3 + call add(hi_attrs, 'italic') + elseif item == 4 + call add(hi_attrs, 'underline') + elseif item == 7 + call add(hi_attrs, 'inverse') + elseif item >= 30 && item <= 37 + " ANSI SGR foreground color + let hi_str .= s:get_hi_str(item - 30, 'fg') + elseif item >= 40 && item <= 47 + " ANSI SGR background color + let hi_str .= s:get_hi_str(item - 40, 'bg') + elseif item >= 90 && item <= 97 + " ANSI SGR+8 foreground color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 82, 'fg') + elseif item >= 100 && item <= 107 + " ANSI SGR+8 background color (xterm 16-color support) + let hi_str .= s:get_hi_str(item - 92, 'bg') + elseif item == 38 + " Foreground for terminals with 88/256 color support + let color = s:get_256color(colors) + if color == -1 + break + endif + let hi_str .= s:get_hi_str(color, 'fg') + elseif item == 48 + " Background for terminals with 88/256 color support + let color = s:get_256color(colors) + if color == -1 + break + endif + let hi_str .= s:get_hi_str(color, 'bg') + endif + endwhile + + if hi_str == '' && empty(hi_attrs) + return + endif + + " Check whether we have already defined this color + redir => s:currentmatch + silent! execute 'syntax list' + redir END + + if s:currentmatch !~# '\/\\_s\\zs' . colordef . '\\ze\\_s\/' + " Append the buffer number to avoid problems with other dircolors + " buffers interfering + let bufnr = bufnr('%') + execute 'syntax match dircolorsColor' . b:dc_next_index . '_' . bufnr . + \ ' "\_s\zs' . colordef . '\ze\_s"' + let hi_attrs_str = '' + if !empty(hi_attrs) + if has('gui_running') + let hi_attrs_str = ' gui=' . join(hi_attrs, ',') + else + let hi_attrs_str = ' cterm=' . join(hi_attrs, ',') + endif + endif + execute 'highlight default dircolorsColor' . b:dc_next_index . '_' . + \ bufnr . hi_str . hi_attrs_str + let b:dc_next_index += 1 + endif +endfunction + +" Avoid accumulating too many definitions while editing +function! s:reset_colors() abort + if b:dc_next_index > 0 + let bufnr = bufnr('%') + for i in range(b:dc_next_index) + execute 'syntax clear dircolorsColor' . i . '_' . bufnr + execute 'highlight clear dircolorsColor' . i . '_' . bufnr + endfor + let b:dc_next_index = 0 + endif + + for linenr in range(1, line('$')) + call s:preview_color(linenr) + endfor +endfunction + +let b:dc_next_index = 0 + +if has('gui_running') + call s:set_guicolors() +endif + +if has('gui_running') || &t_Co != '' + call s:reset_colors() + + autocmd CursorMoved,CursorMovedI call s:preview_color('.') + autocmd CursorHold,CursorHoldI call s:reset_colors() +endif + +let b:current_syntax = "dircolors" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/django.vim b/syntax/django.vim new file mode 100644 index 000000000..2bf08faca --- /dev/null +++ b/syntax/django.vim @@ -0,0 +1,88 @@ +if polyglot#init#is_disabled(expand(':p'), 'htmldjango', 'syntax/django.vim') + finish +endif + +" Vim syntax file +" Language: Django template +" Maintainer: Dave Hodder +" Last Change: 2021 Nov 29 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax case match + +" Mark illegal characters +syn match djangoError "%}\|}}\|#}" + +" Django template built-in tags and parameters +" 'comment' doesn't appear here because it gets special treatment +syn keyword djangoStatement contained autoescape csrf_token empty +" FIXME ==, !=, <, >, <=, and >= should be djangoStatements: +" syn keyword djangoStatement contained == != < > <= >= +syn keyword djangoStatement contained and as block endblock by cycle debug else elif +syn keyword djangoStatement contained extends filter endfilter firstof for +syn keyword djangoStatement contained endfor if endif ifchanged endifchanged +syn keyword djangoStatement contained ifequal endifequal ifnotequal +syn keyword djangoStatement contained endifnotequal in include load not now or +syn keyword djangoStatement contained parsed regroup reversed spaceless +syn keyword djangoStatement contained endspaceless ssi templatetag openblock +syn keyword djangoStatement contained closeblock openvariable closevariable +syn keyword djangoStatement contained openbrace closebrace opencomment +syn keyword djangoStatement contained closecomment widthratio url with endwith +syn keyword djangoStatement contained get_current_language trans noop blocktrans +syn keyword djangoStatement contained endblocktrans get_available_languages +syn keyword djangoStatement contained get_current_language_bidi plural +syn keyword djangoStatement contained translate blocktranslate endblocktranslate + +" Django templete built-in filters +syn keyword djangoFilter contained add addslashes capfirst center cut date +syn keyword djangoFilter contained default default_if_none dictsort +syn keyword djangoFilter contained dictsortreversed divisibleby escape escapejs +syn keyword djangoFilter contained filesizeformat first fix_ampersands +syn keyword djangoFilter contained floatformat get_digit join last length length_is +syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust +syn keyword djangoFilter contained lower make_list phone2numeric pluralize +syn keyword djangoFilter contained pprint random removetags rjust slice slugify +syn keyword djangoFilter contained safe safeseq stringformat striptags +syn keyword djangoFilter contained time timesince timeuntil title truncatechars +syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode +syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno + +" Keywords to highlight within comments +syn keyword djangoTodo contained TODO FIXME XXX + +" Django template constants (always surrounded by double quotes) +syn region djangoArgument contained start=/"/ skip=/\\"/ end=/"/ + +" Mark illegal characters within tag and variables blocks +syn match djangoTagError contained "#}\|{{\|[^%]}}\|[&#]" +syn match djangoVarError contained "#}\|{%\|%}\|[<>!&#%]" + +" Django template tag and variable blocks +syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display +syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display + +" Django template 'comment' tag and comment block +syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo +syn region djangoComBlock start="{#" end="#}" contains=djangoTodo + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link djangoTagBlock PreProc +hi def link djangoVarBlock PreProc +hi def link djangoStatement Statement +hi def link djangoFilter Identifier +hi def link djangoArgument Constant +hi def link djangoTagError Error +hi def link djangoVarError Error +hi def link djangoError Error +hi def link djangoComment Comment +hi def link djangoComBlock Comment +hi def link djangoTodo Todo + + +let b:current_syntax = "django" diff --git a/syntax/dnsmasq.vim b/syntax/dnsmasq.vim new file mode 100644 index 000000000..39cbabf6a --- /dev/null +++ b/syntax/dnsmasq.vim @@ -0,0 +1,246 @@ +if polyglot#init#is_disabled(expand(':p'), 'dnsmasq', 'syntax/dnsmasq.vim') + finish +endif + +" Vim syntax file +" Maintainer: Thilo Six +" Contact: vim-foo@xk2c-foo.de +" :3s+-foo++g +" Description: highlight dnsmasq configuration files +" File: runtime/syntax/dnsmasq.vim +" Version: 2.76 +" Last Change: 2015 Sep 27 +" Modeline: vim: ts=8:sw=2:sts=2: +" +" License: VIM License +" Vim is Charityware, see ":help Uganda" +" +" Options: You might want to add this to your vimrc: +" +" if &background == "dark" +" let dnsmasq_backrgound_light = 0 +" else +" let dnsmasq_backrgound_light = 1 +" endif +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +if !exists("b:dnsmasq_backrgound_light") + if exists("dnsmasq_backrgound_light") + let b:dnsmasq_backrgound_light = dnsmasq_backrgound_light + else + let b:dnsmasq_backrgound_light = 0 + endif +endif + + +" case on +syn case match + +syn match DnsmasqValues "=.*"hs=s+1 contains=DnsmasqComment,DnsmasqSpecial +syn match DnsmasqSpecial display '=\|@\|,\|!\|:' nextgroup=DnsmasqValues +syn match DnsmasqSpecial "#" + +syn match DnsmasqIPv4 "\<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>" nextgroup=DnsmasqSubnet2,DnsmasqRange +syn match DnsmasqSubnet "\<255.\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{2\}\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\>" +syn match DnsmasqSubnet2 contained "\/\([0-4]\?[0-9]\)\>" +syn match DnsmasqRange contained "-" +syn match DnsmasqMac "\<\(\x\x\?:\)\{5}\x\x\?" + +syn match DnsmasqTime "\<\(\d\{1,3}\)[hm]\>" + +" String +syn match DnsmasqString "\".*\"" contains=@Spell +syn match DnsmasqString "'.*'" contains=@Spell + +" Comments +syn keyword DnsmasqTodo FIXME TODO XXX NOTE contained +syn match DnsmasqComment "\(^\|\s\+\)#.*$" contains=@Spell,DnsmasqTodo + +" highlight trailing spaces +syn match DnsmasqTrailSpace "[ \t]\+$" +syn match DnsmasqTrailSpace "[ \t]\+$" containedin=ALL + +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial "\:"me=e-1 +syn match DnsmasqKeywordSpecial ",\"hs=s+1 contains=DnsmasqSpecial +syn match DnsmasqKeywordSpecial "\:"me=e-1 + +syn match DnsmasqKeyword "^\s*add-mac\>" +syn match DnsmasqKeyword "^\s*add-subnet\>" +syn match DnsmasqKeyword "^\s*addn-hosts\>" +syn match DnsmasqKeyword "^\s*address\>" +syn match DnsmasqKeyword "^\s*alias\>" +syn match DnsmasqKeyword "^\s*all-servers\>" +syn match DnsmasqKeyword "^\s*auth-zone\>" +syn match DnsmasqKeyword "^\s*bind-dynamic\>" +syn match DnsmasqKeyword "^\s*bind-interfaces\>" +syn match DnsmasqKeyword "^\s*bogus-nxdomain\>" +syn match DnsmasqKeyword "^\s*bogus-priv\>" +syn match DnsmasqKeyword "^\s*bootp-dynamic\>" +syn match DnsmasqKeyword "^\s*bridge-interface\>" +syn match DnsmasqKeyword "^\s*cache-size\>" +syn match DnsmasqKeyword "^\s*clear-on-reload\>" +syn match DnsmasqKeyword "^\s*cname\>" +syn match DnsmasqKeyword "^\s*conf-dir\>" +syn match DnsmasqKeyword "^\s*conf-file\>" +syn match DnsmasqKeyword "^\s*conntrack\>" +syn match DnsmasqKeyword "^\s*dhcp-alternate-port\>" +syn match DnsmasqKeyword "^\s*dhcp-authoritative\>" +syn match DnsmasqKeyword "^\s*dhcp-boot\>" +syn match DnsmasqKeyword "^\s*dhcp-broadcast\>" +syn match DnsmasqKeyword "^\s*dhcp-circuitid\>" +syn match DnsmasqKeyword "^\s*dhcp-client-update\>" +syn match DnsmasqKeyword "^\s*dhcp-duid\>" +syn match DnsmasqKeyword "^\s*dhcp-fqdn\>" +syn match DnsmasqKeyword "^\s*dhcp-generate-names\>" +syn match DnsmasqKeyword "^\s*dhcp-host\>" +syn match DnsmasqKeyword "^\s*dhcp-hostsfile\>" +syn match DnsmasqKeyword "^\s*dhcp-ignore\>" +syn match DnsmasqKeyword "^\s*dhcp-ignore-names\>" +syn match DnsmasqKeyword "^\s*dhcp-lease-max\>" +syn match DnsmasqKeyword "^\s*dhcp-leasefile\>" +syn match DnsmasqKeyword "^\s*dhcp-luascript\>" +syn match DnsmasqKeyword "^\s*dhcp-mac\>" +syn match DnsmasqKeyword "^\s*dhcp-match\>" +syn match DnsmasqKeyword "^\s*dhcp-no-override\>" +syn match DnsmasqKeyword "^\s*dhcp-option\>" +syn match DnsmasqKeyword "^\s*dhcp-option-force\>" +syn match DnsmasqKeyword "^\s*dhcp-optsfile\>" +syn match DnsmasqKeyword "^\s*dhcp-proxy\>" +syn match DnsmasqKeyword "^\s*dhcp-range\>" +syn match DnsmasqKeyword "^\s*dhcp-relay\>" +syn match DnsmasqKeyword "^\s*dhcp-remoteid\>" +syn match DnsmasqKeyword "^\s*dhcp-script\>" +syn match DnsmasqKeyword "^\s*dhcp-scriptuser\>" +syn match DnsmasqKeyword "^\s*dhcp-sequential-ip\>" +syn match DnsmasqKeyword "^\s*dhcp-subscrid\>" +syn match DnsmasqKeyword "^\s*dhcp-userclass\>" +syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>" +syn match DnsmasqKeyword "^\s*dhcp-hostsdir\>" +syn match DnsmasqKeyword "^\s*dns-rr\>" +syn match DnsmasqKeyword "^\s*dnssec\>" +syn match DnsmasqKeyword "^\s*dnssec-check-unsigned\>" +syn match DnsmasqKeyword "^\s*dnssec-no-timecheck\>" +syn match DnsmasqKeyword "^\s*dnssec-timestamp\>" +syn match DnsmasqKeyword "^\s*dns-forward-max\>" +syn match DnsmasqKeyword "^\s*domain\>" +syn match DnsmasqKeyword "^\s*domain-needed\>" +syn match DnsmasqKeyword "^\s*edns-packet-max\>" +syn match DnsmasqKeyword "^\s*enable-dbus\>" +syn match DnsmasqKeyword "^\s*enable-ra\>" +syn match DnsmasqKeyword "^\s*enable-tftp\>" +syn match DnsmasqKeyword "^\s*except-interface\>" +syn match DnsmasqKeyword "^\s*expand-hosts\>" +syn match DnsmasqKeyword "^\s*filterwin2k\>" +syn match DnsmasqKeyword "^\s*group\>" +syn match DnsmasqKeyword "^\s*host-record\>" +syn match DnsmasqKeyword "^\s*interface\>" +syn match DnsmasqKeyword "^\s*interface-name\>" +syn match DnsmasqKeyword "^\s*ipset\>" +syn match DnsmasqKeyword "^\s*ignore-address\>" +syn match DnsmasqKeyword "^\s*keep-in-foreground\>" +syn match DnsmasqKeyword "^\s*leasefile-ro\>" +syn match DnsmasqKeyword "^\s*listen-address\>" +syn match DnsmasqKeyword "^\s*local\>" +syn match DnsmasqKeyword "^\s*localmx\>" +syn match DnsmasqKeyword "^\s*local-ttl\>" +syn match DnsmasqKeyword "^\s*local-service\>" +syn match DnsmasqKeyword "^\s*localise-queries\>" +syn match DnsmasqKeyword "^\s*log-async\>" +syn match DnsmasqKeyword "^\s*log-dhcp\>" +syn match DnsmasqKeyword "^\s*log-facility\>" +syn match DnsmasqKeyword "^\s*log-queries\>" +syn match DnsmasqKeyword "^\s*max-ttl\>" +syn match DnsmasqKeyword "^\s*max-cache-ttl\>" +syn match DnsmasqKeyword "^\s*min-cache-ttl\>" +syn match DnsmasqKeyword "^\s*min-port\>" +syn match DnsmasqKeyword "^\s*mx-host\>" +syn match DnsmasqKeyword "^\s*mx-target\>" +syn match DnsmasqKeyword "^\s*naptr-record\>" +syn match DnsmasqKeyword "^\s*neg-ttl\>" +syn match DnsmasqKeyword "^\s*no-daemon\>" +syn match DnsmasqKeyword "^\s*no-dhcp-interface\>" +syn match DnsmasqKeyword "^\s*no-hosts\>" +syn match DnsmasqKeyword "^\s*no-negcache\>" +syn match DnsmasqKeyword "^\s*no-ping\>" +syn match DnsmasqKeyword "^\s*no-poll\>" +syn match DnsmasqKeyword "^\s*no-resolv\>" +syn match DnsmasqKeyword "^\s*pid-file\>" +syn match DnsmasqKeyword "^\s*port\>" +syn match DnsmasqKeyword "^\s*proxy-dnssec\>" +syn match DnsmasqKeyword "^\s*ptr-record\>" +syn match DnsmasqKeyword "^\s*pxe-prompt\>" +syn match DnsmasqKeyword "^\s*pxe-service\>" +syn match DnsmasqKeyword "^\s*query-port\>" +syn match DnsmasqKeyword "^\s*quiet-ra\>" +syn match DnsmasqKeyword "^\s*quiet-dhcp\>" +syn match DnsmasqKeyword "^\s*quiet-dhcp6\>" +syn match DnsmasqKeyword "^\s*ra-param\>" +syn match DnsmasqKeyword "^\s*read-ethers\>" +syn match DnsmasqKeyword "^\s*rebind-domain-ok\>" +syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>" +syn match DnsmasqKeyword "^\s*resolv-file\>" +syn match DnsmasqKeyword "^\s*rev-server\>" +syn match DnsmasqKeyword "^\s*selfmx\>" +syn match DnsmasqKeyword "^\s*server\>" +syn match DnsmasqKeyword "^\s*servers-file\>" +syn match DnsmasqKeyword "^\s*srv-host\>" +syn match DnsmasqKeyword "^\s*stop-dns-rebind\>" +syn match DnsmasqKeyword "^\s*strict-order\>" +syn match DnsmasqKeyword "^\s*synth-domain\>" +syn match DnsmasqKeyword "^\s*tag-if\>" +syn match DnsmasqKeyword "^\s*test\>" +syn match DnsmasqKeyword "^\s*tftp-max\>" +syn match DnsmasqKeyword "^\s*tftp-lowercase\>" +syn match DnsmasqKeyword "^\s*tftp-no-blocksize\>" +syn match DnsmasqKeyword "^\s*tftp-no-fail\>" +syn match DnsmasqKeyword "^\s*tftp-port-range\>" +syn match DnsmasqKeyword "^\s*tftp-root\>" +syn match DnsmasqKeyword "^\s*tftp-secure\>" +syn match DnsmasqKeyword "^\s*tftp-unique-root\>" +syn match DnsmasqKeyword "^\s*txt-record\>" +syn match DnsmasqKeyword "^\s*user\>" +syn match DnsmasqKeyword "^\s*version\>" + + +if b:dnsmasq_backrgound_light == 1 + hi def DnsmasqKeyword ctermfg=DarkGreen guifg=DarkGreen +else + hi def link DnsmasqKeyword Keyword +endif +hi def link DnsmasqKeywordSpecial Type +hi def link DnsmasqTodo Todo +hi def link DnsmasqSpecial Constant +hi def link DnsmasqIPv4 Identifier +hi def link DnsmasqSubnet2 DnsmasqSubnet +hi def link DnsmasqSubnet DnsmasqMac +hi def link DnsmasqRange DnsmasqMac +hi def link DnsmasqMac Preproc +hi def link DnsmasqTime Preproc +hi def link DnsmasqComment Comment +hi def link DnsmasqTrailSpace DiffDelete +hi def link DnsmasqString Constant +hi def link DnsmasqValues Normal + +let b:current_syntax = "dnsmasq" + +let &cpo = s:cpo_save +unlet s:cpo_save + diff --git a/syntax/docker-compose.vim b/syntax/docker-compose.vim index 92121065e..a44ded516 100644 --- a/syntax/docker-compose.vim +++ b/syntax/docker-compose.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 +if polyglot#init#is_disabled(expand(':p'), 'docker-compose', 'syntax/docker-compose.vim') + finish +endif " Vim syntax file " Language: Dockerfile @@ -80,5 +82,3 @@ hi link dockercomposeTodo Todo hi link bashStatement Function let b:current_syntax = "dockercompose" - -endif diff --git a/syntax/dockerfile.vim b/syntax/dockerfile.vim new file mode 100644 index 000000000..6f09d4fd7 --- /dev/null +++ b/syntax/dockerfile.vim @@ -0,0 +1,49 @@ +if polyglot#init#is_disabled(expand(':p'), 'dockerfile', 'syntax/dockerfile.vim') + finish +endif + +" dockerfile.vim - Syntax highlighting for Dockerfiles +" Maintainer: Honza Pokorny +" Last Change: 2020 Feb 11 +" License: BSD + +" https://docs.docker.com/engine/reference/builder/ + +if exists("b:current_syntax") + finish +endif + +syntax include @JSON syntax/json.vim +unlet b:current_syntax + +syntax include @Shell syntax/sh.vim +unlet b:current_syntax + +syntax case ignore +syntax match dockerfileLinePrefix /\v^\s*(ONBUILD\s+)?\ze\S/ contains=dockerfileKeyword nextgroup=dockerfileInstruction skipwhite +syntax region dockerfileFrom matchgroup=dockerfileKeyword start=/\v^\s*(FROM)\ze(\s|$)/ skip=/\v\\\_./ end=/\v((^|\s)AS(\s|$)|$)/ contains=dockerfileOption + +syntax keyword dockerfileKeyword contained ADD ARG CMD COPY ENTRYPOINT ENV EXPOSE HEALTHCHECK LABEL MAINTAINER ONBUILD RUN SHELL STOPSIGNAL USER VOLUME WORKDIR +syntax match dockerfileOption contained /\v(^|\s)\zs--\S+/ + +syntax match dockerfileInstruction contained /\v<(\S+)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileValue +syntax match dockerfileInstruction contained /\v<(ADD|COPY)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileJSON +syntax match dockerfileInstruction contained /\v<(HEALTHCHECK)>(\s+--\S+)*/ contains=dockerfileKeyword,dockerfileOption skipwhite nextgroup=dockerfileInstruction +syntax match dockerfileInstruction contained /\v<(CMD|ENTRYPOINT|RUN)>/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileShell +syntax match dockerfileInstruction contained /\v<(CMD|ENTRYPOINT|RUN)>\ze\s+\[/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON +syntax match dockerfileInstruction contained /\v<(SHELL|VOLUME)>/ contains=dockerfileKeyword skipwhite nextgroup=dockerfileJSON + +syntax region dockerfileString contained start=/\v"/ skip=/\v\\./ end=/\v"/ +syntax region dockerfileJSON contained keepend start=/\v\[/ skip=/\v\\\_./ end=/\v$/ contains=@JSON +syntax region dockerfileShell contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=@Shell +syntax region dockerfileValue contained keepend start=/\v/ skip=/\v\\\_./ end=/\v$/ contains=dockerfileString + +syntax region dockerfileComment start=/\v^\s*#/ end=/\v$/ +set commentstring=#\ %s + +hi def link dockerfileString String +hi def link dockerfileKeyword Keyword +hi def link dockerfileComment Comment +hi def link dockerfileOption Special + +let b:current_syntax = "dockerfile" diff --git a/syntax/dosbatch.vim b/syntax/dosbatch.vim new file mode 100644 index 000000000..795062221 --- /dev/null +++ b/syntax/dosbatch.vim @@ -0,0 +1,151 @@ +if polyglot#init#is_disabled(expand(':p'), 'dosbatch', 'syntax/dosbatch.vim') + finish +endif + +" Vim syntax file +" Language: MS-DOS batch file (with NT command extensions) +" Maintainer: Mike Williams +" Filenames: *.bat +" Last Change: 6th September 2009 +" Web Page: http://www.eandem.co.uk/mrw/vim +" +" Options Flags: +" dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Set default highlighting to Win2k +if !exists("dosbatch_cmdextversion") + let dosbatch_cmdextversion = 2 +endif + +" DOS bat files are case insensitive but case preserving! +syn case ignore + +syn keyword dosbatchTodo contained TODO + +" Dosbat keywords +syn keyword dosbatchStatement goto call exit +syn keyword dosbatchConditional if else +syn keyword dosbatchRepeat for + +" Some operators - first lot are case sensitive! +syn case match +syn keyword dosbatchOperator EQU NEQ LSS LEQ GTR GEQ +syn case ignore +syn match dosbatchOperator "\s[-+\*/%!~]\s" +syn match dosbatchOperator "=" +syn match dosbatchOperator "[-+\*/%]=" +syn match dosbatchOperator "\s\(&\||\|^\|<<\|>>\)=\=\s" +syn match dosbatchIfOperator "if\s\+\(\(not\)\=\s\+\)\=\(exist\|defined\|errorlevel\|cmdextversion\)\="lc=2 + +" String - using "'s is a convenience rather than a requirement outside of FOR +syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell +syn match dosbatchString "\|]\|\^\@<=[)>|]\)*"lc=4 contains=dosbatchVariable,dosbatchArgument,dosbatchSpecialChar,@dosbatchNumber,@Spell +syn match dosbatchEchoOperator "\^]" +syn match dosbatchSpecialChar "\$[a-hl-npqstv_$+]" +syn match dosbatchSpecialChar "%%" + +" Environment variables +syn match dosbatchIdentifier contained "\s\h\w*\>" +syn match dosbatchVariable "%\h\w*%" +syn match dosbatchVariable "%\h\w*:\*\=[^=]*=[^%]*%" +syn match dosbatchVariable "%\h\w*:\~[-]\=\d\+\(,[-]\=\d\+\)\=%" contains=dosbatchInteger +syn match dosbatchVariable "!\h\w*!" +syn match dosbatchVariable "!\h\w*:\*\=[^=]*=[^!]*!" +syn match dosbatchVariable "!\h\w*:\~[-]\=\d\+\(,[-]\=\d\+\)\=!" contains=dosbatchInteger +syn match dosbatchSet "\s\h\w*[+-]\==\{-1}" contains=dosbatchIdentifier,dosbatchOperator + +" Args to bat files and for loops, etc +syn match dosbatchArgument "%\(\d\|\*\)" +syn match dosbatchArgument "%[a-z]\>" +if dosbatch_cmdextversion == 1 + syn match dosbatchArgument "%\~[fdpnxs]\+\(\($PATH:\)\=[a-z]\|\d\)\>" +else + syn match dosbatchArgument "%\~[fdpnxsatz]\+\(\($PATH:\)\=[a-z]\|\d\)\>" +endif + +" Line labels +syn match dosbatchLabel "^\s*:\s*\h\w*\>" +syn match dosbatchLabel "\<\(goto\|call\)\s\+:\h\w*\>"lc=4 +syn match dosbatchLabel "\"lc=4 +syn match dosbatchLabel ":\h\w*\>" + +" Comments - usual rem but also two colons as first non-space is an idiom +syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell + +" Comments in ()'s - still to handle spaces before rem +syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell + +syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir +syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy +syn keyword dosbatchImplicit date del dir diskcomp diskcopy doskey echo endlocal +syn keyword dosbatchImplicit erase fc find findstr format ftype +syn keyword dosbatchImplicit graftabl help keyb label md mkdir mode more move +syn keyword dosbatchImplicit path pause popd print prompt pushd rd recover rem +syn keyword dosbatchImplicit ren rename replace restore rmdir set setlocal shift +syn keyword dosbatchImplicit sort start subst time title tree type ver verify +syn keyword dosbatchImplicit vol xcopy + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dosbatchTodo Todo + +hi def link dosbatchStatement Statement +hi def link dosbatchCommands dosbatchStatement +hi def link dosbatchLabel Label +hi def link dosbatchConditional Conditional +hi def link dosbatchRepeat Repeat + +hi def link dosbatchOperator Operator +hi def link dosbatchEchoOperator dosbatchOperator +hi def link dosbatchIfOperator dosbatchOperator + +hi def link dosbatchArgument Identifier +hi def link dosbatchIdentifier Identifier +hi def link dosbatchVariable dosbatchIdentifier + +hi def link dosbatchSpecialChar SpecialChar +hi def link dosbatchString String +hi def link dosbatchNumber Number +hi def link dosbatchInteger dosbatchNumber +hi def link dosbatchHex dosbatchNumber +hi def link dosbatchBinary dosbatchNumber +hi def link dosbatchOctal dosbatchNumber + +hi def link dosbatchComment Comment +hi def link dosbatchImplicit Function + +hi def link dosbatchSwitch Special + +hi def link dosbatchCmd PreProc + + +let b:current_syntax = "dosbatch" + +" vim: ts=8 diff --git a/syntax/dosini.vim b/syntax/dosini.vim new file mode 100644 index 000000000..361fbe569 --- /dev/null +++ b/syntax/dosini.vim @@ -0,0 +1,44 @@ +if polyglot#init#is_disabled(expand(':p'), 'dosini', 'syntax/dosini.vim') + finish +endif + +" Vim syntax file +" Language: Configuration File (ini file) for MSDOS/MS Windows +" Version: 2.2 +" Original Author: Sean M. McKee +" Previous Maintainer: Nima Talebi +" Current Maintainer: Hong Xu +" Homepage: http://www.vim.org/scripts/script.php?script_id=3747 +" Repository: https://github.com/xuhdev/syntax-dosini.vim +" Last Change: 2018 Sep 11 + + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +syn match dosiniLabel "^.\{-}\ze\s*=" nextgroup=dosiniNumber,dosiniValue +syn match dosiniValue "=\zs.*" +syn match dosiniNumber "=\zs\s*\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" +syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" +syn region dosiniHeader start="^\s*\[" end="\]" +syn match dosiniComment "^[#;].*$" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dosiniNumber Number +hi def link dosiniHeader Special +hi def link dosiniComment Comment +hi def link dosiniLabel Type +hi def link dosiniValue String + + +let b:current_syntax = "dosini" + +" vim: sts=2 sw=2 et diff --git a/syntax/dot.vim b/syntax/dot.vim new file mode 100644 index 000000000..f48f60f40 --- /dev/null +++ b/syntax/dot.vim @@ -0,0 +1,125 @@ +if polyglot#init#is_disabled(expand(':p'), 'dot', 'syntax/dot.vim') + finish +endif + +" Language: Dot +" Filenames: *.dot +" Maintainer: Markus Mottl +" URL: http://www.ocaml.info/vim/syntax/dot.vim +" Last Change: 2021 Mar 24 - better attr + escape string matching, new keywords (Farbod Salamat-Zadeh) +" 2011 May 17 - improved identifier matching + two new keywords +" 2001 May 04 - initial version + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let s:keepcpo = &cpo +set cpo&vim + +" Errors +syn match dotParErr ")" +syn match dotBrackErr "]" +syn match dotBraceErr "}" + +" Enclosing delimiters +syn region dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr +syn region dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr +syn region dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr + +" Comments +syn region dotComment start="//" end="$" contains=dotComment,dotTodo +syn region dotComment start="/\*" end="\*/" contains=dotComment,dotTodo +syn keyword dotTodo contained TODO FIXME XXX + +" Strings +syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" Escape strings +syn match dotEscString /\v\\(N|G|E|T|H|L)/ containedin=dotString +syn match dotEscString /\v\\(n|l|r)/ containedin=dotString + +" General keywords +syn keyword dotKeyword graph digraph subgraph node edge strict + +" Node, edge and graph attributes +syn keyword dotType _background area arrowhead arrowsize arrowtail bb bgcolor + \ center charset class clusterrank color colorscheme comment compound + \ concentrate constraint Damping decorate defaultdist dim dimen dir + \ diredgeconstraints distortion dpi edgehref edgetarget edgetooltip + \ edgeURL epsilon esep fillcolor fixedsize fontcolor fontname fontnames + \ fontpath fontsize forcelabels gradientangle group head_lp headclip + \ headhref headlabel headport headtarget headtooltip headURL height href + \ id image imagepath imagepos imagescale inputscale K label label_scheme + \ labelangle labeldistance labelfloat labelfontcolor labelfontname + \ labelfontsize labelhref labeljust labelloc labeltarget labeltooltip + \ labelURL landscape layer layerlistsep layers layerselect layersep + \ layout len levels levelsgap lhead lheight lp ltail lwidth margin + \ maxiter mclimit mindist minlen mode model mosek newrank nodesep + \ nojustify normalize notranslate nslimit nslimit1 ordering orientation + \ outputorder overlap overlap_scaling overlap_shrink pack packmode pad + \ page pagedir pencolor penwidth peripheries pin pos quadtree quantum + \ rank rankdir ranksep ratio rects regular remincross repulsiveforce + \ resolution root rotate rotation samehead sametail samplepoints scale + \ searchsize sep shape shapefile showboxes sides size skew smoothing + \ sortv splines start style stylesheet tail_lp tailclip tailhref + \ taillabel tailport tailtarget tailtooltip tailURL target tooltip + \ truecolor URL vertices viewport voro_margin weight width xdotversion + \ xlabel xlp z + +" Special chars +syn match dotKeyChar "=" +syn match dotKeyChar ";" +syn match dotKeyChar "->" +syn match dotKeyChar "--" + +" Identifier +syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/ + +" Synchronization +syn sync minlines=50 +syn sync maxlines=500 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dot_syntax_inits") + if version < 508 + let did_dot_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink dotParErr Error + HiLink dotBraceErr Error + HiLink dotBrackErr Error + + HiLink dotComment Comment + HiLink dotTodo Todo + + HiLink dotParEncl Keyword + HiLink dotBrackEncl Keyword + HiLink dotBraceEncl Keyword + + HiLink dotKeyword Keyword + HiLink dotType Type + HiLink dotKeyChar Keyword + + HiLink dotString String + HiLink dotEscString Keyword + HiLink dotIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "dot" + +let &cpo = s:keepcpo +unlet s:keepcpo + +" vim: ts=8 diff --git a/syntax/dracula.vim b/syntax/dracula.vim new file mode 100644 index 000000000..66d6b6552 --- /dev/null +++ b/syntax/dracula.vim @@ -0,0 +1,76 @@ +if polyglot#init#is_disabled(expand(':p'), 'dracula', 'syntax/dracula.vim') + finish +endif + +" Vim syntax file +" Language: Dracula +" Maintainer: Scott Bordelon +" Last change: Wed Apr 25 18:50:01 PDT 2001 +" Extensions: drac.*,*.drac,*.drc,*.lvs,*.lpe +" Comment: Dracula is an industry-standard language created by CADENCE (a +" company specializing in Electronics Design Automation), for +" the purposes of Design Rule Checking, Layout vs. Schematic +" verification, and Layout Parameter Extraction. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Ignore case +syn case ignore + +" A bunch of useful Dracula keywords + +"syn match draculaIdentifier + +syn keyword draculaStatement indisk primary outdisk printfile system +syn keyword draculaStatement mode scale resolution listerror keepdata +syn keyword draculaStatement datatype by lt gt output label range touch +syn keyword draculaStatement inside outside within overlap outlib +syn keyword draculaStatement schematic model unit parset +syn match draculaStatement "flag-\(non45\|acuteangle\|offgrid\)" +syn match draculaStatement "text-pri-only" +syn match draculaStatement "[=&]" +syn match draculaStatement "\[[^,]*\]" +syn match draculastatement "^ *\(sel\|width\|ext\|enc\|area\|shrink\|grow\|length\)" +syn match draculastatement "^ *\(or\|not\|and\|select\|size\|connect\|sconnect\|int\)" +syn match draculastatement "^ *\(softchk\|stamp\|element\|parasitic cap\|attribute cap\)" +syn match draculastatement "^ *\(flagnon45\|lextract\|equation\|lpeselect\|lpechk\|attach\)" +syn match draculaStatement "\(temporary\|connect\)-layer" +syn match draculaStatement "program-dir" +syn match draculaStatement "status-command" +syn match draculaStatement "batch-queue" +syn match draculaStatement "cnames-csen" +syn match draculaStatement "filter-lay-opt" +syn match draculaStatement "filter-sch-opt" +syn match draculaStatement "power-node" +syn match draculaStatement "ground-node" +syn match draculaStatement "subckt-name" + +syn match draculaType "\*description" +syn match draculaType "\*input-layer" +syn match draculaType "\*operation" +syn match draculaType "\*end" + +syn match draculaComment ";.*" + +syn match draculaPreProc "^#.*" + +"Modify the following as needed. The trade-off is performance versus +"functionality. +syn sync lines=50 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link draculaIdentifier Identifier +hi def link draculaStatement Statement +hi def link draculaType Type +hi def link draculaComment Comment +hi def link draculaPreProc PreProc + + +let b:current_syntax = "dracula" + +" vim: ts=8 diff --git a/syntax/dsdl.vim b/syntax/dsdl.vim index c7cc2425c..cec8fba95 100644 --- a/syntax/dsdl.vim +++ b/syntax/dsdl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'dlang', 'syntax/dsdl.vim') + finish +endif " Vim syntax file for DUB configurations." " @@ -90,5 +92,3 @@ hi def link dsdlStatement Statement hi def link dsdlAttribute Tag let b:current_syntax = "dsdl" - -endif diff --git a/syntax/dsl.vim b/syntax/dsl.vim new file mode 100644 index 000000000..1464533fc --- /dev/null +++ b/syntax/dsl.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand(':p'), 'dsl', 'syntax/dsl.vim') + finish +endif + +" Vim syntax file +" Language: DSSSL +" Maintainer: Johannes Zellner +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Filenames: *.dsl +" $Id: dsl.vim,v 1.1 2004/06/13 19:13:31 vimboss Exp $ + +if exists("b:current_syntax") | finish | endif + +runtime syntax/xml.vim +syn cluster xmlRegionHook add=dslRegion,dslComment +syn cluster xmlCommentHook add=dslCond + +" EXAMPLE: +" +" (define html-manifest #f) +" ]]> +" +" NOTE: 'contains' the same as xmlRegion, except xmlTag / xmlEndTag +syn region dslCond matchgroup=dslCondDelim start="\[\_[^[]\+\[" end="]]" contains=xmlCdata,@xmlRegionCluster,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook + +" NOTE, that dslRegion and dslComment do both NOT have a 'contained' +" argument, so this will also work in plain dsssl documents. + +syn region dslRegion matchgroup=Delimiter start=+(+ end=+)+ contains=dslRegion,dslString,dslComment +syn match dslString +"\_[^"]*"+ contained +syn match dslComment +;.*$+ contains=dslTodo +syn keyword dslTodo contained TODO FIXME XXX display + +" The default highlighting. +hi def link dslTodo Todo +hi def link dslString String +hi def link dslComment Comment +" compare the following with xmlCdataStart / xmlCdataEnd +hi def link dslCondDelim Type + +let b:current_syntax = "dsl" diff --git a/syntax/dtd.vim b/syntax/dtd.vim new file mode 100644 index 000000000..b54e7ae1e --- /dev/null +++ b/syntax/dtd.vim @@ -0,0 +1,165 @@ +if polyglot#init#is_disabled(expand(':p'), 'dtd', 'syntax/dtd.vim') + finish +endif + +" Vim syntax file +" Language: DTD (Document Type Definition for XML) +" Maintainer: Christian Brabandt +" Repository: https://github.com/chrisbra/vim-xml-ftplugin +" Previous Maintainer: Johannes Zellner +" Author: Daniel Amyot +" Last Changed: Sept 24, 2019 +" Filenames: *.dtd +" +" REFERENCES: +" http://www.w3.org/TR/html40/ +" http://www.w3.org/TR/NOTE-html-970421 +" +" TODO: +" - improve synchronizing. + +if exists("b:current_syntax") + finish +endif +let s:dtd_cpo_save = &cpo +set cpo&vim + +if !exists("dtd_ignore_case") + " I prefer having the case takes into consideration. + syn case match +else + syn case ignore +endif + + +" the following line makes the opening highlighted using 'dtdFunction'. +" +" PROVIDES: @dtdTagHook +" +syn region dtdTag matchgroup=dtdFunction + \ start=++ matchgroup=NONE + \ contains=dtdTag,dtdTagName,dtdError,dtdComment,dtdString,dtdAttrType,dtdAttrDef,dtdEnum,dtdParamEntityInst,dtdParamEntityDecl,dtdCard,@dtdTagHook + +if !exists("dtd_no_tag_errors") + " mark everything as an error which starts with a + +endif + +" if this is a html like comment highlight also +" the opening as Comment. +syn region dtdComment start=++ contains=dtdTodo,@Spell + + +" proper DTD comment +syn region dtdComment contained start=+--+ end=+--+ contains=dtdTodo,@Spell + + +" Start tags (keywords). This is contained in dtdFunction. +" Note that everything not contained here will be marked +" as error. +syn match dtdTagName contained +" + \ matchgroup=NONE contains=dtdParamEntityPunct + syn match dtdParamEntityPunct contained "\." + + " declarations + " syn region dtdParamEntityDecl oneline matchgroup=dtdParamEntityDPunct start=+" contains=dtdParamEntityDPunct + syn match dtdParamEntityDecl +:p'), 'dts', 'syntax/dts.vim') + finish +endif + +" Vim syntax file +" Language: dts/dtsi (device tree files) +" Maintainer: Daniel Mack +" Last Change: 2021 May 15 + +if exists("b:current_syntax") + finish +endif + +syntax region dtsComment start="/\*" end="\*/" +syntax match dtsReference "&[[:alpha:][:digit:]_]\+" +syntax region dtsBinaryProperty start="\[" end="\]" +syntax match dtsStringProperty "\".*\"" +syntax match dtsKeyword "/.\{-1,\}/" +syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:" +syntax match dtsNode /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1 +syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment +syntax region dtsCommentInner start="/\*" end="\*/" +syntax match dtsCommentLine "//.*$" + +" Accept %: for # (C99) +syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" +if !exists("c_no_if0") + syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip + syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold + syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse + if !exists("c_no_if0_fold") + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold + else + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + endif + syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit + syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold + syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit + if !exists("c_no_if0_fold") + syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold + else + syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 + endif + syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell + syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip + syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc +endif +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +"syn match cLineSkip "\\$" +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock +syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell +syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell + +hi def link dtsCellProperty Number +hi def link dtsBinaryProperty Number +hi def link dtsStringProperty String +hi def link dtsKeyword Include +hi def link dtsLabel Label +hi def link dtsNode Structure +hi def link dtsReference Macro +hi def link dtsComment Comment +hi def link dtsCommentInner Comment +hi def link dtsCommentLine Comment + +hi def link cInclude Include +hi def link cPreProc PreProc +hi def link cDefine Macro +hi def link cIncluded cString +hi def link cString String + +hi def link cCppInWrapper cCppOutWrapper +hi def link cCppOutWrapper cPreCondit +hi def link cPreConditMatch cPreCondit +hi def link cPreCondit PreCondit +hi def link cCppOutSkip cCppOutIf2 + +hi def link cCppInElse2 cCppOutIf2 +hi def link cCppOutIf2 cCppOut +hi def link cCppOut Comment diff --git a/syntax/dune.vim b/syntax/dune.vim index b9160f788..c42ce81ea 100644 --- a/syntax/dune.vim +++ b/syntax/dune.vim @@ -1,4 +1,17 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ocaml', 'syntax/dune.vim') + finish +endif + +" Vim syntax file +" Language: Dune buildsystem +" Maintainer: Markus Mottl +" Anton Kochkov +" URL: https://github.com/ocaml/vim-ocaml +" Last Change: +" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes) +" 2018 May 8 - Check current_syntax (Kawahara Satoru) +" 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal) +" 2017 Sep 6 - Initial version (Etienne Millon) if exists("b:current_syntax") finish @@ -20,7 +33,7 @@ syn keyword lispKey ppx_runtime_libraries virtual_deps js_of_ocaml link_flags syn keyword lispKey javascript_files flags ocamlc_flags ocamlopt_flags pps staged_pps syn keyword lispKey library_flags c_flags c_library_flags kind package action syn keyword lispKey deps targets locks fallback -syn keyword lispKey inline_tests tests names +syn keyword lispKey inline_tests tests test names syn keyword lispAtom true false @@ -36,5 +49,3 @@ syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol hi def link duneVar Identifier let b:current_syntax = "dune" - -endif diff --git a/syntax/dylan.vim b/syntax/dylan.vim new file mode 100644 index 000000000..998117ee7 --- /dev/null +++ b/syntax/dylan.vim @@ -0,0 +1,96 @@ +if polyglot#init#is_disabled(expand(':p'), 'dylan', 'syntax/dylan.vim') + finish +endif + +" Vim syntax file +" Language: Dylan +" Authors: Justus Pendleton +" Brent A. Fulgham +" Last Change: Fri Sep 29 13:45:55 PDT 2000 +" +" This syntax file is based on the Haskell, Perl, Scheme, and C +" syntax files. + +" Part 1: Syntax definition +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +setlocal lisp + +" Highlight special characters (those that have backslashes) differently +syn match dylanSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" + +" Keywords +syn keyword dylanBlock afterwards begin block cleanup end +syn keyword dylanClassMods abstract concrete primary inherited virtual +syn keyword dylanException exception handler signal +syn keyword dylanParamDefs method class function library macro interface +syn keyword dylanSimpleDefs constant variable generic primary +syn keyword dylanOther above below from by in instance local slot subclass then to +syn keyword dylanConditional if when select case else elseif unless finally otherwise then +syn keyword dylanRepeat begin for until while from to +syn keyword dylanStatement define let +syn keyword dylanImport use import export exclude rename create +syn keyword dylanMiscMods open sealed domain singleton sideways inline functional + +" Matching rules for special forms +syn match dylanOperator "\s[-!%&\*\+/=\?@\\^|~:]\+[-#!>%&:\*\+/=\?@\\^|~]*" +syn match dylanOperator "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./=\?@\\^|~:]*" +" Numbers +syn match dylanNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" +syn match dylanNumber "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" +" Booleans +syn match dylanBoolean "#t\|#f" +" Comments +syn match dylanComment "//.*" +syn region dylanComment start="/\*" end="\*/" +" Strings +syn region dylanString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=dySpecial +syn match dylanCharacter "'[^\\]'" +" Constants, classes, and variables +syn match dylanConstant "$\<[a-zA-Z0-9\-]\+\>" +syn match dylanClass "<\<[a-zA-Z0-9\-]\+\>>" +syn match dylanVariable "\*\<[a-zA-Z0-9\-]\+\>\*" +" Preconditions +syn region dylanPrecondit start="^\s*#\s*\(if\>\|else\>\|endif\>\)" skip="\\$" end="$" + +" These appear at the top of files (usually). I like to highlight the whole line +" so that the definition stands out. They should probably really be keywords, but they +" don't generally appear in the middle of a line of code. +syn region dylanHeader start="^[Mm]odule:" end="^$" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dylanBlock PreProc +hi def link dylanBoolean Boolean +hi def link dylanCharacter Character +hi def link dylanClass Structure +hi def link dylanClassMods StorageClass +hi def link dylanComment Comment +hi def link dylanConditional Conditional +hi def link dylanConstant Constant +hi def link dylanException Exception +hi def link dylanHeader Macro +hi def link dylanImport Include +hi def link dylanLabel Label +hi def link dylanMiscMods StorageClass +hi def link dylanNumber Number +hi def link dylanOther Keyword +hi def link dylanOperator Operator +hi def link dylanParamDefs Keyword +hi def link dylanPrecondit PreCondit +hi def link dylanRepeat Repeat +hi def link dylanSimpleDefs Keyword +hi def link dylanStatement Macro +hi def link dylanString String +hi def link dylanVariable Identifier + + +let b:current_syntax = "dylan" + +" vim:ts=8 diff --git a/syntax/dylanintr.vim b/syntax/dylanintr.vim new file mode 100644 index 000000000..8bc64b33b --- /dev/null +++ b/syntax/dylanintr.vim @@ -0,0 +1,43 @@ +if polyglot#init#is_disabled(expand(':p'), 'dylanintr', 'syntax/dylanintr.vim') + finish +endif + +" Vim syntax file +" Language: Dylan +" Authors: Justus Pendleton +" Last Change: Fri Sep 29 13:53:27 PDT 2000 +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region dylanintrInfo matchgroup=Statement start="^" end=":" oneline +syn match dylanintrInterface "define interface" +syn match dylanintrClass "<.*>" +syn region dylanintrType start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn region dylanintrIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match dylanintrIncluded contained "<[^>]*>" +syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded + +"syn keyword intrMods pointer struct + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dylanintrInfo Special +hi def link dylanintrInterface Operator +hi def link dylanintrMods Type +hi def link dylanintrClass StorageClass +hi def link dylanintrType Type +hi def link dylanintrIncluded String +hi def link dylanintrInclude Include + + +let b:current_syntax = "dylanintr" + +" vim:ts=8 diff --git a/syntax/dylanlid.vim b/syntax/dylanlid.vim new file mode 100644 index 000000000..e3424b768 --- /dev/null +++ b/syntax/dylanlid.vim @@ -0,0 +1,33 @@ +if polyglot#init#is_disabled(expand(':p'), 'dylanlid', 'syntax/dylanlid.vim') + finish +endif + +" Vim syntax file +" Language: Dylan Library Interface Files +" Authors: Justus Pendleton +" Brent Fulgham +" Last Change: Fri Sep 29 13:50:20 PDT 2000 +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region dylanlidInfo matchgroup=Statement start="^" end=":" oneline +syn region dylanlidEntry matchgroup=Statement start=":%" end="$" oneline + +syn sync lines=50 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link dylanlidInfo Type +hi def link dylanlidEntry String + + +let b:current_syntax = "dylanlid" + +" vim:ts=8 diff --git a/syntax/ecd.vim b/syntax/ecd.vim new file mode 100644 index 000000000..db973d18d --- /dev/null +++ b/syntax/ecd.vim @@ -0,0 +1,48 @@ +if polyglot#init#is_disabled(expand(':p'), 'ecd', 'syntax/ecd.vim') + finish +endif + +" Vim syntax file +" Language: ecd (Embedix Component Description) files +" Maintainer: John Beppu +" URL: http://opensource.lineo.com/~beppu/prose/ecd_vim.html +" Last Change: 2001 Sep 27 + +" An ECD file contains meta-data for packages in the Embedix Linux distro. +" This syntax file was derived from apachestyle.vim +" by Christian Hammers + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" specials +syn match ecdComment "^\s*#.*" + +" options and values +syn match ecdAttr "^\s*[a-zA-Z]\S*\s*[=].*$" contains=ecdAttrN,ecdAttrV +syn match ecdAttrN contained "^.*="me=e-1 +syn match ecdAttrV contained "=.*$"ms=s+1 + +" tags +syn region ecdTag start=+<+ end=+>+ contains=ecdTagN,ecdTagError +syn match ecdTagN contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1 +syn match ecdTagError contained "[^>]<"ms=s+1 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link ecdComment Comment +hi def link ecdAttr Type +hi def link ecdAttrN Statement +hi def link ecdAttrV Value +hi def link ecdTag Function +hi def link ecdTagN Statement +hi def link ecdTagError Error + + +let b:current_syntax = "ecd" +" vim: ts=8 diff --git a/syntax/ecrystal.vim b/syntax/ecrystal.vim index 096990ffb..264fd78f9 100644 --- a/syntax/ecrystal.vim +++ b/syntax/ecrystal.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 +if polyglot#init#is_disabled(expand(':p'), 'crystal', 'syntax/ecrystal.vim') + finish +endif if &syntax !~# '\' || get(b:, 'current_syntax') =~# '\' finish @@ -33,5 +35,3 @@ let b:current_syntax = 'ecrystal' if exists('main_syntax') && main_syntax ==# 'ecrystal' unlet main_syntax endif - -endif diff --git a/syntax/edif.vim b/syntax/edif.vim new file mode 100644 index 000000000..4c7b95859 --- /dev/null +++ b/syntax/edif.vim @@ -0,0 +1,49 @@ +if polyglot#init#is_disabled(expand(':p'), 'edif', 'syntax/edif.vim') + finish +endif + +" Vim syntax file +" Language: EDIF (Electronic Design Interchange Format) +" Maintainer: Artem Zankovich +" Last Change: Oct 14, 2002 +" +" Supported standarts are: +" ANSI/EIA Standard 548-1988 (EDIF Version 2 0 0) +" IEC 61690-1 (EDIF Version 3 0 0) +" IEC 61690-2 (EDIF Version 4 0 0) + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& + +syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber + +" Strings +syn match edifInStringError /%/ contained +syn match edifInString /%\s*\d\+\s*%/ contained +syn region edifString start=/"/ end=/"/ contains=edifInString,edifInStringError contained + +" Numbers +syn match edifNumber "\<[-+]\=[0-9]\+\>" + +" Keywords +syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained + +syn match edifError ")" + +" synchronization +syntax sync fromstart + +" Define the default highlighting. + +hi def link edifInString SpecialChar +hi def link edifKeyword Keyword +hi def link edifNumber Number +hi def link edifInStringError edifError +hi def link edifError Error +hi def link edifString String + +let b:current_syntax = "edif" diff --git a/syntax/eelixir.vim b/syntax/eelixir.vim index 1715f36ed..0b8669bf3 100644 --- a/syntax/eelixir.vim +++ b/syntax/eelixir.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'syntax/eelixir.vim') + finish +endif if exists("b:current_syntax") finish @@ -21,11 +23,17 @@ if !exists("b:eelixir_subtype") if b:eelixir_subtype == '' let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+') endif + if b:eelixir_subtype == '' + let b:eelixir_subtype = matchstr(&filetype,'^heex\.\zs\w\+') + endif if b:eelixir_subtype == '' let b:eelixir_subtype = matchstr(&filetype,'^leex\.\zs\w\+') endif if b:eelixir_subtype == '' - let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.leex\|\.eelixir\)\+$','',''),'\.\zs\w\+$') + let b:eelixir_subtype = matchstr(&filetype,'^sface\.\zs\w\+') + endif + if b:eelixir_subtype == '' + let b:eelixir_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eex\|\.heex\|\.leex\|\.sface\|\.eelixir\)\+$','',''),'\.\zs\w\+$') endif if b:eelixir_subtype == 'ex' let b:eelixir_subtype = 'elixir' @@ -50,16 +58,20 @@ endif syn include @elixirTop syntax/elixir.vim -syn cluster eelixirRegions contains=eelixirBlock,eelixirExpression,eelixirComment +syn cluster eelixirRegions contains=eelixirBlock,surfaceExpression,eelixirExpression,eelixirComment exe 'syn region eelixirExpression matchgroup=eelixirDelimiter start="<%" end="%\@" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend' exe 'syn region eelixirExpression matchgroup=eelixirDelimiter start="<%=" end="%\@" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend' +exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{{" end="}}" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend' +exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{" end="}" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend' +exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{" end="}" skip="#{[^}]*}" contains=@elixirTop containedin=htmlValue keepend' exe 'syn region eelixirQuote matchgroup=eelixirDelimiter start="<%%" end="%\@" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend' exe 'syn region eelixirComment matchgroup=eelixirDelimiter start="<%#" end="%\@" contains=elixirTodo,@Spell containedin=ALLBUT,@eelixirRegions keepend' " Define the default highlighting. hi def link eelixirDelimiter PreProc +hi def link surfaceDelimiter PreProc hi def link eelixirComment Comment let b:current_syntax = 'eelixir' @@ -70,5 +82,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/elf.vim b/syntax/elf.vim index 5b6b96781..7898851ad 100644 --- a/syntax/elf.vim +++ b/syntax/elf.vim @@ -1,8 +1,10 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elf', 'syntax/elf.vim') + finish +endif " Vim syntax file " Language: ELF -" Maintainer: Christian V. J. Br�ssow +" Maintainer: Christian V. J. Brüssow " Last Change: Son 22 Jun 2003 20:43:14 CEST " Filenames: *.ab,*.am " URL: http://www.cvjb.de/comp/vim/elf.vim @@ -82,5 +84,3 @@ hi def link elfPunct Delimiter let b:current_syntax = "elf" " vim:ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/elinks.vim b/syntax/elinks.vim new file mode 100644 index 000000000..3642338d4 --- /dev/null +++ b/syntax/elinks.vim @@ -0,0 +1,192 @@ +if polyglot#init#is_disabled(expand(':p'), 'elinks', 'syntax/elinks.vim') + finish +endif + +" Vim syntax file +" Language: elinks(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-17 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword elinksTodo contained TODO FIXME XXX NOTE + +syn region elinksComment display oneline start='#' end='$' + \ contains=elinksTodo,@Spell + +syn match elinksNumber '\<\d\+\>' + +syn region elinksString start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=@elinksColor + +syn keyword elinksKeyword set bind + +syn keyword elinksPrefix bookmarks +syn keyword elinksOptions file_format + +syn keyword elinksPrefix config +syn keyword elinksOptions comments indentation saving_style i18n + \ saving_style_w show_template + +syn keyword elinksPrefix connection ssl client_cert +syn keyword elinksOptions enable file cert_verify async_dns max_connections + \ max_connections_to_host receive_timeout retries + \ unrestartable_receive_timeout + +syn keyword elinksPrefix cookies +syn keyword elinksOptions accept_policy max_age paranoid_security save resave + +syn keyword elinksPrefix document browse accesskey forms images links +syn keyword elinksPrefix active_link colors search cache codepage colors +syn keyword elinksPrefix format memory download dump history global html +syn keyword elinksPrefix plain +syn keyword elinksOptions auto_follow priority auto_submit confirm_submit + \ input_size show_formhist file_tags + \ image_link_tagging image_link_prefix + \ image_link_suffix show_as_links + \ show_any_as_links background text enable_color + \ bold invert underline color_dirs numbering + \ use_tabindex number_keys_select_link + \ wraparound case regex show_hit_top_bottom + \ wraparound show_not_found margin_width refresh + \ minimum_refresh_time scroll_margin scroll_step + \ table_move_order size size cache_redirects + \ ignore_cache_control assume force_assumed text + \ background link vlink dirs allow_dark_on_black + \ ensure_contrast use_document_colors directory + \ set_original_time overwrite notify_bell + \ codepage width enable max_items display_type + \ write_interval keep_unhistory display_frames + \ display_tables expand_table_columns display_subs + \ display_sups link_display underline_links + \ wrap_nbsp display_links compress_empty_lines + +syn keyword elinksPrefix mime extension handler mailcap mimetypes type +syn keyword elinksOptions ask block program enable path ask description + \ prioritize enable path default_type + +syn keyword elinksPrefix protocol file cgi ftp proxy http bugs proxy +syn keyword elinksPrefix referer https proxy rewrite dumb smart +syn keyword elinksOptions path policy allow_special_files show_hidden_files + \ try_encoding_extensions host anon_passwd + \ use_pasv use_epsv accept_charset allow_blacklist + \ broken_302_redirect post_no_keepalive http10 + \ host user passwd policy fake accept_language + \ accept_ui_language trace user_agent host + \ enable-dumb enable-smart + +syn keyword elinksPrefix terminal +syn keyword elinksOptions type m11_hack utf_8_io restrict_852 block_cursor + \ colors transparency underline charset + +syn keyword elinksPrefix ui colors color mainmenu normal selected hotkey + \ menu marked hotkey frame dialog generic + \ frame scrollbar scrollbar-selected title text + \ checkbox checkbox-label button button-selected + \ field field-text meter shadow title title-bar + \ title-text status status-bar status-text tabs + \ unvisited normal loading separator searched mono +syn keyword elinksOptions text background + +syn keyword elinksPrefix ui dialogs leds sessions tabs timer +syn keyword elinksOptions listbox_min_height shadows underline_hotkeys enable + \ auto_save auto_restore auto_save_foldername + \ homepage show_bar wraparound confirm_close + \ enable duration action language show_status_bar + \ show_title_bar startup_goto_dialog + \ success_msgbox window_title + +syn keyword elinksOptions secure_file_saving + +syn cluster elinksColor contains=elinksColorBlack,elinksColorDarkRed, + \ elinksColorDarkGreen,elinksColorDarkYellow, + \ elinksColorDarkBlue,elinksColorDarkMagenta, + \ elinksColorDarkCyan,elinksColorGray, + \ elinksColorDarkGray,elinksColorRed, + \ elinksColorGreen,elinksColorYellow, + \ elinksColorBlue,elinksColorMagenta, + \ elinksColorCyan,elinksColorWhite + +syn keyword elinksColorBlack contained black +syn keyword elinksColorDarkRed contained darkred sandybrown maroon crimson + \ firebrick +syn keyword elinksColorDarkGreen contained darkgreen darkolivegreen + \ darkseagreen forestgreen + \ mediumspringgreen seagreen +syn keyword elinksColorDarkYellow contained brown blanchedalmond chocolate + \ darkorange darkgoldenrod orange rosybrown + \ saddlebrown peru olive olivedrab sienna +syn keyword elinksColorDarkBlue contained darkblue cadetblue cornflowerblue + \ darkslateblue deepskyblue midnightblue + \ royalblue steelblue navy +syn keyword elinksColorDarkMagenta contained darkmagenta mediumorchid + \ mediumpurple mediumslateblue slateblue + \ deeppink hotpink darkorchid orchid purple + \ indigo +syn keyword elinksColorDarkCyan contained darkcyan mediumaquamarine + \ mediumturquoise darkturquoise teal +syn keyword elinksColorGray contained silver dimgray lightslategray + \ slategray lightgrey burlywood plum tan + \ thistle +syn keyword elinksColorDarkGray contained gray darkgray darkslategray + \ darksalmon +syn keyword elinksColorRed contained red indianred orangered tomato + \ lightsalmon salmon coral lightcoral +syn keyword elinksColorGreen contained green greenyellow lawngreen + \ lightgreen lightseagreen limegreen + \ mediumseagreen springgreen yellowgreen + \ palegreen lime chartreuse +syn keyword elinksColorYellow contained yellow beige darkkhaki + \ lightgoldenrodyellow palegoldenrod gold + \ goldenrod khaki lightyellow +syn keyword elinksColorBlue contained blue aliceblue aqua aquamarine + \ azure dodgerblue lightblue lightskyblue + \ lightsteelblue mediumblue +syn keyword elinksColorMagenta contained magenta darkviolet blueviolet + \ lightpink mediumvioletred palevioletred + \ violet pink fuchsia +syn keyword elinksColorCyan contained cyan lightcyan powderblue skyblue + \ turquoise paleturquoise +syn keyword elinksColorWhite contained white antiquewhite floralwhite + \ ghostwhite navajowhite whitesmoke linen + \ lemonchiffon cornsilk lavender + \ lavenderblush seashell mistyrose ivory + \ papayawhip bisque gainsboro honeydew + \ mintcream moccasin oldlace peachpuff snow + \ wheat + +hi def link elinksTodo Todo +hi def link elinksComment Comment +hi def link elinksNumber Number +hi def link elinksString String +hi def link elinksKeyword Keyword +hi def link elinksPrefix Identifier +hi def link elinksOptions Identifier +hi def elinksColorBlack ctermfg=Black guifg=Black +hi def elinksColorDarkRed ctermfg=DarkRed guifg=DarkRed +hi def elinksColorDarkGreen ctermfg=DarkGreen guifg=DarkGreen +hi def elinksColorDarkYellow ctermfg=DarkYellow guifg=DarkYellow +hi def elinksColorDarkBlue ctermfg=DarkBlue guifg=DarkBlue +hi def elinksColorDarkMagenta ctermfg=DarkMagenta guifg=DarkMagenta +hi def elinksColorDarkCyan ctermfg=DarkCyan guifg=DarkCyan +hi def elinksColorGray ctermfg=Gray guifg=Gray +hi def elinksColorDarkGray ctermfg=DarkGray guifg=DarkGray +hi def elinksColorRed ctermfg=Red guifg=Red +hi def elinksColorGreen ctermfg=Green guifg=Green +hi def elinksColorYellow ctermfg=Yellow guifg=Yellow +hi def elinksColorBlue ctermfg=Blue guifg=Blue +hi def elinksColorMagenta ctermfg=Magenta guifg=Magenta +hi def elinksColorCyan ctermfg=Cyan guifg=Cyan +hi def elinksColorWhite ctermfg=White guifg=White + +let b:current_syntax = "elinks" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/elixir.vim b/syntax/elixir.vim index ca057b3da..6570ff5e1 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elixir', 'syntax/elixir.vim') + finish +endif if !exists("main_syntax") if exists("b:current_syntax") @@ -10,7 +12,7 @@ endif let s:cpo_save = &cpo set cpo&vim -syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter +syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter,elixirListDelimiter syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirPrivateFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirPrivateRecordDeclaration,elixirMacroDeclaration,elixirPrivateMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration @@ -20,10 +22,6 @@ syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' contains=elixirUnusedVariable -syn match elixirFunctionCall '\<[a-z_]\w*[!?]\?\(\s*\.\?\s*(\|\s\+[a-zA-Z0-9@:\'\"\[]\)\@=' -syn match elixirFunctionCall '\(:\w\+\s*\.\s*\|[A-Z]\w*\s*\.\s*\)\@<=[a-z_]\w*[!?]\?' -syn match elixirFunctionCall '\(>\s+\)\<[a-z_]\w*[!?]\?' - syn match elixirKeyword '\(\.\)\@:\@!' syn keyword elixirInclude import require alias use @@ -48,7 +46,7 @@ syn match elixirOperator '\~>\|\~>>\|<\~\|<<\~\|<\~>' syn match elixirAlias '\([a-z]\)\@=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)' +syn match elixirAtom '\(:\)\@=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)' syn match elixirAtom '\(:\)\@\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)' syn match elixirAtom "\%([a-zA-Z_]\w*[?!]\?\):\(:\)\@!" @@ -72,14 +70,17 @@ syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\| syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial -syn region elixirTuple matchgroup=elixirTupleDelimiter start="\(\w\|#\)\@\| syn region elixirBlock matchgroup=elixirBlockDefinition start="\:\@!" end="\" contains=ALLBUT,@elixirNotTop fold syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\" end="\" contains=ALLBUT,@elixirNotTop fold -syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment +syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment,elixirCharList,elixirCharListDelimiter syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE @@ -117,7 +118,10 @@ syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end= syntax include @HTML syntax/html.vim unlet b:current_syntax syntax region elixirLiveViewSigil matchgroup=elixirSigilDelimiter keepend start=+\~L\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold - +syntax region elixirSurfaceSigil matchgroup=elixirSigilDelimiter keepend start=+\~H\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold +syntax region elixirSurfaceSigil matchgroup=elixirSigilDelimiter keepend start=+\~F\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold +syntax region elixirPhoenixESigil matchgroup=elixirSigilDelimiter keepend start=+\~E\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold +syntax region elixirPhoenixeSigil matchgroup=elixirSigilDelimiter keepend start=+\~e\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold " Documentation if exists('g:elixir_use_markdown_for_docs') && g:elixir_use_markdown_for_docs @@ -145,6 +149,7 @@ syn region elixirDocString matchgroup=elixirDocSigilDelimiter start=+\%(@\w*doc " Defines syn match elixirDefine '\\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl syn match elixirPrivateDefine '\\(:\)\@!' nextgroup=elixirPrivateFunctionDeclaration skipwhite skipnl +syn match elixirNumericalDefine '\\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl syn match elixirGuard '\\(:\)\@!' nextgroup=elixirFunctionDeclaration skipwhite skipnl syn match elixirPrivateGuard '\\(:\)\@!' nextgroup=elixirPrivateFunctionDeclaration skipwhite skipnl syn match elixirModuleDefine '\\(:\)\@!' nextgroup=elixirModuleDeclaration skipwhite skipnl @@ -187,6 +192,7 @@ syn sync minlines=2000 hi def link elixirBlockDefinition Define hi def link elixirDefine Define hi def link elixirPrivateDefine Define +hi def link elixirNumericalDefine Define hi def link elixirGuard Define hi def link elixirPrivateGuard Define hi def link elixirModuleDefine Define @@ -231,10 +237,12 @@ hi def link elixirRegexCharClass elixirSpecial hi def link elixirRegexQuantifier elixirSpecial hi def link elixirSpecial Special hi def link elixirString String +hi def link elixirCharList String hi def link elixirSigil String hi def link elixirDocStringDelimiter elixirStringDelimiter hi def link elixirDocSigilDelimiter elixirSigilDelimiter hi def link elixirStringDelimiter Delimiter +hi def link elixirCharListDelimiter Delimiter hi def link elixirRegexDelimiter Delimiter hi def link elixirInterpolationDelimiter Delimiter hi def link elixirSigilDelimiter Delimiter @@ -248,5 +256,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/elm.vim b/syntax/elm.vim index 474f21d0f..31b9d057d 100644 --- a/syntax/elm.vim +++ b/syntax/elm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elm') == -1 +if polyglot#init#is_disabled(expand(':p'), 'elm', 'syntax/elm.vim') + finish +endif " syntax highlighting for Elm (https://elm-lang.org/) @@ -99,5 +101,3 @@ hi def link elmModule Type syn sync minlines=500 let b:current_syntax = 'elm' - -endif diff --git a/syntax/elmfilt.vim b/syntax/elmfilt.vim new file mode 100644 index 000000000..b9a380f86 --- /dev/null +++ b/syntax/elmfilt.vim @@ -0,0 +1,62 @@ +if polyglot#init#is_disabled(expand(':p'), 'elmfilt', 'syntax/elmfilt.vim') + finish +endif + +" Vim syntax file +" Language: Elm Filter rules +" Maintainer: Charles E. Campbell +" Last Change: Aug 31, 2016 +" Version: 9 +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_ELMFILT + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn cluster elmfiltIfGroup contains=elmfiltCond,elmfiltOper,elmfiltOperKey,,elmfiltNumber,elmfiltOperKey + +syn match elmfiltParenError "[()]" +syn match elmfiltMatchError "/" +syn region elmfiltIf start="\" end="\" contains=elmfiltParen,elmfiltParenError skipnl skipwhite nextgroup=elmfiltAction +syn region elmfiltParen contained matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=elmfiltParen,@elmfiltIfGroup,elmfiltThenError +syn region elmfiltMatch contained matchgroup=Delimiter start="/" skip="\\/" matchgroup=Delimiter end="/" skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn match elmfiltThenError "\" skipnl skipwhite nextgroup=elmfiltString +syn match elmfiltOperKey contained "\=\|!=\|<\|<\|=" skipnl skipwhite nextgroup=elmfiltString,elmfiltCond,elmfiltOperKey +syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell +syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell +syn match elmfiltSpaceError contained "\s.*$" + +" Define the default highlighting. +if !exists("skip_elmfilt_syntax_inits") + + hi def link elmfiltAction Statement + hi def link elmfiltArg Special + hi def link elmfiltComment Comment + hi def link elmfiltCond Statement + hi def link elmfiltIf Statement + hi def link elmfiltMatch Special + hi def link elmfiltMatchError Error + hi def link elmfiltNumber Number + hi def link elmfiltOper Operator + hi def link elmfiltOperKey Type + hi def link elmfiltParenError Error + hi def link elmfiltSpaceError Error + hi def link elmfiltString String + hi def link elmfiltThenError Error + +endif + +let b:current_syntax = "elmfilt" +" vim: ts=9 diff --git a/syntax/ember-script.vim b/syntax/ember-script.vim index d034a67e8..e56fb9dec 100644 --- a/syntax/ember-script.vim +++ b/syntax/ember-script.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'emberscript', 'syntax/ember-script.vim') + finish +endif " Language: ember-script " Maintainer: Yulij Andreevich Lesov > @@ -31,5 +33,3 @@ syn match emEach /\v\@each/ display hi def link emEach Special let b:current_syntax = 'ember-script' - -endif diff --git a/syntax/emblem.vim b/syntax/emblem.vim index 00e7541dd..f6a2dafb1 100644 --- a/syntax/emblem.vim +++ b/syntax/emblem.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 +if polyglot#init#is_disabled(expand(':p'), 'emblem', 'syntax/emblem.vim') + finish +endif " Language: emblem " Maintainer: Yulij Andreevich Lesov @@ -171,5 +173,3 @@ hi def link eblId Constant hi def link eblClass Identifier let b:current_syntax = 'emblem' - -endif diff --git a/syntax/embeddedpuppet.vim b/syntax/epuppet.vim similarity index 87% rename from syntax/embeddedpuppet.vim rename to syntax/epuppet.vim index 71096274d..d0c5f9650 100644 --- a/syntax/embeddedpuppet.vim +++ b/syntax/epuppet.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 +if polyglot#init#is_disabled(expand(':p'), 'puppet', 'syntax/epuppet.vim') + finish +endif " Vim syntax plugin " Language: embedded puppet @@ -7,7 +9,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Last Change: 2019-09-01 " quit when a syntax file was already loaded {{{1 -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif @@ -27,7 +29,5 @@ syn region ePuppetComment matchgroup=ePuppetDelimiter start="<%-\=#" end= hi def link ePuppetDelimiter PreProc hi def link ePuppetComment Comment -let b:current_syntax = "embeddedpuppet" +let b:current_syntax = 'epuppet' - -endif diff --git a/syntax/erlang.vim b/syntax/erlang.vim index a60eaad94..72bfb2d52 100644 --- a/syntax/erlang.vim +++ b/syntax/erlang.vim @@ -1,10 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'erlang') == -1 +if polyglot#init#is_disabled(expand(':p'), 'erlang', 'syntax/erlang.vim') + finish +endif " Vim syntax file " Language: Erlang (http://www.erlang.org) " Maintainer: Csaba Hoch " Contributor: Adam Rutkowski -" Last Update: 2019-Jun-18 +" Last Update: 2022-Sep-06 " License: Vim license " URL: https://github.com/vim-erlang/vim-erlang-runtime @@ -63,7 +65,8 @@ syn match erlangQuotedAtomModifier '\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)' con syn match erlangModifier '\$\%([^\\]\|\\\%(\o\{1,3}\|x\x\x\|x{\x\+}\|\^.\|.\)\)' " Operators, separators -syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/' +syn match erlangOperator '==\|=:=\|/=\|=/=\|<\|=<\|>\|>=\|=>\|:=\|?=\|++\|--\|=\|!\|<-\|+\|-\|\*\|\/' +syn match erlangEqualsBinary '=<<\%(<\)\@!' syn keyword erlangOperator div rem or xor bor bxor bsl bsr and band not bnot andalso orelse syn match erlangBracket '{\|}\|\[\|]\||\|||' syn match erlangPipe '|' @@ -78,7 +81,8 @@ syn match erlangGlobalFuncCall '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\ syn match erlangGlobalFuncRef '\<\%(\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*\.\%(\s\|\n\|%.*\n\)*\)*\a[[:alnum:]_@]*\%(\s\|\n\|%.*\n\)*:\%(\s\|\n\|%.*\n\)*\a[[:alnum:]_@]*\>\%(\%(\s\|\n\|%.*\n\)*/\)\@=' contains=erlangComment,erlangVariable " Variables, macros, records, maps -syn match erlangVariable '\<[A-Z_][[:alnum:]_@]*' +syn match erlangVariable '\<[A-Z][[:alnum:]_@]*' +syn match erlangAnonymousVariable '\<_[[:alnum:]_@]*' syn match erlangMacro '??\=[[:alnum:]_@]\+' syn match erlangMacro '\%(-define(\)\@<=[[:alnum:]_@]\+' syn region erlangQuotedMacro start=/??\=\s*'/ end=/'/ contains=erlangQuotedAtomModifier @@ -94,7 +98,7 @@ syn match erlangBitType '\%(\/\%(\s\|\n\|%.*\n\)*\)\@<=\%(integer\|float\|binary " Constants and Directives syn match erlangUnknownAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\l[[:alnum:]_@]*' contains=erlangComment -syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|optional_callbacks\)\>' contains=erlangComment +syn match erlangAttribute '^\s*-\%(\s\|\n\|%.*\n\)*\%(behaviou\=r\|compile\|export\(_type\)\=\|file\|import\|module\|author\|copyright\|doc\|vsn\|on_load\|optional_callbacks\|feature\)\>' contains=erlangComment syn match erlangInclude '^\s*-\%(\s\|\n\|%.*\n\)*\%(include\|include_lib\)\>' contains=erlangComment syn match erlangRecordDef '^\s*-\%(\s\|\n\|%.*\n\)*record\>' contains=erlangComment syn match erlangDefine '^\s*-\%(\s\|\n\|%.*\n\)*\%(define\|undef\)\>' contains=erlangComment @@ -102,8 +106,8 @@ syn match erlangPreCondit '^\s*-\%(\s\|\n\|%.*\n\)*\%(ifdef\|ifndef\|else\|endif syn match erlangType '^\s*-\%(\s\|\n\|%.*\n\)*\%(spec\|type\|opaque\|callback\)\>' contains=erlangComment " Keywords -syn keyword erlangKeyword after begin case catch cond end fun if let of -syn keyword erlangKeyword receive when try +syn keyword erlangKeyword after begin case catch cond end fun if let of else +syn keyword erlangKeyword receive when try maybe " Build-in-functions (BIFs) syn keyword erlangBIF abs alive apply atom_to_binary atom_to_list contained @@ -176,6 +180,7 @@ hi def link erlangModifier Special " Operators, separators hi def link erlangOperator Operator +hi def link erlangEqualsBinary ErrorMsg hi def link erlangRightArrow Operator if s:old_style hi def link erlangBracket Normal @@ -193,6 +198,7 @@ hi def link erlangLocalFuncRef Normal hi def link erlangGlobalFuncCall Function hi def link erlangGlobalFuncRef Function hi def link erlangVariable Normal +hi def link erlangAnonymousVariable erlangVariable hi def link erlangMacro Normal hi def link erlangQuotedMacro Normal hi def link erlangRecord Normal @@ -205,6 +211,7 @@ hi def link erlangLocalFuncRef Normal hi def link erlangGlobalFuncCall Normal hi def link erlangGlobalFuncRef Normal hi def link erlangVariable Identifier +hi def link erlangAnonymousVariable erlangVariable hi def link erlangMacro Macro hi def link erlangQuotedMacro Macro hi def link erlangRecord Structure @@ -261,5 +268,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 et - -endif diff --git a/syntax/eruby.vim b/syntax/eruby.vim index 4de67ab58..b78c8fc61 100644 --- a/syntax/eruby.vim +++ b/syntax/eruby.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ruby', 'syntax/eruby.vim') + finish +endif " Vim syntax file " Language: eRuby @@ -6,7 +8,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns -if &syntax !~# '\' || get(b:, 'current_syntax') =~# '\' +if exists("b:current_syntax") finish endif @@ -20,8 +22,6 @@ endif if &filetype =~ '^eruby\.' let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') -elseif &filetype =~ '^.*\.eruby\>' - let b:eruby_subtype = matchstr(&filetype,'^.\{-\}\ze\.eruby\>') elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') @@ -55,10 +55,10 @@ if !b:eruby_nest_level let b:eruby_nest_level = 1 endif -if get(b:, 'eruby_subtype', '') !~# '^\%(eruby\)\=$' && &syntax =~# '^eruby\>' +if exists("b:eruby_subtype") && b:eruby_subtype != '' && b:eruby_subtype !=? 'eruby' exe "runtime! syntax/".b:eruby_subtype.".vim" + unlet! b:current_syntax endif -unlet! b:current_syntax syn include @rubyTop syntax/ruby.vim syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment @@ -73,12 +73,10 @@ exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:erub hi def link erubyDelimiter PreProc hi def link erubyComment Comment -let b:current_syntax = matchstr(&syntax, '^.*\') +let b:current_syntax = 'eruby' if main_syntax == 'eruby' unlet main_syntax endif " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/syntax/esmtprc.vim b/syntax/esmtprc.vim new file mode 100644 index 000000000..243bec9c1 --- /dev/null +++ b/syntax/esmtprc.vim @@ -0,0 +1,35 @@ +if polyglot#init#is_disabled(expand(':p'), 'esmtprc', 'syntax/esmtprc.vim') + finish +endif + +" Vim syntax file +" Language: Esmtp setup file (based on esmtp 0.5.0) +" Maintainer: Kornel Kielczewski +" Last Change: 16 Feb 2005 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +"All options +syntax keyword esmtprcOptions hostname username password starttls certificate_passphrase preconnect identity mda + +"All keywords +syntax keyword esmtprcIdentifier default enabled disabled required + +"We're trying to be smarer than /."*@.*/ :) +syntax match esmtprcAddress /[a-z0-9_.-]*[a-z0-9]\+@[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+/ +syntax match esmtprcFulladd /[a-z0-9_.-]*[a-z0-9]\+\.[a-z]\+:[0-9]\+/ + +"String.. +syntax region esmtprcString start=/"/ end=/"/ + + +highlight link esmtprcOptions Label +highlight link esmtprcString String +highlight link esmtprcAddress Type +highlight link esmtprcIdentifier Identifier +highlight link esmtprcFulladd Include + +let b:current_syntax = "esmtprc" diff --git a/syntax/esqlc.vim b/syntax/esqlc.vim new file mode 100644 index 000000000..f16a11d44 --- /dev/null +++ b/syntax/esqlc.vim @@ -0,0 +1,62 @@ +if polyglot#init#is_disabled(expand(':p'), 'esqlc', 'syntax/esqlc.vim') + finish +endif + +" Vim syntax file +" Language: ESQL-C +" Maintainer: Jonathan A. George +" Last Change: 2001 May 09 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +runtime! syntax/cpp.vim + +" ESQL-C extentions + +syntax keyword esqlcPreProc EXEC SQL INCLUDE + +syntax case ignore + +syntax keyword esqlcPreProc begin end declare section database open execute +syntax keyword esqlcPreProc prepare fetch goto continue found sqlerror work + +syntax keyword esqlcKeyword access add as asc by check cluster column +syntax keyword esqlcKeyword compress connect current decimal +syntax keyword esqlcKeyword desc exclusive file from group +syntax keyword esqlcKeyword having identified immediate increment index +syntax keyword esqlcKeyword initial into is level maxextents mode modify +syntax keyword esqlcKeyword nocompress nowait of offline on online start +syntax keyword esqlcKeyword successful synonym table then to trigger uid +syntax keyword esqlcKeyword unique user validate values view whenever +syntax keyword esqlcKeyword where with option order pctfree privileges +syntax keyword esqlcKeyword public resource row rowlabel rownum rows +syntax keyword esqlcKeyword session share size smallint + +syntax keyword esqlcOperator not and or +syntax keyword esqlcOperator in any some all between exists +syntax keyword esqlcOperator like escape +syntax keyword esqlcOperator intersect minus +syntax keyword esqlcOperator prior distinct +syntax keyword esqlcOperator sysdate + +syntax keyword esqlcStatement alter analyze audit comment commit create +syntax keyword esqlcStatement delete drop explain grant insert lock noaudit +syntax keyword esqlcStatement rename revoke rollback savepoint select set +syntax keyword esqlcStatement truncate update + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link esqlcOperator Operator +hi def link esqlcStatement Statement +hi def link esqlcKeyword esqlcSpecial +hi def link esqlcSpecial Special +hi def link esqlcPreProc PreProc + + +let b:current_syntax = "esqlc" + diff --git a/syntax/esterel.vim b/syntax/esterel.vim new file mode 100644 index 000000000..da76335ba --- /dev/null +++ b/syntax/esterel.vim @@ -0,0 +1,82 @@ +if polyglot#init#is_disabled(expand(':p'), 'esterel', 'syntax/esterel.vim') + finish +endif + +" Vim syntax file +" Language: ESTEREL +" Maintainer: Maurizio Tranchero - +" Credits: Luca Necchi , Nikos Andrikos +" First Release: Tue May 17 23:49:39 CEST 2005 +" Last Change: Tue May 6 13:29:56 CEST 2008 +" Version: 0.8 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" case is significant +syn case ignore +" Esterel Regions +syn region esterelModule start=/module/ end=/end module/ contains=ALLBUT,esterelModule +syn region esterelLoop start=/loop/ end=/end loop/ contains=ALLBUT,esterelModule +syn region esterelAbort start=/abort/ end=/when/ contains=ALLBUT,esterelModule +syn region esterelAbort start=/weak abort/ end=/when/ contains=ALLBUT,esterelModule +syn region esterelEvery start=/every/ end=/end every/ contains=ALLBUT,esterelModule +syn region esterelIf start=/if/ end=/end if/ contains=ALLBUT,esterelModule +syn region esterelConcurrent transparent start=/\[/ end=/\]/ contains=ALLBUT,esterelModule +syn region esterelIfThen start=/if/ end=/then/ oneline +" Esterel Keywords +syn keyword esterelIO input output inputoutput constant +syn keyword esterelBoolean and or not xor xnor nor nand +syn keyword esterelExpressions mod pre +syn keyword esterelStatement nothing halt +syn keyword esterelStatement module signal sensor end +syn keyword esterelStatement every do loop abort weak +syn keyword esterelStatement emit present await +syn keyword esterelStatement pause when immediate +syn keyword esterelStatement if then else case +syn keyword esterelStatement var in run suspend +syn keyword esterelStatement repeat times combine with +syn keyword esterelStatement assert sustain +" check what it is the following +syn keyword esterelStatement relation +syn keyword esterelFunctions function procedure task +syn keyword esterelSysCall call trap exit exec +" Esterel Types +syn keyword esterelType integer float bolean +" Esterel Comment +syn match esterelComment "%.*$" +" Operators and special characters +syn match esterelSpecial ":" +syn match esterelSpecial "<=" +syn match esterelSpecial ">=" +syn match esterelSpecial "+" +syn match esterelSpecial "-" +syn match esterelSpecial "=" +syn match esterelSpecial ";" +syn match esterelSpecial "/" +syn match esterelSpecial "?" +syn match esterelOperator "\[" +syn match esterelOperator "\]" +syn match esterelOperator ":=" +syn match esterelOperator "||" +syn match esterelStatement "\<\(if\|else\)\>" +syn match esterelNone "\$" +syn match esterelNone "\\s" + +" Class Linking + +hi def link esterelStatement Statement +hi def link esterelType Type +hi def link esterelComment Comment +hi def link esterelBoolean Number +hi def link esterelExpressions Number +hi def link esterelIO String +hi def link esterelOperator Type +hi def link esterelSysCall Type +hi def link esterelFunctions Type +hi def link esterelSpecial Special + + +let b:current_syntax = "esterel" diff --git a/syntax/eterm.vim b/syntax/eterm.vim new file mode 100644 index 000000000..426a45ecd --- /dev/null +++ b/syntax/eterm.vim @@ -0,0 +1,433 @@ +if polyglot#init#is_disabled(expand(':p'), 'eterm', 'syntax/eterm.vim') + finish +endif + +" Vim syntax file +" Language: eterm(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-21 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword etermTodo contained TODO FIXME XXX NOTE + +syn region etermComment display oneline start='^#' end='$' + \ contains=etermTodo,@Spell + +syn match etermMagic display '^$' + +syn match etermNumber contained display '\<\(\d\+\|0x\x\{1,2}\)\>' + +syn region etermString contained display oneline start=+"+ + \ skip=+\\"+ end=+"+ + +syn keyword etermBoolean contained on off true false yes no + +syn keyword etermPreProc contained appname exec get put random version + \ include preproc + +syn keyword etermFunctions contained copy exit kill nop paste save + \ scroll search spawn + +syn cluster etermGeneral contains=etermComment,etermFunction, + \ etermPreProc + +syn keyword etermKeyMod contained ctrl shift lock mod1 mod2 mod3 mod4 + \ mod5 alt meta anymod +syn keyword etermKeyMod contained button1 button2 button3 button4 + \ button5 + +syn keyword etermColorOptions contained video nextgroup=etermVideoOptions + \ skipwhite + +syn keyword etermVideoType contained normal reverse + +syn keyword etermColorOptions contained foreground background cursor + \ cursor_text pointer + \ nextgroup=etermColorType skipwhite + +syn keyword etermColorType contained bd ul +syn match etermColorType contained display '\<\%(\d\|1[0-5]\)' + +syn keyword etermColorOptions contained color + \ nextgroup=etermColorNumber skipwhite + +syn keyword etermColorNumber contained bd ul nextgroup=etermColorSpec + \ skipwhite +syn match etermColorNumber contained display '\<\%(\d\|1[0-5]\)' + \ nextgroup=etermColorSpec skipwhite + +syn match etermColorSpec contained display '\S\+' + +syn region etermColorContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+color\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermColorOptions + +syn keyword etermAttrOptions contained geometry nextgroup=etermGeometry + \ skipwhite + +syn match etermGeometry contained display '\d\+x\d++\d\++\d\+' + +syn keyword etermAttrOptions contained scrollbar_type + \ nextgroup=etermScrollbarType skipwhite + +syn keyword etermScrollbarType contained motif xterm next + +syn keyword etermAttrOptions contained font nextgroup=etermFontType + \ skipwhite + +syn keyword etermFontType contained bold nextgroup=etermFont skipwhite +syn match etermFontType contained display '[0-5]' nextgroup=etermFont + \ skipwhite + +syn match etermFont contained display '\S\+' + +syn keyword etermFontType contained default nextgroup=etermNumber + \ skipwhite + +syn keyword etermFontType contained proportional nextgroup=etermBoolean + \ skipwhite + +syn keyword etermFontType contained fx nextgroup=etermString skipwhite + +syn keyword etermAttrOptions contained title name iconname + \ nextgroup=etermString skipwhite + +syn keyword etermAttrOptions contained scrollbar_width desktop + \ nextgroup=etermNumber skipwhite + +syn region etermAttrContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+attributes\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermAttrOptions + +syn keyword etermIClassOptions contained icon path nextgroup=etermString + \ skipwhite +syn keyword etermIClassOptions contained cache nextgroup=etermNumber + \ skipwhite +syn keyword etermIClassOptions contained anim nextgroup=etermNumber + \ skipwhite + +syn region etermIClassContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+imageclasses\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermImageContext, + \ etermIClassOptions + +syn keyword etermImageOptions contained type nextgroup=etermImageType + \ skipwhite + +syn keyword etermImageTypes contained background trough anchor up_arrow + \ left_arrow right_arrow menu menuitem + \ submenu button buttonbar down_arrow + +syn keyword etermImageOptions contained mode nextgroup=etermImageModes + \ skipwhite + +syn keyword etermImageModes contained image trans viewport auto solid + \ nextgroup=etermImageModesAllow skipwhite +syn keyword etermImageModesAllow contained allow nextgroup=etermImageModesR + \ skipwhite +syn keyword etermImageModesR contained image trans viewport auto solid + +syn keyword etermImageOptions contained state nextgroup=etermImageState + \ skipwhite + +syn keyword etermImageState contained normal selected clicked disabled + +syn keyword etermImageOptions contained color nextgroup=etermImageColorFG + \ skipwhite + +syn keyword etermImageColorFG contained '\S\+' nextgroup=etermImageColorBG + \ skipwhite + +syn keyword etermImageColorBG contained '\S\+' + +syn keyword etermImageOptions contained file nextgroup=etermString + \ skipwhite + +syn keyword etermImageOptions contained geom nextgroup=etermImageGeom + \ skipwhite + +syn match etermImageGeom contained display + \ '\s\+\%(\d\+x\d\++\d\++\d\+\)\=:\%(\%(tie\|scale\|hscale\|vscale\|propscale\)d\=\)\=' + +syn keyword etermImageOptions contained cmod colormod + \ nextgroup=etermImageCmod skipwhite + +syn keyword etermImageCmod contained image red green blue + \ nextgroup=etermImageBrightness skipwhite + +syn match etermImageBrightness contained display '\<\(\d\+\|0x\x\{1,2}\)\>' + \ nextgroup=etermImageContrast skipwhite + +syn match etermImageContrast contained display '\<\(\d\+\|0x\x\{1,2}\)\>' + \ nextgroup=etermImageGamma skipwhite + +syn match etermImageGamma contained display '\<\(\d\+\|0x\x\{1,2}\)\>' + \ nextgroup=etermImageGamma skipwhite + +syn region etermImageOptions contained display oneline + \ matchgroup=etermImageOptions + \ start='border\|bevel\%(\s\+\%(up\|down\)\)\|padding' + \ end='$' contains=etermNumber + +syn region etermImageContext contained fold transparent + \ matchgroup=etermContext + \ start='^\s*begin\s\+image\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermImageOptions + +syn keyword etermMenuItemOptions contained action + \ nextgroup=etermMenuItemAction skipwhite + +syn keyword etermMenuItemAction contained string echo submenu script + \ nextgroup=etermString skipwhite + +syn keyword etermMenuItemAction contained separator + +syn keyword etermMenuItemOptions contained text rtext nextgroup=etermString + \ skipwhite + +syn region etermMenuItemContext contained fold transparent + \ matchgroup=etermContext + \ start='^\s*begin\s\+menuitem\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermMenuItemOptions + +syn keyword etermMenuOptions contained title nextgroup=etermString + \ skipwhite + +syn keyword etermMenuOptions contained font_name nextgroup=etermFont + \ skipwhite + +syn match etermMenuOptions contained display '\\|-' + +syn region etermMenuContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+menu\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermMenuOptions, + \ etermMenuItemContext + +syn keyword etermBind contained bind nextgroup=etermBindMods + \ skipwhite + +syn keyword etermBindMods contained ctrl shift lock mod1 mod2 mod3 mod4 + \ mod5 alt meta anymod + \ nextgroup=etermBindMods skipwhite + +syn keyword etermBindTo contained to nextgroup=etermBindType + \ skipwhite + +syn keyword etermBindType contained string echo menu script + \ nextgroup=etermBindParam skipwhite + +syn match etermBindParam contained display '\S\+' + +syn region etermActionsContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+actions\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermActionsOptions + +syn keyword etermButtonOptions contained font nextgroup=etermFont skipwhite +syn keyword etermButtonOptions contained visible nextgroup=etermBoolean + \ skipwhite +syn keyword etermButtonOptions contained dock nextgroup=etermDockOption + \ skipwhite + +syn keyword etermDockOption contained top bottom no + +syn keyword etermButton contained button nextgroup=etermButtonText + \ skipwhite + +syn region etermButtonText contained display oneline start=+"+ + \ skip=+\\"+ end=+"+ + \ nextgroup=etermButtonIcon skipwhite + +syn keyword etermButtonIcon contained icon nextgroup=etermButtonIconFile + \ skipwhite + +syn keyword etermButtonIconFile contained '\S\+' nextgroup=etermButtonAction + \ skipwhite + +syn keyword etermButtonAction contained action nextgroup=etermBindType + \ skipwhite + +syn region etermButtonContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+button_bar\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermButtonOptions + +syn keyword etermMultiOptions contained encoding nextgroup=etermEncoding + \ skipwhite + +syn keyword etermEncoding eucj sjis euckr big5 gb +syn match etermEncoding display 'iso-10646' + +syn keyword etermMultiOptions contained font nextgroup=etermFontType + \ skipwhite + +syn region etermMultiContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+multichar\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermMultiOptions + +syn keyword etermXimOptions contained input_method + \ nextgroup=etermInputMethod skipwhite + +syn match etermInputMethod contained display '\S+' + +syn keyword etermXimOptions contained preedit_type + \ nextgroup=etermPreeditType skipwhite + +syn keyword etermPreeditType contained OverTheSpot OffTheSpot Root + +syn region etermXimContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+xim\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermXimOptions + +syn keyword etermTogOptions contained map_alert visual_bell login_shell + \ scrollbar utmp_logging meta8 iconic + \ no_input home_on_output home_on_input + \ scrollbar_floating scrollbar_right + \ scrollbar_popup borderless double_buffer + \ no_cursor pause xterm_select select_line + \ select_trailing_spaces report_as_keysyms + \ itrans immotile_trans buttonbar + \ resize_gravity nextgroup=etermBoolean + \ skipwhite + +syn region etermTogContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+toggles\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermTogOptions + +syn keyword etermKeyboardOptions contained smallfont_key bigfont_key keysym + \ nextgroup=etermKeysym skipwhite + +syn keyword etermKeysym contained '\S\+' nextgroup=etermString + \ skipwhite + +syn keyword etermKeyboardOptions contained meta_mod alt_mod numlock_mod + \ nextgroup=etermNumber skipwhite + +syn keyword etermKeyboardOptions contained greek app_keypad app_cursor + \ nextgroup=etermBoolean skipwhite + +syn region etermKeyboardContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+keyboard\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermKeyboardOptions + +syn keyword etermMiscOptions contained print_pipe cut_chars finished_title + \ finished_text term_name exec + \ nextgroup=etermString skipwhite + +syn keyword etermMiscOptions contained save_lines min_anchor_size + \ border_width line_space + +syn region etermMiscContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+misc\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermMiscOptions + +syn keyword etermEScreenOptions contained url nextgroup=etermURL skipwhite + +syn match etermURL contained display + \ '\<\%(screen\|twin\)://\%([^@:/]\+\%(@[^:/]\+\%(:[^/]\+\)\=\)\=\)\=/\S\+' + +syn keyword etermEScreenOptions contained firewall + +syn keyword etermEScreenOptions contained delay nextgroup=etermNumber + \ skipwhite + +syn keyword etermEScreenOptions contained bbar_font nextgroup=etermFont + \ skipwhite + +syn keyword etermEScreenOptions contained bbar_dock nextgroup=etermDockOption + \ skipwhite + +syn region etermEScreenContext fold transparent matchgroup=etermContext + \ start='^\s*begin\s\+escreen\>' + \ end='^\s*end\>' + \ contains=@etermGeneral,etermEScreenOptions + +if exists("eterm_minlines") + let b:eterm_minlines = eterm_minlines +else + let b:eterm_minlines = 50 +endif +exec "syn sync minlines=" . b:eterm_minlines + +hi def link etermTodo Todo +hi def link etermComment Comment +hi def link etermMagic PreProc +hi def link etermNumber Number +hi def link etermString String +hi def link etermBoolean Boolean +hi def link etermPreProc PreProc +hi def link etermFunctions Function +hi def link etermKeyMod Constant +hi def link etermOption Keyword +hi def link etermColorOptions etermOption +hi def link etermColor String +hi def link etermVideoType Type +hi def link etermColorType Type +hi def link etermColorNumber Number +hi def link etermColorSpec etermColor +hi def link etermContext Keyword +hi def link etermAttrOptions etermOption +hi def link etermGeometry String +hi def link etermScrollbarType Type +hi def link etermFontType Type +hi def link etermIClassOptions etermOption +hi def link etermImageOptions etermOption +hi def link etermImageTypes Type +hi def link etermImageModes Type +hi def link etermImageModesAllow Keyword +hi def link etermImageModesR Type +hi def link etermImageState Keyword +hi def link etermImageColorFG etermColor +hi def link etermImageColorBG etermColor +hi def link etermImageGeom String +hi def link etermImageCmod etermOption +hi def link etermImageBrightness Number +hi def link etermImageContrast Number +hi def link etermImageGamma Number +hi def link etermMenuItemOptions etermOption +hi def link etermMenuItemAction Keyword +hi def link etermMenuOptions etermOption +hi def link etermBind Keyword +hi def link etermBindMods Identifier +hi def link etermBindTo Keyword +hi def link etermBindType Type +hi def link etermBindParam String +hi def link etermButtonOptions etermOption +hi def link etermDockOption etermOption +hi def link etermButtonText String +hi def link etermButtonIcon String +hi def link etermButtonIconFile String +hi def link etermButtonAction Keyword +hi def link etermMultiOptions etermOption +hi def link etermEncoding Identifier +hi def link etermXimOptions etermOption +hi def link etermInputMethod Identifier +hi def link etermPreeditType Type +hi def link etermTogOptions etermOption +hi def link etermKeyboardOptions etermOption +hi def link etermKeysym Constant +hi def link etermMiscOptions etermOption +hi def link etermEScreenOptions etermOption +hi def link etermURL Identifier + +let b:current_syntax = "eterm" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/exim.vim b/syntax/exim.vim new file mode 100644 index 000000000..ab58e1a1c --- /dev/null +++ b/syntax/exim.vim @@ -0,0 +1,109 @@ +if polyglot#init#is_disabled(expand(':p'), 'exim', 'syntax/exim.vim') + finish +endif + +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Exim configuration file exim.conf +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2002-10-15 +" URL: http://trific.ath.cx/Ftp/vim/syntax/exim.vim + +" Setup +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" Base constructs +syn match eximComment "^\s*#.*$" contains=eximFixme +syn match eximComment "\s#.*$" contains=eximFixme +syn keyword eximFixme FIXME TODO XXX NOT contained +syn keyword eximConstant true false yes no +syn match eximNumber "\<\d\+[KM]\?\>" +syn match eximNumber "\<0[xX]\x\+\>" +syn match eximNumber "\<\d\+\(\.\d\{,3}\)\?\>" +syn match eximTime "\<\(\d\+[wdhms]\)\+\>" +syn match eximSpecialChar "\\[\\nrt]\|\\\o\{1,3}\|\\x\x\{1,2}" +syn region eximMacroDefinition matchgroup=eximMacroName start="^[A-Z]\i*\s*=" end="$" skip="\\\s*$" transparent + +syn match eximDriverName "\<\(aliasfile\|appendfile\|autoreply\|domainlist\|forwardfile\|ipliteral\|iplookup\|lmtp\|localuser\|lookuphost\|pipe\|queryprogram\|smartuser\|smtp\)\>" +syn match eximTransport "^\s*\i\+:" + +" Options +syn keyword eximEnd end +syn keyword eximKeyword accept_8bitmime accept_timeout admin_groups allow_mx_to_ip always_bcc auth_always_advertise auth_hosts auth_over_tls_hosts auto_thaw bi_command check_log_inodes check_log_space check_spool_inodes check_spool_space collapse_source_routes daemon_smtp_port daemon_smtp_service debug_level delay_warning delay_warning_condition deliver_load_max deliver_queue_load_max delivery_date_remove dns_again_means_nonexist dns_check_names dns_check_names_pattern dns_retrans dns_ipv4_lookup dns_retry envelope_to_remove errmsg_text errmsg_file errors_address errors_copy errors_reply_to exim_group exim_path exim_user extract_addresses_remove_arguments finduser_retries forbid_domain_literals freeze_tell_mailmaster gecos_name gecos_pattern headers_check_syntax headers_checks_fail headers_sender_verify headers_sender_verify_errmsg helo_accept_junk_hosts helo_strict_syntax helo_verify hold_domains host_accept_relay host_auth_accept_relay host_lookup host_reject host_reject_recipients hosts_treat_as_local ignore_errmsg_errors ignore_errmsg_errors_after ignore_fromline_hosts ignore_fromline_local keep_malformed kill_ip_options ldap_default_servers local_domains local_domains_include_host local_domains_include_host_literals local_from_check local_from_prefix local_from_suffix local_interfaces localhost_number locally_caseless log_all_parents log_arguments log_file_path log_incoming_port log_ip_options log_level log_queue_run_level log_received_recipients log_received_sender log_refused_recipients log_rewrites log_sender_on_delivery log_smtp_confirmation log_smtp_connections log_smtp_syntax_errors log_subject lookup_open_max max_username_length message_body_visible message_filter message_filter_directory_transport message_filter_directory2_transport message_filter_file_transport message_filter_group message_filter_pipe_transport message_filter_reply_transport message_filter_user message_id_header_text message_size_limit message_size_limit_count_recipients move_frozen_messages mysql_servers never_users nobody_group nobody_user percent_hack_domains perl_at_start perl_startup pgsql_servers pid_file_path preserve_message_logs primary_hostname print_topbitchars prod_requires_admin prohibition_message qualify_domain qualify_recipient queue_list_requires_admin queue_only queue_only_file queue_only_load queue_remote_domains queue_run_in_order queue_run_max queue_smtp_domains rbl_domains rbl_hosts rbl_log_headers rbl_log_rcpt_count rbl_reject_recipients rbl_warn_header received_header_text received_headers_max receiver_try_verify receiver_unqualified_hosts receiver_verify receiver_verify_addresses receiver_verify_hosts receiver_verify_senders recipients_max recipients_max_reject recipients_reject_except recipients_reject_except_senders refuse_ip_options relay_domains relay_domains_include_local_mx relay_match_host_or_sender remote_max_parallel remote_sort retry_data_expire retry_interval_max return_path_remove return_size_limit rfc1413_hosts rfc1413_query_timeout security sender_address_relay sender_address_relay_hosts sender_reject sender_reject_recipients sender_try_verify sender_unqualified_hosts sender_verify sender_verify_batch sender_verify_callback_domains sender_verify_callback_timeout sender_verify_fixup sender_verify_hosts sender_verify_hosts_callback sender_verify_max_retry_rate sender_verify_reject smtp_accept_keepalive smtp_accept_max smtp_accept_max_per_host smtp_accept_queue smtp_accept_queue_per_connection smtp_accept_reserve smtp_banner smtp_check_spool_space smtp_connect_backlog smtp_etrn_command smtp_etrn_hosts smtp_etrn_serialize smtp_expn_hosts smtp_load_reserve smtp_receive_timeout smtp_reserve_hosts smtp_verify split_spool_directory spool_directory strip_excess_angle_brackets strip_trailing_dot syslog_timestamp timeout_frozen_after timestamps_utc timezone tls_advertise_hosts tls_certificate tls_dhparam tls_host_accept_relay tls_hosts tls_log_cipher tls_log_peerdn tls_privatekey tls_verify_certificates tls_verify_ciphers tls_verify_hosts trusted_groups trusted_users unknown_login unknown_username untrusted_set_sender uucp_from_pattern uucp_from_sender warnmsg_file +syn keyword eximKeyword no_accept_8bitmime no_allow_mx_to_ip no_always_bcc no_auth_always_advertise no_collapse_source_routes no_delivery_date_remove no_dns_check_names no_envelope_to_remove no_extract_addresses_remove_arguments no_forbid_domain_literals no_freeze_tell_mailmaster no_headers_check_syntax no_headers_checks_fail no_headers_sender_verify no_headers_sender_verify_errmsg no_helo_strict_syntax no_ignore_errmsg_errors no_ignore_fromline_local no_kill_ip_options no_local_domains_include_host no_local_domains_include_host_literals no_local_from_check no_locally_caseless no_log_all_parents no_log_arguments no_log_incoming_port no_log_ip_options no_log_received_recipients no_log_received_sender no_log_refused_recipients no_log_rewrites no_log_sender_on_delivery no_log_smtp_confirmation no_log_smtp_connections no_log_smtp_syntax_errors no_log_subject no_message_size_limit_count_recipients no_move_frozen_messages no_preserve_message_logs no_print_topbitchars no_prod_requires_admin no_queue_list_requires_admin no_queue_only no_rbl_log_headers no_rbl_log_rcpt_count no_rbl_reject_recipients no_receiver_try_verify no_receiver_verify no_recipients_max_reject no_refuse_ip_options no_relay_domains_include_local_mx no_relay_match_host_or_sender no_return_path_remove no_sender_try_verify no_sender_verify no_sender_verify_batch no_sender_verify_fixup no_sender_verify_reject no_smtp_accept_keepalive no_smtp_check_spool_space no_smtp_etrn_serialize no_smtp_verify no_split_spool_directory no_strip_excess_angle_brackets no_strip_trailing_dot no_syslog_timestamp no_timestamps_utc no_tls_log_cipher no_tls_log_peerdn no_untrusted_set_sender +syn keyword eximKeyword not_accept_8bitmime not_allow_mx_to_ip not_always_bcc not_auth_always_advertise not_collapse_source_routes not_delivery_date_remove not_dns_check_names not_envelope_to_remove not_extract_addresses_remove_arguments not_forbid_domain_literals not_freeze_tell_mailmaster not_headers_check_syntax not_headers_checks_fail not_headers_sender_verify not_headers_sender_verify_errmsg not_helo_strict_syntax not_ignore_errmsg_errors not_ignore_fromline_local not_kill_ip_options not_local_domains_include_host not_local_domains_include_host_literals not_local_from_check not_locally_caseless not_log_all_parents not_log_arguments not_log_incoming_port not_log_ip_options not_log_received_recipients not_log_received_sender not_log_refused_recipients not_log_rewrites not_log_sender_on_delivery not_log_smtp_confirmation not_log_smtp_connections not_log_smtp_syntax_errors not_log_subject not_message_size_limit_count_recipients not_move_frozen_messages not_preserve_message_logs not_print_topbitchars not_prod_requires_admin not_queue_list_requires_admin not_queue_only not_rbl_log_headers not_rbl_log_rcpt_count not_rbl_reject_recipients not_receiver_try_verify not_receiver_verify not_recipients_max_reject not_refuse_ip_options not_relay_domains_include_local_mx not_relay_match_host_or_sender not_return_path_remove not_sender_try_verify not_sender_verify not_sender_verify_batch not_sender_verify_fixup not_sender_verify_reject not_smtp_accept_keepalive not_smtp_check_spool_space not_smtp_etrn_serialize not_smtp_verify not_split_spool_directory not_strip_excess_angle_brackets not_strip_trailing_dot not_syslog_timestamp not_timestamps_utc not_tls_log_cipher not_tls_log_peerdn not_untrusted_set_sender +syn keyword eximKeyword body_only debug_print delivery_date_add driver envelope_to_add headers_add headers_only headers_remove headers_rewrite message_size_limit return_path return_path_add shadow_condition shadow_transport transport_filter +syn keyword eximKeyword no_body_only no_delivery_date_add no_envelope_to_add no_headers_only no_return_path_add +syn keyword eximKeyword not_body_only not_delivery_date_add not_envelope_to_add not_headers_only not_return_path_add +syn keyword eximKeyword allow_fifo allow_symlink batch batch_max bsmtp bsmtp_helo check_group check_owner check_string create_directory create_file current_directory directory directory_mode escape_string file file_format file_must_exist from_hack group lock_fcntl_timeout lock_interval lock_retries lockfile_mode lockfile_timeout maildir_format maildir_retries maildir_tag mailstore_format mailstore_prefix mailstore_suffix mbx_format mode mode_fail_narrower notify_comsat prefix quota quota_filecount quota_is_inclusive quota_size_regex quota_warn_message quota_warn_threshold require_lockfile retry_use_local_part suffix use_crlf use_fcntl_lock use_lockfile use_mbx_lock user +syn keyword eximKeyword no_allow_fifo no_allow_symlink no_bsmtp_helo no_check_group no_check_owner no_create_directory no_file_must_exist no_from_hack no_maildir_format no_mailstore_format no_mbx_format no_mode_fail_narrower no_notify_comsat no_quota_is_inclusive no_require_lockfile no_retry_use_local_part no_use_crlf no_use_fcntl_lock no_use_lockfile no_use_mbx_lock +syn keyword eximKeyword not_allow_fifo not_allow_symlink not_bsmtp_helo not_check_group not_check_owner not_create_directory not_file_must_exist not_from_hack not_maildir_format not_mailstore_format not_mbx_format not_mode_fail_narrower not_notify_comsat not_quota_is_inclusive not_require_lockfile not_retry_use_local_part not_use_crlf not_use_fcntl_lock not_use_lockfile not_use_mbx_lock +syn keyword eximKeyword bcc cc file file_expand file_optional from group headers initgroups log mode once once_file_size once_repeat reply_to return_message subject text to user +syn keyword eximKeyword no_file_expand no_file_optional no_initgroups no_return_message +syn keyword eximKeyword not_file_expand not_file_optional not_initgroups not_return_message +syn keyword eximKeyword batch batch_max command group initgroups retry_use_local_part timeout user +syn keyword eximKeyword no_initgroups +syn keyword eximKeyword not_initgroups +syn keyword eximKeyword allow_commands batch batch_max bsmtp bsmtp_helo check_string command current_directory environment escape_string freeze_exec_fail from_hack group home_directory ignore_status initgroups log_defer_output log_fail_output log_output max_output path pipe_as_creator prefix restrict_to_path retry_use_local_part return_fail_output return_output suffix temp_errors timeout umask use_crlf use_shell user +syn keyword eximKeyword no_bsmtp_helo no_freeze_exec_fail no_from_hack no_ignore_status no_log_defer_output no_log_fail_output no_log_output no_pipe_as_creator no_restrict_to_path no_return_fail_output no_return_output no_use_crlf no_use_shell +syn keyword eximKeyword not_bsmtp_helo not_freeze_exec_fail not_from_hack not_ignore_status not_log_defer_output not_log_fail_output not_log_output not_pipe_as_creator not_restrict_to_path not_return_fail_output not_return_output not_use_crlf not_use_shell +syn keyword eximKeyword allow_localhost authenticate_hosts batch_max command_timeout connect_timeout data_timeout delay_after_cutoff dns_qualify_single dns_search_parents fallback_hosts final_timeout gethostbyname helo_data hosts hosts_avoid_tls hosts_require_tls hosts_override hosts_max_try hosts_randomize interface keepalive max_rcpt multi_domain mx_domains port protocol retry_include_ip_address serialize_hosts service size_addition tls_certificate tls_privatekey tls_verify_certificates tls_verify_ciphers +syn keyword eximKeyword no_allow_localhost no_delay_after_cutoff no_dns_qualify_single no_dns_search_parents no_gethostbyname no_hosts_override no_hosts_randomize no_keepalive no_multi_domain no_retry_include_ip_address +syn keyword eximKeyword not_allow_localhost not_delay_after_cutoff not_dns_qualify_single not_dns_search_parents not_gethostbyname not_hosts_override not_hosts_randomize not_keepalive not_multi_domain not_retry_include_ip_address +syn keyword eximKeyword condition debug_print domains driver errors_to fail_verify fail_verify_recipient fail_verify_sender fallback_hosts group headers_add headers_remove initgroups local_parts more require_files senders transport unseen user verify verify_only verify_recipient verify_sender +syn keyword eximKeyword no_fail_verify no_fail_verify_recipient no_fail_verify_sender no_initgroups no_more no_unseen no_verify no_verify_only no_verify_recipient no_verify_sender +syn keyword eximKeyword not_fail_verify not_fail_verify_recipient not_fail_verify_sender not_initgroups not_more not_unseen not_verify not_verify_only not_verify_recipient not_verify_sender +syn keyword eximKeyword current_directory expn home_directory new_director prefix prefix_optional suffix suffix_optional +syn keyword eximKeyword no_expn no_prefix_optional no_suffix_optional +syn keyword eximKeyword not_expn not_prefix_optional not_suffix_optional +syn keyword eximKeyword check_ancestor directory_transport directory2_transport file_transport forbid_file forbid_include forbid_pipe freeze_missing_include hide_child_in_errmsg modemask one_time owners owngroups pipe_transport qualify_preserve_domain rewrite skip_syntax_errors syntax_errors_text syntax_errors_to +syn keyword eximKeyword no_check_ancestor no_forbid_file no_forbid_include no_forbid_pipe no_freeze_missing_include no_hide_child_in_errmsg no_one_time no_qualify_preserve_domain no_rewrite no_skip_syntax_errors +syn keyword eximKeyword not_check_ancestor not_forbid_file not_forbid_include not_forbid_pipe not_freeze_missing_include not_hide_child_in_errmsg not_one_time not_qualify_preserve_domain not_rewrite not_skip_syntax_errors +syn keyword eximKeyword expand file forbid_special include_domain optional queries query search_type +syn keyword eximKeyword no_expand no_forbid_special no_include_domain no_optional +syn keyword eximKeyword not_expand not_forbid_special not_include_domain not_optional +syn keyword eximKeyword allow_system_actions check_group check_local_user data file file_directory filter forbid_filter_existstest forbid_filter_logwrite forbid_filter_lookup forbid_filter_perl forbid_filter_reply ignore_eacces ignore_enotdir match_directory reply_transport seteuid +syn keyword eximKeyword no_allow_system_actions no_check_local_user no_forbid_filter_reply no_forbid_filter_existstest no_forbid_filter_logwrite no_forbid_filter_lookup no_forbid_filter_perl no_forbid_filter_reply no_ignore_eacces no_ignore_enotdir no_seteuid +syn keyword eximKeyword not_allow_system_actions not_check_local_user not_forbid_filter_reply not_forbid_filter_existstest not_forbid_filter_logwrite not_forbid_filter_lookup not_forbid_filter_perl not_forbid_filter_reply not_ignore_eacces not_ignore_enotdir not_seteuid +syn keyword eximKeyword match_directory +syn keyword eximKeyword directory_transport directory2_transport file_transport forbid_file forbid_pipe hide_child_in_errmsg new_address panic_expansion_fail pipe_transport qualify_preserve_domain rewrite +syn keyword eximKeyword no_forbid_file no_forbid_pipe no_hide_child_in_errmsg no_panic_expansion_fail no_qualify_preserve_domain no_rewrite +syn keyword eximKeyword not_forbid_file not_forbid_pipe not_hide_child_in_errmsg not_panic_expansion_fail not_qualify_preserve_domain not_rewrite +syn keyword eximKeyword ignore_target_hosts pass_on_timeout self translate_ip_address +syn keyword eximKeyword no_pass_on_timeout +syn keyword eximKeyword not_pass_on_timeout +syn keyword eximKeyword host_find_failed hosts_randomize modemask owners owngroups qualify_single route_file route_list route_queries route_query search_parents search_type +syn keyword eximKeyword no_hosts_randomize no_qualify_single no_search_parents +syn keyword eximKeyword not_hosts_randomize not_qualify_single not_search_parents +syn keyword eximKeyword hosts optional port protocol query reroute response_pattern service timeout +syn keyword eximKeyword no_optional +syn keyword eximKeyword not_optional +syn keyword eximKeyword check_secondary_mx gethostbyname mx_domains qualify_single rewrite_headers search_parents widen_domains +syn keyword eximKeyword no_check_secondary_mx no_gethostbyname no_qualify_single no_search_parents +syn keyword eximKeyword not_check_secondary_mx not_gethostbyname not_qualify_single not_search_parents +syn keyword eximKeyword command command_group command_user current_directory timeout +syn keyword eximKeyword driver public_name server_set_id server_mail_auth_condition +syn keyword eximKeyword server_prompts server_condition client_send +syn keyword eximKeyword server_secret client_name client_secret + +" Define the default highlighting + +hi def link eximComment Comment +hi def link eximFixme Todo +hi def link eximEnd Keyword +hi def link eximNumber Number +hi def link eximDriverName Constant +hi def link eximConstant Constant +hi def link eximTime Constant +hi def link eximKeyword Type +hi def link eximSpecialChar Special +hi def link eximMacroName Preproc +hi def link eximTransport Identifier + + +let b:current_syntax = "exim" diff --git a/syntax/expect.vim b/syntax/expect.vim new file mode 100644 index 000000000..495ab6bc7 --- /dev/null +++ b/syntax/expect.vim @@ -0,0 +1,107 @@ +if polyglot#init#is_disabled(expand(':p'), 'expect', 'syntax/expect.vim') + finish +endif + +" Vim syntax file +" Language: Expect +" Maintainer: Ralph Jennings +" Last Change: 2012 Jun 01 +" (Dominique Pelle added @Spell) + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Reserved Expect variable prefixes. +syn match expectVariables "\$exp[a-zA-Z0-9_]*\|\$inter[a-zA-Z0-9_]*" +syn match expectVariables "\$spawn[a-zA-Z0-9_]*\|\$timeout[a-zA-Z0-9_]*" + +" Normal Expect variables. +syn match expectVariables "\$env([^)]*)" +syn match expectVariables "\$any_spawn_id\|\$argc\|\$argv\d*" +syn match expectVariables "\$user_spawn_id\|\$spawn_id\|\$timeout" + +" Expect variable arrays. +syn match expectVariables "\$\(expect\|interact\)_out([^)]*)" contains=expectOutVar + +" User defined variables. +syn match expectVariables "\$[a-zA-Z_][a-zA-Z0-9_]*" + +" Reserved Expect command prefixes. +syn match expectCommand "exp_[a-zA-Z0-9_]*" + +" Normal Expect commands. +syn keyword expectStatement close debug disconnect +syn keyword expectStatement exit exp_continue exp_internal exp_open +syn keyword expectStatement exp_pid exp_version +syn keyword expectStatement fork inter_return interpreter +syn keyword expectStatement log_file log_user match_max overlay +syn keyword expectStatement parity remove_nulls return +syn keyword expectStatement send send_error send_log send_user +syn keyword expectStatement sleep spawn strace stty system +syn keyword expectStatement timestamp trace trap wait + +" Tcl commands recognized and used by Expect. +syn keyword expectCommand proc +syn keyword expectConditional if else +syn keyword expectRepeat while for foreach + +" Expect commands with special arguments. +syn keyword expectStatement expect expect_after expect_background nextgroup=expectExpectOpts +syn keyword expectStatement expect_before expect_user interact nextgroup=expectExpectOpts + +syn match expectSpecial contained "\\." + +" Options for "expect", "expect_after", "expect_background", +" "expect_before", "expect_user", and "interact". +syn keyword expectExpectOpts default eof full_buffer null return timeout + +syn keyword expectOutVar contained spawn_id seconds seconds_total +syn keyword expectOutVar contained string start end buffer + +" Numbers (Tcl style). +syn case ignore + syn match expectNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" + "floating point number, with dot, optional exponent + syn match expectNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" + "floating point number, starting with a dot, optional exponent + syn match expectNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" + "floating point number, without dot, with exponent + syn match expectNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" + "hex number + syn match expectNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" + "syn match expectIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +syn region expectString start=+"+ end=+"+ contains=@Spell,expectVariables,expectSpecial + +" Are these really comments in Expect? (I never use it, so I'm just guessing). +syn keyword expectTodo contained TODO +syn match expectComment "#.*$" contains=@Spell,expectTodo +syn match expectSharpBang "\%^#!.*" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link expectSharpBang PreProc +hi def link expectVariables Special +hi def link expectCommand Function +hi def link expectStatement Statement +hi def link expectConditional Conditional +hi def link expectRepeat Repeat +hi def link expectExpectOpts Keyword +hi def link expectOutVar Special +hi def link expectSpecial Special +hi def link expectNumber Number + +hi def link expectString String + +hi def link expectComment Comment +hi def link expectTodo Todo +"hi def link expectIdentifier Identifier + + +let b:current_syntax = "expect" + +" vim: ts=8 diff --git a/syntax/exports.vim b/syntax/exports.vim new file mode 100644 index 000000000..c2c13a3fb --- /dev/null +++ b/syntax/exports.vim @@ -0,0 +1,62 @@ +if polyglot#init#is_disabled(expand(':p'), 'exports', 'syntax/exports.vim') + finish +endif + +" Vim syntax file +" Language: exports +" Maintainer: Charles E. Campbell +" Last Change: Aug 31, 2016 +" Version: 8 +" Notes: This file includes both SysV and BSD 'isms +" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_EXPORTS + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Options: -word +syn keyword exportsKeyOptions contained alldirs nohide ro wsync +syn keyword exportsKeyOptions contained kerb o rw +syn match exportsOptError contained "[a-z]\+" + +" Settings: word= +syn keyword exportsKeySettings contained access anon root rw +syn match exportsSetError contained "[a-z]\+" + +" OptSet: -word= +syn keyword exportsKeyOptSet contained mapall maproot mask network +syn match exportsOptSetError contained "[a-z]\+" + +" options and settings +syn match exportsSettings "[a-z]\+=" contains=exportsKeySettings,exportsSetError +syn match exportsOptions "-[a-z]\+" contains=exportsKeyOptions,exportsOptError +syn match exportsOptSet "-[a-z]\+=" contains=exportsKeyOptSet,exportsOptSetError + +" Separators +syn match exportsSeparator "[,:]" + +" comments +syn match exportsComment "^\s*#.*$" contains=@Spell + +" Define the default highlighting. +if !exists("skip_exports_syntax_inits") + + hi def link exportsKeyOptSet exportsKeySettings + hi def link exportsOptSet exportsSettings + + hi def link exportsComment Comment + hi def link exportsKeyOptions Type + hi def link exportsKeySettings Keyword + hi def link exportsOptions Constant + hi def link exportsSeparator Constant + hi def link exportsSettings Constant + + hi def link exportsOptError Error + hi def link exportsOptSetError Error + hi def link exportsSetError Error + +endif + +let b:current_syntax = "exports" +" vim: ts=10 diff --git a/syntax/falcon.vim b/syntax/falcon.vim new file mode 100644 index 000000000..697a51a58 --- /dev/null +++ b/syntax/falcon.vim @@ -0,0 +1,201 @@ +if polyglot#init#is_disabled(expand(':p'), 'falcon', 'syntax/falcon.vim') + finish +endif + +" Vim syntax file +" Language: Falcon +" Maintainer: Steven Oliver +" Website: http://github.com/steveno/vim-files/blob/master/syntax/falcon.vim +" Credits: Thanks the ruby.vim authors, I borrowed a lot! +" Thanks to the lisp authors for the rainbow code! +" ------------------------------------------------------------------------------- + +" When wanted, highlight the trailing whitespace. +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match falconSpaceError "\s\+$" + endif + + if !exists("c_no_tab_space_error") + syn match falconSpaceError " \+\t"me=e-1 + endif +endif + +" Symbols +syn match falconSymbol "\(;\|,\|\.\)" +syn match falconSymbolOther "\(#\|@\)" display + +" Operators +syn match falconOperator "\(+\|-\|\*\|/\|=\|<\|>\|\*\*\|!=\|\~=\)" +syn match falconOperator "\(<=\|>=\|=>\|\.\.\|<<\|>>\|\"\)" + +" Clusters +syn region falconSymbol start="[]})\"':]\@\|::\)\@=\%(\s*(\)\@!" + +" Comments +syn match falconCommentSkip contained "^\s*\*\($\|\s\+\)" +syn region falconComment start="/\*" end="\*/" contains=@falconCommentGroup,falconSpaceError,falconTodo +syn region falconCommentL start="//" end="$" keepend contains=@falconCommentGroup,falconSpaceError,falconTodo +syn match falconSharpBang "\%^#!.*" display +syn sync ccomment falconComment + +" Numbers +syn match falconNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal +syn match falconNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=falconIntLiteral,falconFloatLiteral,falconHexadecimal,falconOctal +syn match falconHexadecimal contained "\<0x\x\+\>" +syn match falconOctal contained "\<0\o\+\>" +syn match falconIntLiteral contained "[+-]\" +syn match falconFloatLiteral contained "[+-]\=\d\+\.\d*" +syn match falconFloatLiteral contained "[+-]\=\d*\.\d*" + +" Includes +syn keyword falconInclude load import + +" Expression Substitution and Backslash Notation +syn match falconStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match falconStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display +syn region falconSymbol start="[]})\"':]\@" skip="\\\\\|\\>" fold contains=falconDelimEscape +syn region falconString matchgroup=falconStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape +syn region falconString matchgroup=falconStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=falconDelimEscape +syn region falconSymbol matchgroup=falconSymbolDelimiter start="%[s](" end=")" skip="\\\\\|\\)" fold contains=falconDelimEscape + +" Generalized Double Quoted String and Array of Strings and Shell Command Output +syn region falconString matchgroup=falconStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=falconStringEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=falconStringEscape,falconDelimEscape fold +syn region falconString matchgroup=falconStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=falconStringEscape,falconDelimEscape fold + +syn region falconString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@:p'), 'fan', 'syntax/fan.vim') + finish +endif + +" Vim syntax file +" Language: Fantom +" Maintainer: Kamil Toman +" Last Change: 2010 May 27 +" Based on Java syntax file by Claudio Fleiner + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" keyword definitions +syn keyword fanExternal using native +syn keyword fanError goto void serializable volatile +syn keyword fanConditional if else switch +syn keyword fanRepeat do while for foreach each +syn keyword fanBoolean true false +syn keyword fanConstant null +syn keyword fanTypedef this super +syn keyword fanOperator new is isnot as +syn keyword fanLongOperator plus minus mult div mod get set slice lshift rshift and or xor inverse negate increment decrement equals compare +syn keyword fanType Void Bool Int Float Decimal Str Duration Uri Type Range List Map Obj +syn keyword fanStatement return +syn keyword fanStorageClass static const final +syn keyword fanSlot virtual override once +syn keyword fanField readonly +syn keyword fanExceptions throw try catch finally +syn keyword fanAssert assert +syn keyword fanTypedef class enum mixin +syn match fanFacet "@[_a-zA-Z][_a-zA-Z0-9_]*\>" +syn keyword fanBranch break continue +syn keyword fanScopeDecl public internal protected private abstract + +if exists("fan_space_errors") + if !exists("fan_no_trail_space_error") + syn match fanSpaceError "\s\+$" + endif + if !exists("fan_no_tab_space_error") + syn match fanSpaceError " \+\t"me=e-1 + endif +endif + +syn region fanLabelRegion transparent matchgroup=fanLabel start="\" matchgroup=NONE end=":" contains=fanNumber,fanCharacter +syn keyword fanLabel default +syn keyword fanLabel case + +" The following cluster contains all fan groups except the contained ones +syn cluster fanTop add=fanExternal,fanError,fanConditional,fanRepeat,fanBoolean,fanConstant,fanTypedef,fanOperator,fanLongOperator,fanType,fanType,fanStatement,fanStorageClass,fanSlot,fanField,fanExceptions,fanAssert,fanClassDecl,fanTypedef,fanFacet,fanBranch,fanScopeDecl,fanLabelRegion,fanLabel + +" Comments +syn keyword fanTodo contained TODO FIXME XXX +syn region fanComment start="/\*" end="\*/" contains=@fanCommentSpecial,fanTodo,fanComment,@Spell +syn match fanCommentStar contained "^\s*\*[^/]"me=e-1 +syn match fanCommentStar contained "^\s*\*$" +syn match fanLineComment "//.*" contains=@fanCommentSpecial2,fanTodo,@Spell +syn match fanDocComment "\*\*.*" contains=@fanCommentSpecial2,fanTodo,@Spell +hi def link fanCommentString fanString +hi def link fanComment2String fanString +hi def link fanCommentCharacter fanCharacter + +syn cluster fanTop add=fanComment,fanLineComment,fanDocComment + +" match the special comment /**/ +syn match fanComment "/\*\*/" + +" Strings and constants +syn match fanSpecialError contained "\\." +syn match fanSpecialCharError contained "[^']" +syn match fanSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\|\$\)" +syn match fanStringSubst contained "\$[A-Za-z][A-Za-z_.]*" +syn match fanStringSubst contained "\${[^}]*}" +syn region fanString start=+"+ end=+"+ contains=fanSpecialChar,fanSpecialError,fanStringSubst,@Spell +syn region fanTripleString start=+"""+ end=+"""+ contains=fanSpecialChar,fanSpecialError,fanStringSubst,@Spell +syn region fanDSL start=+<|+ end=+|>+ +syn match fanUri "`[^`]*`" +syn match fanCharacter "'[^']*'" contains=fanSpecialChar,fanSpecialCharError +syn match fanCharacter "'\\''" contains=fanSpecialChar +syn match fanCharacter "'[^\\]'" +syn match fanNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match fanNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match fanNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match fanNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +syn cluster fanTop add=fanString,fanCharacter,fanNumber,fanSpecial,fanStringError + +" The default highlighting. +hi def link fanBranch Conditional +hi def link fanLabel Label +hi def link fanUserLabel Label +hi def link fanConditional Conditional +hi def link fanRepeat Repeat +hi def link fanExceptions Exception +hi def link fanAssert Statement +hi def link fanStorageClass StorageClass +hi def link fanSlot StorageClass +hi def link fanField StorageClass +hi def link fanScopeDecl StorageClass +hi def link fanBoolean Boolean +hi def link fanSpecial Special +hi def link fanSpecialError Error +hi def link fanSpecialCharError Error +hi def link fanTripleString String +hi def link fanString String +hi def link fanDSL String +hi def link fanCharacter String +hi def link fanStringSubst Identifier +hi def link fanUri SpecialChar +hi def link fanSpecialChar SpecialChar +hi def link fanNumber Number +hi def link fanError Error +hi def link fanStringError Error +hi def link fanStatement Statement +hi def link fanOperator Operator +hi def link fanLongOperator Operator +hi def link fanComment Comment +hi def link fanDocComment Comment +hi def link fanLineComment Comment +hi def link fanConstant Constant +hi def link fanTypedef Typedef +hi def link fanTodo Todo +hi def link fanFacet PreProc + +hi def link fanCommentTitle SpecialComment +hi def link fanCommentStar SpecialComment +hi def link fanType Identifier +hi def link fanExternal Include + +hi def link fanSpaceError Error + +let b:current_syntax = "fan" + +" vim: ts=8 diff --git a/syntax/fbs.vim b/syntax/fbs.vim index 704732a47..384f19e46 100644 --- a/syntax/fbs.vim +++ b/syntax/fbs.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'flatbuffers') == -1 +if polyglot#init#is_disabled(expand(':p'), 'flatbuffers', 'syntax/fbs.vim') + finish +endif if exists("b:current_syntax") finish @@ -52,5 +54,3 @@ if version >= 508 || !exists("did_proto_syn_inits") endif let b:current_syntax = "fbs" - -endif diff --git a/syntax/fennel.vim b/syntax/fennel.vim index ec6f80848..e9cbe746e 100644 --- a/syntax/fennel.vim +++ b/syntax/fennel.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fennel', 'syntax/fennel.vim') + finish +endif " Vim syntax file " Language: FENNEL @@ -283,5 +285,3 @@ let b:current_syntax = "fennel" let &cpo = s:cpo_sav unlet! s:cpo_sav - -endif diff --git a/syntax/ferm.vim b/syntax/ferm.vim index 8bb0aaf34..d6cec2691 100644 --- a/syntax/ferm.vim +++ b/syntax/ferm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ferm') == -1 +if polyglot#init#is_disabled(expand(':p'), 'ferm', 'syntax/ferm.vim') + finish +endif "============================================================================ " ferm syntax highlighter @@ -203,5 +205,3 @@ endif " Autoconfigure vim indentation settings " vim:ts=4:sw=4:sts=4:fdm=marker:iskeyword+=- - -endif diff --git a/syntax/fetchmail.vim b/syntax/fetchmail.vim new file mode 100644 index 000000000..741ef4694 --- /dev/null +++ b/syntax/fetchmail.vim @@ -0,0 +1,79 @@ +if polyglot#init#is_disabled(expand(':p'), 'fetchmail', 'syntax/fetchmail.vim') + finish +endif + +" Vim syntax file +" Language: fetchmail(1) RC File +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2006-04-19 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword fetchmailTodo contained FIXME TODO XXX NOTE + +syn region fetchmailComment start='#' end='$' contains=fetchmailTodo,@Spell + +syn match fetchmailNumber display '\<\d\+\>' + +syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=fetchmailStringEsc +syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+ + \ contains=fetchmailStringEsc + +syn match fetchmailStringEsc contained '\\\([ntb]\|0\d*\|x\x\+\)' + +syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword + \ start='\' + \ end='\' + \ contains=ALLBUT,fetchmailOptions,fetchmailSet + +syn keyword fetchmailServerOpts contained via proto[col] local[domains] port + \ auth[enticate] timeout envelope qvirtual aka + \ interface monitor plugin plugout dns + \ checkalias uidl interval netsec principal + \ esmtpname esmtppassword + \ sslcertck sslcertpath sslfingerprint +syn match fetchmailServerOpts contained '\:p'), 'fgl', 'syntax/fgl.vim') + finish +endif + +" Vim syntax file +" Language: Informix 4GL +" Maintainer: Rafal M. Sulejman +" Update: 26 Sep 2002 +" Changes: +" - Dynamic 4GL/FourJs/4GL 7.30 pseudo comment directives (Julian Bridle) +" - Conditionally allow case insensitive keywords (Julian Bridle) +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if exists("fgl_ignore_case") + syntax case ignore +else + syntax case match +endif +syn keyword fglKeyword ABORT ABS ABSOLUTE ACCEPT ACCESS ACOS ADD AFTER ALL +syn keyword fglKeyword ALLOCATE ALTER AND ANSI ANY APPEND ARG_VAL ARRAY ARR_COUNT +syn keyword fglKeyword ARR_CURR AS ASC ASCENDING ASCII ASIN AT ATAN ATAN2 ATTACH +syn keyword fglKeyword ATTRIBUTE ATTRIBUTES AUDIT AUTHORIZATION AUTO AUTONEXT AVERAGE AVG +syn keyword fglKeyword BEFORE BEGIN BETWEEN BLACK BLINK BLUE BOLD BORDER BOTH BOTTOM +syn keyword fglKeyword BREAK BUFFERED BY BYTE +syn keyword fglKeyword CALL CASCADE CASE CHAR CHARACTER CHARACTER_LENGTH CHAR_LENGTH +syn keyword fglKeyword CHECK CLASS_ORIGIN CLEAR CLIPPED CLOSE CLUSTER COLOR +syn keyword fglKeyword COLUMN COLUMNS COMMAND COMMENT COMMENTS COMMIT COMMITTED +syn keyword fglKeyword COMPOSITES COMPRESS CONCURRENT CONNECT CONNECTION +syn keyword fglKeyword CONNECTION_ALIAS CONSTRAINED CONSTRAINT CONSTRAINTS CONSTRUCT +syn keyword fglKeyword CONTINUE CONTROL COS COUNT CREATE CURRENT CURSOR CYAN +syn keyword fglKeyword DATA DATABASE DATASKIP DATE DATETIME DAY DBA DBINFO DBSERVERNAME +syn keyword fglKeyword DEALLOCATE DEBUG DEC DECIMAL DECLARE DEFAULT DEFAULTS DEFER +syn keyword fglKeyword DEFERRED DEFINE DELETE DELIMITER DELIMITERS DESC DESCENDING +syn keyword fglKeyword DESCRIBE DESCRIPTOR DETACH DIAGNOSTICS DIM DIRTY DISABLED +syn keyword fglKeyword DISCONNECT DISPLAY DISTINCT DISTRIBUTIONS DO DORMANT DOUBLE +syn keyword fglKeyword DOWN DOWNSHIFT DROP +syn keyword fglKeyword EACH ELIF ELSE ENABLED END ENTRY ERROR ERRORLOG ERR_GET +syn keyword fglKeyword ERR_PRINT ERR_QUIT ESC ESCAPE EVERY EXCEPTION EXCLUSIVE +syn keyword fglKeyword EXEC EXECUTE EXISTS EXIT EXP EXPLAIN EXPRESSION EXTEND EXTENT +syn keyword fglKeyword EXTERN EXTERNAL +syn keyword fglKeyword F1 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F2 F20 F21 F22 F23 +syn keyword fglKeyword F24 F25 F26 F27 F28 F29 F3 F30 F31 F32 F33 F34 F35 F36 F37 F38 +syn keyword fglKeyword F39 F4 F40 F41 F42 F43 F44 F45 F46 F47 F48 F49 F5 F50 F51 F52 +syn keyword fglKeyword F53 F54 F55 F56 F57 F58 F59 F6 F60 F61 F62 F63 F64 F7 F8 F9 +syn keyword fglKeyword FALSE FETCH FGL_GETENV FGL_KEYVAL FGL_LASTKEY FIELD FIELD_TOUCHED +syn keyword fglKeyword FILE FILLFACTOR FILTERING FINISH FIRST FLOAT FLUSH FOR +syn keyword fglKeyword FOREACH FOREIGN FORM FORMAT FORMONLY FORTRAN FOUND FRACTION +syn keyword fglKeyword FRAGMENT FREE FROM FUNCTION GET_FLDBUF GLOBAL GLOBALS GO GOTO +syn keyword fglKeyword GRANT GREEN GROUP HAVING HEADER HELP HEX HIDE HIGH HOLD HOUR +syn keyword fglKeyword IDATA IF ILENGTH IMMEDIATE IN INCLUDE INDEX INDEXES INDICATOR +syn keyword fglKeyword INFIELD INIT INITIALIZE INPUT INSERT INSTRUCTIONS INT INTEGER +syn keyword fglKeyword INTERRUPT INTERVAL INTO INT_FLAG INVISIBLE IS ISAM ISOLATION +syn keyword fglKeyword ITYPE +syn keyword fglKeyword KEY LABEL +syn keyword fglKeyword LANGUAGE LAST LEADING LEFT LENGTH LET LIKE LINE +syn keyword fglKeyword LINENO LINES LOAD LOCATE LOCK LOG LOG10 LOGN LONG LOW +syn keyword fglKeyword MAGENTA MAIN MARGIN MATCHES MAX MDY MEDIUM MEMORY MENU MESSAGE +syn keyword fglKeyword MESSAGE_LENGTH MESSAGE_TEXT MIN MINUTE MOD MODE MODIFY MODULE +syn keyword fglKeyword MONEY MONTH MORE +syn keyword fglKeyword NAME NCHAR NEED NEW NEXT NEXTPAGE NO NOCR NOENTRY NONE NORMAL +syn keyword fglKeyword NOT NOTFOUND NULL NULLABLE NUMBER NUMERIC NUM_ARGS NVARCHAR +syn keyword fglKeyword OCTET_LENGTH OF OFF OLD ON ONLY OPEN OPTIMIZATION OPTION OPTIONS +syn keyword fglKeyword OR ORDER OTHERWISE OUTER OUTPUT +syn keyword fglKeyword PAGE PAGENO PAUSE PDQPRIORITY PERCENT PICTURE PIPE POW PRECISION +syn keyword fglKeyword PREPARE PREVIOUS PREVPAGE PRIMARY PRINT PRINTER PRIOR PRIVATE +syn keyword fglKeyword PRIVILEGES PROCEDURE PROGRAM PROMPT PUBLIC PUT +syn keyword fglKeyword QUIT QUIT_FLAG +syn keyword fglKeyword RAISE RANGE READ READONLY REAL RECORD RECOVER RED REFERENCES +syn keyword fglKeyword REFERENCING REGISTER RELATIVE REMAINDER REMOVE RENAME REOPTIMIZATION +syn keyword fglKeyword REPEATABLE REPORT REQUIRED RESOLUTION RESOURCE RESTRICT +syn keyword fglKeyword RESUME RETURN RETURNED_SQLSTATE RETURNING REVERSE REVOKE RIGHT +syn keyword fglKeyword ROBIN ROLE ROLLBACK ROLLFORWARD ROOT ROUND ROW ROWID ROWIDS +syn keyword fglKeyword ROWS ROW_COUNT RUN +syn keyword fglKeyword SCALE SCHEMA SCREEN SCROLL SCR_LINE SECOND SECTION SELECT +syn keyword fglKeyword SERIAL SERIALIZABLE SERVER_NAME SESSION SET SET_COUNT SHARE +syn keyword fglKeyword SHORT SHOW SITENAME SIZE SIZEOF SKIP SLEEP SMALLFLOAT SMALLINT +syn keyword fglKeyword SOME SPACE SPACES SQL SQLAWARN SQLCA SQLCODE SQLERRD SQLERRM +syn keyword fglKeyword SQLERROR SQLERRP SQLSTATE SQLWARNING SQRT STABILITY START +syn keyword fglKeyword STARTLOG STATIC STATISTICS STATUS STDEV STEP STOP STRING STRUCT +syn keyword fglKeyword SUBCLASS_ORIGIN SUM SWITCH SYNONYM SYSTEM +syn keyword fglKeyword SysBlobs SysChecks SysColAuth SysColDepend SysColumns +syn keyword fglKeyword SysConstraints SysDefaults SysDepend SysDistrib SysFragAuth +syn keyword fglKeyword SysFragments SysIndexes SysObjState SysOpClstr SysProcAuth +syn keyword fglKeyword SysProcBody SysProcPlan SysProcedures SysReferences SysRoleAuth +syn keyword fglKeyword SysSynTable SysSynonyms SysTabAuth SysTables SysTrigBody +syn keyword fglKeyword SysTriggers SysUsers SysViews SysViolations +syn keyword fglKeyword TAB TABLE TABLES TAN TEMP TEXT THEN THROUGH THRU TIME TO +syn keyword fglKeyword TODAY TOP TOTAL TRACE TRAILER TRAILING TRANSACTION TRIGGER +syn keyword fglKeyword TRIGGERS TRIM TRUE TRUNC TYPE TYPEDEF +syn keyword fglKeyword UNCOMMITTED UNCONSTRAINED UNDERLINE UNION UNIQUE UNITS UNLOAD +syn keyword fglKeyword UNLOCK UNSIGNED UP UPDATE UPSHIFT USER USING +syn keyword fglKeyword VALIDATE VALUE VALUES VARCHAR VARIABLES VARIANCE VARYING +syn keyword fglKeyword VERIFY VIEW VIOLATIONS +syn keyword fglKeyword WAIT WAITING WARNING WEEKDAY WHEN WHENEVER WHERE WHILE WHITE +syn keyword fglKeyword WINDOW WITH WITHOUT WORDWRAP WORK WRAP WRITE +syn keyword fglKeyword YEAR YELLOW +syn keyword fglKeyword ZEROFILL + +" Strings and characters: +syn region fglString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region fglString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Numbers: +syn match fglNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Comments: +syn region fglComment start="{" end="}" +syn match fglComment "--.*" +syn match fglComment "#.*" + +" Not a comment even though it looks like one (Dynamic 4GL/FourJs directive) +syn match fglSpecial "--#" +syn match fglSpecial "--@" + +syn sync ccomment fglComment + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link fglComment Comment +"hi def link fglKeyword fglSpecial +hi def link fglKeyword fglStatement +hi def link fglNumber Number +hi def link fglOperator fglStatement +hi def link fglSpecial Special +hi def link fglStatement Statement +hi def link fglString String +hi def link fglType Type + + +let b:current_syntax = "fgl" + +" vim: ts=8 diff --git a/syntax/fish.vim b/syntax/fish.vim index fef75cfb0..21bcbb943 100644 --- a/syntax/fish.vim +++ b/syntax/fish.vim @@ -1,10 +1,13 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fish', 'syntax/fish.vim') + finish +endif if exists('b:current_syntax') finish endif syntax case match +syntax iskeyword @,48-57,-,_,.,/ syntax keyword fishKeyword begin function end syntax keyword fishConditional if else switch @@ -14,8 +17,8 @@ syntax keyword fishLabel case syntax match fishComment /#.*/ syntax match fishSpecial /\\$/ syntax match fishIdentifier /\$[[:alnum:]_]\+/ -syntax region fishString start=/'/ skip=/\\'/ end=/'/ -syntax region fishString start=/"/ skip=/\\"/ end=/"/ contains=fishIdentifier +syntax region fishString start=/'/ skip=/\v(\\{2})|(\\)'/ end=/'/ +syntax region fishString start=/"/ skip=/\v(\\{2})|(\\)"/ end=/"/ contains=fishIdentifier syntax match fishCharacter /\v\\[abefnrtv *?~%#(){}\[\]<>&;"']|\\[xX][0-9a-f]{1,2}|\\o[0-7]{1,2}|\\u[0-9a-f]{1,4}|\\U[0-9a-f]{1,8}|\\c[a-z]/ syntax match fishStatement /\v;\s*\zs\k+>/ syntax match fishCommandSub /\v\(\s*\zs\k+>/ @@ -37,5 +40,3 @@ highlight default link fishStatement Statement highlight default link fishCommandSub fishStatement let b:current_syntax = 'fish' - -endif diff --git a/syntax/flow.vim b/syntax/flow.vim index ad4ba0a82..ed17b9d53 100644 --- a/syntax/flow.vim +++ b/syntax/flow.vim @@ -1,6 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 +if polyglot#init#is_disabled(expand(':p'), 'javascript', 'syntax/flow.vim') + finish +endif runtime syntax/javascript.vim runtime extras/flow.vim - -endif diff --git a/syntax/focexec.vim b/syntax/focexec.vim new file mode 100644 index 000000000..d7a18403b --- /dev/null +++ b/syntax/focexec.vim @@ -0,0 +1,92 @@ +if polyglot#init#is_disabled(expand(':p'), 'focexec', 'syntax/focexec.vim') + finish +endif + +" Vim syntax file +" Language: Focus Executable +" Maintainer: Rob Brady +" Last Change: $Date: 2004/06/13 15:38:04 $ +" URL: http://www.datatone.com/~robb/vim/syntax/focexec.vim +" $Revision: 1.1 $ + +" this is a very simple syntax file - I will be improving it +" one thing is how to do computes +" I don't like that &vars and FUSE() functions highlight to the same color +" I think some of these things should get different highlights - +" should MODIFY commands look different than TABLE? + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" A bunch of useful keywords +syn keyword focexecTable TABLE SUM BY ACROSS END PRINT HOLD LIST NOPRINT +syn keyword focexecTable SUBFOOT SUBHEAD HEADING FOOTING PAGE-BREAK AS +syn keyword focexecTable WHERE AND OR NOSPLIT FORMAT +syn keyword focexecModify MODIFY DATA ON FIXFORM PROMPT MATCH COMPUTE +syn keyword focexecModify GOTO CASE ENDCASE TYPE NOMATCH REJECT INCLUDE +syn keyword focexecModify CONTINUE FROM +syn keyword focexecNormal CHECK FILE CREATE EX SET IF FILEDEF DEFINE +syn keyword focexecNormal REBUILD IF RECORDLIMIT FI EQ JOIN +syn keyword focexecJoin IN TO +syn keyword focexecFileDef DISK +syn keyword focexecSet MSG ALL +syn match focexecDash "-RUN" +syn match focexecDash "-PROMPT" +syn match focexecDash "-WINFORM" + +" String and Character constants +syn region focexecString1 start=+"+ end=+"+ +syn region focexecString2 start=+'+ end=+'+ + +"amper variables +syn match focexecAmperVar "&&\=[A-Z_]\+" + +"fuse functions +syn keyword focexecFuse GETUSER GETUSR WHOAMI FEXERR ASIS GETTOK UPCASE LOCASE +syn keyword focexecFuse SUBSTR TODAY TODAYI POSIT HHMMSS BYTVAL EDAUT1 BITVAL +syn keyword focexecFuse BITSON FGETENV FPUTENV HEXBYT SPAWN YM YMI JULDAT +syn keyword focexecFuse JULDATI DOWK DOWKI DOWKLI CHGDAT CHGDATI FTOA ATODBL +syn keyword focexecFuse SOUNDEX RJUST REVERSE PARAG OVRLAY LJUST CTRFLD CTRAN +syn keyword focexecFuse CHKFMT ARGLEN GREGDT GREGDTI DTYMD DTYMDI DTDMY DTDMYI +syn keyword focexecFuse DTYDM DTYDMI DTMYD DTMYDI DTDYM DTDYMI DAYMD DAYMDI +syn keyword focexecFuse DAMDY DAMDYI DADMY DADMYI AYM AYMI AYMD AYMDI CHKPCK +syn keyword focexecFuse IMOD FMOD DMOD PCKOUT EXP BAR SPELLNM SPELLNUM RTCIVP +syn keyword focexecFuse PRDUNI PRDNOR RDNORM RDUNIF LCWORD ITOZ RLPHLD IBIPRO +syn keyword focexecFuse IBIPRW IBIPRC IBIPRU IBIRCP PTHDAT ITOPACK ITONUM +syn keyword focexecFuse DSMEXEC DSMEVAL DSMERRC MSMEXEC MSMEVAL MSMERRC EXTDXI +syn keyword focexecFuse BAANHASH EDAYSI DTOG GTOD HSETPT HPART HTIME HNAME +syn keyword focexecFuse HADD HDIFF HDATE HGETC HCNVRT HDTTM HMIDNT TEMPPATH +syn keyword focexecFuse DATEADD DATEDIF DATEMOV DATECVT EURHLD EURXCH FINDFOC +syn keyword focexecFuse FERRMES CNCTUSR CURRPATH USERPATH SYSTEM ASKYN +syn keyword focexecFuse FUSEMENU POPEDIT POPFILE + +syn match focexecNumber "\<\d\+\>" +syn match focexecNumber "\<\d\+\.\d*\>" + +syn match focexecComment "-\*.*" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link focexecString1 String +hi def link focexecString2 String +hi def link focexecNumber Number +hi def link focexecComment Comment +hi def link focexecTable Keyword +hi def link focexecModify Keyword +hi def link focexecNormal Keyword +hi def link focexecSet Keyword +hi def link focexecDash Keyword +hi def link focexecFileDef Keyword +hi def link focexecJoin Keyword +hi def link focexecAmperVar Identifier +hi def link focexecFuse Function + + +let b:current_syntax = "focexec" + +" vim: ts=8 diff --git a/syntax/forth.vim b/syntax/forth.vim index 0e9350abd..94bb78be6 100644 --- a/syntax/forth.vim +++ b/syntax/forth.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1 +if polyglot#init#is_disabled(expand(':p'), 'forth', 'syntax/forth.vim') + finish +endif " Vim syntax file " Language: FORTH " Current Maintainer: Johan Kotlinski -" Previous Maintainer: Christian V. J. Br�ssow +" Previous Maintainer: Christian V. J. Brüssow " Last Change: 2018-03-29 " Filenames: *.fs,*.ft " URL: https://github.com/jkotlinski/forth.vim @@ -183,7 +185,7 @@ 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*\x\+\>' " *1* --- don'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\+\>' @@ -262,5 +264,3 @@ let b:current_syntax = "forth" let &cpo = s:cpo_save unlet s:cpo_save " vim:ts=8:sw=4:nocindent:smartindent: - -endif diff --git a/syntax/fortran.vim b/syntax/fortran.vim new file mode 100644 index 000000000..209969467 --- /dev/null +++ b/syntax/fortran.vim @@ -0,0 +1,557 @@ +if polyglot#init#is_disabled(expand(':p'), 'fortran', 'syntax/fortran.vim') + finish +endif + +" Vim syntax file +" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) +" Version: (v104) 2021 April 06 +" Maintainer: Ajit J. Thakkar ; +" Usage: For instructions, do :help fortran-syntax from Vim +" Credits: +" Version 0.1 for Fortran 95 was created in April 2000 by Ajit Thakkar from an +" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg. +" Since then, useful suggestions and contributions have been made, in order, by: +" Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, +" Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman, +" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, +" Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida, +" Eisuke Kawashima, Andre Chalella, and Fritz Reese. + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Choose fortran_dialect using the priority: +" source file directive > buffer-local value > global value > file extension +" first try using directive in first three lines of file +let b:fortran_retype = getline(1)." ".getline(2)." ".getline(3) +if b:fortran_retype =~? '\' + let b:fortran_dialect = "F" +elseif b:fortran_retype =~? '\' + let b:fortran_dialect = "f08" +elseif !exists("b:fortran_dialect") + if exists("g:fortran_dialect") && g:fortran_dialect =~# '\' + " try global variable + let b:fortran_dialect = g:fortran_dialect + else " nothing found, so use default + let b:fortran_dialect = "f08" + endif +endif +unlet! b:fortran_retype +" make sure buffer-local value is not invalid +if b:fortran_dialect !~# '\' + let b:fortran_dialect = "f08" +endif + +" Choose between fixed and free source form if this hasn't been done yet +if !exists("b:fortran_fixed_source") + if b:fortran_dialect == "F" + " F requires free source form + let b:fortran_fixed_source = 0 + elseif exists("fortran_free_source") + " User guarantees free source form for all fortran files + let b:fortran_fixed_source = 0 + elseif exists("fortran_fixed_source") + " User guarantees fixed source form for all fortran files + let b:fortran_fixed_source = 1 + elseif expand("%:e") =~? '^f\%(90\|95\|03\|08\)$' + " Free-form file extension defaults as in Intel ifort, gcc(gfortran), NAG, Pathscale, and Cray compilers + let b:fortran_fixed_source = 0 + elseif expand("%:e") =~? '^\%(f\|f77\|for\)$' + " Fixed-form file extension defaults + let b:fortran_fixed_source = 1 + else + " Modern fortran still allows both free and fixed source form. + " Assume fixed source form unless signs of free source form + " are detected in the first five columns of the first s:lmax lines. + " Detection becomes more accurate and time-consuming if more lines + " are checked. Increase the limit below if you keep lots of comments at + " the very top of each file and you have a fast computer. + let s:lmax = 500 + if ( s:lmax > line("$") ) + let s:lmax = line("$") + endif + let b:fortran_fixed_source = 1 + let s:ln=1 + while s:ln <= s:lmax + let s:test = strpart(getline(s:ln),0,5) + if s:test !~ '^[Cc*]' && s:test !~ '^ *[!#]' && s:test =~ '[^ 0-9\t]' && s:test !~ '^[ 0-9]*\t' + let b:fortran_fixed_source = 0 + break + endif + let s:ln = s:ln + 1 + endwhile + unlet! s:lmax s:ln s:test + endif +endif + +syn case ignore + +if b:fortran_fixed_source == 1 + syn match fortranConstructName "^\s\{6,}\zs\a\w*\ze\s*:" +else + syn match fortranConstructName "^\s*\zs\a\w*\ze\s*:" +endif +if exists("fortran_more_precise") + syn match fortranConstructName "\(\" +syn match fortranType "\" +syn match fortranType "\" +syn match fortranType "\" +syn match fortranType "\" +syn match fortranType "\" +syn keyword fortranType intrinsic +syn match fortranType "\" +syn keyword fortranStructure dimension +syn keyword fortranStorageClass parameter save +syn match fortranUnitHeader "\" +syn keyword fortranCall call +syn match fortranUnitHeader "\" +syn match fortranUnitHeader "\" +syn match fortranUnitHeader "\" +syn keyword fortranKeyword return stop +syn keyword fortranConditional else then +syn match fortranConditional "\" +syn match fortranConditionalOb "\" + +syn keyword fortranTodo contained todo fixme + +"Catch errors caused by too many right parentheses +syn region fortranParen transparent start="(" end=")" contains=ALLBUT,fortranParenError,@fortranCommentGroup,cIncluded,@spell +syn match fortranParenError ")" + +syn match fortranOperator "\.\s*n\=eqv\s*\." +syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\." +syn match fortranOperator "\(+\|-\|/\|\*\)" +syn match fortranTypeOb "\" +syn match fortranType "\" + +"Numbers of various sorts +" Integers +syn match fortranNumber display "\<\d\+\(_\a\w*\)\=\>" +" floating point number, without a decimal point +syn match fortranFloatIll display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>" +" floating point number, starting with a decimal point +syn match fortranFloatIll display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number, no digits after decimal +syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number, D or Q exponents +syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number +syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" binary number +syn match fortranBinary display "b["'][01]\+["']" +" octal number +syn match fortranOctal display "o["'][0-7]\+["']" +" hexadecimal number +syn match fortranHex display "z["'][0-9A-F]\+["']" +" Numbers in formats +syn match fortranFormatSpec display "\d*f\d\+\.\d\+" +syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\=" +syn match fortranFormatSpec display "\d*\(d\|q\|g\)\d\+\.\d\+\(e\d+\)\=" +syn match fortranFormatSpec display "\d\+x\>" +" The next match cannot be used because it would pick up identifiers as well +" syn match fortranFormatSpec display "\<\(a\|i\)\d\+" + +" Numbers as labels +syn match fortranLabelNumber display "^\d\{1,5}\s"me=e-1 +syn match fortranLabelNumber display "^ \d\{1,4}\s"ms=s+1,me=e-1 +syn match fortranLabelNumber display "^ \d\{1,3}\s"ms=s+2,me=e-1 +syn match fortranLabelNumber display "^ \d\d\=\s"ms=s+3,me=e-1 +syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1 + +if exists("fortran_more_precise") + " Numbers as targets + syn match fortranTarget display "\(\" + syn match fortranTarget display "\(\" + syn match fortranTarget display "\(\" +endif + +syn keyword fortranTypeR external +syn keyword fortranIOR format +syn match fortranKeywordR "\" +syn match fortranKeyword "^\s*\d\+\s\+continue\>" +syn match fortranKeyword "\" +syn match fortranKeywordDel "\" +syn keyword fortranType none + +syn keyword fortranStructure private public intent optional +syn keyword fortranStructure pointer target allocatable +syn keyword fortranStorageClass in out +syn match fortranStorageClass "\" +syn match fortranUnitHeader "\" +syn keyword fortranUnitHeader use only contains +syn keyword fortranUnitHeader result operator assignment +syn match fortranUnitHeader "\" +syn keyword fortranKeyword allocate deallocate nullify cycle exit +syn match fortranConditional "\" +syn keyword fortranConditional case default where elsewhere + +syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)" +syn match fortranOperator "=>" + +syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber +syn keyword fortranIO pad position action delim readwrite +syn keyword fortranIO eor advance nml + +syn keyword fortranIntrinsic adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack precision present product radix random_number random_seed range repeat reshape rrspacing +syn keyword fortranIntrinsic scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify +syn match fortranIntrinsic "\\(\s*\.\)\@!"me=s+3 +syn match fortranIntrinsic "\\s*[(,]"me=s+4 + +syn match fortranUnitHeader "\" +syn keyword fortranIOR namelist +syn keyword fortranConditionalR while +syn keyword fortranIntrinsicR achar iachar transfer + +syn keyword fortranInclude include +syn keyword fortranStorageClassR sequence + +syn match fortranConditional "\" +syn match fortranType "\" +syn match fortranType "\" +syn match fortranType "\" +if exists("fortran_more_precise") + syn match fortranConstructName "\(\" +endif + +if b:fortran_dialect == "f08" + " F2003 + syn keyword fortranIntrinsic command_argument_count get_command get_command_argument get_environment_variable is_iostat_end is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of + " ISO_C_binding + syn keyword fortranConstant c_null_char c_alert c_backspace c_form_feed c_new_line c_carriage_return c_horizontal_tab c_vertical_tab + syn keyword fortranConstant c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr + syn keyword fortranIntrinsic iso_c_binding c_loc c_funloc c_associated c_f_pointer c_f_procpointer + syn keyword fortranType c_ptr c_funptr + " ISO_Fortran_env + syn keyword fortranConstant iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit + " IEEE_arithmetic + syn keyword fortranIntrinsic ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode + + syn keyword fortranReadWrite flush wait + syn keyword fortranIO decimal round iomsg + syn keyword fortranType asynchronous nopass non_overridable pass protected volatile extends import + syn keyword fortranType non_intrinsic value bind deferred generic final enumerator + syn match fortranType "\" + syn match fortranType "\" + syn match fortranType "\" + syn match fortranType "\" + syn match fortranConditional "\" + syn match fortranUnitHeader "\" + syn match fortranOperator "\([\|]\)" + + " F2008 + syn keyword fortranIntrinsic acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 + syn keyword fortranIntrinsic atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits + syn keyword fortranIntrinsic bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image + syn keyword fortranIO newunit + syn keyword fortranType contiguous + syn keyword fortranRepeat concurrent + +" CUDA fortran + syn match fortranTypeCUDA "\" + syn keyword fortranTypeCUDA host global device value + syn keyword fortranTypeCUDA shared constant pinned texture + syn keyword fortranTypeCUDA dim1 dim2 dim3 dim4 + syn keyword fortranTypeCUDA cudadeviceprop cuda_count_kind cuda_stream_kind + syn keyword fortranTypeCUDA cudaEvent cudaFuncAttributes cudaArrayPtr + syn keyword fortranTypeCUDA cudaSymbol cudaChannelFormatDesc cudaPitchedPtr + syn keyword fortranTypeCUDA cudaExtent cudaMemcpy3DParms + syn keyword fortranTypeCUDA cudaFuncCachePreferNone cudaFuncCachePreferShared + syn keyword fortranTypeCUDA cudaFuncCachePreferL1 cudaLimitStackSize + syn keyword fortranTypeCUDA cudaLimitPrintfSize cudaLimitMallocHeapSize + syn keyword fortranTypeCUDA cudaSharedMemBankSizeDefault cudaSharedMemBankSizeFourByte cudaSharedMemBankSizeEightByte + syn keyword fortranTypeCUDA cudaEventDefault cudaEventBlockingSync cudaEventDisableTiming + syn keyword fortranTypeCUDA cudaMemcpyHostToDevice cudaMemcpyDeviceToHost + syn keyword fortranTypeCUDA cudaMemcpyDeviceToDevice + syn keyword fortranTypeCUDA cudaErrorNotReady cudaSuccess cudaErrorInvalidValue + syn keyword fortranTypeCUDA c_devptr + + syn match fortranStringCUDA "blockidx%[xyz]" + syn match fortranStringCUDA "blockdim%[xyz]" + syn match fortranStringCUDA "griddim%[xyz]" + syn match fortranStringCUDA "threadidx%[xyz]" + + syn keyword fortranIntrinsicCUDA warpsize syncthreads syncthreads_and syncthreads_count syncthreads_or threadfence threadfence_block threadfence_system gpu_time allthreads anythread ballot + syn keyword fortranIntrinsicCUDA atomicadd atomicsub atomicmax atomicmin atomicand atomicor atomicxor atomicexch atomicinc atomicdec atomiccas sizeof __shfl __shfl_up __shfl_down __shfl_xor + syn keyword fortranIntrinsicCUDA cudaChooseDevice cudaDeviceGetCacheConfig cudaDeviceGetLimit cudaDeviceGetSharedMemConfig cudaDeviceReset cudaDeviceSetCacheConfig cudaDeviceSetLimit cudaDeviceSetSharedMemConfig cudaDeviceSynchronize cudaGetDevice cudaGetDeviceCount cudaGetDeviceProperties cudaSetDevice cudaSetDeviceFlags cudaSetValidDevices + syn keyword fortranIntrinsicCUDA cudaThreadExit cudaThreadSynchronize cudaGetLastError cudaGetErrorString cudaPeekAtLastError cudaStreamCreate cudaStreamDestroy cudaStreamQuery cudaStreamSynchronize cudaStreamWaitEvent cudaEventCreate cudaEventCreateWithFlags cudaEventDestroy cudaEventElapsedTime cudaEventQuery cudaEventRecord cudaEventSynchronize + syn keyword fortranIntrinsicCUDA cudaFuncGetAttributes cudaFuncSetCacheConfig cudaFuncSetSharedMemConfig cudaSetDoubleForDevice cudaSetDoubleForHost cudaFree cudaFreeArray cudaFreeHost cudaGetSymbolAddress cudaGetSymbolSize + syn keyword fortranIntrinsicCUDA cudaHostAlloc cudaHostGetDevicePointer cudaHostGetFlags cudaHostRegister cudaHostUnregister cudaMalloc cudaMallocArray cudaMallocHost cudaMallocPitch cudaMalloc3D cudaMalloc3DArray + syn keyword fortranIntrinsicCUDA cudaMemcpy cudaMemcpyArraytoArray cudaMemcpyAsync cudaMemcpyFromArray cudaMemcpyFromSymbol cudaMemcpyFromSymbolAsync cudaMemcpyPeer cudaMemcpyPeerAsync cudaMemcpyToArray cudaMemcpyToSymbol cudaMemcpyToSymbolAsync cudaMemcpy2D cudaMemcpy2DArrayToArray cudaMemcpy2DAsync cudaMemcpy2DFromArray cudaMemcpy2DToArray cudaMemcpy3D cudaMemcpy3DAsync + syn keyword fortranIntrinsicCUDA cudaMemGetInfo cudaMemset cudaMemset2D cudaMemset3D cudaDeviceCanAccessPeer cudaDeviceDisablePeerAccess cudaDeviceEnablePeerAccess cudaPointerGetAttributes cudaDriverGetVersion cudaRuntimeGetVersion + + syn region none matchgroup=fortranType start="<<<" end=">>>" contains=ALLBUT,none +endif + +syn cluster fortranCommentGroup contains=fortranTodo + +if (b:fortran_fixed_source == 1) + if !exists("fortran_have_tabs") + " Fixed format requires a textwidth of 72 for code, + " but some vendor extensions allow longer lines + if exists("fortran_extended_line_length") + syn match fortranSerialNumber excludenl "^.\{133,}$"lc=132 + elseif exists("fortran_cardimage_line_length") + syn match fortranSerialNumber excludenl "^.\{81,}$"lc=80 + else + syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72 + endif + "Flag left margin errors + syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab + syn match fortranLabelError "^.\{4}\d\S" + endif + syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup,@spell + syn match fortranLeftMargin transparent "^ \{5}" + syn match fortranContinueMark display "^.\{5}\S"lc=5 +else + syn match fortranContinueMark display "&" +endif + +syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup,@spell +syn match fortranOpenMP excludenl "^\s*!\$\(OMP\)\=&\=\s.*$" + +"cpp is often used with Fortran +syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*" +syn match cPreProc "^\s*#\s*\(elif\|if\)\>.*" +syn match cPreProc "^\s*#\s*\(ifndef\|undef\)\>.*" +syn match cPreCondit "^\s*#\s*\(else\|endif\)\>.*" +syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber +"syn region cIncluded contained start=+"[^("]+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded contained "<[^>]*>" +syn match cInclude "^\s*#\s*include\>\s*["<]" contains=cIncluded + +"Synchronising limits assume that comment and continuation lines are not mixed +if exists("fortran_fold") || exists("fortran_more_precise") + syn sync fromstart +elseif (b:fortran_fixed_source == 0) + syn sync linecont "&" minlines=30 +else + syn sync minlines=30 +endif + +if exists("fortran_fold") + + if (b:fortran_fixed_source == 1) + syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\|$\)" contains=ALLBUT,fortranModule + syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\|$\)" contains=ALLBUT,fortranProgram + syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranBlockData transparent fold keepend start="\:p'), 'framescript', 'syntax/framescript.vim') + finish +endif + +" Vim syntax file +" Language: FrameScript v4.0 +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-02-22 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match framescriptOperator + \ '[+*/%=-]\|[><]=\=\|#[&|]' + +syn keyword framescriptTodo + \ contained + \ TODO FIXME XXX NOTE + +syn cluster framescriptCommentGroup + \ contains= + \ framescriptTodo, + \ @Spell + +syn match framescriptComment + \ display + \ contains=@framescriptCommentGroup + \ '//.*$' + +syn region framescriptComment + \ contains=@framescriptCommentGroup + \ matchgroup=framescriptCommentStart + \ start='/\*' + \ end='\*/' + +syn case ignore + +syn match framescriptInclude + \ display + \ contains=framescriptIncluded + \ "^\s*<#Include\>\s*'" + +syn region framescriptIncluded + \ contained + \ display + \ start=+'+ + \ skip=+\\\\\|\\'+ + \ end=+'+ + +syn match framescriptNumbers + \ display + \ transparent + \ contains= + \ framescriptInteger, + \ framescriptReal, + \ framescriptMetric, + \ framescriptCharacter + \ '\<\d\|\.\d' + +syn keyword framescriptBoolean + \ True False + +syn match framescriptInteger + \ contained + \ display + \ '\d\+\>' + +syn match framescriptInteger + \ contained + \ display + \ '\x\+H\>' + +syn match framescriptInteger + \ contained + \ display + \ '[01]\+B\>' + +syn match framescriptReal + \ contained + \ display + \ '\d\+\.\d*\|\.\d\+\>' + +syn match framescriptMetric + \ contained + \ display + \ '\%(\d\+\%(\.\d*\)\=\|\.\d\+\)\%(pts\|in\|"\|cm\|mm\|pica\)\>' + +syn match framescriptCharacter + \ contained + \ display + \ '\d\+S\>' + +syn region framescriptString + \ contains=framescriptStringSpecialChar,@Spell + \ start=+'+ + \ skip=+\\\\\|\\'+ + \ end=+'+ + +syn match framescriptStringSpecialChar + \ contained + \ display + \ "\\[\\']" + +syn keyword framescriptConstant + \ BackSlash + \ CharCR + \ CharLF + \ CharTAB + \ ClientDir + \ ClientName + \ FslVersionMajor + \ FslVersionMinor + \ InstallName + \ InstalledScriptList + \ MainScript + \ NULL + \ ObjEndOffset + \ ProductRevision + \ Quote + \ ThisScript + +syn keyword framescriptOperator + \ not + \ and + \ or + +syn keyword framescriptSessionVariables + \ ErrorCode + \ ErrorMsg + \ DeclareVarMode + \ PlatformEncodingMode + +syn keyword framescriptStructure + \ Event + \ EndEvent + +syn keyword framescriptStatement + \ Sub + \ EndSub + \ Run + \ Function + \ EndFunction + \ Set + \ Add + \ Apply + \ CallClient + \ Close + \ Copy + \ Cut + \ DialogBox + \ Delete + \ Demote + \ Display + \ DocCompare + \ Export + \ Find + \ LeaveLoop + \ LeaveScript + \ LeaveSub + \ LoopNext + \ Merge + \ MsgBox + \ Paste + \ PopClipboard + \ PushClipboard + \ Read + \ Replace + \ Return + \ Sort + \ Split + +syn keyword framescriptStatement + \ nextgroup=framescriptApplySubStatement skipwhite skipempty + \ Apply + +syn keyword framescriptApplySubStatement + \ contained + \ Pagelayout + \ TextProperties + +syn keyword framescriptStatement + \ nextgroup=framescriptClearSubStatement skipwhite skipempty + \ Clear + +syn keyword framescriptClearSubStatement + \ contained + \ ChangeBars + \ Text + +syn keyword framescriptStatement + \ nextgroup=framescriptCloseSubStatement skipwhite skipempty + \ Close + +syn keyword framescriptCloseSubStatement + \ contained + \ Book + \ Document + \ TextFile + +syn keyword framescriptStatement + \ nextgroup=framescriptExecSubStatement skipwhite skipempty + \ Exec + +syn keyword framescriptExecSubStatement + \ contained + \ Compile + \ Script + \ Wait + +syn keyword framescriptStatement + \ nextgroup=framescriptExecuteSubStatement skipwhite skipempty + \ Execute + +syn keyword framescriptExecuteSubStatement + \ contained + \ FrameCommand + \ Hypertext + \ StartUndoCheckPoint + \ EndUndoCheckPoint + \ ClearUndoHistory + +syn keyword framescriptStatement + \ nextgroup=framescriptGenerateSubStatement skipwhite skipempty + \ Generate + +syn keyword framescriptGenerateSubStatement + \ contained + \ Bookfile + +syn keyword framescriptStatement + \ nextgroup=framescriptGetSubStatement skipwhite skipempty + \ Get + +syn keyword framescriptGetSubStatement + \ contained + \ Member + \ Object + \ String + \ TextList + \ TextProperties + +syn keyword framescriptStatement + \ nextgroup=framescriptImportSubStatement skipwhite skipempty + \ Import + +syn keyword framescriptImportSubStatement + \ contained + \ File + \ Formats + \ ElementDefs + +syn keyword framescriptStatement + \ nextgroup=framescriptInstallSubStatement skipwhite skipempty + \ Install + \ Uninstall + +syn keyword framescriptInstallSubStatement + \ contained + \ ChangeBars + \ Text + +syn keyword framescriptStatement + \ nextgroup=framescriptNewSubStatement skipwhite skipempty + \ New + +syn keyword framescriptNewSubStatement + \ contained + \ AFrame + \ Footnote + \ Marker + \ TiApiClient + \ Variable + \ XRef + \ FormatChangeList + \ FormatRule + \ FmtRuleClause + \ Arc + \ Ellipse + \ Flow + \ Group + \ Inset + \ Line + \ Math + \ Polygon + \ Polyline + \ Rectangle + \ RoundRect + \ TextFrame + \ Textline + \ UnanchoredFrame + \ Command + \ Menu + \ MenuItemSeparator + \ Book + \ CharacterFormat + \ Color + \ ConditionFormat + \ ElementDef + \ FormatChangeList + \ MarkerType + \ MasterPage + \ ParagraphFormat + \ PgfFmt + \ ReferencePAge + \ RulingFormat + \ TableFormat + \ VariableFormat + \ XRefFormat + \ BodyPage + \ BookComponent + \ Paragraph + \ Element + \ Attribute + \ AttributeDef + \ AttributeList + \ AttributeDefList + \ ElementLoc + \ ElementRange + \ Table + \ TableRows + \ TableCols + \ Text + \ Integer + \ Real + \ Metric + \ String + \ Object + \ TextLoc + \ TextRange + \ IntList + \ UIntList + \ MetricList + \ StringList + \ PointList + \ TabList + \ PropertyList + \ LibVar + \ ScriptVar + \ SubVar + \ TextFile + +syn keyword framescriptStatement + \ nextgroup=framescriptOpenSubStatement skipwhite skipempty + \ Open + +syn keyword framescriptOpenSubStatement + \ contained + \ Document + \ Book + \ TextFile + +syn keyword framescriptStatement + \ nextgroup=framescriptPrintSubStatement skipwhite skipempty + \ Print + +syn keyword framescriptPrintSubStatement + \ contained + \ Document + \ Book + +syn keyword framescriptStatement + \ nextgroup=framescriptQuitSubStatement skipwhite skipempty + \ Quit + +syn keyword framescriptQuitSubStatement + \ contained + \ Session + +syn keyword framescriptStatement + \ nextgroup=framescriptRemoveSubStatement skipwhite skipempty + \ Remove + +syn keyword framescriptRemoveSubStatement + \ contained + \ Attribute + \ CommandObject + +syn keyword framescriptStatement + \ nextgroup=framescriptSaveSubStatement skipwhite skipempty + \ Save + +syn keyword framescriptSaveSubStatement + \ contained + \ Document + \ Book + +syn keyword framescriptStatement + \ nextgroup=framescriptSelectSubStatement skipwhite skipempty + \ Select + +syn keyword framescriptSelectSubStatement + \ contained + \ TableCells + +syn keyword framescriptStatement + \ nextgroup=framescriptStraddleSubStatement skipwhite skipempty + \ Straddle + +syn keyword framescriptStraddleSubStatement + \ contained + \ TableCells + +syn keyword framescriptStatement + \ nextgroup=framescriptUpdateSubStatement skipwhite skipempty + \ Update + +syn keyword framescriptUpdateSubStatement + \ contained + \ ReDisplay + \ Formatting + \ Hyphenating + \ ResetEquationsSettings + \ ResetRefFrames + \ RestartPgfNums + \ TextInset + \ Variables + \ XRefs + \ Book + +syn keyword framescriptStatement + \ nextgroup=framescriptWriteSubStatement skipwhite skipempty + \ Write + +syn keyword framescriptUpdateSubStatement + \ contained + \ Console + \ Display + +syn keyword framescriptRepeat + \ Loop + \ EndLoop + +syn keyword framescriptConditional + \ If + \ ElseIf + \ Else + \ EndIf + +syn keyword framescriptType + \ Local + \ GlobalVar + +let b:framescript_minlines = exists("framescript_minlines") + \ ? framescript_minlines : 15 +exec "syn sync ccomment framescriptComment minlines=" . b:framescript_minlines + +hi def link framescriptTodo Todo +hi def link framescriptComment Comment +hi def link framescriptCommentStart framescriptComment +hi def link framescriptInclude Include +hi def link framescriptIncluded String +hi def link framescriptBoolean Boolean +hi def link framescriptNumber Number +hi def link framescriptInteger framescriptNumber +hi def link framescriptReal framescriptNumber +hi def link framescriptMetric framescriptNumber +hi def link framescriptCharacter framescriptNumber +hi def link framescriptString String +hi def link framescriptStringSpecialChar SpecialChar +hi def link framescriptConstant Constant +hi def link framescriptOperator None +hi def link framescriptSessionVariables PreProc +hi def link framescriptStructure Structure +hi def link framescriptStatement Statement +hi def link framescriptSubStatement Type +hi def link framescriptApplySubStatement framescriptSubStatement +hi def link framescriptClearSubStatement framescriptSubStatement +hi def link framescriptCloseSubStatement framescriptSubStatement +hi def link framescriptExecSubStatement framescriptSubStatement +hi def link framescriptExecuteSubStatement framescriptSubStatement +hi def link framescriptGenerateSubStatement framescriptSubStatement +hi def link framescriptGetSubStatement framescriptSubStatement +hi def link framescriptImportSubStatement framescriptSubStatement +hi def link framescriptInstallSubStatement framescriptSubStatement +hi def link framescriptNewSubStatement framescriptSubStatement +hi def link framescriptOpenSubStatement framescriptSubStatement +hi def link framescriptPrintSubStatement framescriptSubStatement +hi def link framescriptQuitSubStatement framescriptSubStatement +hi def link framescriptRemoveSubStatement framescriptSubStatement +hi def link framescriptSaveSubStatement framescriptSubStatement +hi def link framescriptSelectSubStatement framescriptSubStatement +hi def link framescriptStraddleSubStatement framescriptSubStatement +hi def link framescriptUpdateSubStatement framescriptSubStatement +hi def link framescriptRepeat Repeat +hi def link framescriptConditional Conditional +hi def link framescriptType Type + +let b:current_syntax = "framescript" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/freebasic.vim b/syntax/freebasic.vim new file mode 100644 index 000000000..6cb26f262 --- /dev/null +++ b/syntax/freebasic.vim @@ -0,0 +1,261 @@ +if polyglot#init#is_disabled(expand(':p'), 'freebasic', 'syntax/freebasic.vim') + finish +endif + +" Vim syntax file +" Language: FreeBasic +" Maintainer: Mark Manning +" Updated: 10/9/2019 +" Version: 7.0b +" +" Description: +" +" Based originally on the work done by Allan Kelly +" Updated by Mark Manning +" Applied FreeBasic support to the already excellent support +" for standard basic syntax (like QB). +" +" First version based on Micro$soft QBASIC circa +" 1989, as documented in 'Learn BASIC Now' by +" Halvorson&Rygmyr. Microsoft Press 1989. This syntax file +" not a complete implementation yet. Send suggestions to +" the maintainer. +" +" Quit when a (custom) syntax file was already loaded (Taken from c.vim) +" +if exists("b:current_syntax") + finish +endif +" +" Be sure to turn on the "case ignore" since current versions +" of freebasic support both upper as well as lowercase +" letters. - MEM 10/1/2006 +" +syn case ignore +" +" This list of keywords is taken directly from the FreeBasic +" user's guide as presented by the FreeBasic online site. +" +syn keyword freebasicArrays ERASE LBOUND REDIM PRESERVE UBOUND + +syn keyword freebasicBitManipulation BIT BITRESET BITSET HIBYTE HIWORD LOBYTE LOWORD SHL SHR + +syn keyword freebasicCompilerSwitches DEFBYTE DEFDBL DEFINT DEFLNG DEFLNGINT DEFSHORT DEFSNG DEFSTR +syn keyword freebasicCompilerSwitches DEFUBYTE DEFUINT DEFULNGINT DEFUSHORT +syn match freebasicCompilerSwitches "\" +syn match freebasicCompilerSwitches "\" + +syn region freebasicConditional start="\son\s+" skip=".*" end="gosub" +syn region freebasicConditional start="\son\s+" skip=".*" end="goto" +syn match freebasicConditional "\" +syn keyword freebasicConditional if iif then case else elseif with + +syn match freebasicConsole "\" +syn keyword freebasicConsole BEEP CLS CSRLIN LOCATE PRINT POS SPC TAB VIEW WIDTH + +syn keyword freebasicDataTypes BYTE AS DIM CONST DOUBLE ENUM INTEGER LONG LONGINT SHARED SHORT STRING +syn keyword freebasicDataTypes SINGLE TYPE UBYTE UINTEGER ULONGINT UNION UNSIGNED USHORT WSTRING ZSTRING + +syn keyword freebasicDateTime DATE DATEADD DATEDIFF DATEPART DATESERIAL DATEVALUE DAY HOUR MINUTE +syn keyword freebasicDateTime MONTH MONTHNAME NOW SECOND SETDATE SETTIME TIME TIMESERIAL TIMEVALUE +syn keyword freebasicDateTime TIMER YEAR WEEKDAY WEEKDAYNAME + +syn keyword freebasicDebug ASSERT STOP + +syn keyword freebasicErrorHandling ERR ERL ERROR LOCAL RESUME +syn match freebasicErrorHandling "\" +syn match freebasicErrorHandling "\" + +syn match freebasicFiles "\" +syn match freebasicFiles "\" +syn match freebasicFiles "\" +syn match freebasicFiles "\" +syn keyword freebasicFiles ACCESS APPEND BINARY BLOAD BSAVE CLOSE EOF FREEFILE INPUT LOC +syn keyword freebasicFiles LOCK LOF OPEN OUTPUT RANDOM RESET SEEK UNLOCK WRITE + +syn keyword freebasicFunctions ALIAS ANY BYREF BYVAL CALL CDECL CONSTRUCTOR DESTRUCTOR +syn keyword freebasicFunctions DECLARE FUNCTION LIB OVERLOAD PASCAL STATIC SUB STDCALL +syn keyword freebasicFunctions VA_ARG VA_FIRST VA_NEXT + +syn match freebasicGraphics "\" +syn keyword freebasicGraphics ALPHA CIRCLE CLS COLOR CUSTOM DRAW FLIP GET +syn keyword freebasicGraphics IMAGECREATE IMAGEDESTROY LINE PAINT PALETTE PCOPY PMAP POINT +syn keyword freebasicGraphics PRESET PSET PUT RGB RGBA SCREEN SCREENCOPY SCREENINFO SCREENLIST +syn keyword freebasicGraphics SCREENLOCK SCREENPTR SCREENRES SCREENSET SCREENSYNC SCREENUNLOCK +syn keyword freebasicGraphics TRANS USING VIEW WINDOW + +syn match freebasicHardware "\" +syn keyword freebasicHardware INP OUT WAIT LPT LPOS LPRINT + +syn keyword freebasicLogical AND EQV IMP OR NOT XOR + +syn keyword freebasicMath ABS ACOS ASIN ATAN2 ATN COS EXP FIX INT LOG MOD RANDOMIZE +syn keyword freebasicMath RND SGN SIN SQR TAN + +syn keyword freebasicMemory ALLOCATE CALLOCATE CLEAR DEALLOCATE FIELD FRE PEEK POKE REALLOCATE + +syn keyword freebasicMisc ASM DATA LET TO READ RESTORE SIZEOF SWAP OFFSETOF + +syn keyword freebasicModularizing CHAIN COMMON EXPORT EXTERN DYLIBFREE DYLIBLOAD DYLIBSYMBOL +syn keyword freebasicModularizing PRIVATE PUBLIC + +syn keyword freebasicMultithreading MUTEXCREATE MUTEXDESTROY MUTEXLOCK MUTEXUNLOCK THREADCREATE THREADWAIT + +syn keyword freebasicShell CHDIR DIR COMMAND ENVIRON EXEC EXEPATH KILL NAME MKDIR RMDIR RUN + +syn keyword freebasicEnviron SHELL SYSTEM WINDOWTITLE POINTERS + +syn keyword freebasicLoops FOR LOOP WHILE WEND DO CONTINUE STEP UNTIL next + +syn match freebasicInclude "\<#\s*\(inclib\|include\)\>" +syn match freebasicInclude "\<\$\s*include\>" + +syn keyword freebasicPointer PROCPTR PTR SADD STRPTR VARPTR + +syn keyword freebasicPredefined __DATE__ __FB_DOS__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__ +syn keyword freebasicPredefined __FB_SIGNATURE__ __FB_VERSION__ __FB_WIN32__ __FB_VER_MAJOR__ +syn keyword freebasicPredefined __FB_VER_MINOR__ __FB_VER_PATCH__ __FILE__ __FUNCTION__ +syn keyword freebasicPredefined __LINE__ __TIME__ + +syn match freebasicPreProcessor "\<^#\s*\(define\|undef\)\>" +syn match freebasicPreProcessor "\<^#\s*\(ifdef\|ifndef\|else\|elseif\|endif\|if\)\>" +syn match freebasicPreProcessor "\<#\s*error\>" +syn match freebasicPreProcessor "\<#\s*\(print\|dynamic\|static\)\>" +syn keyword freebasicPreProcessor DEFINED ONCE + +syn keyword freebasicProgramFlow END EXIT GOSUB GOTO +syn keyword freebasicProgramFlow IS RETURN SCOPE SLEEP + +syn keyword freebasicString INSTR LCASE LEFT LEN LSET LTRIM MID RIGHT RSET RTRIM +syn keyword freebasicString SPACE STRING TRIM UCASE ASC BIN CHR CVD CVI CVL CVLONGINT +syn keyword freebasicString CVS CVSHORT FORMAT HEX MKD MKI MKL MKLONGINT MKS MKSHORT +syn keyword freebasicString OCT STR VAL VALLNG VALINT VALUINT VALULNG + +syn keyword freebasicTypeCasting CAST CBYTE CDBL CINT CLNG CLNGINT CPTR CSHORT CSIGN CSNG +syn keyword freebasicTypeCasting CUBYTE CUINT CULNGINT CUNSG CURDIR CUSHORT + +syn match freebasicUserInput "\" +syn keyword freebasicUserInput GETJOYSTICK GETKEY GETMOUSE INKEY INPUT MULTIKEY SETMOUSE +" +" Do the Basic variables names first. This is because it +" is the most inclusive of the tests. Later on we change +" this so the identifiers are split up into the various +" types of identifiers like functions, basic commands and +" such. MEM 9/9/2006 +" +syn match freebasicIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match freebasicGenericFunction "\<[a-zA-Z_][a-zA-Z0-9_]*\>\s*("me=e-1,he=e-1 +" +" Function list +" +syn keyword freebasicTodo contained TODO +" +" Catch errors caused by wrong parenthesis +" +syn region freebasicParen transparent start='(' end=')' contains=ALLBUT,@freebasicParenGroup +syn match freebasicParenError ")" +syn match freebasicInParen contained "[{}]" +syn cluster freebasicParenGroup contains=freebasicParenError,freebasicSpecial,freebasicTodo,freebasicUserCont,freebasicUserLabel,freebasicBitField +" +" Integer number, or floating point number without a dot and with "f". +" +syn region freebasicHex start="&h" end="\W" +syn region freebasicHexError start="&h\x*[g-zG-Z]" end="\W" +syn region freebasicOctal start="&o" end="\W" +syn region freebasicOctalError start="&o[0-7]*[89a-zA-Z]" end="\W" +syn region freebasicBinary start="&b" end="\W" +syn region freebasicBinaryError start="&b[01]*[2-9a-zA-Z]" end="\W" +syn match freebasicInteger "\<\d\+\(u\=l\=\|lu\|f\)\>" +" +" Floating point number, with dot, optional exponent +" +syn match freebasicFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +" +" Floating point number, starting with a dot, optional exponent +" +syn match freebasicFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +" +" Floating point number, without dot, with exponent +" +syn match freebasicFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +" +" Octal number +" +syn case match +syn match freebasicOctal2 "\<0\o*\>" +syn match freebasicOctal2Error "\<0\o*[89a-zA-Z]" +" +" String and Character contstants +" +syn region freebasicString start='"' end='"' contains=freebasicSpecial,freebasicTodo +syn region freebasicString start="'" end="'" contains=freebasicSpecial,freebasicTodo +" +" Comments +" +syn match freebasicSpecial contained "\\\\." +syn region freebasicComment start="^rem" end="$" contains=freebasicSpecial,freebasicTodo +syn region freebasicComment start=":\s*rem" end="$" contains=freebasicSpecial,freebasicTodo +syn region freebasicComment start="\s*'" end="$" contains=freebasicSpecial,freebasicTodo +syn region freebasicComment start="^'" end="$" contains=freebasicSpecial,freebasicTodo +" +" Now do the comments and labels +" +syn match freebasicLabel "^\d" +syn match freebasicLabel "\<^\w+:\>" +syn region freebasicLineNumber start="^\d" end="\s" +" +" Create the clusters +" +syn cluster freebasicNumber contains=freebasicHex,freebasicOctal,freebasicOctal2,freebasicBinary,freebasicInteger,freebasicFloat +syn cluster freebasicError contains=freebasicHexError,freebasicOctalError,freebasicOctal2,freebasicBinary +" +" Used with OPEN statement +" +syn match freebasicFilenumber "#\d\+" +syn match freebasicMathOperator "[\+\-\=\|\*\/\>\<\%\()[\]]" contains=freebasicParen +" +" The default methods for highlighting. Can be overridden later +" +hi def link freebasicArrays StorageClass +hi def link freebasicBitManipulation Operator +hi def link freebasicCompilerSwitches PreCondit +hi def link freebasicConsole Special +hi def link freebasicDataTypes Type +hi def link freebasicDateTime Type +hi def link freebasicDebug Special +hi def link freebasicErrorHandling Special +hi def link freebasicFiles Special +hi def link freebasicFunctions Function +hi def link freebasicGraphics Function +hi def link freebasicHardware Special +hi def link freebasicLogical Conditional +hi def link freebasicMath Function +hi def link freebasicMemory Function +hi def link freebasicMisc Special +hi def link freebasicModularizing Special +hi def link freebasicMultithreading Special +hi def link freebasicShell Special +hi def link freebasicEnviron Special +hi def link freebasicPointer Special +hi def link freebasicPredefined PreProc +hi def link freebasicPreProcessor PreProc +hi def link freebasicProgramFlow Statement +hi def link freebasicString String +hi def link freebasicTypeCasting Type +hi def link freebasicUserInput Statement +hi def link freebasicComment Comment +hi def link freebasicConditional Conditional +hi def link freebasicError Error +hi def link freebasicIdentifier Identifier +hi def link freebasicInclude Include +hi def link freebasicGenericFunction Function +hi def link freebasicLabel Label +hi def link freebasicLineNumber Label +hi def link freebasicMathOperator Operator +hi def link freebasicNumber Number +hi def link freebasicSpecial Special +hi def link freebasicTodo Todo + +let b:current_syntax = "freebasic" + +" vim: ts=8 diff --git a/syntax/fsharp.vim b/syntax/fsharp.vim index ff92f6a6f..4dcca3c19 100644 --- a/syntax/fsharp.vim +++ b/syntax/fsharp.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1 +if polyglot#init#is_disabled(expand(':p'), 'fsharp', 'syntax/fsharp.vim') + finish +endif " Vim syntax file " Language: F# @@ -274,5 +276,3 @@ endif let b:current_syntax = 'fsharp' " vim: sw=4 et sts=4 - -endif diff --git a/syntax/fstab.vim b/syntax/fstab.vim new file mode 100644 index 000000000..7e234ee80 --- /dev/null +++ b/syntax/fstab.vim @@ -0,0 +1,295 @@ +if polyglot#init#is_disabled(expand(':p'), 'fstab', 'syntax/fstab.vim') + finish +endif + +" Vim syntax file +" Language: fstab file +" Maintainer: Radu Dineiu +" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim +" Last Change: 2020 Dec 30 +" Version: 1.4 +" +" Credits: +" David Necas (Yeti) +" Stefano Zacchiroli +" Georgi Georgiev +" James Vega +" Elias Probst + +" Options: +" let fstab_unknown_fs_errors = 1 +" highlight unknown filesystems as errors +" +" let fstab_unknown_device_errors = 0 +" do not highlight unknown devices as errors + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" General +syn cluster fsGeneralCluster contains=fsComment +syn match fsComment /\s*#.*/ contains=@Spell +syn match fsOperator /[,=:#]/ + +" Device +syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError +syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@:\.-]\|^\w\{-}\ze\W\)/ contained +syn keyword fsDeviceKeyword contained none proc linproc tmpfs devpts devtmpfs sysfs usbfs +syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel +syn keyword fsDeviceKeyword contained UUID nextgroup=fsDeviceUUID +syn keyword fsDeviceKeyword contained PARTLABEL nextgroup=fsDevicePARTLABEL +syn keyword fsDeviceKeyword contained PARTUUID nextgroup=fsDevicePARTUUID +syn keyword fsDeviceKeyword contained sshfs nextgroup=fsDeviceSshfs +syn match fsDeviceKeyword contained /^[a-zA-Z0-9.\-]\+\ze:/ +syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator +syn match fsDeviceUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator +syn match fsDevicePARTLABEL contained /=[^ \t]\+/hs=s+1 contains=fsOperator +syn match fsDevicePARTUUID contained /=[^ \t]\+/hs=s+1 contains=fsOperator +syn match fsDeviceSshfs contained /#[_=[:alnum:]\.\/+-]\+@[a-z0-9._-]\+\a\{2}:[^ \t]\+/hs=s+1 contains=fsOperator + +" Mount Point +syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError +syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@\.-]\|\s\+\zs\w\{-}\ze\s\)/ contained +syn keyword fsMountPointKeyword contained none swap + +" Type +syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown +syn match fsTypeUnknown /\s\+\zs\w\+/ contained +syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs + +" Options +" ------- +" Options: General +syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown +syn match fsOptionsNumber /\d\+/ +syn match fsOptionsNumberOctal /[0-8]\+/ +syn match fsOptionsString /[a-zA-Z0-9_-]\+/ +syn keyword fsOptionsYesNo yes no +syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck +syn keyword fsOptionsSize 512 1024 2048 +syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok +syn match fsOptionsGeneral /_netdev/ + +" Options: adfs +syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber + +" Options: affs +syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber +syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString +syn match fsOptionsKeywords contained /\/ +syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr + +" Options: ext3 +syn match fsOptionsKeywords contained /\/ +syn keyword fsOptionsUfsError contained panic lock umount repair + +" Options: usbfs +syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber +syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal + +" Options: vfat +syn keyword fsOptionsKeywords contained nonumtail posix utf8 +syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname +syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed + +" Options: xfs +syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString +syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce + +" Frequency / Pass No. +syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError +syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained +syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained + +" Groups +syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster +syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained +syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained +syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained +syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained + +" Whole line comments +syn match fsCommentLine /^#.*$/ contains=@Spell + +hi def link fsOperator Operator +hi def link fsComment Comment +hi def link fsCommentLine Comment + +hi def link fsTypeKeyword Type +hi def link fsDeviceKeyword Identifier +hi def link fsDeviceLabel String +hi def link fsDeviceUUID String +hi def link fsDevicePARTLABEL String +hi def link fsDevicePARTUUID String +hi def link fsDeviceSshfs String +hi def link fsFreqPassNumber Number + +if exists('fstab_unknown_fs_errors') && fstab_unknown_fs_errors == 1 + hi def link fsTypeUnknown Error +endif + +if !exists('fstab_unknown_device_errors') || fstab_unknown_device_errors == 1 + hi def link fsDeviceError Error +endif + +hi def link fsMountPointError Error +hi def link fsMountPointKeyword Keyword +hi def link fsFreqPassError Error + +hi def link fsOptionsGeneral Type +hi def link fsOptionsKeywords Keyword +hi def link fsOptionsNumber Number +hi def link fsOptionsNumberOctal Number +hi def link fsOptionsString String +hi def link fsOptionsSize Number +hi def link fsOptionsExt2Check String +hi def link fsOptionsExt2Errors String +hi def link fsOptionsExt3Journal String +hi def link fsOptionsExt3Data String +hi def link fsOptionsExt4Journal String +hi def link fsOptionsExt4Data String +hi def link fsOptionsExt4Barrier Number +hi def link fsOptionsFatCheck String +hi def link fsOptionsConv String +hi def link fsOptionsFatType Number +hi def link fsOptionsYesNo String +hi def link fsOptionsHpfsCase String +hi def link fsOptionsIsoMap String +hi def link fsOptionsReiserHash String +hi def link fsOptionsSshYesNoAsk String +hi def link fsOptionsUfsType String +hi def link fsOptionsUfsError String + +hi def link fsOptionsVfatShortname String + +let b:current_syntax = "fstab" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 ft=vim diff --git a/syntax/fvwm.vim b/syntax/fvwm.vim new file mode 100644 index 000000000..9367d2e89 --- /dev/null +++ b/syntax/fvwm.vim @@ -0,0 +1,646 @@ +if polyglot#init#is_disabled(expand(':p'), 'fvwm', 'syntax/fvwm.vim') + finish +endif + +" Vim syntax file for Fvwm-2.5.22 +" Language: Fvwm{1,2} configuration file +" Maintainer: Gautam Iyer +" Previous Maintainer: Haakon Riiser +" Last Change: Sat 29 Sep 2007 11:08:34 AM PDT +" +" Thanks to David Necas (Yeti) for adding Fvwm 2.4 support. +" +" 2006-05-09 gi1242: Rewrote fvwm2 syntax completely. Also since fvwm1 is now +" mostly obsolete, made the syntax file pick fvwm2 syntax by default. + +if exists("b:current_syntax") + finish +endif +let s:keepcpo= &cpo +set cpo&vim + +" Fvwm configuration files are case insensitive +syn case ignore + +" Identifiers in Fvwm can contain most characters, so we only +" include the most common ones here. +setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 + +" Syntax items common to fvwm1 and fvwm2 config files +syn cluster fvwmConstants contains=fvwmEnvVar,fvwmNumber +syn match fvwmEnvVar "\$\w\+" +syn match fvwmNumber '\v<(\d+|0x[0-9a-f]+)>' + +syn match fvwmModConf nextgroup=fvwmModArg "\v^\s*\*\a+" +syn region fvwmModArg contained contains=fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + +syn region fvwmString contains=fvwmBackslash start='"' + \ matchgroup=fvwmBackslash skip='\v\\"' end='"' +syn region fvwmString contains=fvwmBackslash start='`' + \ matchgroup=fvwmBackslash skip='\v\\`' end='`' +syn region fvwmString contains=fvwmBackslash start="'" + \ matchgroup=fvwmBackslash skip="\v\\'" end="'" +syn match fvwmBackslash contained '\\[^"'`]' + +syn match fvwmRGBValue "#\x\{3}" +syn match fvwmRGBValue "#\x\{6}" +syn match fvwmRGBValue "#\x\{9}" +syn match fvwmRGBValue "#\x\{12}" +syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" + +syn region fvwmComment contains=@Spell + \ start='^\s*#\s' skip='\\$' end='$' +syn region fvwmComment start="\v^\s*#(\S|$)" skip='\\$' end='$' + +if (exists("b:fvwm_version") && b:fvwm_version == 1) + \ || (exists("use_fvwm_1") && use_fvwm_1) + + " + " Syntax highlighting for Fvwm1 files. + " + + " Moved from common syntax items + syn match fvwmModule "\' + syn match fvwmGradient contained '\v<[HVDBSCRY]Gradient>' + + " Styles + syn keyword fvwmKeyword nextgroup=fvwmStyleArgs skipwhite + \ Style WindowStyle + syn region fvwmStyleArgs contained transparent contains=fvwmStyleNames,@fvwmConstants,fvwmString,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmStyleNames contained + \ BorderWidth HandleWidth NoIcon Icon MiniIcon + \ IconBox IconGrid IconFill IconSize NoTitle + \ Title TitleAtBottom TitleAtLeft TitleAtRight + \ TitleAtTop LeftTitleRotatedCW + \ LeftTitleRotatedCCW RightTitleRotatedCCW + \ RightTitleRotatedCW TopTitleRotated + \ TopTitleNotRotated BottomTitleRotated + \ BottomTitleNotRotated UseTitleDecorRotation + \ StippledTitle StippledTitleOff + \ IndexedWindowName ExactWindowName + \ IndexedIconName ExactIconName Borders + \ NoHandles Handles WindowListSkip + \ WindowListHit CirculateSkip CirculateHit + \ CirculateSkipShaded CirculateHitShaded Layer + \ StaysOnTop StaysOnBottom StaysPut Sticky + \ Slippery StickyAcrossPages StickyAcrossDesks + \ StartIconic StartNormal Color ForeColor + \ BackColor Colorset HilightFore HilightBack + \ HilightColorset BorderColorset + \ HilightBorderColorset IconTitleColorset + \ HilightIconTitleColorset + \ IconBackgroundColorset IconTitleRelief + \ IconBackgroundRelief IconBackgroundPadding + \ Font IconFont StartsOnDesk StartsOnPage + \ StartsAnyWhere StartsOnScreen + \ ManualPlacementHonorsStartsOnPage + \ ManualPlacementIgnoresStartsOnPage + \ CaptureHonorsStartsOnPage + \ CaptureIgnoresStartsOnPage + \ RecaptureHonorsStartsOnPage + \ RecaptureIgnoresStartsOnPage + \ StartsOnPageIncludesTransients + \ StartsOnPageIgnoresTransients IconTitle + \ NoIconTitle MwmButtons FvwmButtons MwmBorder + \ FvwmBorder MwmDecor NoDecorHint MwmFunctions + \ NoFuncHint HintOverride NoOverride NoButton + \ Button ResizeHintOverride NoResizeOverride + \ OLDecor NoOLDecor GNOMEUseHints + \ GNOMEIgnoreHints StickyIcon SlipperyIcon + \ StickyAcrossPagesIcon StickyAcrossDesksIcon + \ ManualPlacement CascadePlacement + \ MinOverlapPlacement + \ MinOverlapPercentPlacement + \ TileManualPlacement TileCascadePlacement + \ MinOverlapPlacementPenalties + \ MinOverlapPercentPlacementPenalties + \ DecorateTransient NakedTransient + \ DontRaiseTransient RaiseTransient + \ DontLowerTransient LowerTransient + \ DontStackTransientParent + \ StackTransientParent SkipMapping ShowMapping + \ ScatterWindowGroups KeepWindowGroupsOnDesk + \ UseDecor UseStyle NoPPosition UsePPosition + \ NoUSPosition UseUSPosition + \ NoTransientPPosition UseTransientPPosition + \ NoTransientUSPosition UseTransientUSPosition + \ NoIconPosition UseIconPosition Lenience + \ NoLenience ClickToFocus SloppyFocus + \ MouseFocus FocusFollowsMouse NeverFocus + \ ClickToFocusPassesClickOff + \ ClickToFocusPassesClick + \ ClickToFocusRaisesOff ClickToFocusRaises + \ MouseFocusClickRaises + \ MouseFocusClickRaisesOff GrabFocus + \ GrabFocusOff GrabFocusTransientOff + \ GrabFocusTransient FPFocusClickButtons + \ FPFocusClickModifiers + \ FPSortWindowlistByFocus FPClickRaisesFocused + \ FPClickDecorRaisesFocused + \ FPClickIconRaisesFocused + \ FPClickRaisesUnfocused + \ FPClickDecorRaisesUnfocused + \ FPClickIconRaisesUnfocused FPClickToFocus + \ FPClickDecorToFocus FPClickIconToFocus + \ FPEnterToFocus FPLeaveToUnfocus + \ FPFocusByProgram FPFocusByFunction + \ FPFocusByFunctionWarpPointer FPLenient + \ FPPassFocusClick FPPassRaiseClick + \ FPIgnoreFocusClickMotion + \ FPIgnoreRaiseClickMotion + \ FPAllowFocusClickFunction + \ FPAllowRaiseClickFunction FPGrabFocus + \ FPGrabFocusTransient FPOverrideGrabFocus + \ FPReleaseFocus FPReleaseFocusTransient + \ FPOverrideReleaseFocus StartsLowered + \ StartsRaised IgnoreRestack AllowRestack + \ FixedPosition VariablePosition + \ FixedUSPosition VariableUSPosition + \ FixedPPosition VariablePPosition FixedSize + \ VariableSize FixedUSSize VariableUSSize + \ FixedPSize VariablePSize Closable + \ Iconifiable Maximizable + \ AllowMaximizeFixedSize IconOverride + \ NoIconOverride NoActiveIconOverride + \ DepressableBorder FirmBorder MaxWindowSize + \ IconifyWindowGroups IconifyWindowGroupsOff + \ ResizeOpaque ResizeOutline BackingStore + \ BackingStoreOff BackingStoreWindowDefault + \ Opacity ParentalRelativity SaveUnder + \ SaveUnderOff WindowShadeShrinks + \ WindowShadeScrolls WindowShadeSteps + \ WindowShadeAlwaysLazy WindowShadeBusy + \ WindowShadeLazy EWMHDonateIcon + \ EWMHDontDonateIcon EWMHDonateMiniIcon + \ EWMHDontDonateMiniIcon EWMHMiniIconOverride + \ EWMHNoMiniIconOverride + \ EWMHUseStackingOrderHints + \ EWMHIgnoreStackingOrderHints + \ EWMHIgnoreStateHints EWMHUseStateHints + \ EWMHIgnoreStrutHints EWMHIgnoreWindowType + \ EWMHUseStrutHints + \ EWMHMaximizeIgnoreWorkingArea + \ EWMHMaximizeUseWorkingArea + \ EWMHMaximizeUseDynamicWorkingArea + \ EWMHPlacementIgnoreWorkingArea + \ EWMHPlacementUseWorkingArea + \ EWMHPlacementUseDynamicWorkingArea + \ MoveByProgramMethod Unmanaged State + \ StippledIconTitle StickyStippledTitle + \ StickyStippledIconTitle + \ PositionPlacement + \ UnderMousePlacementHonorsStartsOnPage + \ UnderMousePlacementIgnoresStartsOnPage + \ MinOverlapPlacementPenalties + \ MinOverlapPercentPlacementPenalties + \ MinWindowSize StartShaded + + " Cursor styles + syn keyword fvwmKeyword nextgroup=fvwmCursorStyle skipwhite + \ CursorStyle + syn case match + syn keyword fvwmCursorStyle contained + \ POSITION TITLE DEFAULT SYS MOVE RESIZE WAIT + \ MENU SELECT DESTROY TOP RIGHT BOTTOM LEFT + \ TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT + \ TOP_EDGE RIGHT_EDGE BOTTOM_EDGE LEFT_EDGE + \ ROOT STROKE + syn case ignore + + " Menu style + syn keyword fvwmKeyword nextgroup=fvwmMStyleArgs skipwhite + \ MenuStyle + syn region fvwmMStyleArgs contained transparent contains=fvwmMStyleNames,@fvwmConstants,fvwmString,fvwmGradient,fvwmRGBValue + \ start='.' skip='\\$' end='$' + syn keyword fvwmMStyleNames contained + \ Fvwm Mwm Win BorderWidth Foreground + \ Background Greyed HilightBack HilightBackOff + \ ActiveFore ActiveForeOff MenuColorset + \ ActiveColorset GreyedColorset Hilight3DThick + \ Hilight3DThin Hilight3DOff + \ Hilight3DThickness Animation AnimationOff + \ Font MenuFace PopupDelay PopupOffset + \ TitleWarp TitleWarpOff TitleUnderlines0 + \ TitleUnderlines1 TitleUnderlines2 + \ SeparatorsLong SeparatorsShort + \ TrianglesSolid TrianglesRelief + \ PopupImmediately PopupDelayed + \ PopdownImmediately PopdownDelayed + \ PopupActiveArea DoubleClickTime SidePic + \ SideColor PopupAsRootMenu PopupAsSubmenu + \ PopupIgnore PopupClose RemoveSubmenus + \ HoldSubmenus SubmenusRight SubmenusLeft + \ SelectOnRelease ItemFormat + \ VerticalItemSpacing VerticalTitleSpacing + \ AutomaticHotkeys AutomaticHotkeysOff + \ TitleFont TitleColorset HilightTitleBack + + " Button style + syn keyword fvwmKeyword nextgroup=fvwmBNum skipwhite + \ ButtonStyle AddButtonStyle + syn match fvwmBNum contained + \ nextgroup=fvwmBState,fvwmBStyleArgs skipwhite + \ '\v<([0-9]|All|Left|Right|Reset)>' + syn keyword fvwmBState contained nextgroup=fvwmBStyleArgs skipwhite + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmBStyleArgs contained contains=fvwmBStyleFlags,fvwmBStyleNames,fvwmGradient,fvwmRGBValue,@fvwmConstants,fvwmString + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBStyleNames contained + \ Simple Default Solid Colorset Vector Pixmap + \ AdjustedPixmap ShrunkPixmap StretchedPixmap + \ TiledPixmap MiniIcon + syn keyword fvwmBStyleFlags contained + \ Raised Sunk Flat UseTitleStyle + \ UseBorderStyle + + " Border style + syn keyword fvwmKeyword skipwhite nextgroup=fvwmBdState,fvwmBdStyleArgs + \ BorderStyle + syn keyword fvwmBdState contained skipwhite nextgroup=fvwmBdStyleArgs + \ Active Inactive + syn region fvwmBdStyleArgs contained contains=fvwmBdStyNames,fvwmBdStyFlags + \ start='\S' skip='\\$' end='$' + syn keyword fvwmBdStyNames contained + \ TiledPixmap Colorset + syn keyword fvwmBdStyFlags contained + \ HiddenHandles NoInset Raised Sunk Flat + + " Title styles + syn keyword fvwmKeyword skipwhite nextgroup=fvwmTState,fvwmTStyleArgs + \ TitleStyle AddTitleStyle + syn keyword fvwmTState contained skipwhite nextgroup=fvwmTStyleArgs + \ ActiveUp ActiveDown InactiveUp InactiveDown + \ Active Inactive ToggledActiveUp + \ ToggledActiveDown ToggledInactiveUp + \ ToggledInactiveDown ToggledActive + \ ToggledInactive AllNormal AllToggled + \ AllActive AllInactive AllUp AllDown + syn region fvwmTStyleArgs contained contains=fvwmBStyleNames,fvwmTStyleNames,fvwmMPmapNames,fvwmTStyleFlags,fvwmGradient,fvwmRGBValue,@fvwmConstants + \ start='\S' skip='\\$' end='$' + syn keyword fvwmTStyleNames contained + \ MultiPixmap + syn keyword fvwmTStyleNames contained + \ LeftJustified Centered RightJustified Height + \ MinHeight + syn keyword fvwmMPmapNames contained + \ Main LeftMain RightMain UnderText LeftOfText + \ RightOfText LeftEnd RightEnd Buttons + \ LeftButtons RightButtons + syn keyword fvwmTStyleFlags contained + \ Raised Flat Sunk + + " Button state + syn keyword fvwmKeyword nextgroup=fvwmBStateArgs + \ ButtonState + syn region fvwmBStateArgs contained contains=fvwmBStateTF,fvwmBStateNames + \ start='.' skip='\\$' end='$' + syn keyword fvwmBStateNames contained ActiveDown Inactive InactiveDown + syn keyword fvwmBStateTF contained True False + + " Paths + syn keyword fvwmKeyword nextgroup=fvwmPath skipwhite + \ IconPath ImagePath LocalePath PixmapPath + \ ModulePath + syn match fvwmPath contained contains=fvwmEnvVar '\v.+$' + + " Window list command + syn keyword fvwmKeyword nextgroup=fvwmWLArgs skipwhite + \ WindowList + syn region fvwmWLArgs contained + \ contains=fvwmCondition,@fvwmConstants,fvwmString,fvwmWLOpts + \ start='.' skip='\\$' end='$' + syn keyword fvwmWLOpts contained + \ Geometry NoGeometry NoGeometryWithInfo + \ NoDeskNum NoNumInDeskTitle + \ NoCurrentDeskTitle MaxLabelWidth width + \ TitleForAllDesks Function funcname Desk + \ desknum CurrentDesk NoIcons Icons OnlyIcons + \ NoNormal Normal OnlyNormal NoSticky Sticky + \ OnlySticky NoStickyAcrossPages + \ StickyAcrossPages OnlyStickyAcrossPages + \ NoStickyAcrossDesks StickyAcrossDesks + \ OnlyStickyAcrossDesks NoOnTop OnTop + \ OnlyOnTop NoOnBottom OnBottom OnlyOnBottom + \ Layer UseListSkip OnlyListSkip NoDeskSort + \ ReverseOrder CurrentAtEnd IconifiedAtEnd + \ UseIconName Alphabetic NotAlphabetic + \ SortByResource SortByClass NoHotkeys + \ SelectOnRelease + + syn keyword fvwmSpecialFn StartFunction InitFunction RestartFunction + \ ExitFunction SessionInitFunction + \ SessionRestartFunction SessionExitFunction + \ MissingSubmenuFunction WindowListFunc + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmKeyWin,fvwmKeyName + \ Key PointerKey + syn region fvwmKeyWin contained skipwhite nextgroup=fvwmKeyName + \ start='(' end=')' + syn case match + syn match fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ '\v<([a-zA-Z0-9]|F\d+|KP_\d)>' + syn keyword fvwmKeyName contained skipwhite nextgroup=fvwmKeyContext + \ BackSpace Begin Break Cancel Clear Delete + \ Down End Escape Execute Find Help Home + \ Insert KP_Add KP_Begin KP_Decimal KP_Delete + \ KP_Divide KP_Down KP_End KP_Enter KP_Equal + \ KP_Home KP_Insert KP_Left KP_Multiply + \ KP_Next KP_Page_Down KP_Page_Up KP_Prior + \ KP_Right KP_Separator KP_Space KP_Subtract + \ KP_Tab KP_Up Left Linefeed Menu Mode_switch + \ Next Num_Lock Page_Down Page_Up Pause Print + \ Prior Redo Return Right script_switch + \ Scroll_Lock Select Sys_Req Tab Undo Up space + \ exclam quotedbl numbersign dollar percent + \ ampersand apostrophe quoteright parenleft + \ parenright asterisk plus comma minus period + \ slash colon semicolon less equal greater + \ question at bracketleft backslash + \ bracketright asciicircum underscore grave + \ quoteleft braceleft bar braceright + \ asciitilde + + syn match fvwmKeyContext contained skipwhite nextgroup=fvwmKeyMods + \ '\v<[][RWDTS_F<^>vI0-9AM-]+>' + syn match fvwmKeyMods contained '\v[NCSMLA1-5]+' + syn case ignore + + syn keyword fvwmKeyword skipwhite nextgroup=fvwmMouseWin,fvwmMouseButton + \ Mouse + syn region fvwmMouseWin contained skipwhite nextgroup=fvwmMouseButton + \ start='(' end=')' + syn match fvwmMouseButton contained skipwhite nextgroup=fvwmKeyContext + \ '[0-5]' +endif + +" Define syntax highlighting groups + +" +" Common highlighting groups +" +hi def link fvwmComment Comment +hi def link fvwmEnvVar Macro +hi def link fvwmNumber Number +hi def link fvwmKeyword Keyword +hi def link fvwmPath Constant +hi def link fvwmModConf Macro +hi def link fvwmRGBValue Constant +hi def link fvwmString String +hi def link fvwmBackslash SpecialChar + + +" +" Highlighting groups for fvwm1 specific items +" +hi def link fvwmExec fvwmKeyword +hi def link fvwmKey fvwmKeyword +hi def link fvwmModule fvwmKeyword +hi def link fvwmFunction Function + +" +" Highlighting groups for fvwm2 specific items +" +hi def link fvwmSpecialFn Type +hi def link fvwmCursorStyle fvwmStyleNames +hi def link fvwmStyleNames Identifier +hi def link fvwmMStyleNames fvwmStyleNames +hi def link fvwmCSNames fvwmStyleNames +hi def link fvwmGradient fvwmStyleNames +hi def link fvwmCondNames fvwmStyleNames +hi def link fvwmTCNames fvwmStyleNames +hi def link fvwmTRNames fvwmStyleNames +hi def link fvwmWLOpts fvwmStyleNames + +hi def link fvwmBNum Number +hi def link fvwmBState Type +hi def link fvwmBStyleNames fvwmStyleNames +hi def link fvwmBStyleFlags Special + +hi def link fvwmBStateTF Constant +hi def link fvwmBStateNames fvwmStyleNames + +hi def link fvwmBdState fvwmBState +hi def link fvwmBdStyNames fvwmStyleNames +hi def link fvwmBdStyFlags fvwmBStyleFlags + +hi def link fvwmTState fvwmBState +hi def link fvwmTStyleNames fvwmStyleNames +hi def link fvwmMPmapNames fvwmBStyleFlags +hi def link fvwmTStyleFlags fvwmBStyleFlags + +hi def link fvwmDirection fvwmBStyleFlags + +hi def link fvwmKeyWin Constant +hi def link fvwmMouseWin fvwmKeyWin +hi def link fvwmKeyName Special +hi def link fvwmKeyContext fvwmKeyName +hi def link fvwmKeyMods fvwmKeyName +hi def link fvwmMouseButton fvwmKeyName + +hi def link fvwmMenuString String +hi def link fvwmIcon Type +hi def link fvwmShortcutKey SpecialChar + +hi def link fvwmModuleName Function + +let b:current_syntax = "fvwm" + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/syntax/gdb.vim b/syntax/gdb.vim new file mode 100644 index 000000000..0e0931bf2 --- /dev/null +++ b/syntax/gdb.vim @@ -0,0 +1,108 @@ +if polyglot#init#is_disabled(expand(':p'), 'gdb', 'syntax/gdb.vim') + finish +endif + +" Vim syntax file +" Language: GDB command files +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/gdb.vim +" Last Change: 2021 Nov 15 +" Additional changes by Simon Sobisch + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache +syn keyword gdbInfo contained display files float frame functions handle line +syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals +syn keyword gdbInfo contained source sources stack symbol target terminal threads +syn keyword gdbInfo contained syn keyword tracepoints types udot variables warranty watchpoints +syn match gdbInfo contained "all-registers" + + +syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands +syn keyword gdbStatement contained complete condition continue delete detach directory disable disas[semble] disp[lay] down +syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore +syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay +syn keyword gdbStatement contained passcount path print printf ptype python pwd quit rbreak remote return run rwatch +syn keyword gdbStatement contained search section set sharedlibrary shell show si signal skip source step stepi stepping +syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop +syn keyword gdbStatement contained tty und[isplay] unset until up watch whatis where while ws x +syn match gdbFuncDef "\.*" +syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef +syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty + +" some commonly used abbreviations +syn keyword gdbStatement c cont p py + +syn region gdbDocument matchgroup=gdbFuncDef start="\.*$" matchgroup=gdbFuncDef end="^end\s*$" + +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" +syn match gdbStatement "\" + +syn keyword gdbSet annotate architecture args check complaints confirm editing endian +syn keyword gdbSet environment gnutarget height history language listsize print prompt +syn keyword gdbSet radix remotebaud remotebreak remotecache remotedebug remotedevice remotelogbase +syn keyword gdbSet remotelogfile remotetimeout remotewritesize targetdebug variable verbose +syn keyword gdbSet watchdog width write +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" +syn match gdbSet "\" + +syn match gdbComment "^\s*#.*" contains=@Spell + +syn match gdbVariable "\$\K\k*" + +" Strings and constants +syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell +syn match gdbCharacter "'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError +syn match gdbCharacter "'\\''" contains=gdbSpecialChar +syn match gdbCharacter "'[^\\]'" +syn match gdbNumber "\<[0-9_]\+\>" +syn match gdbNumber "\<0x[0-9a-fA-F_]\+\>" + + +if !exists("gdb_minlines") + let gdb_minlines = 10 +endif +exec "syn sync ccomment gdbComment minlines=" . gdb_minlines + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link gdbFuncDef Function +hi def link gdbComment Comment +hi def link gdbStatement Statement +hi def link gdbString String +hi def link gdbCharacter Character +hi def link gdbVariable Identifier +hi def link gdbSet Constant +hi def link gdbInfo Type +hi def link gdbDocument Special +hi def link gdbNumber Number + +let b:current_syntax = "gdb" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/gdmo.vim b/syntax/gdmo.vim new file mode 100644 index 000000000..634111421 --- /dev/null +++ b/syntax/gdmo.vim @@ -0,0 +1,87 @@ +if polyglot#init#is_disabled(expand(':p'), 'gdmo', 'syntax/gdmo.vim') + finish +endif + +" Vim syntax file +" Language: GDMO +" (ISO-10165-4; Guidelines for the Definition of Managed Object) +" Maintainer: Gyuman (Chester) Kim +" URL: http://classicalprogrammer.wikidot.com/local--files/vim-syntax-file-for-gdmo/gdmo.vim +" Last change: 8th June, 2011 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" keyword definitions +syn match gdmoCategory "MANAGED\s\+OBJECT\s\+CLASS" +syn keyword gdmoCategory NOTIFICATION ATTRIBUTE BEHAVIOUR PACKAGE ACTION +syn match gdmoCategory "NAME\s\+BINDING" +syn match gdmoRelationship "DERIVED\s\+FROM" +syn match gdmoRelationship "SUPERIOR\s\+OBJECT\s\+CLASS" +syn match gdmoRelationship "SUBORDINATE\s\+OBJECT\s\+CLASS" +syn match gdmoExtension "AND\s\+SUBCLASSES" +syn match gdmoDefinition "DEFINED\s\+AS" +syn match gdmoDefinition "REGISTERED\s\+AS" +syn match gdmoExtension "ORDER\s\+BY" +syn match gdmoReference "WITH\s\+ATTRIBUTE" +syn match gdmoReference "WITH\s\+INFORMATION\s\+SYNTAX" +syn match gdmoReference "WITH\s\+REPLY\s\+SYNTAX" +syn match gdmoReference "WITH\s\+ATTRIBUTE\s\+SYNTAX" +syn match gdmoExtension "AND\s\+ATTRIBUTE\s\+IDS" +syn match gdmoExtension "MATCHES\s\+FOR" +syn match gdmoReference "CHARACTERIZED\s\+BY" +syn match gdmoReference "CONDITIONAL\s\+PACKAGES" +syn match gdmoExtension "PRESENT\s\+IF" +syn match gdmoExtension "DEFAULT\s\+VALUE" +syn match gdmoExtension "PERMITTED\s\+VALUES" +syn match gdmoExtension "REQUIRED\s\+VALUES" +syn match gdmoExtension "NAMED\s\+BY" +syn keyword gdmoReference ATTRIBUTES NOTIFICATIONS ACTIONS +syn keyword gdmoExtension DELETE CREATE +syn keyword gdmoExtension EQUALITY SUBSTRINGS ORDERING +syn match gdmoExtension "REPLACE-WITH-DEFAULT" +syn match gdmoExtension "GET" +syn match gdmoExtension "GET-REPLACE" +syn match gdmoExtension "ADD-REMOVE" +syn match gdmoExtension "WITH-REFERENCE-OBJECT" +syn match gdmoExtension "WITH-AUTOMATIC-INSTANCE-NAMING" +syn match gdmoExtension "ONLY-IF-NO-CONTAINED-OBJECTS" + + +" Strings and constants +syn match gdmoSpecial contained "\\\d\d\d\|\\." +syn region gdmoString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gdmoSpecial +syn match gdmoCharacter "'[^\\]'" +syn match gdmoSpecialCharacter "'\\.'" +syn match gdmoNumber "0[xX][0-9a-fA-F]\+\>" +syn match gdmoLineComment "--.*" +syn match gdmoLineComment "--.*--" + +syn match gdmoDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 +syn match gdmoBraces "[{}]" + +syn sync ccomment gdmoComment + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link gdmoCategory Structure +hi def link gdmoRelationship Macro +hi def link gdmoDefinition Statement +hi def link gdmoReference Type +hi def link gdmoExtension Operator +hi def link gdmoBraces Function +hi def link gdmoSpecial Special +hi def link gdmoString String +hi def link gdmoCharacter Character +hi def link gdmoSpecialCharacter gdmoSpecial +hi def link gdmoComment Comment +hi def link gdmoLineComment gdmoComment +hi def link gdmoType Type + + +let b:current_syntax = "gdmo" + +" vim: ts=8 diff --git a/syntax/gdscript3.vim b/syntax/gdscript3.vim deleted file mode 100644 index dd60b4501..000000000 --- a/syntax/gdscript3.vim +++ /dev/null @@ -1,101 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1 - -" Syntax file for GDScript - -if exists("b:current_syntax") - finish -endif -let b:current_syntax = "gdscript3" - -let s:save_cpo = &cpo -set cpo&vim - -syn keyword gdConditional if elif else match -syn keyword gdRepeat for while -syn keyword gdOperator and or not is in -syn match gdOperator "\V&&\|||\|!\|&\|^\||\|~\|*\|/\|%\|+\|-\|=\|<\|>" -syn match gdDelimiter "\V(\|)\|[\|]\|{\|}" -syn keyword gdStatement break continue pass return -syn keyword gdKeyword extends tool signal self - \ const enum var onready export setget -syn match gdKeyword "\v^\s*((static\s*)=func|class)" - \ nextgroup=gdFunction skipwhite -syn keyword gdBoolean true false - -syn match gdMember "\v<(\.)@<=[a-z_]+\w*>" -syn match gdFunction "\v<\w*>(\()@=" -syn match gdSignal "\v(\s+)@<=<\w+>" -syn match gdSetGet "\v(\s+)@<=<\w+>" -syn match gdSetGet "\v(\s+\w*\s*,\s*)@<=<\w+>" - -syn keyword gdNull null -syn keyword gdClass int float bool -syn match gdClass "\v<\u\w+>" -syn match gdConstant "\v<[A-Z_]+[A-Z0-9_]*>" -syn keyword gdClass AABB IP JSON OS RID -syn match gdNode "\v\$\a+\w*" - -syn region gdString start='\v\"' end='\v\"' -syn region gdString start='\v\'' end='\v\'' -syn match gdEscapeError "\v\\." containedin=gdString -syn match gdEscapeError "\v\\u.{,3}" containedin=gdString -syn match gdEscape "\v\\[abfnrtv\\'"]" containedin=gdString -syn match gdEscape "\v\\u[0-9]{4}" containedin=gdString - -syn match gdFormat "\v\%\%" containedin=gdString -syn match gdFormat "\v\%[+-]=(\d*|\*)=\.=(\d*|\*)=[scdoxXf]" containedin=gdString - -syn match gdNumber "\v<\d+(\.)@!>" -syn match gdNumber "\v<0x\x+(\.)@!>" -syn match gdFloat "\v<\d*\.\d+(\.)@!>" -syn match gdFloat "\v<\d*\.=\d+(e-=\d+)@=" -syn match gdExponent "\v(\d*\.=\d+)@<=e-=\d+>" - -syn match gdComment "\v#.*$" -syn keyword gdTodo TODO FIXME XXX NOTE BUG HACK OPTIMIZE containedin=gdComment - -syn region gdFunctionFold - \ start="\v^\z(\s*)%(%(static\s+)=func|class)>" - \ end="\v\ze%(\s*\n)+%(\z1\s)@!." - \ fold transparent - -syn region gdFold - \ matchgroup=gdComment - \ start='#.*{{{.*$' - \ end='#.*}}}.*$' - \ fold transparent - -hi def link gdConditional Conditional -hi def link gdRepeat Repeat -hi def link gdOperator Operator -hi def link gdDelimiter Delimiter -hi def link gdStatement Statement -hi def link gdKeyword Keyword -hi def link gdBoolean Boolean - -hi def link gdMember Identifier -hi def link gdFunction Function -hi def link gdSignal Function -hi def link gdSetGet Function - -hi def link gdNull Constant -hi def link gdClass Type -hi def link gdConstant Constant -hi def link gdNode Identifier - -hi def link gdString String -hi def link gdEscape Special -hi def link gdFormat Special -hi def link gdNumber Number -hi def link gdFloat Float -hi def link gdExponent Special - -hi def link gdEscapeError Error - -hi def link gdComment Comment -hi def link gdTodo Todo - -let &cpo = s:save_cpo -unlet s:save_cpo - -endif diff --git a/syntax/gedcom.vim b/syntax/gedcom.vim new file mode 100644 index 000000000..151f31d78 --- /dev/null +++ b/syntax/gedcom.vim @@ -0,0 +1,57 @@ +if polyglot#init#is_disabled(expand(':p'), 'gedcom', 'syntax/gedcom.vim') + finish +endif + +" Vim syntax file +" Language: Gedcom +" Maintainer: Paul Johnson (pjcj@transeda.com) +" Version 1.059 - 23rd December 1999 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax case match + +syntax keyword gedcom_record ABBR ADDR ADOP ADR1 ADR2 AFN AGE AGNC ALIA ANCE +syntax keyword gedcom_record ANCI ANUL ASSO AUTH BAPL BAPM BARM BASM BIRT BLES +syntax keyword gedcom_record BLOB BURI CALN CAST CAUS CENS CHAN CHAR CHIL CHR +syntax keyword gedcom_record CHRA CITY CONC CONF CONL CONT COPR CORP CREM CTRY +syntax keyword gedcom_record DATA DEAT DESC DESI DEST DIV DIVF DSCR EDUC EMIG +syntax keyword gedcom_record ENDL ENGA EVEN FAM FAMC FAMF FAMS FCOM FILE FORM +syntax keyword gedcom_record GEDC GIVN GRAD HEAD HUSB IDNO IMMI INDI LANG MARB +syntax keyword gedcom_record MARC MARL MARR MARS MEDI NATI NATU NCHI NICK NMR +syntax keyword gedcom_record NOTE NPFX NSFX OBJE OCCU ORDI ORDN PAGE PEDI PHON +syntax keyword gedcom_record PLAC POST PROB PROP PUBL QUAY REFN RELA RELI REPO +syntax keyword gedcom_record RESI RESN RETI RFN RIN ROLE SEX SLGC SLGS SOUR +syntax keyword gedcom_record SPFX SSN STAE STAT SUBM SUBN SURN TEMP TEXT TIME +syntax keyword gedcom_record TITL TRLR TYPE VERS WIFE WILL +syntax keyword gedcom_record DATE nextgroup=gedcom_date +syntax keyword gedcom_record NAME nextgroup=gedcom_name + +syntax case ignore + +syntax region gedcom_id start="@" end="@" oneline contains=gedcom_ii, gedcom_in +syntax match gedcom_ii "\I\+" contained nextgroup=gedcom_in +syntax match gedcom_in "\d\+" contained +syntax region gedcom_name start="" end="$" skipwhite oneline contains=gedcom_cname, gedcom_surname contained +syntax match gedcom_cname "\i\+" contained +syntax match gedcom_surname "/\(\i\|\s\)*/" contained +syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\)\s\+\d\+" +syntax match gedcom_date ".*" contained + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link gedcom_record Statement +hi def link gedcom_id Comment +hi def link gedcom_ii PreProc +hi def link gedcom_in Type +hi def link gedcom_name PreProc +hi def link gedcom_cname Type +hi def link gedcom_surname Identifier +hi def link gedcom_date Constant + + +let b:current_syntax = "gedcom" diff --git a/syntax/git.vim b/syntax/git.vim index 142478f88..165930705 100644 --- a/syntax/git.vim +++ b/syntax/git.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 +if polyglot#init#is_disabled(expand(':p'), 'git', 'syntax/git.vim') + finish +endif " Vim syntax file " Language: generic git output " Maintainer: Tim Pope -" Last Change: 2019 Dec 05 +" Last Change: 2022 Jan 05 if exists("b:current_syntax") finish @@ -14,48 +16,76 @@ syn sync minlines=50 syn include @gitDiff syntax/diff.vim -syn region gitHead start=/\%^/ end=/^$/ -syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/ - -" For git reflog and git show ...^{tree}, avoid sync issues -syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/ -syn match gitHead /^\x\{40\} \x\{40}\t.*/ +syn region gitHead start=/\%^\%(tag \|tree \|object \)\@=/ end=/^$/ contains=@NoSpell +syn region gitHead start=/\%(^commit\%( \x\{4,\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/ contains=@NoSpell +" git log --oneline +" minimize false positives by verifying contents of buffer +if getline(1) =~# '^\x\{7,\} ' && getline('$') =~# '^\x\{7,\} ' + syn match gitHashAbbrev /^\x\{7,\} \@=/ contains=@NoSpell +elseif getline(1) =~# '^[|\/\\_ ]\{-\}\*[|\/\\_ ]\{-\} \x\{7,\} ' + syn match gitHashAbbrev /^[|\/\\_ ]\{-\}\*[|\/\\_ ]\{-\} \zs\x\{7,\} \@=/ contains=@NoSpell +endif +" git log --graph +syn region gitGraph start=/\%(^[|\/\\_ ]*\*[|\/\\_ ]\{-\} commit\%( \x\{4,\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^\%([|\/\\_ ]*$\)\@=/ contains=@NoSpell +" git blame --porcelain +syn region gitHead start=/\%(^\x\{40,\} \d\+ \d\+\%( \d\+\)\=$\)\@=/ end=/^\t\@=/ contains=@NoSpell +" git ls-tree +syn match gitMode /^\d\{6\}\%( \%(blob\|tree\) \x\{4,\}\t\)\@=/ nextgroup=gitType skipwhite contains=@NoSpell +" git ls-files --stage +syn match gitMode /^\d\{6\}\%( \x\{4,\} [0-3]\t\)\@=/ nextgroup=gitHashStage skipwhite contains=@NoSpell +" .git/HEAD, .git/refs/ +syn match gitKeyword /\%^ref: \@=/ nextgroup=gitReference skipwhite contains=@NoSpell +syn match gitHash /\%^\x\{40,}\%$/ skipwhite contains=@NoSpell +" .git/logs/ +syn match gitReflog /^\x\{40,\} \x\{40,\} .\{-\}\d\+\s-\d\{4\}\t.*/ skipwhite contains=@NoSpell,gitReflogOld syn region gitDiff start=/^\%(diff --git \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\) \|$\)\@=/ contains=@gitDiff -syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff +syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff fold syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff -syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite -syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite -syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite -syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite -syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite -syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite -syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite +syn match gitKeyword /^commit \@=/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitKeyword /^\%(object\|tree\|parent\|encoding\|gpgsig\%(-\w\+\)\=\|previous\) \@=/ contained containedin=gitHead nextgroup=gitHash skipwhite contains=@NoSpell +syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitIdentityKeyword /^\%(author\|committer\|tagger\) \@=/ contained containedin=gitHead nextgroup=gitIdentity skipwhite contains=@NoSpell +syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite contains=@NoSpell +syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite contains=@NoSpell + +syn match gitKeyword /^[*|\/\\_ ]\+\zscommit \@=/ contained containedin=gitGraph nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitKeyword /^[|\/\\_ ]\+\zs\%(object\|tree\|parent\|encoding\|gpgsig\%(-\w\+\)\=\|previous\) \@=/ contained containedin=gitGraph nextgroup=gitHash skipwhite contains=@NoSpell +syn match gitKeyword /^[|\/\\_ ]\+\zsMerge:/ contained containedin=gitGraph nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitIdentityKeyword /^[|\/\\_ ]\+\zs\%(author\|committer\|tagger\) \@=/ contained containedin=gitGraph nextgroup=gitIdentity skipwhite contains=@NoSpell +syn match gitIdentityHeader /^[|\/\\_ ]\+\zs\%(Author\|Commit\|Tagger\):/ contained containedin=gitGraph nextgroup=gitIdentity skipwhite contains=@NoSpell +syn match gitDateHeader /^[|\/\\_ ]\+\zs\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitGraph nextgroup=gitDate skipwhite contains=@NoSpell + +syn match gitKeyword /^type \@=/ contained containedin=gitHead nextgroup=gitType skipwhite contains=@NoSpell +syn match gitKeyword /^\%(summary\|boundary\|filename\|\%(author\|committer\)-\%(time\|tz\)\) \@=/ contained containedin=gitHead skipwhite contains=@NoSpell +syn match gitKeyword /^tag \@=/ contained containedin=gitHead nextgroup=gitReference skipwhite contains=@NoSpell +syn match gitIdentityKeyword /^\%(author\|committer\)-mail \@=/ contained containedin=gitHead nextgroup=gitEmail skipwhite contains=@NoSpell +syn match gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite contains=@NoSpell +syn match gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite contains=@NoSpell +syn match gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity contains=@NoSpell + +syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite contains=@NoSpell +syn region gitEmail matchgroup=gitEmailDelimiter start=// keepend oneline contained containedin=gitIdentity contains=@NoSpell +syn match gitDate /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained contains=@NoSpell +syn match gitDate /-\=\d\+ [+-]\d\d\d\d\>/ contained contains=@NoSpell +syn match gitDate /\<\d\+ \l\+ ago\>/ contained contains=@NoSpell +syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitReference /\S\+\S\@!/ contained contains=@NoSpell +syn match gitHash /\<\x\{40,\}\>/ contained nextgroup=gitIdentity,gitHash skipwhite contains=@NoSpell +syn match gitReflogOld /^\x\{40,\} \@=/ contained nextgroup=gitReflogNew skipwhite contains=@NoSpell +syn match gitReflogNew /\<\x\{40,\} \@=/ contained nextgroup=gitIdentity skipwhite contains=@NoSpell +syn match gitHashAbbrev /\<\x\{4,\}\>/ contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite contains=@NoSpell +syn match gitHashStage /\<\x\{4,\}\>/ contained nextgroup=gitStage skipwhite contains=@NoSpell +syn match gitStage /\<\d\t\@=/ contained contains=@NoSpell -syn match gitReflogHeader /^Reflog:/ contained containedin=gitHead nextgroup=gitReflogMiddle skipwhite -syn match gitReflogHeader /^Reflog message:/ contained containedin=gitHead skipwhite -syn match gitReflogMiddle /\S\+@{\d\+} (/he=e-2 nextgroup=gitIdentity - -syn match gitDate /\<\u\l\l \u\l\l \d\=\d \d\d:\d\d:\d\d \d\d\d\d [+-]\d\d\d\d/ contained -syn match gitDate /-\=\d\+ [+-]\d\d\d\d\>/ contained -syn match gitDate /\<\d\+ \l\+ ago\>/ contained -syn match gitType /\<\%(tag\|commit\|tree\|blob\)\>/ contained nextgroup=gitHash skipwhite -syn match gitStage /\<\d\t\@=/ contained -syn match gitReference /\S\+\S\@!/ contained -syn match gitHash /\<\x\{40\}\>/ contained nextgroup=gitIdentity,gitStage,gitHash skipwhite -syn match gitHash /^\<\x\{40\}\>/ containedin=gitHead contained nextgroup=gitHash skipwhite -syn match gitHashAbbrev /\<\x\{4,40\}\>/ contained nextgroup=gitHashAbbrev skipwhite -syn match gitHashAbbrev /\<\x\{4,39\}\.\.\./he=e-3 contained nextgroup=gitHashAbbrev skipwhite - -syn match gitIdentity /\S.\{-\} <[^>]*>/ contained nextgroup=gitDate skipwhite -syn region gitEmail matchgroup=gitEmailDelimiter start=// keepend oneline contained containedin=gitIdentity syn match gitNotesHeader /^Notes:\ze\n / @@ -70,7 +100,10 @@ hi def link gitEmailDelimiter Delimiter hi def link gitEmail Special hi def link gitDate Number hi def link gitMode Number +hi def link gitHashStage gitHash hi def link gitHashAbbrev gitHash +hi def link gitReflogOld gitHash +hi def link gitReflogNew gitHash hi def link gitHash Identifier hi def link gitReflogMiddle gitReference hi def link gitReference Function @@ -80,5 +113,3 @@ hi def link gitDiffAdded diffAdded hi def link gitDiffRemoved diffRemoved let b:current_syntax = "git" - -endif diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index af5d42806..abd945770 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -1,75 +1,91 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 +if polyglot#init#is_disabled(expand(':p'), 'git', 'syntax/gitcommit.vim') + finish +endif " Vim syntax file " Language: git commit file " Maintainer: Tim Pope " Filenames: *.git/COMMIT_EDITMSG -" Last Change: 2019 Dec 05 +" Last Change: 2022 Jan 05 if exists("b:current_syntax") finish endif +scriptencoding utf-8 + syn case match syn sync minlines=50 +syn sync linebreaks=1 if has("spell") syn spell toplevel endif syn include @gitcommitDiff syntax/diff.vim -syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff +syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@gitcommitDiff syn match gitcommitSummary "^.*\%<51v." contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell syn match gitcommitOverflow ".*" contained contains=@Spell -syn match gitcommitBlank "^[^#].*" contained contains=@Spell +syn match gitcommitBlank "^.\+" contained contains=@Spell +syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank,gitcommitComment skipnl + +let s:scissors = 0 +let s:l = search('^[#;@!$%^&|:] -\{24,\} >8 -\{24,\}$', 'cnW', '', 100) +if s:l == 0 + let s:l = line('$') +elseif getline(s:l)[0] !=# getline(s:l - 1)[0] + let s:scissors = 1 +endif +let s:comment = escape((matchstr(getline(s:l), '^[#;@!$%^&|:]\S\@!') . '#')[0], '^$.*[]~\"/') -if get(g:, "gitcommit_cleanup") is# "scissors" - syn match gitcommitFirstLine "\%^.*" nextgroup=gitcommitBlank skipnl - syn region gitcommitComment start=/^# -\+ >8 -\+$/ end=/\%$/ contains=gitcommitDiff +if s:scissors + let s:comment .= ' -\{24,\} >8 -\{24,\}$' + exe 'syn region gitcommitComment start="^' . s:comment . '" end="\%$" contains=gitcommitDiff' else - syn match gitcommitFirstLine "\%^[^#].*" nextgroup=gitcommitBlank skipnl - syn match gitcommitComment "^#.*" + exe 'syn match gitcommitComment "^' . s:comment . '.*"' endif +exe 'syn match gitcommitTrailers "\n\@<=\n\%([[:alnum:]-]\+\s*:.*\|(cherry picked from commit .*\)\%(\n\s.*\|\n[[:alnum:]-]\+\s*:.*\|\n(cherry picked from commit .*\)*\%(\n\n*\%(' . s:comment . '\)\|\n*\%$\)\@="' -syn match gitcommitHash "\<\x\{40,}\>" contains=@NoSpell display -syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent -syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite -syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite -syn match gitcommitBranch "[^ ']\+" contained -syn match gitcommitNoBranch "\%(^# \)\@<=Not currently on any branch." contained containedin=gitcommitComment -syn match gitcommitHeader "\%(^# \)\@<=.*:$" contained containedin=gitcommitComment -syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^# \)\@<=\%(Author\|Committer\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent -syn match gitcommitNoChanges "\%(^# \)\@<=No changes$" contained containedin=gitcommitComment - -syn region gitcommitUntracked start=/^# Untracked files:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUntrackedFile fold -syn match gitcommitUntrackedFile "\t\@<=.*" contained +unlet s:l s:comment s:scissors -syn region gitcommitDiscarded start=/^# Change\%(s not staged for commit\|d but not updated\):/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitDiscardedType fold -syn region gitcommitSelected start=/^# Changes to be committed:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitSelectedType fold -syn region gitcommitUnmerged start=/^# Unmerged paths:/ end=/^#$\|^#\@!/ contains=gitcommitHeader,gitcommitHead,gitcommitUnmergedType fold +syn match gitcommitTrailerToken "^[[:alnum:]-]\+\s*:" contained containedin=gitcommitTrailers - -syn match gitcommitDiscardedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitDiscardedFile skipwhite -syn match gitcommitSelectedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitSelectedFile skipwhite -syn match gitcommitUnmergedType "\t\@<=[[:lower:]][^:]*[[:lower:]]: "he=e-2 contained containedin=gitcommitComment nextgroup=gitcommitUnmergedFile skipwhite -syn match gitcommitDiscardedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow -syn match gitcommitSelectedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow -syn match gitcommitUnmergedFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow +syn match gitcommitHash "\<\x\{40,}\>" contains=@NoSpell display +syn match gitcommitOnBranch "\%(^. \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite +syn match gitcommitOnBranch "\%(^. \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite +syn match gitcommitBranch "[^ ']\+" contained +syn match gitcommitNoBranch "\%(^. \)\@<=Not currently on any branch." contained containedin=gitcommitComment +syn match gitcommitHeader "\%(^. \)\@<=\S.*[::]\%(\n^$\)\@!$" contained containedin=gitcommitComment +syn region gitcommitAuthor matchgroup=gitCommitHeader start=/\%(^. \)\@<=\%(Author\|Committer\|Date\):/ end=/$/ keepend oneline contained containedin=gitcommitComment transparent +syn match gitcommitHeader "\%(^. \)\@<=commit\%( \x\{40,\}$\)\@=" contained containedin=gitcommitComment nextgroup=gitcommitHash skipwhite +syn match gitcommitNoChanges "\%(^. \)\@<=No changes$" contained containedin=gitcommitComment + +syn match gitcommitType "\%(^.\t\)\@<=[^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\ze "he=e-1 contained containedin=gitcommitComment nextgroup=gitcommitFile skipwhite +syn match gitcommitFile ".\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitArrow +syn match gitcommitArrow " -> " contained nextgroup=gitcommitFile +syn match gitcommitUntrackedFile "\%(^.\t\)\@<=[^::/]*\%(/.*\)\=$" contained containedin=gitcommitComment + +syn region gitcommitUntracked start=/^\z(.\) Untracked files:$/ end=/^\z1\=$\|^\z1\@!/ contains=gitcommitHeader containedin=gitcommitComment containedin=gitcommitComment contained transparent fold +syn region gitcommitDiscarded start=/^\z(.\) Change\%(s not staged for commit\|d but not updated\):$/ end=/^\z1\=$\|^\z1\@!/ contains=gitcommitHeader,gitcommitDiscardedType containedin=gitcommitComment containedin=gitcommitComment contained transparent fold +syn region gitcommitSelected start=/^\z(.\) Changes to be committed:$/ end=/^\z1$\|^\z1\@!/ contains=gitcommitHeader,gitcommitSelectedType containedin=gitcommitComment containedin=gitcommitComment contained transparent fold +syn region gitcommitUnmerged start=/^\z(.\) Unmerged paths:$/ end=/^\z1\=$\|^\z1\@!/ contains=gitcommitHeader,gitcommitUnmergedType containedin=gitcommitComment containedin=gitcommitComment contained transparent fold + +syn match gitcommitUntrackedFile "\%(^.\t\)\@<=.*" contained containedin=gitcommitUntracked + +syn match gitcommitDiscardedType "\%(^.\t\)\@<=[^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\ze "he=e-1 contained nextgroup=gitcommitDiscardedFile skipwhite +syn match gitcommitSelectedType "\%(^.\t\)\@<=[^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\ze "he=e-1 contained nextgroup=gitcommitSelectedFile skipwhite +syn match gitcommitUnmergedType "\%(^.\t\)\@<=[^[:punct:][:space:]][^/::]*[^[:punct:][:space:]][::]\ze "he=e-1 contained nextgroup=gitcommitUnmergedFile skipwhite +syn match gitcommitDiscardedFile "\S.\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitDiscardedArrow +syn match gitcommitSelectedFile "\S.\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitSelectedArrow +syn match gitcommitUnmergedFile "\S.\{-\}\%($\| -> \)\@=" contained nextgroup=gitcommitUnmergedArrow syn match gitcommitDiscardedArrow " -> " contained nextgroup=gitcommitDiscardedFile syn match gitcommitSelectedArrow " -> " contained nextgroup=gitcommitSelectedFile -syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitSelectedFile - -syn match gitcommitWarning "\%^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl -syn match gitcommitWarning "^[^#].*: needs merge$" nextgroup=gitcommitWarning skipnl contained -syn match gitcommitWarning "^\%(no changes added to commit\|nothing \%(added \)\=to commit\)\>.*\%$" +syn match gitcommitUnmergedArrow " -> " contained nextgroup=gitcommitUnmergedFile hi def link gitcommitSummary Keyword +hi def link gitcommitTrailerToken Label hi def link gitcommitComment Comment -hi def link gitcommitUntracked gitcommitComment -hi def link gitcommitDiscarded gitcommitComment -hi def link gitcommitSelected gitcommitComment -hi def link gitcommitUnmerged gitcommitComment hi def link gitcommitHash Identifier hi def link gitcommitOnBranch Comment hi def link gitcommitBranch Special @@ -93,5 +109,3 @@ hi def link gitcommitArrow gitcommitComment hi def link gitcommitBlank Error let b:current_syntax = "gitcommit" - -endif diff --git a/syntax/gitconfig.vim b/syntax/gitconfig.vim index af401431e..411af5915 100644 --- a/syntax/gitconfig.vim +++ b/syntax/gitconfig.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 +if polyglot#init#is_disabled(expand(':p'), 'git', 'syntax/gitconfig.vim') + finish +endif " Vim syntax file " Language: git config file @@ -36,5 +38,3 @@ hi def link gitconfigEscape Special hi def link gitconfigError Error let b:current_syntax = "gitconfig" - -endif diff --git a/syntax/gitignore.vim b/syntax/gitignore.vim new file mode 100644 index 000000000..b9d837ffb --- /dev/null +++ b/syntax/gitignore.vim @@ -0,0 +1,33 @@ +if polyglot#init#is_disabled(expand(':p'), 'gitignore', 'syntax/gitignore.vim') + finish +endif + +scriptencoding utf-8 + +" Copyright (c) 2017-2020 Filip Szymański. All rights reserved. +" Use of this source code is governed by an MIT license that can be +" found in the LICENSE file. + +if exists('b:current_syntax') + finish +endif + +" https://git-scm.com/docs/gitignore#_pattern_format +syntax keyword gitignoreTodo TODO FIXME XXX NOTE SEE contained +syntax match gitignoreComment '^#.*' contains=gitignoreTodo +syntax match gitignoreComment '\s#.*'ms=s+1 contains=gitignoreTodo +syntax match gitignoreNegation '^!' +syntax match gitignoreSeparator '/' +syntax match gitignoreWildcard '\(\\\)\@:p'), 'gitolite', 'syntax/gitolite.vim') + finish +endif + +" Vim syntax file +" Language: gitolite configuration +" URL: https://github.com/sitaramc/gitolite/blob/master/contrib/vim/syntax/gitolite.vim +" (https://raw.githubusercontent.com/sitaramc/gitolite/master/contrib/vim/syntax/gitolite.vim) +" Maintainer: Sitaram Chamarty +" (former Maintainer: Teemu Matilainen ) +" Last Change: 2017 Oct 05 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" this seems to be the best way, for now. +syntax sync fromstart + +" ---- common stuff + +syn match gitoliteGroup '@\S\+' + +syn match gitoliteComment '#.*' contains=gitoliteTodo +syn keyword gitoliteTodo TODO FIXME XXX NOT contained + +" ---- main section + +" catch template-data syntax appearing outside template-data section +syn match gitoliteRepoError '^\s*repo.*=' +syn match gitoliteRepoError '^\s*\S\+\s*=' " this gets overridden later when first word is a perm, don't worry + +" normal gitolite group and repo lines +syn match gitoliteGroupLine '^\s*@\S\+\s*=\s*\S.*$' contains=gitoliteGroup,gitoliteComment +syn match gitoliteRepoLine '^\s*repo\s\+[^=]*$' contains=gitoliteRepo,gitoliteGroup,gitoliteComment +syn keyword gitoliteRepo repo contained + +syn keyword gitoliteSpecialRepo CREATOR + +" normal gitolite rule lines +syn match gitoliteRuleLine '^\s*\(-\|C\|R\|RW+\?C\?D\?\)\s[^#]*' contains=gitoliteRule,gitoliteCreateRule,gitoliteDenyRule,gitoliteRefex,gitoliteUsers,gitoliteGroup +syn match gitoliteRule '\(^\s*\)\@<=\(-\|C\|R\|RW+\?C\?D\?\)\s\@=' contained +syn match gitoliteRefex '\(^\s*\(-\|R\|RW+\?C\?D\?\)\s\+\)\@<=\S.\{-}\(\s*=\)\@=' contains=gitoliteSpecialRefex +syn match gitoliteSpecialRefex 'NAME/' +syn match gitoliteSpecialRefex '/USER/' +syn match gitoliteCreateRule '\(^\s*C\s.*=\s*\)\@<=\S[^#]*[^# ]' contained contains=gitoliteGroup +syn match gitoliteDenyRule '\(^\s*-\s.*=\s*\)\@<=\S[^#]*[^# ]' contained + +" normal gitolite config (and similar) lines +syn match gitoliteConfigLine '^\s*\(config\|option\|include\|subconf\)\s[^#]*' contains=gitoliteConfigKW,gitoliteConfigKey,gitoliteConfigVal,gitoliteComment +syn keyword gitoliteConfigKW config option include subconf contained +syn match gitoliteConfigKey '\(\(config\|option\)\s\+\)\@<=[^ =]*' contained +syn match gitoliteConfigVal '\(=\s*\)\@<=\S.*' contained + +" ---- template-data section + +syn region gitoliteTemplateLine matchgroup=PreProc start='^=begin template-data$' end='^=end$' contains=gitoliteTplRepoLine,gitoliteTplRoleLine,gitoliteGroup,gitoliteComment,gitoliteTplError + +syn match gitoliteTplRepoLine '^\s*repo\s\+\S.*=.*' contained contains=gitoliteTplRepo,gitoliteTplTemplates,gitoliteGroup +syn keyword gitoliteTplRepo repo contained +syn match gitoliteTplTemplates '\(=\s*\)\@<=\S.*' contained contains=gitoliteGroup,gitoliteComment + +syn match gitoliteTplRoleLine '^\s*\S\+\s*=\s*.*' contained contains=gitoliteTplRole,gitoliteGroup,gitoliteComment +syn match gitoliteTplRole '\S\+\s*='he=e-1 contained + +" catch normal gitolite rules appearing in template-data section +syn match gitoliteTplError '^\s*repo[^=]*$' contained +syn match gitoliteTplError '^\s*\(-\|R\|RW+\?C\?D\?\)\s'he=e-1 contained +syn match gitoliteTplError '^\s*\(config\|option\|include\|subconf\)\s'he=e-1 contained +syn match gitoliteTplError '^\s*@\S\+\s*=' contained contains=NONE + +hi def link gitoliteGroup Identifier +hi def link gitoliteComment Comment +hi def link gitoliteTodo ToDo +hi def link gitoliteRepoError Error +hi def link gitoliteGroupLine PreProc +hi def link gitoliteRepo Keyword +hi def link gitoliteSpecialRepo PreProc +hi def link gitoliteRule Keyword +hi def link gitoliteCreateRule PreProc +hi def link gitoliteDenyRule WarningMsg +hi def link gitoliteRefex Constant +hi def link gitoliteSpecialRefex PreProc +hi def link gitoliteConfigKW Keyword +hi def link gitoliteConfigKey Identifier +hi def link gitoliteConfigVal String +hi def link gitoliteTplRepo Keyword +hi def link gitoliteTplTemplates Constant +hi def link gitoliteTplRole Constant +hi def link gitoliteTplError Error + +let b:current_syntax = "gitolite" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/gitrebase.vim b/syntax/gitrebase.vim index 4f2707b4b..5c94796dd 100644 --- a/syntax/gitrebase.vim +++ b/syntax/gitrebase.vim @@ -1,10 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 +if polyglot#init#is_disabled(expand(':p'), 'git', 'syntax/gitrebase.vim') + finish +endif " Vim syntax file " Language: git rebase --interactive " Maintainer: Tim Pope " Filenames: git-rebase-todo -" Last Change: 2019 Dec 06 +" Last Change: 2022 Jan 05 if exists("b:current_syntax") finish @@ -12,8 +14,10 @@ endif syn case match -syn match gitrebaseHash "\v<\x{7,}>" contained -syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite +let s:c = escape((matchstr(getline('$'), '^[#;@!$%^&|:]\S\@!') . '#')[0], '^$.*[]~\"/') + +syn match gitrebaseHash "\v<\x{7,}>" contained contains=@NoSpell +syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite contains=@NoSpell syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite @@ -28,12 +32,15 @@ syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite syn match gitrebaseReset "\v^(t|reset)=>" nextgroup=gitrebaseName skipwhite syn match gitrebaseSummary ".*" contains=gitrebaseHash contained syn match gitrebaseCommand ".*" contained -syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash +exe 'syn match gitrebaseComment " \@<=' . s:c . ' empty$" containedin=gitrebaseSummary contained' +exe 'syn match gitrebaseComment "^\s*' . s:c . '.*" contains=gitrebaseHash' syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained syn match gitrebaseMergeCommit "\v<\x{7,}>" nextgroup=gitrebaseName skipwhite contained syn match gitrebaseName "\v[^[:space:].*?i:^~/-]\S+" nextgroup=gitrebaseMergeComment skipwhite contained -syn match gitrebaseMergeComment "#" nextgroup=gitrebaseSummary skipwhite contained +exe 'syn match gitrebaseMergeComment "' . s:c . '" nextgroup=gitrebaseSummary skipwhite contained' + +unlet s:c hi def link gitrebaseCommit gitrebaseHash hi def link gitrebaseHash Identifier @@ -57,5 +64,3 @@ hi def link gitrebaseMergeComment gitrebaseComment hi def link gitrebaseName Tag let b:current_syntax = "gitrebase" - -endif diff --git a/syntax/gitsendemail.vim b/syntax/gitsendemail.vim index d4bfb8b32..1f44e7ead 100644 --- a/syntax/gitsendemail.vim +++ b/syntax/gitsendemail.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 +if polyglot#init#is_disabled(expand(':p'), 'git', 'syntax/gitsendemail.vim') + finish +endif " Vim syntax file " Language: git send-email message @@ -23,5 +25,3 @@ syn match gitsendemailComment "^GIT:.*" hi def link gitsendemailComment Comment let b:current_syntax = "gitsendemail" - -endif diff --git a/syntax/gkrellmrc.vim b/syntax/gkrellmrc.vim new file mode 100644 index 000000000..f26254e56 --- /dev/null +++ b/syntax/gkrellmrc.vim @@ -0,0 +1,79 @@ +if polyglot#init#is_disabled(expand(':p'), 'gkrellmrc', 'syntax/gkrellmrc.vim') + finish +endif + +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: gkrellm theme files `gkrellmrc' +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2003-04-30 +" URL: http://trific.ath.cx/Ftp/vim/syntax/gkrellmrc.vim + +" Setup +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=_,-,a-z,A-Z,48-57 + +syn case match + +" Base constructs +syn match gkrellmrcComment "#.*$" contains=gkrellmrcFixme +syn keyword gkrellmrcFixme FIXME TODO XXX NOT contained +syn region gkrellmrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline +syn match gkrellmrcNumber "^-\=\(\d\+\)\=\.\=\d\+" +syn match gkrellmrcNumber "\W-\=\(\d\+\)\=\.\=\d\+"lc=1 +syn keyword gkrellmrcConstant none +syn match gkrellmrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)\>" + +" Keywords +syn keyword gkrellmrcBuiltinExt cpu_nice_color cpu_nice_grid_color krell_depth krell_expand krell_left_margin krell_right_margin krell_x_hot krell_yoff mem_krell_buffers_depth mem_krell_buffers_expand mem_krell_buffers_x_hot mem_krell_buffers_yoff mem_krell_cache_depth mem_krell_cache_expand mem_krell_cache_x_hot mem_krell_cache_yoff sensors_bg_volt timer_bg_timer +syn keyword gkrellmrcGlobal allow_scaling author chart_width_ref theme_alternatives +syn keyword gkrellmrcSetCmd set_image_border set_integer set_string +syn keyword gkrellmrcGlobal bg_slider_meter_border bg_slider_panel_border +syn keyword gkrellmrcGlobal frame_bottom_height frame_left_width frame_right_width frame_top_height frame_left_chart_overlap frame_right_chart_overlap frame_left_panel_overlap frame_right_panel_overlap frame_left_spacer_overlap frame_right_spacer_overlap spacer_overlap_off cap_images_off +syn keyword gkrellmrcGlobal frame_bottom_border frame_left_border frame_right_border frame_top_border spacer_top_border spacer_bottom_border frame_left_chart_border frame_right_chart_border frame_left_panel_border frame_right_panel_border +syn keyword gkrellmrcGlobal chart_in_color chart_in_color_grid chart_out_color chart_out_color_grid +syn keyword gkrellmrcGlobal bg_separator_height bg_grid_mode +syn keyword gkrellmrcGlobal rx_led_x rx_led_y tx_led_x tx_led_y +syn keyword gkrellmrcGlobal decal_mail_frames decal_mail_delay +syn keyword gkrellmrcGlobal decal_alarm_frames decal_warn_frames +syn keyword gkrellmrcGlobal krell_slider_depth krell_slider_expand krell_slider_x_hot +syn keyword gkrellmrcGlobal button_panel_border button_meter_border +syn keyword gkrellmrcGlobal large_font normal_font small_font +syn keyword gkrellmrcGlobal spacer_bottom_height spacer_top_height spacer_bottom_height_chart spacer_top_height_chart spacer_bottom_height_meter spacer_top_height_meter +syn keyword gkrellmrcExpandMode left right bar-mode left-scaled right-scaled bar-mode-scaled +syn keyword gkrellmrcMeterName apm cal clock fs host mail mem swap timer sensors uptime +syn keyword gkrellmrcChartName cpu proc disk inet and net +syn match gkrellmrcSpecialClassName "\*" +syn keyword gkrellmrcStyleCmd StyleMeter StyleChart StylePanel +syn keyword gkrellmrcStyleItem textcolor alt_textcolor font alt_font transparency border label_position margin margins left_margin right_margin top_margin bottom_margin krell_depth krell_yoff krell_x_hot krell_expand krell_left_margin krell_right_margin + +" Define the default highlighting + +hi def link gkrellmrcComment Comment +hi def link gkrellmrcFixme Todo + +hi def link gkrellmrcString gkrellmrcConstant +hi def link gkrellmrcNumber gkrellmrcConstant +hi def link gkrellmrcRGBColor gkrellmrcConstant +hi def link gkrellmrcExpandMode gkrellmrcConstant +hi def link gkrellmrcConstant Constant + +hi def link gkrellmrcMeterName gkrellmrcClass +hi def link gkrellmrcChartName gkrellmrcClass +hi def link gkrellmrcSpecialClassName gkrellmrcClass +hi def link gkrellmrcClass Type + +hi def link gkrellmrcGlobal gkrellmrcItem +hi def link gkrellmrcBuiltinExt gkrellmrcItem +hi def link gkrellmrcStyleItem gkrellmrcItem +hi def link gkrellmrcItem Function + +hi def link gkrellmrcSetCmd Special +hi def link gkrellmrcStyleCmd Statement + + +let b:current_syntax = "gkrellmrc" diff --git a/syntax/gleam.vim b/syntax/gleam.vim new file mode 100644 index 000000000..c10877f0e --- /dev/null +++ b/syntax/gleam.vim @@ -0,0 +1,58 @@ +if polyglot#init#is_disabled(expand(':p'), 'gleam', 'syntax/gleam.vim') + finish +endif + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let b:current_syntax = "gleam" + +" Keywords +syntax keyword gleamKeyword + \ module import pub external + \ type let as if else todo const + \ case assert tuple try opaque +highlight link gleamKeyword Keyword + +" Function definition +syntax keyword gleamDef fn nextgroup=gleamFunctionDef skipwhite skipempty +highlight link gleamDef Keyword + +syntax match gleamFunctionDef "[a-z_-][0-9a-z_-]*" contained skipwhite skipnl +highlight link gleamFunctionDef Function + +" Int +syntax match gleamInt '\<[0-9][0-9_]*\>' +highlight link gleamInt Number + +" Float +syntax match gleamFloat '\<[0-9][0-9_]*\.[0-9_]*\>' +highlight link gleamFloat Float + +" Operators +syntax match gleamOperator "\([-!#$%`&\*\+./<=>@\\^|~:]\|\<\>\)" +highlight link gleamOperator Operator + +" Type +syntax match gleamType "\([a-z]\)\@:p'), 'glsl', 'syntax/glsl.vim') + finish +endif " Language: OpenGL Shading Language -" Maintainer: Sergey Tikhomirov +" Maintainer: Sergii Tykhomyrov if exists("b:current_syntax") && b:current_syntax == "glsl" finish @@ -49,6 +51,7 @@ syn keyword glslStructure struct nextgroup=glslIdentifier skipwhite skipempty syn match glslIdentifier contains=glslIdentifierPrime "\%([a-zA-Z_]\)\%([a-zA-Z0-9_]\)*" display contained " Types +syn keyword glslType accelerationStructureEXT syn keyword glslType atomic_uint syn keyword glslType bool syn keyword glslType bvec2 @@ -120,6 +123,7 @@ syn keyword glslType mat4 syn keyword glslType mat4x2 syn keyword glslType mat4x3 syn keyword glslType mat4x4 +syn keyword glslType rayQueryEXT syn keyword glslType sampler1D syn keyword glslType sampler1DArray syn keyword glslType sampler1DArrayShadow @@ -174,6 +178,8 @@ syn keyword glslQualifier align syn keyword glslQualifier attribute syn keyword glslQualifier binding syn keyword glslQualifier buffer +syn keyword glslQualifier callableDataEXT +syn keyword glslQualifier callableDataInEXT syn keyword glslQualifier ccw syn keyword glslQualifier centroid syn keyword glslQualifier centroid varying @@ -191,6 +197,7 @@ syn keyword glslQualifier flat syn keyword glslQualifier fractional_even_spacing syn keyword glslQualifier fractional_odd_spacing syn keyword glslQualifier highp +syn keyword glslQualifier hitAttributeEXT syn keyword glslQualifier in syn keyword glslQualifier index syn keyword glslQualifier inout @@ -208,6 +215,7 @@ syn keyword glslQualifier location syn keyword glslQualifier lowp syn keyword glslQualifier max_vertices syn keyword glslQualifier mediump +syn keyword glslQualifier nonuniformEXT syn keyword glslQualifier noperspective syn keyword glslQualifier offset syn keyword glslQualifier origin_upper_left @@ -233,6 +241,8 @@ syn keyword glslQualifier r8 syn keyword glslQualifier r8_snorm syn keyword glslQualifier r8i syn keyword glslQualifier r8ui +syn keyword glslQualifier rayPayloadEXT +syn keyword glslQualifier rayPayloadInEXT syn keyword glslQualifier readonly syn keyword glslQualifier restrict syn keyword glslQualifier rg16 @@ -263,6 +273,7 @@ syn keyword glslQualifier rgba8i syn keyword glslQualifier rgba8ui syn keyword glslQualifier row_major syn keyword glslQualifier sample +syn keyword glslQualifier shaderRecordEXT syn keyword glslQualifier shared syn keyword glslQualifier smooth syn keyword glslQualifier std140 @@ -277,11 +288,13 @@ syn keyword glslQualifier vertices syn keyword glslQualifier volatile syn keyword glslQualifier writeonly syn keyword glslQualifier xfb_buffer -syn keyword glslQualifier xfb_stride syn keyword glslQualifier xfb_offset +syn keyword glslQualifier xfb_stride " Built-in Constants syn keyword glslBuiltinConstant gl_CullDistance +syn keyword glslBuiltinConstant gl_HitKindBackFacingTriangleEXT +syn keyword glslBuiltinConstant gl_HitKindFrontFacingTriangleEXT syn keyword glslBuiltinConstant gl_MaxAtomicCounterBindings syn keyword glslBuiltinConstant gl_MaxAtomicCounterBufferSize syn keyword glslBuiltinConstant gl_MaxClipDistances @@ -361,6 +374,20 @@ syn keyword glslBuiltinConstant gl_MaxVertexUniformComponents syn keyword glslBuiltinConstant gl_MaxVertexUniformVectors syn keyword glslBuiltinConstant gl_MaxViewports syn keyword glslBuiltinConstant gl_MinProgramTexelOffset +syn keyword glslBuiltinConstant gl_RayFlagsCullBackFacingTrianglesEXT +syn keyword glslBuiltinConstant gl_RayFlagsCullFrontFacingTrianglesEXT +syn keyword glslBuiltinConstant gl_RayFlagsCullNoOpaqueEXT +syn keyword glslBuiltinConstant gl_RayFlagsCullOpaqueEXT +syn keyword glslBuiltinConstant gl_RayFlagsNoOpaqueEXT +syn keyword glslBuiltinConstant gl_RayFlagsNoneEXT +syn keyword glslBuiltinConstant gl_RayFlagsOpaqueEXT +syn keyword glslBuiltinConstant gl_RayFlagsSkipClosestHitShaderEXT +syn keyword glslBuiltinConstant gl_RayFlagsTerminateOnFirstHitEXT +syn keyword glslBuiltinConstant gl_RayQueryCandidateIntersectionAABBEXT +syn keyword glslBuiltinConstant gl_RayQueryCandidateIntersectionTriangleEXT +syn keyword glslBuiltinConstant gl_RayQueryCommittedIntersectionGeneratedEXT +syn keyword glslBuiltinConstant gl_RayQueryCommittedIntersectionNoneEXT +syn keyword glslBuiltinConstant gl_RayQueryCommittedIntersectionTriangleEXT " Built-in Variables syn keyword glslBuiltinVariable gl_BackColor @@ -391,10 +418,18 @@ syn keyword glslBuiltinVariable gl_FrontLightModelProduct syn keyword glslBuiltinVariable gl_FrontLightProduct syn keyword glslBuiltinVariable gl_FrontMaterial syn keyword glslBuiltinVariable gl_FrontSecondaryColor +syn keyword glslBuiltinVariable gl_GeometryIndexEXT syn keyword glslBuiltinVariable gl_GlobalInvocationID syn keyword glslBuiltinVariable gl_HelperInvocation +syn keyword glslBuiltinVariable gl_HitKindEXT +syn keyword glslBuiltinVariable gl_HitTEXT +syn keyword glslBuiltinVariable gl_IncomingRayFlagsEXT +syn keyword glslBuiltinVariable gl_InstanceCustomIndexEXT +syn keyword glslBuiltinVariable gl_InstanceID syn keyword glslBuiltinVariable gl_InstanceID syn keyword glslBuiltinVariable gl_InvocationID +syn keyword glslBuiltinVariable gl_LaunchIDEXT +syn keyword glslBuiltinVariable gl_LaunchSizeEXT syn keyword glslBuiltinVariable gl_Layer syn keyword glslBuiltinVariable gl_LightModel syn keyword glslBuiltinVariable gl_LightSource @@ -425,17 +460,24 @@ syn keyword glslBuiltinVariable gl_ObjectPlaneQ syn keyword glslBuiltinVariable gl_ObjectPlaneR syn keyword glslBuiltinVariable gl_ObjectPlaneS syn keyword glslBuiltinVariable gl_ObjectPlaneT +syn keyword glslBuiltinVariable gl_ObjectRayDirectionEXT +syn keyword glslBuiltinVariable gl_ObjectRayOriginEXT +syn keyword glslBuiltinVariable gl_ObjectToWorld3x4EXT +syn keyword glslBuiltinVariable gl_ObjectToWorldEXT syn keyword glslBuiltinVariable gl_PatchVerticesIn syn keyword glslBuiltinVariable gl_Point syn keyword glslBuiltinVariable gl_PointCoord syn keyword glslBuiltinVariable gl_PointSize syn keyword glslBuiltinVariable gl_Position syn keyword glslBuiltinVariable gl_PrimitiveID +syn keyword glslBuiltinVariable gl_PrimitiveID syn keyword glslBuiltinVariable gl_PrimitiveIDIn syn keyword glslBuiltinVariable gl_ProjectionMatrix syn keyword glslBuiltinVariable gl_ProjectionMatrixInverse syn keyword glslBuiltinVariable gl_ProjectionMatrixInverseTranspose syn keyword glslBuiltinVariable gl_ProjectionMatrixTranspose +syn keyword glslBuiltinVariable gl_RayTmaxEXT +syn keyword glslBuiltinVariable gl_RayTminEXT syn keyword glslBuiltinVariable gl_SampleID syn keyword glslBuiltinVariable gl_SampleMask syn keyword glslBuiltinVariable gl_SampleMaskIn @@ -452,9 +494,14 @@ syn keyword glslBuiltinVariable gl_TextureMatrixInverseTranspose syn keyword glslBuiltinVariable gl_TextureMatrixTranspose syn keyword glslBuiltinVariable gl_Vertex syn keyword glslBuiltinVariable gl_VertexID +syn keyword glslBuiltinVariable gl_VertexIndex syn keyword glslBuiltinVariable gl_ViewportIndex syn keyword glslBuiltinVariable gl_WorkGroupID syn keyword glslBuiltinVariable gl_WorkGroupSize +syn keyword glslBuiltinVariable gl_WorldRayDirectionEXT +syn keyword glslBuiltinVariable gl_WorldRayOriginEXT +syn keyword glslBuiltinVariable gl_WorldToObject3x4EXT +syn keyword glslBuiltinVariable gl_WorldToObjectEXT syn keyword glslBuiltinVariable gl_in syn keyword glslBuiltinVariable gl_out @@ -504,6 +551,7 @@ syn keyword glslBuiltinFunction determinant syn keyword glslBuiltinFunction distance syn keyword glslBuiltinFunction dot syn keyword glslBuiltinFunction equal +syn keyword glslBuiltinFunction executeCallableEXT syn keyword glslBuiltinFunction exp syn keyword glslBuiltinFunction exp2 syn keyword glslBuiltinFunction faceforward @@ -522,6 +570,7 @@ syn keyword glslBuiltinFunction fwidthFine syn keyword glslBuiltinFunction greaterThan syn keyword glslBuiltinFunction greaterThanEqual syn keyword glslBuiltinFunction groupMemoryBarrier +syn keyword glslBuiltinFunction ignoreIntersectionEXT syn keyword glslBuiltinFunction imageAtomicAdd syn keyword glslBuiltinFunction imageAtomicAnd syn keyword glslBuiltinFunction imageAtomicCompSwap @@ -575,8 +624,32 @@ syn keyword glslBuiltinFunction packUnorm2x16 syn keyword glslBuiltinFunction packUnorm4x8 syn keyword glslBuiltinFunction pow syn keyword glslBuiltinFunction radians +syn keyword glslBuiltinFunction rayQueryConfirmIntersectionEXT +syn keyword glslBuiltinFunction rayQueryGenerateIntersectionEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionBarycentricsEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionCandidateAABBOpaqueEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionFrontFaceEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionGeometryIndexEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionInstanceCustomIndexEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionInstanceIdEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionObjectRayDirectionEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionObjectRayOriginEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionObjectToWorldEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionPrimitiveIndexEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionTEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionTypeEXT +syn keyword glslBuiltinFunction rayQueryGetIntersectionWorldToObjectEXT +syn keyword glslBuiltinFunction rayQueryGetRayFlagsEXT +syn keyword glslBuiltinFunction rayQueryGetRayTMinEXT +syn keyword glslBuiltinFunction rayQueryGetWorldRayDirectionEXT +syn keyword glslBuiltinFunction rayQueryGetWorldRayOriginEXT +syn keyword glslBuiltinFunction rayQueryInitializeEXT +syn keyword glslBuiltinFunction rayQueryProceedEXT +syn keyword glslBuiltinFunction rayQueryTerminateEXT syn keyword glslBuiltinFunction reflect syn keyword glslBuiltinFunction refract +syn keyword glslBuiltinFunction reportIntersectionEXT syn keyword glslBuiltinFunction round syn keyword glslBuiltinFunction roundEven syn keyword glslBuiltinFunction shadow1D @@ -595,6 +668,7 @@ syn keyword glslBuiltinFunction sqrt syn keyword glslBuiltinFunction step syn keyword glslBuiltinFunction tan syn keyword glslBuiltinFunction tanh +syn keyword glslBuiltinFunction terminateRayEXT syn keyword glslBuiltinFunction texelFetch syn keyword glslBuiltinFunction texelFetchOffset syn keyword glslBuiltinFunction texture @@ -629,6 +703,7 @@ syn keyword glslBuiltinFunction textureProjOffset syn keyword glslBuiltinFunction textureQueryLevels syn keyword glslBuiltinFunction textureQueryLod syn keyword glslBuiltinFunction textureSize +syn keyword glslBuiltinFunction traceRayEXT syn keyword glslBuiltinFunction transpose syn keyword glslBuiltinFunction trunc syn keyword glslBuiltinFunction uaddCarry @@ -675,5 +750,3 @@ if !exists("b:current_syntax") endif " vim:set sts=2 sw=2 : - -endif diff --git a/syntax/gmpl.vim b/syntax/gmpl.vim index b157c0127..65289ac37 100644 --- a/syntax/gmpl.vim +++ b/syntax/gmpl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gmpl') == -1 +if polyglot#init#is_disabled(expand(':p'), 'gmpl', 'syntax/gmpl.vim') + finish +endif " Vim syntax file " Language: GMPL @@ -118,5 +120,3 @@ hi def link gmplType Type hi def link gmplLabel Keyword hi def link gmplString String hi def link gmplStringToken Special - -endif diff --git a/syntax/gnash.vim b/syntax/gnash.vim new file mode 100644 index 000000000..f585d0fe8 --- /dev/null +++ b/syntax/gnash.vim @@ -0,0 +1,100 @@ +if polyglot#init#is_disabled(expand(':p'), 'gnash', 'syntax/gnash.vim') + finish +endif + +" Vim syntax file +" Maintainer: Thilo Six +" Contact: +" http://www.vim.org/maillist.php#vim-dev +" +" Description: highlight gnash configuration files +" http://www.gnu.org/software/gnash/manual/gnashuser.html#gnashrc +" File: runtime/syntax/gnash.vim +" Last Change: 2012 May 19 +" Modeline: vim: ts=8:sw=2:sts=2: +" +" Credits: derived from Nikolai Weibulls readline.vim +" +" License: VIM License +" Vim is Charityware, see ":help Uganda" +" + +" quit when a syntax file was already loaded +if exists("b:current_syntax") || &compatible + finish +endif + +syn case match +syn keyword GnashTodo contained TODO FIXME XXX NOTE + +" Comments +syn match GnashComment "^#.*$" contains=@Spell,GnashTodo +syn match GnashComment "\s#.*$" contains=@Spell,GnashTodo + +syn match GnashNumber display '\<\d\+\>' + +syn case ignore +syn keyword GnashOn ON YES TRUE +syn keyword GnashOff OFF NO FALSE + +syn match GnashSet '^\s*set\>' +syn match GnashSet '^\s*append\>' + +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' +syn match GnashKeyword '\' + +hi def link GnashOn Identifier +hi def link GnashOff Preproc +hi def link GnashComment Comment +hi def link GnashTodo Todo +hi def link GnashNumber Type +hi def link GnashSet String +hi def link GnashKeyword Keyword + +let b:current_syntax = "gnash" + diff --git a/syntax/gnuplot.vim b/syntax/gnuplot.vim index 95ee7fd56..a9cd02acb 100644 --- a/syntax/gnuplot.vim +++ b/syntax/gnuplot.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gnuplot') == -1 +if polyglot#init#is_disabled(expand(':p'), 'gnuplot', 'syntax/gnuplot.vim') + finish +endif " Vim syntax file " Language: gnuplot 4.7.0 @@ -554,5 +556,3 @@ endif let b:current_syntax = "gnuplot" " vim: ts=8 - -endif diff --git a/syntax/go.vim b/syntax/go.vim index 93d6fbc4d..2d7dbde41 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/go.vim') + finish +endif " Copyright 2009 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -36,7 +38,7 @@ hi def link goLabel Label hi def link goRepeat Repeat " Predefined types -syn keyword goType chan map bool string error +syn keyword goType chan map bool string error any comparable syn keyword goSignedInts int int8 int16 int32 int64 rune syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr syn keyword goFloats float32 float64 @@ -106,6 +108,8 @@ else syn region goRawString start=+`+ end=+`+ endif +syn match goImportString /^\%(\s\+\|import \)\(\h\w* \)\?\zs"[^"]\+"$/ contained containedin=goImport + if go#config#HighlightFormatStrings() " [n] notation is valid for specifying explicit argument indexes " 1. Match a literal % not preceded by a %. @@ -123,6 +127,7 @@ if go#config#HighlightFormatStrings() hi def link goFormatSpecifier goSpecialString endif +hi def link goImportString String hi def link goString String hi def link goRawString String @@ -142,9 +147,9 @@ endif " import if go#config#FoldEnable('import') - syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment + syn region goImport start='import (' end=')' transparent fold contains=goImport,goImportString,goComment else - syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment + syn region goImport start='import (' end=')' transparent contains=goImport,goImportString,goComment endif " var, const @@ -164,14 +169,10 @@ endif syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst " Integers -syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>" -syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>" -syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>" -syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_]\|__\)\S*\|_\)\>" -syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>" -syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>" -syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>" -syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_]\S*\|__\S*\|_\)\>" +syn match goDecimalInt "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\>" +syn match goHexadecimalInt "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+\>" +syn match goOctalInt "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+\>" +syn match goBinaryInt "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+\>" hi def link goDecimalInt Integer hi def link goDecimalError Error @@ -184,19 +185,55 @@ hi def link goBinaryError Error hi def link Integer Number " Floating point -syn match goFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=\>" -syn match goFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=\>" +"float_lit = decimal_float_lit | hex_float_lit . +" +"decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] | +" decimal_digits decimal_exponent | +" "." decimal_digits [ decimal_exponent ] . +"decimal_exponent = ( "e" | "E" ) [ "+" | "-" ] decimal_digits . +" +"hex_float_lit = "0" ( "x" | "X" ) hex_mantissa hex_exponent . +"hex_mantissa = [ "_" ] hex_digits "." [ hex_digits ] | +" [ "_" ] hex_digits | +" "." hex_digits . +"hex_exponent = ( "p" | "P" ) [ "+" | "-" ] decimal_digits . +" decimal floats with a decimal point +syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\>\)\=" +syn match goFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%(\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\>\)\=" +" decimal floats without a decimal point +syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+\>" +" hexadecimal floats with a decimal point +syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>" +syn match goHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>" +" hexadecimal floats without a decimal point +syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+\>" hi def link goFloat Float +hi def link goHexadecimalFloat Float " Imaginary literals -syn match goImaginary "\<-\=\d\+i\>" -syn match goImaginary "\<-\=\d\+[Ee][-+]\=\d\+i\>" -syn match goImaginaryFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=i\>" -syn match goImaginaryFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=i\>" - -hi def link goImaginary Number -hi def link goImaginaryFloat Float +syn match goImaginaryDecimal "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)i\>" +syn match goImaginaryHexadecimal "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+i\>" +syn match goImaginaryOctal "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+i\>" +syn match goImaginaryBinary "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+i\>" + +" imaginary decimal floats with a decimal point +syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\)\=i\>" +syn match goImaginaryFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=i\>" +" imaginary decimal floats without a decimal point +syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+i\>" +" imaginary hexadecimal floats with a decimal point +syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>" +syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>" +" imaginary hexadecimal floats without a decimal point +syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+i\>" + +hi def link goImaginaryDecimal Number +hi def link goImaginaryHexadecimal Number +hi def link goImaginaryOctal Number +hi def link goImaginaryBinary Number +hi def link goImaginaryFloat Float +hi def link goImaginaryHexadecimalFloat Float " Spaces after "[]" if go#config#HighlightArrayWhitespaceError() @@ -265,6 +302,8 @@ if go#config#HighlightOperators() syn match goOperator /\%(<<\|>>\|&^\)=\?/ " match remaining two-char operators: := && || <- ++ -- syn match goOperator /:=\|||\|<-\|++\|--/ + " match ~ + syn match goOperator /\~/ " match ... hi def link goPointerOperator goOperator @@ -272,13 +311,37 @@ if go#config#HighlightOperators() endif hi def link goOperator Operator +" -> type constraint opening bracket +" |-> start non-counting group +" || -> any word character +" || | -> at least one, as many as possible +" || | | -> start non-counting group +" || | | | -> match ~ +" || | | | | -> at most once +" || | | | | | -> allow a slice type +" || | | | | | | -> any word character +" || | | | | | | | -> start a non-counting group +" || | | | | | | | | -> that matches word characters and | +" || | | | | | | | | | -> close the non-counting group +" || | | | | | | | | | | -> close the non-counting group +" || | | | | | | | | | | |-> any number of matches +" || | | | | | | | | | | || -> start a non-counting group +" || | | | | | | | | | | || | -> a comma and whitespace +" || | | | | | | | | | | || | | -> at most once +" || | | | | | | | | | | || | | | -> close the non-counting group +" || | | | | | | | | | | || | | | | -> at least one of those non-counting groups, as many as possible +" || | | | | | -------- | | | | || | | | | | -> type constraint closing bracket +" || | | | | || | | | | | || | | | | | | +syn match goTypeParams /\[\%(\w\+\s\+\%(\~\?\%(\[]\)\?\w\%(\w\||\)\)*\%(,\s*\)\?\)\+\]/ nextgroup=goSimpleParams,goDeclType contained + " Functions; if go#config#HighlightFunctions() || go#config#HighlightFunctionParameters() syn match goDeclaration /\/ nextgroup=goReceiver,goFunction,goSimpleParams skipwhite skipnl + syn match goReceiverDecl /(\s*\zs\%(\%(\w\+\s\+\)\?\*\?\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\)\ze\s*)/ contained contains=goReceiverVar,goReceiverType,goPointerOperator syn match goReceiverVar /\w\+\ze\s\+\%(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl - syn match goFunction /\w\+/ nextgroup=goSimpleParams contained skipwhite skipnl - syn match goReceiverType /\w\+/ contained + syn match goFunction /\w\+/ nextgroup=goSimpleParams,goTypeParams contained skipwhite skipnl + syn match goReceiverType /\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\ze\s*)/ contained if go#config#HighlightFunctionParameters() syn match goSimpleParams /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType nextgroup=goFunctionReturn skipwhite skipnl syn match goFunctionReturn /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType skipwhite skipnl @@ -288,7 +351,7 @@ if go#config#HighlightFunctions() || go#config#HighlightFunctionParameters() hi def link goReceiverVar goParamName hi def link goParamName Identifier endif - syn match goReceiver /(\s*\w\+\%(\s\+\*\?\s*\w\+\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl + syn match goReceiver /(\s*\%(\w\+\s\+\)\?\*\?\s*\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverDecl skipwhite skipnl else syn keyword goDeclaration func endif @@ -296,7 +359,7 @@ hi def link goFunction Function " Function calls; if go#config#HighlightFunctionCalls() - syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration + syn match goFunctionCall /\w\+\ze\%(\[\%(\%(\[]\)\?\w\+\(,\s*\)\?\)\+\]\)\?(/ contains=goBuiltins,goDeclaration endif hi def link goFunctionCall Type @@ -323,7 +386,7 @@ hi def link goField Identifier if go#config#HighlightTypes() syn match goTypeConstructor /\<\w\+{\@=/ syn match goTypeDecl /\/ nextgroup=goTypeName skipwhite skipnl - syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl + syn match goTypeName /\w\+/ contained nextgroup=goDeclType,goTypeParams skipwhite skipnl syn match goDeclType /\<\%(interface\|struct\)\>/ skipwhite skipnl hi def link goReceiverType Type else @@ -349,7 +412,7 @@ endif " Build Constraints if go#config#HighlightBuildConstraints() - syn match goBuildKeyword display contained "+build" + syn match goBuildKeyword display contained "+build\|go:build" " Highlight the known values of GOOS, GOARCH, and other +build options. syn keyword goBuildDirectives contained \ android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 @@ -363,7 +426,7 @@ if go#config#HighlightBuildConstraints() " The rs=s+2 option lets the \s*+build portion be part of the inner region " instead of the matchgroup so it will be highlighted as a goBuildKeyword. syn region goBuildComment matchgroup=goBuildCommentStart - \ start="//\s*+build\s"rs=s+2 end="$" + \ start="//\(\s*+build\s\|go:build\)"rs=s+2 end="$" \ contains=goBuildKeyword,goBuildDirectives hi def link goBuildCommentStart Comment hi def link goBuildDirectives Type @@ -424,8 +487,8 @@ function! s:hi() " :GoDebug commands if go#config#HighlightDebug() - hi GoDebugBreakpoint term=standout ctermbg=117 ctermfg=0 guibg=#BAD4F5 guifg=Black - hi GoDebugCurrent term=reverse ctermbg=12 ctermfg=7 guibg=DarkBlue guifg=White + hi def GoDebugBreakpoint term=standout ctermbg=117 ctermfg=0 guibg=#BAD4F5 guifg=Black + hi def GoDebugCurrent term=reverse ctermbg=12 ctermfg=7 guibg=DarkBlue guifg=White endif endfunction @@ -445,5 +508,3 @@ syn sync minlines=500 let b:current_syntax = "go" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugoutput.vim b/syntax/godebugoutput.vim index f00139365..badc512d2 100644 --- a/syntax/godebugoutput.vim +++ b/syntax/godebugoutput.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/godebugoutput.vim') + finish +endif if exists("b:current_syntax") finish @@ -13,5 +15,3 @@ hi def link godebugOutputErr Comment hi def link godebugOutputOut Normal " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugstacktrace.vim b/syntax/godebugstacktrace.vim index 2568100d3..d2ffb4cee 100644 --- a/syntax/godebugstacktrace.vim +++ b/syntax/godebugstacktrace.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/godebugstacktrace.vim') + finish +endif if exists("b:current_syntax") finish @@ -11,5 +13,3 @@ let b:current_syntax = "godebugoutput" hi def link godebugStacktrace SpecialKey " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godebugvariables.vim b/syntax/godebugvariables.vim index 7e7254729..341ad0a05 100644 --- a/syntax/godebugvariables.vim +++ b/syntax/godebugvariables.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/godebugvariables.vim') + finish +endif if exists("b:current_syntax") finish @@ -23,5 +25,3 @@ hi def link goType Type hi def link goBoolean Boolean " vim: sw=2 ts=2 et - -endif diff --git a/syntax/godefstack.vim b/syntax/godefstack.vim index 0b6ce1683..aa52464fd 100644 --- a/syntax/godefstack.vim +++ b/syntax/godefstack.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/godefstack.vim') + finish +endif if exists("b:current_syntax") finish @@ -20,5 +22,3 @@ hi def link godefStackFilename Directory hi def link godefStackEntryLocationNumber LineNr " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gohtmltmpl.vim b/syntax/gohtmltmpl.vim index 0cc7b955c..271ba5acf 100644 --- a/syntax/gohtmltmpl.vim +++ b/syntax/gohtmltmpl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/gohtmltmpl.vim') + finish +endif if exists("b:current_syntax") finish @@ -17,5 +19,3 @@ syn cluster htmlPreproc add=gotplAction,goTplComment let b:current_syntax = "gohtmltmpl" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gomod.vim b/syntax/gomod.vim index 11cd76862..4f120ffd3 100644 --- a/syntax/gomod.vim +++ b/syntax/gomod.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/gomod.vim') + finish +endif " gomod.vim: Vim syntax file for go.mod file " @@ -9,17 +11,22 @@ endif syntax case match +" Reference documentation: +" https://golang.org/ref/mod#go-mod-file-grammar + " match keywords syntax keyword gomodModule module syntax keyword gomodGo go contained syntax keyword gomodRequire require syntax keyword gomodExclude exclude syntax keyword gomodReplace replace +syntax keyword gomodRetract retract " require, exclude, replace, and go can be also grouped into block syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion +syntax region gomodRetract start='retract (' end=')' transparent contains=gomodVersionRange,gomodVersion syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion " set highlights @@ -28,6 +35,7 @@ highlight default link gomodGo Keyword highlight default link gomodRequire Keyword highlight default link gomodExclude Keyword highlight default link gomodReplace Keyword +highlight default link gomodRetract Keyword " comments are always in form of // ... syntax region gomodComment start="//" end="$" contains=@Spell @@ -45,7 +53,6 @@ highlight default link gomodReplaceOperator Operator syntax match gomodGoVersion "1\.\d\+" contained highlight default link gomodGoVersion Identifier - " highlight versions: " * vX.Y.Z-pre " * vX.Y.Z @@ -91,6 +98,15 @@ syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\. " ^------- version -------^^---------------- metadata ---------------------^ highlight default link gomodVersion Identifier -let b:current_syntax = "gomod" +" match go version ranges in retract directive +" https://golang.org/ref/mod#go-mod-file-retract +syntax region gomodVersionRange start="\[" end="\]" transparent matchgroup=gomodVersionRangeBracket contains=gomodVersion,gomodVersionRangeSeparator +highlight default link gomodVersionRange Operator +syntax match gomodVersionRangeBracket "\[" contained +syntax match gomodVersionRangeBracket "\]" contained +highlight default link gomodVersionRangeBracket Operator +syntax match gomodVersionRangeSeparator "," contained +highlight default link gomodVersionRangeSeparator Operator -endif + +let b:current_syntax = "gomod" diff --git a/syntax/gosum.vim b/syntax/gosum.vim new file mode 100644 index 000000000..559734302 --- /dev/null +++ b/syntax/gosum.vim @@ -0,0 +1,59 @@ +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/gosum.vim') + finish +endif + +" gosum.vim: Vim syntax file for go.sum file +" +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax case match + +" highlight versions: +" * vX.Y.Z-pre +" * vX.Y.Z +" * vX.0.0-yyyyymmddhhmmss-abcdefabcdef +" * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef +" * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef +" see https://godoc.org/golang.org/x/tools/internal/semver for more +" information about how semantic versions are parsed and +" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible +" are applied. + + +" match vX.Y.Z and their prereleases +syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?" +" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^ +" ^--------------------------------------- semantic version -------------------------------------------------------^ + +" match pseudo versions +" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+" +" when most recent version before target is a pre-release +syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+" +" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^ +" ^------------------------------------- semantic version --------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+" +" ^--- version ---^^--------------- metadata ---------------------^ + +" match incompatible vX.Y.Z and their prereleases +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible" +" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^ +" ^------------------------------------------- semantic version -----------------------------------------------------------^ + +" match incompatible pseudo versions +" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match gomodVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible" +" when most recent version before target is a pre-release +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^ +" ^---------------------------------------- semantic version ------------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------------- metadata ---------------------^ +highlight default link gomodVersion Identifier + +let b:current_syntax = "gomod" diff --git a/syntax/gotexttmpl.vim b/syntax/gotexttmpl.vim index 3d5f3926b..806f71b18 100644 --- a/syntax/gotexttmpl.vim +++ b/syntax/gotexttmpl.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1 +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/gotexttmpl.vim') + finish +endif " Copyright 2011 The Go Authors. All rights reserved. " Use of this source code is governed by a BSD-style @@ -68,16 +70,14 @@ syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goIn syn keyword gotplControl contained if else end range with template syn keyword gotplFunctions contained and html index js len not or print printf println urlquery eq ne lt le gt ge syn match gotplVariable contained /\$[a-zA-Z0-9_]*\>/ -syn match goTplIdentifier contained /\.[^\s}]+\>/ +syn match goTplIdentifier contained /\.[^[:blank:]}]\+\>/ hi def link gotplControl Keyword hi def link gotplFunctions Function hi def link goTplVariable Special syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display -syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display -syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display hi def link gotplAction PreProc hi def link goTplComment Comment @@ -85,5 +85,3 @@ hi def link goTplComment Comment let b:current_syntax = "gotexttmpl" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/gowork.vim b/syntax/gowork.vim new file mode 100644 index 000000000..eb641df28 --- /dev/null +++ b/syntax/gowork.vim @@ -0,0 +1,100 @@ +if polyglot#init#is_disabled(expand(':p'), 'go', 'syntax/gowork.vim') + finish +endif + +" gowork.vim: Vim syntax file for go.work file +" +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax case match + +" Reference documentation: +" https://go.dev/ref/mod#workspaces + +" match keywords +syntax keyword goworkGo go contained +syntax keyword goworkUse use +syntax keyword goworkExclude exclude +syntax keyword goworkReplace replace +syntax keyword goworkRetract retract + +" require, exclude, replace, and go can be also grouped into block +syntax region goworkUse start='require (' end=')' transparent contains=goworkUse,goworkPath +syntax region goworkReplace start='replace (' end=')' transparent contains=goworkReplace,goworkVersion +syntax match goworkGo '^go .*$' transparent contains=goworkGo,goworkGoVersion + +" set highlights +highlight default link goworkGo Keyword +highlight default link goworkUse Keyword +highlight default link goworkReplace Keyword + +" comments are always in form of // ... +syntax region goworkComment start="//" end="$" contains=@Spell +highlight default link goworkComment Comment + +" make sure quoted import paths are higlighted +syntax region goworkString start=+"+ skip=+\\\\\|\\"+ end=+"+ +highlight default link goworkString String + +" replace operator is in the form of '=>' +syntax match goworkReplaceOperator "\v\=\>" +highlight default link goworkReplaceOperator Operator + +" match go versions +syntax match goworkGoVersion "1\.\d\+" contained +highlight default link goworkGoVersion Identifier + + +" match paths in use directives +syntax match goworkPath "\f\+" + +highlight default link goworkPath Identifier +" highlight versions: +" * vX.Y.Z-pre +" * vX.Y.Z +" * vX.0.0-yyyyymmddhhmmss-abcdefabcdef +" * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef +" * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef +" see https://godoc.org/golang.org/x/tools/internal/semver for more +" information about how semantic versions are parsed and +" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible +" are applied. + + +" match vX.Y.Z and their prereleases +syntax match goworkVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?" +" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^ +" ^--------------------------------------- semantic version -------------------------------------------------------^ + +" match pseudo versions +" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match goworkVersion "v\d\+\.0\.0-\d\{14\}-\x\+" +" when most recent version before target is a pre-release +syntax match goworkVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+" +" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^ +" ^------------------------------------- semantic version --------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match goworkVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+" +" ^--- version ---^^--------------- metadata ---------------------^ + +" match incompatible vX.Y.Z and their prereleases +syntax match goworkVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible" +" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^ +" ^------------------------------------------- semantic version -----------------------------------------------------------^ + +" match incompatible pseudo versions +" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match goworkVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible" +" when most recent version before target is a pre-release +syntax match goworkVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^ +" ^---------------------------------------- semantic version ------------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match goworkVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------------- metadata ---------------------^ +highlight default link goworkVersion Identifier + +let b:current_syntax = "gowork" diff --git a/syntax/gp.vim b/syntax/gp.vim new file mode 100644 index 000000000..3e95009a4 --- /dev/null +++ b/syntax/gp.vim @@ -0,0 +1,87 @@ +if polyglot#init#is_disabled(expand(':p'), 'gp', 'syntax/gp.vim') + finish +endif + +" Vim syntax file +" Language: gp (version 2.5) +" Maintainer: Karim Belabas +" Last change: 2012 Jan 08 +" URL: http://pari.math.u-bordeaux.fr + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" control statements +syntax keyword gpStatement break return next +syntax keyword gpConditional if +syntax keyword gpRepeat until while for fordiv forell forprime +syntax keyword gpRepeat forsubgroup forstep forvec +" storage class +syntax keyword gpScope my local global +" defaults +syntax keyword gpInterfaceKey breakloop colors compatible +syntax keyword gpInterfaceKey datadir debug debugfiles debugmem +syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format +syntax keyword gpInterfaceKey graphcolormap graphcolors +syntax keyword gpInterfaceKey help histfile histsize +syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format +syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit +syntax keyword gpInterfaceKey prompt prompt_cont psfile +syntax keyword gpInterfaceKey readline realprecision recover +syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch +syntax keyword gpInterfaceKey TeXstyle timer + +syntax match gpInterface "^\s*\\[a-z].*" +syntax keyword gpInterface default +syntax keyword gpInput read input + +" functions +syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs +syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs +syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*" +syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1 + +" String and Character constants +" Highlight special (backslash'ed) characters differently +syntax match gpSpecial contained "\\[ent\\]" +syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial + +"comments +syntax region gpComment start="/\*" end="\*/" contains=gpTodo +syntax match gpComment "\\\\.*" contains=gpTodo +syntax keyword gpTodo contained TODO +syntax sync ccomment gpComment minlines=10 + +"catch errors caused by wrong parenthesis +syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial +syntax match gpParenError ")" +syntax match gpInParen contained "[{}]" + + +hi def link gpConditional Conditional +hi def link gpRepeat Repeat +hi def link gpError Error +hi def link gpParenError gpError +hi def link gpInParen gpError +hi def link gpStatement Statement +hi def link gpString String +hi def link gpComment Comment +hi def link gpInterface Type +hi def link gpInput Type +hi def link gpInterfaceKey Statement +hi def link gpFunction Function +hi def link gpScope Type +" contained ones +hi def link gpSpecial Special +hi def link gpTodo Todo +hi def link gpArgs Type + +let b:current_syntax = "gp" +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/gpg.vim b/syntax/gpg.vim new file mode 100644 index 000000000..677687442 --- /dev/null +++ b/syntax/gpg.vim @@ -0,0 +1,109 @@ +if polyglot#init#is_disabled(expand(':p'), 'gpg', 'syntax/gpg.vim') + finish +endif + +" Vim syntax file +" Language: gpg(1) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2010-10-14 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +setlocal iskeyword+=- + +syn keyword gpgTodo contained FIXME TODO XXX NOTE + +syn region gpgComment contained display oneline start='#' end='$' + \ contains=gpgTodo,gpgID,@Spell + +syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>' + +syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand + +syn keyword gpgCommand contained skipwhite nextgroup=gpgArg + \ check-sigs decrypt decrypt-files delete-key + \ delete-secret-and-public-key delete-secret-key + \ edit-key encrypt-files export export-all + \ export-ownertrust export-secret-keys + \ export-secret-subkeys fast-import fingerprint + \ gen-prime gen-random import import-ownertrust + \ list-keys list-public-keys list-secret-keys + \ list-sigs lsign-key nrsign-key print-md print-mds + \ recv-keys search-keys send-keys sign-key verify + \ verify-files +syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError + \ check-trustdb clearsign desig-revoke detach-sign + \ encrypt gen-key gen-revoke help list-packets + \ rebuild-keydb-caches sign store symmetric + \ update-trustdb version warranty + +syn keyword gpgOption contained skipwhite nextgroup=gpgArg + \ attribute-fd cert-digest-algo charset cipher-algo + \ command-fd comment completes-needed compress + \ compress-algo debug default-cert-check-level + \ default-key default-preference-list + \ default-recipient digest-algo disable-cipher-algo + \ disable-pubkey-algo encrypt-to exec-path + \ export-options group homedir import-options + \ keyring keyserver keyserver-options load-extension + \ local-user logger-fd marginals-needed max-cert-depth + \ notation-data options output override-session-key + \ passphrase-fd personal-cipher-preferences + \ personal-compress-preferences + \ personal-digest-preferences photo-viewer + \ recipient s2k-cipher-algo s2k-digest-algo s2k-mode + \ secret-keyring set-filename set-policy-url status-fd + \ trusted-key verify-options keyid-format list-options +syn keyword gpgOption contained skipwhite nextgroup=gpgArgError + \ allow-freeform-uid allow-non-selfsigned-uid + \ allow-secret-key-import always-trust + \ armor ask-cert-expire ask-sig-expire + \ auto-check-trustdb batch debug-all default-comment + \ default-recipient-self dry-run emit-version + \ emulate-md-encode-bug enable-special-filenames + \ escape-from-lines expert fast-list-mode + \ fixed-list-mode for-your-eyes-only + \ force-mdc force-v3-sigs force-v4-certs + \ gpg-agent-info ignore-crc-error ignore-mdc-error + \ ignore-time-conflict ignore-valid-from interactive + \ list-only lock-multiple lock-never lock-once + \ merge-only no no-allow-non-selfsigned-uid + \ no-armor no-ask-cert-expire no-ask-sig-expire + \ no-auto-check-trustdb no-batch no-comment + \ no-default-keyring no-default-recipient + \ no-encrypt-to no-expensive-trust-checks + \ no-expert no-for-your-eyes-only no-force-v3-sigs + \ no-force-v4-certs no-greeting no-literal + \ no-mdc-warning no-options no-permission-warning + \ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file + \ no-secmem-warning no-show-notation no-show-photos + \ no-show-policy-url no-sig-cache no-sig-create-check + \ no-sk-comments no-tty no-utf8-strings no-verbose + \ no-version not-dash-escaped openpgp pgp2 + \ pgp6 pgp7 preserve-permissions quiet rfc1991 + \ set-filesize show-keyring show-notation show-photos + \ show-policy-url show-session-key simple-sk-checksum + \ sk-comments skip-verify textmode throw-keyid + \ try-all-secrets use-agent use-embedded-filename + \ utf8-strings verbose with-colons with-fingerprint + \ with-key-data yes + +syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID +syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*' + +hi def link gpgComment Comment +hi def link gpgTodo Todo +hi def link gpgID Number +hi def link gpgOption Keyword +hi def link gpgCommand Error +hi def link gpgArgError Error + +let b:current_syntax = "gpg" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/grads.vim b/syntax/grads.vim new file mode 100644 index 000000000..542283df5 --- /dev/null +++ b/syntax/grads.vim @@ -0,0 +1,77 @@ +if polyglot#init#is_disabled(expand(':p'), 'grads', 'syntax/grads.vim') + finish +endif + +" Vim syntax file +" Language: grads (GrADS scripts) +" Maintainer: Stefan Fronzek (sfronzek at gmx dot net) +" Last change: 13 Feb 2004 + +" Grid Analysis and Display System (GrADS); http://grads.iges.org/grads +" This syntax file defines highlighting for only very few features of +" the GrADS scripting language. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" GrADS is entirely case-insensitive. +syn case ignore + +" The keywords + +syn keyword gradsStatement if else endif break exit return +syn keyword gradsStatement while endwhile say prompt pull function +syn keyword gradsStatement subwrd sublin substr read write close +" String + +syn region gradsString start=+'+ end=+'+ + +" Integer number +syn match gradsNumber "[+-]\=\<[0-9]\+\>" + +" Operator + +"syn keyword gradsOperator | ! % & != >= +"syn match gradsOperator "[^\.]not[^a-zA-Z]" + +" Variables + +syn keyword gradsFixVariables lat lon lev result rec rc +syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*" +syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*" +syn match gradsConst "#[A-Z][A-Z_]+" + +" Comments + +syn match gradsComment "\*.*" + +" Typical Typos + +" for C programmers: +" syn match gradsTypos "==" +" syn match gradsTypos "!=" + +" Define the default highlighting. +" Only when an item doesn't hgs highlighting+yet + +hi def link gradsStatement Statement + +hi def link gradsString String +hi def link gradsNumber Number + +hi def link gradsFixVariables Special +hi def link gradsVariables Identifier +hi def link gradsglobalVariables Special +hi def link gradsConst Special + +hi def link gradsClassMethods Function + +hi def link gradsOperator Operator +hi def link gradsComment Comment + +hi def link gradsTypos Error + + +let b:current_syntax = "grads" diff --git a/syntax/graphql.vim b/syntax/graphql.vim index 6ccbf03fb..fc2b79226 100644 --- a/syntax/graphql.vim +++ b/syntax/graphql.vim @@ -1,6 +1,8 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 +if polyglot#init#is_disabled(expand(':p'), 'graphql', 'syntax/graphql.vim') + finish +endif -" Copyright (c) 2016-2020 Jon Parise +" Copyright (c) 2016-2021 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to @@ -92,8 +94,8 @@ hi def link graphqlStructure Structure hi def link graphqlType Type hi def link graphqlVariable Identifier -syn sync minlines=500 +if !get(b:, 'graphql_nested_syntax') + syn sync minlines=500 +endif let b:current_syntax = 'graphql' - -endif diff --git a/syntax/gretl.vim b/syntax/gretl.vim new file mode 100644 index 000000000..5cd3b5776 --- /dev/null +++ b/syntax/gretl.vim @@ -0,0 +1,89 @@ +if polyglot#init#is_disabled(expand(':p'), 'gretl', 'syntax/gretl.vim') + finish +endif + +" Vim syntax file +" Language: gretl (http://gretl.sf.net) +" Maintainer: Vaidotas Zemlys +" Last Change: 2006 Apr 30 +" Filenames: *.inp *.gretl +" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=@,48-57,_,. + +syn case match + +" Constant +" string enclosed in double quotes +syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/ +" number with no fractional part or exponent +syn match gNumber /\d\+/ +" floating point number with integer and fractional parts and optional exponent +syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ +" floating point number with no integer part and optional exponent +syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ +" floating point number with no fractional part and optional exponent +syn match gFloat /\d\+[Ee][-+]\=\d\+/ + +" Gretl commands +syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls + +"Gretl genr functions +syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem + +" Identifier +" identifier with leading letter and optional following keyword characters +syn match gIdentifier /\a\k*/ + +" Variable with leading $ +syn match gVariable /\$\k*/ +" Arrow +syn match gArrow /<-/ + +" Special +syn match gDelimiter /[,;:]/ + +" Error +syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend +syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError +syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError +syn match gError /[)\]}]/ +syn match gBraceError /[)}]/ contained +syn match gCurlyError /[)\]]/ contained +syn match gParenError /[\]}]/ contained + +" Comment +syn match gComment /#.*/ +syn match gBCstart /(\*/ +syn match gBCend /\*)/ + +syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link gComment Comment +hi def link gCommentStart Comment +hi def link gBlockComment Comment +hi def link gString String +hi def link gNumber Number +hi def link gBoolean Boolean +hi def link gFloat Float +hi def link gCommands Repeat +hi def link gGenrFunc Type +hi def link gDelimiter Delimiter +hi def link gError Error +hi def link gBraceError Error +hi def link gCurlyError Error +hi def link gParenError Error +hi def link gIdentifier Normal +hi def link gVariable Identifier +hi def link gArrow Repeat + +let b:current_syntax="gretl" + +" vim: ts=8 sw=2 diff --git a/syntax/groovy.vim b/syntax/groovy.vim new file mode 100644 index 000000000..87fc89df7 --- /dev/null +++ b/syntax/groovy.vim @@ -0,0 +1,455 @@ +if polyglot#init#is_disabled(expand(':p'), 'groovy', 'syntax/groovy.vim') + finish +endif + +" Vim syntax file +" Language: Groovy +" Original Author: Alessio Pace +" Maintainer: Tobias Rapp +" Version: 0.1.18 +" URL: http://www.vim.org/scripts/script.php?script_id=945 +" Last Change: 2021 Feb 03 + +" THE ORIGINAL AUTHOR'S NOTES: +" +" This is my very first vim script, I hope to have +" done it the right way. +" +" I must directly or indirectly thank the author of java.vim and ruby.vim: +" I copied from them most of the stuff :-) +" +" Relies on html.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +" +" HOWTO USE IT (INSTALL) when not part of the distribution: +" +" 1) copy the file in the (global or user's $HOME/.vim/syntax/) syntax folder +" +" 2) add this line to recognize groovy files by filename extension: +" +" au BufNewFile,BufRead *.groovy setf groovy +" in the global vim filetype.vim file or inside $HOME/.vim/filetype.vim +" +" 3) add this part to recognize by content groovy script (no extension needed :-) +" +" if did_filetype() +" finish +" endif +" if getline(1) =~ '^#!.*[/\\]groovy\>' +" setf groovy +" endif +" +" in the global scripts.vim file or in $HOME/.vim/scripts.vim +" +" 4) open/write a .groovy file or a groovy script :-) +" +" Let me know if you like it or send me patches, so that I can improve it +" when I have time + +" 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='groovy' +endif + +let s:cpo_save = &cpo +set cpo&vim + +" ########################## +" Java stuff taken from java.vim +" some characters that cannot be in a groovy program (outside a string) +" syn match groovyError "[\\@`]" +"syn match groovyError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" +"syn match groovyOK "\.\.\." + +" keyword definitions +syn keyword groovyExternal native package +syn match groovyExternal "\\(\s\+static\>\)\?" +syn keyword groovyError goto const +syn keyword groovyConditional if else switch +syn keyword groovyRepeat while for do +syn keyword groovyBoolean true false +syn keyword groovyConstant null +syn keyword groovyTypedef this super +syn keyword groovyOperator new instanceof +syn keyword groovyType boolean char byte short int long float double +syn keyword groovyType void +syn keyword groovyType Integer Double Date Boolean Float String Array Vector List +syn keyword groovyStatement return +syn keyword groovyStorageClass static synchronized transient volatile final strictfp serializable +syn keyword groovyExceptions throw try catch finally +syn keyword groovyAssert assert +syn keyword groovyMethodDecl synchronized throws +syn keyword groovyClassDecl extends implements interface +" to differentiate the keyword class from MyClass.class we use a match here +syn match groovyTypedef "\.\s*\"ms=s+1 +syn keyword groovyClassDecl enum +syn match groovyClassDecl "^class\>" +syn match groovyClassDecl "[^.]\s*\"ms=s+1 +syn keyword groovyBranch break continue nextgroup=groovyUserLabelRef skipwhite +syn match groovyUserLabelRef "\k\+" contained +syn keyword groovyScopeDecl public protected private abstract + + +if exists("groovy_highlight_groovy_lang_ids") || exists("groovy_highlight_groovy_lang") || exists("groovy_highlight_all") + " groovy.lang.* + syn keyword groovyLangClass Closure MetaMethod GroovyObject + + syn match groovyJavaLangClass "\" + syn keyword groovyJavaLangClass Cloneable Comparable Runnable Serializable Boolean Byte Class Object + syn keyword groovyJavaLangClass Character CharSequence ClassLoader Compiler + " syn keyword groovyJavaLangClass Integer Double Float Long + syn keyword groovyJavaLangClass InheritableThreadLocal Math Number Object Package Process + syn keyword groovyJavaLangClass Runtime RuntimePermission InheritableThreadLocal + syn keyword groovyJavaLangClass SecurityManager Short StrictMath StackTraceElement + syn keyword groovyJavaLangClass StringBuffer Thread ThreadGroup + syn keyword groovyJavaLangClass ThreadLocal Throwable Void ArithmeticException + syn keyword groovyJavaLangClass ArrayIndexOutOfBoundsException AssertionError + syn keyword groovyJavaLangClass ArrayStoreException ClassCastException + syn keyword groovyJavaLangClass ClassNotFoundException + syn keyword groovyJavaLangClass CloneNotSupportedException Exception + syn keyword groovyJavaLangClass IllegalAccessException + syn keyword groovyJavaLangClass IllegalArgumentException + syn keyword groovyJavaLangClass IllegalMonitorStateException + syn keyword groovyJavaLangClass IllegalStateException + syn keyword groovyJavaLangClass IllegalThreadStateException + syn keyword groovyJavaLangClass IndexOutOfBoundsException + syn keyword groovyJavaLangClass InstantiationException InterruptedException + syn keyword groovyJavaLangClass NegativeArraySizeException NoSuchFieldException + syn keyword groovyJavaLangClass NoSuchMethodException NullPointerException + syn keyword groovyJavaLangClass NumberFormatException RuntimeException + syn keyword groovyJavaLangClass SecurityException StringIndexOutOfBoundsException + syn keyword groovyJavaLangClass UnsupportedOperationException + syn keyword groovyJavaLangClass AbstractMethodError ClassCircularityError + syn keyword groovyJavaLangClass ClassFormatError Error ExceptionInInitializerError + syn keyword groovyJavaLangClass IllegalAccessError InstantiationError + syn keyword groovyJavaLangClass IncompatibleClassChangeError InternalError + syn keyword groovyJavaLangClass LinkageError NoClassDefFoundError + syn keyword groovyJavaLangClass NoSuchFieldError NoSuchMethodError + syn keyword groovyJavaLangClass OutOfMemoryError StackOverflowError + syn keyword groovyJavaLangClass ThreadDeath UnknownError UnsatisfiedLinkError + syn keyword groovyJavaLangClass UnsupportedClassVersionError VerifyError + syn keyword groovyJavaLangClass VirtualMachineError + + syn keyword groovyJavaLangObject clone equals finalize getClass hashCode + syn keyword groovyJavaLangObject notify notifyAll toString wait + + hi def link groovyLangClass groovyConstant + hi def link groovyJavaLangClass groovyExternal + hi def link groovyJavaLangObject groovyConstant + syn cluster groovyTop add=groovyJavaLangObject,groovyJavaLangClass,groovyLangClass + syn cluster groovyClasses add=groovyJavaLangClass,groovyLangClass +endif + + +" Groovy stuff +syn match groovyOperator "\.\." +syn match groovyOperator "<\{2,3}" +syn match groovyOperator ">\{2,3}" +syn match groovyOperator "->" +syn match groovyLineComment '^\%1l#!.*' " Shebang line +syn match groovyExceptions "\\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" + +" Groovy JDK stuff +syn keyword groovyJDKBuiltin as def in +syn keyword groovyJDKOperOverl div minus plus abs round power multiply +syn keyword groovyJDKMethods each call inject sort print println +syn keyword groovyJDKMethods getAt putAt size push pop toList getText writeLine eachLine readLines +syn keyword groovyJDKMethods withReader withStream withWriter withPrintWriter write read leftShift +syn keyword groovyJDKMethods withWriterAppend readBytes splitEachLine +syn keyword groovyJDKMethods newInputStream newOutputStream newPrintWriter newReader newWriter +syn keyword groovyJDKMethods compareTo next previous isCase +syn keyword groovyJDKMethods times step toInteger upto any collect dump every find findAll grep +syn keyword groovyJDKMethods inspect invokeMethods join +syn keyword groovyJDKMethods getErr getIn getOut waitForOrKill +syn keyword groovyJDKMethods count tokenize asList flatten immutable intersect reverse reverseEach +syn keyword groovyJDKMethods subMap append asWritable eachByte eachLine eachFile +syn cluster groovyTop add=groovyJDKBuiltin,groovyJDKOperOverl,groovyJDKMethods + +" no useful I think, so I comment it.. +"if filereadable(expand(":p:h")."/groovyid.vim") + " source :p:h/groovyid.vim +"endif + +if exists("groovy_space_errors") + if !exists("groovy_no_trail_space_error") + syn match groovySpaceError "\s\+$" + endif + if !exists("groovy_no_tab_space_error") + syn match groovySpaceError " \+\t"me=e-1 + endif +endif + +" it is a better case construct than java.vim to match groovy syntax +syn region groovyLabelRegion transparent matchgroup=groovyLabel start="\" matchgroup=NONE end=":\|$" contains=groovyNumber,groovyString,groovyLangClass,groovyJavaLangClass +syn match groovyUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=groovyLabel +syn keyword groovyLabel default + +if !exists("groovy_allow_cpp_keywords") + syn keyword groovyError auto delete extern friend inline redeclared + syn keyword groovyError register signed sizeof struct template typedef union + syn keyword groovyError unsigned operator +endif + +" The following cluster contains all groovy groups except the contained ones +syn cluster groovyTop add=groovyExternal,groovyError,groovyError,groovyBranch,groovyLabelRegion,groovyLabel,groovyConditional,groovyRepeat,groovyBoolean,groovyConstant,groovyTypedef,groovyOperator,groovyType,groovyType,groovyStatement,groovyStorageClass,groovyAssert,groovyExceptions,groovyMethodDecl,groovyClassDecl,groovyClassDecl,groovyClassDecl,groovyScopeDecl,groovyError,groovyError2,groovyUserLabel,groovyLangObject + + +" Comments +syn keyword groovyTodo contained TODO FIXME XXX +if exists("groovy_comment_strings") + syn region groovyCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=groovySpecial,groovyCommentStar,groovySpecialChar,@Spell + syn region groovyComment2String contained start=+"+ end=+$\|"+ contains=groovySpecial,groovySpecialChar,@Spell + syn match groovyCommentCharacter contained "'\\[^']\{1,6\}'" contains=groovySpecialChar + syn match groovyCommentCharacter contained "'\\''" contains=groovySpecialChar + syn match groovyCommentCharacter contained "'[^\\]'" + syn cluster groovyCommentSpecial add=groovyCommentString,groovyCommentCharacter,groovyNumber + syn cluster groovyCommentSpecial2 add=groovyComment2String,groovyCommentCharacter,groovyNumber +endif +syn region groovyComment start="/\*" end="\*/" contains=@groovyCommentSpecial,groovyTodo,@Spell +syn match groovyCommentStar contained "^\s*\*[^/]"me=e-1 +syn match groovyCommentStar contained "^\s*\*$" +syn match groovyLineComment "//.*" contains=@groovyCommentSpecial2,groovyTodo,@Spell +hi def link groovyCommentString groovyString +hi def link groovyComment2String groovyString +hi def link groovyCommentCharacter groovyCharacter + +syn cluster groovyTop add=groovyComment,groovyLineComment + +if !exists("groovy_ignore_groovydoc") && main_syntax != 'jsp' + syntax case ignore + " syntax coloring for groovydoc comments (HTML) + " syntax include @groovyHtml :p:h/html.vim + syntax include @groovyHtml runtime! syntax/html.vim + unlet b:current_syntax + syntax spell default " added by Bram + syn region groovyDocComment start="/\*\*" end="\*/" keepend contains=groovyCommentTitle,@groovyHtml,groovyDocTags,groovyTodo,@Spell + syn region groovyCommentTitle contained matchgroup=groovyDocComment start="/\*\*" matchgroup=groovyCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@groovyHtml,groovyCommentStar,groovyTodo,@Spell,groovyDocTags + + syn region groovyDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" + syn match groovyDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=groovyDocParam + syn match groovyDocParam contained "\s\S\+" + syn match groovyDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" + syntax case match +endif + +" match the special comment /**/ +syn match groovyComment "/\*\*/" + +" Strings and constants +syn match groovySpecialError contained "\\." +syn match groovySpecialCharError contained "[^']" +syn match groovySpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\|\$\)" +syn match groovyRegexChar contained "\\." +syn region groovyString start=+"+ end=+"+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr +syn region groovyString start=+'+ end=+'+ end=+$+ contains=groovySpecialChar,groovySpecialError,@Spell +syn region groovyString start=+"""+ end=+"""+ contains=groovySpecialChar,groovySpecialError,@Spell,groovyELExpr +syn region groovyString start=+'''+ end=+'''+ contains=groovySpecialChar,groovySpecialError,@Spell +if exists("groovy_regex_strings") + " regex strings interfere with the division operator and thus are disabled + " by default + syn region groovyString start='/[^/*]' end='/' contains=groovySpecialChar,groovyRegexChar,groovyELExpr +endif +" syn region groovyELExpr start=+${+ end=+}+ keepend contained +syn match groovyELExpr /\${.\{-}}/ contained +" Fix: force use of the NFA regexp engine (2), see GitHub issue #7280 +syn match groovyELExpr /\%#=2\$[a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE_][a-zA-Z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\uFFFE0-9_.]*/ contained +hi def link groovyELExpr Identifier + +" TODO: better matching. I am waiting to understand how it really works in groovy +" syn region groovyClosureParamsBraces start=+|+ end=+|+ contains=groovyClosureParams +" syn match groovyClosureParams "[ a-zA-Z0-9_*]\+" contained +" hi def link groovyClosureParams Identifier + +" next line disabled, it can cause a crash for a long line +"syn match groovyStringError +"\([^"\\]\|\\.\)*$+ + +" disabled: in groovy strings or characters are written the same +" syn match groovyCharacter "'[^']*'" contains=groovySpecialChar,groovySpecialCharError +" syn match groovyCharacter "'\\''" contains=groovySpecialChar +" syn match groovyCharacter "'[^\\]'" +syn match groovyNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match groovyNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match groovyNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match groovyNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" unicode characters +syn match groovySpecial "\\u\d\{4\}" + +syn cluster groovyTop add=groovyString,groovyCharacter,groovyNumber,groovySpecial,groovyStringError + +if exists("groovy_highlight_functions") + if groovy_highlight_functions == "indent" + syn match groovyFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=groovyScopeDecl,groovyType,groovyStorageClass,@groovyClasses + syn region groovyFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=groovyScopeDecl,groovyType,groovyStorageClass,@groovyClasses + syn match groovyFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=groovyScopeDecl,groovyType,groovyStorageClass,@groovyClasses + syn region groovyFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=groovyScopeDecl,groovyType,groovyStorageClass,@groovyClasses + else + " This line catches method declarations at any indentation>0, but it assumes + " two things: + " 1. class names are always capitalized (ie: Button) + " 2. method names are never capitalized (except constructors, of course) + syn region groovyFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=groovyScopeDecl,groovyType,groovyStorageClass,groovyComment,groovyLineComment,@groovyClasses + endif + syn match groovyBraces "[{}]" + syn cluster groovyTop add=groovyFuncDef,groovyBraces +endif + +if exists("groovy_highlight_debug") + + " Strings and constants + syn match groovyDebugSpecial contained "\\\d\d\d\|\\." + syn region groovyDebugString contained start=+"+ end=+"+ contains=groovyDebugSpecial + syn match groovyDebugStringError +"\([^"\\]\|\\.\)*$+ + syn match groovyDebugCharacter contained "'[^\\]'" + syn match groovyDebugSpecialCharacter contained "'\\.'" + syn match groovyDebugSpecialCharacter contained "'\\''" + syn match groovyDebugNumber contained "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" + syn match groovyDebugNumber contained "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" + syn match groovyDebugNumber contained "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" + syn match groovyDebugNumber contained "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + syn keyword groovyDebugBoolean contained true false + syn keyword groovyDebugType contained null this super + syn region groovyDebugParen start=+(+ end=+)+ contained contains=groovyDebug.*,groovyDebugParen + + " to make this work you must define the highlighting for these groups + syn match groovyDebug "\\|\<[A-Z]\{1,}[a-zA-Z0-9]*Exception\>" + + +if !exists("groovy_minlines") + let groovy_minlines = 10 +endif +exec "syn sync ccomment groovyComment minlines=" . groovy_minlines + + +" ################### +" Groovy stuff +" syn match groovyOperator "|[ ,a-zA-Z0-9_*]\+|" + +" All groovy valid tokens +" syn match groovyTokens ";\|,\|<=>\|<>\|:\|:=\|>\|>=\|=\|==\|<\|<=\|!=\|/\|/=\|\.\.|\.\.\.\|\~=\|\~==" +" syn match groovyTokens "\*=\|&\|&=\|\*\|->\|\~\|+\|-\|/\|?\|<<<\|>>>\|<<\|>>" + +" Must put explicit these ones because groovy.vim mark them as errors otherwise +" syn match groovyTokens "<=>\|<>\|==\~" +"syn cluster groovyTop add=groovyTokens + +" Mark these as operators + +" Hightlight brackets +" syn match groovyBraces "[{}]" +" syn match groovyBraces "[\[\]]" +" syn match groovyBraces "[\|]" + +if exists("groovy_mark_braces_in_parens_as_errors") + syn match groovyInParen contained "[{}]" + hi def link groovyInParen groovyError + syn cluster groovyTop add=groovyInParen +endif + +" catch errors caused by wrong parenthesis +syn region groovyParenT transparent matchgroup=groovyParen start="(" end=")" contains=@groovyTop,groovyParenT1 +syn region groovyParenT1 transparent matchgroup=groovyParen1 start="(" end=")" contains=@groovyTop,groovyParenT2 contained +syn region groovyParenT2 transparent matchgroup=groovyParen2 start="(" end=")" contains=@groovyTop,groovyParenT contained +syn match groovyParenError ")" +hi def link groovyParenError groovyError + +" catch errors caused by wrong square parenthesis +syn region groovyParenT transparent matchgroup=groovyParen start="\[" end="\]" contains=@groovyTop,groovyParenT1 +syn region groovyParenT1 transparent matchgroup=groovyParen1 start="\[" end="\]" contains=@groovyTop,groovyParenT2 contained +syn region groovyParenT2 transparent matchgroup=groovyParen2 start="\[" end="\]" contains=@groovyTop,groovyParenT contained +syn match groovyParenError "\]" + +" ############################### +" java.vim default highlighting +hi def link groovyFuncDef Function +hi def link groovyBraces Function +hi def link groovyBranch Conditional +hi def link groovyUserLabelRef groovyUserLabel +hi def link groovyLabel Label +hi def link groovyUserLabel Label +hi def link groovyConditional Conditional +hi def link groovyRepeat Repeat +hi def link groovyExceptions Exception +hi def link groovyAssert Statement +hi def link groovyStorageClass StorageClass +hi def link groovyMethodDecl groovyStorageClass +hi def link groovyClassDecl groovyStorageClass +hi def link groovyScopeDecl groovyStorageClass +hi def link groovyBoolean Boolean +hi def link groovySpecial Special +hi def link groovySpecialError Error +hi def link groovySpecialCharError Error +hi def link groovyString String +hi def link groovyRegexChar String +hi def link groovyCharacter Character +hi def link groovySpecialChar SpecialChar +hi def link groovyNumber Number +hi def link groovyError Error +hi def link groovyStringError Error +hi def link groovyStatement Statement +hi def link groovyOperator Operator +hi def link groovyComment Comment +hi def link groovyDocComment Comment +hi def link groovyLineComment Comment +hi def link groovyConstant Constant +hi def link groovyTypedef Typedef +hi def link groovyTodo Todo + +hi def link groovyCommentTitle SpecialComment +hi def link groovyDocTags Special +hi def link groovyDocParam Function +hi def link groovyCommentStar groovyComment + +hi def link groovyType Type +hi def link groovyExternal Include + +hi def link htmlComment Special +hi def link htmlCommentPart Special +hi def link groovySpaceError Error +hi def link groovyJDKBuiltin Special +hi def link groovyJDKOperOverl Operator +hi def link groovyJDKMethods Function + + +let b:current_syntax = "groovy" +if main_syntax == 'groovy' + unlet main_syntax +endif + +let b:spell_options="contained" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/syntax/group.vim b/syntax/group.vim new file mode 100644 index 000000000..b689f77b0 --- /dev/null +++ b/syntax/group.vim @@ -0,0 +1,56 @@ +if polyglot#init#is_disabled(expand(':p'), 'group', 'syntax/group.vim') + finish +endif + +" Vim syntax file +" Language: group(5) user group file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2012-08-05 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match groupBegin display '^' nextgroup=groupName + +syn match groupName contained display '[^:]\+' + \ nextgroup=groupPasswordColon + +syn match groupPasswordColon contained display ':' + \ nextgroup=groupPassword,groupShadow + +syn match groupPassword contained display '[^:]*' + \ nextgroup=groupGIDColon + +syn match groupShadow contained display '[x*]' nextgroup=groupGIDColon + +syn match groupGIDColon contained display ':' nextgroup=groupGID + +syn match groupGID contained display '\d*' + \ nextgroup=groupUserListColon + +syn match groupUserListColon contained display ':' nextgroup=groupUserList + +syn match groupUserList contained '[^,]\+' + \ nextgroup=groupUserListSep + +syn match groupUserListSep contained display ',' nextgroup=groupUserList + +hi def link groupDelimiter Normal +hi def link groupName Identifier +hi def link groupPasswordColon groupDelimiter +hi def link groupPassword Number +hi def link groupShadow Special +hi def link groupGIDColon groupDelimiter +hi def link groupGID Number +hi def link groupUserListColon groupDelimiter +hi def link groupUserList Identifier +hi def link groupUserListSep groupDelimiter + +let b:current_syntax = "group" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/grub.vim b/syntax/grub.vim index b752209de..56c5537d5 100644 --- a/syntax/grub.vim +++ b/syntax/grub.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 +if polyglot#init#is_disabled(expand(':p'), 'grub', 'syntax/grub.vim') + finish +endif " Vim syntax file " Language: grub(8) configuration file @@ -93,5 +95,3 @@ let b:current_syntax = "grub" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/syntax/gsl.vim b/syntax/gsl.vim deleted file mode 100644 index 6118a3af1..000000000 --- a/syntax/gsl.vim +++ /dev/null @@ -1,63 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdscript') == -1 - -" Syntax file for Godot Shading Language - -if exists("b:current_syntax") - finish -endif -let b:current_syntax = "gsl" - -let s:save_cpo = &cpo -set cpo&vim - -syn keyword gslConditional if else -syn keyword gslRepeat for while -syn match gslOperator "\V&&\|||\|!\|&\|^\||\|~\|*\|/\|%\|+\|-\|=\|<\|>\|;" -syn match gslDelimiter "\V(\|)\|[\|]\|{\|}" -syn keyword gslStatement return discard -syn keyword gslBoolean true false - -syn keyword gslKeyword shader_type render_mode varying flat noperspective smooth - \ uniform lowp mediump highp in out inout - -syn keyword gslType void bool bvec2 bvec3 bvec4 int ivec2 ivec3 ivec4 - \ uint uvec2 uvec3 uvec4 float vec2 vec3 vec4 - \ mat2 mat3 mat4 sampler2D isampler2D usampler2D samplerCube - -syn match gslMember "\v<(\.)@<=[a-z_]+\w*>" -syn match gslConstant "\v<[A-Z_]+[A-Z0-9_]*>" -syn match gslFunction "\v<\w*>(\()@=" - -syn match gslNumber "\v<\d+(\.)@!>" -syn match gslFloat "\v<\d*\.\d+(\.)@!>" -syn match gslFloat "\v<\d*\.=\d+(e-=\d+)@=" -syn match gslExponent "\v(\d*\.=\d+)@<=e-=\d+>" - -syn match gslComment "\v//.*$" -syn region gslComment start="/\*" end="\*/" -syn keyword gslTodo TODO FIXME XXX NOTE BUG HACK OPTIMIZE containedin=gslComment - -hi def link gslConditional Conditional -hi def link gslRepeat Repeat -hi def link gslOperator Operator -hi def link gslDelimiter Delimiter -hi def link gslStatement Statement -hi def link gslBoolean Boolean - -hi def link gslKeyword Keyword -hi def link gslMember Identifier -hi def link gslConstant Constant -hi def link gslFunction Function -hi def link gslType Type - -hi def link gslNumber Number -hi def link gslFloat Float -hi def link gslExponent Special - -hi def link gslComment Comment -hi def link gslTodo Todo - -let &cpo = s:save_cpo -unlet s:save_cpo - -endif diff --git a/syntax/gsp.vim b/syntax/gsp.vim new file mode 100644 index 000000000..a390e7680 --- /dev/null +++ b/syntax/gsp.vim @@ -0,0 +1,58 @@ +if polyglot#init#is_disabled(expand(':p'), 'gsp', 'syntax/gsp.vim') + finish +endif + +" Vim syntax file +" Language: GSP - GNU Server Pages (v. 0.86) +" Created By: Nathaniel Harward nharward@yahoo.com +" Last Changed: 2012 Jan 08 by Thilo Six +" Filenames: *.gsp +" URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'gsp' +endif + +" Source HTML syntax +runtime! syntax/html.vim +unlet b:current_syntax + +syn case match + +" Include Java syntax +syn include @gspJava syntax/java.vim + +let s:cpo_save = &cpo +set cpo&vim + +" Add as an HTML tag name along with its args +syn keyword htmlTagName contained java +syn keyword htmlArg contained type file page + +" Redefine some HTML things to include (and highlight) gspInLine code in +" places where it's likely to be found +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlEndTag start=++ contains=htmlTagN,htmlTagError,gspInLine +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine +syn match htmlTagN contained +[^>]*\>" end=""me=e-7 contains=@gspJava,htmlTag +syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava + +let b:current_syntax = "gsp" + +if main_syntax == 'gsp' + unlet main_syntax +endif + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/gtkrc.vim b/syntax/gtkrc.vim new file mode 100644 index 000000000..42d0c5f69 --- /dev/null +++ b/syntax/gtkrc.vim @@ -0,0 +1,130 @@ +if polyglot#init#is_disabled(expand(':p'), 'gtkrc', 'syntax/gtkrc.vim') + finish +endif + +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Gtk+ theme files `gtkrc' +" Maintainer: David Ne\v{c}as (Yeti) +" Last Change: 2002-10-31 +" URL: http://trific.ath.cx/Ftp/vim/syntax/gtkrc.vim + +" Setup +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword=_,-,a-z,A-Z,48-57 + +syn case match + +" Base constructs +syn match gtkrcComment "#.*$" contains=gtkrcFixme +syn keyword gtkrcFixme FIXME TODO XXX NOT contained +syn region gtkrcACString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcWPathSpecial,gtkrcClassName,gtkrcClassNameGnome contained +syn region gtkrcBString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcKeyMod contained +syn region gtkrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gtkrcStockName,gtkrcPathSpecial,gtkrcRGBColor +syn match gtkrcPathSpecial "" contained +syn match gtkrcWPathSpecial "[*?.]" contained +syn match gtkrcNumber "^\(\d\+\)\=\.\=\d\+" +syn match gtkrcNumber "\W\(\d\+\)\=\.\=\d\+"lc=1 +syn match gtkrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)" contained +syn cluster gtkrcPRIVATE add=gtkrcFixme,gtkrcPathSpecial,gtkrcWPathSpecial,gtkrcRGBColor,gtkrcACString + +" Keywords +syn keyword gtkrcInclude include +syn keyword gtkrcPathSet module_path pixmap_path +syn keyword gtkrcTop binding style +syn keyword gtkrcTop widget widget_class nextgroup=gtkrcACString skipwhite +syn keyword gtkrcTop class nextgroup=gtkrcACString skipwhite +syn keyword gtkrcBind bind nextgroup=gtkrcBString skipwhite +syn keyword gtkrcStateName NORMAL INSENSITIVE PRELIGHT ACTIVE SELECTED +syn keyword gtkrcPriorityName HIGHEST RC APPLICATION GTK LOWEST +syn keyword gtkrcPriorityName highest rc application gtk lowest +syn keyword gtkrcTextDirName LTR RTL +syn keyword gtkrcStyleKeyword fg bg fg_pixmap bg_pixmap bg_text base font font_name fontset stock text +syn match gtkrcKeyMod "<\(alt\|ctrl\|control\|mod[1-5]\|release\|shft\|shift\)>" contained +syn cluster gtkrcPRIVATE add=gtkrcKeyMod + +" Enums and engine words +syn keyword gtkrcKeyword engine image +syn keyword gtkrcImage arrow_direction border detail file gap_border gap_end_border gap_end_file gap_file gap_side gap_side gap_start_border gap_start_file orientation overlay_border overlay_file overlay_stretch recolorable shadow state stretch thickness +syn keyword gtkrcConstant TRUE FALSE NONE IN OUT LEFT RIGHT TOP BOTTOM UP DOWN VERTICAL HORIZONTAL ETCHED_IN ETCHED_OUT +syn keyword gtkrcFunction function nextgroup=gtkrcFunctionEq skipwhite +syn match gtkrcFunctionEq "=" nextgroup=gtkrcFunctionName contained skipwhite +syn keyword gtkrcFunctionName ARROW BOX BOX_GAP CHECK CROSS DIAMOND EXTENSION FLAT_BOX FOCUS HANDLE HLINE OPTION OVAL POLYGON RAMP SHADOW SHADOW_GAP SLIDER STRING TAB VLINE contained +syn cluster gtkrcPRIVATE add=gtkrcFunctionName,gtkrcFunctionEq + +" Class names +syn keyword gtkrcClassName GtkAccelLabel GtkAdjustment GtkAlignment GtkArrow GtkAspectFrame GtkBin GtkBox GtkButton GtkButtonBox GtkCList GtkCTree GtkCalendar GtkCheckButton GtkCheckMenuItem GtkColorSelection GtkColorSelectionDialog GtkCombo GtkContainer GtkCurve GtkData GtkDialog GtkDrawingArea GtkEditable GtkEntry GtkEventBox GtkFileSelection GtkFixed GtkFontSelection GtkFontSelectionDialog GtkFrame GtkGammaCurve GtkHBox GtkHButtonBox GtkHPaned GtkHRuler GtkHScale GtkHScrollbar GtkHSeparator GtkHandleBox GtkImage GtkImageMenuItem GtkInputDialog GtkInvisible GtkItem GtkItemFactory GtkLabel GtkLayout GtkList GtkListItem GtkMenu GtkMenuBar GtkMenuItem GtkMenuShell GtkMessageDialog GtkMisc GtkNotebook GtkObject GtkOptionMenu GtkPacker GtkPaned GtkPixmap GtkPlug GtkPreview GtkProgress GtkProgressBar GtkRadioButton GtkRadioMenuItem GtkRange GtkRuler GtkScale GtkScrollbar GtkScrolledWindow GtkSeparatorMenuItem GtkSocket GtkSpinButton GtkStatusbar GtkTable GtkTearoffMenuItem GtkText GtkTextBuffer GtkTextMark GtkTextTag GtkTextView GtkTipsQuery GtkToggleButton GtkToolbar GtkTooltips GtkTree GtkTreeView GtkTreeItem GtkVBox GtkVButtonBox GtkVPaned GtkVRuler GtkVScale GtkVScrollbar GtkVSeparator GtkViewport GtkWidget GtkWindow GtkWindowGroup contained +syn keyword gtkrcClassName AccelLabel Adjustment Alignment Arrow AspectFrame Bin Box Button ButtonBox CList CTree Calendar CheckButton CheckMenuItem ColorSelection ColorSelectionDialog Combo Container Curve Data Dialog DrawingArea Editable Entry EventBox FileSelection Fixed FontSelection FontSelectionDialog Frame GammaCurve HBox HButtonBox HPaned HRuler HScale HScrollbar HSeparator HandleBox Image ImageMenuItem InputDialog Invisible Item ItemFactory Label Layout List ListItem Menu MenuBar MenuItem MenuShell MessageDialog Misc Notebook Object OptionMenu Packer Paned Pixmap Plug Preview Progress ProgressBar RadioButton RadioMenuItem Range Ruler Scale Scrollbar ScrolledWindow SeparatorMenuItem Socket SpinButton Statusbar Table TearoffMenuItem Text TextBuffer TextMark TextTag TextView TipsQuery ToggleButton Toolbar Tooltips Tree TreeView TreeItem VBox VButtonBox VPaned VRuler VScale VScrollbar VSeparator Viewport Widget Window WindowGroup contained +syn keyword gtkrcClassNameGnome GnomeAbout GnomeAnimator GnomeApp GnomeAppBar GnomeCalculator GnomeCanvas GnomeCanvasEllipse GnomeCanvasGroup GnomeCanvasImage GnomeCanvasItem GnomeCanvasLine GnomeCanvasPolygon GnomeCanvasRE GnomeCanvasRect GnomeCanvasText GnomeCanvasWidget GnomeClient GnomeColorPicker GnomeDEntryEdit GnomeDateEdit GnomeDialog GnomeDock GnomeDockBand GnomeDockItem GnomeDockLayout GnomeDruid GnomeDruidPage GnomeDruidPageFinish GnomeDruidPageStandard GnomeDruidPageStart GnomeEntry GnomeFileEntry GnomeFontPicker GnomeFontSelector GnomeHRef GnomeIconEntry GnomeIconList GnomeIconSelection GnomeIconTextItem GnomeLess GnomeMDI GnomeMDIChild GnomeMDIGenericChild GnomeMessageBox GnomeNumberEntry GnomePaperSelector GnomePixmap GnomePixmapEntry GnomeProcBar GnomePropertyBox GnomeScores GnomeSpell GnomeStock GtkClock GtkDial GtkPixmapMenuItem GtkTed contained +syn cluster gtkrcPRIVATE add=gtkrcClassName,gtkrcClassNameGnome + +" Stock item names +syn keyword gtkrcStockName gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear gtk-close gtk-convert gtk-copy gtk-cut gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-execute gtk-find gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to gtk-justify-center gtk-justify-fill gtk-justify-left gtk-justify-right gtk-missing-image gtk-new gtk-no gtk-ok gtk-open gtk-paste gtk-preferences gtk-print gtk-print-preview gtk-properties gtk-quit gtk-redo gtk-refresh gtk-remove gtk-revert-to-saved gtk-save gtk-save-as gtk-select-color gtk-select-font gtk-sort-ascending gtk-sort-descending gtk-spell-check gtk-stop gtk-strikethrough gtk-undelete gtk-underline gtk-undo gtk-yes gtk-zoom-100 gtk-zoom-fit gtk-zoom-in gtk-zoom-out contained +syn cluster gtkrcPRIVATE add=gtkrcStockName + +" Gtk Settings +syn keyword gtkrcSettingsName gtk-double-click-time gtk-cursor-blink gtk-cursor-blink-time gtk-split-cursor gtk-theme-name gtk-key-theme-name gtk-menu-bar-accel gtk-dnd-drag-threshold gtk-font-name gtk-color-palette gtk-entry-select-on-focus gtk-can-change-accels gtk-toolbar-style gtk-toolbar-icon-size +syn cluster gtkrcPRIVATE add=gtkrcSettingsName + +" Catch errors caused by wrong parenthesization +syn region gtkrcParen start='(' end=')' transparent contains=ALLBUT,gtkrcParenError,@gtkrcPRIVATE +syn match gtkrcParenError ")" +syn region gtkrcBrace start='{' end='}' transparent contains=ALLBUT,gtkrcBraceError,@gtkrcPRIVATE +syn match gtkrcBraceError "}" +syn region gtkrcBracket start='\[' end=']' transparent contains=ALLBUT,gtkrcBracketError,@gtkrcPRIVATE +syn match gtkrcBracketError "]" + +" Synchronization +syn sync minlines=50 +syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>" + +" Define the default highlighting + +hi def link gtkrcComment Comment +hi def link gtkrcFixme Todo + +hi def link gtkrcInclude Preproc + +hi def link gtkrcACString gtkrcString +hi def link gtkrcBString gtkrcString +hi def link gtkrcString String +hi def link gtkrcNumber Number +hi def link gtkrcStateName gtkrcConstant +hi def link gtkrcPriorityName gtkrcConstant +hi def link gtkrcTextDirName gtkrcConstant +hi def link gtkrcSettingsName Function +hi def link gtkrcStockName Function +hi def link gtkrcConstant Constant + +hi def link gtkrcPathSpecial gtkrcSpecial +hi def link gtkrcWPathSpecial gtkrcSpecial +hi def link gtkrcRGBColor gtkrcSpecial +hi def link gtkrcKeyMod gtkrcSpecial +hi def link gtkrcSpecial Special + +hi def link gtkrcTop gtkrcKeyword +hi def link gtkrcPathSet gtkrcKeyword +hi def link gtkrcStyleKeyword gtkrcKeyword +hi def link gtkrcFunction gtkrcKeyword +hi def link gtkrcBind gtkrcKeyword +hi def link gtkrcKeyword Keyword + +hi def link gtkrcClassNameGnome gtkrcGtkClass +hi def link gtkrcClassName gtkrcGtkClass +hi def link gtkrcFunctionName gtkrcGtkClass +hi def link gtkrcGtkClass Type + +hi def link gtkrcImage gtkrcOtherword +hi def link gtkrcOtherword Function + +hi def link gtkrcParenError gtkrcError +hi def link gtkrcBraceError gtkrcError +hi def link gtkrcBracketError gtkrcError +hi def link gtkrcError Error + + +let b:current_syntax = "gtkrc" diff --git a/syntax/haml.vim b/syntax/haml.vim index 02f5cf835..a6a8b5688 100644 --- a/syntax/haml.vim +++ b/syntax/haml.vim @@ -1,10 +1,12 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haml', 'syntax/haml.vim') + finish +endif " Vim syntax file " Language: Haml " Maintainer: Tim Pope " Filenames: *.haml -" Last Change: 2018 Aug 21 +" Last Change: 2019 Dec 05 if exists("b:current_syntax") finish @@ -109,5 +111,3 @@ if main_syntax == "haml" endif " vim:set sw=2: - -endif diff --git a/syntax/hamster.vim b/syntax/hamster.vim new file mode 100644 index 000000000..35750f607 --- /dev/null +++ b/syntax/hamster.vim @@ -0,0 +1,374 @@ +if polyglot#init#is_disabled(expand(':p'), 'hamster', 'syntax/hamster.vim') + finish +endif + +" Vim syntax file +" Language: Hamster Scripting Language +" Maintainer: David Fishburn +" Last Change: Sun Oct 24 2004 7:11:50 PM +" Version: 2.0.6.0 + +" Description: Hamster Classic +" Hamster is a local server for news and mail. It's a windows-32-bit-program. +" It allows the use of multiple news- and mailserver and combines them to one +" mail- and newsserver for the news/mail-client. It load faster than a normal +" newsreader because many threads can run simultaneous. It contains scorefile +" for news and mail, a built-in script language, the GUI allows translation to +" other languages, it can be used in a network and that's not all features... +" +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword hamsterSpecial abs +syn keyword hamsterSpecial artaddheader +syn keyword hamsterSpecial artalloc +syn keyword hamsterSpecial artdelheader +syn keyword hamsterSpecial artfree +syn keyword hamsterSpecial artgetbody +syn keyword hamsterSpecial artgetheader +syn keyword hamsterSpecial artgetheaders +syn keyword hamsterSpecial artgettext +syn keyword hamsterSpecial artheaderexists +syn keyword hamsterSpecial artload +syn keyword hamsterSpecial artsave +syn keyword hamsterSpecial artsetbody +syn keyword hamsterSpecial artsetheader +syn keyword hamsterSpecial artsetheaders +syn keyword hamsterSpecial artsettext +syn keyword hamsterSpecial assert +syn keyword hamsterSpecial atadd +syn keyword hamsterSpecial atclear +syn keyword hamsterSpecial atcount +syn keyword hamsterSpecial ateverymins +syn keyword hamsterSpecial atexecute +syn keyword hamsterSpecial atfrom +syn keyword hamsterSpecial atondays +syn keyword hamsterSpecial atsubfunction +syn keyword hamsterSpecial atuntil +syn keyword hamsterSpecial beep +syn keyword hamsterSpecial break +syn keyword hamsterSpecial chr +syn keyword hamsterSpecial clearxcounter +syn keyword hamsterSpecial clipread +syn keyword hamsterSpecial clipwrite +syn keyword hamsterSpecial const +syn keyword hamsterSpecial constenum +syn keyword hamsterSpecial continue +syn keyword hamsterSpecial copy +syn keyword hamsterSpecial debug +syn keyword hamsterSpecial dec +syn keyword hamsterSpecial decodebase64 +syn keyword hamsterSpecial decodeqp +syn keyword hamsterSpecial decodetime +syn keyword hamsterSpecial decxcounter +syn keyword hamsterSpecial delete +syn keyword hamsterSpecial deletehostsentry +syn keyword hamsterSpecial digest +syn keyword hamsterSpecial dirchange +syn keyword hamsterSpecial dircurrent +syn keyword hamsterSpecial direxists +syn keyword hamsterSpecial dirmake +syn keyword hamsterSpecial dirremove +syn keyword hamsterSpecial dirsystem +syn keyword hamsterSpecial dirwindows +syn keyword hamsterSpecial diskfreekb +syn keyword hamsterSpecial dllcall +syn keyword hamsterSpecial dllfree +syn keyword hamsterSpecial dlllasterror +syn keyword hamsterSpecial dllload +syn keyword hamsterSpecial dump +syn keyword hamsterSpecial encodetime +syn keyword hamsterSpecial entercontext +syn keyword hamsterSpecial errcatch +syn keyword hamsterSpecial errline +syn keyword hamsterSpecial errlineno +syn keyword hamsterSpecial errmodule +syn keyword hamsterSpecial errmsg +syn keyword hamsterSpecial errnum +syn keyword hamsterSpecial error +syn keyword hamsterSpecial errsender +syn keyword hamsterSpecial eval +syn keyword hamsterSpecial eventclose +syn keyword hamsterSpecial eventcreate +syn keyword hamsterSpecial eventmultiplewait +syn keyword hamsterSpecial eventpulse +syn keyword hamsterSpecial eventreset +syn keyword hamsterSpecial eventset +syn keyword hamsterSpecial eventwait +syn keyword hamsterSpecial execute +syn keyword hamsterSpecial false +syn keyword hamsterSpecial filecopy +syn keyword hamsterSpecial filedelete +syn keyword hamsterSpecial fileexists +syn keyword hamsterSpecial filemove +syn keyword hamsterSpecial filerename +syn keyword hamsterSpecial filesize +syn keyword hamsterSpecial filetime +syn keyword hamsterSpecial getenv +syn keyword hamsterSpecial getprocessidentifier +syn keyword hamsterSpecial getuptimedays +syn keyword hamsterSpecial getuptimehours +syn keyword hamsterSpecial getuptimemins +syn keyword hamsterSpecial getuptimesecs +syn keyword hamsterSpecial gosub +syn keyword hamsterSpecial goto +syn keyword hamsterSpecial hex +syn keyword hamsterSpecial icase +syn keyword hamsterSpecial iif +syn keyword hamsterSpecial inc +syn keyword hamsterSpecial incxcounter +syn keyword hamsterSpecial inidelete +syn keyword hamsterSpecial inierasesection +syn keyword hamsterSpecial iniread +syn keyword hamsterSpecial iniwrite +syn keyword hamsterSpecial inputbox +syn keyword hamsterSpecial inputpw +syn keyword hamsterSpecial int +syn keyword hamsterSpecial isint +syn keyword hamsterSpecial isstr +syn keyword hamsterSpecial leavecontext +syn keyword hamsterSpecial len +syn keyword hamsterSpecial listadd +syn keyword hamsterSpecial listalloc +syn keyword hamsterSpecial listappend +syn keyword hamsterSpecial listbox +syn keyword hamsterSpecial listclear +syn keyword hamsterSpecial listcount +syn keyword hamsterSpecial listdelete +syn keyword hamsterSpecial listdirs +syn keyword hamsterSpecial listexists +syn keyword hamsterSpecial listfiles +syn keyword hamsterSpecial listfiles +syn keyword hamsterSpecial listfree +syn keyword hamsterSpecial listget +syn keyword hamsterSpecial listgetkey +syn keyword hamsterSpecial listgettag +syn keyword hamsterSpecial listgettext +syn keyword hamsterSpecial listindexof +syn keyword hamsterSpecial listinsert +syn keyword hamsterSpecial listload +syn keyword hamsterSpecial listrasentries +syn keyword hamsterSpecial listsave +syn keyword hamsterSpecial listset +syn keyword hamsterSpecial listsetkey +syn keyword hamsterSpecial listsettag +syn keyword hamsterSpecial listsettext +syn keyword hamsterSpecial listsort +syn keyword hamsterSpecial localhostaddr +syn keyword hamsterSpecial localhostname +syn keyword hamsterSpecial lookuphostaddr +syn keyword hamsterSpecial lookuphostname +syn keyword hamsterSpecial lowercase +syn keyword hamsterSpecial memalloc +syn keyword hamsterSpecial memforget +syn keyword hamsterSpecial memfree +syn keyword hamsterSpecial memgetint +syn keyword hamsterSpecial memgetstr +syn keyword hamsterSpecial memsetint +syn keyword hamsterSpecial memsetstr +syn keyword hamsterSpecial memsize +syn keyword hamsterSpecial memvarptr +syn keyword hamsterSpecial msgbox +syn keyword hamsterSpecial ord +syn keyword hamsterSpecial paramcount +syn keyword hamsterSpecial paramstr +syn keyword hamsterSpecial popupbox +syn keyword hamsterSpecial pos +syn keyword hamsterSpecial print +syn keyword hamsterSpecial quit +syn keyword hamsterSpecial random +syn keyword hamsterSpecial randomize +syn keyword hamsterSpecial rasdial +syn keyword hamsterSpecial rasgetconnection +syn keyword hamsterSpecial rasgetip +syn keyword hamsterSpecial rashangup +syn keyword hamsterSpecial rasisconnected +syn keyword hamsterSpecial re_extract +syn keyword hamsterSpecial re_match +syn keyword hamsterSpecial re_parse +syn keyword hamsterSpecial re_split +syn keyword hamsterSpecial replace +syn keyword hamsterSpecial return +syn keyword hamsterSpecial runscript +syn keyword hamsterSpecial scriptpriority +syn keyword hamsterSpecial set +syn keyword hamsterSpecial sethostsentry_byaddr +syn keyword hamsterSpecial sethostsentry_byname +syn keyword hamsterSpecial setxcounter +syn keyword hamsterSpecial sgn +syn keyword hamsterSpecial shell +syn keyword hamsterSpecial sleep +syn keyword hamsterSpecial stopthread +syn keyword hamsterSpecial str +syn keyword hamsterSpecial syserrormessage +syn keyword hamsterSpecial testmailfilterline +syn keyword hamsterSpecial testnewsfilterline +syn keyword hamsterSpecial ticks +syn keyword hamsterSpecial time +syn keyword hamsterSpecial timegmt +syn keyword hamsterSpecial trace +syn keyword hamsterSpecial trim +syn keyword hamsterSpecial true +syn keyword hamsterSpecial uppercase +syn keyword hamsterSpecial utf7toucs16 +syn keyword hamsterSpecial utf8toucs32 +syn keyword hamsterSpecial var +syn keyword hamsterSpecial varset +syn keyword hamsterSpecial warning +syn keyword hamsterSpecial xcounter + +" common functions +syn keyword hamsterFunction addlog +syn keyword hamsterFunction decodemimeheaderstring +syn keyword hamsterFunction decodetolocalcharset +syn keyword hamsterFunction gettasksactive +syn keyword hamsterFunction gettasksrun +syn keyword hamsterFunction gettaskswait +syn keyword hamsterFunction hamaddgroup +syn keyword hamsterFunction hamaddlog +syn keyword hamsterFunction hamaddpull +syn keyword hamsterFunction hamartcount +syn keyword hamsterFunction hamartdeletemid +syn keyword hamsterFunction hamartdeletemidingroup +syn keyword hamsterFunction hamartdeletenringroup +syn keyword hamsterFunction hamartimport +syn keyword hamsterFunction hamartlocatemid +syn keyword hamsterFunction hamartlocatemidingroup +syn keyword hamsterFunction hamartnomax +syn keyword hamsterFunction hamartnomin +syn keyword hamsterFunction hamarttext +syn keyword hamsterFunction hamarttextexport +syn keyword hamsterFunction hamchangepassword +syn keyword hamsterFunction hamcheckpurge +syn keyword hamsterFunction hamdelgroup +syn keyword hamsterFunction hamdelpull +syn keyword hamsterFunction hamdialogaddpull +syn keyword hamsterFunction hamdialogeditdirs +syn keyword hamsterFunction hamdialogmailkillfilelog +syn keyword hamsterFunction hamdialognewskillfilelog +syn keyword hamsterFunction hamdialogscripts +syn keyword hamsterFunction hamenvelopefrom +syn keyword hamsterFunction hamexepath +syn keyword hamsterFunction hamfetchmail +syn keyword hamsterFunction hamflush +syn keyword hamsterFunction hamgetstatus +syn keyword hamsterFunction hamgroupclose +syn keyword hamsterFunction hamgroupcount +syn keyword hamsterFunction hamgroupindex +syn keyword hamsterFunction hamgroupname +syn keyword hamsterFunction hamgroupnamebyhandle +syn keyword hamsterFunction hamgroupopen +syn keyword hamsterFunction hamgroupspath +syn keyword hamsterFunction hamhscpath +syn keyword hamsterFunction hamhsmpath +syn keyword hamsterFunction hamimapserver +syn keyword hamsterFunction hamisidle +syn keyword hamsterFunction hamlogspath +syn keyword hamsterFunction hammailexchange +syn keyword hamsterFunction hammailpath +syn keyword hamsterFunction hammailsoutpath +syn keyword hamsterFunction hammainfqdn +syn keyword hamsterFunction hammainwindow +syn keyword hamsterFunction hammessage +syn keyword hamsterFunction hammidfqdn +syn keyword hamsterFunction hamnewmail +syn keyword hamsterFunction hamnewserrpath +syn keyword hamsterFunction hamnewsjobsadd +syn keyword hamsterFunction hamnewsjobscheckactive +syn keyword hamsterFunction hamnewsjobsclear +syn keyword hamsterFunction hamnewsjobsdelete +syn keyword hamsterFunction hamnewsjobsfeed +syn keyword hamsterFunction hamnewsjobsgetcounter +syn keyword hamsterFunction hamnewsjobsgetparam +syn keyword hamsterFunction hamnewsjobsgetpriority +syn keyword hamsterFunction hamnewsjobsgetserver +syn keyword hamsterFunction hamnewsjobsgettype +syn keyword hamsterFunction hamnewsjobspost +syn keyword hamsterFunction hamnewsjobspostdef +syn keyword hamsterFunction hamnewsjobspull +syn keyword hamsterFunction hamnewsjobspulldef +syn keyword hamsterFunction hamnewsjobssetpriority +syn keyword hamsterFunction hamnewsjobsstart +syn keyword hamsterFunction hamnewsoutpath +syn keyword hamsterFunction hamnewspost +syn keyword hamsterFunction hamnewspull +syn keyword hamsterFunction hamnntpserver +syn keyword hamsterFunction hampassreload +syn keyword hamsterFunction hampath +syn keyword hamsterFunction hampop3server +syn keyword hamsterFunction hampostmaster +syn keyword hamsterFunction hampurge +syn keyword hamsterFunction hamrasdial +syn keyword hamsterFunction hamrashangup +syn keyword hamsterFunction hamrcpath +syn keyword hamsterFunction hamrebuildgloballists +syn keyword hamsterFunction hamrebuildhistory +syn keyword hamsterFunction hamrecoserver +syn keyword hamsterFunction hamreloadconfig +syn keyword hamsterFunction hamreloadipaccess +syn keyword hamsterFunction hamresetcounters +syn keyword hamsterFunction hamrotatelog +syn keyword hamsterFunction hamscorelist +syn keyword hamsterFunction hamscoretest +syn keyword hamsterFunction hamsendmail +syn keyword hamsterFunction hamsendmailauth +syn keyword hamsterFunction hamserverpath +syn keyword hamsterFunction hamsetlogin +syn keyword hamsterFunction hamshutdown +syn keyword hamsterFunction hamsmtpserver +syn keyword hamsterFunction hamstopalltasks +syn keyword hamsterFunction hamthreadcount +syn keyword hamsterFunction hamtrayicon +syn keyword hamsterFunction hamusenetacc +syn keyword hamsterFunction hamversion +syn keyword hamsterFunction hamwaitidle +syn keyword hamsterFunction raslasterror +syn keyword hamsterFunction rfctimezone +syn keyword hamsterFunction settasklimiter + +syn keyword hamsterStatement if +syn keyword hamsterStatement else +syn keyword hamsterStatement elseif +syn keyword hamsterStatement endif +syn keyword hamsterStatement do +syn keyword hamsterStatement loop +syn keyword hamsterStatement while +syn keyword hamsterStatement endwhile +syn keyword hamsterStatement repeat +syn keyword hamsterStatement until +syn keyword hamsterStatement for +syn keyword hamsterStatement endfor +syn keyword hamsterStatement sub +syn keyword hamsterStatement endsub +syn keyword hamsterStatement label + + +" Strings and characters: +syn region hamsterString start=+"+ end=+"+ contains=@Spell +syn region hamsterString start=+'+ end=+'+ contains=@Spell + +" Numbers: +syn match hamsterNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region hamsterHashComment start=/#/ end=/$/ contains=@Spell +syn cluster hamsterComment contains=hamsterHashComment +syn sync ccomment hamsterHashComment + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link hamsterHashComment Comment +hi def link hamsterSpecial Special +hi def link hamsterStatement Statement +hi def link hamsterString String +hi def link hamsterFunction Function + + +let b:current_syntax = "hamster" + +" vim:sw=4 diff --git a/syntax/handlebars.vim b/syntax/handlebars.vim new file mode 100644 index 000000000..1486da2b7 --- /dev/null +++ b/syntax/handlebars.vim @@ -0,0 +1,110 @@ +if polyglot#init#is_disabled(expand(':p'), 'handlebars', 'syntax/handlebars.vim') + finish +endif + +" Mustache & Handlebars syntax +" Language: Mustache, Handlebars +" Maintainer: Juvenn Woo +" Screenshot: http://imgur.com/6F408 +" Version: 6 +" Last Change: Jul 16 2019 +" Remark: +" It lexically hilights embedded mustaches (exclusively) in html file. +" While it was written for Ruby-based Mustache template system, it should +" work for Google's C-based *ctemplate* as well as Erlang-based *et*. All +" of them are, AFAIK, based on the idea of ctemplate. +" References: +" [Mustache](http://github.com/defunkt/mustache) +" [Handlebars](https://github.com/wycats/handlebars.js) +" [ctemplate](http://code.google.com/p/google-ctemplate/) +" [ctemplate doc](http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html) +" [et](http://www.ivan.fomichev.name/2008/05/erlang-template-engine-prototype.html) +" TODO: Feedback is welcomed. + + +" Read the HTML syntax to start with +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Standard HiLink will not work with included syntax files +if version < 508 + command! -nargs=+ HtmlHiLink hi link +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syntax match mustacheError '}}}\?' +syntax match mustacheInsideError '{{[{$#<>=!\/]\?' + +" Ember angle bracket syntax syntax starts with a capital letter: +" https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md +syntax case match +syntax region mustacheAngleComponent start=/<\/\?[[:upper:]]/ end=/>/ keepend containedin=TOP,@htmlMustacheContainer +syntax case ignore +syntax match mustacheAngleBrackets '' contained containedin=mustacheAngleComponent +syntax match mustacheAngleComponentName '' contained containedin=@mustacheInside,mustacheParam +syntax region mustacheHtmlValue start=/={{[^!][$#^/]\?/rs=s+1,hs=s+1 end=/}}/ oneline keepend contained containedin=htmlTag contains=@mustacheInside +syntax region mustachePartial start=/{{[<>]/lc=2 end=/}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer +syntax region mustacheMarkerSet start=/{{=/lc=2 end=/=}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer +syntax match mustacheHandlebars '{{\|}}' contained containedin=@mustacheInside +syntax match mustacheUnescape '{{{\|}}}' contained containedin=@mustacheInside +syntax match mustacheConditionals '\([/#]\?\<\(if\|unless\)\|\' contained containedin=@mustacheInside +syntax match mustacheHelpers '[/#]\?\<\(with\|link\-to\|each\(\-in\)\?\|let\)\>' contained containedin=@mustacheInside +syntax match mustacheHelpers 'else \(if\|unless\|with\|link\-to\|each\(\-in\)\?\)' contained containedin=@mustacheInside +syntax match mustacheParam /[a-z@_-]\+=/he=e-1 contained containedin=@mustacheInside +syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=TOP,@mustacheInside,@htmlMustacheContainer +syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=TOP,@mustacheInside,@htmlMustacheContainer +syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=@mustacheInside +syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=@mustacheInside + +" Clustering +syntax cluster htmlMustacheContainer add=htmlHead,htmlTitle,htmlString,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlLink,htmlBold,htmlUnderline,htmlItalic,htmlValue + + +" Hilighting +" mustacheInside hilighted as Number, which is rarely used in html +" you might like change it to Function or Identifier +HtmlHiLink mustacheVariable Number +HtmlHiLink mustacheVariableUnescape Number +HtmlHiLink mustachePartial Number +HtmlHiLink mustacheMarkerSet Number +HtmlHiLink mustacheParam htmlArg +HtmlHiLink mustacheAngleComponentName htmlTag + +HtmlHiLink mustacheComment Comment +HtmlHiLink mustacheBlockComment Comment +HtmlHiLink mustacheError Error +HtmlHiLink mustacheInsideError Error + +HtmlHiLink mustacheHandlebars Special +HtmlHiLink mustacheAngleBrackets htmlTagName +HtmlHiLink mustacheUnescape Identifier +HtmlHiLink mustacheOperators Operator +HtmlHiLink mustacheConditionals Conditional +HtmlHiLink mustacheHelpers Repeat +HtmlHiLink mustacheQString String +HtmlHiLink mustacheDQString String + +syn region mustacheScriptTemplate start=++me=s-1 keepend +\ contains=mustacheInside,@htmlMustacheContainer,htmlTag,htmlEndTag,htmlTagName,htmlSpecialChar + +let b:current_syntax = "handlebars" +delcommand HtmlHiLink diff --git a/syntax/haproxy.vim b/syntax/haproxy.vim index 21a449c27..41a3803cc 100644 --- a/syntax/haproxy.vim +++ b/syntax/haproxy.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haproxy') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haproxy', 'syntax/haproxy.vim') + finish +endif " Vim syntax file " Language: HAproxy @@ -356,5 +358,3 @@ delcommand HiLink let b:current_syntax = "haproxy" " vim: ts=8 - -endif diff --git a/syntax/haskell.vim b/syntax/haskell.vim index aed7aac55..efe303237 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haskell', 'syntax/haskell.vim') + finish +endif " syntax highlighting for haskell " @@ -38,7 +40,12 @@ syn match haskellTypeSig \ haskellParens syn keyword haskellWhere where syn keyword haskellLet let -syn match HaskellDerive "\\(\s\+\<\(anyclass\|instance\|newtype\|stock\)\>\)\?" +syn keyword haskellDeriveKeyword deriving anyclass instance newtype stock via contained +syn match haskellDerive "deriving\(\s\+instance\)\?\(\s\+anyclass\|\s\+newtype\|\s\+stock\|\s\+.\{-}\_s\+via\)\?" + \ contains= + \ haskellDeriveKeyword, + \ haskellParens, + \ haskellType syn keyword haskellDeclKeyword module class instance newtype in syn match haskellDecl "\<\(type\|data\)\>\s\+\(\\)\?" syn keyword haskellDefault default @@ -65,8 +72,8 @@ if get(g:, 'haskell_enable_static_pointers', 0) syn keyword haskellStatic static endif syn keyword haskellConditional if then else -syn match haskellNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>\|\<0[bB][10]\+\>" -syn match haskellFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" +syn match haskellNumber "\<[0-9]\+\>\|\<[0-9_]\+\>\|\<0[xX][0-9a-fA-F_]\+\>\|\<0[oO][0-7_]\+\>\|\<0[bB][10_]\+\>" +syn match haskellFloat "\<[0-9]\+\.[0-9_]\+\([eE][-+]\=[0-9_]\+\)\=\>" syn match haskellSeparator "[,;]" syn region haskellParens matchgroup=haskellDelimiter start="(" end=")" contains=TOP,haskellTypeSig,@Spell syn region haskellBrackets matchgroup=haskellDelimiter start="\[" end="]" contains=TOP,haskellTypeSig,@Spell @@ -92,7 +99,7 @@ syn match haskellLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" syn match haskellBacktick "`[A-Za-z_][A-Za-z0-9_\.']*#\?`" syn region haskellString start=+"+ skip=+\\\\\|\\"+ end=+"+ \ contains=@Spell -syn match haskellIdentifier "[_a-z][a-zA-z0-9_']*" contained +syn match haskellIdentifier "[_a-z][a-zA-Z0-9_']*" contained syn match haskellChar "\<'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'\>" syn match haskellType "\<[A-Z][a-zA-Z0-9_']*\>" syn region haskellBlockComment start="{-" end="-}" @@ -108,7 +115,7 @@ syn keyword haskellTodo TODO FIXME contained syn match haskellShebang "\%^#!.*$" if !get(g:, 'haskell_disable_TH', 0) syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained - syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]" + syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-Z0-9._']*|" end="|\]" syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP endif @@ -163,13 +170,13 @@ highlight def link haskellType Type highlight def link haskellImportKeywords Include if get(g:, 'haskell_classic_highlighting', 0) highlight def link haskellDeclKeyword Keyword - highlight def link HaskellDerive Keyword + highlight def link haskellDeriveKeyword Keyword highlight def link haskellDecl Keyword highlight def link haskellWhere Keyword highlight def link haskellLet Keyword else highlight def link haskellDeclKeyword Structure - highlight def link HaskellDerive Structure + highlight def link haskellDeriveKeyword Structure highlight def link haskellDecl Structure highlight def link haskellWhere Structure highlight def link haskellLet Structure @@ -208,5 +215,3 @@ if get(g:, 'haskell_backpack', 0) highlight def link haskellBackpackDependency Include endif let b:current_syntax = "haskell" - -endif diff --git a/syntax/haste.vim b/syntax/haste.vim new file mode 100644 index 000000000..893fab687 --- /dev/null +++ b/syntax/haste.vim @@ -0,0 +1,146 @@ +if polyglot#init#is_disabled(expand(':p'), 'haste', 'syntax/haste.vim') + finish +endif + +" Vim syntax file +" Language: HASTE - a language for VLSI IC programming +" Maintainer: M. Tranchero - maurizio.tranchero?gmail.com +" Credits: some parts have been taken from vhdl, verilog, and C syntax +" files +" Version: 0.9 +" Last Change: 0.9 improvement of haste numbers detection +" Change: 0.8 error matching for wrong hierarchical connections +" Change: 0.7 added more rules to highlight pre-processor directives + +" HASTE +if exists("b:current_syntax") + finish +endif +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" case is significant +syn case match + +" HASTE keywords +syn keyword hasteStatement act alias arb array begin bitvec +syn keyword hasteStatement bitwidth boolvec broad case +syn keyword hasteStatement cast chan const dataprobe do edge +syn keyword hasteStatement else end export false ff fi file +syn keyword hasteStatement fit for forever func if import +syn keyword hasteStatement inprobe is les main narb narrow +syn keyword hasteStatement negedge od of or outprobe pas +syn keyword hasteStatement posedge probe proc ram ramreg +syn keyword hasteStatement repeat rom romreg sample sel si +syn keyword hasteStatement sign sizeof skip stop then true +syn keyword hasteStatement type until var wait wire +syn keyword hasteFutureExt Z ffe partial +syn keyword hasteVerilog buf reg while + +" Special match for "if", "or", and "else" since "else if" +" and other "else+if" combination shouldn't be highlighted. +" The right keyword is "or" +syn match hasteStatement "\<\(if\|then\|else\|fi\)\>" +syn match hasteNone "\$" +syn match hasteNone "\\s" +syn match hasteNone "\\s" +syn match hasteNone "\\s" +syn match hasteStatement "\<\(case\|is\|si\)\>" +syn match hasteStatement "\<\(repeat\|until\)\>" +syn match hasteStatement "\<\(forever\|do\|od\)\>" +syn match hasteStatement "\<\(for\|do\|od\)\>" +syn match hasteStatement "\<\(do\|or\|od\)\>" +syn match hasteStatement "\<\(sel\|les\)\>" +syn match hasteError "\<\d\+[_a-zA-Z]\+\>" +syn match hasteError "\(\([[:alnum:]]\+\s*(\s\+\|)\s*,\)\)\s*\([[:alnum:]]\+\s*(\)" + +" Predifined Haste types +syn keyword hasteType bool + +" Values for standard Haste types +" syn match hasteVector "\'[0L1HXWZU\-\?]\'" + +syn match hasteVector "0b\"[01_]\+\"" +syn match hasteVector "0x\"[0-9a-f_]\+\"" +syn match hasteCharacter "'.'" +" syn region hasteString start=+"+ end=+"+ +syn match hasteIncluded display contained "<[^>]*>" +syn match hasteIncluded display contained "<[^"]*>" +syn region hasteInclude start="^\s*#include\>\s*" end="$" contains=hasteIncluded,hasteString + +" integer numbers +syn match hasteNumber "\d\+\^[[:alnum:]]*[-+]\{0,1\}[[:alnum:]]*" +syn match hasteNumber "-\=\<\d\+\(\^[+\-]\=\d\+\)\>" +syn match hasteNumber "-\=\<\d\+\>" +" syn match hasteNumber "0*2#[01_]\+#\(\^[+\-]\=\d\+\)\=" +" syn match hasteNumber "0*16#[0-9a-f_]\+#\(\^[+\-]\=\d\+\)\=" +" operators +syn keyword hasteSeparators & , . \| +syn keyword hasteExecution \|\| ; @ +syn keyword hasteOperator := ? ! : +syn keyword hasteTypeConstr "[" << >> .. "]" ~ +syn keyword hasteExprOp < <= >= > = # <> + - * == ## +syn keyword hasteMisc ( ) 0x 0b +" +syn match hasteSeparators "[&:\|,.]" +syn match hasteOperator ":=" +syn match hasteOperator ":" +syn match hasteOperator "?" +syn match hasteOperator "!" +syn match hasteExecution "||" +syn match hasteExecution ";" +syn match hasteExecution "@" +syn match hasteType "\[\[" +syn match hasteType "\]\]" +syn match hasteType "<<" +syn match hasteType ">>" +syn match hasteExprOp "<" +syn match hasteExprOp "<=" +syn match hasteExprOp ">=" +syn match hasteExprOp ">" +syn match hasteExprOp "<>" +syn match hasteExprOp "=" +syn match hasteExprOp "==" +syn match hasteExprOp "##" +" syn match hasteExprOp "#" +syn match hasteExprOp "*" +syn match hasteExprOp "+" + +syn region hasteComment start="/\*" end="\*/" contains=@Spell +syn region hasteComment start="{" end="}" contains=@Spell +syn match hasteComment "//.*" contains=@Spell + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link hasteSpecial Special +hi def link hasteStatement Statement +hi def link hasteCharacter String +hi def link hasteString String +hi def link hasteVector String +hi def link hasteBoolean String +hi def link hasteComment Comment +hi def link hasteNumber String +hi def link hasteTime String +hi def link hasteType Type +hi def link hasteGlobal Error +hi def link hasteError Error +hi def link hasteAttribute Type +" +hi def link hasteSeparators Special +hi def link hasteExecution Special +hi def link hasteTypeConstr Special +hi def link hasteOperator Type +hi def link hasteExprOp Type +hi def link hasteMisc String +hi def link hasteFutureExt Error +hi def link hasteVerilog Error +hi def link hasteDefine Macro +hi def link hasteInclude Include +" hi def link hastePreProc Preproc +" hi def link hastePreProcVar Special + +let b:current_syntax = "haste" + +" vim: ts=8 diff --git a/syntax/hastepreproc.vim b/syntax/hastepreproc.vim new file mode 100644 index 000000000..835960aeb --- /dev/null +++ b/syntax/hastepreproc.vim @@ -0,0 +1,42 @@ +if polyglot#init#is_disabled(expand(':p'), 'hastepreproc', 'syntax/hastepreproc.vim') + finish +endif + +" Vim syntax file +" Language: Haste preprocessor files +" Maintainer: M. Tranchero - maurizio.tranchero@gmail.com +" Credits: some parts have been taken from vhdl, verilog, and C syntax +" files +" Version: 0.5 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif +" Read the haste syntax to start with +runtime! syntax/haste.vim +unlet b:current_syntax + +" case is significant +syn case match + +" C pre-processor directives +syn match hastepreprocVar display "\$[[:alnum:]_]*" +syn region hastepreprocVar start="\${" end="}" contains=hastepreprocVar +" +"syn region hastepreproc start="#\[\s*tg[:alnum:]*" end="]#" contains=hastepreprocVar,hastepreproc,hastepreprocError,@Spell +syn region hastepreproc start="#\[\s*\(\|tgfor\|tgif\)" end="$" contains=hastepreprocVar,hastepreproc,@Spell +syn region hastepreproc start="}\s\(else\)\s{" end="$" contains=hastepreprocVar,hastepreproc,@Spell +syn region hastepreproc start="^\s*#\s*\(ifndef\|ifdef\|else\|endif\)\>" end="$" contains=@hastepreprocGroup,@Spell +syn region hastepreproc start="\s*##\s*\(define\|undef\)\>" end="$" contains=@hastepreprocGroup,@Spell +syn match hastepreproc "}\{0,1}\s*]#" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link hastepreproc Preproc +hi def link hastepreprocVar Special +hi def link hastepreprocError Error + +let b:current_syntax = "hastepreproc" + +" vim: ts=8 diff --git a/syntax/haxe.vim b/syntax/haxe.vim index ef159ce9c..f18604b47 100644 --- a/syntax/haxe.vim +++ b/syntax/haxe.vim @@ -1,431 +1,272 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haxe') == -1 +if polyglot#init#is_disabled(expand(':p'), 'haxe', 'syntax/haxe.vim') + finish +endif " Vim syntax file -" Language: haxe -" Derived from: -" http://tech.motion-twin.com/zip/haxe.vim -" and http://www.cactusflower.org/haxe.vim -" Please check :help haxe.vim for comments on some of the options available. - -set errorformat=%f\:%l\:\ characters\ %c-%*[^\ ]\ %m,%f\:%l\:\ %m +" Language: Haxe +" Maintainer: Luca Deltodesco +" Last Change: 2013 August 26 -" Quit when a syntax file was already loaded -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") +if exists("b:current_syntax") finish - endif - let main_syntax='haxe' endif +" provide fallback HiLink command if version < 508 command! -nargs=+ HaxeHiLink hi link else command! -nargs=+ HaxeHiLink hi def link endif -" some characters that cannot be in a haxe program (outside a string) -syn match haxeError "[\\@`]" -syn match haxeError "<<<\|=>\|<>\|||=\|&&=\|\*\/" - -" use separate name so that it can be deleted in haxecc.vim -syn match haxeError2 "#\|=<" -HaxeHiLink haxeError2 haxeError - -syn keyword haxeExternal import extern using -syn keyword haxeDefine package -syn keyword haxeConditional if else switch -syn keyword haxeRepeat while for do in -syn keyword haxeBoolean true false -syn keyword haxeConstant null -syn keyword haxeTypedef this super -syn keyword haxeOperator new cast -syn keyword haxeCoreType Void Bool Int Float Dynamic -syn keyword haxeStatement return - -syn keyword haxeTypedef1 typedef -syn keyword haxeStructure var enum -syn keyword haxeScopeDecl private public -syn keyword haxeScopeDecl2 static override final dynamic -syn keyword haxeFunctionDef function - -syn keyword haxeExceptions throw try catch finally untyped -syn keyword haxeAssert assert -syn keyword haxeMethodDecl synchronized throws -syn keyword haxeClassDecl extends implements interface -syn match haxeDelimiter "[;:=\.]" -syn match haxeOperator "\(\.\.\.\|\*\|+\|-\|<<\|>>\|\/\|!\|||\|&&\|%\)" -syn match haxeComparison "\(==\|<=\|>=\|<\|>\|!=\)" -syn match haxeOptionalVars contained "?[a-zA-Z_]\+" - -syn match haxeFunctionRef "[_$a-zA-Z][_$a-zA-Z0-9_]*("me=e-1 - -" We use a match here to differentiate the keyword class from MyClass.class -syn match haxeTypedef "\.\s*\"ms=s+1 -syn match haxeClassDecl "^class\>" -syn match haxeClassDecl "[^.]\s*\"ms=s+1 -syn keyword haxeBranch break continue nextgroup=haxeUserLabelRef skipwhite -syn match haxeUserLabelRef "\k\+" contained -syn match haxeClassDef "\(^\s*class\s*\)\@<=[_$a-zA-Z][_$a-zA-Z0-9_]*" contains=haxeTypedef,haxeClassDecl - -syn match haxeLangClass "\" -syn keyword haxeLangClass Array ArrayAccess Class Date DateTools EReg Enum -syn keyword haxeLangClass Hash IntHash IntIter Iterable Iterator Lambda -syn keyword haxeLangClass List Math Null Reflect Std String StringBug -syn keyword haxeLangClass StringTools Type UInt ValueType Xml XmlType - -syn keyword haxeFlashTop flash -syn keyword haxeFlashInner accessibility deskdop display errors events -syn keyword haxeFlashInner external filters geom media net printing sampler -syn keyword haxeFlashInner system text ui utils xml display engine -syn keyword haxeFlashFinal BitmapData ExternalInterface BevelFilter -syn keyword haxeFlashFinal BitmapFilter BlurFilter ColorMatrixFilter ConvolutionFilter -syn keyword haxeFlashFinal DisplacementMapFilter DropShadowFilter GlowFilter GradientBevelFilter -syn keyword haxeFlashFinal GradientGlowFilter ColorTransform Matrix Point Rectangle Transform -syn keyword haxeFlashFinal FileReference FileReferenceList Capabilities IME Security StyleSheet -syn keyword haxeFlashFinal TextRenderer Accessibility Boot Button Camera Color ContextMenu -syn keyword haxeFlashFinal ContextMenuItem ExtendedKey Key Lib LoadVars -syn keyword haxeFlashFinal LocalConnection Microphone Mouse MovieClip -syn keyword haxeFlashFinal MovieClipLoader NetConnection NetStream PrintJob -syn keyword haxeFlashFinal Selection SelectionListener SharedObject Sound -syn keyword haxeFlashFinal Stage System TextField TextFormat TextSnapshot -syn keyword haxeFlashFinal Video XMLRequest XMLSocket -syn keyword haxeFlash9Final Accessibility AccessibilityImplementation -syn keyword haxeFlash9Final AccessibilityProperties Clipboard -syn keyword haxeFlash9Final ClipboardFormats ClipboardTransferMode AVM1Movie -syn keyword haxeFlash9Final ActionScriptVersion Bitmap BitmapData -syn keyword haxeFlash9Final BitmapDataChannel BlendMode CapsStyle -syn keyword haxeFlash9Final DisplayObject DisplayObjectContainer FrameLabel -syn keyword haxeFlash9Final GradientType Graphics GraphicsBitmapFill -syn keyword haxeFlash9Final GraphicsEndFill GraphicsGradientFill GraphicsPath -syn keyword haxeFlash9Final GraphicsPathCommand GraphicsPathWinding -syn keyword haxeFlash9Final GraphicsShaderFill GraphicsSolidFill -syn keyword haxeFlash9Final GraphicsStroke GraphicsTrianglePath -syn keyword haxeFlash9Final IBitmapDrawable IGraphicsData IGraphicsFill -syn keyword haxeFlash9Final IGraphicsPath IGraphicsStroke InteractiveObject -syn keyword haxeFlash9Final InterpolationMethod JointStyle -syn keyword haxeFlash9Final LineScaleMode Loader LoaderInfo MorphShape -syn keyword haxeFlash9Final MovieClip PixelSnapping SWFVersion -syn keyword haxeFlash9Final Scene Shader ShaderData ShaderInput ShaderJob ShaderParameter -syn keyword haxeFlash9Final ShaderParameterType ShaderPrecision Shape -syn keyword haxeFlash9Final SimpleButton SpreadMethod Sprite -syn keyword haxeFlash9Final Stage StageAlign StageDisplayState StageQuality -syn keyword haxeFlash9Final StageScaleMode TriangleCulling -syn keyword haxeFlash9Final EOFError Error IOError Illegal OperationError -syn keyword haxeFlash9Final InvalidSWFError MemoryError ScriptTimeoutError -syn keyword haxeFlash9Final StackOverflowError ActivityEventAsyncErrorEvent -syn keyword haxeFlash9Final ContextMenuEvent DataEvent ErrorEvent Event -syn keyword haxeFlash9Final EventDispatcher EventPhase FocusEvent -syn keyword haxeFlash9Final FullScreenEvent HTTPStatusEvent IEventDispatcher IMEEvent -syn keyword haxeFlash9Final IOErrorEvent KeyboardEvent MouseEvent -syn keyword haxeFlash9Final NetFilterEvent NetStatusEvent ProgressEvent -syn keyword haxeFlash9Final SampleDataEvent SecurityErrorEvent ShaderEvent StatusEvent -syn keyword haxeFlash9Final SyncEvent TextEvent TimerEvent WeakFunctionClosure WeakMethodClosure -syn keyword haxeFlash9Final ExternalInterface BevelFilter BitmapFilter -syn keyword haxeFlash9Final BitmapFilterQuality BitmapFilterType -syn keyword haxeFlash9Final BlurFilter ColorMatrixFilter ConvolutionFilter DisplacementMapFilter -syn keyword haxeFlash9Final DisplacementMapFilterMode DropShadowFilter -syn keyword haxeFlash9Final GlowFilter GradientBevelFilter -syn keyword haxeFlash9Final GradientGlowFilter ShaderFilter ColorTransform -syn keyword haxeFlash9Final Matrix Matrix3D Orientation3D -syn keyword haxeFlash9Final PerspectiveProjection Point Rectangle Transform -syn keyword haxeFlash9Final Utils3D Vector3D Camera ID3Info -syn keyword haxeFlash9Final Microphone Sound SoundChannel SoundCodec SoundLoaderContext SoundMixer -syn keyword haxeFlash9Final SoundTransform Video DynamicPropertyOutput FileFilter FileReference -syn keyword haxeFlash9Final FileReferenceList IDynamicPropertyOutput -syn keyword haxeFlash9Final IDynamicPropertyWriter LocalConnection -syn keyword haxeFlash9Final NetConnection NetStream NetStreamInfo NetSTreamPlayOptions -syn keyword haxeFlash9Final NetSTreamPlayTransitions ObjectEncoding Responder SharedObject -syn keyword haxeFlash9Final SharedObjectFlushStatus Socket URLLoader URLLoaderDataFormat URLRequest -syn keyword haxeFlash9Final URLRequestHeader URLRequestMethod URLStream -syn keyword haxeFlash9Final URLVariables XMLSocket PrintJob -syn keyword haxeFlash9Final PrintJobOptions PrintJobOrientation Api -syn keyword haxeFlash9Final DeleteObjectSample NewObjectSample -syn keyword haxeFlash9Final Sample StackFrame ApplicationDomain Capabilities FSCommand IME -syn keyword haxeFlash9Final IMEConversionMode JPEGLoaderContext -syn keyword haxeFlash9Final LoaderContext Security SecurityDomain -syn keyword haxeFlash9Final SecurityPanel System -syn keyword haxeFlash9Final BreakOpportunity CFFHinting ContentElement -syn keyword haxeFlash9Final DigitCase DigitWidth EastAsianJustifier ElementFormat FontDescription -syn keyword haxeFlash9Final FontLookup FontMetrics FontPosture FontWeight -syn keyword haxeFlash9Final GraphicElement GroupElement -syn keyword haxeFlash9Final JustificationStyle Kerning LIgatureLevel -syn keyword haxeFlash9Final LineJustification RenderingMode -syn keyword haxeFlash9Final SpaceJustifier TabAlignment TabStop TextBaseline TextBlock TextElement -syn keyword haxeFlash9Final TextJustifier TextLine TextLineCreationResult TextLineMirrorRegion -syn keyword haxeFlash9Final TextLineValidity TextRotation TypographicCase -syn keyword haxeFlash9Final AntiAliasType CSMSettings Font -syn keyword haxeFlash9Final FontStyle FontType GridFitType StaticText StyleSheet TextColorType -syn keyword haxeFlash9Final TextDisplayMode TextExtent TextField -syn keyword haxeFlash9Final TextFieldAutoSize TextFieldType TextFormat -syn keyword haxeFlash9Final TextFormatAlign TextFormatDisplay TextLineMetrics TextRenderer TextRun -syn keyword haxeFlash9Final TextSnapshot Trace ContextMenu ContextMenuBuiltInItems -syn keyword haxeFlash9Final ContextMenuClipboardItems ContextMenuItem KeyLocation Keyboard Mouse -syn keyword haxeFlash9Final MouseCursor ByteArray Dictionary Endian -syn keyword haxeFlash9Final IDataInput IDataOutput IExternalizable -syn keyword haxeFlash9Final Namespace ObjectInput ObjectOutput Proxy QName SetIntervalTimer Timer -syn keyword haxeFlash9Final TypedDictionary XML XMLDocument XMLList XMLNode -syn keyword haxeFlash9Final XMLNodeType XMLParser XMLTag -syn keyword haxeFlash9Final Boot Lib Memory Vector - -HaxeHiLink haxeLangObject haxeConstant -syn cluster haxeTop add=haxeLangObject,haxeLangClass -syn cluster haxeClasses add=haxeLangClass,haxeFlashClass - -if filereadable(expand(":p:h")."/haxeid.vim") - source :p:h/haxeid.vim -endif - -if !exists("haxe_no_trail_space_error") - syn match haxeSpaceError "\s\+$" -endif -if !exists("haxe_no_tab_space_error") - syn match haxeSpaceError " \+\t"me=e-1 -endif - -syn region haxeLabelRegion transparent matchgroup=haxeLabel start="\" - \ matchgroup=NONE end=":" - \ contains=haxeNumber,haxeChr,haxeNumber2 -syn match haxeUserLabel "\({\s*\|^\s*\|,\s*\)\@<=[_$a-zA-Z][_$a-zA-Z0-9_]*:\s"he=e-1 contains=haxeDelimiter - \ contains=haxeLabel -syn keyword haxeLabel default never - -" Everything - used in parenthases checking or something -syn cluster haxeTop add=haxeExternal,haxeError,haxeError,haxeBranch, - \ haxeLabelRegion,haxeLabel,haxeConditional, - \ haxeRepeat,haxeBoolean,haxeConstant, - \ haxeTypedef,haxeOperator,haxeType,haxeCoreType, - \ haxeStatement,haxeStorageClass,haxeAssert, - \ haxeExceptions,haxeMethodDecl,haxeClassDecl, - \ haxeClassDecl,haxeClassDecl,haxeScopeDecl, - \ haxeError,haxeError2,haxeUserLabel, - \ haxeLangObject,haxeFlashTop,haxeFlashInner, - \ haxeFlashFinal,haxeFlash9Final,haxeFunctionRef, - \ haxeComparison,haxeOptionalVars - -" Comments -syn keyword haxeTodo contained TODO FIXME XXX -if exists("haxe_comment_strings") - syn region haxeCmString contained start=+"+ end=+"+ end=+$+ - \ end=+\*/+me=s-1,he=s-1 - \ contains=haxeSpecial,haxeCmStar,haxeSpecChr,@Spell - syn region haxeCm2String contained start=+"+ end=+$\|"+ - \ contains=haxeSpecial,haxeSpecChr,@Spell - syn match haxeCmCharacter contained "'\\[^']\{1,6\}'" contains=haxeSpecChr - syn match haxeCmCharacter contained "'\\''" contains=haxeSpecChr - syn match haxeCmCharacter contained "'[^\\]'" - syn cluster haxeCmSpecial add=haxeCmString,haxeCmCharacter,haxeNumber,haxeNumber2 - syn cluster haxeCmSpecial2 add=haxeCm2String,haxeCmCharacter,haxeNumber,haxeNumber2 -endif -syn region haxeCm start="/\*" end="\*/" - \ contains=@haxeCmSpecial,haxeTodo,@Spell -syn match haxeCmStar contained "^\s*\*[^/]"me=e-1 -syn match haxeCmStar contained "^\s*\*$" -syn match haxeLineCm "//.*" contains=@haxeCmSpecial2,haxeTodo,@Spell -HaxeHiLink haxeCmString haxeDocTags -HaxeHiLink haxeCm2String haxeString -HaxeHiLink haxeCmCharacter haxeChr -syn cluster haxeTop add=haxeCm,haxeLineCm -if exists("haxe_haxedoc") || main_syntax == 'jsp' - syntax case ignore - " syntax coloring for haxedoc comments (HTML) - " syntax include @haxeHtml :p:h/html.vim - " unlet b:current_syntax - syn region haxeDocCm start="/\*\*" end="\*/" keepend - \ contains=haxeCmTitle,@haxeHtml,haxeDocTags,haxeTodo,@Spell,haxeProposedTags - syn region haxeCmTitle contained matchgroup=haxeDocCm start="/\*\*" - \ matchgroup=haxeCmTitle keepend end="\.$" - \ end="\.[ \t\r<]"me=e-1 - \ end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 - \ contains=@haxeHtml,haxeCmStar,haxeTodo,@Spell,haxeDocTags,haxeProposedTags - syn region haxeDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" - \ end="}" - syn match haxeDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" - \ contains=haxeDocParam - syn match haxeDocParam contained "\s\S\+" - syn match haxeDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" - syn match haxeProposedTags contained "@\(category\|example\|tutorial\|index\|exclude\|todo\|internal\|obsolete\)\>" - syntax case match -endif -syn match haxeCm "/\*\*/" " Edge case - - -" Strings and constants -syn match haxeSpecError contained "\\." -"syn match haxeSpecChrError contained "[^']" -syn match haxeSpecChr contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" -syn match haxeEregEscape contained "\(\\\\\|\\/\)" -syn region haxeEreg start=+\~\/+ end=+\/[gims]*+ contains=haxeEregEscape - -syn region haxeString start=+"+ end=+"+ contains=haxeSpecChr,haxeSpecError,@Spell -syn region haxeSingleString start=+'+ end=+'+ -syn match haxeChr "'[^']*'" contains=haxeSpecChr,haxeSpecChrError -syn match haxeChr "'\\''" contains=haxeSpecChr -syn match haxeChr "'[^\\]'" -syn match haxeNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" contains=haxeSpecNum -"syn match haxeNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" -syn match haxeNumber2 "\(\<\d\+\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" contains=haxeSpecNum -syn match haxeNumber2 "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" contains=haxeSpecNum -syn match haxeNumber2 "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" contains=haxeSpecNum -syn match haxeSpecNum contained "\(0[xX]\|[\.+-]\)" - -syn region haxeCondIf start="#if \+!\?" end="\(\W\|$\)" skip="([A-Za-z0-9_ |&!]\+)" -syn region haxeCondElseIf start="#elseif \+!\?" end="\(\W\|$\)" skip="([A-Za-z0-9_ |&!]\+)" -syn match haxeCondElse "#else\s*$" -syn match haxeCondEnd "#end" -syn match haxeCondError "#else .*$" - -" unicode characters -syn match haxeSpecial "\\u\d\{4\}" - -syn match haxeType ":[a-zA-Z_\.]\+" - \ contains=haxeDelimiter,haxeCoreType,haxeFlashTop,haxeFlashInner,haxeFlashFinal,haxeFlash9Final - -syn cluster haxeTop add=haxeString,haxeChr,haxeNumber,haxeNumber2 -syn cluster haxeTop add=haxeSpecial,haxeStringError,haxeDelimiter,haxeType - -syn keyword haxeTraceFun trace contained -syn region haxeTrace start=+\(^\s*\)\@<=trace(+ end=+);+ contains=haxeTraceFun - -if exists("haxe_highlight_functions") - if haxe_highlight_functions == "indent" - syn match haxeFuncDef "^\(\t\| \{4\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" - \ contains=haxeType,haxeStorageClass,@haxeClasses - syn region haxeFuncDef start=+^\(\t\| \{4\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ - \ end=+)+ contains=haxeType,haxeStorageClass,@haxeClasses - syn match haxeFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" - \ contains=haxeType,haxeStorageClass,@haxeClasses - syn region haxeFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ - \ end=+)+ - \ contains=haxeType,haxeStorageClass,@haxeClasses - else - " This line catches method declarations at any indentation>0, but it assumes - " two things: - " 1. class names are always capitalized (ie: Button) - " 2. method names are never capitalized (except constructors, of course) - syn region haxeFuncDef start=+\s\+\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ - \ end=+)+ - \ contains=haxeType,haxeStorageClass,haxeCm,haxeLineCm,@haxeClasses - endif - syn match haxeBraces "[{}]" - syn cluster haxeTop add=haxeFuncDef,haxeBraces -endif - -if exists("haxe_mark_braces_in_parens_as_errors") - syn match haxeInParen contained "[{}]" - HaxeHiLink haxeInParen haxeError - syn cluster haxeTop add=haxeInParen -endif - -" catch errors caused by wrong parenthesis -syn region haxeParenT transparent matchgroup=haxeParen start="(" - \ end=")" contains=@haxeTop,haxeParenT1 -syn region haxeParenT1 transparent matchgroup=haxeParen1 start="(" - \ end=")" contains=@haxeTop,haxeParenT2 contained -syn region haxeParenT2 transparent matchgroup=haxeParen2 start="(" - \ end=")" contains=@haxeTop,haxeParenT contained -syn match haxeParenError ")" -HaxeHiLink haxeParenError haxeError - - -if !exists("haxe_minlines") - let haxe_minlines = 5000 -endif -exec "syn sync ccomment haxeCm minlines=" . haxe_minlines -syn sync linebreaks=30 - -" The default highlighting. -if version >= 508 || !exists("did_haxe_syn_inits") - if version < 508 - let did_haxe_syn_inits = 1 - endif - - HaxeHiLink haxeFunctionDef Identifier - HaxeHiLink haxeFuncDef Identifier - HaxeHiLink haxeFunctionRef Function - HaxeHiLink haxeBraces Function - HaxeHiLink haxeBranch Conditional - HaxeHiLink haxeUserLabelRef haxeUserLabel - HaxeHiLink haxeLabel Label - HaxeHiLink haxeUserLabel Label - HaxeHiLink haxeConditional Conditional - HaxeHiLink haxeRepeat Repeat - HaxeHiLink haxeExceptions Exception - HaxeHiLink haxeAssert Statement - - HaxeHiLink haxeClassDef Underlined - HaxeHiLink haxeStructure Structure - HaxeHiLink haxeMethodDecl haxeStorageClass - HaxeHiLink haxeClassDecl Structure - HaxeHiLink haxeScopeDecl StorageClass - HaxeHiLink haxeScopeDecl2 Tag - HaxeHiLink haxeBoolean Boolean - HaxeHiLink haxeSpecial Special - HaxeHiLink haxeSpecError Error - HaxeHiLink haxeSpecChrError Error - HaxeHiLink haxeString String - HaxeHiLink haxeSingleString Character - - HaxeHiLink haxeEreg Number - HaxeHiLink haxeEregEscape Debug - HaxeHiLink haxeChr Character - HaxeHiLink haxeSpecChr SpecialChar - HaxeHiLink haxeNumber Number - HaxeHiLink haxeNumber2 Float - HaxeHiLink haxeSpecNum Boolean - HaxeHiLink haxeError Error - HaxeHiLink haxeStringError Debug - HaxeHiLink haxeStatement Statement - HaxeHiLink haxeOperator Operator - HaxeHiLink haxeComparison Repeat - HaxeHiLink haxeTraceFun SpecialComment - HaxeHiLink haxeTrace Comment - HaxeHiLink haxeDelimiter Delimiter - - HaxeHiLink haxeCm Comment - HaxeHiLink haxeDocCm Comment - HaxeHiLink haxeLineCm Comment - HaxeHiLink haxeConstant Constant - HaxeHiLink haxeTypedef Typedef - HaxeHiLink haxeTypedef1 Typedef - HaxeHiLink haxeTodo Todo - HaxeHiLink haxeLangClass Special - HaxeHiLink haxeFlashClass Keyword - HaxeHiLink haxeFunction Function - HaxeHiLink haxeCmTitle Special - HaxeHiLink haxeDocTags SpecialComment - HaxeHiLink haxeProposedTags SpecialComment - HaxeHiLink haxeCmStar Comment - - HaxeHiLink haxeDocParam Function - HaxeHiLink haxeCoreType Keyword - HaxeHiLink haxeType Type - HaxeHiLink haxeExternal Include - HaxeHiLink haxeDefine Define - HaxeHiLink htmlComment Special - HaxeHiLink htmlCommentPart Special - HaxeHiLink haxeSpaceError Error - HaxeHiLink haxeCondIf PreCondit - HaxeHiLink haxeCondElseIf PreCondit - HaxeHiLink haxeCondElse PreProc - HaxeHiLink haxeCondEnd PreProc - - HaxeHiLink haxeCondError Error - - HaxeHiLink haxeFlashTop PreProc - HaxeHiLink haxeFlashInner Macro - HaxeHiLink haxeFlashFinal Define - HaxeHiLink haxeFlash9Final Define - - HaxeHiLink haxeOptionalVars Identifier -endif +" characters that cannot be in a haxe program (outside a string) +syn match haxeError "[\\`]" + +" keywords +" -------- +syn keyword haxeTypedef typedef extends implements +syn keyword haxeTypeDecl class enum abstract interface import using package from to +syn keyword haxeStorageClass static inline public private macro dynamic extern override final + +syn match haxeTypedef "\.\s*\"ms=s+1 +syn match haxeTypeDecl "^class\>" +syn match haxeTypeDecl "[^.]\s*\"ms=s+1 + +syn keyword haxeException try catch throw +syn keyword haxeRepeat for do while in +syn keyword haxeLabel case +syn keyword haxeConditional switch +syn match haxeConditional "\<\#\@" +syn keyword haxeConstant null never super this default get set +syn keyword haxeFunction function __dollar__new new +syn match haxeFunction "\<__[^_]\+__\>" +syn keyword haxeKeyword untyped cast continue break return trace var +syn match haxeKeyword "\$type" + +syn match haxeError "\<#\@" + +" type identifiers +" ---------------- +syn match haxeType "\<[A-Z][a-zA-Z_0-9]*\>" + +" operators +" --------- +" Did a lot of work here to ensure a lot of invalid operators are highlighted as errors. + +" put ,; in seperate highlight group to .: to avoid mistakes. +syn match haxeOperator "[:?]" +syn match haxeOperator2 "[;,]" + +" match . and ... as operators, and .. and more than 4 . as errors +syn match haxeOperator "\.\@,<<,>>,>>> as operators +syn match haxeOperator ">\@\|>>\|>>>\)>\@!" +syn match haxeOperator "<\@)=? as operators +" have to match &!<> seperate to avoid highlighting things like &&= &&& <<< as okay +syn match haxeOperator "[+\-*/%^!]=\?=\@!" +syn match haxeOperator "<\@\@]=\?[=>]\@!" +syn match haxeOperator "&\@" +syn match haxeFloat "\<\([\-+]\?[0-9]*\.\?[0-9]\+([eE][\-+]\?[0-9]\+)\?\)\>" +syn keyword haxeBool true false + +" comments +" -------- +syn keyword haxeTODO contained TODO FIXME XXX +syn match haxeComment "//.*" contains=haxeTODO,@Spell +syn region haxeComment2 start=+/\*+ end=+\*/+ contains=haxeTODO,@Spell + +" preprocessing +" ------------- +syn match haxePre "\(#if\|#elseif\|#else\|#end\)" +syn match haxePreError "#error" + +" regex +" ----- +syn region haxeRegex start=+\~\/+ end=+\/+ contains=haxeRegexEscape,haxeRegexError,@Spell + +syn match haxeRegexError contained "\\[^0-9bdnrstwxBDSW(){}\[\]\\$^*\-+|./?]" +syn match haxeRegexEscape contained "\\[0-9bdnrstwxBDSW(){}\[\]\\$^*\-+|./?]" + +" meta +" ---- +syn match haxeMeta "@:\?[a-zA-Z_][a-zA-Z_0-9]*\>" + +syn match haxeCompilerMeta "@:\( + \abstract + \\|access + \\|allow + \\|annotation + \\|arrayAccess + \\|autoBuild + \\|bind + \\|bitmap + \\|build + \\|buildXml + \\|callable + \\|classCode + \\|commutative + \\|compilerGenerated + \\|coreApi + \\|coreType + \\|cppFileCode + \\|cppNamespaceCode + \\|dce + \\|debug + \\|decl + \\|defParam + \\|delegate + \\|depend + \\|deprecated + \\|event + \\|enum + \\|expose + \\|extern + \\|fakeEnum + \\|file + \\|final + \\|font + \\|forward + \\|from + \\|functionCode + \\|functionTailCode + \\|generic + \\|genericBuild + \\|getter + \\|hack + \\|headerClassCode + \\|headerCode + \\|headerNamespaceCode + \\|hxGen + \\|ifFeature + \\|include + \\|initPackage + \\|internal + \\|isVar + \\|jsRequire + \\|keep + \\|keepInit + \\|keepSub + \\|luaRequire + \\|macro + \\|meta + \\|multiType + \\|multiReturn + \\|native + \\|nativeGen + \\|noCompletion + \\|noDebug + \\|noDoc + \\|noImportGlobal + \\|noPackageRestrict + \\|noStack + \\|noUsing + \\|notNull + \\|ns + \\|op + \\|optional + \\|overload + \\|privateAccess + \\|property + \\|protected + \\|public + \\|publicFields + \\|readOnly + \\|remove + \\|require + \\|rtti + \\|runtime + \\|runtimeValue + \\|selfCall + \\|setter + \\|sound + \\|struct + \\|suppressWarnings + \\|throws + \\|to + \\|transient + \\|unbound + \\|unifyMinDynamic + \\|unreflective + \\|unsafe + \\|usage + \\|volatile + \\)\>" + + +syn sync ccomment haxeComment2 minlines=10 + +HaxeHiLink haxeMeta Macro +HaxeHiLink haxeCompilerMeta Identifier +HaxeHiLink haxeRegex String +HaxeHiLink haxeDString String +HaxeHiLink haxeSString Character +HaxeHiLink haxeSpecialCharacter SpecialChar +HaxeHiLink haxeIntSpecialChar SpecialChar +HaxeHiLink haxeRegexEscape SpecialChar +HaxeHiLink haxeErrorCharacter Error +HaxeHiLink haxeRegexError Error +HaxeHiLink haxeInterpolatedIdent Normal +HaxeHiLink haxeInterpolated Normal +HaxeHiLink haxeError Error +HaxeHiLink haxeOperator Operator +HaxeHiLink haxeOperator2 Identifier +HaxeHiLink haxeSpecial SpecialChar +HaxeHiLink haxeInt Number +HaxeHiLink haxeFloat Float +HaxeHiLink haxeBool Boolean +HaxeHiLink haxeComment Comment +HaxeHiLink haxeComment2 Comment +HaxeHiLink haxeTODO Todo +HaxeHiLink haxePre PreCondit +HaxeHiLink haxePreError PreProc +HaxeHiLink haxeType Type +HaxeHiLink haxeTypedef Typedef +HaxeHiLink haxeTypeDecl Keyword " Structure just gives me same colour as Type and looks bad. +HaxeHiLink haxeStorageClass StorageClass +HaxeHiLink haxeException Exception +HaxeHiLink haxeRepeat Repeat +HaxeHiLink haxeLabel Label +HaxeHiLink haxeConditional Conditional +HaxeHiLink haxeConstant Constant +HaxeHiLink haxeFunction Function +HaxeHiLink haxeKeyword Keyword delcommand HaxeHiLink + let b:current_syntax = "haxe" -if main_syntax == 'haxe' - unlet main_syntax -endif -let b:spell_options="contained" +let b:spell_options = "contained" -endif + +" vim: ts=8 diff --git a/syntax/haxe_extended.vim b/syntax/haxe_extended.vim new file mode 100644 index 000000000..6fac9a8d9 --- /dev/null +++ b/syntax/haxe_extended.vim @@ -0,0 +1,131 @@ +if polyglot#init#is_disabled(expand(':p'), 'haxe', 'syntax/haxe_extended.vim') + finish +endif + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Haxedoc +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists("haxe_haxedoc") || (exists("main_syntax") && main_syntax == 'jsp') + syntax case ignore + " syntax coloring for haxedoc comments (HTML) + " syntax include @haxeHtml :p:h/html.vim + " unlet b:current_syntax + syn region haxeDocComment start="/\*\*" end="\*/" keepend contains=haxeCommentTitle,@haxeHtml,haxeDocTags,haxeTodo,@Spell + syn region haxeCommentTitle contained matchgroup=haxeDocComment start="/\*\*" matchgroup=haxeCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@haxeHtml,haxeCommentStar,haxeTodo,@Spell,haxeDocTags + + syn region haxeDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" + syn match haxeDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=haxeDocParam + syn match haxeDocParam contained "\s\S\+" + syn match haxeDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" + syntax case match + HaxeHiLink haxeDocComment Comment + HaxeHiLink haxeDocTags Special + HaxeHiLink haxeDocParam Function +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Haxe comment strings +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists("haxe_comment_strings") + syn region haxeCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=haxeSpecial,haxeCommentStar,haxeSpecialChar,@Spell + syn region haxeComment2String contained start=+"+ end=+$\|"+ contains=haxeSpecial,haxeSpecialChar,@Spell + syn match haxeCommentCharacter contained "'\\[^']\{1,6\}'" contains=haxeSpecialChar + syn match haxeCommentCharacter contained "'\\''" contains=haxeSpecialChar + syn match haxeCommentCharacter contained "'[^\\]'" + syn cluster haxeCommentSpecial add=haxeCommentString,haxeCommentCharacter,haxeNumber + syn cluster haxeCommentSpecial2 add=haxeComment2String,haxeCommentCharacter,haxeNumber + HaxeHiLink haxeCommentString haxeString + HaxeHiLink haxeComment2String haxeString +endif + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Haxe concealed text +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists('g:haxe_conceal') && has("conceal") + syn match Ignore 'urn' transparent conceal containedin=haxeStatement + syn match Ignore 'ction' transparent conceal containedin=haxeStorageClass,haxeStatement + syn match Ignore 'ati' transparent conceal containedin=haxeStorageClass + syn match Ignore 'nline\|tati\|ubli' transparent conceal containedin=haxeScopeDecl +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Haxe space errors +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists("haxe_space_errors") + if !exists("haxe_no_trail_space_error") + syn match haxeSpaceError "\s\+$" + endif + if !exists("haxe_no_tab_space_error") + syn match haxeSpaceError " \+\t"me=e-1 + endif + HaxeHiLink haxeSpaceError Error +endif + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Haxe minline comments +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if !exists("haxe_minlines") + let haxe_minlines = 10 + exec "syn sync ccomment haxeComment minlines=" . haxe_minlines +endif + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Mark braces in parens as errors +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists("haxe_mark_braces_in_parens_as_errors") + syn match haxeInParen contained "[{}]" + HaxeHiLink haxeInParen haxeError + syn cluster haxeTop add=haxeInParen +endif + + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Highlight Functions +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if exists("haxe_highlight_functions") + if haxe_highlight_functions == "indent" + syn match haxeFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=haxeScopeDecl,haxeType,haxeStorageClass,@haxeClasses + syn region haxeFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=haxeScopeDecl,haxeType,haxeStorageClass,@haxeClasses + syn match haxeFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=haxeScopeDecl,haxeType,haxeStorageClass,@haxeClasses + syn region haxeFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=haxeScopeDecl,haxeType,haxeStorageClass,@haxeClasses + else + " This line catches method declarations at any indentation>0, but it assumes + " two things: + " 1. class names are always capitalized (ie: Button) + " 2. method names are never capitalized (except constructors, of course) + syn region haxeFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|override\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*(+ end=+)+ contains=haxeScopeDecl,haxeType,haxeStorageClass,haxeComment,haxeLineComment,@haxeClasses + endif + syn match haxeBraces "[{}]" + syn cluster haxeTop add=haxeFuncDef,haxeBraces +endif + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Add special handling for haxecc.vim +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" use separate name so that it can be deleted in haxecc.vim +syn match haxeError2 "#\|=<" +HaxeHiLink haxeError2 haxeError + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Catch extra paren errors +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" catch errors caused by wrong parenthesis +syn region haxeParenT transparent matchgroup=haxeParen start="(" end=")" contains=@haxeTop,haxeParenT1,haxeString,haxeSingleString +syn region haxeParenT1 transparent matchgroup=haxeParen1 start="(" end=")" contains=@haxeTop,haxeParenT2 contained +syn region haxeParenT2 transparent matchgroup=haxeParen2 start="(" end=")" contains=@haxeTop,haxeParenT contained +syn match haxeParenError ")" +HaxeHiLink haxeParenError haxeError + + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" load a spearte haxeid.vim file +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +if filereadable(expand(":p:h")."/haxeid.vim") + source :p:h/haxeid.vim +endif diff --git a/syntax/hb.vim b/syntax/hb.vim new file mode 100644 index 000000000..25000a33a --- /dev/null +++ b/syntax/hb.vim @@ -0,0 +1,93 @@ +if polyglot#init#is_disabled(expand(':p'), 'hb', 'syntax/hb.vim') + finish +endif + +" Vim syntax file +" Language: Hyper Builder +" Maintainer: Alejandro Forero Cuervo +" URL: http://bachue.com/hb/vim/syntax/hb.vim +" Last Change: 2012 Jan 08 by Thilo Six + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" Read the HTML syntax to start with +"syn include @HTMLStuff :p:h/htmlhb.vim + +"this would be nice but we are supposed not to do it +"set mps=<:> + +"syn region HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar +"syn region HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar + +"syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*" + +syn match htmlSpecialChar "&[^;]*;" contained + +syn match HBhtmlTagSk contained "[A-Za-z]*" + +syn match HBhtmlTagS contained "<\s*\(hb\s*\.\s*\(sec\|min\|hour\|day\|mon\|year\|input\|html\|time\|getcookie\|streql\|url-enc\)\|wall\s*\.\s*\(show\|info\|id\|new\|rm\|count\)\|auth\s*\.\s*\(chk\|add\|find\|user\)\|math\s*\.\s*exp\)\s*\([^.A-Za-z0-9]\|$\)" contains=HBhtmlTagSk transparent + +syn match HBhtmlTagN contained "[A-Za-z0-9\/\-]\+" + +syn match HBhtmlTagB contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN + +syn region HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError + +syn match HBFileName ".*" contained + +syn match HBDirectiveKeyword ":\s*\(include\|lib\|set\|out\)\s\+" contained + +syn match HBDirectiveError "^:.*$" contained + +"syn match HBDirectiveBlockEnd "^:\s*$" contained + +"syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName + +"syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName + +syn match HBInvalidLine "^.*$" + +syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword + +syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword + +syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend + +"syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut + +syn match HBComment "^#.*$" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link HBhtmlString String +hi def link HBhtmlTagN Function +hi def link htmlSpecialChar String + +hi def link HBInvalidLine Error +hi def link HBFoobar Comment +hi HBFileName guibg=lightgray guifg=black +hi def link HBDirectiveError Error +hi def link HBDirectiveBlockEnd HBDirectiveKeyword +hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen +hi def link HBComment Comment +hi def link HBhtmlTagSk Statement + + +syn sync match Normal grouphere NONE "^:\s*$" +syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$" +syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$" +"syn sync match Block grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+" +"syn sync match Block grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+" + +let b:current_syntax = "hb" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: ts=8 diff --git a/syntax/hcl.vim b/syntax/hcl.vim index 66d4071cb..7b6ab441e 100644 --- a/syntax/hcl.vim +++ b/syntax/hcl.vim @@ -1,48 +1,76 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 - +if polyglot#init#is_disabled(expand(':p'), 'terraform', 'syntax/hcl.vim') + finish +endif -if exists("b:current_syntax") +" Forked from Larry Gilbert's syntax file +" github.com/L2G/vim-syntax-terraform +if exists('b:current_syntax') finish endif -syn match hclEqual '=' -syn match hclSimpleString '"[^\"]*"' -syn region hclComment display oneline start='\%\(^\|\s\)#' end='$' -syn region hclComment display oneline start='\%\(^\|\s\)//' end='$' -syn region hclInterpolation display oneline start='(' end=')' contains=hclInterpolation,hclSimpleString -syn region hclSmartString display oneline start='"' end='"\s*$' contains=hclInterpolation - -syn keyword hclRootKeywords variable provider resource nextgroup=hclString,hclString skipwhite -syn keyword hclRootKeywords default nextgroup=hclEquals skipwhite - - -syn keyword hclAwsResourcesKeywords availability_zones desired_capacity force_delete health_check_grace_period health_check_type launch_configuration load_balancers max_size min_size name vpc_zone_identifier nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords allocated_storage availability_zone backup_retention_period backup_window db_subnet_group_name engine engine_version final_snapshot_identifier identifier instance_class iops maintenance_window multi_az name password port publicly_accessible security_group_names skip_final_snapshot username vpc_security_group_ids nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords cidr description ingress name security_group_id security_group_name security_group_owner_id source_security_group_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords description name subnet_ids nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords instance vpc nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords availability_zones health_check healthy_threshold instance_port instance_protocol instances internal interval lb_port lb_protocol listener name security_groups ssl_certificate_id subnets target timeout unhealthy_threshold nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords ami associate_public_ip_address availability_zone ebs_optimized iam_instance_profile instance_type key_name private_ip security_groups source_dest_check subnet_id tags user_data nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords vpc_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords iam_instance_profile image_id instance_type key_name name name_prefix security_groups user_data nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords name records ttl type zone_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords name nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords route_table_id subnet_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords cidr_block gateway_id instance_id route vpc_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords acl bucket nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords cidr_blocks description from_port ingress name owner_id protocol security_groups self tags to_port vpc_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords availability_zone- cidr_block map_public_ip_on_launch vpc_id nextgroup=hclEquals,hclString skipwhite -syn keyword hclAwsResourcesKeywords cidr_block enable_dns_hostnames enable_dns_support tags nextgroup=hclEquals,hclString skipwhite - - -hi def link hclComment Comment -hi def link hclEqual Operator -hi def link hclRootKeywords Statement -hi def link hclAwsResourcesKeywords Type -hi def link hclSmartString String -hi def link hclInterpolation String -hi def link hclSimpleString PreProc - -let b:current_syntax = "hcl" +let s:cpo_save = &cpoptions +set cpoptions&vim +" Identifiers are made up of alphanumeric characters, underscores, and +" hyphens. +if has('patch-7.4.1142') + syn iskeyword a-z,A-Z,48-57,_,- endif + +syn case match + +" A block is introduced by a type, some number of labels - which are either +" strings or identifiers - and an opening curly brace. Match the type. +syn match hclBlockType /^\s*\zs\K\k*\ze\s\+\(\("\K\k*"\|\K\k*\)\s\+\)*{/ + +" An attribute name is an identifier followed by an equals sign. +syn match hclAttributeAssignment /\(\K\k*\.\)*\K\k*\s\+=\s/ contains=hclAttributeName +syn match hclAttributeName /\<\K\k*\>/ contained + +syn keyword hclValueBool true false + +syn keyword hclTodo contained TODO FIXME XXX BUG +syn region hclComment start="/\*" end="\*/" contains=hclTodo,@Spell +syn region hclComment start="#" end="$" contains=hclTodo,@Spell +syn region hclComment start="//" end="$" contains=hclTodo,@Spell + +""" misc. +syn match hclValueDec "\<[0-9]\+\([kKmMgG]b\?\)\?\>" +syn match hclValueHexaDec "\<0x[0-9a-f]\+\([kKmMgG]b\?\)\?\>" +syn match hclBraces "[\[\]]" + +""" skip \" and \\ in strings. +syn region hclValueString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=hclStringInterp +syn region hclStringInterp matchgroup=hclBraces start=/\(^\|[^$]\)\$\zs{/ end=/}/ contained contains=ALLBUT,hclAttributeName +syn region hclHereDocText start=/<<-\?\z([a-z0-9A-Z]\+\)/ end=/^\s*\z1/ contains=hclStringInterp + +"" Functions. +syn match hclFunction "[a-z0-9]\+(\@=" + +""" HCL2 +syn keyword hclRepeat for in +syn keyword hclConditional if +syn keyword hclValueNull null + +" enable block folding +syn region hclBlockBody matchgroup=hclBraces start="{" end="}" fold transparent + +hi def link hclComment Comment +hi def link hclTodo Todo +hi def link hclBraces Delimiter +hi def link hclAttributeName Identifier +hi def link hclBlockType Type +hi def link hclValueBool Boolean +hi def link hclValueDec Number +hi def link hclValueHexaDec Number +hi def link hclValueString String +hi def link hclHereDocText String +hi def link hclFunction Function +hi def link hclRepeat Repeat +hi def link hclConditional Conditional +hi def link hclValueNull Constant + +let b:current_syntax = 'hcl' + +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/syntax/helm.vim b/syntax/helm.vim index 8118a5735..06265a865 100644 --- a/syntax/helm.vim +++ b/syntax/helm.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'helm') == -1 +if polyglot#init#is_disabled(expand(':p'), 'helm', 'syntax/helm.vim') + finish +endif if exists("b:current_syntax") finish @@ -72,7 +74,7 @@ hi def link goImaginary Number syn cluster gotplLiteral contains=goString,goRawString,goCharacter,@goInt,goFloat,goImaginary syn keyword gotplControl contained if else end range with template include tpl required define syn keyword gotplFunctions contained and call html index js len not or print printf println urlquery eq ne lt le gt ge -syn keyword goSprigFunctions contained abbrev abbrevboth add add1 adler32sum ago append atoi b32dec b32enc b64dec b64enc base biggest buildCustomCert camelcase cat ceil clean coalesce \contains compact date dateInZone dateModify date_in_zone date_modify default derivePassword dict dir div empty ext fail first float64 floor fromJson fromYaml genCA genPrivateKey genSelfSignedCert genSignedCert has hasKey hasPrefix hasSuffix hello htmlDate htmlDateInZone indent initial initials int int64 isAbs join kebabcase keys kindIs kindOf last list lower max merge mergeOverwrite min mod mul nindent nospace now omit pick pluck plural prepend quote randAlpha randAlphaNum randAscii randNumeric regexFind regexFindAll regexMatch regexReplaceAll regexReplaceAllLiteral regexSplit repeat replace rest reverse round semver semverCompare set sha1sum sha256sum shuffle slice snakecase sortAlpha split splitList splitn squote sub substr swapcase ternary title toDate toJson toPrettyJson toString toStrings toToml toYaml trim trimAll trimPrefix trimSuffix trimall trunc tuple typeIs typeIsLike typeOf uniq unixEpoch unset until untilStep untitle upper uuidv4 values without wrap wrapWith +syn keyword goSprigFunctions contained abbrev abbrevboth add add1 adler32sum ago append atoi b32dec b32enc b64dec b64enc base biggest buildCustomCert bcrypt camelcase cat ceil clean coalesce \contains compact chunk date dateInZone dateModify date_in_zone date_modify default derivePassword dict dir div dig deepCopy decryptAES encryptAES env expandenv empty ext fail first float64 floor fromJson fromYaml genCA genCAWithKey genPrivateKey genSelfSignedCert genSelfSignedCertWithKey genSignedCert genSignedCertWithKey getHostByName has hasKey hasPrefix hasSuffix hello htmlDate htmlDateInZone htpasswd indent initial initials int int64 isAbs join kebabcase keys kindIs kindOf last list lower max merge mergeOverwrite min mod mul nindent nospace now omit pick pluck plural prepend quote randAlpha randAlphaNum randAscii randNumeric randBytes regexFind regexFindAll regexMatch regexReplaceAll regexReplaceAllLiteral regexSplit repeat replace rest reverse round semver semverCompare set sha1sum sha256sum shuffle slice snakecase sortAlpha split splitList splitn squote sub substr swapcase ternary title toDate toJson toPrettyJson toString toStrings toToml toYaml trim trimAll trimPrefix trimSuffix trimall trunc tuple typeIs typeIsLike typeOf uniq unixEpoch unset until untilStep untitle upper uuidv4 values without wrap wrapWith syn match gotplVariable contained /\$[a-zA-Z0-9_]*\>/ syn match goTplIdentifier contained /\.[^\s}]+\>/ @@ -91,5 +93,3 @@ hi def link goTplComment Comment let b:current_syntax = "helm" " vim: sw=2 ts=2 et - -endif diff --git a/syntax/help.vim b/syntax/help.vim index aca620ee9..e11f345e7 100644 --- a/syntax/help.vim +++ b/syntax/help.vim @@ -1,9 +1,11 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 +if polyglot#init#is_disabled(expand(':p'), 'help', 'syntax/help.vim') + finish +endif " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2020 Jul 28 +" Last Change: 2022 Sep 26 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -21,15 +23,9 @@ if has("conceal") else syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" endif -if has("ebcdic") - syn match helpHyperTextJump "\\\@.,]\+}" +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]-.>" @@ -99,8 +97,8 @@ 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 +syn match helpSpecial "META-." +syn match helpSpecial "ALT-." " Highlight group items in their own color. syn match helpComment "\t[* ]Comment\t\+[a-z].*" @@ -154,7 +152,6 @@ if v:lang =~ '\' || v:lang =~ '_IT\>' || v:lang =~? "italian" 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 @@ -175,7 +172,6 @@ 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 @@ -221,5 +217,3 @@ let b:current_syntax = "help" let &cpo = s:cpo_save unlet s:cpo_save " vim: ts=8 sw=2 - -endif diff --git a/syntax/hercules.vim b/syntax/hercules.vim new file mode 100644 index 000000000..33657e32e --- /dev/null +++ b/syntax/hercules.vim @@ -0,0 +1,123 @@ +if polyglot#init#is_disabled(expand(':p'), 'hercules', 'syntax/hercules.vim') + finish +endif + +" Vim syntax file +" Language: Hercules +" Maintainer: Dana Edwards +" Extensions: *.vc,*.ev,*.rs +" Last change: Nov. 9, 2001 +" Comment: Hercules physical IC design verification software ensures +" that an IC's physical design matches its logical design and +" satisfies manufacturing rules. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Ignore case +syn case ignore + +" Hercules runset sections +syn keyword herculesType header assign_property alias assign +syn keyword herculesType options preprocess_options +syn keyword herculesType explode_options technology_options +syn keyword herculesType drc_options database_options +syn keyword herculesType text_options lpe_options evaccess_options +syn keyword herculesType check_point compare_group environment +syn keyword herculesType grid_check include layer_stats load_group +syn keyword herculesType restart run_only self_intersect set snap +syn keyword herculesType system variable waiver + +" Hercules commands +syn keyword herculesStatement attach_property boolean cell_extent +syn keyword herculesStatement common_hierarchy connection_points +syn keyword herculesStatement copy data_filter alternate delete +syn keyword herculesStatement explode explode_all fill_pattern find_net +syn keyword herculesStatement flatten +syn keyword herculesStatement level negate polygon_features push +syn keyword herculesStatement rectangles relocate remove_overlap reverse select +syn keyword herculesStatement select_cell select_contains select_edge select_net size +syn keyword herculesStatement text_polygon text_property vertex area cut +syn keyword herculesStatement density enclose external inside_edge +syn keyword herculesStatement internal notch vectorize center_to_center +syn keyword herculesStatement length mask_align moscheck rescheck +syn keyword herculesStatement analysis buildsub init_lpe_db capacitor +syn keyword herculesStatement device gendev nmos pmos diode npn pnp +syn keyword herculesStatement resistor set_param save_property +syn keyword herculesStatement connect disconnect text text_boolean +syn keyword herculesStatement replace_text create_ports label graphics +syn keyword herculesStatement save_netlist_database lpe_stats netlist +syn keyword herculesStatement spice graphics_property graphics_netlist +syn keyword herculesStatement write_milkyway multi_rule_enclose +syn keyword herculesStatement if error_property equate compare +syn keyword herculesStatement antenna_fix c_thru dev_connect_check +syn keyword herculesStatement dev_net_count device_count net_filter +syn keyword herculesStatement net_path_check ratio process_text_opens + +" Hercules keywords +syn keyword herculesStatement black_box_file block compare_dir equivalence +syn keyword herculesStatement format gdsin_dir group_dir group_dir_usage +syn keyword herculesStatement inlib layout_path outlib output_format +syn keyword herculesStatement output_layout_path schematic schematic_format +syn keyword herculesStatement scheme_file output_block else +syn keyword herculesStatement and or not xor andoverlap inside outside by to +syn keyword herculesStatement with connected connected_all texted_with texted +syn keyword herculesStatement by_property cutting edge_touch enclosing inside +syn keyword herculesStatement inside_hole interact touching vertex + +" Hercules comments +syn region herculesComment start="/\*" skip="/\*" end="\*/" contains=herculesTodo +syn match herculesComment "//.*" contains=herculesTodo + +" Preprocessor directives +syn match herculesPreProc "^#.*" +syn match herculesPreProc "^@.*" +syn match herculesPreProc "macros" + +" Hercules COMMENT option +syn match herculesCmdCmnt "comment.*=.*" + +" Spacings, Resolutions, Ranges, Ratios, etc. +syn match herculesNumber "-\=\<[0-9]\+L\=\>\|0[xX][0-9]\+\>" + +" Parenthesis sanity checker +syn region herculesZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesCurlyError +syn region herculesZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesParenError +syn region herculesZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,herculesError,herculesCurlyError,herculesParenError +syn match herculesError "[)\]}]" +syn match herculesBraceError "[)}]" contained +syn match herculesCurlyError "[)\]]" contained +syn match herculesParenError "[\]}]" contained + +" Hercules output format +"syn match herculesOutput "([0-9].*)" +"syn match herculesOutput "([0-9].*\;.*)" +syn match herculesOutput "perm\s*=.*(.*)" +syn match herculesOutput "temp\s*=\s*" +syn match herculesOutput "error\s*=\s*(.*)" + +"Modify the following as needed. The trade-off is performance versus functionality. +syn sync lines=100 + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link herculesStatement Statement +hi def link herculesType Type +hi def link herculesComment Comment +hi def link herculesPreProc PreProc +hi def link herculesTodo Todo +hi def link herculesOutput Include +hi def link herculesCmdCmnt Identifier +hi def link herculesNumber Number +hi def link herculesBraceError herculesError +hi def link herculesCurlyError herculesError +hi def link herculesParenError herculesError +hi def link herculesError Error + + +let b:current_syntax = "hercules" + +" vim: ts=8 diff --git a/syntax/hex.vim b/syntax/hex.vim new file mode 100644 index 000000000..7a6cfc3af --- /dev/null +++ b/syntax/hex.vim @@ -0,0 +1,93 @@ +if polyglot#init#is_disabled(expand(':p'), 'hex', 'syntax/hex.vim') + finish +endif + +" Vim syntax file +" Language: Intel HEX +" Maintainer: Markus Heidelberg +" Previous version: Sams Ricahrd +" Last Change: 2015 Feb 24 + +" Each record (line) is built as follows: +" +" field digits states +" +" +----------+ +" | start | 1 (':') hexRecStart +" +----------+ +" | count | 2 hexDataByteCount +" +----------+ +" | address | 4 hexNoAddress, hexDataAddress, (hexAddressFieldUnknown) +" +----------+ +" | type | 2 hexRecType, (hexRecTypeUnknown) +" +----------+ +" | data | 0..510 hexDataOdd, hexDataEven, hexExtendedAddress, hexStartAddress, (hexDataFieldUnknown, hexDataUnexpected) +" +----------+ +" | checksum | 2 hexChecksum +" +----------+ +" +" States in parentheses in the upper format description indicate that they +" should not appear in a valid file. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn match hexRecStart "^:" + +syn match hexDataByteCount "^:[0-9a-fA-F]\{2}" contains=hexRecStart nextgroup=hexAddress + +syn match hexAddress "[0-9a-fA-F]\{4}" transparent contained nextgroup=hexRecTypeUnknown,hexRecType +" The address field groups include the record type field in the last 2 +" characters, the proper match for highlighting follows below. +syn match hexAddressFieldUnknown "^:[0-9a-fA-F]\{8}" contains=hexDataByteCount nextgroup=hexDataFieldUnknown,hexChecksum +syn match hexDataAddress "^:[0-9a-fA-F]\{6}00" contains=hexDataByteCount nextgroup=hexDataOdd,hexChecksum +syn match hexNoAddress "^:[0-9a-fA-F]\{6}01" contains=hexDataByteCount nextgroup=hexDataUnexpected,hexChecksum +syn match hexNoAddress "^:[0-9a-fA-F]\{6}0[24]" contains=hexDataByteCount nextgroup=hexExtendedAddress +syn match hexNoAddress "^:[0-9a-fA-F]\{6}0[35]" contains=hexDataByteCount nextgroup=hexStartAddress + +syn match hexRecTypeUnknown "[0-9a-fA-F]\{2}" contained +syn match hexRecType "0[0-5]" contained + +syn match hexDataFieldUnknown "[0-9a-fA-F]\{2}" contained nextgroup=hexDataFieldUnknown,hexChecksum +" alternating highlight per byte for easier reading +syn match hexDataOdd "[0-9a-fA-F]\{2}" contained nextgroup=hexDataEven,hexChecksum +syn match hexDataEven "[0-9a-fA-F]\{2}" contained nextgroup=hexDataOdd,hexChecksum +" data bytes which should not exist +syn match hexDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=hexDataUnexpected,hexChecksum +" Data digit pair regex usage also results in only highlighting the checksum +" if the number of data characters is even. + +" special data fields +syn match hexExtendedAddress "[0-9a-fA-F]\{4}" contained nextgroup=hexDataUnexpected,hexChecksum +syn match hexStartAddress "[0-9a-fA-F]\{8}" contained nextgroup=hexDataUnexpected,hexChecksum + +syn match hexChecksum "[0-9a-fA-F]\{2}$" contained + +" Folding Data Records below an Extended Segment/Linear Address Record +syn region hexExtAdrBlock start="^:[0-9a-fA-F]\{7}[24]" skip="^:[0-9a-fA-F]\{7}0" end="^:"me=s-1 fold transparent + +" 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 hexRecStart hexRecType +hi def link hexDataByteCount Constant +hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic +hi def link hexDataAddress Comment +hi def link hexNoAddress DiffAdd +hi def link hexRecTypeUnknown hexRecType +hi def link hexRecType WarningMsg +hi def hexDataFieldUnknown term=italic cterm=italic gui=italic +hi def hexDataOdd term=bold cterm=bold gui=bold +hi def hexDataEven term=NONE cterm=NONE gui=NONE +hi def link hexDataUnexpected Error +hi def link hexExtendedAddress hexDataAddress +hi def link hexStartAddress hexDataAddress +hi def link hexChecksum DiffChange + + +let b:current_syntax = "hex" + +" vim: ts=8 diff --git a/syntax/hgcommit.vim b/syntax/hgcommit.vim new file mode 100644 index 000000000..af82c6cbb --- /dev/null +++ b/syntax/hgcommit.vim @@ -0,0 +1,31 @@ +if polyglot#init#is_disabled(expand(':p'), 'hgcommit', 'syntax/hgcommit.vim') + finish +endif + +" Vim syntax file +" Language: hg (Mercurial) commit file +" Maintainer: Ken Takata +" Last Change: 2012 Aug 23 +" Filenames: hg-editor-*.txt +" License: VIM License +" URL: https://github.com/k-takata/hg-vim + +if exists("b:current_syntax") + finish +endif + +syn match hgcommitComment "^HG:.*$" contains=@NoSpell +syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment + +hi def link hgcommitComment Comment +hi def link hgcommitUser String +hi def link hgcommitBranch String +hi def link hgcommitAdded Identifier +hi def link hgcommitChanged Special +hi def link hgcommitRemoved Constant + +let b:current_syntax = "hgcommit" diff --git a/syntax/hive.vim b/syntax/hive.vim index 12a87f8ec..8561795e1 100644 --- a/syntax/hive.vim +++ b/syntax/hive.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hive') == -1 +if polyglot#init#is_disabled(expand(':p'), 'hive', 'syntax/hive.vim') + finish +endif " Vim syntax file " Language: HIVE Query Language @@ -135,5 +137,3 @@ hi link hiveVar Special let b:current_syntax = "hive" " vim: ts=4 - -endif diff --git a/syntax/hjson.vim b/syntax/hjson.vim new file mode 100644 index 000000000..5b82b9fe6 --- /dev/null +++ b/syntax/hjson.vim @@ -0,0 +1,95 @@ +if polyglot#init#is_disabled(expand(':p'), 'hjson', 'syntax/hjson.vim') + finish +endif + +" Vim syntax file +" Language: Hjson +" Maintainer: Christian Zangl +" Version: 1.0 +" Acknowledgement: Based off of vim/runtime/syntax/json.vim + +if !exists("main_syntax") + " quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif + let main_syntax = 'hjson' +endif + +" quoteless Strings (has least priority) +syn match hjsonStringUQ /[^ \t].*$/ + +syn match hjsonNoise /\%(:\|,\)/ + +" Syntax: Comments +syn match hjsonLineComment "\/\/.*" +syn match hjsonLineComment2 "#.*" +syn region hjsonComment start="/\*" end="\*/" + +" Syntax: Strings +" Separated into a match and region because a region by itself is always greedy +syn match hjsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n,}\]#\/]/ contains=hjsonString +syn region hjsonString oneline matchgroup=hjsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=hjsonEscape contained +syn match hjsonStringMatchSQ /'\([^']\|\\\'\)\+'\ze[[:blank:]\r\n,}\]#\/]/ contains=hjsonStringSQ +syn region hjsonStringSQ oneline matchgroup=hjsonQuote start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=hjsonEscape contained +" multiline: +syn match hjsonStringMatchML /'''\([\r\n]\|.\)\{-}'''/ contains=hjsonStringML +syn region hjsonStringML matchgroup=hjsonQuote start=/'''/ end=/'''/ contained + +" Syntax: Numbers +syn match hjsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>\ze[[:blank:]\r\n,}\]]" + +" Syntax: Boolean +syn match hjsonBoolean /\(true\|false\)\ze\_s*[\]}#\/,\r\n]/ + +" Syntax: Null +syn match hjsonNull /null\ze\_s*[\]}#\/,\r\n]/ + +" Syntax: JSON Object Keywords +" Separated into a match and region because a region by itself is always greedy +syn match hjsonKeywordMatchQ /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=hjsonKeywordQ +syn region hjsonKeywordQ matchgroup=hjsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained +syn match hjsonKeywordMatchSQ /'\([^']\|\\\'\)\+'[[:blank:]\r\n]*\:/ contains=hjsonKeywordSQ +syn region hjsonKeywordSQ matchgroup=hjsonQuote start=/'/ end=/'\ze[[:blank:]\r\n]*\:/ contained +" without quotes +syn match hjsonKeywordMatch /[^][",:{}[:blank:]]\+\:/ contains=hjsonKeyword +syn region hjsonKeyword matchgroup=hjsonQuote start=// end=/\ze\:/ contained + +" Syntax: Escape sequences +syn match hjsonEscape "\\["'\\/bfnrt]" contained +syn match hjsonEscape "\\u\x\{4}" contained + +" Syntax: Array/Object Braces +syn region hjsonFold matchgroup=hjsonBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold +syn region hjsonFold matchgroup=hjsonBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent fold + +" Define the default highlighting. +hi def link hjsonComment Comment +hi def link hjsonLineComment hjsonComment +hi def link hjsonLineComment2 hjsonComment +hi def link hjsonString String +hi def link hjsonStringSQ hjsonString +hi def link hjsonStringML hjsonString +hi def link hjsonStringUQ hjsonString +hi def link hjsonEscape Character "Special +hi def link hjsonNumber Number +hi def link hjsonBraces Delimiter +hi def link hjsonNull Function +hi def link hjsonBoolean Boolean +hi def link hjsonKeyword Label +hi def link hjsonKeywordQ hjsonKeyword +hi def link hjsonKeywordSQ hjsonKeyword +hi def link hjsonQuote Character "Quote +hi def link hjsonNoise Noise + +let b:current_syntax = "hjson" +if main_syntax == 'hjson' + unlet main_syntax +endif + +" MIT License +" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra, Christian Zangl +"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. + diff --git a/syntax/hog.vim b/syntax/hog.vim new file mode 100644 index 000000000..47af8f194 --- /dev/null +++ b/syntax/hog.vim @@ -0,0 +1,212 @@ +if polyglot#init#is_disabled(expand(':p'), 'hog', 'syntax/hog.vim') + finish +endif + +" Vim syntax file +" Language: hog (Snort.conf + .rules) +" Maintainer: Victor Roemer, . +" Last Change: 2019 Sep 22 +" 2012 Oct 24 -> Originalish release +" 2019 Sep 22 -> included PR 3069 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +setlocal iskeyword-=: +setlocal iskeyword+=- +syn case ignore + +" Hog ruletype crap +syn keyword HogRuleType ruletype nextgroup=HogRuleTypeName skipwhite +syn match HogRuleTypeName "[[:alnum:]_]\+" contained nextgroup=HogRuleTypeBody skipwhite +syn region HogRuleTypeBody start="{" end="}" contained contains=HogRuleTypeType,HogOutput fold +syn keyword HogRuleTypeType type contained + +" Hog Configurables +syn keyword HogPreproc preprocessor nextgroup=HogConfigName skipwhite +syn keyword HogConfig config nextgroup=HogConfigName skipwhite +syn keyword HogOutput output nextgroup=HogConfigName skipwhite +syn match HogConfigName "[[:alnum:]_-]\+" contained nextgroup=HogConfigOpts skipwhite +syn region HogConfigOpts start=":" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold keepend contained contains=HogSpecial,HogNumber,HogIPAddr,HogVar,HogComment + +" Event filter's and threshold's +syn region HogEvFilter start="event_filter\|threshold" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold transparent keepend contains=HogEvFilterKeyword,HogEvFilterOptions,HogComment +syn keyword HogEvFilterKeyword skipwhite event_filter threshold +syn keyword HogEvFilterOptions skipwhite type nextgroup=HogEvFilterTypes +syn keyword HogEvFilterTypes skipwhite limit threshold both contained +syn keyword HogEvFilterOptions skipwhite track nextgroup=HogEvFilterTrack +syn keyword HogEvFilterTrack skipwhite by_src by_dst contained +syn keyword HogEvFilterOptions skipwhite gen_id sig_id count seconds nextgroup=HogNumber + +" Suppressions +syn region HogEvFilter start="suppress" skip="\\.\{-}$\|^\s*#.\{-}$\|^\s*$" end="$" fold transparent keepend contains=HogSuppressKeyword,HogComment +syn keyword HogSuppressKeyword skipwhite suppress +syn keyword HogSuppressOptions skipwhite gen_id sig_id nextgroup=HogNumber +syn keyword HogSuppressOptions skipwhite track nextgroup=HogEvFilterTrack +syn keyword HogSuppressOptions skipwhite ip nextgroup=HogIPAddr + +" Attribute table +syn keyword HogAttribute attribute_table nextgroup=HogAttributeFile +syn match HogAttributeFile contained ".*$" contains=HogVar,HogAttributeType,HogComment +syn keyword HogAttributeType filename + +" Hog includes +syn keyword HogInclude include nextgroup=HogIncludeFile skipwhite +syn match HogIncludeFile ".*$" contained contains=HogVar,HogComment + +" Hog dynamic libraries +syn keyword HogDylib dynamicpreprocessor dynamicengine dynamicdetection nextgroup=HogDylibFile skipwhite +syn match HogDylibFile "\s.*$" contained contains=HogVar,HogDylibType,HogComment +syn keyword HogDylibType directory file contained + +" Variable dereferenced with '$' +syn match HogVar "\$[[:alnum:]_]\+" + +", Variables declared with 'var' +syn keyword HogVarType var nextgroup=HogVarSet skipwhite +syn match HogVarSet "[[:alnum:]_]\+" display contained nextgroup=HogVarValue skipwhite +syn match HogVarValue ".*$" contained contains=HogString,HogNumber,HogVar,HogComment + +" Variables declared with 'ipvar' +syn keyword HogIPVarType ipvar nextgroup=HogIPVarSet skipwhite +syn match HogIPVarSet "[[:alnum:]_]\+" display contained nextgroup=HogIPVarList,HogSpecial skipwhite +syn region HogIPVarList start="\[" end="]" contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot + +" Variables declared with 'portvar' +syn keyword HogPortVarType portvar nextgroup=HogPortVarSet skipwhite +syn match HogPortVarSet "[[:alnum:]_]\+" display contained nextgroup=HogPortVarList,HogPort,HogOpRange,HogOpNot,HogSpecial skipwhite +syn region HogPortVarList start="\[" end="]" contains=HogPortVarList,HogVar,HogOpNot,HogPort,HogOpRange,HogOpNot +syn match HogPort "\<\%(\d\+\|any\)\>" display contains=HogOpRange nextgroup=HogOpRange + +" Generic stuff +syn match HogIPAddr contained "\<\%(\d\{1,3}\(\.\d\{1,3}\)\{3}\|any\)\>" nextgroup=HogIPCidr +syn match HogIPAddr contained "\<\d\{1,3}\(\.\d\{1,3}\)\{3}\>" nextgroup=HogIPCidr +syn match HogIPCidr contained "\/\([0-2][0-9]\=\|3[0-2]\=\)" +syn region HogHexEsc contained start='|' end='|' oneline +syn region HogString contained start='"' end='"' extend oneline contains=HogHexEsc +syn match HogNumber contained display "\<\d\+\>" +syn match HogNumber contained display "\<\d\+\>" +syn match HogNumber contained display "0x\x\+\>" +syn keyword HogSpecial contained true false yes no default all any +syn keyword HogSpecialAny contained any +syn match HogOpNot "!" contained +syn match HogOpRange ":" contained + +" Rules +syn keyword HogRuleAction activate alert drop block dynamic log pass reject sdrop sblock skipwhite nextgroup=HogRuleProto,HogRuleBlock +syn keyword HogRuleProto ip tcp tcp-pkt tcp-stream udp icmp http ftp tls smb dns dcerpc ssh smtp imap msn modbus dnp3 enip nfs ikev2 ntp skipwhite contained nextgroup=HogRuleSrcIP +syn match HogRuleSrcIP "\S\+" transparent skipwhite contained contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot nextgroup=HogRuleSrcPort +syn match HogRuleSrcPort "\S\+" transparent skipwhite contained contains=HogPortVarList,HogVar,HogPort,HogOpRange,HogOpNot nextgroup=HogRuleDir +syn match HogRuleDir "->\|<>" skipwhite contained nextgroup=HogRuleDstIP +syn match HogRuleDstIP "\S\+" transparent skipwhite contained contains=HogIPVarList,HogIPAddr,HogVar,HogOpNot nextgroup=HogRuleDstPort +syn match HogRuleDstPort "\S\+" transparent skipwhite contained contains=HogPortVarList,HogVar,HogPort,HogOpRange,HogOpNot nextgroup=HogRuleBlock +syn region HogRuleBlock start="(" end=")" transparent skipwhite contained contains=HogRuleOption,HogComment fold +",HogString,HogComment,HogVar,HogOptNot +"syn region HogRuleOption start="\" end="\ze;" skipwhite contained contains=HogNumber +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP msg gid sid rev classtype priority metadata target content nocase rawbytes +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP depth startswith offset distance within http_client_body http_cookie http_raw_cookie http_header +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP http_raw_header http_request_line http_method http_uri http_raw_uri http_protocol http_response_line http_stat_code http_stat_msg +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP http_user_agent http_accept http_accept_enc http_accept_lang http_connection http_content_type http_content_len +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP http_referer http_start http_header_names http_server_body http_host http_raw_host +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP filename fileext filemagic filestore filemd5 filesha1 filesha256 filesize +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP dns_query tls_cert_subject tls_cert_issuer tls_cert_serial tls_cert_fingerprint +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP tls_sni tls_cert_notbefore tls_cert_notafter tls_cert_expired tls_cert_valid +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP tls.version tls.subject tls.issuerdn tls.fingerprint tls.store ja3_hash ja3_string +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP modbus dnp3_func dnp3_ind dnp3_obj dnp3_data enip_command cip_service +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP app-layer-protocol app-layer-event xbits iprep lua luajit +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP fast_pattern prefilter uricontent urilen isdataat pcre pkt_data file_data base64_decode base64_data +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP byte_test byte_jump byte_extract ftpdata_command ftpbounce asn1 cvs dce_iface dce_opnum dce_stub_data +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP sip_method sip_stat_code sip_header sip_body gtp_type gtp_info gtp_version ssl_version +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP ssl_state fragoffset ttl tos id ipopts geoip fragbits dsize flags flow flowbits flowint seq ack window +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP itype icode icmp_id icmp_seq rpc ip_proto sameip stream_reassemble stream_size +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP logto session resp react tag activates activated_by count replace detection_filter +syn keyword HogRuleOption skipwhite contained nextgroup=HogRuleSROP threshold reference sd_pattern file_type file_group + +syn region HogRuleSROP start=':' end=";" transparent keepend contained contains=HogRuleChars,HogString,HogNumber +syn match HogRuleChars "\%(\k\|\.\|?\|=\|/\|%\|&\)\+" contained +syn match HogURLChars "\%(\.\|?\|=\)\+" contained + +" Hog File Type Rules +syn match HogFileType /^\s*file.*$/ transparent contains=HogFileTypeOpt,HogFileFROP +syn keyword HogFileTypeOpt skipwhite contained nextgroup=HogRuleFROP file type ver category id rev content offset msg group +syn region HogFileFROP start=':' end=";" transparent keepend contained contains=NotASemicoln +syn match NotASemiColn ".*$" contained + + +" Comments +syn keyword HogTodo XXX TODO NOTE contained +syn match HogTodo "Step\s\+#\=\d\+" contained +syn region HogComment start="#" end="$" contains=HogTodo,@Spell + +syn case match + +if !exists("hog_minlines") + let hog_minlines = 100 +endif +exec "syn sync minlines=" . hog_minlines + +hi link HogRuleType Statement +hi link HogRuleTypeName Type +hi link HogRuleTypeType Keyword + +hi link HogPreproc Statement +hi link HogConfig Statement +hi link HogOutput Statement +hi link HogConfigName Type + +"hi link HogEvFilter +hi link HogEvFilterKeyword Statement +hi link HogSuppressKeyword Statement +hi link HogEvFilterTypes Constant +hi link HogEvFilterTrack Constant + +hi link HogAttribute Statement +hi link HogAttributeFile String +hi link HogAttributeType Statement + +hi link HogInclude Statement +hi link HogIncludeFile String + +hi link HogDylib Statement +hi link HogDylibType Statement +hi link HogDylibFile String + +" Variables +" var +hi link HogVar Identifier +hi link HogVarType Keyword +hi link HogVarSet Identifier +hi link HogVarValue String +" ipvar +hi link HogIPVarType Keyword +hi link HogIPVarSet Identifier +" portvar +hi link HogPortVarType Keyword +hi link HogPortVarSet Identifier +hi link HogPort Constant + +hi link HogTodo Todo +hi link HogComment Comment +hi link HogString String +hi link HogHexEsc PreProc +hi link HogNumber Number +hi link HogSpecial Constant +hi link HogSpecialAny Constant +hi link HogIPAddr Constant +hi link HogIPCidr Constant +hi link HogOpNot Operator +hi link HogOpRange Operator + +hi link HogRuleAction Statement +hi link HogRuleProto Identifier +hi link HogRuleDir Operator +hi link HogRuleOption Keyword +hi link HogRuleChars String + +hi link HogFileType HogRuleAction +hi link HogFileTypeOpt HogRuleOption +hi link NotASemiColn HogRuleChars + +let b:current_syntax = "hog" diff --git a/syntax/hollywood.vim b/syntax/hollywood.vim new file mode 100644 index 000000000..fb5fd9560 --- /dev/null +++ b/syntax/hollywood.vim @@ -0,0 +1,184 @@ +if polyglot#init#is_disabled(expand(':p'), 'hollywood', 'syntax/hollywood.vim') + finish +endif + +" Vim syntax file +" Language: Hollywood 9.0 +" Maintainer: Tom Crecelius +" First Author: Tom Crecelius +" Last Change: 2021 April 13 +" Highlighting Issues: +" Depending on your colour schema, Strings or Comments might be highlighted in +" a way, you don't like. If so, try one of the following settings after +" opening a hollywood script: +" +" :hi link hwString MoreMsg +" :hi link hwString NonText +" :hi link hwString String +" +" and for comments: +" +" :hi link hwComment MoreMsg +" :hi link hwComment NonText +" :hi link hwComment Comment +" +" Remember the setting you like and change the corresponding definition at +" the bottom of this file. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +if !exists("hw_version") + let hw_version = 9 + let hw_subversion = 0 +elseif !exists("hw_subversion") + let hw_subversion = 0 +endif + +syn case match + +" syncing method +syn sync minlines=100 + +" catch errors caused by wrong parenthesis and wrong curly brackets or +" keywords placed outside their respective blocks +syn region hwParen transparent start='(' end=')' contains=ALLBUT,hwParenError,hwTodo,hwSpecial,hwIfEndIf,hwElseIf,hwElse,hwBlock,hwLoopBlock,hwIn,hwStatement,hwStep,hwFallThrough,hwLineStatement +syn region hwTableBlock transparent matchgroup=hwTable start="{" end="}" contains=ALLBUT,hwBraceError,hwTodo,hwSpecial,hwIfEndIf,hwElseIf,hwElse,hwBlock,hwLoopBlock,hwIn,hwStatement,hwStep,hwFallThrough,hwLineStatement + +syn match hwParenError ")" +syn match hwBraceError "}" +syn match hwError "\<\%(If\|End\|Else\|ElseIf\|Then\|Until\|In\|EndIf\|EndSwitch\|FallThrough\|Case\|Default\|Wend\|Until\|Forever\)\>" + +" Function ... End +syn region hwFunctionBlock transparent matchgroup=hwFunction start="\" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwStep,hwFallThrough,hwLineStatement + +" If .. Then +syn region hwIfThen transparent matchgroup=hwCond start="\" end="\\{-}"me=e-4 skipwhite skipempty +" Then ... Else +syn region hwThenElse transparent matchgroup=hwCond start="\" end="$" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwIn,hwStep,hwLineStatement,hwIfEndIf,hwElseEndif,hwIfThen,hwThenElse skipwhite skipempty + +" If .. EndIf +syn region hwIfEndIf transparent matchgroup=hwCond start="\\(\(.\{-}Then.\{-}\)\@!\)" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwIn,hwStep,hwLineStatement skipwhite skipempty +" Else ... EndIf +syn region hwElseEndIf contained transparent matchgroup=hwCond start="\" end="\"me=e-5 contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElseEndIf,hwIn,hwStep,hwFallThrough,hwLineStatement + +" Then +"syn keyword hwLineStatement Then contained +" Forever +syn keyword hwLineStatement Forever contained +" Do +syn keyword hwLineStatement Do contained +" ElseIf +syn keyword hwElseIf ElseIf contained + + +" Switch ... EndSwitch +syn region hwSwitchEnd transparent matchgroup=hwCond start="\" end="\" contains=hwCase,hwDefCase skipwhite skipempty + +" Case ... : +syn region hwCase transparent matchgroup=hwCond start="\" end="\"me=e-9 end="\:"me=e-8 end="\"me=e-4 contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElseEndIf,hwLineStatement,hwIn,hwStep skipwhite skipempty +" Default: +syn region hwDefCase transparent matchgroup=hwCond start="\" end="\"me=e-9 contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElseEndIf,hwIn,hwStep,hwCase,hwDefCase,hwFallThrough,hwLineStatement skipwhite skipempty + +syn keyword hwFallThrough contained FallThrough + +" Block ... EndBlock +syn region hwBlock transparent matchgroup=hwStatement start="\" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwStep,hwLineStatement + +" Repeat ... Until/Forever +syn region hwLoopBlock transparent matchgroup=hwRepeat start="\" end="\" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwStep,hwLineStatement + +" While ... Wend/Do +syn region hwLoopBlock transparent matchgroup=hwRepeat start="\" end="\" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwStep,hwLineStatement skipwhite skipempty + +" For .. To +syn region hwForTo transparent matchgroup=hwRepeat start="\" end="\"me=e-2 skipwhite skipempty nextgroup=hwToNext + +" To .. Next +syn region hwToNext transparent matchgroup=hwRepeat start="\" end="\" contains=ALLBUT,hwTodo,hwSpecial,hwElseIf,hwElse,hwIn,hwLineStatement skipwhite skipempty + +syn keyword hwStep contained Step +syn keyword hwIn contained In + +" other keywords +syn keyword hwStatement Return Break Continue +syn keyword hwStatement Goto Gosub Dim DimStr Const Local Global +syn match hwLabel "::\I\i*::" +syn match hwOperator "\%(&\|\*\|+\|-\|\.\||\|//\|/\|:\|<\|=\|>\|<>\|<=\|=>\|\^\|\~\|\\\|\\|\\|\\)" +syn keyword hwConstant Nil +syn keyword hwConstant True False +" predefined preprocessing commands +syn match hwPreProcessor "@\<\%(ANIM\|APPAUTHOR\|APPCOPYRIGHT\|APPDESCRIPTION\|APPICON\|APPIDENTIFIER\|APPTITLE\|APPVERSION\|BACKFILL\|BGPIC\|BRUSH\|CATALOG\|DIRECTORY\|DISPLAY\|ELSE\|ELSEIF\|ENDIF\|ERROR\|FILE\|FONT\|ICON\|IF\|INCLUDE\|LINKER\|MENU\|MUSIC\|OPTIONS\|PALETTE\|REQUIRE\|SAMPLE\|SCREEN\|SPRITE\|VERSION\|VIDEO\|WARNING\)\>"ms=s+1 +" predefined constants +syn match hwConstant "#\<\%(ACTIVEWINDOW\|ADF_ANIM\|ADF_FX\|ADF_MOVEOBJECT\|ALL\|ALPHABETICAL\|ALPHACHANNEL\|ALPHANUMERICAL\|AMIGAICON_DEVICE\|AMIGAICON_DISK\|AMIGAICON_DRAWER\|AMIGAICON_GARBAGE\|AMIGAICON_HIDE\|AMIGAICON_KICKSTART\|AMIGAICON_NONE\|AMIGAICON_PROJECT\|AMIGAICON_SETPOSITION\|AMIGAICON_SETTITLE\|AMIGAICON_SHOW\|AMIGAICON_TOOL\|ANIM\|ANIMSTREAM\|ANIMTYPE_RASTER\|ANIMTYPE_VECTOR\|ANMFMT_GIF\|ANMFMT_IFF\|ANMFMT_MJPEG\|ANTIALIAS\|AQUA\|ARC\|ASYNCDRAW\|ASYNCOBJ\|ATTRACTIVE\|ATTRADAPTER\|ATTRALPHAINTENSITY\|ATTRBGPIC\|ATTRBITRATE\|ATTRBORDERBOTTOM\|ATTRBORDERLEFT\|ATTRBORDERLESS\|ATTRBORDERPEN\|ATTRBORDERRIGHT\|ATTRBORDERTOP\|ATTRBULLETPEN\|ATTRCANSEEK\|ATTRCLIPREGION\|ATTRCOUNT\|ATTRCURFRAME\|ATTRCURSORX\|ATTRCURSORY\|ATTRCURSUBSONG\|ATTRCYCLE\|ATTRDENSITY\|ATTRDEPTH\|ATTRDISPLAY\|ATTRDITHERMODE\|ATTRDOUBLEBUFFER\|ATTRDRIVER\|ATTRDURATION\|ATTRELAPSE\|ATTRENCODING\|ATTRFIXED\|ATTRFONTAA\|ATTRFONTASCENDER\|ATTRFONTCHARMAP\|ATTRFONTDEPTH\|ATTRFONTDESCENDER\|ATTRFONTENGINE\|ATTRFONTNAME\|ATTRFONTPALETTE\|ATTRFONTSCALABLE\|ATTRFONTSIZE\|ATTRFONTTRANSPARENTPEN\|ATTRFONTTYPE\|ATTRFORMAT\|ATTRFRAMEDELAY\|ATTRFUNCTION\|ATTRGROUP\|ATTRHARDWARE\|ATTRHASALPHA\|ATTRHASMASK\|ATTRHEIGHT\|ATTRHOSTDEPTH\|ATTRHOSTHEIGHT\|ATTRHOSTMONITORS\|ATTRHOSTSCALE\|ATTRHOSTSCALEX\|ATTRHOSTSCALEY\|ATTRHOSTTASKBAR\|ATTRHOSTTITLEBARHEIGHT\|ATTRHOSTWIDTH\|ATTRID\|ATTRIMMERSIVEMODE\|ATTRINTERPOLATE\|ATTRKEYBOARD\|ATTRLAYERID\|ATTRLAYERS\|ATTRLAYERSON\|ATTRLOADER\|ATTRMARGINLEFT\|ATTRMARGINRIGHT\|ATTRMASKMODE\|ATTRMAXHEIGHT\|ATTRMAXIMIZED\|ATTRMAXWIDTH\|ATTRMENU\|ATTRMODE\|ATTRMONITOR\|ATTRNOCLOSE\|ATTRNOHIDE\|ATTRNOMODESWITCH\|ATTRNUMENTRIES\|ATTRNUMFRAMES\|ATTRNUMSUBSONGS\|ATTRONSCREEN\|ATTRORIENTATION\|ATTROUTPUTDEVICE\|ATTRPALETTE\|ATTRPALETTEMODE\|ATTRPAUSED\|ATTRPEN\|ATTRPITCH\|ATTRPLAYING\|ATTRPOINTER\|ATTRPOSITION\|ATTRPUBSCREEN\|ATTRRAWHEIGHT\|ATTRRAWWIDTH\|ATTRRAWXPOS\|ATTRRAWYPOS\|ATTRSCALEHEIGHT\|ATTRSCALEMODE\|ATTRSCALESWITCH\|ATTRSCALEWIDTH\|ATTRSHADOWPEN\|ATTRSIZE\|ATTRSIZEABLE\|ATTRSPRITES\|ATTRSTANDARD\|ATTRSTATE\|ATTRSYSTEMBARS\|ATTRTEXT\|ATTRTITLE\|ATTRTRANSPARENTCOLOR\|ATTRTRANSPARENTPEN\|ATTRTYPE\|ATTRUSERDATA\|ATTRVISIBLE\|ATTRWIDTH\|ATTRXDPI\|ATTRXPOS\|ATTRXSERVER\|ATTRYDPI\|ATTRYPOS\|ATTRZPOS\|BARS\|BAUD_115200\|BAUD_1200\|BAUD_19200\|BAUD_2400\|BAUD_300\|BAUD_38400\|BAUD_460800\|BAUD_4800\|BAUD_57600\|BAUD_600\|BAUD_9600\|BEEPERROR\|BEEPINFORMATION\|BEEPQUESTION\|BEEPSYSTEM\|BEEPWARNING\|BGPIC\|BGPICPART\|BIGENDIAN\|BIGSINE\|BITMAP_DEFAULT\|BLACK\|BLEND\|BLUE\|BOLD\|BOOLEAN\|BORDER\|BOTTOM\|BOTTOMOUT\|BOUNCE\|BOX\|BRUSH\|BRUSH_VS_BOX\|BRUSHPART\|BULLET_ARROW\|BULLET_BOX\|BULLET_CHECKMARK\|BULLET_CIRCLE\|BULLET_CROSS\|BULLET_DASH\|BULLET_DIAMOND\|BULLET_LALPHA\|BULLET_LALPHADOUBLE\|BULLET_LALPHASINGLE\|BULLET_LROMAN\|BULLET_LROMANDOUBLE\|BULLET_LROMANSINGLE\|BULLET_NONE\|BULLET_NUMERIC\|BULLET_NUMERICDOUBLE\|BULLET_NUMERICSINGLE\|BULLET_UALPHA\|BULLET_UALPHADOUBLE\|BULLET_UALPHASINGLE\|BULLET_UROMAN\|BULLET_UROMANDOUBLE\|BULLET_UROMANSINGLE\|BYTE\|CAPBUTT\|CAPROUND\|CAPSQUARE\|CARDBOTTOM\|CARDTOP\|CENTER\|CHARMAP_ADOBECUSTOM\|CHARMAP_ADOBEEXPERT\|CHARMAP_ADOBELATIN1\|CHARMAP_ADOBESTANDARD\|CHARMAP_APPLEROMAN\|CHARMAP_BIG5\|CHARMAP_DEFAULT\|CHARMAP_JOHAB\|CHARMAP_MSSYMBOL\|CHARMAP_OLDLATIN2\|CHARMAP_SJIS\|CHARMAP_UNICODE\|CHARMAP_WANSUNG\|CHIPMEMORY\|CIRCLE\|CLIENT\|CLIPBOARD_EMPTY\|CLIPBOARD_IMAGE\|CLIPBOARD_SOUND\|CLIPBOARD_TEXT\|CLIPBOARD_UNKNOWN\|CLIPREGION\|CLOCKWIPE\|CLOSEWINDOW\|CONICAL\|COPYFILE_FAILED\|COPYFILE_OVERWRITE\|COPYFILE_STATUS\|COPYFILE_UNPROTECT\|COUNTBOTH\|COUNTDIRECTORIES\|COUNTFILES\|COUNTRY_AFGHANISTAN\|COUNTRY_ALANDISLANDS\|COUNTRY_ALBANIA\|COUNTRY_ALGERIA\|COUNTRY_AMERICANSAMOA\|COUNTRY_ANDORRA\|COUNTRY_ANGOLA\|COUNTRY_ANGUILLA\|COUNTRY_ANTARCTICA\|COUNTRY_ANTIGUAANDBARBUDA\|COUNTRY_ARGENTINA\|COUNTRY_ARMENIA\|COUNTRY_ARUBA\|COUNTRY_AUSTRALIA\|COUNTRY_AUSTRIA\|COUNTRY_AZERBAIJAN\|COUNTRY_BAHAMAS\|COUNTRY_BAHRAIN\|COUNTRY_BANGLADESH\|COUNTRY_BARBADOS\|COUNTRY_BELARUS\|COUNTRY_BELGIUM\|COUNTRY_BELIZE\|COUNTRY_BENIN\|COUNTRY_BERMUDA\|COUNTRY_BESISLANDS\|COUNTRY_BHUTAN\|COUNTRY_BOLIVIA\|COUNTRY_BOSNIAANDHERZEGOVINA\|COUNTRY_BOTSWANA\|COUNTRY_BOUVETISLAND\|COUNTRY_BRAZIL\|COUNTRY_BRUNEI\|COUNTRY_BULGARIA\|COUNTRY_BURKINAFASO\|COUNTRY_BURUNDI\|COUNTRY_CAMBODIA\|COUNTRY_CAMEROON\|COUNTRY_CANADA\|COUNTRY_CAPEVERDE\|COUNTRY_CAYMANISLANDS\|COUNTRY_CENTRALAFRICANREPUBLIC\|COUNTRY_CHAD\|COUNTRY_CHILE\|COUNTRY_CHINA\|COUNTRY_CHRISTMASISLAND\|COUNTRY_COCOSISLANDS\|COUNTRY_COLOMBIA\|COUNTRY_COMOROS\|COUNTRY_CONGO\|COUNTRY_COOKISLANDS\|COUNTRY_COSTARICA\|COUNTRY_CROATIA\|COUNTRY_CUBA\|COUNTRY_CURACAO\|COUNTRY_CYPRUS\|COUNTRY_CZECHREPUBLIC\|COUNTRY_DENMARK\|COUNTRY_DJIBOUTI\|COUNTRY_DOMINICA\|COUNTRY_DOMINICANREPUBLIC\|COUNTRY_DRCONGO\|COUNTRY_ECUADOR\|COUNTRY_EGYPT\|COUNTRY_ELSALVADOR\|COUNTRY_EQUATORIALGUINEA\|COUNTRY_ERITREA\|COUNTRY_ESTONIA\|COUNTRY_ETHIOPIA\|COUNTRY_FALKLANDISLANDS\|COUNTRY_FAROEISLANDS\|COUNTRY_FIJI\|COUNTRY_FINLAND\|COUNTRY_FRANCE\|COUNTRY_FRENCHGUIANA\|COUNTRY_FRENCHPOLYNESIA\|COUNTRY_GABON\|COUNTRY_GAMBIA\|COUNTRY_GEORGIA\|COUNTRY_GERMANY\|COUNTRY_GHANA\|COUNTRY_GIBRALTAR\|COUNTRY_GREECE\|COUNTRY_GREENLAND\|COUNTRY_GRENADA\|COUNTRY_GUADELOUPE\|COUNTRY_GUAM\|COUNTRY_GUATEMALA\|COUNTRY_GUERNSEY\|COUNTRY_GUINEA\|COUNTRY_GUINEABISSAU\|COUNTRY_GUYANA\|COUNTRY_HAITI\|COUNTRY_HOLYSEE\|COUNTRY_HONDURAS\|COUNTRY_HONGKONG\|COUNTRY_HUNGARY\|COUNTRY_ICELAND\|COUNTRY_INDIA\|COUNTRY_INDONESIA\|COUNTRY_IRAN\|COUNTRY_IRAQ\|COUNTRY_IRELAND\|COUNTRY_ISLEOFMAN\|COUNTRY_ISRAEL\|COUNTRY_ITALY\|COUNTRY_IVORYCOAST\|COUNTRY_JAMAICA\|COUNTRY_JAPAN\|COUNTRY_JERSEY\|COUNTRY_JORDAN\|COUNTRY_KAZAKHSTAN\|COUNTRY_KENYA\|COUNTRY_KIRIBATI\|COUNTRY_KUWAIT\|COUNTRY_KYRGYZSTAN\|COUNTRY_LAOS\|COUNTRY_LATVIA\|COUNTRY_LEBANON\|COUNTRY_LESOTHO\|COUNTRY_LIBERIA\|COUNTRY_LIBYA\|COUNTRY_LIECHTENSTEIN\|COUNTRY_LITHUANIA\|COUNTRY_LUXEMBOURG\|COUNTRY_MACAO\|COUNTRY_MACEDONIA\|COUNTRY_MADAGASCAR\|COUNTRY_MALAWI\|COUNTRY_MALAYSIA\|COUNTRY_MALDIVES\|COUNTRY_MALI\|COUNTRY_MALTA\|COUNTRY_MARSHALLISLANDS\|COUNTRY_MARTINIQUE\|COUNTRY_MAURITANIA\|COUNTRY_MAURITIUS\|COUNTRY_MAYOTTE\|COUNTRY_MEXICO\|COUNTRY_MICRONESIA\|COUNTRY_MOLDOVA\|COUNTRY_MONACO\|COUNTRY_MONGOLIA\|COUNTRY_MONTENEGRO\|COUNTRY_MONTSERRAT\|COUNTRY_MOROCCO\|COUNTRY_MOZAMBIQUE\|COUNTRY_MYANMAR\|COUNTRY_NAMIBIA\|COUNTRY_NAURU\|COUNTRY_NEPAL\|COUNTRY_NETHERLANDS\|COUNTRY_NEWCALEDONIA\|COUNTRY_NEWZEALAND\|COUNTRY_NICARAGUA\|COUNTRY_NIGER\|COUNTRY_NIGERIA\|COUNTRY_NIUE\|COUNTRY_NORFOLKISLAND\|COUNTRY_NORTHKOREA\|COUNTRY_NORWAY\|COUNTRY_OMAN\|COUNTRY_PAKISTAN\|COUNTRY_PALAU\|COUNTRY_PALESTINE\|COUNTRY_PANAMA\|COUNTRY_PAPUANEWGUINEA\|COUNTRY_PARAGUAY\|COUNTRY_PERU\|COUNTRY_PHILIPPINES\|COUNTRY_PITCAIRN\|COUNTRY_POLAND\|COUNTRY_PORTUGAL\|COUNTRY_PUERTORICO\|COUNTRY_QATAR\|COUNTRY_REUNION\|COUNTRY_ROMANIA\|COUNTRY_RUSSIA\|COUNTRY_RWANDA\|COUNTRY_SAINTBARTHELEMY\|COUNTRY_SAINTHELENA\|COUNTRY_SAINTKITTSANDNEVIS\|COUNTRY_SAINTLUCIA\|COUNTRY_SAINTVINCENT\|COUNTRY_SAMOA\|COUNTRY_SANMARINO\|COUNTRY_SAOTOMEANDPRINCIPE\|COUNTRY_SAUDIARABIA\|COUNTRY_SENEGAL\|COUNTRY_SERBIA\|COUNTRY_SEYCHELLES\|COUNTRY_SIERRALEONE\|COUNTRY_SINGAPORE\|COUNTRY_SLOVAKIA\|COUNTRY_SLOVENIA\|COUNTRY_SOLOMONISLANDS\|COUNTRY_SOMALIA\|COUNTRY_SOUTHAFRICA\|COUNTRY_SOUTHKOREA\|COUNTRY_SOUTHSUDAN\|COUNTRY_SPAIN\|COUNTRY_SRILANKA\|COUNTRY_SUDAN\|COUNTRY_SURINAME\|COUNTRY_SWAZILAND\|COUNTRY_SWEDEN\|COUNTRY_SWITZERLAND\|COUNTRY_SYRIA\|COUNTRY_TAIWAN\|COUNTRY_TAJIKISTAN\|COUNTRY_TANZANIA\|COUNTRY_THAILAND\|COUNTRY_TIMOR\|COUNTRY_TOGO\|COUNTRY_TONGA\|COUNTRY_TRINIDADANDTOBAGO\|COUNTRY_TUNISIA\|COUNTRY_TURKEY\|COUNTRY_TURKMENISTAN\|COUNTRY_TUVALU\|COUNTRY_UAE\|COUNTRY_UGANDA\|COUNTRY_UK\|COUNTRY_UKRAINE\|COUNTRY_UNKNOWN\|COUNTRY_URUGUAY\|COUNTRY_USA\|COUNTRY_UZBEKISTAN\|COUNTRY_VANUATU\|COUNTRY_VENEZUELA\|COUNTRY_VIETNAM\|COUNTRY_YEMEN\|COUNTRY_ZAMBIA\|COUNTSEPARATE\|CR_DEAD\|CR_RUNNING\|CR_SUSPENDED\|CROSSFADE\|CRUSHBOTTOM\|CRUSHLEFT\|CRUSHRIGHT\|CRUSHTOP\|DAMPED\|DATA_5\|DATA_6\|DATA_7\|DATA_8\|DATEDAY\|DATELOCAL\|DATELOCALNATIVE\|DATEMONTH\|DATETIME\|DATEUTC\|DATEYEAR\|DEFAULTICON\|DEFAULTSPEED\|DEINTERLACE_DEFAULT\|DEINTERLACE_DOUBLE\|DELETEFILE_FAILED\|DELETEFILE_STATUS\|DELETEFILE_UNPROTECT\|DENSITY_HIGH\|DENSITY_LOW\|DENSITY_MEDIUM\|DENSITY_NONE\|DIAGONAL\|DIRECTORY\|DIRMONITOR_ADD\|DIRMONITOR_CHANGE\|DIRMONITOR_REMOVE\|DISPLAY\|DISPMODE_ASK\|DISPMODE_FAKEFULLSCREEN\|DISPMODE_FULLSCREEN\|DISPMODE_FULLSCREENSCALE\|DISPMODE_MODEREQUESTER\|DISPMODE_MODESWITCH\|DISPMODE_SYSTEMSCALE\|DISPMODE_WINDOWED\|DISPSTATE_CLOSED\|DISPSTATE_MINIMIZED\|DISPSTATE_OPEN\|DISSOLVE\|DITHERMODE_FLOYDSTEINBERG\|DITHERMODE_NONE\|DOSTYPE_DIRECTORY\|DOSTYPE_FILE\|DOUBLE\|DOUBLEBUFFER\|DOWNLOADFILE_STATUS\|DTR_OFF\|DTR_ON\|DURATION_LONG\|DURATION_SHORT\|EDGE\|ELLIPSE\|ENCODING_AMIGA\|ENCODING_ISO8859_1\|ENCODING_RAW\|ENCODING_UTF8\|EOF\|ERR_8OR16BITONLY\|ERR_ACCELERATOR\|ERR_ADDAPPICON\|ERR_ADDAPPWIN\|ERR_ADDSYSEVENT\|ERR_ADDTASK\|ERR_ADFFREEDISP\|ERR_ADFWRONGDISP\|ERR_AFILEPROP\|ERR_AHI\|ERR_ALLOCALPHA\|ERR_ALLOCCHANNEL\|ERR_ALLOCCHUNKY\|ERR_ALLOCMASK\|ERR_ALRDYDECLRD\|ERR_ALREADYASYNC\|ERR_ALSAPCM\|ERR_AMIGAGUIDE\|ERR_ANIMDISK\|ERR_ANIMFRAME\|ERR_ANTIALIAS\|ERR_APPLET\|ERR_APPLETVERSION\|ERR_APPLICATION\|ERR_ARGS\|ERR_ARRAYDECLA\|ERR_ASSERTFAILED\|ERR_ATSUI\|ERR_AUDIOCONVERTER\|ERR_BACKFILL\|ERR_BAD8SVX\|ERR_BADBASE64\|ERR_BADBYTECODE\|ERR_BADCALLBACKRET\|ERR_BADCONSTANT\|ERR_BADDIMENSIONS\|ERR_BADENCODING\|ERR_BADINTEGER\|ERR_BADIP\|ERR_BADLAYERTYPE\|ERR_BADPLATFORM\|ERR_BADSIGNATURE\|ERR_BADUPVALUES\|ERR_BADURL\|ERR_BADWAVE\|ERR_BADYIELD\|ERR_BEGINREFRESH\|ERR_BGPICBUTTON\|ERR_BGPICPALETTE\|ERR_BGPICTYPE\|ERR_BITMAP\|ERR_BLKWOENDBLK\|ERR_BRACECLOSE\|ERR_BRACEOPEN\|ERR_BRACKETCLOSE\|ERR_BRACKETOPEN\|ERR_BRUSHLINK\|ERR_BRUSHSIZE\|ERR_BRUSHTYPE\|ERR_CACHEERROR\|ERR_CASECST\|ERR_CHANGEDIR\|ERR_CHANNELRANGE\|ERR_CHRCSTEMPTY\|ERR_CHRCSTLEN\|ERR_CLIPFORMAT\|ERR_CLIPOPEN\|ERR_CLIPREAD\|ERR_CLIPWRITE\|ERR_CLOSEDDISPLAY\|ERR_CLOSEFILE\|ERR_CMDASVAR\|ERR_CMPUNSUPPORTED\|ERR_COLORSPACE\|ERR_COMMENTSTRUCT\|ERR_COMMODITY\|ERR_COMPLEXEXPR\|ERR_COMPLEXPATTERN\|ERR_COMPLEXWHILE\|ERR_CONCAT\|ERR_CONFIG\|ERR_CONFIG2\|ERR_CONITEMS\|ERR_CONSOLEARG\|ERR_CONTEXTMENU\|ERR_COORDSRANGE\|ERR_COREFOUNDATION\|ERR_CORETEXT\|ERR_CREATEDIR\|ERR_CREATEDOCKY\|ERR_CREATEEVENT\|ERR_CREATEGC\|ERR_CREATEICON\|ERR_CREATEMENU\|ERR_CREATEPORT\|ERR_CREATESHORTCUT\|ERR_CSTDOUBLEDEF\|ERR_CTRLSTRUCT\|ERR_CYIELD\|ERR_DATATYPEALPHA\|ERR_DATATYPESAVE\|ERR_DATATYPESAVE2\|ERR_DBLENCODING\|ERR_DBPALETTE\|ERR_DBTRANSWIN\|ERR_DBVIDEOLAYER\|ERR_DDAUTOSCALE\|ERR_DDMOBILE\|ERR_DDRECVIDEO\|ERR_DEADRESUME\|ERR_DEFFONT\|ERR_DELETEFILE\|ERR_DEMO\|ERR_DEMO2\|ERR_DEMO3\|ERR_DEPTHMISMATCH\|ERR_DEPTHRANGE\|ERR_DESERIALIZE\|ERR_DIFFDEPTH\|ERR_DIFFENCODING\|ERR_DINPUT\|ERR_DIRECTSHOW\|ERR_DIRLOCK\|ERR_DISPLAYADAPTERSUPPORT\|ERR_DISPLAYDESKTOP\|ERR_DISPLAYDESKTOPPAL\|ERR_DISPLAYSIZE\|ERR_DISPMINIMIZED\|ERR_DLOPEN\|ERR_DOUBLEDECLA\|ERR_DOUBLEMENU\|ERR_DRAWPATH\|ERR_DSOUNDNOTIFY\|ERR_DSOUNDNOTIPOS\|ERR_DSOUNDPLAY\|ERR_ELSEIFAFTERELSE\|ERR_ELSETWICE\|ERR_ELSEWOIF\|ERR_EMPTYMENUTREE\|ERR_EMPTYOBJ\|ERR_EMPTYPATH\|ERR_EMPTYSCRIPT\|ERR_EMPTYTABLE\|ERR_ENDBLKWOBLK\|ERR_ENDDOUBLEBUFFER\|ERR_ENDFUNCWOFUNC\|ERR_ENDIFWOIF\|ERR_ENDSWCHWOSWCH\|ERR_ENDWITHWOWITH\|ERR_EQUALEXPECTED\|ERR_ERRORCALLED\|ERR_ESCREPLACE\|ERR_EVNTEXPCTED\|ERR_EXAMINE\|ERR_EXECUTE\|ERR_EXETYPE\|ERR_FGRABVIDSTATE\|ERR_FIELDINIT\|ERR_FILEEXIST\|ERR_FILEFORMAT\|ERR_FILENOTFOUND\|ERR_FILESIZE\|ERR_FINDACTIVITY\|ERR_FINDANIM\|ERR_FINDANIMSTREAM\|ERR_FINDAPPLICATION\|ERR_FINDARRAY\|ERR_FINDASYNCDRAW\|ERR_FINDASYNCOBJ\|ERR_FINDBGPIC\|ERR_FINDBRUSH\|ERR_FINDBUTTON\|ERR_FINDCLIENT\|ERR_FINDCLIPREGION\|ERR_FINDCST\|ERR_FINDDIR\|ERR_FINDDISPLAY\|ERR_FINDFILE\|ERR_FINDFONT\|ERR_FINDFONT2\|ERR_FINDICON\|ERR_FINDINTERVAL\|ERR_FINDLAYER\|ERR_FINDLAYERDATA\|ERR_FINDMEMBLK\|ERR_FINDMENU\|ERR_FINDMENUITEM\|ERR_FINDMONITOR\|ERR_FINDMOVE\|ERR_FINDMUSIC\|ERR_FINDOBJECTDATA\|ERR_FINDPALETTE\|ERR_FINDPATH\|ERR_FINDPLUGIN\|ERR_FINDPOINTER\|ERR_FINDPORT\|ERR_FINDSAMPLE\|ERR_FINDSELECTOR\|ERR_FINDSERIAL\|ERR_FINDSERVER\|ERR_FINDSPRITE\|ERR_FINDTEXTOBJECT\|ERR_FINDTIMEOUT\|ERR_FINDTIMER\|ERR_FINDUDPOBJECT\|ERR_FINDVIDEO\|ERR_FIRSTPREPROC\|ERR_FONTFORMAT\|ERR_FONTPATH\|ERR_FONTPATH2\|ERR_FORBIDMODAL\|ERR_FOREVERWOREPEAT\|ERR_FORWONEXT\|ERR_FRAMEGRABBER\|ERR_FREEABGPIC\|ERR_FREEADISPLAY\|ERR_FREECURPOINTER\|ERR_FT2\|ERR_FTPAUTH\|ERR_FTPERROR\|ERR_FULLSCREEN\|ERR_FUNCARGS\|ERR_FUNCDECLA\|ERR_FUNCEXPECTED\|ERR_FUNCJMP\|ERR_FUNCREMOVED\|ERR_FUNCTABLEARG\|ERR_FUNCWOENDFUNC\|ERR_GETDISKOBJ\|ERR_GETIFADDRS\|ERR_GETMONITORINFO\|ERR_GETSHORTCUT\|ERR_GRABSCREEN\|ERR_GROUPNAMEUSED\|ERR_GTK\|ERR_GUIGFX\|ERR_HEXPOINT\|ERR_HOSTNAME\|ERR_HTTPERROR\|ERR_HTTPTE\|ERR_HWBMCLOSEDISP\|ERR_HWBRUSH\|ERR_HWBRUSHFUNC\|ERR_HWDBFREEDISP\|ERR_ICONDIMS\|ERR_ICONENTRY\|ERR_ICONPARMS\|ERR_ICONSIZE\|ERR_ICONSTANDARD\|ERR_ICONVECTOR\|ERR_IFWOENDIF\|ERR_IMAGEERROR\|ERR_INCOMPATBRUSH\|ERR_INISYNTAX\|ERR_INITSERIAL\|ERR_INTERNAL\|ERR_INTERNAL1\|ERR_INTEXPECTED\|ERR_INVALIDDATE\|ERR_INVALIDUTF8\|ERR_INVALIDUTF8ARG\|ERR_INVCAPIDX\|ERR_INVINSERT\|ERR_INVNEXTKEY\|ERR_INVPATCAP\|ERR_INVREPLACE\|ERR_JAVA\|ERR_JAVAMETHOD\|ERR_JOYSTICK\|ERR_KEYFILE\|ERR_KEYNOTFOUND\|ERR_KEYWORD\|ERR_KICKSTART\|ERR_LABELDECLA\|ERR_LABELDOUBLE\|ERR_LABINFOR\|ERR_LABINFUNC\|ERR_LABINIF\|ERR_LABINWHILE\|ERR_LABMAINBLK\|ERR_LAYERRANGE\|ERR_LAYERSOFF\|ERR_LAYERSON\|ERR_LAYERSUPPORT\|ERR_LAYERSUPPORT2\|ERR_LAYERSWITCH\|ERR_LEGACYPTMOD\|ERR_LFSYNTAX\|ERR_LINKFONT\|ERR_LINKPLUGIN\|ERR_LOADFRAME\|ERR_LOADICON\|ERR_LOADPICTURE\|ERR_LOADPICTURE2\|ERR_LOADPLUGIN\|ERR_LOADSOUND\|ERR_LOADVIDEO\|ERR_LOCK\|ERR_LOCK2\|ERR_LOCKBMAP\|ERR_LOCKEDOBJ\|ERR_LOOPRANGE\|ERR_LOWFREQ\|ERR_MAGICKEY\|ERR_MALFORMPAT1\|ERR_MALFORMPAT2\|ERR_MASKNALPHA\|ERR_MAXLINES\|ERR_MAXLOCALS\|ERR_MAXPARAMS\|ERR_MAXUPVALS\|ERR_MEDIAFOUNDATION\|ERR_MEM\|ERR_MEMCODE\|ERR_MEMCST\|ERR_MEMRANGE\|ERR_MENUATTACHED\|ERR_MENUCOMPLEXITY\|ERR_MISSINGBRACKET\|ERR_MISSINGFIELD\|ERR_MISSINGOPBRACK\|ERR_MISSINGPARAMTR\|ERR_MISSINGSEPARTR\|ERR_MIXMUSMOD\|ERR_MOBILE\|ERR_MODIFYAANIM\|ERR_MODIFYABG\|ERR_MODIFYABGPIC\|ERR_MODIFYABR\|ERR_MODIFYPSMP\|ERR_MODIFYSPRITE\|ERR_MODIFYSPRITE2\|ERR_MONITORDIR\|ERR_MONITORFULLSCREEN\|ERR_MONITORRANGE\|ERR_MOVEFILE\|ERR_MSGPORT\|ERR_MULDISMOBILE\|ERR_MULTIBGPIC\|ERR_MULTIDISPLAYS\|ERR_MUSFMTSUPPORT\|ERR_MUSNOTPAUSED\|ERR_MUSNOTPLYNG\|ERR_MUSNOTPLYNG2\|ERR_MUSPAUSED\|ERR_MUSPLAYING\|ERR_NAMETOOLONG\|ERR_NAMEUSED\|ERR_NEEDAPPLICATION\|ERR_NEEDCOMPOSITE\|ERR_NEEDMORPHOS2\|ERR_NEEDOS41\|ERR_NEEDPALETTEIMAGE\|ERR_NEGCOORDS\|ERR_NEWHWPLUGIN\|ERR_NEXTWOFOR\|ERR_NOABSPATH\|ERR_NOACCESS\|ERR_NOALPHA\|ERR_NOANMLAYER\|ERR_NOAPPLET\|ERR_NOARGBVISUAL\|ERR_NOBLOCKBREAK\|ERR_NOCALLBACK\|ERR_NOCHANNEL\|ERR_NOCHAR\|ERR_NOCLIPREG\|ERR_NOCOLON\|ERR_NOCOMMA\|ERR_NOCOMPRESS\|ERR_NOCONSTANTS\|ERR_NOCONTEXTMENU\|ERR_NOCOORDCST\|ERR_NODIRPATTERN\|ERR_NODISLAYERS\|ERR_NODISPMODES\|ERR_NODOUBLEBUFFER\|ERR_NOFALLTHROUGH\|ERR_NOFILTERNAME\|ERR_NOFMBHANDLER\|ERR_NOFUNCTION\|ERR_NOHWFUNC\|ERR_NOJOYATPORT\|ERR_NOKEYWORDS\|ERR_NOLAYERS\|ERR_NOLOOP\|ERR_NOLOOPCONT\|ERR_NOMASKBRUSH\|ERR_NOMENU\|ERR_NOMIMEVIEWER\|ERR_NOMUSICCB\|ERR_NONE\|ERR_NONSUSPENDEDRESUME\|ERR_NOPALETTE\|ERR_NOPALETTEIMAGE\|ERR_NOPALETTEMODE\|ERR_NORETVAL\|ERR_NOREXX\|ERR_NOSPRITES\|ERR_NOTADIR\|ERR_NOTENOUGHPIXELS\|ERR_NOTIGER\|ERR_NOTPROTRACKER\|ERR_NOTRANSPARENCY\|ERR_NOTXTLAYER\|ERR_NUMBEREXPECTED\|ERR_NUMCALLBACK\|ERR_NUMCONCAT\|ERR_NUMEXPECTED\|ERR_NUMSTRCMP\|ERR_NUMTABLEARG\|ERR_OLDAPPLET\|ERR_OPENANIM\|ERR_OPENANIM2\|ERR_OPENAUDIO\|ERR_OPENFONT\|ERR_OPENLIB\|ERR_OPENSERIAL\|ERR_OPENSOCKET\|ERR_OPENSOUND\|ERR_OPENSOUND2\|ERR_OUTOFRANGE\|ERR_PAKFORMAT\|ERR_PALETTEFILL\|ERR_PALETTEMODE\|ERR_PALSCREEN\|ERR_PEERNAME\|ERR_PENRANGE\|ERR_PERCENTFORMAT\|ERR_PERCENTFORMATSTR\|ERR_PIPE\|ERR_PIXELFORMAT\|ERR_PIXELRANGE\|ERR_PLAYERCOMP\|ERR_PLAYVIDEO\|ERR_PLUGINARCH\|ERR_PLUGINDOUBLET\|ERR_PLUGINSUPPORT\|ERR_PLUGINSYMBOL\|ERR_PLUGINTYPE\|ERR_PLUGINVER\|ERR_POINTERFORMAT\|ERR_POINTERIMG\|ERR_PORTNOTAVAIL\|ERR_PREPROCSYM\|ERR_PROTMETATABLE\|ERR_PUBSCREEN\|ERR_QUICKTIME\|ERR_RADIOTOGGLEMENU\|ERR_RANDOMIZE\|ERR_READ\|ERR_READFILE\|ERR_READFUNC\|ERR_READONLY\|ERR_READRANGE\|ERR_READTABLE\|ERR_READVIDEOPIXELS\|ERR_RECVCLOSED\|ERR_RECVTIMEOUT\|ERR_RECVUNKNOWN\|ERR_REGCLASS\|ERR_REGISTRYREAD\|ERR_REGISTRYWRITE\|ERR_REMADLAYER\|ERR_RENAME\|ERR_RENDER\|ERR_RENDERADLAYER\|ERR_RENDERCALLBACK\|ERR_RENDERER\|ERR_REPEATWOUNTIL\|ERR_REQAUTH\|ERR_REQUIREFIELD\|ERR_REQUIREPLUGIN\|ERR_REQUIRETAGFMT\|ERR_RETWOGOSUB\|ERR_REVDWORD\|ERR_REWINDDIR\|ERR_REXXERR\|ERR_SATELLITE\|ERR_SATFREEDISP\|ERR_SAVEANIM\|ERR_SAVEICON\|ERR_SAVEIMAGE\|ERR_SAVEPNG\|ERR_SAVERALPHA\|ERR_SAVESAMPLE\|ERR_SCALEBGPIC\|ERR_SCREEN\|ERR_SCREENMODE\|ERR_SCREENSIZE\|ERR_SCRPIXFMT\|ERR_SEEK\|ERR_SEEKFILE\|ERR_SEEKFORMAT\|ERR_SEEKRANGE\|ERR_SELECTALPHACHANNEL\|ERR_SELECTANIM\|ERR_SELECTBG\|ERR_SELECTBGPIC\|ERR_SELECTBGPIC2\|ERR_SELECTBRUSH\|ERR_SELECTMASK\|ERR_SEMAPHORE\|ERR_SENDDATA\|ERR_SENDMESSAGE\|ERR_SENDTIMEOUT\|ERR_SENDUNKNOWN\|ERR_SERIALIO\|ERR_SERIALIZE\|ERR_SERIALIZETYPE\|ERR_SETADAPTER\|ERR_SETENV\|ERR_SETFILEATTR\|ERR_SETFILECOMMENT\|ERR_SETFILEDATE\|ERR_SETMENU\|ERR_SHORTIF\|ERR_SIGNAL\|ERR_SMODEALPHA\|ERR_SMPRANGE\|ERR_SOCKET\|ERR_SOCKNAME\|ERR_SOCKOPT\|ERR_SORTFUNC\|ERR_SPRITELINK\|ERR_SPRITEONSCREEN\|ERR_SPRITEONSCREEN2\|ERR_SQBRACKETCLOSE\|ERR_SQBRACKETOPEN\|ERR_STACK\|ERR_STAT\|ERR_STRCALLBACK\|ERR_STREAMASSAMPLE\|ERR_STREXPECTED\|ERR_STRINGCST\|ERR_STRINGEXPECTED\|ERR_STRORNUM\|ERR_STRTABLEARG\|ERR_STRTOOSHORT\|ERR_SURFACE\|ERR_SWCHWOENDSWCH\|ERR_SYNTAXERROR\|ERR_SYNTAXLEVELS\|ERR_SYSBUTTON\|ERR_SYSIMAGE\|ERR_SYSTOOOLD\|ERR_TABCALLBACK\|ERR_TABEXPECTED\|ERR_TABEXPECTED2\|ERR_TABEXPECTED3\|ERR_TABLEDECLA\|ERR_TABLEINDEX\|ERR_TABLEORNIL\|ERR_TABLEOVERFLOW\|ERR_TAGEXPECTED\|ERR_TASKSETUP\|ERR_TEXTARG\|ERR_TEXTCONVERT\|ERR_TEXTCONVERT2\|ERR_TEXTSYNTAX\|ERR_TEXTURE\|ERR_TFIMAGE\|ERR_TFVANIM\|ERR_TFVBGPICBRUSH\|ERR_TFVBRUSH\|ERR_TFVBRUSHBGPIC\|ERR_THREAD\|ERR_THREADEXPECTED\|ERR_TIMER\|ERR_TOKENEXPECTED\|ERR_TOOMANYARGS\|ERR_TOOMANYCAPTURES\|ERR_TOOSMALL2\|ERR_TRANSBGMOBILE\|ERR_TRANSBRUSH\|ERR_TRAYICON\|ERR_TRIALCOMPILE\|ERR_TRIALINCLUDE\|ERR_TRIALLIMIT\|ERR_TRIALSAVEVID\|ERR_UDEXPECTED\|ERR_UNBALANCEDPAT\|ERR_UNEXPECTEDEOF\|ERR_UNEXPECTEDSYM\|ERR_UNFINISHEDCAPTURE\|ERR_UNIMPLCMD\|ERR_UNKNOWN\|ERR_UNKNOWNANMOUT\|ERR_UNKNOWNATTR\|ERR_UNKNOWNCMD\|ERR_UNKNOWNCOND\|ERR_UNKNOWNFILTER\|ERR_UNKNOWNICNOUT\|ERR_UNKNOWNIMGOUT\|ERR_UNKNOWNMIMETYPE\|ERR_UNKNOWNMUSFMT\|ERR_UNKNOWNPALETTE\|ERR_UNKNOWNSEC\|ERR_UNKNOWNSEQ\|ERR_UNKNOWNSMPOUT\|ERR_UNKNOWNTAG\|ERR_UNKNUMFMT\|ERR_UNKPROTOCOL\|ERR_UNKTEXTFMT\|ERR_UNMPARENTHESES\|ERR_UNSETENV\|ERR_UNSUPPORTEDFEAT\|ERR_UNTERMINTDSTR\|ERR_UNTILWOREPEAT\|ERR_UPDATEICON\|ERR_UPLOADFORBIDDEN\|ERR_USERABORT\|ERR_VALUEEXPECTED\|ERR_VAREXPECTED\|ERR_VARLENGTH\|ERR_VARSYNTAX\|ERR_VECGFXPLUGIN\|ERR_VECTORANIM\|ERR_VECTORBRUSH\|ERR_VERSION\|ERR_VFONT\|ERR_VFONTTYPE\|ERR_VIDATTACHED\|ERR_VIDEOFRAME\|ERR_VIDEOINIT\|ERR_VIDEOLAYER\|ERR_VIDEOLAYERDRV\|ERR_VIDEOSTRATEGY\|ERR_VIDEOTRANS\|ERR_VIDLAYERFUNC\|ERR_VIDNOTPAUSED\|ERR_VIDNOTPLAYING\|ERR_VIDPAUSED\|ERR_VIDPLAYING\|ERR_VIDRECMULTI\|ERR_VIDRECTRANS\|ERR_VIDSTOPPED\|ERR_VISUALINFO\|ERR_VMMISMATCH\|ERR_WARPOS\|ERR_WENDWOWHILE\|ERR_WHILEWOWEND\|ERR_WINDOW\|ERR_WITHWOENDWITH\|ERR_WRITE\|ERR_WRITEFILE\|ERR_WRITEJPEG\|ERR_WRITEONLY\|ERR_WRONGCLIPREG\|ERR_WRONGCMDRECVIDEO\|ERR_WRONGDTYPE\|ERR_WRONGFLOAT\|ERR_WRONGHEX\|ERR_WRONGID\|ERR_WRONGOP\|ERR_WRONGOPCST\|ERR_WRONGSPRITESIZE\|ERR_WRONGUSAGE\|ERR_WRONGVSTRATEGY\|ERR_XCURSOR\|ERR_XDISPLAY\|ERR_XF86VIDMODEEXT\|ERR_XFIXES\|ERR_YIELD\|ERR_ZERODIVISION\|ERR_ZLIBDATA\|ERR_ZLIBIO\|ERR_ZLIBSTREAM\|ERR_ZLIBVERSION\|EVENTHANDLER\|FADE\|FASTMEMORY\|FASTSPEED\|FILE\|FILEATTR_ARCHIVE\|FILEATTR_DELETE_USR\|FILEATTR_EXECUTE_GRP\|FILEATTR_EXECUTE_OTH\|FILEATTR_EXECUTE_USR\|FILEATTR_HIDDEN\|FILEATTR_NORMAL\|FILEATTR_PURE\|FILEATTR_READ_GRP\|FILEATTR_READ_OTH\|FILEATTR_READ_USR\|FILEATTR_READONLY\|FILEATTR_SCRIPT\|FILEATTR_SYSTEM\|FILEATTR_WRITE_GRP\|FILEATTR_WRITE_OTH\|FILEATTR_WRITE_USR\|FILETYPE_ANIM\|FILETYPE_ICON\|FILETYPE_IMAGE\|FILETYPE_SOUND\|FILETYPE_VIDEO\|FILETYPEFLAGS_ALPHA\|FILETYPEFLAGS_FPS\|FILETYPEFLAGS_QUALITY\|FILETYPEFLAGS_SAVE\|FILLCOLOR\|FILLGRADIENT\|FILLNONE\|FILLRULEEVENODD\|FILLRULEWINDING\|FILLTEXTURE\|FLOAT\|FLOW_HARDWARE\|FLOW_OFF\|FLOW_XON_XOFF\|FONT\|FONTENGINE_INBUILT\|FONTENGINE_NATIVE\|FONTSLANT_ITALIC\|FONTSLANT_OBLIQUE\|FONTSLANT_ROMAN\|FONTTYPE_BITMAP\|FONTTYPE_COLOR\|FONTTYPE_VECTOR\|FONTWEIGHT_BLACK\|FONTWEIGHT_BOLD\|FONTWEIGHT_BOOK\|FONTWEIGHT_DEMIBOLD\|FONTWEIGHT_EXTRABLACK\|FONTWEIGHT_EXTRABOLD\|FONTWEIGHT_EXTRALIGHT\|FONTWEIGHT_HEAVY\|FONTWEIGHT_LIGHT\|FONTWEIGHT_MEDIUM\|FONTWEIGHT_NORMAL\|FONTWEIGHT_REGULAR\|FONTWEIGHT_SEMIBOLD\|FONTWEIGHT_THIN\|FONTWEIGHT_ULTRABLACK\|FONTWEIGHT_ULTRABOLD\|FONTWEIGHT_ULTRALIGHT\|FRAMEMODE_FULL\|FRAMEMODE_SINGLE\|FREESPACE\|FTPASCII\|FTPBINARY\|FUCHSIA\|FUNCTION\|GRAY\|GREEN\|HBLINDS128\|HBLINDS16\|HBLINDS32\|HBLINDS64\|HBLINDS8\|HCLOSECURTAIN\|HCLOSEGATE\|HEXNUMERICAL\|HFLIPCOIN\|HFLOWBOTTOM\|HFLOWTOP\|HIDEBRUSH\|HIDELAYER\|HKEY_CLASSES_ROOT\|HKEY_CURRENT_CONFIG\|HKEY_CURRENT_USER\|HKEY_LOCAL_MACHINE\|HKEY_USERS\|HLINES\|HLINES2\|HLOWFLIPCOIN\|HOLLYWOOD\|HOPENCURTAIN\|HOPENGATE\|HSPLIT\|HSTRANGEPUSH\|HSTRETCHCENTER\|HSTRIPES\|HSTRIPES16\|HSTRIPES2\|HSTRIPES32\|HSTRIPES4\|HSTRIPES64\|HSTRIPES8\|HW_64BIT\|HW_AMIGA\|HW_AMIGAOS3\|HW_AMIGAOS4\|HW_ANDROID\|HW_AROS\|HW_IOS\|HW_LINUX\|HW_LITTLE_ENDIAN\|HW_MACOS\|HW_MORPHOS\|HW_REVISION\|HW_VERSION\|HW_WARPOS\|HW_WINDOWS\|ICNFMT_HOLLYWOOD\|ICON\|IMAGETYPE_RASTER\|IMAGETYPE_VECTOR\|IMGFMT_BMP\|IMGFMT_GIF\|IMGFMT_ILBM\|IMGFMT_JPEG\|IMGFMT_NATIVE\|IMGFMT_PLUGIN\|IMGFMT_PNG\|IMGFMT_TIFF\|IMGFMT_UNKNOWN\|IMMERSIVE_LEANBACK\|IMMERSIVE_NONE\|IMMERSIVE_NORMAL\|IMMERSIVE_STICKY\|INACTIVEWINDOW\|INF\|INSERTBRUSH\|INTEGER\|INTERVAL\|IO_BUFFERED\|IO_FAKE64\|IO_LITTLEENDIAN\|IO_SIGNED\|IO_UNBUFFERED\|IO_UNSIGNED\|IPAUTO\|IPUNKNOWN\|IPV4\|IPV6\|ITALIC\|JOINBEVEL\|JOINMITER\|JOINROUND\|JOYDOWN\|JOYDOWNLEFT\|JOYDOWNRIGHT\|JOYLEFT\|JOYNODIR\|JOYRIGHT\|JOYUP\|JOYUPLEFT\|JOYUPRIGHT\|JUSTIFIED\|KEEPASPRAT\|KEEPPOSITION\|LANGUAGE_ABKHAZIAN\|LANGUAGE_AFAR\|LANGUAGE_AFRIKAANS\|LANGUAGE_AKAN\|LANGUAGE_ALBANIAN\|LANGUAGE_AMHARIC\|LANGUAGE_ARABIC\|LANGUAGE_ARAGONESE\|LANGUAGE_ARMENIAN\|LANGUAGE_ASSAMESE\|LANGUAGE_AVARIC\|LANGUAGE_AVESTAN\|LANGUAGE_AYMARA\|LANGUAGE_AZERBAIJANI\|LANGUAGE_BAMBARA\|LANGUAGE_BASHKIR\|LANGUAGE_BASQUE\|LANGUAGE_BELARUSIAN\|LANGUAGE_BENGALI\|LANGUAGE_BIHARI\|LANGUAGE_BISLAMA\|LANGUAGE_BOSNIAN\|LANGUAGE_BRETON\|LANGUAGE_BULGARIAN\|LANGUAGE_BURMESE\|LANGUAGE_CATALAN\|LANGUAGE_CENTRALKHMER\|LANGUAGE_CHAMORRO\|LANGUAGE_CHECHEN\|LANGUAGE_CHICHEWA\|LANGUAGE_CHINESE\|LANGUAGE_CHURCHSLAVIC\|LANGUAGE_CHUVASH\|LANGUAGE_CORNISH\|LANGUAGE_CORSICAN\|LANGUAGE_CREE\|LANGUAGE_CROATIAN\|LANGUAGE_CZECH\|LANGUAGE_DANISH\|LANGUAGE_DIVEHI\|LANGUAGE_DUTCH\|LANGUAGE_DZONGKHA\|LANGUAGE_ENGLISH\|LANGUAGE_ESPERANTO\|LANGUAGE_ESTONIAN\|LANGUAGE_EWE\|LANGUAGE_FAROESE\|LANGUAGE_FIJIAN\|LANGUAGE_FINNISH\|LANGUAGE_FRENCH\|LANGUAGE_FULAH\|LANGUAGE_GAELIC\|LANGUAGE_GALICIAN\|LANGUAGE_GANDA\|LANGUAGE_GEORGIAN\|LANGUAGE_GERMAN\|LANGUAGE_GREEK\|LANGUAGE_GREENLANDIC\|LANGUAGE_GUARANI\|LANGUAGE_GUJARATI\|LANGUAGE_HAITIAN\|LANGUAGE_HAUSA\|LANGUAGE_HEBREW\|LANGUAGE_HERERO\|LANGUAGE_HINDI\|LANGUAGE_HIRIMOTU\|LANGUAGE_HUNGARIAN\|LANGUAGE_ICELANDIC\|LANGUAGE_IDO\|LANGUAGE_IGBO\|LANGUAGE_INDONESIAN\|LANGUAGE_INTERLINGUA\|LANGUAGE_INTERLINGUE\|LANGUAGE_INUKTITUT\|LANGUAGE_INUPIAQ\|LANGUAGE_IRISH\|LANGUAGE_ITALIAN\|LANGUAGE_JAPANESE\|LANGUAGE_JAVANESE\|LANGUAGE_KANNADA\|LANGUAGE_KANURI\|LANGUAGE_KASHMIRI\|LANGUAGE_KAZAKH\|LANGUAGE_KIKUYU\|LANGUAGE_KINYARWANDA\|LANGUAGE_KIRGHIZ\|LANGUAGE_KOMI\|LANGUAGE_KONGO\|LANGUAGE_KOREAN\|LANGUAGE_KUANYAMA\|LANGUAGE_KURDISH\|LANGUAGE_LAO\|LANGUAGE_LATIN\|LANGUAGE_LATVIAN\|LANGUAGE_LIMBURGAN\|LANGUAGE_LINGALA\|LANGUAGE_LITHUANIAN\|LANGUAGE_LUBAKATANGA\|LANGUAGE_LUXEMBOURGISH\|LANGUAGE_MACEDONIAN\|LANGUAGE_MALAGASY\|LANGUAGE_MALAY\|LANGUAGE_MALAYALAM\|LANGUAGE_MALTESE\|LANGUAGE_MANX\|LANGUAGE_MAORI\|LANGUAGE_MARATHI\|LANGUAGE_MARSHALLESE\|LANGUAGE_MONGOLIAN\|LANGUAGE_NAURU\|LANGUAGE_NAVAJO\|LANGUAGE_NDONGA\|LANGUAGE_NEPALI\|LANGUAGE_NORTHERNSAMI\|LANGUAGE_NORTHNDEBELE\|LANGUAGE_NORWEGIAN\|LANGUAGE_NORWEGIANBOKMAL\|LANGUAGE_NORWEGIANNYNORSK\|LANGUAGE_OCCITAN\|LANGUAGE_OJIBWA\|LANGUAGE_ORIYA\|LANGUAGE_OROMO\|LANGUAGE_OSSETIAN\|LANGUAGE_PALI\|LANGUAGE_PANJABI\|LANGUAGE_PASHTO\|LANGUAGE_PERSIAN\|LANGUAGE_POLISH\|LANGUAGE_PORTUGUESE\|LANGUAGE_QUECHUA\|LANGUAGE_ROMANIAN\|LANGUAGE_ROMANSH\|LANGUAGE_RUNDI\|LANGUAGE_RUSSIAN\|LANGUAGE_SAMOAN\|LANGUAGE_SANGO\|LANGUAGE_SANSKRIT\|LANGUAGE_SARDINIAN\|LANGUAGE_SERBIAN\|LANGUAGE_SHONA\|LANGUAGE_SICHUANYI\|LANGUAGE_SINDHI\|LANGUAGE_SINHALA\|LANGUAGE_SLOVAK\|LANGUAGE_SLOVENIAN\|LANGUAGE_SOMALI\|LANGUAGE_SOUTHERNSOTHO\|LANGUAGE_SOUTHNDEBELE\|LANGUAGE_SPANISH\|LANGUAGE_SUNDANESE\|LANGUAGE_SWAHILI\|LANGUAGE_SWATI\|LANGUAGE_SWEDISH\|LANGUAGE_TAGALOG\|LANGUAGE_TAHITIAN\|LANGUAGE_TAJIK\|LANGUAGE_TAMIL\|LANGUAGE_TATAR\|LANGUAGE_TELUGU\|LANGUAGE_THAI\|LANGUAGE_TIBETAN\|LANGUAGE_TIGRINYA\|LANGUAGE_TONGA\|LANGUAGE_TSONGA\|LANGUAGE_TSWANA\|LANGUAGE_TURKISH\|LANGUAGE_TURKMEN\|LANGUAGE_TWI\|LANGUAGE_UIGHUR\|LANGUAGE_UKRAINIAN\|LANGUAGE_UNKNOWN\|LANGUAGE_URDU\|LANGUAGE_UZBEK\|LANGUAGE_VENDA\|LANGUAGE_VIETNAMESE\|LANGUAGE_WALLOON\|LANGUAGE_WELSH\|LANGUAGE_WESTERNFRISIAN\|LANGUAGE_WOLOF\|LANGUAGE_XHOSA\|LANGUAGE_YIDDISH\|LANGUAGE_YORUBA\|LANGUAGE_ZHUANG\|LANGUAGE_ZULU\|LAYER\|LAYER_VS_BOX\|LAYERBUTTON\|LEFT\|LEFTOUT\|LIGHTUSERDATA\|LIME\|LINE\|LINEAR\|LITTLEENDIAN\|LONG\|LOWERCURVE\|MAROON\|MASK\|MASKAND\|MASKINVISIBLE\|MASKOR\|MASKVANILLACOPY\|MASKVISIBLE\|MASKXOR\|MEMORY\|MENU\|MENUITEM_DISABLED\|MENUITEM_RADIO\|MENUITEM_SELECTED\|MENUITEM_TOGGLE\|MILLISECONDS\|MODE_READ\|MODE_READWRITE\|MODE_WRITE\|MODLALT\|MODLCOMMAND\|MODLCONTROL\|MODLSHIFT\|MODRALT\|MODRCOMMAND\|MODRCONTROL\|MODRSHIFT\|MONO16\|MONO8\|MONOSPACE\|MOVEFILE_COPY\|MOVEFILE_COPYFAILED\|MOVEFILE_DELETE\|MOVEFILE_DELETEFAILED\|MOVEFILE_UNPROTECT\|MOVELIST\|MOVEWINDOW\|MUSIC\|NAN\|NATIVE\|NATIVEENDIAN\|NAVY\|NETWORKCONNECTION\|NETWORKSERVER\|NETWORKUDP\|NEXTFRAME\|NEXTFRAME2\|NIL\|NOCOLOR\|NONE\|NOPEN\|NORMAL\|NORMALSPEED\|NOTRANSPARENCY\|NUMBER\|NUMERICAL\|OLIVE\|ONBUTTONCLICK\|ONBUTTONCLICKALL\|ONBUTTONOVER\|ONBUTTONOVERALL\|ONBUTTONRIGHTCLICK\|ONBUTTONRIGHTCLICKALL\|ONKEYDOWN\|ONKEYDOWNALL\|ORIENTATION_LANDSCAPE\|ORIENTATION_LANDSCAPEREV\|ORIENTATION_NONE\|ORIENTATION_PORTRAIT\|ORIENTATION_PORTRAITREV\|PALETTE\|PALETTE_AGA\|PALETTE_CGA\|PALETTE_DEFAULT\|PALETTE_EGA\|PALETTE_GRAY128\|PALETTE_GRAY16\|PALETTE_GRAY256\|PALETTE_GRAY32\|PALETTE_GRAY4\|PALETTE_GRAY64\|PALETTE_GRAY8\|PALETTE_MACINTOSH\|PALETTE_MONOCHROME\|PALETTE_OCS\|PALETTE_WINDOWS\|PALETTE_WORKBENCH\|PALETTEMODE_PEN\|PALETTEMODE_REMAP\|PARITY_EVEN\|PARITY_NONE\|PARITY_ODD\|PERMREQ_READEXTERNAL\|PERMREQ_WRITEEXTERNAL\|PI\|PIXELZOOM1\|PIXELZOOM2\|PLOT\|PLUGINCAPS_ANIM\|PLUGINCAPS_AUDIOADAPTER\|PLUGINCAPS_CONVERT\|PLUGINCAPS_DIRADAPTER\|PLUGINCAPS_DISPLAYADAPTER\|PLUGINCAPS_EXTENSION\|PLUGINCAPS_FILEADAPTER\|PLUGINCAPS_ICON\|PLUGINCAPS_IMAGE\|PLUGINCAPS_IPCADAPTER\|PLUGINCAPS_LIBRARY\|PLUGINCAPS_NETWORKADAPTER\|PLUGINCAPS_REQUESTERADAPTER\|PLUGINCAPS_REQUIRE\|PLUGINCAPS_SAVEANIM\|PLUGINCAPS_SAVEICON\|PLUGINCAPS_SAVEIMAGE\|PLUGINCAPS_SAVESAMPLE\|PLUGINCAPS_SERIALIZE\|PLUGINCAPS_SOUND\|PLUGINCAPS_TIMERADAPTER\|PLUGINCAPS_VECTOR\|PLUGINCAPS_VIDEO\|POINTER\|POLYGON\|PRGTYPE_APPLET\|PRGTYPE_PROGRAM\|PRGTYPE_SCRIPT\|PRINT\|PURPLE\|PUSHBOTTOM\|PUSHLEFT\|PUSHRIGHT\|PUSHTOP\|PUZZLE\|QUADRECT\|QUARTERS\|RADIAL\|RANDOMEFFECT\|RANDOMPARAMETER\|RECEIVEALL\|RECEIVEBYTES\|RECEIVEDATA_PACKET\|RECEIVELINE\|RECTBACKCENTER\|RECTBACKEAST\|RECTBACKNORTH\|RECTBACKNORTHEAST\|RECTBACKNORTHWEST\|RECTBACKSOUTH\|RECTBACKSOUTHEAST\|RECTBACKSOUTHWEST\|RECTBACKWEST\|RECTCENTER\|RECTEAST\|RECTNORTH\|RECTNORTHEAST\|RECTNORTHWEST\|RECTSOUTH\|RECTSOUTHEAST\|RECTSOUTHWEST\|RECTWEST\|RED\|REMOVELAYER\|REQ_CAMERA\|REQ_GALLERY\|REQ_HIDEICONS\|REQ_MULTISELECT\|REQ_NORMAL\|REQ_SAVEMODE\|REQICON_ERROR\|REQICON_INFORMATION\|REQICON_NONE\|REQICON_QUESTION\|REQICON_WARNING\|REVEALBOTTOM\|REVEALLEFT\|REVEALRIGHT\|REVEALTOP\|RIGHT\|RIGHTOUT\|ROLLLEFT\|ROLLTOP\|RTS_OFF\|RTS_ON\|SAMPLE\|SANS\|SCALEMODE_AUTO\|SCALEMODE_LAYER\|SCALEMODE_NONE\|SCROLLBOTTOM\|SCROLLEAST\|SCROLLLEFT\|SCROLLNORTH\|SCROLLNORTHEAST\|SCROLLNORTHWEST\|SCROLLRIGHT\|SCROLLSOUTH\|SCROLLSOUTHEAST\|SCROLLSOUTHWEST\|SCROLLTOP\|SCROLLWEST\|SECONDS\|SEEK_BEGINNING\|SEEK_CURRENT\|SEEK_END\|SELMODE_COMBO\|SELMODE_LAYERS\|SELMODE_NORMAL\|SERIAL\|SERIF\|SERVER\|SHADOW\|SHAPE\|SHDWEAST\|SHDWNORTH\|SHDWNORTHEAST\|SHDWNORTHWEST\|SHDWSOUTH\|SHDWSOUTHEAST\|SHDWSOUTHWEST\|SHDWWEST\|SHORT\|SILVER\|SIMPLEBUTTON\|SINE\|SIZEWINDOW\|SLIDEBOTTOM\|SLIDELEFT\|SLIDERIGHT\|SLIDETOP\|SLOWSPEED\|SMOOTHOUT\|SMPFMT_WAVE\|SNAPDESKTOP\|SNAPDISPLAY\|SNAPWINDOW\|SPIRAL\|SPRITE\|SPRITE_VS_BOX\|SPRITE_VS_BRUSH\|STAR\|STDERR\|STDIN\|STDOUT\|STDPTR_BUSY\|STDPTR_CUSTOM\|STDPTR_SYSTEM\|STEREO16\|STEREO8\|STOP_1\|STOP_2\|STRETCHBOTTOM\|STRETCHLEFT\|STRETCHRIGHT\|STRETCHTOP\|STRING\|STRUDEL\|SUN\|SWISS\|TABLE\|TEAL\|TEXTOBJECT\|TEXTOUT\|THREAD\|TICKS\|TIMEOUT\|TIMER\|TOP\|TOPOUT\|TRUETYPE_DEFAULT\|TURNDOWNBOTTOM\|TURNDOWNLEFT\|TURNDOWNRIGHT\|TURNDOWNTOP\|UDPCLIENT\|UDPNONE\|UDPOBJECT\|UDPSERVER\|UNDERLINED\|UNDO\|UPLOADFILE_RESPONSE\|UPLOADFILE_STATUS\|UPNDOWN\|UPPERCURVE\|USEDSPACE\|USELAYERPOSITION\|USERDATA\|VANILLACOPY\|VBLINDS128\|VBLINDS16\|VBLINDS32\|VBLINDS64\|VBLINDS8\|VCLOSECURTAIN\|VCLOSEGATE\|VECTORPATH\|VFLIPCOIN\|VFLOWLEFT\|VFLOWRIGHT\|VIDDRV_HOLLYWOOD\|VIDDRV_OS\|VIDEO\|VIEWMODE_DATE\|VIEWMODE_ICONS\|VIEWMODE_NAME\|VIEWMODE_NONE\|VIEWMODE_SIZE\|VIEWMODE_TYPE\|VLINES\|VLINES2\|VLOWFLIPCOIN\|VOID\|VOPENCURTAIN\|VOPENGATE\|VSPLIT\|VSTRANGEPUSH\|VSTRETCHCENTER\|VSTRIPES\|VSTRIPES16\|VSTRIPES2\|VSTRIPES32\|VSTRIPES4\|VSTRIPES64\|VSTRIPES8\|WALLPAPERLEFT\|WALLPAPERTOP\|WATER1\|WATER2\|WATER3\|WATER4\|WHITE\|WORD\|YELLOW\|ZOOMCENTER\|ZOOMEAST\|ZOOMIN\|ZOOMNORTH\|ZOOMNORTHEAST\|ZOOMNORTHWEST\|ZOOMOUT\|ZOOMSOUTH\|ZOOMSOUTHEAST\|ZOOMSOUTHWEST\|ZOOMWEST\)\>" +" Hollywood Functions +syn keyword hwFunction ACos ARGB ASin ATan ATan2 Abs ActivateDisplay Add AddArcToPath AddBoxToPath AddCircleToPath AddEllipseToPath AddFontPath AddIconImage AddMove AddStr AddTab AddTextToPath AllocMem AllocMemFromPointer AllocMemFromVirtualFile AppendPath ApplyPatch Arc ArcDistortBrush ArrayToStr Asc Assert AsyncDrawFrame BGPicToBrush BarrelDistortBrush Base64Str Beep BeginAnimStream BeginDoubleBuffer BeginRefresh BinStr BitClear BitComplement BitSet BitTest BitXor Blue BlurBrush Box BreakEventHandler BreakWhileMouseOn BrushToBGPic BrushToGray BrushToMonochrome BrushToPenArray BrushToRGBArray ByteAsc ByteChr ByteLen ByteOffset ByteStrStr ByteVal CRC32 CRC32Str CallJavaMethod CancelAsyncDraw CancelAsyncOperation CanonizePath Cast Ceil ChangeApplicationIcon ChangeBrushTransparency ChangeDirectory ChangeDisplayMode ChangeDisplaySize ChangeInterval CharOffset CharWidth CharcoalBrush CheckEvent CheckEvents Chr Circle ClearClipboard ClearEvents ClearInterval ClearMove ClearObjectData ClearPath ClearScreen ClearSerialQueue ClearTimeout CloseAmigaGuide CloseAnim CloseAudio CloseCatalog CloseConnection CloseDirectory CloseDisplay CloseFile CloseFont CloseMusic ClosePath CloseResourceMonitor CloseSerialPort CloseServer CloseUDPObject CloseVideo Cls CollectGarbage Collision ColorRequest CompareDates CompareStr CompressFile Concat ConsolePrint ConsolePrintNR ConsolePrompt ContinueAsyncOperation ContrastBrush ContrastPalette ConvertStr ConvertToBrush CopyAnim CopyBGPic CopyBrush CopyFile CopyMem CopyObjectData CopyPalette CopyPath CopyPens CopySample CopySprite CopyTable CopyTextObject Cos CountDirectoryEntries CountJoysticks CountStr CreateAnim CreateBGPic CreateBorderBrush CreateBrush CreateButton CreateClipRegion CreateCoroutine CreateDisplay CreateGradientBGPic CreateGradientBrush CreateIcon CreateKeyDown CreateLayer CreateList CreateMenu CreateMusic CreatePalette CreatePointer CreatePort CreateRainbowBGPic CreateRexxPort CreateSample CreateServer CreateShadowBrush CreateShortcut CreateSprite CreateTextObject CreateTexturedBGPic CreateTexturedBrush CreateUDPObject CropBrush CtrlCQuit CurveTo CyclePalette DateToTimestamp DateToUTC DebugOutput DebugPrint DebugPrintNR DebugPrompt DebugStr DebugVal DecompressFile DecreasePointer DefineVirtualFile DefineVirtualFileFromString Deg DeleteAlphaChannel DeleteButton DeleteFile DeleteMask DeletePrefs DeselectMenuItem DeserializeTable DirectoryItems DisableButton DisableEvent DisableLayers DisableLineHook DisableMenuItem DisablePlugin DisableVWait DisplayAnimFrame DisplayBGPic DisplayBGPicPart DisplayBGPicPartFX DisplayBrush DisplayBrushFX DisplayBrushPart DisplaySprite DisplayTextObject DisplayTextObjectFX DisplayTransitionFX DisplayVideoFrame Div DoMove DownloadFile DrawPath DumpButtons DumpLayers DumpMem DumpVideo DumpVideoTime EdgeBrush Ellipse EmbossBrush EmptyStr EnableButton EnableEvent EnableLayers EnableLineHook EnableMenuItem EnablePlugin EnableVWait End EndDoubleBuffer EndRefresh EndSelect EndianSwap EndsWith Eof Error EscapeQuit Eval Execute Exists ExitOnError Exp ExtractPalette FileAttributes FileLength FileLines FilePart FilePos FileRequest FileSize FileToString FillMem FillMusicBuffer FindStr FinishAnimStream FinishAsyncDraw Flip FlipBrush FlipSprite FloodFill Floor FlushFile FlushMusicBuffer FlushSerialPort FontRequest ForEach ForEachI ForcePathUse ForceSound ForceVideoDriver ForceVideoMode FormatStr FrExp Frac FreeAnim FreeBGPic FreeBrush FreeClipRegion FreeDisplay FreeEventCache FreeGlyphCache FreeIcon FreeLayers FreeMem FreeMenu FreeModule FreePalette FreePath FreePointer FreeSample FreeSprite FreeTextObject FullPath GCInfo GammaBrush GammaPalette GetAnimFrame GetApplicationInfo GetApplicationList GetAsset GetAttribute GetAvailableFonts GetBaudRate GetBestPen GetBrushLink GetBrushPen GetBulletColor GetCatalogString GetChannels GetCharMaps GetClipboard GetCommandLine GetConnectionIP GetConnectionPort GetConnectionProtocol GetConstant GetCoroutineStatus GetCountryInfo GetCurrentDirectory GetCurrentPoint GetDTR GetDash GetDataBits GetDate GetDateNum GetDefaultEncoding GetDirectoryEntry GetDisplayModes GetEnv GetErrorName GetEventCode GetFPSLimit GetFileArgument GetFileAttributes GetFillRule GetFillStyle GetFlowControl GetFontColor GetFontStyle GetFormStyle GetFrontScreen GetHostName GetIconProperties GetItem GetKerningPair GetLanguageInfo GetLastError GetLayerAtPos GetLayerPen GetLayerStyle GetLineCap GetLineJoin GetLineWidth GetLocalIP GetLocalInterfaces GetLocalPort GetLocalProtocol GetMACAddress GetMemPointer GetMemString GetMemoryInfo GetMetaTable GetMiterLimit GetMonitors GetObjectData GetObjectType GetObjects GetPalettePen GetParity GetPathExtents GetPatternPosition GetPen GetPlugins GetProgramDirectory GetProgramInfo GetPubScreens GetRTS GetRandomColor GetRandomFX GetRealColor GetSampleData GetShortcutPath GetSongPosition GetStartDirectory GetStopBits GetSystemCountry GetSystemInfo GetSystemLanguage GetTempFileName GetTime GetTimeZone GetTimer GetTimestamp GetType GetVersion GetVideoFrame GetVolumeInfo GetVolumeName GetWeekday GrabDesktop Green HaveFreeChannel HaveItem HaveObject HaveObjectData HavePlugin HaveVolume HexStr HideDisplay HideKeyboard HideLayer HideLayerFX HidePointer HideScreen Hypot IIf IPairs IgnoreCase ImageRequest InKeyStr IncreasePointer InsertItem InsertLayer InsertSample InsertStr InstallEventHandler Int Intersection InvertAlphaChannel InvertBrush InvertMask InvertPalette IsAbsolutePath IsAlNum IsAlpha IsAnim IsBrushEmpty IsChannelPlaying IsCntrl IsDigit IsDirectory IsFinite IsGraph IsInf IsKeyDown IsLeftMouse IsLower IsMenuItemDisabled IsMenuItemSelected IsMidMouse IsModule IsMusic IsMusicPlaying IsNan IsNil IsOnline IsPathEmpty IsPicture IsPrint IsPunct IsRightMouse IsSample IsSamplePlaying IsSound IsSpace IsTableEmpty IsUnicode IsUpper IsVideo IsVideoPlaying IsXDigit JoyDir JoyFire LayerExists LayerToBack LayerToFront Ld LdExp LeftMouseQuit LeftStr LegacyControl Limit Line LineTo ListItems ListRequest Ln LoadAnim LoadAnimFrame LoadBGPic LoadBrush LoadIcon LoadModule LoadPalette LoadPlugin LoadPrefs LoadSample LoadSprite Locate Log LowerStr MD5 MD5Str MakeButton MakeDate MakeDirectory MakeHostPath MatchPattern Max MemToTable MidStr Min MixBrush MixRGB MixSample Mod ModifyAnimFrames ModifyButton ModifyKeyDown ModifyLayerFrames ModulateBrush ModulatePalette MonitorDirectory MouseX MouseY MoveAnim MoveBrush MoveDisplay MoveFile MoveLayer MovePointer MoveSprite MoveTextObject MoveTo Mul NPrint NextDirectoryEntry NextFrame NextItem NormalizePath OilPaintBrush OpenAmigaGuide OpenAnim OpenAudio OpenCatalog OpenConnection OpenDirectory OpenDisplay OpenFile OpenFont OpenMusic OpenResourceMonitor OpenSerialPort OpenURL OpenVideo Pack PadNum Pairs PaletteToGray ParseDate PathItems PathPart PathRequest PathToBrush PatternFindStr PatternFindStrDirect PatternFindStrShort PatternReplaceStr PauseLayer PauseModule PauseMusic PauseTimer PauseVideo Peek PeekClipboard PenArrayToBrush PerformSelector PermissionRequest PerspectiveDistortBrush Pi PixelateBrush PlayAnim PlayAnimDisk PlayLayer PlayModule PlayMusic PlaySample PlaySubsong PlayVideo Plot Poke PolarDistortBrush PollSerialQueue Polygon Pow Print QuantizeBrush RGB RGBArrayToBrush Rad RaiseOnError RasterizeBrush RawDiv RawEqual RawGet RawSet ReadBrushPixel ReadByte ReadBytes ReadChr ReadDirectory ReadFloat ReadFunction ReadInt ReadLine ReadMem ReadPen ReadPixel ReadRegistryKey ReadSerialData ReadShort ReadString ReadTable ReceiveData ReceiveUDPData Red ReduceAlphaChannel RefreshDisplay RelCurveTo RelLineTo RelMoveTo RemapBrush RemoveBrushPalette RemoveButton RemoveIconImage RemoveItem RemoveKeyDown RemoveLayer RemoveLayerFX RemoveLayers RemoveSprite RemoveSprites Rename RepeatStr ReplaceColors ReplaceStr ResetKeyStates ResetTabs ResetTimer ResolveHostName ResumeCoroutine ResumeLayer ResumeModule ResumeMusic ResumeTimer ResumeVideo ReverseFindStr ReverseStr RewindDirectory RightStr Rnd RndF RndStrong Rol Ror RotateBrush RotateLayer RotateTextObject Round Rt Run RunCallback RunRexxScript Sar SaveAnim SaveBrush SaveIcon SavePalette SavePrefs SaveSample SaveSnapshot ScaleAnim ScaleBGPic ScaleBrush ScaleLayer ScaleSprite ScaleTextObject Seek SeekLayer SeekMusic SeekVideo SelectAlphaChannel SelectAnim SelectBGPic SelectBrush SelectDisplay SelectLayer SelectMask SelectMenuItem SelectPalette SendApplicationMessage SendData SendMessage SendRexxCommand SendUDPData SepiaToneBrush SerializeTable SetAlphaIntensity SetAnimFrameDelay SetBaudRate SetBorderPen SetBrushDepth SetBrushPalette SetBrushPen SetBrushTransparency SetBrushTransparentPen SetBulletColor SetBulletPen SetChannelVolume SetClipRegion SetClipboard SetCycleTable SetDTR SetDash SetDataBits SetDefaultEncoding SetDepth SetDisplayAttributes SetDitherMode SetDrawPen SetDrawTagsDefault SetEnv SetEventTimeout SetFPSLimit SetFileAttributes SetFileEncoding SetFillRule SetFillStyle SetFlowControl SetFont SetFontColor SetFontStyle SetFormStyle SetGradientPalette SetIOMode SetIconProperties SetInterval SetLayerAnchor SetLayerBorder SetLayerDepth SetLayerFilter SetLayerLight SetLayerName SetLayerPalette SetLayerPen SetLayerShadow SetLayerStyle SetLayerTint SetLayerTransparency SetLayerTransparentPen SetLayerVolume SetLayerZPos SetLineCap SetLineJoin SetLineWidth SetListItems SetMargins SetMaskMode SetMasterVolume SetMetaTable SetMiterLimit SetMusicVolume SetNetworkProtocol SetNetworkTimeout SetObjectData SetPalette SetPaletteDepth SetPaletteMode SetPalettePen SetPaletteTransparentPen SetPanning SetParity SetPen SetPitch SetPointer SetRTS SetScreenTitle SetShadowPen SetSpriteZPos SetStandardIconImage SetStandardPalette SetStopBits SetSubtitle SetTimeout SetTimerElapse SetTitle SetTransparentPen SetTransparentThreshold SetTrayIcon SetVectorEngine SetVideoPosition SetVideoSize SetVideoVolume SetVolume SetWBIcon Sgn SharpenBrush Shl ShowDisplay ShowKeyboard ShowLayer ShowLayerFX ShowNotification ShowPointer ShowRinghioMessage ShowScreen ShowToast Shr Sin SolarizeBrush SolarizePalette Sort SplitStr Sqrt StartPath StartSubPath StartTimer StartsWith StopChannel StopLayer StopModule StopMusic StopSample StopTimer StopVideo StrLen StrStr StrToArray StringRequest StringToFile StripStr Sub SwapLayers SwirlBrush SystemRequest TableItems TableToMem Tan TextExtent TextHeight TextOut TextWidth TimerElapsed TimestampToDate TintBrush TintPalette ToHostName ToIP ToNumber ToString ToUserData TransformBrush TransformLayer TranslateLayer TranslatePath TrimBrush TrimStr UTCToDate UndefineVirtualStringFile Undo UndoFX UnleftStr UnmidStr Unpack UnrightStr UnsetEnv UploadFile UpperStr UseCarriageReturn UseFont VWait Val ValidateDate ValidateStr Vibrate Wait WaitEvent WaitKeyDown WaitLeftMouse WaitMidMouse WaitPatternPosition WaitRightMouse WaitSampleEnd WaitSongPosition WaitTimer WaterRippleBrush WhileKeyDown WhileMouseDown WhileMouseOn WhileRightMouseDown Wrap WriteAnimFrame WriteBrushPixel WriteByte WriteBytes WriteChr WriteFloat WriteFunction WriteInt WriteLine WriteMem WritePen WriteRegistryKey WriteSerialData WriteShort WriteString WriteTable YieldCoroutine + +" user-defined constants +syn match hwUserConstant "#\<\u\+\>" +" user-defined functions +syn match hwUserFunction "\("me=e-1 + +" Comments +syn keyword hwTodo contained TODO FIXME XXX +syn match hwComment ";.*$" contains=hwTodo,@Spell +syn region hwComment matchgroup=hwComment start="/\*" end="\*/" contains=hwTodo,@Spell + + +" Strings +syn match hwSpecial contained #\\[\\abfnrtvz'"]\|\\x[[:xdigit:]]\{2}\|\\[[:digit:]]\{,3}# +syn region hwString start=+'+hs=s+1 end=+'+he=e-1 skip=+\\\\\|\\'+ contains=hwSpecial,@Spell +syn region hwString start=+"+hs=s+1 end=+"+he=e-1 skip=+\\\\\|\\"+ contains=hwSpecial,@Spell + +" integer number +syn match hwNumber "\<\d\+\>" +" floating point number, with dot, optional exponent +syn match hwNumber "\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match hwNumber "\.\d\+\%([eE][-+]\=\d\+\)\=\>" +" floating point number, without dot, with exponent +syn match hwNumber "\<\d\+[eE][-+]\=\d\+\>" + +" hex numbers +syn match hwNumber "\<0[xX]\x\+\>" +syn match hwNumber "\<0[xX][[:xdigit:].]\+\%([pP][-+]\=\d\+\)\=\>" + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet +hi def link hwPreProcessor PreProc +hi def link hwStatement Statement +hi def link hwFallThrough Statement +hi def link hwRepeat Repeat +hi def link hwFor Repeat +hi def link hwString PmenuSel +hi def link hwNumber Number +hi def link hwOperator Operator +hi def link hwStep Operator +hi def link hwIn Operator +hi def link hwUserConstant Constant +hi def link hwConstant Constant +hi def link hwLineStatement Conditional +hi def link hwCond Conditional +hi def link hwElseIf Conditional +hi def link hwFunction Function +hi def link hwUserFunction Function +hi def link hwComment MoreMsg +hi def link hwTodo Todo +hi def link hwTable Structure +hi def link hwError Error +hi def link hwParenError Error +hi def link hwBraceError Error +hi def link hwSpecial SpecialChar +hi def link hwLabel Label + + +let b:current_syntax = "hollywood" + +let &cpo = s:cpo_save +unlet s:cpo_save +" vim: et ts=8 sw=2 diff --git a/syntax/hostconf.vim b/syntax/hostconf.vim new file mode 100644 index 000000000..e96b39170 --- /dev/null +++ b/syntax/hostconf.vim @@ -0,0 +1,151 @@ +if polyglot#init#is_disabled(expand(':p'), 'hostconf', 'syntax/hostconf.vim') + finish +endif + +" Vim syntax file +" Language: host.conf(5) configuration file +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2007-06-25 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword hostconfTodo + \ contained + \ TODO + \ FIXME + \ XXX + \ NOTE + +syn match hostconfComment + \ display + \ contained + \ '\s*#.*' + \ contains=hostconfTodo, + \ @Spell + +syn match hostconfBegin + \ display + \ '^' + \ nextgroup=hostconfComment,hostconfKeyword + \ skipwhite + +syn keyword hostconfKeyword + \ contained + \ order + \ nextgroup=hostconfLookupOrder + \ skipwhite + +let s:orders = ['bind', 'hosts', 'nis'] + +function s:permute_suffixes(list) + if empty(a:list) + return [] + elseif len(a:list) == 1 + return a:list[0] + else + let i = 0 + let n = len(a:list) + let sub_permutations = [] + while i < n + let list_copy = copy(a:list) + let removed = list_copy[i] + call remove(list_copy, i) + call add(sub_permutations, [removed, s:permute_suffixes(list_copy)]) + let i += 1 + endwhile + return sub_permutations + endif +endfunction + +function s:generate_suffix_groups(list_of_order_of_orders, context, trailing_context) + for order_of_orders in a:list_of_order_of_orders + let order = order_of_orders[0] + let trailing_context = a:trailing_context . toupper(order[0]) . order[1:] + let nextgroup = 'hostconfLookupOrder' . trailing_context + let nextgroup_delimiter = nextgroup . 'Delimiter' + let group = 'hostconfLookupOrder' . a:context + execute 'syn keyword' group 'contained' order 'nextgroup=' . nextgroup_delimiter 'skipwhite' + execute 'syn match' nextgroup_delimiter 'contained display "," nextgroup=' . nextgroup 'skipwhite' + if a:context != "" + execute 'hi def link' group 'hostconfLookupOrder' + endif + execute 'hi def link' nextgroup_delimiter 'hostconfLookupOrderDelimiter' + let context = trailing_context + if type(order_of_orders[1]) == type([]) + call s:generate_suffix_groups(order_of_orders[1], context, trailing_context) + else + execute 'syn keyword hostconfLookupOrder' . context 'contained' order_of_orders[-1] + execute 'hi def link hostconfLookupOrder' . context 'hostconfLookupOrder' + endif + endfor +endfunction + +call s:generate_suffix_groups(s:permute_suffixes(s:orders), "", "") + +delfunction s:generate_suffix_groups +delfunction s:permute_suffixes + +syn keyword hostconfKeyword + \ contained + \ trim + \ nextgroup=hostconfDomain + \ skipwhite + +syn match hostconfDomain + \ contained + \ '\.[^:;,[:space:]]\+' + \ nextgroup=hostconfDomainDelimiter + \ skipwhite + +syn match hostconfDomainDelimiter + \ contained + \ display + \ '[:;,]' + \ nextgroup=hostconfDomain + \ skipwhite + +syn keyword hostconfKeyword + \ contained + \ multi + \ nospoof + \ spoofalert + \ reorder + \ nextgroup=hostconfBoolean + \ skipwhite + +syn keyword hostconfBoolean + \ contained + \ on + \ off + +syn keyword hostconfKeyword + \ contained + \ spoof + \ nextgroup=hostconfSpoofValue + \ skipwhite + +syn keyword hostconfSpoofValue + \ contained + \ off + \ nowarn + \ warn + +hi def link hostconfTodo Todo +hi def link hostconfComment Comment +hi def link hostconfKeyword Keyword +hi def link hostconfLookupOrder Identifier +hi def link hostconfLookupOrderDelimiter Delimiter +hi def link hostconfDomain String +hi def link hostconfDomainDelimiter Delimiter +hi def link hostconfBoolean Boolean +hi def link hostconfSpoofValue hostconfBoolean + +let b:current_syntax = "hostconf" + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/syntax/hostsaccess.vim b/syntax/hostsaccess.vim new file mode 100644 index 000000000..3a2182e06 --- /dev/null +++ b/syntax/hostsaccess.vim @@ -0,0 +1,27 @@ +if polyglot#init#is_disabled(expand(':p'), 'hostsaccess', 'syntax/hostsaccess.vim') + finish +endif + +" Vim syntax file +" Language: hosts.deny, hosts.allow configuration files +" Maintainer: Thilo Six +" Last Change: 2011 May 01 +" Derived From: conf.vim +" Credits: Bram Moolenaar +" +" This file is there to get at least a minimal highlighting. +" A later version may be improved. + + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" For a starter we just use conf.vim for highlighting +runtime! syntax/conf.vim +unlet b:current_syntax + + +let b:current_syntax = "hostsaccess" +" vim: ts=8 sw=2 diff --git a/syntax/hss.vim b/syntax/hss.vim new file mode 100644 index 000000000..1d04f48f4 --- /dev/null +++ b/syntax/hss.vim @@ -0,0 +1,115 @@ +if polyglot#init#is_disabled(expand(':p'), 'haxe', 'syntax/hss.vim') + finish +endif + +" Vim syntax file +" Language: hss (Haxe css) +" Author: Justin Donaldson (jdonaldson@gmail.com) +" Based heavily on work by Daniel Hofstetter (daniel.hofstetter@42dh.com) + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'hss' +endif + +runtime! syntax/css.vim +runtime! syntax/css/*.vim + +syn case ignore + +syn region hssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,hssDefinition,hssComment,hssIdChar,hssClassChar,hssAmpersand,hssVariable,hssInclude,hssExtend,hssDebug,hssWarn,@hssControl,hssInterpolation,hssNestedSelector,hssReturn + +syn region hssInterpolation start="#{" end="}" contains=hssVariable + +syn match hssVariable "$[[:alnum:]_-]\+" nextgroup=hssVariableAssignment +syn match hssVariableAssignment ":" contained nextgroup=hssVariableValue +syn match hssVariableValue ".*;"me=e-1 contained contains=hssVariable,hssOperator,hssDefault "me=e-1 means that the last char of the pattern is not highlighted +" syn match hssMixin "^@mixin" nextgroup=hssMixinName +syn match hssMixinName " [[:alnum:]_-]\+" contained nextgroup=hssDefinition +syn match hssFunction "^@function" nextgroup=hssFunctionName +syn match hssFunctionName " [[:alnum:]_-]\+" contained nextgroup=hssDefinition +" syn match hssReturn "@return" contained +" syn match hssInclude "@include" nextgroup=hssMixinName +" syn match hssExtend "@extend .*[;}]"me=e-1 contains=cssTagName,hssIdChar,hssClassChar +syn keyword hssTodo TODO FIXME NOTE OPTIMIZE XXX contained containedIn=hssComment,cssComment + +syn match hssColor "#[0-9A-Fa-f]\{3\}\>" contained +syn match hssColor "#[0-9A-Fa-f]\{6\}\>" contained + +syn match hssIdChar "#[[:alnum:]_-]\@=" nextgroup=hssId contains=hssColor +syn match hssId "[[:alnum:]_-]\+" contained +syn match hssClassChar "\.[[:alnum:]_-]\@=" nextgroup=hssClass +syn match hssClass "[[:alnum:]_-]\+" contained +syn match hssAmpersand "&" nextgroup=cssPseudoClass + +syn match hssOperator "+" contained +syn match hssOperator "-" contained +syn match hssOperator "/" contained +syn match hssOperator "*" contained + +syn match hssNestedSelector "[^/]* {"me=e-1 contained contains=cssTagName,cssAttributeSelector,hssIdChar,hssClassChar,hssAmpersand,hssVariable,hssMixin,hssFunction,@hssControl,hssInterpolation,hssNestedProperty +syn match hssNestedProperty "[[:alnum:]]\+:"me=e-1 contained + +" syn match hssDebug "@debug" +" syn match hssWarn "@warn" +syn match hssDefault "!default" contained + +" syn match hssIf "@if" +" syn match hssElse "@else" +" syn match hssElseIf "@else if" +" syn match hssWhile "@while" +" syn match hssFor "@for" nextgroup=hssVariable +" syn match hssFrom " from " +" syn match hssTo " to " +" syn match hssThrough " through " +" syn match hssEach "@each" nextgroup=hssVariable +" syn match hssIn " in " +" syn cluster hssControl contains=hssIf,hssElse,hssElseIf,hssWhile,hssFor,hssFrom,hssTo,hssThrough,hssEach,hssIn + +syn match hssComment "//.*$" contains=@Spell +syn region hssImportStr start="\"" end="\"" +syn region hssImport start="@import" end=";" contains=hssImportStr,hssComment,cssComment,cssUnicodeEscape,cssMediaType + +hi def link hssVariable Identifier +hi def link hssVariableValue Constant +hi def link hssMixin PreProc +hi def link hssMixinName Function +hi def link hssFunction PreProc +hi def link hssFunctionName Function +hi def link hssReturn Statement +hi def link hssInclude PreProc +hi def link hssExtend PreProc +hi def link hssComment Comment +hi def link hssColor Constant +hi def link hssIdChar Special +hi def link hssClassChar Special +hi def link hssId Identifier +hi def link hssClass Identifier +hi def link hssAmpersand Character +hi def link hssNestedProperty Type +hi def link hssDebug Debug +hi def link hssWarn Debug +hi def link hssDefault Special +hi def link hssIf Conditional +hi def link hssElse Conditional +hi def link hssElseIf Conditional +hi def link hssWhile Repeat +hi def link hssFor Repeat +hi def link hssFrom Repeat +hi def link hssTo Repeat +hi def link hssThrough Repeat +hi def link hssEach Repeat +hi def link hssIn Repeat +hi def link hssInterpolation Delimiter +hi def link hssImport Include +hi def link hssImportStr Include +hi def link hssTodo Todo + +let b:current_syntax = "hss" +if main_syntax == 'hss' + unlet main_syntax +endif diff --git a/syntax/html.vim b/syntax/html.vim index 53f64797b..46ed2b53a 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -1,4 +1,6 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 +if polyglot#init#is_disabled(expand(':p'), 'html5', 'syntax/html.vim') + finish +endif " Vim syntax file " Language: HTML (version 5.1) @@ -192,99 +194,3 @@ syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemul syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref - -endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jinja') == -1 - -" Vim syntax file -" Language: HTML (version 5) -" Maintainer: Rodrigo Machado -" URL: http://rm.blog.br/vim/syntax/html.vim -" Last Change: 2009 Aug 19 -" License: Public domain -" (but let me know if you like :) ) -" -" Note: This file just adds the new tags from HTML 5 -" and don't replace default html.vim syntax file -" -" Modified: othree -" Changes: update to Draft 28 August 2010 -" add complete new attributes -" add wai-aria attributes -" add microdata attributes -" add rdfa attributes - - -syn keyword htmlTagName contained script -" HTML 5 tags -syn keyword htmlTagName contained article aside audio canvas command -syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer -syn keyword htmlTagName contained header hgroup keygen mark meter menu nav output -syn keyword htmlTagName contained progress time ruby rt rp section source summary time track video wbr - -" HTML 5 arguments -" Core Attributes -syn keyword htmlArg contained accesskey class contenteditable contextmenu dir -syn keyword htmlArg contained draggable hidden id lang spellcheck style tabindex title -" Event-handler Attributes -syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange -syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover -syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange -syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata -syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup -syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange -syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate -syn keyword htmlArg contained onvolumechange onwaiting -" XML Attributes -syn keyword htmlArg contained xml:lang xml:space xml:base -" new features -" -syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload -syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload -"