mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
233a817f05 | ||
|
|
c3e825027d | ||
|
|
3618414fad | ||
|
|
88cae16fca | ||
|
|
6d7f437b84 | ||
|
|
bb27d0efbf | ||
|
|
8a790ac7bf | ||
|
|
c9f2aa9ae0 | ||
|
|
1fc249bafd | ||
|
|
518d733369 | ||
|
|
0021384259 | ||
|
|
af3ebda710 | ||
|
|
6b663ec330 | ||
|
|
6b9625ecd5 | ||
|
|
3383046210 | ||
|
|
8f9e5ac70b | ||
|
|
23d7b0931d | ||
|
|
3ee6ab9d13 | ||
|
|
cd919c0039 | ||
|
|
3ac0dd5a80 | ||
|
|
e95c5f49aa | ||
|
|
ba11e0f1ad | ||
|
|
c45f0b8f64 | ||
|
|
bbee246aae | ||
|
|
3da600ac30 | ||
|
|
0d48ba9245 | ||
|
|
1993b9f68f | ||
|
|
bb3de8fa5e | ||
|
|
b3763a917a |
275
README.md
275
README.md
@@ -7,7 +7,7 @@ A collection of language packs for Vim.
|
||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->590<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->598<!--/Package Count--> packages it consists of.
|
||||
- It is more secure because scripts loaded for all extensions are generated by vim-polyglot (ftdetect).
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
@@ -44,160 +44,159 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
On top of all language packs from [vim repository](https://github.com/vim/vim/tree/master/runtime), vim-polyglot includes:
|
||||
|
||||
<!--Language Packs-->
|
||||
- [acpiasl](https://github.com/martinlroth/vim-acpi-asl)
|
||||
- [acpiasl](https://github.com/martinlroth/vim-acpi-asl) (Syntax highlighting for asl and dsl files)
|
||||
- [ansible](https://github.com/pearofducks/ansible-vim)
|
||||
- [apiblueprint](https://github.com/kylef/apiblueprint.vim)
|
||||
- [applescript](https://github.com/mityu/vim-applescript)
|
||||
- [arduino](https://github.com/sudar/vim-arduino-syntax)
|
||||
- [asciidoc](https://github.com/asciidoc/vim-asciidoc)
|
||||
- [autohotkey](https://github.com/hnamikaw/vim-autohotkey)
|
||||
- [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)
|
||||
- [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 17 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)
|
||||
- [clojure](https://github.com/guns/vim-clojure-static) (Clojure syntax highlighting for clj, boot, cl2, cljc, cljs, cljs.hl, cljscm, cljx, hic and edn 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, litcoffee and coffee.md files)
|
||||
- [cpp-modern](https://github.com/bfrg/vim-cpp-modern)
|
||||
- [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)
|
||||
- [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)
|
||||
- [fsharp](https://github.com/ionide/Ionide-vim)
|
||||
- [gdscript](https://github.com/calviken/vim-gdscript3)
|
||||
- [git](https://github.com/tpope/vim-git)
|
||||
- [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 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/georgewitteman/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)
|
||||
- [gdscript](https://github.com/calviken/vim-gdscript3) (GDScript syntax highlighting for gd files)
|
||||
- [git](https://github.com/tpope/vim-git) (Git Config syntax highlighting for gitconfig files)
|
||||
- [gitignore](https://github.com/fszymanski/fzf-gitignore)
|
||||
- [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)
|
||||
- [glsl](https://github.com/tikhomirov/vim-glsl) (GLSL syntax highlighting for glsl, fp, frag, frg, fs and 16 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)
|
||||
- [haml](https://github.com/tpope/vim-haml)
|
||||
- [handlebars](https://github.com/mustache/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/yaymukund/vim-haxe) (Haxe syntax highlighting for hx and hxsl files)
|
||||
- [hcl](https://github.com/b4b4r07/vim-hcl) (HCL syntax highlighting for hcl, nomad and workflow files)
|
||||
- [helm](https://github.com/towolf/vim-helm)
|
||||
- [help](https://github.com/neovim/neovim/tree/master/runtime)
|
||||
- [hive](https://github.com/zebradil/hive.vim)
|
||||
- [hive](https://github.com/zebradil/hive.vim) (HiveQL syntax highlighting for q, hql and ql files)
|
||||
- [html5](https://github.com/sheerun/html5.vim)
|
||||
- [i3](https://github.com/mboughaba/i3config.vim)
|
||||
- [icalendar](https://github.com/chutzpah/icalendar.vim)
|
||||
- [idris2](https://github.com/edwinb/idris2-vim)
|
||||
- [idris](https://github.com/idris-hackers/idris-vim)
|
||||
- [ion](https://github.com/vmchale/ion-vim)
|
||||
- [i3](https://github.com/mboughaba/i3config.vim) (Syntax highlighting for i3.config and i3config files)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [odin](https://github.com/Tetralux/odin.vim)
|
||||
- [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 17 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, avsc, geojson, gltf, har and 13 more 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 and jst files)
|
||||
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (JSX syntax highlighting for jsx files)
|
||||
- [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl 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) (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, markdown, mdown, mdwn, mkd, mkdn, mkdown, ronn and workbook 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)
|
||||
- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) (Meson syntax highlighting for wrap files)
|
||||
- [moonscript](https://github.com/leafo/moonscript-vim) (MoonScript syntax highlighting for moon 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)
|
||||
- [perl](https://github.com/vim-perl/vim-perl) (Perl syntax highlighting for pl, al, cgi, fcgi, perl and 12 more 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 25 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 7 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/tomlion/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/evanleck/vim-svelte/tree/main) (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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [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)
|
||||
- [toml](https://github.com/cespare/vim-toml) (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 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, axml and 93 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)
|
||||
- [zig](https://github.com/ziglang/zig.vim)
|
||||
- [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/zinit-zsh/zplugin-vim-syntax)
|
||||
<!--/Language Packs-->
|
||||
|
||||
|
||||
13
after/ftplugin/html.vim
Normal file
13
after/ftplugin/html.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
|
||||
" Maintainer: othree <othree@gmail.com>
|
||||
" URL: http://github.com/othree/html5.vim
|
||||
" Last Change: 2014-05-02
|
||||
" License: MIT
|
||||
" Changes: Add - to keyword
|
||||
|
||||
" setlocal iskeyword+=-
|
||||
|
||||
setlocal commentstring=<!--%s-->
|
||||
|
||||
endif
|
||||
1064
after/indent/html.vim
Normal file
1064
after/indent/html.vim
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
|
||||
" http://www.vim.org/scripts/script.php?script_id=3064
|
||||
" Maintainer: bfrg <bfrg@users.noreply.github.com>
|
||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||
" Last Change: Oct 4, 2020
|
||||
" Last Change: Oct 17, 2020
|
||||
"
|
||||
" Extended C syntax highlighting including highlighting of user-defined
|
||||
" functions.
|
||||
@@ -28,6 +28,21 @@ if !get(g:, 'cpp_no_function_highlight', 0)
|
||||
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
|
||||
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
|
||||
|
||||
@@ -6,13 +6,20 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cpp-modern') ==
|
||||
" Original Author: Jon Haggblad <https://github.com/octol>
|
||||
" Maintainer: bfrg <https://github.com/bfrg>
|
||||
" Website: https://github.com/bfrg/vim-cpp-modern
|
||||
" Last Change: Oct 4, 2020
|
||||
" Last Change: Oct 8, 2020
|
||||
"
|
||||
" This syntax file is based on:
|
||||
" https://github.com/octol/vim-cpp-enhanced-highlight
|
||||
" http://www.vim.org/scripts/script.php?script_id=4293
|
||||
" ==============================================================================
|
||||
|
||||
" C++ attributes {{{1
|
||||
if get(g:, 'cpp_attributes_highlight', 0)
|
||||
syntax region cppAttribute matchgroup=cppAttributeBrackets start='\[\[' end=']]' contains=cString
|
||||
hi def link cppAttribute Macro
|
||||
hi def link cppAttributeBrackets Identifier
|
||||
endif
|
||||
|
||||
|
||||
" Standard library {{{1
|
||||
syntax keyword cppSTLdefine
|
||||
\ MB_CUR_MAX MB_LEN_MAX WCHAR_MAX WCHAR_MIN WEOF __STDC_UTF_16__ __STDC_UTF_32__
|
||||
|
||||
@@ -2,11 +2,195 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: HTML (version 5.1)
|
||||
" Last Change: 2017 Feb 15
|
||||
" SVG (SVG 1.1 Second Edition)
|
||||
" MathML (MathML 3.0 Second Edition)
|
||||
" Last Change: 2017 Mar 07
|
||||
" License: Public domain
|
||||
" (but let me know if you like :) )
|
||||
"
|
||||
" Note: This file just add new tags from HTML 5
|
||||
" and don't replace default html.vim syntax file
|
||||
"
|
||||
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
|
||||
" Changes: update to Draft 2016 Jan 13
|
||||
" add microdata Attributes
|
||||
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
|
||||
" URL: http://rm.blog.br/vim/syntax/html.vim
|
||||
" Modified: htdebeer <H.T.de.Beer@gmail.com>
|
||||
" Changes: add common SVG elements and attributes for inline SVG
|
||||
|
||||
" Patch 7.4.1142
|
||||
if has("patch-7.4-1142")
|
||||
if has("win32")
|
||||
syn iskeyword @,48-57,_,128-167,224-235,-
|
||||
else
|
||||
syn iskeyword @,48-57,_,192-255,-
|
||||
endif
|
||||
endif
|
||||
|
||||
" HTML 5 tags
|
||||
syn keyword htmlTagName contained article aside audio canvas command
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||
syn keyword htmlTagName contained template content shadow slot
|
||||
syn keyword htmlTagName contained wbr bdi
|
||||
syn keyword htmlTagName contained picture
|
||||
|
||||
" SVG tags
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" as found in http://www.w3.org/TR/SVG/eltindex.html
|
||||
syn keyword htmlTagName contained svg
|
||||
syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem
|
||||
syn keyword htmlTagName contained animate animateColor animateMotion animateTransform
|
||||
syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
|
||||
syn keyword htmlTagName contained clipPath color-profile cursor
|
||||
syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
|
||||
syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence
|
||||
syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri
|
||||
syn keyword htmlTagName contained glyph glyphRef hkern
|
||||
syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
|
||||
syn keyword htmlTagName contained missing-glyph mpath
|
||||
syn keyword htmlTagName contained text textPath tref tspan vkern
|
||||
syn keyword htmlTagName contained metadata title
|
||||
|
||||
" MathML tags
|
||||
" https://www.w3.org/TR/MathML3/appendixi.html#index.elem
|
||||
syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth
|
||||
syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind
|
||||
syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes
|
||||
syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch
|
||||
syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication
|
||||
syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false
|
||||
syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary
|
||||
syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda
|
||||
syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt
|
||||
syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose
|
||||
syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv
|
||||
syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts
|
||||
syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow
|
||||
syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder
|
||||
syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or
|
||||
syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product
|
||||
syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev
|
||||
syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh
|
||||
syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union
|
||||
syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
|
||||
|
||||
" Custom Element
|
||||
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
|
||||
syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>"
|
||||
|
||||
" HTML 5 arguments
|
||||
" Core Attributes
|
||||
syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
|
||||
syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate
|
||||
" Event-handler Attributes
|
||||
syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
|
||||
syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
|
||||
syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
|
||||
syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
|
||||
syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
|
||||
syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
|
||||
syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
|
||||
syn keyword htmlArg contained onvolumechange onwaiting
|
||||
" XML Attributes
|
||||
syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
|
||||
" new features
|
||||
" <body>
|
||||
syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
|
||||
syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
|
||||
" <video>, <audio>, <source>, <track>
|
||||
syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track playsinline
|
||||
" <form>, <input>, <button>
|
||||
syn keyword htmlArg contained form autocomplete autofocus list min max step
|
||||
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
|
||||
syn keyword htmlArg contained required placeholder pattern
|
||||
" <command>, <details>, <time>
|
||||
syn keyword htmlArg contained label icon open datetime-local pubdate
|
||||
" <script>
|
||||
syn keyword htmlArg contained async
|
||||
" <content>
|
||||
syn keyword htmlArg contained select
|
||||
" <iframe>
|
||||
syn keyword htmlArg contained seamless srcdoc sandbox allowfullscreen allowusermedia allowpaymentrequest allowpresentation
|
||||
" <picture>
|
||||
syn keyword htmlArg contained srcset sizes
|
||||
" <a>
|
||||
syn keyword htmlArg contained download media
|
||||
" <script>, <style>
|
||||
syn keyword htmlArg contained nonce
|
||||
" <area>, <a>, <img>, <iframe>, <link>
|
||||
syn keyword htmlArg contained referrerpolicy
|
||||
" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
|
||||
syn keyword htmlArg contained integrity crossorigin
|
||||
" <link>
|
||||
syn keyword htmlArg contained prefetch
|
||||
" syn keyword htmlArg contained preload
|
||||
" <img>
|
||||
syn keyword htmlArg contained decoding
|
||||
" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||
syn keyword htmlArg contained onselectstart onselectionchange
|
||||
" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
||||
syn keyword htmlArg contained loading
|
||||
|
||||
" Custom Data Attributes
|
||||
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes
|
||||
syn match htmlArg "\<data[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Vendor Extension Attributes
|
||||
" http://w3c.github.io/html/single-page.html#conformance-requirements-extensibility
|
||||
syn match htmlArg "\<x[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Microdata
|
||||
" http://dev.w3.org/html5/md/
|
||||
syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
|
||||
|
||||
" SVG
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" Some common attributes from http://www.w3.org/TR/SVG/attindex.html
|
||||
syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth
|
||||
syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by
|
||||
syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy
|
||||
syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy
|
||||
syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired
|
||||
syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy
|
||||
syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits
|
||||
syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-x horiz-origin-y
|
||||
syn keyword htmlArg contained id ideographic in in2 intercept
|
||||
syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes
|
||||
syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local
|
||||
syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name
|
||||
syn keyword htmlArg contained numOctaves
|
||||
syn keyword htmlArg contained offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness
|
||||
syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits
|
||||
syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry
|
||||
syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage
|
||||
syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type
|
||||
syn keyword htmlArg contained u1 u2 underline-position underline-thickness unicode unicode-range units-per-em
|
||||
syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget
|
||||
syn keyword htmlArg contained width widths
|
||||
syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space
|
||||
syn keyword htmlArg contained y y1 y2 yChannelSelector
|
||||
syn keyword htmlArg contained z zoomAndPan
|
||||
syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode
|
||||
|
||||
" MathML attributes
|
||||
" https://www.w3.org/TR/MathML3/chapter2.html#interf.toplevel.atts
|
||||
syn keyword htmlArg contained accent accentunder actiontype align alignmentscope altimg altimg-height altimg-valign altimg-width alttext
|
||||
syn keyword htmlArg contained annotation-xml background base baseline bevelled cd cdgroup charalign charspacing close
|
||||
syn keyword htmlArg contained closure color columnalign columnalignment columnlines columnspacing columnspan columnwidth crossout decimalpoint
|
||||
syn keyword htmlArg contained definitionURL denomalign depth display displaystyle edge encoding equalcolumns equalrows fence
|
||||
syn keyword htmlArg contained fontfamily fontsize fontstyle fontweight form frame framespacing groupalign height indentalign
|
||||
syn keyword htmlArg contained indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget index infixlinebreakstyle integer largeop
|
||||
syn keyword htmlArg contained leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote
|
||||
syn keyword htmlArg contained lspace ltr macros math mathbackground mathcolor mathsize mathvariant maxsize maxwidth
|
||||
syn keyword htmlArg contained mediummathspace menclose minlabelspacing minsize mode movablelimits msgroup mslinethickness name nargs
|
||||
syn keyword htmlArg contained newline notation numalign number occurrence open order other overflow position
|
||||
syn keyword htmlArg contained rightoverhang role rowalign rowlines rowspacing rowspan rquote rspace schemaLocation scope
|
||||
syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemultiplier selection separator separators shift side stackalign
|
||||
syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace
|
||||
syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref
|
||||
|
||||
" Comment
|
||||
" https://github.com/w3c/html/issues/694
|
||||
|
||||
@@ -330,7 +330,7 @@ function! s:download(branch)
|
||||
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 . '"'
|
||||
\ '"https://github.com/fsharp/FsAutoComplete/releases/latest/download/fsautocomplete.netcore.zip"'
|
||||
\ )
|
||||
if v:shell_error == 0
|
||||
call system('unzip -o -d ' . s:script_root_dir . "/fsac " . zip)
|
||||
|
||||
@@ -266,15 +266,25 @@ function! go#config#SetTemplateAutocreate(value) abort
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterCommand() abort
|
||||
return get(g:, "go_metalinter_command", "golangci-lint")
|
||||
return get(g:, 'go_metalinter_command', 'golangci-lint')
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterAutosaveEnabled() abort
|
||||
return get(g:, "go_metalinter_autosave_enabled", ["govet", "golint"])
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
let l:default = ['govet', 'golint']
|
||||
endif
|
||||
|
||||
return get(g:, 'go_metalinter_autosave_enabled', l:default)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterEnabled() abort
|
||||
return get(g:, "go_metalinter_enabled", ["vet", "golint", "errcheck"])
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
let l:default = ['vet', 'golint', 'errcheck']
|
||||
endif
|
||||
|
||||
return get(g:, 'go_metalinter_enabled', l:default)
|
||||
endfunction
|
||||
|
||||
function! go#config#GolintBin() abort
|
||||
@@ -514,7 +524,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
|
||||
@@ -564,10 +574,21 @@ 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
|
||||
@@ -576,6 +597,21 @@ 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': '<F5>'},
|
||||
\ '(go-debug-print)': {'key': '<F6>'},
|
||||
\ '(go-debug-breakpoint)': {'key': '<F9>'},
|
||||
\ '(go-debug-next)': {'key': '<F10>'},
|
||||
\ '(go-debug-step)': {'key': '<F11>'},
|
||||
\ '(go-debug-halt)': {'key': '<F8>'},
|
||||
\ }
|
||||
|
||||
let l:user = deepcopy(get(g:, 'go_debug_mappings', {}))
|
||||
|
||||
return extend(l:user, l:default, 'keep')
|
||||
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
|
||||
|
||||
@@ -37,7 +37,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
|
||||
|
||||
@@ -238,7 +238,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
|
||||
|
||||
106
autoload/nim.vim
106
autoload/nim.vim
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
||||
let g:nim_log = []
|
||||
let s:plugin_path = escape(expand('<sfile>:p:h'), '\')
|
||||
|
||||
if !exists("g:nim_caas_enabled")
|
||||
if !exists('g:nim_caas_enabled')
|
||||
let g:nim_caas_enabled = 0
|
||||
endif
|
||||
|
||||
@@ -11,27 +11,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 = eval(substitute(raw_dumpdata, "\n", '', 'g'))
|
||||
|
||||
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 +37,7 @@ fun! nim#init()
|
||||
endif
|
||||
endf
|
||||
|
||||
fun! s:UpdateNimLog()
|
||||
fun! s:UpdateNimLog() abort
|
||||
setlocal buftype=nofile
|
||||
setlocal bufhidden=hide
|
||||
setlocal noswapfile
|
||||
@@ -56,32 +54,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 +106,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 +152,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 +168,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 +180,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,52 +188,52 @@ 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)
|
||||
exe printf('e +%d %s', line, file)
|
||||
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'})
|
||||
|
||||
@@ -4,7 +4,10 @@ set cpo&vim
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
func! polyglot#detect#Inp()
|
||||
func! polyglot#detect#Inp(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^\*'
|
||||
set ft=abaqus | return
|
||||
@@ -17,14 +20,20 @@ func! polyglot#detect#Inp()
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Asa()
|
||||
func! polyglot#detect#Asa(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_asa")
|
||||
let &ft = g:filetype_asa | return
|
||||
endif
|
||||
set ft=aspvbs | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Asp()
|
||||
func! polyglot#detect#Asp(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
if exists("g:filetype_asp")
|
||||
let &ft = g:filetype_asp | return
|
||||
endif
|
||||
@@ -37,7 +46,10 @@ func! polyglot#detect#Asp()
|
||||
set ft=aspvbs | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#H()
|
||||
func! polyglot#detect#H(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 200]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)'
|
||||
@@ -56,7 +68,10 @@ func! polyglot#detect#H()
|
||||
set ft=cpp | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#M()
|
||||
func! polyglot#detect#M(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let saw_comment = 0
|
||||
for lnum in range(1, min([line("$"), 100]))
|
||||
let line = getline(lnum)
|
||||
@@ -85,7 +100,10 @@ func! polyglot#detect#M()
|
||||
set ft=octave | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Fs()
|
||||
func! polyglot#detect#Fs(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\(: \|new-device\)'
|
||||
@@ -104,7 +122,10 @@ func! polyglot#detect#Fs()
|
||||
set ft=forth | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Re()
|
||||
func! polyglot#detect#Re(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*#\%(\%(if\|ifdef\|define\|pragma\)\s\+\w\|\s*include\s\+[<"]\|template\s*<\)'
|
||||
@@ -114,7 +135,10 @@ func! polyglot#detect#Re()
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Idr()
|
||||
func! polyglot#detect#Idr(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\s*--.*[Ii]dris \=1'
|
||||
@@ -148,7 +172,10 @@ func! polyglot#detect#Idr()
|
||||
set ft=idris2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Lidr()
|
||||
func! polyglot#detect#Lidr(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 200]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^>\s*--.*[Ii]dris \=1'
|
||||
@@ -158,7 +185,10 @@ func! polyglot#detect#Lidr()
|
||||
set ft=lidris2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Bas()
|
||||
func! polyglot#detect#Bas(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
|
||||
@@ -168,7 +198,10 @@ func! polyglot#detect#Bas()
|
||||
set ft=basic | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Pm()
|
||||
func! polyglot#detect#Pm(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# 'XPM2'
|
||||
set ft=xpm2 | return
|
||||
@@ -192,7 +225,10 @@ func! polyglot#detect#Pm()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Pl()
|
||||
func! polyglot#detect#Pl(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^[^#]*:-' || line =~# '^\s*\%(%\|/\*\)' || line =~# '\.\s*$'
|
||||
set ft=prolog | return
|
||||
@@ -213,7 +249,10 @@ func! polyglot#detect#Pl()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#T()
|
||||
func! polyglot#detect#T(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 5]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '^\.'
|
||||
@@ -236,7 +275,10 @@ func! polyglot#detect#T()
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Tt2()
|
||||
func! polyglot#detect#Tt2(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 3]))
|
||||
let line = getline(lnum)
|
||||
if line =~? '<\%(!DOCTYPE HTML\|[%?]\|html\)'
|
||||
@@ -246,14 +288,17 @@ func! polyglot#detect#Tt2()
|
||||
set ft=tt2 | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Html()
|
||||
func! polyglot#detect#Html(...)
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~# '^\(%\|<[%&].*>\)'
|
||||
set ft=mason | return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 50]))
|
||||
let line = getline(lnum)
|
||||
if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\)\(\<\|\>\)\|{#\s\+'
|
||||
if line =~# '{%-\=\s*\(end.*\|extends\|block\|macro\|set\|if\|for\|include\|trans\|load\)\(\<\|\>\)\|{#\s\+'
|
||||
set ft=htmldjango | return
|
||||
endif
|
||||
if line =~# '\(\<\|\>\)DTD\s\+XHTML\s'
|
||||
|
||||
@@ -513,7 +513,6 @@ let s:interpreters = {
|
||||
\ 'pdksh': 'sh',
|
||||
\ 'rc': 'sh',
|
||||
\ 'sh': 'sh',
|
||||
\ 'zsh': 'sh',
|
||||
\ 'boolector': 'smt2',
|
||||
\ 'cvc4': 'smt2',
|
||||
\ 'mathsat5': 'smt2',
|
||||
@@ -526,6 +525,7 @@ let s:interpreters = {
|
||||
\ 'z3': 'smt2',
|
||||
\ 'deno': 'typescript',
|
||||
\ 'ts-node': 'typescript',
|
||||
\ 'zsh': 'zsh',
|
||||
\ }
|
||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
" 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',
|
||||
\ 'Dockerfile': '*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*',
|
||||
\ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',
|
||||
\ 'a2ps': 'a2psrc,.a2psrc',
|
||||
\ 'a65': '*.a65',
|
||||
@@ -35,7 +40,7 @@ let s:globs = {
|
||||
\ 'atlas': '*.atl,*.as',
|
||||
\ 'autohotkey': '*.ahk,*.ahkl',
|
||||
\ 'autoit': '*.au3',
|
||||
\ 'automake': '*.mak,*.dsp,*.mk,Makefile.am,makefile.am,GNUmakefile.am',
|
||||
\ 'automake': '[mM]akefile.am,GNUmakefile.am',
|
||||
\ 'ave': '*.ave',
|
||||
\ 'awk': '*.awk,*.gawk',
|
||||
\ 'b': '*.mch,*.ref,*.imp',
|
||||
@@ -80,6 +85,7 @@ let s:globs = {
|
||||
\ '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,*.tcc,*.tpp,*.moc,*.tlh',
|
||||
\ 'cql': '*.cql',
|
||||
\ 'crm': '*.crm',
|
||||
@@ -122,6 +128,7 @@ let s:globs = {
|
||||
\ '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,buildozer.spec,.editorconfig,.npmrc,php.ini-*',
|
||||
\ 'dot': '*.dot,*.gv',
|
||||
@@ -203,7 +210,7 @@ let s:globs = {
|
||||
\ 'gtkrc': '.gtkrc,gtkrc,.gtkrc*,gtkrc*',
|
||||
\ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars',
|
||||
\ 'hamster': '*.hsc,*.hsm',
|
||||
\ 'haproxy': '*.cfg,haproxy.cfg,haproxy*.conf*',
|
||||
\ 'haproxy': 'haproxy*.conf*,haproxy*.cfg*',
|
||||
\ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig',
|
||||
\ 'haste': '*.ht',
|
||||
\ 'hastepreproc': '*.htpp',
|
||||
@@ -305,8 +312,10 @@ let s:globs = {
|
||||
\ 'mail': '*.eml,snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,{neo,}mutt[[:alnum:]._-]\\\{6\},reportbug-*',
|
||||
\ 'mailaliases': '',
|
||||
\ 'mailcap': '.mailcap,mailcap',
|
||||
\ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',
|
||||
\ 'mako': '*.mako,*.mao',
|
||||
\ 'mallard': '*.page',
|
||||
\ 'man': '*.1,*.1in,*.1m,*.1x,*.2,*.3,*.3in,*.3m,*.3p,*.3pm,*.3qt,*.3x,*.4,*.5,*.6,*.7,*.8,*.9,*.man,*.mdoc',
|
||||
\ 'manconf': 'man.config',
|
||||
\ 'map': '*.map',
|
||||
\ 'maple': '*.mv,*.mpl,*.mws',
|
||||
@@ -374,7 +383,7 @@ let s:globs = {
|
||||
\ 'pamconf': '',
|
||||
\ 'pamenv': 'pam_env.conf,.pam_environment',
|
||||
\ 'papp': '*.papp,*.pxml,*.pxsl',
|
||||
\ 'pascal': '*.pas,*.dpr',
|
||||
\ 'pascal': '*.pas,*.pp,*.dpr,*.lpr',
|
||||
\ 'passwd': '',
|
||||
\ 'pccts': '*.g',
|
||||
\ 'pcmk': '*.pcmk',
|
||||
@@ -382,7 +391,7 @@ let s:globs = {
|
||||
\ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,.gitolite.rc',
|
||||
\ 'pf': 'pf.conf',
|
||||
\ 'pfmain': 'main.cf',
|
||||
\ 'php': '*.php,*.aw,*.ctp,*.fcgi,*.inc,*.php3,*.php4,*.php5,*.phps,*.phpt,*.phtml,.php,.php_cs,.php_cs.dist,Phakefile',
|
||||
\ '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',
|
||||
@@ -449,13 +458,13 @@ let s:globs = {
|
||||
\ 'rrst': '*.rrst,*.srst',
|
||||
\ 'rst': '*.rst,*.rest,*.rest.txt,*.rst.txt',
|
||||
\ 'rtf': '*.rtf',
|
||||
\ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.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,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb',
|
||||
\ 'ruby': '*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.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,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,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.scala': '*.sbt',
|
||||
\ 'sbt': '*.sbt',
|
||||
\ 'scala': '*.scala,*.kojo,*.sc',
|
||||
\ 'scheme': '*.scm,*.ss,*.rkt',
|
||||
\ 'scilab': '*.sci,*.sce',
|
||||
@@ -469,7 +478,7 @@ let s:globs = {
|
||||
\ 'services': '',
|
||||
\ 'setserial': '',
|
||||
\ 'sexplib': '*.sexp',
|
||||
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc',
|
||||
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile',
|
||||
\ 'sieve': '*.siv,*.sieve',
|
||||
\ 'sil': '*.sil',
|
||||
\ 'simula': '*.sim',
|
||||
@@ -536,7 +545,7 @@ let s:globs = {
|
||||
\ 'textile': '*.textile',
|
||||
\ 'tf': '*.tf,.tfrc,tfrc',
|
||||
\ 'thrift': '*.thrift',
|
||||
\ 'tidy': '.tidyrc,tidyrc',
|
||||
\ 'tidy': '.tidyrc,tidyrc,tidy.conf',
|
||||
\ 'tilde': '*.t.html',
|
||||
\ 'tli': '*.tli',
|
||||
\ 'tmux': '.tmux*.conf',
|
||||
@@ -594,12 +603,15 @@ let s:globs = {
|
||||
\ 'wvdial': 'wvdial.conf,.wvdialrc',
|
||||
\ 'xdc': '*.xdc',
|
||||
\ 'xdefaults': '*.ad,.Xdefaults,.Xpdefaults,.Xresources,xdm-config,Xresources*',
|
||||
\ 'xf86conf': 'XF86Config-4*,XF86Config*,xorg.conf,xorg.conf-4',
|
||||
\ 'xhtml': '*.xhtml,*.xht',
|
||||
\ 'xinetd': '',
|
||||
\ 'xmath': '*.msc,*.msf',
|
||||
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.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,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.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,*.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',
|
||||
@@ -618,6 +630,13 @@ let s:globs = {
|
||||
\ '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
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
||||
|
||||
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 <args>
|
||||
endif
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ julia#function_assign2block()
|
||||
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.:
|
||||
>
|
||||
@@ -386,6 +386,91 @@ g:julia_highlight_operators
|
||||
Determines whether to apply syntax highlighting to operators.
|
||||
Default: on (set to `1`).
|
||||
|
||||
*g:julia_indent_align_import*
|
||||
g:julia_indent_align_import
|
||||
|
||||
In a multi-line import/using/export statment, the lines after
|
||||
the first one use some special alignment rules by default,
|
||||
e.g.:
|
||||
>
|
||||
import X: one,
|
||||
two,
|
||||
three
|
||||
export four,
|
||||
five,
|
||||
six
|
||||
<
|
||||
When `g:julia_indent_align_import` is `0` instead, the usual
|
||||
indentation is used:
|
||||
>
|
||||
import X: one,
|
||||
two,
|
||||
three
|
||||
export four,
|
||||
five,
|
||||
six
|
||||
|
||||
*g:julia_indent_align_brackets*
|
||||
g:julia_indent_align_brackets
|
||||
|
||||
In a multi-line bracketed expression (except for function
|
||||
arguments, see |g:julia_indent_align_funcargs|), the lines
|
||||
after the first one use some special alignment rules by
|
||||
default, e.g.:
|
||||
>
|
||||
matrix = [1 2 3;
|
||||
4 5 6]
|
||||
tpl = (
|
||||
abc = Dict(a=>1,
|
||||
b=>2),
|
||||
def = [1 2;
|
||||
3 4],
|
||||
xyz = SubArray{eltype(P),
|
||||
N, P, I,
|
||||
false}
|
||||
)
|
||||
<
|
||||
When `g:julia_indent_align_brackets` is `0` instead, an extra
|
||||
indent is used:
|
||||
>
|
||||
matrix = [1 2 3;
|
||||
4 5 6]
|
||||
tpl = (
|
||||
abc = Dict(a=>1,
|
||||
b=>2),
|
||||
def = [1 2;
|
||||
3 4],
|
||||
xyz = SubArray{eltype(P),
|
||||
N, P, I,
|
||||
false}
|
||||
)
|
||||
<
|
||||
|
||||
*g:julia_indent_align_funcargs*
|
||||
g:julia_indent_align_funcargs
|
||||
|
||||
In a function definition, when the arguments span multiple
|
||||
lines, the lines after the first one get an extra indentation
|
||||
step by default, e.g.:
|
||||
>
|
||||
function functionanme(
|
||||
arg1, arg2,
|
||||
arg3, arg4
|
||||
)
|
||||
# function body
|
||||
end
|
||||
<
|
||||
By setting `g:julia_indent_align_funcargs` to `1`, the
|
||||
arguments are aligned to the bracket instead (they work as any
|
||||
other bracket with the default value of
|
||||
|g:julia_indent_align_brackets|):
|
||||
>
|
||||
function functionanme(arg1, arg2,
|
||||
arg3, arg4
|
||||
)
|
||||
# function body
|
||||
end
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
ABOUT *julia-vim-about*
|
||||
|
||||
116
doc/vim-go.txt
116
doc/vim-go.txt
@@ -1498,9 +1498,9 @@ other packages. Valid options are `gopls` and `guru`. By default it's `gopls`.
|
||||
|
||||
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`.
|
||||
Valid options are `gopls` and `guru`. By default it's `gopls`.
|
||||
>
|
||||
let g:go_implements_mode = 'guru'
|
||||
let g:go_implements_mode = 'gopls'
|
||||
<
|
||||
*'g:go_def_mapping_enabled'*
|
||||
|
||||
@@ -1625,27 +1625,45 @@ window. The list to use can be set using |'g:go_list_type_commands'|.
|
||||
<
|
||||
*'g:go_metalinter_autosave_enabled'*
|
||||
|
||||
Specifies the enabled linters for auto |:GoMetaLinter| on save. By
|
||||
default it's using `vet` and `golint`. If any are enabled, `--disable-all`
|
||||
will be sent to the metalinter.
|
||||
Specifies the enabled linters for auto |:GoMetaLinter| on save. When the
|
||||
metalinter is `golangci-lint`, if any are enabled, `--disable-all` will be
|
||||
sent to the metalinter.
|
||||
|
||||
When `g:go_metalinter_command` is set to `staticcheck`, the default value is
|
||||
an empty list; `staticcheck`'s `-checks` flag will not be used.
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['all']
|
||||
<
|
||||
|
||||
When `g:go_metalinter_command is set to `golangci-lint'`, the default value is
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['vet', 'golint']
|
||||
<
|
||||
*'g:go_metalinter_enabled'*
|
||||
|
||||
Specifies the linters to enable for the |:GoMetaLinter| command. By default
|
||||
it's using `vet`, `golint` and `errcheck`. If any are enabled, `--disable-all`
|
||||
will be sent to the metalinter.
|
||||
Specifies the linters to enable for the |:GoMetaLinter| command. For
|
||||
`golangci-lint`, if any are enabled, `--disable-all` will be passed to the
|
||||
metalinter.
|
||||
|
||||
When `g:go_metalinter_command` is set to `staticcheck`, the default value is
|
||||
an empty list; `staticcheck`'s `-checks` flag will not be used.
|
||||
>
|
||||
let g:go_metalinter_autosave_enabled = ['all']
|
||||
<
|
||||
|
||||
When `g:go_metalinter_command is set to `golangci-lint'`, the default value is
|
||||
>
|
||||
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck']
|
||||
<
|
||||
*'g:go_metalinter_command'*
|
||||
|
||||
Overrides the command to be executed when |:GoMetaLinter| is called. By
|
||||
default it's `golangci-lint`. Valid options are `golangci-lint` and `gopls`.
|
||||
default it's `golangci-lint`. Valid options are `golangci-lint, `gopls`, and
|
||||
`staticcheck`..
|
||||
|
||||
When the value is `gopls`, users may want to consider setting
|
||||
`g:go_gopls_staticcheck`. It can also be used as an advanced setting for
|
||||
users who want to have more control over the metalinter.
|
||||
`g:go_gopls_staticcheck`. It can also be used as an advanced setting for users
|
||||
who want to have more control over the metalinter.
|
||||
>
|
||||
let g:go_metalinter_command = "golangci-lint"
|
||||
<
|
||||
@@ -1653,6 +1671,8 @@ users who want to have more control over the metalinter.
|
||||
|
||||
Overrides the maximum time the linters have to complete. By default it's 5
|
||||
seconds.
|
||||
|
||||
Only applies when the metalinter is `golangci-lint`.
|
||||
>
|
||||
let g:go_metalinter_deadline = "5s"
|
||||
<
|
||||
@@ -1882,8 +1902,12 @@ When it is `v:null`, `gopls`' default will be used. By default it is `v:null`.
|
||||
|
||||
*'g:go_gopls_local'*
|
||||
|
||||
Specifies the prefix for imports that `gopls` should consider group
|
||||
separately.
|
||||
Specifies the prefix for imports that `gopls` should group separately.
|
||||
|
||||
The value can either be a string or a dictionary. When it is a string, all
|
||||
workspaces will use the same value. When it is a dictionary, the key should be
|
||||
the absolute path of the workspace and the value is the prefix to use for
|
||||
local imports within that workspace.
|
||||
|
||||
When it is `v:null`, `gopls`' default will be used. By default it is `v:null`.
|
||||
>
|
||||
@@ -1913,14 +1937,21 @@ default it is `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.
|
||||
Deprecated. See `'g:go_diagnostics_level'`. 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_diagnostics_level'*
|
||||
|
||||
Specifies the `gopls` diagnostics level. Valid values are 0, 1, and 2. 0
|
||||
ignores `gopls` diagnostics, 1 is for errors only, and 2 is for errors and
|
||||
warnings. By default it is 0.
|
||||
>
|
||||
let g:go_diagnostics_level = 0
|
||||
<
|
||||
|
||||
*'g:go_template_autocreate'*
|
||||
|
||||
@@ -2286,7 +2317,7 @@ The program will halt on the breakpoint, at which point you can inspect the
|
||||
program state. You can go to the next line with |:GoDebugNext| (<F10>) or step
|
||||
in with |:GoDebugStep| (<F11>).
|
||||
|
||||
The program can also be halted with `:GoDebugHalt` (<F6>).
|
||||
The program can also be halted with `:GoDebugHalt` (<F8>).
|
||||
|
||||
The variable window in the bottom left (`GODEBUG_VARIABLES`) will display all
|
||||
local variables. Struct values are displayed as `{...}`, array/slices as
|
||||
@@ -2362,7 +2393,7 @@ The rest of the commands and mappings become available after executing
|
||||
|
||||
Halt the program.
|
||||
|
||||
Mapped to <F6> by default.
|
||||
Mapped to <F8> by default.
|
||||
|
||||
*:GoDebugStop*
|
||||
*(go-debug-stop)*
|
||||
@@ -2470,7 +2501,52 @@ Show only variables on the right-hand side: >
|
||||
let g:go_debug_windows = {
|
||||
\ 'vars': 'rightbelow 60vnew',
|
||||
\ }
|
||||
|
||||
*'g:go_debug_mappings'*
|
||||
|
||||
Contains custom key mapping information to customize the active mappings
|
||||
when debugging.
|
||||
|
||||
Only the customizations desired need to be provided; the debugger will use its
|
||||
default key mappings for any mapping not defined here.
|
||||
|
||||
This value should be a dictionary whose keys are the plugin mapping commands
|
||||
(e.g. `(go-debug-continue)`). The values are dictionaries with two keys.
|
||||
`key` and `attributes`.
|
||||
|
||||
`key` is expected to be the key to map (i.e. it's the `lhs` in a mapping).
|
||||
`key` can be empty or missing to prevent a key mapping from being applied for
|
||||
one the named mappings.
|
||||
|
||||
`arguments` is the string of `map-arguments` for the mapping (e.g.
|
||||
`<nowait>`).
|
||||
|
||||
The first item must be the `lhs` to use for the mapping. The optional
|
||||
second item is for `:map-arguments`. All mappings will always be `:map-local`,
|
||||
so there is never a need to include `"<buffer>"` in the the arguments.
|
||||
>
|
||||
let g:go_debug_mappings = {
|
||||
\ '(go-debug-continue)': {'key': 'c', 'arguments': '<nowait>'],
|
||||
\ '(go-debug-stop)': {'key': 'q'},
|
||||
\ '(go-debug-next)': {'key': 'n', 'arguments': '<nowait>'},
|
||||
\ '(go-debug-step)': {'key': 's'},
|
||||
\}
|
||||
<
|
||||
|
||||
Defaults are equivalent to:
|
||||
>
|
||||
let g:go_debug_mappings = {
|
||||
\ '(go-debug-continue)': {'key': '<F5>'},
|
||||
\ '(go-debug-print)': {'key': '<F6>'},
|
||||
\ '(go-debug-breakpoint)': {'key': '<F9>'},
|
||||
\ '(go-debug-next)': {'key': '<F10>'},
|
||||
\ '(go-debug-step)': {'key': '<F11>'},
|
||||
\ '(go-debug-halt)': {'key': '<F8>'},
|
||||
\ }
|
||||
<
|
||||
|
||||
Your user specified settings will be merged with the defaults.
|
||||
|
||||
*'g:go_debug_address'*
|
||||
|
||||
Server address `dlv` will listen on; must be in `hostname:port` format.
|
||||
|
||||
2257
extras/filetype.vim
Normal file
2257
extras/filetype.vim
Normal file
File diff suppressed because it is too large
Load Diff
1
filetype.vim
Normal file
1
filetype.vim
Normal file
@@ -0,0 +1 @@
|
||||
runtime! ftdetect/polyglot.vim
|
||||
File diff suppressed because it is too large
Load Diff
3
ftoff.vim
Normal file
3
ftoff.vim
Normal file
@@ -0,0 +1,3 @@
|
||||
if exists("did_load_polyglot")
|
||||
unlet did_load_polyglot
|
||||
endif
|
||||
@@ -1,37 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Enable automatic comment insertion
|
||||
setlocal formatoptions+=cro
|
||||
|
||||
function! DockerfileReplaceInstruction(original, replacement)
|
||||
let syn = synIDtrans(synID(line("."), col(".") - 1, 0))
|
||||
if syn != hlID("Comment") && syn != hlID("Constant") && strlen(getline(".")) == 0
|
||||
let word = a:replacement
|
||||
else
|
||||
let word = a:original
|
||||
endif
|
||||
let g:UnduBuffer = a:original
|
||||
return word
|
||||
endfunction
|
||||
|
||||
inoreabbr <silent> <buffer> from <C-R>=DockerfileReplaceInstruction("from", "FROM")<CR>
|
||||
inoreabbr <silent> <buffer> maintainer <C-R>=DockerfileReplaceInstruction("maintainer", "MAINTAINER")<CR>
|
||||
inoreabbr <silent> <buffer> run <C-R>=DockerfileReplaceInstruction("run", "RUN")<CR>
|
||||
inoreabbr <silent> <buffer> cmd <C-R>=DockerfileReplaceInstruction("cmd", "CMD")<CR>
|
||||
inoreabbr <silent> <buffer> label <C-R>=DockerfileReplaceInstruction("label", "LABEL")<CR>
|
||||
inoreabbr <silent> <buffer> expose <C-R>=DockerfileReplaceInstruction("expose", "EXPOSE")<CR>
|
||||
inoreabbr <silent> <buffer> env <C-R>=DockerfileReplaceInstruction("env", "ENV")<CR>
|
||||
inoreabbr <silent> <buffer> add <C-R>=DockerfileReplaceInstruction("add", "ADD")<CR>
|
||||
inoreabbr <silent> <buffer> copy <C-R>=DockerfileReplaceInstruction("copy", "COPY")<CR>
|
||||
inoreabbr <silent> <buffer> entrypoint <C-R>=DockerfileReplaceInstruction("entrypoint", "ENTRYPOINT")<CR>
|
||||
inoreabbr <silent> <buffer> volume <C-R>=DockerfileReplaceInstruction("volume", "VOLUME")<CR>
|
||||
inoreabbr <silent> <buffer> user <C-R>=DockerfileReplaceInstruction("user", "USER")<CR>
|
||||
inoreabbr <silent> <buffer> workdir <C-R>=DockerfileReplaceInstruction("workdir", "WORKDIR")<CR>
|
||||
inoreabbr <silent> <buffer> arg <C-R>=DockerfileReplaceInstruction("arg", "ARG")<CR>
|
||||
inoreabbr <silent> <buffer> onbuild <C-R>=DockerfileReplaceInstruction("onbuild", "ONBUILD")<CR>
|
||||
inoreabbr <silent> <buffer> stopsignal <C-R>=DockerfileReplaceInstruction("stopsignal", "STOPSIGNAL")<CR>
|
||||
|
||||
endif
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'docker-compose') == -1
|
||||
|
||||
" Define comment string
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
20
ftplugin/dockerfile.vim
Normal file
20
ftplugin/dockerfile.vim
Normal file
@@ -0,0 +1,20 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: Dockerfile
|
||||
" Maintainer: Honza Pokorny <http://honza.ca>
|
||||
" Last Change: 2014 Aug 29
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
endif
|
||||
@@ -5,6 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'falcon') == -1
|
||||
" Author: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Copyright: Copyright (c) 2009-2013 Steven Oliver
|
||||
" License: You may redistribute this under the same terms as Vim itself
|
||||
" Last Update: 2020 Oct 10
|
||||
" --------------------------------------------------------------------------
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
@@ -16,7 +17,7 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal softtabstop=4 shiftwidth=4 encoding=utf-8
|
||||
setlocal softtabstop=4 shiftwidth=4
|
||||
setlocal suffixesadd=.fal,.ftd
|
||||
|
||||
" Matchit support
|
||||
|
||||
@@ -2,14 +2,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1
|
||||
|
||||
" Vim settings file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||
" Version: 0.50
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v52) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben
|
||||
" Fritz, and David Barnett.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
|
||||
" and Doug Kearns.
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -121,7 +121,7 @@ if !exists("b:match_words")
|
||||
endif
|
||||
|
||||
" File filters for :browse e
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
@@ -1,13 +1,55 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Maintainer: othree <othree@gmail.com>
|
||||
" URL: http://github.com/othree/html5.vim
|
||||
" Last Change: 2014-05-02
|
||||
" License: MIT
|
||||
" Changes: Add - to keyword
|
||||
" Vim filetype plugin file
|
||||
" Language: html
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Changed: 20 Jan 2009
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
|
||||
" setlocal iskeyword+=-
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Make sure the continuation lines below do not cause problems in
|
||||
" compatibility mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal matchpairs+=<:>
|
||||
setlocal commentstring=<!--%s-->
|
||||
setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
|
||||
|
||||
if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
endif
|
||||
|
||||
if exists('&omnifunc')
|
||||
setlocal omnifunc=htmlcomplete#CompleteTags
|
||||
call htmlcomplete#DetectOmniFlavor()
|
||||
endif
|
||||
|
||||
" HTML: thanks to Johannes Zellner and Benji Fisher.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1
|
||||
let b:match_words = '<:>,' .
|
||||
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
|
||||
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
|
||||
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
endif
|
||||
|
||||
" Change the :browse e filter to primarily show HTML-related files.
|
||||
if has("gui_win32")
|
||||
let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
|
||||
\ "JavaScript Files (*.js)\t*.js\n" .
|
||||
\ "Cascading StyleSheets (*.css)\t*.css\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .
|
||||
\ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
|
||||
|
||||
" Restore the saved compatibility options.
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
endif
|
||||
|
||||
37
ftplugin/make.vim
Normal file
37
ftplugin/make.vim
Normal file
@@ -0,0 +1,37 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: Make
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Apr 02
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<"
|
||||
|
||||
" Make sure a hard tab is used, required for most make programs
|
||||
setlocal noexpandtab softtabstop=0
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
setlocal fo-=t fo+=croql
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
setlocal com=sO:#\ -,mO:#\ \ ,b:#
|
||||
|
||||
" Set 'commentstring' to put the marker after a #.
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
" Including files.
|
||||
let &l:include = '^\s*include'
|
||||
|
||||
" For matchit.vim, suggested by Albert Netymk and Ken Takata.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words = '^ *ifn\=\(eq\|def\)\>:^ *else\(\s\+ifn\=\(eq\|def\)\)\=\>:^ *endif\>,\<define\>:\<endef\>,^!\s*if\(n\=def\)\=\>:^!\s*else\(if\(n\=def\)\=\)\=\>:^!\s*endif\>'
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -524,7 +524,7 @@ endfunction
|
||||
"c. link this stuff with what the user wants
|
||||
" ie. get the expression selected/under the cursor
|
||||
|
||||
let s:ocaml_word_char = '\w|[<EFBFBD>-<2D>]|'''
|
||||
let s:ocaml_word_char = '\w|[\xc0-\xff]|'''
|
||||
|
||||
"In: the current mode (eg. "visual", "normal", etc.)
|
||||
"Out: the borders of the expression we are looking for the type
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: RPL/2
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" Last Change: 2012 Mar 07
|
||||
" Version: 0.1
|
||||
|
||||
|
||||
19
ftplugin/sbt.vim
Normal file
19
ftplugin/sbt.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" License: Same as Vim
|
||||
" Last Change: 2017.04.30
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if exists('b:did_ftplugin') || &cp
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
runtime! ftplugin/scala.vim
|
||||
|
||||
|
||||
endif
|
||||
109
ftplugin/vim.vim
109
ftplugin/vim.vim
@@ -1,109 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 14
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('*VimFtpluginUndo')
|
||||
func VimFtpluginUndo()
|
||||
setl fo< isk< com< tw< commentstring<
|
||||
if exists('b:did_add_maps')
|
||||
silent! nunmap <buffer> [[
|
||||
silent! vunmap <buffer> [[
|
||||
silent! nunmap <buffer> ]]
|
||||
silent! vunmap <buffer> ]]
|
||||
silent! nunmap <buffer> []
|
||||
silent! vunmap <buffer> []
|
||||
silent! nunmap <buffer> ][
|
||||
silent! vunmap <buffer> ][
|
||||
silent! nunmap <buffer> ]"
|
||||
silent! vunmap <buffer> ]"
|
||||
silent! nunmap <buffer> ["
|
||||
silent! vunmap <buffer> ["
|
||||
endif
|
||||
unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps
|
||||
endfunc
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "call VimFtpluginUndo()"
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
setlocal fo-=t fo+=croql
|
||||
|
||||
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a
|
||||
" keyword character. E.g., for netrw#Nread().
|
||||
setlocal isk+=#
|
||||
|
||||
" Use :help to lookup the keyword under the cursor with K.
|
||||
setlocal keywordprg=:help
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
" Avoid that #{} starts a comment.
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &tw == 0
|
||||
setlocal tw=78
|
||||
endif
|
||||
|
||||
" Comments start with a double quote; in Vim9 script # would also work
|
||||
setlocal commentstring=\"%s
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
let b:did_add_maps = 1
|
||||
|
||||
" Move around functions.
|
||||
nnoremap <silent><buffer> [[ m':call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ]] m':call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|def\)\>', "W")<CR>
|
||||
nnoremap <silent><buffer> [] m':call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ][ m':call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|def\)\>', "W")<CR>
|
||||
|
||||
" Move around comments
|
||||
nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
|
||||
vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
|
||||
nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
endif
|
||||
|
||||
" Let the matchit plugin know what items can be matched.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
" - set spl=de,en
|
||||
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
|
||||
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name")
|
||||
\ =~? "comment\\|string\\|vimSynReg\\|vimSet"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" removed this, because 'cpoptions' is a global option.
|
||||
" setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
endif
|
||||
23
ftplugin/xf86conf.vim
Normal file
23
ftplugin/xf86conf.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: XFree86 Configuration File
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
endif
|
||||
@@ -188,7 +188,7 @@ rules:
|
||||
filetype: mason
|
||||
- lines: 50
|
||||
rules:
|
||||
- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans)\b|{#\s+'
|
||||
- pattern: '{%-?\s*(end.*|extends|block|macro|set|if|for|include|trans|load)\b|{#\s+'
|
||||
filetype: htmldjango
|
||||
- pattern: '\bDTD\s+XHTML\s'
|
||||
filetype: xhtml
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
if exists('b:did_indent') | finish | endif
|
||||
let b:did_indent = 1
|
||||
|
||||
|
||||
function! DockerfileIndent(line)
|
||||
let prev_line = getline(a:line - 1)
|
||||
if a:line > 1 && prev_line =~ '\\\s*$'
|
||||
let i = indent(a:line - 1)
|
||||
if i == 0
|
||||
let i += &l:shiftwidth
|
||||
if &l:expandtab && prev_line =~# '^RUN\s'
|
||||
" Overindent past RUN
|
||||
let i = 4 + &l:shiftwidth
|
||||
endif
|
||||
endif
|
||||
return i
|
||||
endif
|
||||
|
||||
return -1
|
||||
endfunction
|
||||
|
||||
|
||||
set indentexpr=DockerfileIndent(v:lnum)
|
||||
|
||||
endif
|
||||
@@ -2,14 +2,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 47
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v48) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made, in chronological order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
|
||||
" and Louis Cochen.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -148,7 +148,7 @@ function FortranGetIndent(lnum)
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\s\+\(case\|type\)\>'
|
||||
if prevstat =~? '\<select\s*\(case\|type\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Vim indent script for HTML
|
||||
" Header: "{{{
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2017 Jun 13
|
||||
" Version: 1.0
|
||||
" Last Change: 2020 Jul 06
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
" Supports template systems through hooks.
|
||||
@@ -58,6 +57,9 @@ let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
"}}}
|
||||
|
||||
" Pattern to match the name of a tag, including custom elements.
|
||||
let s:tagname = '\w\+\(-\w\+\)*'
|
||||
|
||||
" Check and process settings from b:html_indent and g:html_indent... variables.
|
||||
" Prefer using buffer-local settings over global settings, so that there can
|
||||
" be defaults for all HTML files and exceptions for specific types of HTML
|
||||
@@ -216,25 +218,27 @@ endfunc "}}}
|
||||
" Self-closing tags and tags that are sometimes {{{
|
||||
" self-closing (e.g., <p>) are not here (when encountering </p> we can find
|
||||
" the matching <p>, but not the other way around).
|
||||
" Known self-closing tags: " 'p', 'img', 'source', 'area', 'keygen', 'track',
|
||||
" 'wbr'.
|
||||
" Old HTML tags:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big',
|
||||
\ 'blockquote', 'body', 'button', 'caption', 'center', 'cite', 'code',
|
||||
\ 'colgroup', 'del', 'dfn', 'dir', 'div', 'dl', 'em', 'fieldset', 'font',
|
||||
\ 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'font',
|
||||
\ 'form', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'html',
|
||||
\ 'i', 'iframe', 'ins', 'kbd', 'label', 'legend', 'li',
|
||||
\ 'map', 'menu', 'noframes', 'noscript', 'object', 'ol',
|
||||
\ 'optgroup', 'p', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub',
|
||||
\ 'optgroup', 'q', 's', 'samp', 'select', 'small', 'span', 'strong', 'sub',
|
||||
\ 'sup', 'table', 'textarea', 'title', 'tt', 'u', 'ul', 'var', 'th', 'td',
|
||||
\ 'tr', 'tbody', 'tfoot', 'thead'])
|
||||
|
||||
" New HTML5 elements:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
\ 'area', 'article', 'aside', 'audio', 'bdi', 'canvas',
|
||||
\ 'command', 'data', 'datalist', 'details', 'dislog', 'embed', 'figcaption',
|
||||
\ 'figure', 'footer', 'header', 'keygen', 'main', 'mark', 'meter', 'nav', 'output',
|
||||
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'source', 'summary', 'svg',
|
||||
\ 'time', 'track', 'video', 'wbr'])
|
||||
\ 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'data',
|
||||
\ 'datalist', 'details', 'dialog', 'embed', 'figcaption', 'figure',
|
||||
\ 'footer', 'header', 'hgroup', 'main', 'mark', 'meter', 'nav', 'output',
|
||||
\ 'picture', 'progress', 'rp', 'rt', 'ruby', 'section', 'summary',
|
||||
\ 'svg', 'time', 'video'])
|
||||
|
||||
" Tags added for web components:
|
||||
call s:AddITags(s:indent_tags, [
|
||||
@@ -282,7 +286,7 @@ func! s:CountITags(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
let s:block = 0 " assume starting outside of a block
|
||||
let s:countonly = 1 " don't change state
|
||||
call substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
call substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let s:countonly = 0
|
||||
endfunc "}}}
|
||||
|
||||
@@ -294,7 +298,7 @@ func! s:CountTagsAndState(text)
|
||||
let s:nextrel = 0 " relative indent steps for next line [unit &sw]:
|
||||
|
||||
let s:block = b:hi_newstate.block
|
||||
let tmp = substitute(a:text, '<\zs/\=\w\+\(-\w\+\)*\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
let tmp = substitute(a:text, '<\zs/\=' . s:tagname . '\>\|<!--\[\|\[endif\]-->\|<!--\|-->', '\=s:CheckTag(submatch(0))', 'g')
|
||||
if s:block == 3
|
||||
let b:hi_newstate.scripttype = s:GetScriptType(matchstr(tmp, '\C.*<SCRIPT\>\zs[^>]*'))
|
||||
endif
|
||||
@@ -532,7 +536,7 @@ func! s:FreshState(lnum)
|
||||
let swendtag = match(text, '^\s*</') >= 0
|
||||
|
||||
" If previous line ended in a closing tag, line up with the opening tag.
|
||||
if !swendtag && text =~ '</\w\+\s*>\s*$'
|
||||
if !swendtag && text =~ '</' . s:tagname . '\s*>\s*$'
|
||||
call cursor(state.lnum, 99999)
|
||||
normal! F<
|
||||
let start_lnum = HtmlIndent_FindStartTag()
|
||||
@@ -584,7 +588,7 @@ func! s:Alien3()
|
||||
return eval(b:hi_js1indent)
|
||||
endif
|
||||
if b:hi_indent.scripttype == "javascript"
|
||||
return GetJavascriptIndent()
|
||||
return eval(b:hi_js1indent) + GetJavascriptIndent()
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
@@ -623,7 +627,7 @@ func! s:CSSIndent()
|
||||
return eval(b:hi_css1indent)
|
||||
endif
|
||||
|
||||
" If the current line starts with "}" align with it's match.
|
||||
" If the current line starts with "}" align with its match.
|
||||
if curtext =~ '^\s*}'
|
||||
call cursor(v:lnum, 1)
|
||||
try
|
||||
@@ -661,7 +665,7 @@ func! s:CSSIndent()
|
||||
else
|
||||
let cur_hasfield = curtext =~ '^\s*[a-zA-Z0-9-]\+:'
|
||||
let prev_unfinished = s:CssUnfinished(prev_text)
|
||||
if !cur_hasfield && (prev_hasfield || prev_unfinished)
|
||||
if prev_unfinished
|
||||
" Continuation line has extra indent if the previous line was not a
|
||||
" continuation line.
|
||||
let extra = shiftwidth()
|
||||
@@ -714,9 +718,13 @@ func! s:CSSIndent()
|
||||
endfunc "}}}
|
||||
|
||||
" Inside <style>: Whether a line is unfinished.
|
||||
" tag:
|
||||
" tag: blah
|
||||
" tag: blah &&
|
||||
" tag: blah ||
|
||||
func! s:CssUnfinished(text)
|
||||
"{{{
|
||||
return a:text =~ '\s\(||\|&&\|:\)\s*$'
|
||||
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
|
||||
endfunc "}}}
|
||||
|
||||
" Search back for the first unfinished line above "lnum".
|
||||
@@ -843,11 +851,12 @@ func! HtmlIndent_FindTagStart(lnum)
|
||||
" - a flag indicating whether we found the end of a tag.
|
||||
" This method is global so that HTML-like indenters can use it.
|
||||
" To avoid matching " > " or " < " inside a string require that the opening
|
||||
" "<" is followed by a word character
|
||||
" "<" is followed by a word character and the closing ">" comes after a
|
||||
" non-white character.
|
||||
let idx = match(getline(a:lnum), '\S>\s*$')
|
||||
if idx > 0
|
||||
call cursor(a:lnum, idx)
|
||||
let lnum = searchpair('<\w', '' , '>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
|
||||
let lnum = searchpair('<\w', '' , '\S>', 'bW', '', max([a:lnum - b:html_indent_line_limit, 0]))
|
||||
if lnum > 0
|
||||
return [lnum, 1]
|
||||
endif
|
||||
@@ -861,7 +870,7 @@ func! HtmlIndent_FindStartTag()
|
||||
" The cursor must be on or before a closing tag.
|
||||
" If found, positions the cursor at the match and returns the line number.
|
||||
" Otherwise returns 0.
|
||||
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs\w\+\(-\w\+\)*\ze')
|
||||
let tagname = matchstr(getline('.')[col('.') - 1:], '</\zs' . s:tagname . '\ze')
|
||||
let start_lnum = searchpair('<' . tagname . '\>', '', '</' . tagname . '\>', 'bW')
|
||||
if start_lnum > 0
|
||||
return start_lnum
|
||||
@@ -877,7 +886,7 @@ func! HtmlIndent_FindTagEnd()
|
||||
" a self-closing tag, to the matching ">".
|
||||
" Limited to look up to b:html_indent_line_limit lines away.
|
||||
let text = getline('.')
|
||||
let tagname = matchstr(text, '\w\+\(-\w\+\)*\|!--', col('.'))
|
||||
let tagname = matchstr(text, s:tagname . '\|!--', col('.'))
|
||||
if tagname == '!--'
|
||||
call search('--\zs>')
|
||||
elseif s:get_tag('/' . tagname) != 0
|
||||
@@ -894,12 +903,19 @@ func! s:InsideTag(foundHtmlString)
|
||||
"{{{
|
||||
if a:foundHtmlString
|
||||
" Inside an attribute string.
|
||||
" Align with the previous line or use an external function.
|
||||
" Align with the opening quote or use an external function.
|
||||
let lnum = v:lnum - 1
|
||||
if lnum > 1
|
||||
if exists('b:html_indent_tag_string_func')
|
||||
return b:html_indent_tag_string_func(lnum)
|
||||
endif
|
||||
" If there is a double quote in the previous line, indent with the
|
||||
" character after it.
|
||||
if getline(lnum) =~ '"'
|
||||
call cursor(lnum, 0)
|
||||
normal f"
|
||||
return virtcol('.')
|
||||
endif
|
||||
return indent(lnum)
|
||||
endif
|
||||
endif
|
||||
@@ -923,17 +939,21 @@ func! s:InsideTag(foundHtmlString)
|
||||
let idx = match(text, '\s\zs[_a-zA-Z0-9-]\+="')
|
||||
endif
|
||||
if idx == -1
|
||||
let idx = match(text, '<\w\+\(-\w\+\)*\s\zs\w')
|
||||
" try <tag attr
|
||||
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
|
||||
endif
|
||||
if idx == -1
|
||||
let idx = match(text, '<\w\+\(-\w\+\)*')
|
||||
" after just "<tag" indent one level more
|
||||
let idx = match(text, '<' . s:tagname . '$')
|
||||
if idx >= 0
|
||||
let idx = idx + shiftwidth()
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.') + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
if idx > 0
|
||||
" Found the attribute. TODO: assumes spaces, no Tabs.
|
||||
return idx
|
||||
" Found the attribute to align with.
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.')
|
||||
endif
|
||||
endwhile
|
||||
return -1
|
||||
|
||||
143
indent/julia.vim
143
indent/julia.vim
@@ -21,7 +21,7 @@ if exists("*GetJuliaIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:skipPatterns = '\<julia\%(Comprehension\%(For\|If\)\|RangeKeyword\|Comment[LM]\|\%([bsv]\|ip\|big\|MIME\|Shell\|Printf\|Doc\)\=String\|RegEx\|SymbolS\?\)\>'
|
||||
let s:skipPatterns = '\<julia\%(Comprehension\%(For\|If\)\|RangeKeyword\|Comment\%([LM]\|Delim\)\|\%([bsv]\|ip\|big\|MIME\|Shell\|Printf\|Doc\)\=String\|RegEx\|SymbolS\?\)\>'
|
||||
|
||||
function JuliaMatch(lnum, str, regex, st, ...)
|
||||
let s = a:st
|
||||
@@ -51,7 +51,7 @@ function GetJuliaNestingStruct(lnum, ...)
|
||||
let blocks_stack = []
|
||||
let num_closed_blocks = 0
|
||||
while 1
|
||||
let fb = JuliaMatch(a:lnum, line, '@\@<!\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|immutable\|let\|\%(bare\)\?module\|quote\|do\)\>', s, e)
|
||||
let fb = JuliaMatch(a:lnum, line, '@\@<!\<\%(if\|else\%(if\)\?\|while\|for\|try\|catch\|finally\|\%(staged\)\?function\|macro\|begin\|mutable\s\+struct\|\%(mutable\s\+\)\@<!struct\|\%(abstract\|primitive\)\s\+type\|let\|\%(bare\)\?module\|quote\|do\)\>', s, e)
|
||||
let fe = JuliaMatch(a:lnum, line, '@\@<!\<end\>', s, e)
|
||||
|
||||
if fb < 0 && fe < 0
|
||||
@@ -255,14 +255,18 @@ function GetJuliaNestingBrackets(lnum, c)
|
||||
endwhile
|
||||
let first_open_bracket = -1
|
||||
let last_open_bracket = -1
|
||||
let infuncargs = 0
|
||||
if len(brackets_stack) > 0
|
||||
let first_open_bracket = brackets_stack[0][1]
|
||||
let last_open_bracket = brackets_stack[-1][1]
|
||||
if brackets_stack[-1][0] == 'par' && IsFunctionArgPar(a:lnum, last_open_bracket)
|
||||
let infuncargs = 1
|
||||
endif
|
||||
endif
|
||||
return [first_open_bracket, last_open_bracket, last_closed_bracket]
|
||||
return [first_open_bracket, last_open_bracket, last_closed_bracket, infuncargs]
|
||||
endfunction
|
||||
|
||||
let s:bracketBlocks = '\<julia\%(\%(\%(Printf\)\?Par\|SqBra\|CurBra\)Block\|ParBlockInRange\|StringVars\%(Par\|SqBra\|CurBra\)\|Dollar\%(Par\|SqBra\)\|QuotedParBlockS\?\)\>'
|
||||
let s:bracketBlocks = '\<julia\%(\%(\%(Printf\)\?Par\|SqBra\%(Idx\)\?\|CurBra\)Block\|ParBlockInRange\|StringVars\%(Par\|SqBra\|CurBra\)\|Dollar\%(Par\|SqBra\)\|QuotedParBlockS\?\)\>'
|
||||
|
||||
function IsInBrackets(lnum, c)
|
||||
let stack = map(synstack(a:lnum, a:c), 'synIDattr(v:val, "name")')
|
||||
@@ -272,10 +276,40 @@ endfunction
|
||||
|
||||
function IsInDocString(lnum)
|
||||
let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")')
|
||||
call filter(stack, 'v:val =~# "\\<juliaDocString\\>"')
|
||||
call filter(stack, 'v:val =~# "\\<juliaDocString\\(Delim\\)\\?\\>"')
|
||||
return len(stack) > 0
|
||||
endfunction
|
||||
|
||||
function IsInContinuationImportLine(lnum)
|
||||
let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")')
|
||||
call filter(stack, 'v:val =~# "\\<juliaImportLine\\>"')
|
||||
if len(stack) == 0
|
||||
return 0
|
||||
endif
|
||||
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\)\>', indent(a:lnum)) == -1
|
||||
endfunction
|
||||
|
||||
function IsFunctionArgPar(lnum, c)
|
||||
if a:c == 0
|
||||
return 0
|
||||
endif
|
||||
let stack = map(synstack(a:lnum, a:c-1), 'synIDattr(v:val, "name")')
|
||||
return stack[-1] == 'juliaFunctionBlock'
|
||||
endfunction
|
||||
|
||||
function JumpToMatch(lnum, last_closed_bracket)
|
||||
" we use the % command to skip back (tries to ues matchit if possible,
|
||||
" otherwise resorts to vim's default, which is buggy but better than
|
||||
" nothing)
|
||||
call cursor(a:lnum, a:last_closed_bracket)
|
||||
let percmap = maparg("%", "n")
|
||||
if exists("g:loaded_matchit") && percmap =~# 'Match\%(it\|_wrapper\)'
|
||||
normal %
|
||||
else
|
||||
normal! %
|
||||
end
|
||||
endfunction
|
||||
|
||||
" Auxiliary function to find a line which does not start in the middle of a
|
||||
" multiline bracketed expression, to be used as reference for block
|
||||
" indentation.
|
||||
@@ -314,30 +348,29 @@ function GetJuliaIndent()
|
||||
let lim = -1
|
||||
|
||||
" Multiline bracketed expressions take precedence
|
||||
let align_brackets = get(g:, "julia_indent_align_brackets", 1)
|
||||
let align_funcargs = get(g:, "julia_indent_align_funcargs", 0)
|
||||
let c = len(getline(lnum)) + 1
|
||||
while IsInBrackets(lnum, c)
|
||||
let [first_open_bracket, last_open_bracket, last_closed_bracket] = GetJuliaNestingBrackets(lnum, c)
|
||||
let [first_open_bracket, last_open_bracket, last_closed_bracket, infuncargs] = GetJuliaNestingBrackets(lnum, c)
|
||||
|
||||
" First scenario: the previous line has a hanging open bracket:
|
||||
" set the indentation to match the opening bracket (plus an extra space)
|
||||
" unless we're in a function arguments list or alignment is disabled, in
|
||||
" which case we just add an extra indent
|
||||
if last_open_bracket != -1
|
||||
let st = last_open_bracket
|
||||
let ind = virtcol([lnum, st + 1])
|
||||
if (!infuncargs && align_brackets) || (infuncargs && align_funcargs)
|
||||
let st = last_open_bracket
|
||||
let ind = virtcol([lnum, st + 1])
|
||||
else
|
||||
let ind = indent(lnum) + shiftwidth()
|
||||
endif
|
||||
|
||||
" Second scenario: some multiline bracketed expression was closed in the
|
||||
" previous line. But since we know we are still in a bracketed expression,
|
||||
" we need to find the line where the bracket was open
|
||||
" we need to find the line where the bracket was opened
|
||||
elseif last_closed_bracket != -1
|
||||
" we use the % command to skip back (tries to ues matchit if possible,
|
||||
" otherwise resorts to vim's default, which is buggy but better than
|
||||
" nothing)
|
||||
call cursor(lnum, last_closed_bracket)
|
||||
let percmap = maparg("%", "n")
|
||||
if exists("g:loaded_matchit") && percmap =~# 'Match\%(it\|_wrapper\)'
|
||||
normal %
|
||||
else
|
||||
normal! %
|
||||
end
|
||||
call JumpToMatch(lnum, last_closed_bracket)
|
||||
if line(".") == lnum
|
||||
" something wrong here, give up
|
||||
let ind = indent(lnum)
|
||||
@@ -354,15 +387,28 @@ function GetJuliaIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
" Third scenario: nothing special, or matchit not available: keep the indentation
|
||||
" Third scenario: nothing special: keep the indentation
|
||||
else
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
" In case the current line starts with a closing bracket, we align it with
|
||||
" the opening one.
|
||||
" Does the current line starts with a closing bracket? Then depending on
|
||||
" the situation we align it with the opening one, or we let the rest of
|
||||
" the code figure it out (the case in which we're closing a function
|
||||
" argument list is special-cased)
|
||||
if JuliaMatch(v:lnum, getline(v:lnum), '[])}]', indent(v:lnum)) == indent(v:lnum) && ind > 0
|
||||
return ind - 1
|
||||
if !align_brackets && !align_funcargs
|
||||
let ind = -1
|
||||
elseif (align_brackets && getline(v:lnum)[indent(v:lnum)] != ')') || align_funcargs
|
||||
return ind - 1
|
||||
else " must be a ')' and align_brackets==1 and align_funcargs==0
|
||||
call JumpToMatch(v:lnum, indent(v:lnum))
|
||||
if IsFunctionArgPar(line("."), col("."))
|
||||
let ind = -1
|
||||
else
|
||||
return ind - 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
break
|
||||
@@ -374,7 +420,7 @@ function GetJuliaIndent()
|
||||
let [lnum,ind] = LastBlockIndent(lnum)
|
||||
let c = len(getline(lnum)) + 1
|
||||
if IsInBrackets(lnum, c)
|
||||
let [first_open_bracket, last_open_bracket, last_closed_bracket] = GetJuliaNestingBrackets(lnum, c)
|
||||
let [first_open_bracket, last_open_bracket, last_closed_bracket, infuncargs] = GetJuliaNestingBrackets(lnum, c)
|
||||
let lim = first_open_bracket
|
||||
endif
|
||||
end
|
||||
@@ -389,6 +435,55 @@ function GetJuliaIndent()
|
||||
" Decrease indentation for each closed block in the current line
|
||||
let ind -= shiftwidth() * num_closed_blocks
|
||||
|
||||
" Additional special case: multiline import/using/export statements
|
||||
|
||||
let prevline = getline(lnum)
|
||||
" Are we in a multiline import/using/export statement, right below the
|
||||
" opening line?
|
||||
if IsInContinuationImportLine(v:lnum) && !IsInContinuationImportLine(lnum)
|
||||
if get(g:, 'julia_indent_align_import', 1)
|
||||
" if the opening line has a colon followed by non-comments, use it as
|
||||
" reference point
|
||||
let cind = JuliaMatch(lnum, prevline, ':', indent(lnum), lim)
|
||||
" echo "cind=".string(cind) | sleep 1
|
||||
if cind >= 0
|
||||
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', cind+1)
|
||||
if nonwhiteind >= 0
|
||||
" return match(prevline, '\S', cind+1) " a bit overkill...
|
||||
return cind + 2
|
||||
endif
|
||||
else
|
||||
" if the opening line is not a naked import/using/export statement, use
|
||||
" it as reference
|
||||
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim)
|
||||
if iind >= 0
|
||||
" assuming whitespace after using... so no `using(XYZ)` please!
|
||||
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6)
|
||||
if nonwhiteind >= 0
|
||||
return match(prevline, '\S', iind+6)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let ind += shiftwidth()
|
||||
|
||||
" Or did we just close a multiline import/using/export statement?
|
||||
elseif !IsInContinuationImportLine(v:lnum) && IsInContinuationImportLine(lnum)
|
||||
" find the starting line of the statement
|
||||
let ilnum = 0
|
||||
for iln in range(lnum-1, 1, -1)
|
||||
if !IsInContinuationImportLine(iln)
|
||||
let ilnum = iln
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if ilnum == 0
|
||||
" something went horribly wrong, give up
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
let ind = indent(ilnum)
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
120
indent/make.vim
Normal file
120
indent/make.vim
Normal file
@@ -0,0 +1,120 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Makefile
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2007-05-07
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetMakeIndent()
|
||||
setlocal indentkeys=!^F,o,O,<:>,=else,=endif
|
||||
setlocal nosmartindent
|
||||
|
||||
if exists("*GetMakeIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:comment_rx = '^\s*#'
|
||||
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continuation_rx = '\\$'
|
||||
let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
|
||||
let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
|
||||
" TODO: This needs to be a lot more restrictive in what it matches.
|
||||
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
||||
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
||||
let s:end_conditional_directive_rx = '^\s*\%(else\|endif\)\>'
|
||||
|
||||
function s:remove_continuation(line)
|
||||
return substitute(a:line, s:continuation_rx, "", "")
|
||||
endfunction
|
||||
|
||||
function GetMakeIndent()
|
||||
" TODO: Should this perhaps be v:lnum -1?
|
||||
" let prev_lnum = prevnonblank(v:lnum - 1)
|
||||
let prev_lnum = v:lnum - 1
|
||||
if prev_lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_line = getline(prev_lnum)
|
||||
|
||||
let prev_prev_lnum = prev_lnum - 1
|
||||
let prev_prev_line = prev_prev_lnum != 0 ? getline(prev_prev_lnum) : ""
|
||||
|
||||
" TODO: Deal with comments. In comments, continuations aren't interesting.
|
||||
if prev_line =~ s:continuation_rx
|
||||
if prev_prev_line =~ s:continuation_rx
|
||||
return indent(prev_lnum)
|
||||
elseif prev_line =~ s:rule_rx
|
||||
return shiftwidth()
|
||||
elseif prev_line =~ s:assignment_rx
|
||||
call cursor(prev_lnum, 1)
|
||||
if search(s:assignment_rx, 'W') != 0
|
||||
return virtcol('.') - 1
|
||||
else
|
||||
" TODO: ?
|
||||
return shiftwidth()
|
||||
endif
|
||||
else
|
||||
" TODO: OK, this might be a continued shell command, so perhaps indent
|
||||
" properly here? Leave this out for now, but in the next release this
|
||||
" should be using indent/sh.vim somehow.
|
||||
"if prev_line =~ '^\t' " s:rule_command_rx
|
||||
" if prev_line =~ '^\s\+[@-]\%(if\)\>'
|
||||
" return indent(prev_lnum) + 2
|
||||
" endif
|
||||
"endif
|
||||
return indent(prev_lnum) + shiftwidth()
|
||||
endif
|
||||
elseif prev_prev_line =~ s:continuation_rx
|
||||
let folded_line = s:remove_continuation(prev_prev_line) . ' ' . s:remove_continuation(prev_line)
|
||||
let lnum = prev_prev_lnum - 1
|
||||
let line = getline(lnum)
|
||||
while line =~ s:continuation_rx
|
||||
let folded_line = s:remove_continuation(line) . ' ' . folded_line
|
||||
let lnum -= 1
|
||||
let line = getline(lnum)
|
||||
endwhile
|
||||
let folded_lnum = lnum + 1
|
||||
if folded_line =~ s:rule_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return &ts
|
||||
endif
|
||||
else
|
||||
" elseif folded_line =~ s:folded_assignment_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return indent(folded_lnum)
|
||||
endif
|
||||
" else
|
||||
" " TODO: ?
|
||||
" return indent(prev_lnum)
|
||||
endif
|
||||
elseif prev_line =~ s:rule_rx
|
||||
if getline(v:lnum) =~ s:rule_rx
|
||||
return 0
|
||||
else
|
||||
return &ts
|
||||
endif
|
||||
elseif prev_line =~ s:conditional_directive_rx
|
||||
return shiftwidth()
|
||||
else
|
||||
let line = getline(v:lnum)
|
||||
if line =~ s:just_inserted_rule_rx
|
||||
return 0
|
||||
elseif line =~ s:end_conditional_directive_rx
|
||||
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1) - shiftwidth()
|
||||
else
|
||||
return v:lnum - 1 == 0 ? 0 : indent(v:lnum - 1)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
endif
|
||||
@@ -1,7 +1,7 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
@@ -14,7 +14,7 @@ setlocal indentexpr=GetNimIndent(v:lnum)
|
||||
setlocal indentkeys=!^F,o,O,<:>,0),0],0},=elif
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetNimIndent")
|
||||
if exists('*GetNimIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -40,7 +40,7 @@ function! GetNimIndent(lnum)
|
||||
endif
|
||||
|
||||
" If the start of the line is in a string don't change the indent.
|
||||
if has('syntax_items') && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
|
||||
if has('syntax_items') && synIDattr(synID(a:lnum, 1, 1), 'name') =~# 'String$'
|
||||
return -1
|
||||
endif
|
||||
|
||||
@@ -56,12 +56,12 @@ function! GetNimIndent(lnum)
|
||||
" If the last character in the line is a comment, do a binary search for
|
||||
" the start of the comment. synID() is slow, a linear search would take
|
||||
" too long on a long line.
|
||||
if synIDattr(synID(plnum, pline_len, 1), "name") =~ "Comment$"
|
||||
if synIDattr(synID(plnum, pline_len, 1), 'name') =~# 'Comment$'
|
||||
let min = 1
|
||||
let max = pline_len
|
||||
while min < max
|
||||
let col = (min + max) / 2
|
||||
if synIDattr(synID(plnum, col, 1), "name") =~ "Comment$"
|
||||
if synIDattr(synID(plnum, col, 1), 'name') =~# 'Comment$'
|
||||
let max = col
|
||||
else
|
||||
let min = col + 1
|
||||
@@ -80,16 +80,16 @@ function! GetNimIndent(lnum)
|
||||
endwhile
|
||||
endif
|
||||
|
||||
if cline =~ '^\s*\(if\|when\|for\|while\|case\|of\|try\)\>'
|
||||
if cline =~# '^\s*\(if\|when\|for\|while\|case\|of\|try\)\>'
|
||||
" This is a benign line, do nothing
|
||||
return -1
|
||||
endif
|
||||
|
||||
" If the current line begins with a keyword that lines up with "try"
|
||||
if cline =~ '^\s*\(except\|finally\)\>'
|
||||
if cline =~# '^\s*\(except\|finally\)\>'
|
||||
let lnum = a:lnum - 1
|
||||
while lnum >= 1
|
||||
if getline(lnum) =~ '^\s*\(try\|except\)\>'
|
||||
if getline(lnum) =~# '^\s*\(try\|except\)\>'
|
||||
let ind = indent(lnum)
|
||||
if ind >= clindent
|
||||
return -1 " indent is already less than this
|
||||
@@ -102,31 +102,31 @@ function! GetNimIndent(lnum)
|
||||
endif
|
||||
|
||||
" If the current line begins with a header keyword, dedent
|
||||
if cline =~ '^\s*\(elif\|else\)\>'
|
||||
if cline =~# '^\s*\(elif\|else\)\>'
|
||||
return s:FindStartLine(a:lnum, '^\s*\(if\|when\|elif\|of\)')
|
||||
endif
|
||||
|
||||
if pline =~ ':\s*$'
|
||||
if pline =~# ':\s*$'
|
||||
"return s:FindStartLine(plnum, '(^\s*\(if\|when\|else\|elif\|case\|of\|try\|except\|finally\)\>)\|\<do\>') + &sw
|
||||
return s:FindStartLine(plnum, '^\s*\(if\|when\|else\|elif\|for\|while\|case\|of\|try\|except\|finally\)\>') + &sw
|
||||
endif
|
||||
|
||||
if pline =~ '=\s*$'
|
||||
if pline =~# '=\s*$'
|
||||
return s:FindStartLine(plnum, '^\s*\(proc\|template\|macro\|iterator\)\>') + &sw
|
||||
endif
|
||||
|
||||
" if we got here, this should be the begging of a multi-line if expression for example
|
||||
if pline =~ '^\s*\(if\|when\|proc\|iterator\|macro\|template\|for\|while\)[^:]*$'
|
||||
if pline =~# '^\s*\(if\|when\|proc\|iterator\|macro\|template\|for\|while\)[^:]*$'
|
||||
return plindent + &sw
|
||||
endif
|
||||
|
||||
if pline =~ '\(type\|import\|const\|var\|let\)\s*$'
|
||||
\ || pline =~ '=\s*\(object\|enum\|tuple\|concept\)'
|
||||
if pline =~# '\(type\|import\|const\|var\|let\)\s*$'
|
||||
\ || pline =~# '=\s*\(object\|enum\|tuple\|concept\)'
|
||||
return plindent + &sw
|
||||
endif
|
||||
|
||||
" If the previous line was a stop-execution statement...
|
||||
if pline =~ '^\s*\(break\|continue\|raise\|return\)\>'
|
||||
if pline =~# '^\s*\(break\|continue\|raise\|return\)\>'
|
||||
" See if the user has already dedented
|
||||
if indent(a:lnum) > plindent - &sw
|
||||
" If not, recommend one dedent
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
" Language: RPL/2
|
||||
" Version: 0.2
|
||||
" Last Change: 2017 Jun 13
|
||||
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr>
|
||||
" Maintainer: BERTRAND Joël <rpl2@free.fr>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
|
||||
|
||||
"Description: Indent scheme for the tilde weblanguage
|
||||
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu>
|
||||
"Author: Tobias Rundström <tobi@tobi.nu>
|
||||
"URL: http://tilde.tildesoftware.net
|
||||
"Last Change: May 8 09:15:09 CEST 2002
|
||||
|
||||
|
||||
134
indent/vim.vim
134
indent/vim.vim
@@ -1,134 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vim') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Sep 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetVimIndent()
|
||||
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys-=0#
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetVimIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
function GetVimIndent()
|
||||
let ignorecase_save = &ignorecase
|
||||
try
|
||||
let &ignorecase = 0
|
||||
return GetVimIndentIntern()
|
||||
finally
|
||||
let &ignorecase = ignorecase_save
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
let s:lineContPat = '^\s*\(\\\|"\\ \)'
|
||||
|
||||
function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" If the current line doesn't start with '\' or '"\ ' and below a line that
|
||||
" starts with '\' or '"\ ', use the indent of the line above it.
|
||||
let cur_text = getline(v:lnum)
|
||||
if cur_text !~ s:lineContPat
|
||||
while lnum > 0 && getline(lnum) =~ s:lineContPat
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
endif
|
||||
|
||||
" At the start of the file use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_text = getline(lnum)
|
||||
|
||||
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
|
||||
" and :else. Add it three times for a line that starts with '\' or '"\ '
|
||||
" after a line that doesn't (or g:vim_indent_cont if it exists).
|
||||
let ind = indent(lnum)
|
||||
|
||||
" In heredoc indenting works completely differently.
|
||||
if has('syntax_items')
|
||||
let syn_here = synIDattr(synID(v:lnum, 1, 1), "name")
|
||||
if syn_here =~ 'vimLetHereDocStop'
|
||||
" End of heredoc: use indent of matching start line
|
||||
let lnum = v:lnum - 1
|
||||
while lnum > 0
|
||||
if synIDattr(synID(lnum, 1, 1), "name") !~ 'vimLetHereDoc'
|
||||
return indent(lnum)
|
||||
endif
|
||||
let lnum -= 1
|
||||
endwhile
|
||||
return 0
|
||||
endif
|
||||
if syn_here =~ 'vimLetHereDoc'
|
||||
if synIDattr(synID(lnum, 1, 1), "name") !~ 'vimLetHereDoc'
|
||||
" First line in heredoc: increase indent
|
||||
return ind + shiftwidth()
|
||||
endif
|
||||
" Heredoc continues: no change in indent
|
||||
return ind
|
||||
endif
|
||||
endif
|
||||
|
||||
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
|
||||
if exists("g:vim_indent_cont")
|
||||
let ind = ind + g:vim_indent_cont
|
||||
else
|
||||
let ind = ind + shiftwidth() * 3
|
||||
endif
|
||||
elseif prev_text =~ '^\s*aug\%[roup]\s\+' && prev_text !~ '^\s*aug\%[roup]\s\+[eE][nN][dD]\>'
|
||||
let ind = ind + shiftwidth()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement indent.
|
||||
if prev_text !~ '^\s*au\%[tocmd]'
|
||||
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" If the previous line contains an "end" after a pipe, but not in an ":au"
|
||||
" command. And not when there is a backslash before the pipe.
|
||||
" And when syntax HL is enabled avoid a match inside a string.
|
||||
let i = match(prev_text, '[^\\]|\s*\(ene\@!\)')
|
||||
if i > 0 && prev_text !~ '^\s*au\%[tocmd]'
|
||||
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:sw=2
|
||||
|
||||
endif
|
||||
41
indent/xf86conf.vim
Normal file
41
indent/xf86conf.vim
Normal file
@@ -0,0 +1,41 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: XFree86 Configuration File
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-12-20
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetXF86ConfIndent()
|
||||
setlocal indentkeys=!^F,o,O,=End
|
||||
setlocal nosmartindent
|
||||
|
||||
if exists("*GetXF86ConfIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetXF86ConfIndent()
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
|
||||
if getline(lnum) =~? '^\s*\(Sub\)\=Section\>'
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
|
||||
if getline(v:lnum) =~? '^\s*End\(Sub\)\=Section\>'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
endif
|
||||
124
packages.yaml
124
packages.yaml
@@ -245,19 +245,26 @@ filetypes:
|
||||
- name: autohotkey
|
||||
linguist: AutoHotkey
|
||||
---
|
||||
name: make
|
||||
remote: vim/vim:runtime
|
||||
glob: '**/make.vim'
|
||||
filetypes:
|
||||
- name: make
|
||||
filenames:
|
||||
- '*[mM]akefile'
|
||||
extensions:
|
||||
- mak
|
||||
- dsp
|
||||
- mk
|
||||
---
|
||||
name: automake
|
||||
remote: vim/vim:runtime
|
||||
glob: '**/automake.vim'
|
||||
filetypes:
|
||||
- name: automake
|
||||
filenames:
|
||||
- Makefile.am
|
||||
- makefile.am
|
||||
- '[mM]akefile.am'
|
||||
- GNUmakefile.am
|
||||
extensions:
|
||||
- mak
|
||||
- dsp
|
||||
- mk
|
||||
---
|
||||
name: asn
|
||||
remote: vim/vim:runtime
|
||||
@@ -491,17 +498,10 @@ filetypes:
|
||||
extensions:
|
||||
- sdl
|
||||
---
|
||||
name: dockerfile
|
||||
name: docker-compose
|
||||
remote: ekalinin/Dockerfile.vim
|
||||
glob: '**/docker-compose.vim'
|
||||
filetypes:
|
||||
- name: Dockerfile
|
||||
linguist: Dockerfile
|
||||
extra_extensions:
|
||||
- dock
|
||||
- Dockerfile
|
||||
extra_filenames:
|
||||
- dockerfile
|
||||
- Dockerfile*
|
||||
- name: yaml.docker-compose
|
||||
filenames:
|
||||
- 'docker-compose*.yaml'
|
||||
@@ -754,8 +754,13 @@ filetypes:
|
||||
linguist: HAProxy
|
||||
extra_filenames:
|
||||
- 'haproxy*.conf*'
|
||||
- 'haproxy*.cfg*'
|
||||
ignored_warnings:
|
||||
- 'haproxy*.c*'
|
||||
ignored_extensions:
|
||||
- cfg
|
||||
ignored_filenames:
|
||||
- haproxy.cfg
|
||||
---
|
||||
name: haskell
|
||||
remote: neovimhaskell/haskell-vim
|
||||
@@ -792,13 +797,6 @@ filetypes:
|
||||
extra_extensions:
|
||||
- ql
|
||||
---
|
||||
# TODO: change after https://github.com/othree/html5.vim/pull/106 is merged
|
||||
name: html5
|
||||
remote: sheerun/html5.vim
|
||||
filetypes:
|
||||
- name: html
|
||||
linguist: HTML
|
||||
---
|
||||
name: i3
|
||||
remote: mboughaba/i3config.vim
|
||||
filetypes:
|
||||
@@ -1229,6 +1227,7 @@ filetypes:
|
||||
linguist: PHP
|
||||
extra_extensions:
|
||||
- phtml
|
||||
- php9
|
||||
---
|
||||
name: blade
|
||||
remote: jwalton512/vim-blade
|
||||
@@ -1419,7 +1418,7 @@ filetypes:
|
||||
- cap
|
||||
- opal
|
||||
extra_filenames:
|
||||
- Rantfile
|
||||
- '[Rr]antfile'
|
||||
- ".autotest"
|
||||
- Cheffile
|
||||
- KitchenSink
|
||||
@@ -1478,13 +1477,6 @@ filetypes:
|
||||
# handled by sbt plugin
|
||||
- sbt
|
||||
---
|
||||
name: sbt
|
||||
remote: derekwyatt/vim-sbt
|
||||
filetypes:
|
||||
- name: sbt.scala
|
||||
extensions:
|
||||
- sbt
|
||||
---
|
||||
name: scss
|
||||
remote: cakebaker/scss-syntax.vim
|
||||
filetypes:
|
||||
@@ -1504,10 +1496,19 @@ filetypes:
|
||||
- '.zlogin'
|
||||
- '.zprofile'
|
||||
- '.zlogout'
|
||||
- 'zshrc'
|
||||
- 'zshenv'
|
||||
- 'zlogin'
|
||||
- 'zprofile'
|
||||
- 'zlogout'
|
||||
# Udev symlinks config
|
||||
extra_filenames:
|
||||
- '*/etc/udev/cdsymlinks.conf'
|
||||
ignored_interpreters:
|
||||
- zsh
|
||||
- name: zsh
|
||||
interpreters:
|
||||
- zsh
|
||||
extensions:
|
||||
- zsh
|
||||
filenames:
|
||||
@@ -1520,6 +1521,7 @@ filetypes:
|
||||
- '.zcompdump*'
|
||||
- '.zfbfmarks'
|
||||
- '.zsh*'
|
||||
- '*/etc/zprofile'
|
||||
---
|
||||
name: zinit
|
||||
remote: zinit-zsh/zplugin-vim-syntax
|
||||
@@ -2227,7 +2229,7 @@ glob: "**/debchangelog.vim"
|
||||
filetypes:
|
||||
- name: debchangelog
|
||||
patterns:
|
||||
- pattern: changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch
|
||||
- pattern: changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
|
||||
---
|
||||
name: chill
|
||||
remote: vim/vim:runtime
|
||||
@@ -2328,7 +2330,7 @@ glob: "**/dockerfile.vim"
|
||||
filetypes:
|
||||
- name: dockerfile
|
||||
patterns:
|
||||
- pattern: Containerfile,Dockerfile,*.Dockerfile
|
||||
- pattern: Containerfile,Dockerfile,*.Dockerfile,*.dock,dockerfile,Dockerfile*
|
||||
description: Dockerfile; Podman uses the same syntax with name Containerfile
|
||||
---
|
||||
name: dcd
|
||||
@@ -3981,9 +3983,9 @@ glob: "**/pascal.vim"
|
||||
filetypes:
|
||||
- name: pascal
|
||||
patterns:
|
||||
- pattern: "*.pas"
|
||||
- pattern: "*.pas,*.pp"
|
||||
description: Pascal (also *.p)
|
||||
- pattern: "*.dpr"
|
||||
- pattern: "*.dpr,*.lpr"
|
||||
description: Delphi or Lazarus program file
|
||||
---
|
||||
name: pdf
|
||||
@@ -4631,6 +4633,7 @@ filetypes:
|
||||
name: st
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/st.vim"
|
||||
after: html
|
||||
filetypes:
|
||||
- name: st
|
||||
patterns:
|
||||
@@ -4976,7 +4979,7 @@ glob: "**/tidy.vim"
|
||||
filetypes:
|
||||
- name: tidy
|
||||
patterns:
|
||||
- pattern: ".tidyrc,tidyrc"
|
||||
- pattern: ".tidyrc,tidyrc,tidy.conf"
|
||||
description: Tidy config
|
||||
---
|
||||
name: tf
|
||||
@@ -5152,8 +5155,6 @@ filetypes:
|
||||
- pattern: "*.vhdl_[0-9]*"
|
||||
---
|
||||
name: vim
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/vim.vim"
|
||||
filetypes:
|
||||
- name: vim
|
||||
patterns:
|
||||
@@ -5485,3 +5486,52 @@ remote: vim/vim:runtime
|
||||
glob: "**/autodoc.vim"
|
||||
# Needed by c, cmod, and pike
|
||||
filetypes: []
|
||||
---
|
||||
name: html
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/html.vim"
|
||||
filetypes:
|
||||
- name: html
|
||||
linguist: HTML
|
||||
---
|
||||
# TODO: change after https://github.com/othree/html5.vim/pull/106 is merged
|
||||
name: html5
|
||||
remote: sheerun/html5.vim
|
||||
dependencies: html
|
||||
filetypes: []
|
||||
---
|
||||
name: xf86conf
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/xf86conf.vim"
|
||||
filetypes:
|
||||
- name: xf86conf
|
||||
patterns:
|
||||
- pattern: "XF86Config-4*,XF86Config*,*/xorg.conf.d/*.conf,xorg.conf,xorg.conf-4"
|
||||
---
|
||||
name: man
|
||||
filetypes:
|
||||
- name: man
|
||||
linguist: Roff Manpage
|
||||
---
|
||||
name: xpm
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/xpm.vim"
|
||||
filetypes:
|
||||
- name: xpm
|
||||
linguist: X PixMap
|
||||
---
|
||||
name: xpm2
|
||||
remote: vim/vim:runtime
|
||||
glob: "**/xpm2.vim"
|
||||
filetypes:
|
||||
- name: xpm2
|
||||
patterns:
|
||||
- pattern: '*.xpm2'
|
||||
description: X PixMap 2
|
||||
---
|
||||
name: context
|
||||
filetypes:
|
||||
- name: context
|
||||
patterns:
|
||||
- pattern: '*.mkii,*.mkiv,*.mkvi'
|
||||
description: ConTeXt
|
||||
|
||||
@@ -1,3 +1,137 @@
|
||||
if !exists("did_load_polyglot")
|
||||
runtime! ftdetect/polyglot.vim
|
||||
" Turn on filetype plugins (:help filetype-plugin).
|
||||
if has('autocmd') && !(exists("did_load_filetypes") && exists("did_indent_on"))
|
||||
filetype plugin indent on
|
||||
endif
|
||||
|
||||
" Enable syntax highlighting.
|
||||
if has('syntax') && !exists('g:syntax_on')
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
" No need to duplicate work
|
||||
if exists('g:loaded_sensible')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Code taken from https://github.com/tpope/vim-sensible
|
||||
" and (mostly comments) from https://github.com/sheerun/vimrc
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible')
|
||||
" Autoindent when starting new line, or using `o` or `O`.
|
||||
set autoindent
|
||||
|
||||
" Allow backspace in insert mode.
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" Don't scan included files. The .tags file is more performant.
|
||||
set complete-=i
|
||||
|
||||
" Use 'shiftwidth' when using `<Tab>` in front of a line.
|
||||
" By default it's used only for shift commands (`<`, `>`).
|
||||
set smarttab
|
||||
|
||||
" Disable octal format for number processing.
|
||||
set nrformats-=octal
|
||||
|
||||
" Allow for mappings including `Esc`, while preserving
|
||||
" zero timeout after pressing it manually.
|
||||
" (only vim needs a fix for this)
|
||||
if !has('nvim') && &ttimeoutlen == -1
|
||||
set ttimeout
|
||||
set ttimeoutlen=100
|
||||
endif
|
||||
|
||||
" Enable highlighted case-insensitive incremential search.
|
||||
set incsearch
|
||||
|
||||
" Use <C-L> to clear the highlighting of :set hlsearch.
|
||||
if maparg('<C-L>', 'n') ==# ''
|
||||
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
|
||||
endif
|
||||
|
||||
" Always show window statuses, even if there's only one.
|
||||
set laststatus=2
|
||||
|
||||
" Show the line and column number of the cursor position.
|
||||
set ruler
|
||||
|
||||
" Autocomplete commands using nice menu in place of window status.
|
||||
" Enable `Ctrl-N` and `Ctrl-P` to scroll through matches.
|
||||
set wildmenu
|
||||
|
||||
" Keep 5 columns next to the cursor when scrolling horizontally.
|
||||
if !&scrolloff
|
||||
set scrolloff=1
|
||||
endif
|
||||
if !&sidescrolloff
|
||||
set sidescrolloff=5
|
||||
endif
|
||||
|
||||
" When 'wrap' is on, display last line even if it doesn't fit.
|
||||
set display+=lastline
|
||||
|
||||
" Force utf-8 encoding
|
||||
set encoding=utf-8
|
||||
|
||||
" Set default whitespace characters when using `:set list`
|
||||
if &listchars ==# 'eol:$'
|
||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
endif
|
||||
|
||||
" Delete comment character when joining commented lines
|
||||
if v:version > 703 || v:version == 703 && has("patch541")
|
||||
set formatoptions+=j
|
||||
endif
|
||||
|
||||
" Search upwards for tags file instead only locally
|
||||
if has('path_extra')
|
||||
setglobal tags-=./tags tags-=./tags; tags^=./tags;
|
||||
endif
|
||||
|
||||
" Fix issues with fish shell
|
||||
" https://github.com/tpope/vim-sensible/issues/50
|
||||
if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276'))
|
||||
set shell=/usr/bin/env\ bash
|
||||
endif
|
||||
|
||||
" Reload unchanged files automatically.
|
||||
set autoread
|
||||
|
||||
" Increase history size to 1000 items.
|
||||
if &history < 1000
|
||||
set history=1000
|
||||
endif
|
||||
|
||||
" Allow for up to 50 opened tabs on Vim start.
|
||||
if &tabpagemax < 50
|
||||
set tabpagemax=50
|
||||
endif
|
||||
|
||||
" Always save upper case variables to viminfo file.
|
||||
if !empty(&viminfo)
|
||||
set viminfo^=!
|
||||
endif
|
||||
|
||||
" Don't save options in sessions and views
|
||||
set sessionoptions-=options
|
||||
set viewoptions-=options
|
||||
|
||||
" Allow color schemes to do bright colors without forcing bold.
|
||||
if &t_Co == 8 && $TERM !~# '^Eterm'
|
||||
set t_Co=16
|
||||
endif
|
||||
|
||||
" Load matchit.vim, but only if the user hasn't installed a newer version.
|
||||
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
|
||||
runtime! macros/matchit.vim
|
||||
endif
|
||||
|
||||
" `Ctrl-U` in insert mode deletes a lot. Use `Ctrl-G` u to first break undo,
|
||||
" so that you can undo `Ctrl-U` without undoing what you typed before it.
|
||||
if empty(mapcheck('<C-U>', 'i'))
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
endif
|
||||
|
||||
if empty(mapcheck('<C-W>', 'i'))
|
||||
inoremap <C-W> <C-G>u<C-W>
|
||||
endif
|
||||
endif
|
||||
|
||||
120
scripts/build
120
scripts/build
@@ -22,6 +22,7 @@ def except(hash, *keys)
|
||||
h
|
||||
end
|
||||
|
||||
|
||||
def verify(packages, heuristics)
|
||||
extensions_with_heuristics = Set.new(heuristics.flat_map { |e| e["extensions"] })
|
||||
no_heuristics = Hash.new { |a, b| a[b] = [] }
|
||||
@@ -64,7 +65,7 @@ def sort_packages(packages)
|
||||
for p in packages
|
||||
for f in p["filetypes"]
|
||||
for e in f["extensions"]
|
||||
by_extension[e] << p["name"]
|
||||
by_extension[e] << p["name"] unless by_extension[e].include?(p["name"])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -84,6 +85,25 @@ def sort_packages(packages)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for e in f["extensions"]
|
||||
if e.count(".") > 0
|
||||
ext = e.split(".").last
|
||||
for name in by_extension[ext]
|
||||
if p["name"] != name
|
||||
implicit_dependencies[p["name"]] |= [name]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if e.match?(/[A-Z]/) && by_extension[e.downcase].size > 0
|
||||
for name in by_extension[e.downcase]
|
||||
if p["name"] != name
|
||||
implicit_dependencies[p["name"]] |= [name]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -108,6 +128,10 @@ def load_data()
|
||||
|
||||
for package in packages
|
||||
for filetype in package["filetypes"]
|
||||
if ["context", "man"].include?(filetype["name"]) && package["remote"]
|
||||
puts "context and man packages caused issues in past, are you sure?"
|
||||
exit 1
|
||||
end
|
||||
if filetype["patterns"]
|
||||
for pattern in filetype["patterns"]
|
||||
for p in comma_expanson(pattern["pattern"])
|
||||
@@ -120,6 +144,7 @@ def load_data()
|
||||
end
|
||||
end
|
||||
end
|
||||
filetype.delete("patterns")
|
||||
end
|
||||
if filetype["linguist"]
|
||||
if filetype["extensions"]
|
||||
@@ -236,9 +261,8 @@ def parse_remote(remote)
|
||||
[match[:repo], match[:branch] || "master", match[:path], dir]
|
||||
end
|
||||
|
||||
def copy_file(package, src, dest)
|
||||
def copy_file(name, src, dest)
|
||||
FileUtils.mkdir_p(File.dirname(dest))
|
||||
name = package.fetch("name")
|
||||
|
||||
if dest.end_with?(".vim")
|
||||
header = '" Polyglot metafile'
|
||||
@@ -275,10 +299,14 @@ def copy_file(package, src, dest)
|
||||
output << "if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '#{name}') == -1\n\n"
|
||||
end
|
||||
contents = File.read(input)
|
||||
# fix encoding if required
|
||||
contents.gsub!(/!@#%#/, "") rescue contents = contents.force_encoding('iso-8859-1').encode('utf-8')
|
||||
# ..= is feature of new vims...
|
||||
contents.gsub!(' ..= ', ' .= ')
|
||||
# https://github.com/vim/vim/pull/7091
|
||||
contents.gsub!('fileencoding=', 'encoding=')
|
||||
contents.gsub!(/set(local)? fileencoding=utf-8/, '')
|
||||
contents.gsub!(/ fileencoding=utf-8/, '')
|
||||
contents.gsub!('À-ÿ', '\u00ac-\uffff')
|
||||
output << contents
|
||||
output << "\nendif\n"
|
||||
end
|
||||
@@ -286,7 +314,7 @@ def copy_file(package, src, dest)
|
||||
end
|
||||
|
||||
def download(packages)
|
||||
packages.map { |p| p["remote"] or raise "No remote for: " + p["name"] }.uniq.each_slice(20) do |remotes|
|
||||
packages.map { |p| p["remote"] }.compact.uniq.each_slice(20) do |remotes|
|
||||
remotes.map do |remote|
|
||||
Thread.new do
|
||||
repo, branch, path, dir = parse_remote(remote)
|
||||
@@ -334,7 +362,11 @@ def pattern_to_condition(rule)
|
||||
end
|
||||
|
||||
def rules_to_code(rules)
|
||||
output = ""
|
||||
output = <<~EOF
|
||||
if a:0 != 1 && did_filetype()
|
||||
return
|
||||
endif
|
||||
EOF
|
||||
|
||||
vars = []
|
||||
each_hash(rules) do |h|
|
||||
@@ -459,6 +491,9 @@ def extract(packages)
|
||||
|
||||
output = []
|
||||
packages.map do |package|
|
||||
if !package["remote"]
|
||||
next
|
||||
end
|
||||
repo, branch, path, dir = parse_remote(package["remote"])
|
||||
dirs = package.fetch("dirs", default_dirs)
|
||||
ignored_dirs = package.fetch("ignored_dirs", [])
|
||||
@@ -476,12 +511,12 @@ def extract(packages)
|
||||
globs = [package.fetch("glob", package.fetch('globs', '**/*.{vim,ctags,vital,txt}'))].flatten
|
||||
globs.each do |glob|
|
||||
Dir.glob("#{subdir}/#{glob}", base: subtree).each do |p|
|
||||
next unless File.file?("#{subtree}/#{p}")
|
||||
copy_file(package, "#{subtree}/#{p}", p)
|
||||
next unless File.file?("#{subtree}#{p}")
|
||||
copy_file(package["name"], "#{subtree}#{p}", p)
|
||||
end
|
||||
end
|
||||
elsif File.exist?(subpath)
|
||||
copy_file(package, subpath, subdir)
|
||||
copy_file(package["name"], subpath, subdir)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -497,6 +532,29 @@ def extract(packages)
|
||||
else
|
||||
output << "- [#{package["name"]}](https://github.com/#{repo})"
|
||||
end
|
||||
|
||||
|
||||
names = nil
|
||||
langs = package["filetypes"].map { |f| f["linguist"] }.compact
|
||||
if langs.size > 0
|
||||
names = print_and(langs)
|
||||
end
|
||||
|
||||
files = nil
|
||||
extensions = package["filetypes"].flat_map { |f| f["extensions"].reject { |e| e.match?(/_/) } }.compact
|
||||
if extensions.size > 0
|
||||
files = print_and(extensions)
|
||||
end
|
||||
|
||||
if names && files
|
||||
output[-1] << " (#{names} syntax highlighting for #{files} files)"
|
||||
elsif names
|
||||
output[-1] << " (#{names} syntax highlighting)"
|
||||
elsif files
|
||||
output[-1] << " (Syntax highlighting for #{files} files)"
|
||||
end
|
||||
|
||||
|
||||
progress
|
||||
end
|
||||
|
||||
@@ -515,6 +573,16 @@ def extract(packages)
|
||||
File.write('README.md', readme)
|
||||
end
|
||||
|
||||
def print_and(list)
|
||||
if list.size == 1
|
||||
list[0]
|
||||
elsif list.size > 10
|
||||
list[0...5].join(", ") + " and #{list.size - 5} more"
|
||||
else
|
||||
list[0..-2].join(", ") + " and " + list[-1]
|
||||
end
|
||||
end
|
||||
|
||||
def generate_ftdetect(packages, heuristics)
|
||||
FileUtils.mkdir_p('autoload/polyglot')
|
||||
|
||||
@@ -575,7 +643,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
end
|
||||
|
||||
for filename in filenames.sort
|
||||
if filename[0] == "."
|
||||
if filename.match?(/^\.[^\/]+[^\*]$/)
|
||||
filename = "{.,}" + filename[1..-1]
|
||||
end
|
||||
if filename[-1] == "*"
|
||||
@@ -591,7 +659,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
|
||||
for heuristic in filetype_heuristics.uniq
|
||||
extensions = heuristic["extensions"].map { |e| "*.#{e}" }
|
||||
autocommands << "au! BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
|
||||
autocommands << "au BufNewFile,BufRead,BufWritePost #{extensions.join(",")} call polyglot#detect##{camelize(heuristic["extensions"].first)}()"
|
||||
end
|
||||
|
||||
if autocommands.size > 0 && filetype["description"]
|
||||
@@ -617,7 +685,7 @@ def generate_ftdetect(packages, heuristics)
|
||||
|
||||
for heuristic in heuristics
|
||||
output << <<~EOS
|
||||
func! polyglot#detect##{camelize(heuristic["extensions"].first)}()
|
||||
func! polyglot#detect##{camelize(heuristic["extensions"].first)}(...)
|
||||
#{indent(rules_to_code(heuristic), 2)}
|
||||
endfunc
|
||||
EOS
|
||||
@@ -780,15 +848,7 @@ def generate_plugins(packages)
|
||||
end
|
||||
output << " \\}\n\n"
|
||||
|
||||
|
||||
output << <<~EOS
|
||||
func! polyglot#sleuth#GlobForFiletype(type)
|
||||
return get(s:globs, a:type, '')
|
||||
endfunc
|
||||
EOS
|
||||
|
||||
|
||||
File.write('autoload/polyglot/sleuth.vim', output)
|
||||
inject_code('autoload/polyglot/sleuth.vim', output)
|
||||
end
|
||||
|
||||
def process_list(list, extras)
|
||||
@@ -824,6 +884,19 @@ def show_warnings(all_filetypes, expected_filetypes)
|
||||
end
|
||||
end
|
||||
|
||||
def generate_fallback
|
||||
filetype_content = File.read('tmp/vim/vim/runtime/filetype.vim')
|
||||
filetype_content.gsub!('runtime! ftdetect/*.vim', '')
|
||||
filetype_content.gsub!(/^au BufNewFile,BufRead \*\n.+?runtime!.+?endif/m) {}
|
||||
filetype_content.gsub!(/^au StdinReadPost \* .+?runtime!.+?endif/m) {}
|
||||
filetype_content.gsub!(/^au filetypedetect BufNewFile,BufRead,StdinReadPost \*\n.+?endif/m) {}
|
||||
File.write('extras/filetype.vim', filetype_content)
|
||||
|
||||
autoload_content = File.read('tmp/vim/vim/runtime/autoload/dist/ft.vim')
|
||||
autoload_content.gsub!('dist#ft#', 'polyglot#ft#')
|
||||
File.write('autoload/polyglot/ft.vim', autoload_content)
|
||||
end
|
||||
|
||||
|
||||
if __FILE__ == $0
|
||||
if !ENV["DEV"]
|
||||
@@ -835,12 +908,9 @@ if __FILE__ == $0
|
||||
packages, heuristics = load_data()
|
||||
download(packages)
|
||||
extract(packages)
|
||||
generate_fallback()
|
||||
generate_ftdetect(packages, heuristics)
|
||||
generate_plugins(packages)
|
||||
generate_tests(packages)
|
||||
puts(" Bye! Have a wonderful time!")
|
||||
|
||||
if !ENV["DEV"]
|
||||
FileUtils.rm_rf("tmp")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'yaml'
|
||||
require 'json'
|
||||
|
||||
def comma_expanson(s)
|
||||
s.scan(/{[^{]+}|[^{]+/).map { |a| a[0] == "{" ? a : a.split(",", -1) }.reduce([]) do |a, b|
|
||||
s.scan(/{[^{]+}|[^{]+/).map { |a| a[0] == "{" ? a : a.split(/(?<!\\),/, -1) }.reduce([]) do |a, b|
|
||||
a.size > 0 ?
|
||||
(b.is_a?(String) ?
|
||||
a[0..-2] + [a[-1] + b] :
|
||||
a[0..-2] + [a[-1] + b[0]] + b[1..-1]) :
|
||||
[b].flatten
|
||||
end
|
||||
end.map { |e| e.gsub('\\,', ',')}
|
||||
end
|
||||
|
||||
def import_autocommands
|
||||
@@ -37,6 +38,9 @@ vim -es -u DEFAULTS -c 'exe("func! Capture() \\n redir => capture \\n silent aut
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in filetypes
|
||||
filetypes[k].uniq!
|
||||
end
|
||||
|
||||
filetypes
|
||||
end
|
||||
@@ -87,8 +91,6 @@ def generate_packages_entries(filetypes, comments)
|
||||
return entries
|
||||
end
|
||||
|
||||
filetypes = import_autocommands
|
||||
|
||||
def fix_quotes(a)
|
||||
a = a.gsub(/\\/) { '\\\\' }
|
||||
a.scan(/^.*?"(.+?)"\n/m).each { |p| a[p[0]] = p[0].gsub('"') { '\\"'} }
|
||||
@@ -114,9 +116,200 @@ def get_comments
|
||||
result
|
||||
end
|
||||
|
||||
comments = get_comments()
|
||||
def square_expansion(s)
|
||||
return [s] unless s.include?('[')
|
||||
s.scan(/(\[[^\]]+\]|[^\[]+)/).map { |x| x[0] }
|
||||
.map { |x| x[0] == "[" ? x[1..-2].split("") : [x] }
|
||||
.reduce(&:product).map(&:flatten).map(&:join)
|
||||
end
|
||||
|
||||
def brace_expansion(s)
|
||||
if !s.include?('{')
|
||||
return [s]
|
||||
end
|
||||
r=1 # Dummy value to forward-declare the parse function `r`
|
||||
t=->x{ # Function to parse a bracket block
|
||||
x=x[0].gsub(/^{(.*)}$/){$1} # Remove outer brackets if both are present
|
||||
# x[0] is required because of quirks in the `scan` function
|
||||
x=x.scan(/(({(\g<1>|,)*}|[^,{}]|(?<=,|^)(?=,|$))+)/)
|
||||
# Regex black magic: collect elements of outer bracket
|
||||
x.map{|i|i=i[0];i[?{]?r[i]:i}.flatten # For each element with brackets, run parse function
|
||||
}
|
||||
r=->x{ # Function to parse bracket expansions a{b,c}{d,e}
|
||||
i=x.scan(/({(\g<1>)*}|[^{} ]+)/) # Regex black magic: scan for adjacent sets of brackets
|
||||
i=i.map(&t) # Map all elements against the bracket parser function `t`
|
||||
i.shift.product(*i).map &:join # Combine the adjacent sets with cartesian product and join them together
|
||||
}
|
||||
s.split.map(&r).flatten
|
||||
end
|
||||
|
||||
def generate_tests(autocommands)
|
||||
existing = JSON.parse(File.read('tmp/vim/vim/src/testdir/test_filetype.vim')
|
||||
.match(/let s:filename_checks = ({.*?\\ })/m)[1]
|
||||
.gsub(' \\', ' ').gsub("'", '"')
|
||||
.gsub('$VIMRUNTIME .', '').gsub(",\n }", "}"))
|
||||
|
||||
output = []
|
||||
|
||||
generated = {}
|
||||
for ft in autocommands.keys().sort()
|
||||
patterns = autocommands[ft]
|
||||
|
||||
files1 = []
|
||||
to_delete = []
|
||||
|
||||
patterns.reject! { |p| p.match?(/[\|\\\(]/) }
|
||||
|
||||
patterns = patterns.map do |pattern|
|
||||
pattern = pattern.gsub('[0-9]', '1').gsub('[2-3]', '2').gsub('[1-3]', '1').gsub('?', 'x')
|
||||
|
||||
if pattern.match?(/\/\*\.[^\*\/]+$/)
|
||||
pattern = pattern.gsub(/\/\*\.([^\*\/]+)$/, '/file.\1')
|
||||
end
|
||||
|
||||
if pattern.match?(/[\/\.-]\*$/)
|
||||
pattern = pattern[0..-2] + "file"
|
||||
end
|
||||
|
||||
pattern = pattern.gsub(/\/\*\//) { '/any/' }
|
||||
|
||||
pattern
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map { |p| brace_expansion(p) }
|
||||
|
||||
for pattern in patterns
|
||||
if pattern.match(/^\*[.\,][^\*\/]+$/)
|
||||
files1 << pattern.gsub('*', 'file')
|
||||
|
||||
to_delete << pattern
|
||||
end
|
||||
if pattern.match(/^[^\*\/]+\.\*$/)
|
||||
files1 << pattern.gsub('*', 'file')
|
||||
to_delete << pattern
|
||||
end
|
||||
end
|
||||
files1.sort!
|
||||
patterns = patterns - to_delete
|
||||
|
||||
|
||||
files2 = []
|
||||
for pattern in patterns
|
||||
if !pattern.match(/\*/)
|
||||
files2 << pattern
|
||||
to_delete << pattern
|
||||
end
|
||||
end
|
||||
files2.sort!
|
||||
patterns = patterns - to_delete
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/^\*\//)
|
||||
[pattern[1..-1], "any" + pattern[1..-1]]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/^\*[-\.]/)
|
||||
["some" + pattern[1..-1]]
|
||||
elsif pattern.match?(/^\*/)
|
||||
[pattern[1..-1], "some-" + pattern[1..-1]]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/[^\/]+\/\*-[^\\]+$/)
|
||||
[pattern.gsub('/*-', '/file-')]
|
||||
elsif pattern.match?(/[^\/]+\/\*\.[^\\]+$/)
|
||||
[pattern.gsub('/*.', '/file.')]
|
||||
elsif pattern.match?(/[^\/]+\/\*[^\\]+$/)
|
||||
[pattern.gsub('/*', '/'), pattern.gsub('/*', '/some-')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.include?('-*/')
|
||||
[pattern.gsub('-*/', '-file/')]
|
||||
elsif pattern.include?('.*/')
|
||||
[pattern.gsub('.*/', '.file/')]
|
||||
elsif pattern.include?('*/')
|
||||
[pattern.gsub('*/', '/'), pattern.gsub('*/', '-some/')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/[^\/]+\.\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('.*.', '.file.')]
|
||||
elsif pattern.match?(/[^\/]+-\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('-*.', '-file.')]
|
||||
elsif pattern.match?(/[^\/]+\*\.([^\*\/]+)$/)
|
||||
[pattern.gsub('*.', '.'), pattern.gsub('*.', '-file.')]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
|
||||
patterns = patterns.flat_map do |pattern|
|
||||
if pattern.match?(/\*$/)
|
||||
[pattern[0..-2], pattern[0..-2] + "-file"]
|
||||
else
|
||||
[pattern]
|
||||
end
|
||||
end
|
||||
patterns.sort!
|
||||
|
||||
files = [*files1, *files2, *patterns].flat_map { |e| square_expansion(e) }
|
||||
generated[ft] = files
|
||||
|
||||
end
|
||||
|
||||
|
||||
for ft, original in existing
|
||||
for file in generated.fetch(ft, [])
|
||||
|
||||
unless original.include?(file) || ['file.DEF', 'file.MOD', 'file.BUILD', 'BUILD'].include?(file) || ft == "help"
|
||||
original << file
|
||||
end
|
||||
end
|
||||
generated.delete(ft)
|
||||
output << " \\ '#{ft}': #{JSON.generate(original).gsub('"', "'").gsub("','", "', '")},"
|
||||
end
|
||||
|
||||
for ft, paths in generated
|
||||
idx = output.find_index { |a| a > " \\ '" + ft }
|
||||
output.insert(idx, " \\ '#{ft}': #{JSON.generate(paths).gsub('"', "'").gsub("','", "', '")},")
|
||||
end
|
||||
|
||||
|
||||
output << " \\ }"
|
||||
|
||||
msgs = <<'EOF'
|
||||
\ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user',
|
||||
\ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log',
|
||||
\ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err',
|
||||
\ '/log/auth.info', '/log/cron.info', '/log/daemon.info', '/log/debug.info', '/log/kern.info', '/log/lpr.info', '/log/mail.info', '/log/messages.info', '/log/news/news.info', '/log/syslog.info', '/log/user.info',
|
||||
\ '/log/auth.warn', '/log/cron.warn', '/log/daemon.warn', '/log/debug.warn', '/log/kern.warn', '/log/lpr.warn', '/log/mail.warn', '/log/messages.warn', '/log/news/news.warn', '/log/syslog.warn', '/log/user.warn',
|
||||
\ '/log/auth.crit', '/log/cron.crit', '/log/daemon.crit', '/log/debug.crit', '/log/kern.crit', '/log/lpr.crit', '/log/mail.crit', '/log/messages.crit', '/log/news/news.crit', '/log/syslog.crit', '/log/user.crit',
|
||||
\ '/log/auth.notice', '/log/cron.notice', '/log/daemon.notice', '/log/debug.notice', '/log/kern.notice', '/log/lpr.notice', '/log/mail.notice', '/log/messages.notice', '/log/news/news.notice', '/log/syslog.notice', '/log/user.notice'],
|
||||
EOF
|
||||
|
||||
|
||||
"let s:filename_checks = {\n" + output.join("\n").gsub("'/doc/help.txt'", "$VIMRUNTIME . '/doc/help.txt'").gsub(/ \\ 'messages':.*?\],\n/m) { msgs }
|
||||
|
||||
|
||||
end
|
||||
|
||||
#comments = get_comments()
|
||||
autocommands = import_autocommands()
|
||||
entries = generate_packages_entries(autocommands, comments)
|
||||
print(entries.join(""))
|
||||
|
||||
|
||||
# entries = generate_packages_entries(autocommands, comments)
|
||||
# print(entries.join(""))
|
||||
result = generate_tests(autocommands)
|
||||
print(result)
|
||||
|
||||
44
scripts/test
44
scripts/test
@@ -1,17 +1,16 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
def run_script(src)
|
||||
system("bash", "-c", src)
|
||||
if system("bash", "-eo", "pipefail", "-c", src) != true
|
||||
exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
def run_vimscript(src)
|
||||
wrapper = <<~EOF
|
||||
vim --clean --not-a-term -u <(cat <<- "EOM"
|
||||
let g:polyglot_test = 1
|
||||
set nocompatible
|
||||
let &rtp='$PWD,' . &rtp
|
||||
filetype plugin indent on
|
||||
syntax on
|
||||
let &rtp='#{Dir.pwd},' . &rtp
|
||||
set t_ti= t_te=
|
||||
set shortmess+=F
|
||||
set noswapfile
|
||||
@@ -23,18 +22,36 @@ def run_vimscript(src)
|
||||
endif
|
||||
endfunc
|
||||
EOM
|
||||
EOF
|
||||
|
||||
wrapper += <<~'EOF'
|
||||
) -S <(cat <<- "EOM"
|
||||
try
|
||||
#{src}
|
||||
catch
|
||||
echo v:exception
|
||||
echo v:throwpoint
|
||||
endtry
|
||||
|
||||
redir @q
|
||||
silent function /^NewTest_
|
||||
redir END
|
||||
let s:tests = split(substitute(@q, '\(function\|def\) \(\k*()\)', '\2', 'g'))
|
||||
for test in s:tests
|
||||
echo test
|
||||
%bwipe!
|
||||
exe 'call ' . test
|
||||
set noinsertmode
|
||||
if len(v:errors) > 0
|
||||
for err in v:errors
|
||||
echo err
|
||||
endfor
|
||||
cq!
|
||||
endif
|
||||
endfor
|
||||
|
||||
qa!
|
||||
EOM
|
||||
) | perl -pe 's/\e\[[0-9;]*[a-zA-Z]//g'
|
||||
EOF
|
||||
|
||||
wrapper.gsub!('#{src}') { src }
|
||||
|
||||
run_script(wrapper)
|
||||
end
|
||||
|
||||
@@ -46,7 +63,12 @@ test_helptags = <<~EOF
|
||||
EOF
|
||||
|
||||
run_vimscript('source tests/filetypes.vim')
|
||||
# run_vimscript('source tests/extensions.vim')
|
||||
run_vimscript('source tests/extensions.vim')
|
||||
|
||||
if !ENV['DEV']
|
||||
run_vimscript('source tests/native.vim')
|
||||
end
|
||||
|
||||
run_script(test_helptags)
|
||||
|
||||
# run_vimscript("
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Dockerfile
|
||||
" Maintainer: Eugene Kalinin
|
||||
" Latest Revision: 11 September 2013
|
||||
" Source: http://docs.docker.io/en/latest/use/builder/
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" case sensitivity (fix #17)
|
||||
" syn case ignore
|
||||
|
||||
" Keywords
|
||||
syn keyword dockerfileKeywords FROM AS MAINTAINER RUN CMD COPY
|
||||
syn keyword dockerfileKeywords EXPOSE ADD ENTRYPOINT
|
||||
syn keyword dockerfileKeywords VOLUME USER WORKDIR ONBUILD
|
||||
syn keyword dockerfileKeywords LABEL ARG HEALTHCHECK SHELL STOPSIGNAL
|
||||
|
||||
" Bash statements
|
||||
setlocal iskeyword+=-
|
||||
syn keyword bashStatement add-apt-repository adduser apk apt-get aptitude apt-key autoconf bundle
|
||||
syn keyword bashStatement cd chgrp chmod chown clear complete composer cp curl du echo egrep
|
||||
syn keyword bashStatement expr fgrep find gem gnufind gnugrep gpg grep groupadd head less ln
|
||||
syn keyword bashStatement ls make mkdir mv node npm pacman pip pip3 php python rails rm rmdir rpm ruby
|
||||
syn keyword bashStatement sed sleep sort strip tar tail tailf touch useradd virtualenv yum
|
||||
syn keyword bashStatement usermod bash cat a2ensite a2dissite a2enmod a2dismod apache2ctl
|
||||
syn keyword bashStatement wget gzip
|
||||
|
||||
" Strings
|
||||
syn region dockerfileString start=/"/ skip=/\\"|\\\\/ end=/"/
|
||||
syn region dockerfileString1 start=/'/ skip=/\\'|\\\\/ end=/'/
|
||||
|
||||
" Emails
|
||||
syn region dockerfileEmail start=/</ end=/>/ contains=@ oneline
|
||||
|
||||
" Urls
|
||||
syn match dockerfileUrl /\(http\|https\|ssh\|hg\|git\)\:\/\/[a-zA-Z0-9\/\-\._]\+/
|
||||
|
||||
" Task tags
|
||||
syn keyword dockerfileTodo contained TODO FIXME XXX
|
||||
|
||||
" Comments
|
||||
syn region dockerfileComment start="#" end="\n" contains=dockerfileTodo
|
||||
syn region dockerfileEnvWithComment start="^\s*ENV\>" end="\n" contains=dockerfileEnv
|
||||
syn match dockerfileEnv contained /\<ENV\>/
|
||||
|
||||
" Highlighting
|
||||
hi link dockerfileKeywords Keyword
|
||||
hi link dockerfileEnv Keyword
|
||||
hi link dockerfileString String
|
||||
hi link dockerfileString1 String
|
||||
hi link dockerfileComment Comment
|
||||
hi link dockerfileEmail Identifier
|
||||
hi link dockerfileUrl Identifier
|
||||
hi link dockerfileTodo Todo
|
||||
hi link bashStatement Function
|
||||
|
||||
let b:current_syntax = "dockerfile"
|
||||
|
||||
endif
|
||||
@@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apache') == -1
|
||||
" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
" License: This file can be redistribued and/or modified under the same terms
|
||||
" as Vim itself.
|
||||
" Last Change: 2018-12-06
|
||||
" 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 +44,8 @@ syn keyword apacheOption user group
|
||||
syn match apacheOption "\<valid-user\>"
|
||||
syn case match
|
||||
syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained
|
||||
" 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
|
||||
|
||||
@@ -21,7 +21,7 @@ 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\|\(no\)\?load\)\s*=>\?"
|
||||
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$"
|
||||
@@ -41,7 +41,7 @@ syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)}
|
||||
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 "\(g723\|gsm\|ulaw\|alaw\|g726\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|all\s*$\)"
|
||||
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
|
||||
|
||||
@@ -6,7 +6,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cabal') == -1
|
||||
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
|
||||
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
|
||||
" File Types: .cabal
|
||||
" Last Change: 15 May 2018
|
||||
" Last Change: 3 Oct 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`.
|
||||
@@ -64,11 +64,12 @@ syn keyword cabalCategory contained
|
||||
\ 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\)\+\s*\%(.*$\|$\)/
|
||||
\ /^\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
|
||||
@@ -78,6 +79,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ default-language
|
||||
\ default-extensions
|
||||
\ author
|
||||
\ autogen-modules
|
||||
\ branch
|
||||
\ bug-reports
|
||||
\ build-depends
|
||||
@@ -112,6 +114,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ homepage
|
||||
\ hs-source-dirs
|
||||
\ hugs-options
|
||||
\ import
|
||||
\ include-dirs
|
||||
\ includes
|
||||
\ install-includes
|
||||
|
||||
@@ -141,7 +141,7 @@ syn match crystalFloat "\<\d[[:digit:]_]*\%(\.\d[[:digit:]_]*\)\=\%([eE][-+]
|
||||
syn match crystalInvalidInteger "\%(\.\|[eE][+-]\)\@2<!\<0\d\+\>" 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<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained
|
||||
|
||||
@@ -63,7 +63,7 @@ syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
|
||||
syn match cssClassNameDot contained '\.'
|
||||
|
||||
try
|
||||
syn match cssIdentifier "#[A-Za-z<EFBFBD>-<2D>_@][A-Za-z<>-<2D>0-9_@-]*"
|
||||
syn match cssIdentifier "#[A-Za-z\u00ac-\uffff_@][A-Za-z\u00ac-\uffff0-9_@-]*"
|
||||
catch /^.*/
|
||||
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
|
||||
endtry
|
||||
@@ -651,7 +651,7 @@ endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'docker-compose') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Dockerfile
|
||||
|
||||
49
syntax/dockerfile.vim
Normal file
49
syntax/dockerfile.vim
Normal file
@@ -0,0 +1,49 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1
|
||||
|
||||
" dockerfile.vim - Syntax highlighting for Dockerfiles
|
||||
" Maintainer: Honza Pokorny <https://honza.ca>
|
||||
" 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"
|
||||
|
||||
endif
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elf') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: ELF
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: Son 22 Jun 2003 20:43:14 CEST
|
||||
" Filenames: *.ab,*.am
|
||||
" URL: http://www.cvjb.de/comp/vim/elf.vim
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'forth') == -1
|
||||
" Vim syntax file
|
||||
" Language: FORTH
|
||||
" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com>
|
||||
" Previous Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: 2018-03-29
|
||||
" Filenames: *.fs,*.ft
|
||||
" URL: https://github.com/jkotlinski/forth.vim
|
||||
|
||||
@@ -2,19 +2,18 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 102
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v103) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
" Credits:
|
||||
" Version 0.1 for Fortran 95 was created (April 2000) by Ajit Thakkar from the
|
||||
" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg.
|
||||
" 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 Dieudonn<EFBFBD>, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman,
|
||||
" Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann,
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judica<EFBFBD>l Grasset, and Takuma Yoshida
|
||||
" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida,
|
||||
" Eisuke Kawashima, and André Chalella.`
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -104,6 +103,8 @@ syn match fortranUnitHeader "\<end\>"
|
||||
syn match fortranType "\<character\>"
|
||||
syn match fortranType "\<complex\>"
|
||||
syn match fortranType "\<integer\>"
|
||||
syn match fortranType "\<real\>"
|
||||
syn match fortranType "\<logical\>"
|
||||
syn keyword fortranType intrinsic
|
||||
syn match fortranType "\<implicit\>"
|
||||
syn keyword fortranStructure dimension
|
||||
@@ -151,11 +152,9 @@ syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cq
|
||||
syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh
|
||||
syn match fortranIntrinsic "\<len\s*[(,]"me=s+3
|
||||
syn match fortranIntrinsic "\<real\s*("me=s+4
|
||||
syn match fortranType "\<implicit\s\+real"
|
||||
syn match fortranType "^\s*real\>"
|
||||
syn match fortranIntrinsic "\<logical\s*("me=s+7
|
||||
syn match fortranType "\<implicit\s\+logical"
|
||||
syn match fortranType "^\s*logical\>"
|
||||
syn match fortranType "\<implicit\s\+real\>"
|
||||
syn match fortranType "\<implicit\s\+logical\>"
|
||||
|
||||
"Numbers of various sorts
|
||||
" Integers
|
||||
@@ -170,6 +169,12 @@ syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>"
|
||||
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+\>\)\="
|
||||
@@ -217,7 +222,6 @@ syn match fortranUnitHeader "\<submodule\>"
|
||||
syn keyword fortranUnitHeader use only contains
|
||||
syn keyword fortranUnitHeader result operator assignment
|
||||
syn match fortranUnitHeader "\<interface\>"
|
||||
syn match fortranUnitHeader "\<recursive\>"
|
||||
syn keyword fortranKeyword allocate deallocate nullify cycle exit
|
||||
syn match fortranConditional "\<select\>"
|
||||
syn keyword fortranConditional case default where elsewhere
|
||||
@@ -276,6 +280,7 @@ syn keyword fortranIntrinsic null cpu_time
|
||||
syn match fortranType "\<elemental\>"
|
||||
syn match fortranType "\<pure\>"
|
||||
syn match fortranType "\<impure\>"
|
||||
syn match fortranType "\<recursive\>"
|
||||
if exists("fortran_more_precise")
|
||||
syn match fortranConstructName "\(\<end\s*forall\s\+\)\@15<=\a\w*\>"
|
||||
endif
|
||||
@@ -455,6 +460,9 @@ hi def link fortranTodo Todo
|
||||
hi def link fortranContinueMark Special
|
||||
hi def link fortranString String
|
||||
hi def link fortranNumber Number
|
||||
hi def link fortranBinary Number
|
||||
hi def link fortranOctal Number
|
||||
hi def link fortranHex Number
|
||||
hi def link fortranOperator Operator
|
||||
hi def link fortranBoolean Boolean
|
||||
hi def link fortranLabelError Error
|
||||
|
||||
495
syntax/html.vim
495
syntax/html.vim
@@ -1,23 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: HTML (version 5.1)
|
||||
" SVG (SVG 1.1 Second Edition)
|
||||
" MathML (MathML 3.0 Second Edition)
|
||||
" Last Change: 2017 Mar 07
|
||||
" License: Public domain
|
||||
" (but let me know if you like :) )
|
||||
" Language: HTML
|
||||
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
|
||||
" Last Change: 2020 Mar 17
|
||||
" Included patch from Florian Breisch to add the summary element
|
||||
"
|
||||
" Note: This file just add new tags from HTML 5
|
||||
" and don't replace default html.vim syntax file
|
||||
"
|
||||
" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com )
|
||||
" Changes: update to Draft 2016 Jan 13
|
||||
" add microdata Attributes
|
||||
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
|
||||
" URL: http://rm.blog.br/vim/syntax/html.vim
|
||||
" Modified: htdebeer <H.T.de.Beer@gmail.com>
|
||||
" Changes: add common SVG elements and attributes for inline SVG
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if !exists("main_syntax")
|
||||
@@ -30,178 +22,312 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Patch 7.4.1142
|
||||
if has("patch-7.4-1142")
|
||||
if has("win32")
|
||||
syn iskeyword @,48-57,_,128-167,224-235,-
|
||||
syntax spell toplevel
|
||||
|
||||
syn case ignore
|
||||
|
||||
" mark illegal characters
|
||||
syn match htmlError "[<>&]"
|
||||
|
||||
|
||||
" tags
|
||||
syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
|
||||
syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
|
||||
syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
|
||||
syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
|
||||
syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
|
||||
syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
|
||||
syn match htmlTagError contained "[^>]<"ms=s+1
|
||||
|
||||
|
||||
" tag names
|
||||
syn keyword htmlTagName contained address applet area a base basefont
|
||||
syn keyword htmlTagName contained big blockquote br caption center
|
||||
syn keyword htmlTagName contained cite code dd dfn dir div dl dt font
|
||||
syn keyword htmlTagName contained form hr html img
|
||||
syn keyword htmlTagName contained input isindex kbd li link map menu
|
||||
syn keyword htmlTagName contained meta ol option param pre p samp span
|
||||
syn keyword htmlTagName contained select small sub sup
|
||||
syn keyword htmlTagName contained table td textarea th tr tt ul var xmp
|
||||
syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
|
||||
|
||||
" new html 4.0 tags
|
||||
syn keyword htmlTagName contained abbr acronym bdo button col label
|
||||
syn keyword htmlTagName contained colgroup fieldset iframe ins legend
|
||||
syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
|
||||
|
||||
" new html 5 tags
|
||||
syn keyword htmlTagName contained article aside audio bdi canvas data
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption
|
||||
syn keyword htmlTagName contained figure footer header hgroup keygen main
|
||||
syn keyword htmlTagName contained mark menuitem meter nav output picture
|
||||
syn keyword htmlTagName contained progress rb rp rt rtc ruby section
|
||||
syn keyword htmlTagName contained slot source summary template time track
|
||||
syn keyword htmlTagName contained video wbr
|
||||
|
||||
" legal arg names
|
||||
syn keyword htmlArg contained action
|
||||
syn keyword htmlArg contained align alink alt archive background bgcolor
|
||||
syn keyword htmlArg contained border bordercolor cellpadding
|
||||
syn keyword htmlArg contained cellspacing checked class clear code codebase color
|
||||
syn keyword htmlArg contained cols colspan content coords enctype face
|
||||
syn keyword htmlArg contained gutter height hspace id
|
||||
syn keyword htmlArg contained link lowsrc marginheight
|
||||
syn keyword htmlArg contained marginwidth maxlength method name prompt
|
||||
syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape
|
||||
syn keyword htmlArg contained size src start target text type url
|
||||
syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
|
||||
syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
|
||||
|
||||
" aria attributes
|
||||
syn match htmlArg contained "\<\(aria-activedescendant\|aria-atomic\)\>"
|
||||
syn match htmlArg contained "\<\(aria-autocomplete\|aria-busy\|aria-checked\)\>"
|
||||
syn match htmlArg contained "\<\(aria-colcount\|aria-colindex\|aria-colspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-controls\|aria-current\)\>"
|
||||
syn match htmlArg contained "\<\(aria-describedby\|aria-details\)\>"
|
||||
syn match htmlArg contained "\<\(aria-disabled\|aria-dropeffect\)\>"
|
||||
syn match htmlArg contained "\<\(aria-errormessage\|aria-expanded\)\>"
|
||||
syn match htmlArg contained "\<\(aria-flowto\|aria-grabbed\|aria-haspopup\)\>"
|
||||
syn match htmlArg contained "\<\(aria-hidden\|aria-invalid\)\>"
|
||||
syn match htmlArg contained "\<\(aria-keyshortcuts\|aria-label\)\>"
|
||||
syn match htmlArg contained "\<\(aria-labelledby\|aria-level\|aria-live\)\>"
|
||||
syn match htmlArg contained "\<\(aria-modal\|aria-multiline\)\>"
|
||||
syn match htmlArg contained "\<\(aria-multiselectable\|aria-orientation\)\>"
|
||||
syn match htmlArg contained "\<\(aria-owns\|aria-placeholder\|aria-posinset\)\>"
|
||||
syn match htmlArg contained "\<\(aria-pressed\|aria-readonly\|aria-relevant\)\>"
|
||||
syn match htmlArg contained "\<\(aria-required\|aria-roledescription\)\>"
|
||||
syn match htmlArg contained "\<\(aria-rowcount\|aria-rowindex\|aria-rowspan\)\>"
|
||||
syn match htmlArg contained "\<\(aria-selected\|aria-setsize\|aria-sort\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuemax\|aria-valuemin\)\>"
|
||||
syn match htmlArg contained "\<\(aria-valuenow\|aria-valuetext\)\>"
|
||||
syn keyword htmlArg contained role
|
||||
|
||||
" Netscape extensions
|
||||
syn keyword htmlTagName contained frame noframes frameset nobr blink
|
||||
syn keyword htmlTagName contained layer ilayer nolayer spacer
|
||||
syn keyword htmlArg contained frameborder noresize pagex pagey above below
|
||||
syn keyword htmlArg contained left top visibility clip id noshade
|
||||
syn match htmlArg contained "\<z-index\>"
|
||||
|
||||
" Microsoft extensions
|
||||
syn keyword htmlTagName contained marquee
|
||||
|
||||
" html 4.0 arg names
|
||||
syn match htmlArg contained "\<\(accept-charset\|label\)\>"
|
||||
syn keyword htmlArg contained abbr accept accesskey axis char charoff charset
|
||||
syn keyword htmlArg contained cite classid codetype compact data datetime
|
||||
syn keyword htmlArg contained declare defer dir disabled for frame
|
||||
syn keyword htmlArg contained headers hreflang lang language longdesc
|
||||
syn keyword htmlArg contained multiple nohref nowrap object profile readonly
|
||||
syn keyword htmlArg contained rules scheme scope span standby style
|
||||
syn keyword htmlArg contained summary tabindex valuetype version
|
||||
|
||||
" html 5 arg names
|
||||
syn keyword htmlArg contained allowfullscreen async autocomplete autofocus
|
||||
syn keyword htmlArg contained autoplay challenge contenteditable contextmenu
|
||||
syn keyword htmlArg contained controls crossorigin default dirname download
|
||||
syn keyword htmlArg contained draggable dropzone form formaction formenctype
|
||||
syn keyword htmlArg contained formmethod formnovalidate formtarget hidden
|
||||
syn keyword htmlArg contained high icon inputmode keytype kind list loop low
|
||||
syn keyword htmlArg contained max min minlength muted nonce novalidate open
|
||||
syn keyword htmlArg contained optimum pattern placeholder poster preload
|
||||
syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck
|
||||
syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
|
||||
syn keyword htmlArg contained typemustmatch
|
||||
|
||||
" special characters
|
||||
syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
|
||||
|
||||
" Comments (the real ones or the old netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
|
||||
else
|
||||
syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell
|
||||
syn match htmlCommentError contained "[^><!]"
|
||||
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
|
||||
endif
|
||||
syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
|
||||
|
||||
" server-parsed commands
|
||||
syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
|
||||
syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
|
||||
syn match htmlPreError contained "<!--#\S*"ms=s+4
|
||||
syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName
|
||||
syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend
|
||||
syn match htmlPreProcAttrError contained "\w\+="he=e-1
|
||||
syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
|
||||
|
||||
if !exists("html_no_rendering")
|
||||
" rendering
|
||||
syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
|
||||
|
||||
syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBold start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
|
||||
syn region htmlBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
syn region htmlBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlBoldItalicUnderline
|
||||
syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlBoldItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderlineItalic
|
||||
|
||||
syn region htmlUnderline start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
|
||||
syn region htmlUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineBoldItalic
|
||||
syn region htmlUnderlineItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop,htmlUnderlineItalicBold
|
||||
syn region htmlUnderlineItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn region htmlItalic start="<i\>" end="</i\_s*>"me=s-1 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
|
||||
syn region htmlItalic start="<em\>" end="</em\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop,htmlItalicBoldUnderline
|
||||
syn region htmlItalicBoldUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderline contained start="<u\>" end="</u\_s*>"me=s-1 contains=@htmlTop,htmlItalicUnderlineBold
|
||||
syn region htmlItalicUnderlineBold contained start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong\_s*>"me=s-1 contains=@htmlTop
|
||||
|
||||
syn match htmlLeadingSpace "^\s\+" contained
|
||||
syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a\_s*>"me=s-1 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
|
||||
syn region htmlH1 start="<h1\>" end="</h1\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH2 start="<h2\>" end="</h2\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH3 start="<h3\>" end="</h3\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH4 start="<h4\>" end="</h4\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH5 start="<h5\>" end="</h5\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlH6 start="<h6\>" end="</h6\_s*>"me=s-1 contains=@htmlTop
|
||||
syn region htmlHead start="<head\>" end="</head\_s*>"me=s-1 end="<body\>"me=s-1 end="<h[1-6]\>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
|
||||
syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn keyword htmlTagName contained noscript
|
||||
syn keyword htmlSpecialTagName contained script style
|
||||
if main_syntax != 'java' || exists("java_javascript")
|
||||
" JAVA SCRIPT
|
||||
syn include @htmlJavaScript syntax/javascript.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
hi def link htmlScriptTag htmlTag
|
||||
|
||||
" html events (i.e. arguments that include javascript commands)
|
||||
if exists("html_extended_events")
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
|
||||
else
|
||||
syn iskeyword @,48-57,_,192-255,-
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
|
||||
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
|
||||
endif
|
||||
syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
|
||||
syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
|
||||
hi def link htmlEventSQ htmlEvent
|
||||
hi def link htmlEventDQ htmlEvent
|
||||
|
||||
" a javascript expression is used as an arg value
|
||||
syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc
|
||||
endif
|
||||
|
||||
if main_syntax != 'java' || exists("java_vb")
|
||||
" VB SCRIPT
|
||||
syn include @htmlVbScript syntax/vb.vim
|
||||
unlet b:current_syntax
|
||||
syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
|
||||
endif
|
||||
|
||||
syn cluster htmlJavaScript add=@htmlPreproc
|
||||
|
||||
if main_syntax != 'java' || exists("java_css")
|
||||
" embedded style sheets
|
||||
syn keyword htmlArg contained media
|
||||
syn include @htmlCss syntax/css.vim
|
||||
unlet b:current_syntax
|
||||
syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
|
||||
syn match htmlCssStyleComment contained "\(<!--\|-->\)"
|
||||
syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc
|
||||
hi def link htmlStyleArg htmlString
|
||||
endif
|
||||
|
||||
if main_syntax == "html"
|
||||
" synchronizing (does not always work if a comment includes legal
|
||||
" html tags, but doing it right would mean to always start
|
||||
" at the first line, which is too slow)
|
||||
syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]"
|
||||
syn sync match htmlHighlight groupthere javaScript "<script"
|
||||
syn sync match htmlHighlightSkip "^.*['\"].*$"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" The default highlighting.
|
||||
hi def link htmlTag Function
|
||||
hi def link htmlEndTag Identifier
|
||||
hi def link htmlArg Type
|
||||
hi def link htmlTagName htmlStatement
|
||||
hi def link htmlSpecialTagName Exception
|
||||
hi def link htmlValue String
|
||||
hi def link htmlSpecialChar Special
|
||||
|
||||
if !exists("html_no_rendering")
|
||||
hi def link htmlH1 Title
|
||||
hi def link htmlH2 htmlH1
|
||||
hi def link htmlH3 htmlH2
|
||||
hi def link htmlH4 htmlH3
|
||||
hi def link htmlH5 htmlH4
|
||||
hi def link htmlH6 htmlH5
|
||||
hi def link htmlHead PreProc
|
||||
hi def link htmlTitle Title
|
||||
hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic
|
||||
hi def link htmlUnderlineBold htmlBoldUnderline
|
||||
hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic
|
||||
hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic
|
||||
hi def link htmlItalicUnderline htmlUnderlineItalic
|
||||
hi def link htmlItalicBold htmlBoldItalic
|
||||
hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic
|
||||
hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic
|
||||
hi def link htmlLink Underlined
|
||||
hi def link htmlLeadingSpace None
|
||||
if !exists("html_my_rendering")
|
||||
hi def htmlBold term=bold cterm=bold gui=bold
|
||||
hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
|
||||
hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
|
||||
hi def htmlUnderline term=underline cterm=underline gui=underline
|
||||
hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
|
||||
hi def htmlItalic term=italic cterm=italic gui=italic
|
||||
if v:version > 800 || v:version == 800 && has("patch1038")
|
||||
hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough
|
||||
else
|
||||
hi def htmlStrike term=underline cterm=underline gui=underline
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" HTML 5 tags
|
||||
syn keyword htmlTagName contained article aside audio canvas command
|
||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||
syn keyword htmlTagName contained template content shadow slot
|
||||
syn keyword htmlTagName contained wbr bdi
|
||||
syn keyword htmlTagName contained picture
|
||||
hi def link htmlPreStmt PreProc
|
||||
hi def link htmlPreError Error
|
||||
hi def link htmlPreProc PreProc
|
||||
hi def link htmlPreAttr String
|
||||
hi def link htmlPreProcAttrName PreProc
|
||||
hi def link htmlPreProcAttrError Error
|
||||
hi def link htmlSpecial Special
|
||||
hi def link htmlSpecialChar Special
|
||||
hi def link htmlString String
|
||||
hi def link htmlStatement Statement
|
||||
hi def link htmlComment Comment
|
||||
hi def link htmlCommentPart Comment
|
||||
hi def link htmlValue String
|
||||
hi def link htmlCommentError htmlError
|
||||
hi def link htmlTagError htmlError
|
||||
hi def link htmlEvent javaScript
|
||||
hi def link htmlError Error
|
||||
|
||||
" SVG tags
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" as found in http://www.w3.org/TR/SVG/eltindex.html
|
||||
syn keyword htmlTagName contained svg
|
||||
syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem
|
||||
syn keyword htmlTagName contained animate animateColor animateMotion animateTransform
|
||||
syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path
|
||||
syn keyword htmlTagName contained clipPath color-profile cursor
|
||||
syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject
|
||||
syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence
|
||||
syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri
|
||||
syn keyword htmlTagName contained glyph glyphRef hkern
|
||||
syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop
|
||||
syn keyword htmlTagName contained missing-glyph mpath
|
||||
syn keyword htmlTagName contained text textPath tref tspan vkern
|
||||
syn keyword htmlTagName contained metadata title
|
||||
|
||||
" MathML tags
|
||||
" https://www.w3.org/TR/MathML3/appendixi.html#index.elem
|
||||
syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth
|
||||
syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind
|
||||
syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes
|
||||
syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch
|
||||
syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication
|
||||
syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false
|
||||
syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary
|
||||
syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda
|
||||
syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt
|
||||
syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose
|
||||
syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv
|
||||
syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts
|
||||
syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow
|
||||
syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder
|
||||
syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or
|
||||
syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product
|
||||
syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev
|
||||
syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh
|
||||
syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union
|
||||
syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
|
||||
|
||||
" Custom Element
|
||||
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
|
||||
syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>"
|
||||
|
||||
" HTML 5 arguments
|
||||
" Core Attributes
|
||||
syn keyword htmlArg contained accesskey class contenteditable contextmenu dir
|
||||
syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate
|
||||
" Event-handler Attributes
|
||||
syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange
|
||||
syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover
|
||||
syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange
|
||||
syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata
|
||||
syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup
|
||||
syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange
|
||||
syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate
|
||||
syn keyword htmlArg contained onvolumechange onwaiting
|
||||
" XML Attributes
|
||||
syn keyword htmlArg contained xml:lang xml:space xml:base xmlns
|
||||
" new features
|
||||
" <body>
|
||||
syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload
|
||||
syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload
|
||||
" <video>, <audio>, <source>, <track>
|
||||
syn keyword htmlArg contained autoplay preload controls loop poster media kind charset srclang track playsinline
|
||||
" <form>, <input>, <button>
|
||||
syn keyword htmlArg contained form autocomplete autofocus list min max step
|
||||
syn keyword htmlArg contained formaction autofocus formenctype formmethod formtarget formnovalidate
|
||||
syn keyword htmlArg contained required placeholder pattern
|
||||
" <command>, <details>, <time>
|
||||
syn keyword htmlArg contained label icon open datetime-local pubdate
|
||||
" <script>
|
||||
syn keyword htmlArg contained async
|
||||
" <content>
|
||||
syn keyword htmlArg contained select
|
||||
" <iframe>
|
||||
syn keyword htmlArg contained seamless srcdoc sandbox allowfullscreen allowusermedia allowpaymentrequest allowpresentation
|
||||
" <picture>
|
||||
syn keyword htmlArg contained srcset sizes
|
||||
" <a>
|
||||
syn keyword htmlArg contained download media
|
||||
" <script>, <style>
|
||||
syn keyword htmlArg contained nonce
|
||||
" <area>, <a>, <img>, <iframe>, <link>
|
||||
syn keyword htmlArg contained referrerpolicy
|
||||
" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
|
||||
syn keyword htmlArg contained integrity crossorigin
|
||||
" <link>
|
||||
syn keyword htmlArg contained prefetch
|
||||
" syn keyword htmlArg contained preload
|
||||
" <img>
|
||||
syn keyword htmlArg contained decoding
|
||||
" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||
syn keyword htmlArg contained onselectstart onselectionchange
|
||||
" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
||||
syn keyword htmlArg contained loading
|
||||
|
||||
" Custom Data Attributes
|
||||
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes
|
||||
syn match htmlArg "\<data[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Vendor Extension Attributes
|
||||
" http://w3c.github.io/html/single-page.html#conformance-requirements-extensibility
|
||||
syn match htmlArg "\<x[-.0-9_a-z]*-[-.0-9_a-z]*\>" contained
|
||||
|
||||
" Microdata
|
||||
" http://dev.w3.org/html5/md/
|
||||
syn keyword htmlArg contained itemid itemscope itemtype itemprop itemref
|
||||
|
||||
" SVG
|
||||
" http://www.w3.org/TR/SVG/
|
||||
" Some common attributes from http://www.w3.org/TR/SVG/attindex.html
|
||||
syn keyword htmlArg contained accent-height accumulate additive alphabetic amplitude arabic-form ascent attributeName attributeType azimuth
|
||||
syn keyword htmlArg contained baseFrequency baseProfile bbox begin bias by
|
||||
syn keyword htmlArg contained calcMode cap-height class clipPathUnits contentScriptType contentStyleType cx cy
|
||||
syn keyword htmlArg contained d descent diffuseConstant divisor dur dx dy
|
||||
syn keyword htmlArg contained edgeMode elevation end exponent externalResourcesRequired
|
||||
syn keyword htmlArg contained fill filterRes filterUnits font-family font-size font-stretch font-style font-variant font-weight format format from fx fy
|
||||
syn keyword htmlArg contained g1 g2 glyph-name glyphRef gradientTransform gradientUnits
|
||||
syn keyword htmlArg contained hanging height horiz-adv-x horiz-origin-x horiz-origin-y
|
||||
syn keyword htmlArg contained id ideographic in in2 intercept
|
||||
syn keyword htmlArg contained k k1 k2 k3 k4 kernelMatrix kernelUnitLength keyPoints keySplines keyTimes
|
||||
syn keyword htmlArg contained lang lengthAdjust limitingConeAngle local
|
||||
syn keyword htmlArg contained markerHeight markerUnits markerWidth maskContentUnits maskUnits mathematical max media method min mode name
|
||||
syn keyword htmlArg contained numOctaves
|
||||
syn keyword htmlArg contained offset onabort onactivate onbegin onclick onend onerror onfocusin onfocusout onload onmousedown onmousemove onmouseout onmouseover onmouseup onrepeat onresize onscroll onunload onzoom operator order orient orientation origin overline-position overline-thickness
|
||||
syn keyword htmlArg contained panose-1 path pathLength patternContentUnits patternTransform patternUnits points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits
|
||||
syn keyword htmlArg contained r radius refX refY rendering-intent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry
|
||||
syn keyword htmlArg contained scale seed slope spacing specularConstant specularExponent spreadMethod startOffset stdDeviation stemh stemv stitchTiles strikethrough-position strikethrough-thickness string surfaceScale systemLanguage
|
||||
syn keyword htmlArg contained tableValues target targetX targetY textLength title to transform type
|
||||
syn keyword htmlArg contained u1 u2 underline-position underline-thickness unicode unicode-range units-per-em
|
||||
syn keyword htmlArg contained v-alphabetic v-hanging v-ideographic v-mathematical values version vert-adv-y vert-origin-x vert-origin-y viewBox viewTarget
|
||||
syn keyword htmlArg contained width widths
|
||||
syn keyword htmlArg contained x x-height x1 x2 xChannelSelector xlink:actuate xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space
|
||||
syn keyword htmlArg contained y y1 y2 yChannelSelector
|
||||
syn keyword htmlArg contained z zoomAndPan
|
||||
syn keyword htmlArg contained alignment-baseline baseline-shift clip-path clip-rule clip color-interpolation-filters color-interpolation color-profile color-rendering color cursor direction display dominant-baseline enable-background fill-opacity fill-rule fill filter flood-color flood-opacity font-family font-size-adjust font-size font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering stop-color stop-opacity stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width stroke text-anchor text-decoration text-rendering unicode-bidi visibility word-spacing writing-mode
|
||||
|
||||
" MathML attributes
|
||||
" https://www.w3.org/TR/MathML3/chapter2.html#interf.toplevel.atts
|
||||
syn keyword htmlArg contained accent accentunder actiontype align alignmentscope altimg altimg-height altimg-valign altimg-width alttext
|
||||
syn keyword htmlArg contained annotation-xml background base baseline bevelled cd cdgroup charalign charspacing close
|
||||
syn keyword htmlArg contained closure color columnalign columnalignment columnlines columnspacing columnspan columnwidth crossout decimalpoint
|
||||
syn keyword htmlArg contained definitionURL denomalign depth display displaystyle edge encoding equalcolumns equalrows fence
|
||||
syn keyword htmlArg contained fontfamily fontsize fontstyle fontweight form frame framespacing groupalign height indentalign
|
||||
syn keyword htmlArg contained indentalignfirst indentalignlast indentshift indentshiftfirst indentshiftlast indenttarget index infixlinebreakstyle integer largeop
|
||||
syn keyword htmlArg contained leftoverhang length linebreak linebreakmultchar linebreakstyle lineleading linethickness location longdivstyle lquote
|
||||
syn keyword htmlArg contained lspace ltr macros math mathbackground mathcolor mathsize mathvariant maxsize maxwidth
|
||||
syn keyword htmlArg contained mediummathspace menclose minlabelspacing minsize mode movablelimits msgroup mslinethickness name nargs
|
||||
syn keyword htmlArg contained newline notation numalign number occurrence open order other overflow position
|
||||
syn keyword htmlArg contained rightoverhang role rowalign rowlines rowspacing rowspan rquote rspace schemaLocation scope
|
||||
syn keyword htmlArg contained scriptlevel scriptminsize scriptsize scriptsizemultiplier selection separator separators shift side stackalign
|
||||
syn keyword htmlArg contained stretchy subscriptshift superscriptshift symmetric thickmathspace thinmathspace type valign verythickmathspace verythinmathspace
|
||||
syn keyword htmlArg contained veryverythickmathspace veryverythinmathspace voffset width xref
|
||||
hi def link javaScript Special
|
||||
hi def link javaScriptExpression javaScript
|
||||
hi def link htmlCssStyleComment Comment
|
||||
hi def link htmlCssDefinition Special
|
||||
|
||||
let b:current_syntax = "html"
|
||||
|
||||
@@ -211,5 +337,6 @@ endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'initng') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: initng .i files
|
||||
" Maintainer: Elan Ruusam<EFBFBD>e <glen@pld-linux.org>
|
||||
" Maintainer: Elan Ruusamäe <glen@pld-linux.org>
|
||||
" URL: http://glen.alkohol.ee/pld/initng/
|
||||
" License: GPL v2
|
||||
" Version: 0.13
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'iss') == -1
|
||||
" Vim syntax file
|
||||
" Language: Inno Setup File (iss file) and My InnoSetup extension
|
||||
" Maintainer: Jason Mills (jmills@cs.mun.ca)
|
||||
" Previous Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Previous Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" Last Change: 2019 Sep 27
|
||||
"
|
||||
" Todo:
|
||||
|
||||
@@ -76,7 +76,7 @@ syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juli
|
||||
syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
|
||||
|
||||
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
|
||||
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef
|
||||
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword
|
||||
syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
|
||||
syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
|
||||
|
||||
@@ -126,8 +126,14 @@ syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" c
|
||||
exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS'
|
||||
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=@juliaExpressions
|
||||
|
||||
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"'
|
||||
exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|const\|where\)\>"'
|
||||
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
|
||||
|
||||
" The import/export/using keywords introduce a sort of special parsing
|
||||
" environment with its own rules
|
||||
exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="'.s:nodot.'\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName'
|
||||
syntax match juliaAsKeyword display contained "\<as\>"
|
||||
|
||||
exec 'syntax match juliaRepKeyword display "'.s:nodot.'\<\%(break\|continue\)\>"'
|
||||
exec 'syntax region juliaConditionalBlock matchgroup=juliaConditional start="'.s:nodot.'\<if\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold'
|
||||
exec 'syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="'.s:nodot.'\<elseif\>" end="'.s:nodot.'\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock'
|
||||
@@ -139,17 +145,16 @@ exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nod
|
||||
exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable\s\+struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaLetBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<let\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaDoBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<do\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\%(\%(\.\s*\)\@'.s:d(6).'<!\|\%(@\s*\.\s*\)\@'.s:d(6).'<=\)\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold'
|
||||
exec 'syntax region juliaExceptionBlock matchgroup=juliaException start="'.s:nodot.'\<try\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold'
|
||||
exec 'syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<catch\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock'
|
||||
exec 'syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<finally\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions'
|
||||
exec 'syntax match juliaTypedef "'.s:nodot.'\<\%(abstract\|typealias\|bitstype\)\>"'
|
||||
" AbstractBlock needs to come after to take precedence
|
||||
exec 'syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<abstract type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions'
|
||||
exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<primitive type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions'
|
||||
exec 'syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<abstract\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions'
|
||||
exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<primitive\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions'
|
||||
|
||||
exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor'
|
||||
exec 'syntax match juliaComprehensionIf contained "'.s:nodot.'\<if\>"'
|
||||
@@ -275,7 +280,7 @@ syntax region juliatextString matchgroup=juliaStringDelim start=+\<text\z("\("
|
||||
syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
||||
syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
|
||||
|
||||
syntax region juliaDocString matchgroup=juliaDocStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||
syntax region juliaDocString matchgroup=juliaDocStringDelim fold start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
|
||||
|
||||
exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock'
|
||||
syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS
|
||||
@@ -333,13 +338,25 @@ exec 'syntax region juliaQuotedParBlock matchgroup=juliaQParDelim start="' . s
|
||||
exec 'syntax match juliaQuotedQMarkPar "' . s:quoting_colon . '(\s*?\s*)" contains=juliaQuotedQMark'
|
||||
exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions'
|
||||
|
||||
|
||||
" force precedence over Symbols
|
||||
syntax match juliaOperator display "::"
|
||||
|
||||
syntax region juliaCommentL matchgroup=juliaCommentDelim start="#\ze\%([^=]\|$\)" end="$" keepend contains=juliaTodo,@juliaSpellcheckComments
|
||||
syntax region juliaCommentM matchgroup=juliaCommentDelim start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax keyword juliaTodo contained TODO FIXME XXX
|
||||
|
||||
" detect an end-of-line with only whitespace or comments before it
|
||||
let s:eol = '\s*\%(\%(\%(#=\%(=#\@!\|[^=]\|\n\)\{-}=#\)\s*\)\+\)\?\%(#=\@!.*\)\?\n'
|
||||
|
||||
" a trailing comma, or colon, or an empty line in an import/using/export
|
||||
" multi-line command. Used to recognize the as keyword, and for indentation
|
||||
" (this needs to take precedence over normal commas and colons, and comments)
|
||||
syntax cluster juliaContinuationItems contains=juliaContinuationComma,juliaContinuationColon,juliaContinuationNone
|
||||
exec 'syntax region juliaContinuationComma matchgroup=juliaComma contained start=",\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
|
||||
exec 'syntax region juliaContinuationColon matchgroup=juliaColon contained start=":\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems'
|
||||
exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword'
|
||||
exec 'syntax match juliaMacroName "@' . s:idregex . '\%(\.' . s:idregex . '\)*"'
|
||||
|
||||
" the following are disabled by default, but
|
||||
" can be enabled by entering e.g.
|
||||
@@ -350,15 +367,17 @@ hi def link juliaComma juliaNone
|
||||
|
||||
hi def link juliaColon juliaOperator
|
||||
|
||||
hi def link juliaMacroName juliaMacro
|
||||
|
||||
|
||||
hi def link juliaKeyword Keyword
|
||||
hi def link juliaInfixKeyword Keyword
|
||||
hi def link juliaAsKeyword Keyword
|
||||
hi def link juliaRepKeyword Keyword
|
||||
hi def link juliaBlKeyword Keyword
|
||||
hi def link juliaConditional Conditional
|
||||
hi def link juliaRepeat Repeat
|
||||
hi def link juliaException Exception
|
||||
hi def link juliaTypedef Keyword
|
||||
hi def link juliaOuter Keyword
|
||||
hi def link juliaBaseTypeBasic Type
|
||||
hi def link juliaBaseTypeNum Type
|
||||
|
||||
@@ -4,14 +4,13 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1
|
||||
" Language: less
|
||||
" Maintainer: Alessandro Vioni <jenoma@gmail.com>
|
||||
" URL: https://github.com/genoma/vim-less
|
||||
" Last Change: 2014 November 24
|
||||
" Last Change: 2020 Sep 29
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/css.vim
|
||||
runtime! after/syntax/css.vim
|
||||
|
||||
syn case ignore
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lout') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Lout
|
||||
" Maintainer: Christian V. J. Br<EFBFBD>ssow <cvjb@cvjb.de>
|
||||
" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
|
||||
" Last Change: So 12 Feb 2012 15:15:03 CET
|
||||
" Filenames: *.lout,*.lt
|
||||
" URL: http://www.cvjb.de/comp/vim/lout.vim
|
||||
|
||||
148
syntax/make.vim
Normal file
148
syntax/make.vim
Normal file
@@ -0,0 +1,148 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Makefile
|
||||
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
|
||||
" Last Change: 2020 May 03
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" some special characters
|
||||
syn match makeSpecial "^\s*[@+-]\+"
|
||||
syn match makeNextLine "\\\n\s*"
|
||||
|
||||
" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend
|
||||
syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$"
|
||||
\ contains=makeStatement,makeIdent,makePreCondit,makeDefine
|
||||
|
||||
" Microsoft Makefile specials
|
||||
syn case ignore
|
||||
syn match makeInclude "^!\s*include\s.*$"
|
||||
syn match makePreCondit "^!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|else\s*if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
|
||||
syn case match
|
||||
|
||||
" identifiers
|
||||
syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent
|
||||
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent
|
||||
syn match makeIdent "\$\$\w*"
|
||||
syn match makeIdent "\$[^({]"
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*[:+?!*]="me=e-2
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*::="me=e-3
|
||||
syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1
|
||||
syn match makeIdent "%"
|
||||
|
||||
" Makefile.in variables
|
||||
syn match makeConfig "@[A-Za-z0-9_]\+@"
|
||||
|
||||
" make targets
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget
|
||||
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1
|
||||
\ end=";"re=e-1,me=e-1 end="[^\\]$"
|
||||
\ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString
|
||||
\ skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$"
|
||||
\ contains=makeIdent,makeSpecTarget,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn region makeSpecTarget transparent matchgroup=makeSpecTarget
|
||||
\ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1
|
||||
\ end="[^\\]$" keepend
|
||||
\ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands
|
||||
syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$"
|
||||
\ contains=makeIdent,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
syn match makeCommandError "^\s\+\S.*" contained
|
||||
syn region makeCommands contained start=";"hs=s+1 start="^\t"
|
||||
\ end="^[^\t#]"me=e-1,re=e-1 end="^$"
|
||||
\ contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString
|
||||
\ nextgroup=makeCommandError
|
||||
syn match makeCmdNextLine "\\\n."he=e-1 contained
|
||||
|
||||
" some directives
|
||||
syn match makePreCondit "^ *\(ifn\=\(eq\|def\)\>\|else\(\s\+ifn\=\(eq\|def\)\)\=\>\|endif\>\)"
|
||||
syn match makeInclude "^ *[-s]\=include\s.*$"
|
||||
syn match makeStatement "^ *vpath"
|
||||
syn match makeExport "^ *\(export\|unexport\)\>"
|
||||
syn match makeOverride "^ *override\>"
|
||||
" Statements / Functions (GNU make)
|
||||
syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1
|
||||
|
||||
" Comment
|
||||
if exists("make_microsoft")
|
||||
syn match makeComment "#.*" contains=@Spell,makeTodo
|
||||
elseif !exists("make_no_comments")
|
||||
syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo
|
||||
syn match makeComment "#$" contains=@Spell
|
||||
endif
|
||||
syn keyword makeTodo TODO FIXME XXX contained
|
||||
|
||||
" match escaped quotes and any other escaped character
|
||||
" except for $, as a backslash in front of a $ does
|
||||
" not make it a standard character, but instead it will
|
||||
" still act as the beginning of a variable
|
||||
" The escaped char is not highlightet currently
|
||||
syn match makeEscapedChar "\\[^$]"
|
||||
|
||||
|
||||
syn region makeDString start=+\(\\\)\@<!"+ skip=+\\.+ end=+"+ contained contains=makeIdent
|
||||
syn region makeSString start=+\(\\\)\@<!'+ skip=+\\.+ end=+'+ contained contains=makeIdent
|
||||
syn region makeBString start=+\(\\\)\@<!`+ skip=+\\.+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine
|
||||
|
||||
" Syncing
|
||||
syn sync minlines=20 maxlines=200
|
||||
|
||||
" Sync on Make command block region: When searching backwards hits a line that
|
||||
" can't be a command or a comment, use makeCommands if it looks like a target,
|
||||
" NONE otherwise.
|
||||
syn sync match makeCommandSync groupthere NONE "^[^\t#]"
|
||||
syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"
|
||||
syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link makeNextLine makeSpecial
|
||||
hi def link makeCmdNextLine makeSpecial
|
||||
hi link makeOverride makeStatement
|
||||
hi link makeExport makeStatement
|
||||
|
||||
hi def link makeSpecTarget Statement
|
||||
if !exists("make_no_commands")
|
||||
hi def link makeCommands Number
|
||||
endif
|
||||
hi def link makeImplicit Function
|
||||
hi def link makeTarget Function
|
||||
hi def link makeInclude Include
|
||||
hi def link makePreCondit PreCondit
|
||||
hi def link makeStatement Statement
|
||||
hi def link makeIdent Identifier
|
||||
hi def link makeSpecial Special
|
||||
hi def link makeComment Comment
|
||||
hi def link makeDString String
|
||||
hi def link makeSString String
|
||||
hi def link makeBString Function
|
||||
hi def link makeError Error
|
||||
hi def link makeTodo Todo
|
||||
hi def link makeDefine Define
|
||||
hi def link makeCommandError Error
|
||||
hi def link makeConfig PreCondit
|
||||
|
||||
let b:current_syntax = "make"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8
|
||||
|
||||
endif
|
||||
@@ -97,7 +97,7 @@ if exists("moo_unknown_builtin_functions")
|
||||
syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained
|
||||
endif
|
||||
|
||||
"<EFBFBD>Enclosed expressions
|
||||
" Enclosed expressions
|
||||
syn match mooUnenclosedError display ~[')\]|}]~
|
||||
syn match mooParenthesesError display ~[';\]|}]~ contained
|
||||
syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError
|
||||
|
||||
@@ -14,7 +14,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'n1ql') == -1
|
||||
" Questions, comments: <n1ql AT cime.net>
|
||||
" https://ciurana.eu/pgp, https://keybase.io/pr3d4t0r
|
||||
"
|
||||
" vim: set encoding=utf-8:
|
||||
" vim: :
|
||||
|
||||
|
||||
if exists("b:current_syntax")
|
||||
|
||||
@@ -2,30 +2,30 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nim') == -1
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
if v:version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
elseif exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Keep user-supplied options
|
||||
if !exists("nim_highlight_numbers")
|
||||
if !exists('nim_highlight_numbers')
|
||||
let nim_highlight_numbers = 1
|
||||
endif
|
||||
if !exists("nim_highlight_builtins")
|
||||
if !exists('nim_highlight_builtins')
|
||||
let nim_highlight_builtins = 1
|
||||
endif
|
||||
if !exists("nim_highlight_exceptions")
|
||||
if !exists('nim_highlight_exceptions')
|
||||
let nim_highlight_exceptions = 1
|
||||
endif
|
||||
if !exists("nim_highlight_space_errors")
|
||||
if !exists('nim_highlight_space_errors')
|
||||
let nim_highlight_space_errors = 1
|
||||
endif
|
||||
if !exists("nim_highlight_special_vars")
|
||||
if !exists('nim_highlight_special_vars')
|
||||
let nim_highlight_special_vars = 1
|
||||
endif
|
||||
|
||||
if exists("nim_highlight_all")
|
||||
if exists('nim_highlight_all')
|
||||
let nim_highlight_numbers = 1
|
||||
let nim_highlight_builtins = 1
|
||||
let nim_highlight_exceptions = 1
|
||||
@@ -158,8 +158,8 @@ syn sync match nimSync grouphere NONE "):$"
|
||||
syn sync maxlines=200
|
||||
syn sync minlines=2000
|
||||
|
||||
if version >= 508 || !exists("did_nim_syn_inits")
|
||||
if version <= 508
|
||||
if v:version >= 508 || !exists('did_nim_syn_inits')
|
||||
if v:version <= 508
|
||||
let did_nim_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
@@ -202,7 +202,7 @@ if version >= 508 || !exists("did_nim_syn_inits")
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "nim"
|
||||
let b:current_syntax = 'nim'
|
||||
|
||||
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
|
||||
|
||||
" VIM syntax file
|
||||
" Language: nroff/groff
|
||||
" Maintainer: Pedro Alejandro L<EFBFBD>pez-Valencia <palopezv@gmail.com>
|
||||
" Maintainer: Pedro Alejandro López-Valencia <palopezv@gmail.com>
|
||||
" URL: http://vorbote.wordpress.com/
|
||||
" Last Change: 2012 Feb 2
|
||||
"
|
||||
@@ -10,7 +10,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1
|
||||
"
|
||||
" ACKNOWLEDGEMENTS:
|
||||
"
|
||||
" My thanks to J<EFBFBD>r<EFBFBD>me Pl<EFBFBD>t <Jerome.Plut@ens.fr>, who was the
|
||||
" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the
|
||||
" creator and maintainer of this syntax file for several years.
|
||||
" May I be as good at it as he has been.
|
||||
"
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1
|
||||
" Language: Pascal
|
||||
" Version: 2.8
|
||||
" Last Change: 2004/10/17 17:47:30
|
||||
" Maintainer: Xavier Cr<EFBFBD>gut <xavier.cregut@enseeiht.fr>
|
||||
" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr>
|
||||
" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt>
|
||||
|
||||
" Contributors: Tim Chase <tchase@csc.com>,
|
||||
|
||||
@@ -63,7 +63,7 @@ syn keyword qmlLabel case default
|
||||
syn keyword qmlException try catch finally throw
|
||||
syn keyword qmlMessage alert confirm prompt status
|
||||
syn keyword qmlGlobal self
|
||||
syn keyword qmlDeclaration property signal readonly
|
||||
syn keyword qmlDeclaration property signal component readonly required
|
||||
syn keyword qmlReserved abstract boolean byte char class const debugger enum export extends final float goto implements import interface long native package pragma private protected public short static super synchronized throws transient volatile
|
||||
|
||||
if get(g:, 'qml_fold', 0)
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1
|
||||
" Vim syntax file
|
||||
" Language: R noweb Files
|
||||
" Maintainer: Johannes Ranke <jranke@uni-bremen.de>
|
||||
" Last Change: 2007 M<EFBFBD>r 30
|
||||
" Last Change: 2007 Mär 30
|
||||
" Version: 0.8
|
||||
" SVN: $Id: rnoweb.vim 69 2007-03-30 08:55:36Z ranke $
|
||||
" Remarks: - This file is inspired by the proposal of
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'robots') == -1
|
||||
" Vim syntax file
|
||||
" Language: "Robots.txt" files
|
||||
" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed.
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/robots.zip
|
||||
" Last change: 2001 May 09
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1
|
||||
" Language: RPL/2
|
||||
" Version: 0.15.15 against RPL/2 version 4.00pre7i
|
||||
" Last Change: 2012 Feb 03 by Thilo Six
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim
|
||||
" Credits: Nothing
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rtf') == -1
|
||||
" .hlp (windows help files) use compiled rtf files
|
||||
" rtf documentation at http://night.primate.wisc.edu/software/RTF/
|
||||
"
|
||||
" Maintainer: Dominique St<EFBFBD>phan (dominique@mggen.com)
|
||||
" Maintainer: Dominique Stéphan (dominique@mggen.com)
|
||||
" URL: http://www.mggen.com/vim/syntax/rtf.zip
|
||||
" Last change: 2001 Mai 02
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: sbt
|
||||
" Maintainer: Derek Wyatt <derek@{myfirstname}{mylastname}.org>
|
||||
" Last Change: 2013 Oct 20
|
||||
" Language: sbt
|
||||
" Maintainer: Steven Dobay <stevendobay at protonmail.com>
|
||||
" Last Change: 2017.04.30
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -17,7 +17,6 @@ syn match sbtStringEscape "\\[nrfvb\\\"]" contained
|
||||
|
||||
syn match sbtIdentitifer "^\S\+\ze\s*\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
syn match sbtBeginningSeq "^[Ss]eq\>"
|
||||
syn match sbtAddPlugin "^addSbtPlugin\>"
|
||||
|
||||
syn match sbtSpecial "\(:=\|++=\|+=\|<<=\|<+=\)"
|
||||
|
||||
@@ -28,10 +27,10 @@ syn region sbtDocComment start="/\*\*" end="\*/" keepend
|
||||
hi link sbtString String
|
||||
hi link sbtIdentitifer Keyword
|
||||
hi link sbtBeginningSeq Keyword
|
||||
hi link sbtAddPlugin Keyword
|
||||
hi link sbtSpecial Special
|
||||
hi link sbtComment Comment
|
||||
hi link sbtLineComment Comment
|
||||
hi link sbtDocComment Comment
|
||||
|
||||
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tilde') == -1
|
||||
" Vim syntax file
|
||||
" This file works only for Vim6.x
|
||||
" Language: Tilde
|
||||
" Maintainer: Tobias Rundstr<EFBFBD>m <tobi@tildesoftware.net>
|
||||
" Maintainer: Tobias Rundström <tobi@tildesoftware.net>
|
||||
" URL: http://www.tildesoftware.net
|
||||
" CVS: $Id: tilde.vim,v 1.1 2004/06/13 19:31:51 vimboss Exp $
|
||||
|
||||
|
||||
1032
syntax/vim.vim
1032
syntax/vim.vim
File diff suppressed because it is too large
Load Diff
209
syntax/xf86conf.vim
Normal file
209
syntax/xf86conf.vim
Normal file
@@ -0,0 +1,209 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" This is a GENERATED FILE. Please always refer to source file at the URI below.
|
||||
" Language: XF86Config (XFree86 configuration file)
|
||||
" Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Last Change: 2010 Nov 01
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim
|
||||
" Required Vim Version: 6.0
|
||||
"
|
||||
" Options: let xf86conf_xfree86_version = 3 or 4
|
||||
" to force XFree86 3.x or 4.x XF86Config syntax
|
||||
|
||||
" Setup
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("b:xf86conf_xfree86_version")
|
||||
if exists("xf86conf_xfree86_version")
|
||||
let b:xf86conf_xfree86_version = xf86conf_xfree86_version
|
||||
else
|
||||
let b:xf86conf_xfree86_version = 4
|
||||
endif
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
" Comments
|
||||
syn match xf86confComment "#.*$" contains=xf86confTodo
|
||||
syn case match
|
||||
syn keyword xf86confTodo FIXME TODO XXX NOT contained
|
||||
syn case ignore
|
||||
syn match xf86confTodo "???" contained
|
||||
|
||||
" Sectioning errors
|
||||
syn keyword xf86confSectionError Section contained
|
||||
syn keyword xf86confSectionError EndSection
|
||||
syn keyword xf86confSubSectionError SubSection
|
||||
syn keyword xf86confSubSectionError EndSubSection
|
||||
syn keyword xf86confModeSubSectionError Mode
|
||||
syn keyword xf86confModeSubSectionError EndMode
|
||||
syn cluster xf86confSectionErrors contains=xf86confSectionError,xf86confSubSectionError,xf86confModeSubSectionError
|
||||
|
||||
" Values
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confConstant,xf86confOptionName oneline keepend nextgroup=xf86confValue skipwhite
|
||||
else
|
||||
syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confOptionName oneline keepend
|
||||
endif
|
||||
syn match xf86confSpecialChar "\\\d\d\d\|\\." contained
|
||||
syn match xf86confDecimalNumber "\(\s\|-\)\zs\d*\.\=\d\+\>"
|
||||
syn match xf86confFrequency "\(\s\|-\)\zs\d\+\.\=\d*\(Hz\|k\|kHz\|M\|MHz\)"
|
||||
syn match xf86confOctalNumber "\<0\o\+\>"
|
||||
syn match xf86confOctalNumberError "\<0\o\+[89]\d*\>"
|
||||
syn match xf86confHexadecimalNumber "\<0x\x\+\>"
|
||||
syn match xf86confValue "\s\+.*$" contained contains=xf86confComment,xf86confString,xf86confFrequency,xf86conf\w\+Number,xf86confConstant
|
||||
syn keyword xf86confOption Option nextgroup=xf86confString skipwhite
|
||||
syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf86confSync skipwhite skipnl
|
||||
|
||||
" Sections and subsections
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError
|
||||
syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment
|
||||
syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
else
|
||||
syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMX matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Module\|Xinput\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword
|
||||
syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors
|
||||
endif
|
||||
|
||||
" Options
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained
|
||||
else
|
||||
command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained nextgroup=xf86confValue,xf86confComment skipwhite
|
||||
endif
|
||||
|
||||
Xf86confdeclopt 18bitBus AGPFastWrite AGPMode Accel AllowClosedownGrabs AllowDeactivateGrabs
|
||||
Xf86confdeclopt AllowMouseOpenFail AllowNonLocalModInDev AllowNonLocalXvidtune AlwaysCore
|
||||
Xf86confdeclopt AngleOffset AutoRepeat BaudRate BeamTimeout Beep BlankTime BlockWrite BottomX
|
||||
Xf86confdeclopt BottomY ButtonNumber ButtonThreshold Buttons ByteSwap CacheLines ChordMiddle
|
||||
Xf86confdeclopt ClearDTR ClearDTS ClickMode CloneDisplay CloneHSync CloneMode CloneVRefresh
|
||||
Xf86confdeclopt ColorKey Composite CompositeSync CoreKeyboard CorePointer Crt2Memory CrtScreen
|
||||
Xf86confdeclopt CrtcNumber CyberShadow CyberStretch DDC DDCMode DMAForXv DPMS Dac6Bit DacSpeed
|
||||
Xf86confdeclopt DataBits Debug DebugLevel DefaultServerLayout DeltaX DeltaY Device DeviceName
|
||||
Xf86confdeclopt DisableModInDev DisableVidModeExtension Display Display1400 DontVTSwitch
|
||||
Xf86confdeclopt DontZap DontZoom DoubleScan DozeMode DozeScan DozeTime DragLockButtons
|
||||
Xf86confdeclopt DualCount DualRefresh EarlyRasPrecharge Emulate3Buttons Emulate3Timeout
|
||||
Xf86confdeclopt EmulateWheel EmulateWheelButton EmulateWheelInertia EnablePageFlip EnterCount
|
||||
Xf86confdeclopt EstimateSizesAggressively ExternDisp FPClock16 FPClock24 FPClock32
|
||||
Xf86confdeclopt FPClock8 FPDither FastDram FifoAggresive FifoConservative FifoModerate
|
||||
Xf86confdeclopt FireGL3000 FixPanelSize FlatPanel FlipXY FlowControl ForceCRT1 ForceCRT2Type
|
||||
Xf86confdeclopt ForceLegacyCRT ForcePCIMode FpmVRAM FrameBufferWC FullMMIO GammaBrightness
|
||||
Xf86confdeclopt HWClocks HWCursor HandleSpecialKeys HistorySize Interlace Interlaced InternDisp
|
||||
Xf86confdeclopt InvX InvY InvertX InvertY KeepShape LCDClock LateRasPrecharge LcdCenter
|
||||
Xf86confdeclopt LeftAlt Linear MGASDRAM MMIO MMIOCache MTTR MaxX MaxY MaximumXPosition
|
||||
Xf86confdeclopt MaximumYPosition MinX MinY MinimumXPosition MinimumYPosition NoAccel
|
||||
Xf86confdeclopt NoAllowMouseOpenFail NoAllowNonLocalModInDev NoAllowNonLocalXvidtune
|
||||
Xf86confdeclopt NoBlockWrite NoCompositeSync NoCompression NoCrtScreen NoCyberShadow NoDCC
|
||||
Xf86confdeclopt NoDDC NoDac6Bit NoDebug NoDisableModInDev NoDisableVidModeExtension NoDontZap
|
||||
Xf86confdeclopt NoDontZoom NoFireGL3000 NoFixPanelSize NoFpmVRAM NoFrameBufferWC NoHWClocks
|
||||
Xf86confdeclopt NoHWCursor NoHal NoLcdCenter NoLinear NoMGASDRAM NoMMIO NoMMIOCache NoMTTR
|
||||
Xf86confdeclopt NoOverClockMem NoOverlay NoPC98 NoPM NoPciBurst NoPciRetry NoProbeClock
|
||||
Xf86confdeclopt NoSTN NoSWCursor NoShadowFb NoShowCache NoSlowEDODRAM NoStretch NoSuspendHack
|
||||
Xf86confdeclopt NoTexturedVideo NoTrapSignals NoUseFBDev NoUseModeline NoUseVclk1 NoVTSysReq
|
||||
Xf86confdeclopt NoXVideo NvAGP OSMImageBuffers OffTime Origin OverClockMem Overlay
|
||||
Xf86confdeclopt PC98 PCIBurst PM PWMActive PWMSleep PanelDelayCompensation PanelHeight
|
||||
Xf86confdeclopt PanelOff PanelWidth Parity PciBurst PciRetry Pixmap Port PressDur PressPitch
|
||||
Xf86confdeclopt PressVol ProbeClocks ProgramFPRegs Protocol RGBBits ReleaseDur ReleasePitch
|
||||
Xf86confdeclopt ReportingMode Resolution RightAlt RightCtl Rotate STN SWCursor SampleRate
|
||||
Xf86confdeclopt ScreenNumber ScrollLock SendCoreEvents SendDragEvents Serial ServerNumLock
|
||||
Xf86confdeclopt SetLcdClk SetMClk SetRefClk ShadowFb ShadowStatus ShowCache SleepMode
|
||||
Xf86confdeclopt SleepScan SleepTime SlowDram SlowEDODRAM StandbyTime StopBits Stretch
|
||||
Xf86confdeclopt SuspendHack SuspendTime SwapXY SyncOnGreen TV TVOutput TVOverscan TVStandard
|
||||
Xf86confdeclopt TVXPosOffset TVYPosOffset TexturedVideo Threshold Tilt TopX TopY TouchTime
|
||||
Xf86confdeclopt TrapSignals Type USB UseBIOS UseFB UseFBDev UseFlatPanel UseModeline
|
||||
Xf86confdeclopt UseROMData UseVclk1 VTInit VTSysReq VTime VideoKey Vmin XAxisMapping
|
||||
Xf86confdeclopt XLeds XVideo XaaNoCPUToScreenColorExpandFill XaaNoColor8x8PatternFillRect
|
||||
Xf86confdeclopt XaaNoColor8x8PatternFillTrap XaaNoDashedBresenhamLine XaaNoDashedTwoPointLine
|
||||
Xf86confdeclopt XaaNoImageWriteRect XaaNoMono8x8PatternFillRect XaaNoMono8x8PatternFillTrap
|
||||
Xf86confdeclopt XaaNoOffscreenPixmaps XaaNoPixmapCache XaaNoScanlineCPUToScreenColorExpandFill
|
||||
Xf86confdeclopt XaaNoScanlineImageWriteRect XaaNoScreenToScreenColorExpandFill
|
||||
Xf86confdeclopt XaaNoScreenToScreenCopy XaaNoSolidBresenhamLine XaaNoSolidFillRect
|
||||
Xf86confdeclopt XaaNoSolidFillTrap XaaNoSolidHorVertLine XaaNoSolidTwoPointLine Xinerama
|
||||
Xf86confdeclopt XkbCompat XkbDisable XkbGeometry XkbKeycodes XkbKeymap XkbLayout XkbModel
|
||||
Xf86confdeclopt XkbOptions XkbRules XkbSymbols XkbTypes XkbVariant XvBskew XvHsync XvOnCRT2
|
||||
Xf86confdeclopt XvRskew XvVsync YAxisMapping ZAxisMapping ZoomOnLCD
|
||||
|
||||
delcommand Xf86confdeclopt
|
||||
|
||||
" Keywords
|
||||
syn keyword xf86confKeyword Device Driver FontPath Group Identifier Load ModelName ModulePath Monitor RGBPath VendorName VideoAdaptor Visual nextgroup=xf86confComment,xf86confString skipwhite
|
||||
syn keyword xf86confKeyword BiosBase Black BoardName BusID ChipID ChipRev Chipset nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword ClockChip Clocks DacSpeed DefaultDepth DefaultFbBpp nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword DefaultColorDepth nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Depth DisplaySize DotClock FbBpp Flags Gamma HorizSync nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Modes Ramdac Screen TextClockFreq UseModes VendorName nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword VertRefresh VideoRam ViewPort Virtual VScan VTimings nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confKeyword Weight White nextgroup=xf86confComment,xf86confValue
|
||||
syn keyword xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl
|
||||
|
||||
" Constants
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn keyword xf86confConstant true false on off yes no omit contained
|
||||
else
|
||||
syn keyword xf86confConstant Meta Compose Control
|
||||
endif
|
||||
syn keyword xf86confConstant StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained
|
||||
syn keyword xf86confConstant Absolute RightOf LeftOf Above Below Relative StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained
|
||||
syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained
|
||||
|
||||
" Synchronization
|
||||
if b:xf86conf_xfree86_version >= 4
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Extensions\|Vendor\|Keyboard\|Pointer\|InputClass\)\""
|
||||
syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\""
|
||||
syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\""
|
||||
else
|
||||
syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\""
|
||||
syn sync match xf86confSyncSectionMX grouphere xf86confSectionMX "^\s*Section\s\+\"\(Module\|Xinput\)\""
|
||||
endif
|
||||
syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\""
|
||||
syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\""
|
||||
syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$"
|
||||
|
||||
" Define the default highlighting
|
||||
hi def link xf86confComment Comment
|
||||
hi def link xf86confTodo Todo
|
||||
hi def link xf86confSectionDelim Statement
|
||||
hi def link xf86confOptionName Identifier
|
||||
|
||||
hi def link xf86confSectionError xf86confError
|
||||
hi def link xf86confSubSectionError xf86confError
|
||||
hi def link xf86confModeSubSectionError xf86confError
|
||||
hi def link xf86confOctalNumberError xf86confError
|
||||
hi def link xf86confError Error
|
||||
|
||||
hi def link xf86confOption xf86confKeyword
|
||||
hi def link xf86confModeLine xf86confKeyword
|
||||
hi def link xf86confKeyword Type
|
||||
|
||||
hi def link xf86confDecimalNumber xf86confNumber
|
||||
hi def link xf86confOctalNumber xf86confNumber
|
||||
hi def link xf86confHexadecimalNumber xf86confNumber
|
||||
hi def link xf86confFrequency xf86confNumber
|
||||
hi def link xf86confModeLineValue Constant
|
||||
hi def link xf86confNumber Constant
|
||||
|
||||
hi def link xf86confSync xf86confConstant
|
||||
hi def link xf86confConstant Special
|
||||
hi def link xf86confSpecialChar Special
|
||||
hi def link xf86confString String
|
||||
|
||||
hi def link xf86confValue Constant
|
||||
|
||||
let b:current_syntax = "xf86conf"
|
||||
|
||||
endif
|
||||
142
syntax/xpm.vim
Normal file
142
syntax/xpm.vim
Normal file
@@ -0,0 +1,142 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xpm') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: X Pixmap
|
||||
" Maintainer: Ronald Schild <rs@scutum.de>
|
||||
" Last Change: 2017 Feb 01
|
||||
" Version: 5.4n.1
|
||||
" Jemma Nelson added termguicolors support
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn keyword xpmType char
|
||||
syn keyword xpmStorageClass static
|
||||
syn keyword xpmTodo TODO FIXME XXX contained
|
||||
syn region xpmComment start="/\*" end="\*/" contains=xpmTodo
|
||||
syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmColors
|
||||
|
||||
if has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
let color = ""
|
||||
let chars = ""
|
||||
let colors = 0
|
||||
let cpp = 0
|
||||
let n = 0
|
||||
let i = 1
|
||||
|
||||
while i <= line("$") " scanning all lines
|
||||
|
||||
let s = matchstr(getline(i), '".\{-1,}"')
|
||||
if s != "" " does line contain a string?
|
||||
|
||||
if n == 0 " first string is the Values string
|
||||
|
||||
" get the 3rd value: colors = number of colors
|
||||
let colors = substitute(s, '"\s*\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
|
||||
" get the 4th value: cpp = number of character per pixel
|
||||
let cpp = substitute(s, '"\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '')
|
||||
if cpp =~ '[^0-9]'
|
||||
break " if cpp is not made of digits there must be something wrong
|
||||
endif
|
||||
|
||||
" Highlight the Values string as normal string (no pixel string).
|
||||
" Only when there is no slash, it would terminate the pattern.
|
||||
if s !~ '/'
|
||||
exe 'syn match xpmValues /' . s . '/'
|
||||
endif
|
||||
hi link xpmValues String
|
||||
|
||||
let n = 1 " n = color index
|
||||
|
||||
elseif n <= colors " string is a color specification
|
||||
|
||||
" get chars = <cpp> length string representing the pixels
|
||||
" (first incl. the following whitespace)
|
||||
let chars = substitute(s, '"\(.\{'.cpp.'}\s\).*"', '\1', '')
|
||||
|
||||
" now get color, first try 'c' key if any (color visual)
|
||||
let color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" no 'c' key, try 'g' key (grayscale with more than 4 levels)
|
||||
let color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" next try: 'g4' key (4-level grayscale)
|
||||
let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
" finally try 'm' key (mono visual)
|
||||
let color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '')
|
||||
if color == s
|
||||
let color = ""
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Vim cannot handle RGB codes with more than 6 hex digits
|
||||
if color =~ '#\x\{10,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g')
|
||||
elseif color =~ '#\x\{7,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x', '\1', 'g')
|
||||
" nor with 3 digits
|
||||
elseif color =~ '#\x\{3}$'
|
||||
let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '')
|
||||
endif
|
||||
|
||||
" escape meta characters in patterns
|
||||
let s = escape(s, '/\*^$.~[]')
|
||||
let chars = escape(chars, '/\*^$.~[]')
|
||||
|
||||
" now create syntax items
|
||||
" highlight the color string as normal string (no pixel string)
|
||||
exe 'syn match xpmCol'.n.'Def /'.s.'/ contains=xpmCol'.n.'inDef'
|
||||
exe 'hi link xpmCol'.n.'Def String'
|
||||
|
||||
" but highlight the first whitespace after chars in its color
|
||||
exe 'syn match xpmCol'.n.'inDef /"'.chars.'/hs=s+'.(cpp+1).' contained'
|
||||
exe 'hi link xpmCol'.n.'inDef xpmColor'.n
|
||||
|
||||
" remove the following whitespace from chars
|
||||
let chars = substitute(chars, '.$', '', '')
|
||||
|
||||
" and create the syntax item contained in the pixel strings
|
||||
exe 'syn match xpmColor'.n.' /'.chars.'/ contained'
|
||||
exe 'syn cluster xpmColors add=xpmColor'.n
|
||||
|
||||
" if no color or color = "None" show background
|
||||
if color == "" || substitute(color, '.*', '\L&', '') == 'none'
|
||||
exe 'hi xpmColor'.n.' guifg=bg'
|
||||
exe 'hi xpmColor'.n.' guibg=NONE'
|
||||
elseif color !~ "'"
|
||||
exe 'hi xpmColor'.n." guifg='".color."'"
|
||||
exe 'hi xpmColor'.n." guibg='".color."'"
|
||||
endif
|
||||
let n = n + 1
|
||||
else
|
||||
break " no more color string
|
||||
endif
|
||||
endif
|
||||
let i = i + 1
|
||||
endwhile
|
||||
|
||||
unlet color chars colors cpp n i s
|
||||
|
||||
endif " has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
|
||||
hi def link xpmType Type
|
||||
hi def link xpmStorageClass StorageClass
|
||||
hi def link xpmTodo Todo
|
||||
hi def link xpmComment Comment
|
||||
hi def link xpmPixelString String
|
||||
|
||||
|
||||
let b:current_syntax = "xpm"
|
||||
|
||||
" vim: ts=8:sw=3:noet:
|
||||
|
||||
endif
|
||||
157
syntax/xpm2.vim
Normal file
157
syntax/xpm2.vim
Normal file
@@ -0,0 +1,157 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xpm2') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: X Pixmap v2
|
||||
" Maintainer: Steve Wall (hitched97@velnet.com)
|
||||
" Last Change: 2017 Feb 01
|
||||
" (Dominique Pelle added @Spell)
|
||||
" Version: 5.8
|
||||
" Jemma Nelson added termguicolors support
|
||||
"
|
||||
" Made from xpm.vim by Ronald Schild <rs@scutum.de>
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors
|
||||
syn keyword xpm2Todo TODO FIXME XXX contained
|
||||
syn match xpm2Comment "\!.*$" contains=@Spell,xpm2Todo
|
||||
|
||||
|
||||
command -nargs=+ Hi hi def <args>
|
||||
|
||||
if has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
let color = ""
|
||||
let chars = ""
|
||||
let colors = 0
|
||||
let cpp = 0
|
||||
let n = 0
|
||||
let i = 1
|
||||
|
||||
while i <= line("$") " scanning all lines
|
||||
|
||||
let s = getline(i)
|
||||
if match(s,"\!.*$") != -1
|
||||
let s = matchstr(s, "^[^\!]*")
|
||||
endif
|
||||
if s != "" " does line contain a string?
|
||||
|
||||
if n == 0 " first string is the Values string
|
||||
|
||||
" get the 3rd value: colors = number of colors
|
||||
let colors = substitute(s, '\s*\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '')
|
||||
" get the 4th value: cpp = number of character per pixel
|
||||
let cpp = substitute(s, '\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*', '\1', '')
|
||||
if cpp =~ '[^0-9]'
|
||||
break " if cpp is not made of digits there must be something wrong
|
||||
endif
|
||||
|
||||
" Highlight the Values string as normal string (no pixel string).
|
||||
" Only when there is no slash, it would terminate the pattern.
|
||||
if s !~ '/'
|
||||
exe 'syn match xpm2Values /' . s . '/'
|
||||
endif
|
||||
hi def link xpm2Values Statement
|
||||
|
||||
let n = 1 " n = color index
|
||||
|
||||
elseif n <= colors " string is a color specification
|
||||
|
||||
" get chars = <cpp> length string representing the pixels
|
||||
" (first incl. the following whitespace)
|
||||
let chars = substitute(s, '\(.\{'.cpp.'}\s\+\).*', '\1', '')
|
||||
|
||||
" now get color, first try 'c' key if any (color visual)
|
||||
let color = substitute(s, '.*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*', '\1', '')
|
||||
if color == s
|
||||
" no 'c' key, try 'g' key (grayscale with more than 4 levels)
|
||||
let color = substitute(s, '.*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*', '\1', '')
|
||||
if color == s
|
||||
" next try: 'g4' key (4-level grayscale)
|
||||
let color = substitute(s, '.*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*', '\1', '')
|
||||
if color == s
|
||||
" finally try 'm' key (mono visual)
|
||||
let color = substitute(s, '.*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*', '\1', '')
|
||||
if color == s
|
||||
let color = ""
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" Vim cannot handle RGB codes with more than 6 hex digits
|
||||
if color =~ '#\x\{10,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g')
|
||||
elseif color =~ '#\x\{7,}$'
|
||||
let color = substitute(color, '\(\x\x\)\x', '\1', 'g')
|
||||
" nor with 3 digits
|
||||
elseif color =~ '#\x\{3}$'
|
||||
let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '')
|
||||
endif
|
||||
|
||||
" escape meta characters in patterns
|
||||
let s = escape(s, '/\*^$.~[]')
|
||||
let chars = escape(chars, '/\*^$.~[]')
|
||||
|
||||
" change whitespace to "\s\+"
|
||||
let s = substitute(s, "[ \t][ \t]*", "\\\\s\\\\+", "g")
|
||||
let chars = substitute(chars, "[ \t][ \t]*", "\\\\s\\\\+", "g")
|
||||
|
||||
" now create syntax items
|
||||
" highlight the color string as normal string (no pixel string)
|
||||
exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef'
|
||||
exe 'hi def link xpm2Col'.n.'Def Constant'
|
||||
|
||||
" but highlight the first whitespace after chars in its color
|
||||
exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained'
|
||||
exe 'hi def link xpm2Col'.n.'inDef xpm2Color'.n
|
||||
|
||||
" remove the following whitespace from chars
|
||||
let chars = substitute(chars, '\\s\\+$', '', '')
|
||||
|
||||
" and create the syntax item contained in the pixel strings
|
||||
exe 'syn match xpm2Color'.n.' /'.chars.'/ contained'
|
||||
exe 'syn cluster xpm2Colors add=xpm2Color'.n
|
||||
|
||||
" if no color or color = "None" show background
|
||||
if color == "" || substitute(color, '.*', '\L&', '') == 'none'
|
||||
exe 'Hi xpm2Color'.n.' guifg=bg guibg=NONE'
|
||||
elseif color !~ "'"
|
||||
exe 'Hi xpm2Color'.n." guifg='".color."' guibg='".color."'"
|
||||
endif
|
||||
let n = n + 1
|
||||
else
|
||||
break " no more color string
|
||||
endif
|
||||
endif
|
||||
let i = i + 1
|
||||
endwhile
|
||||
|
||||
unlet color chars colors cpp n i s
|
||||
|
||||
endif " has("gui_running") || has("termguicolors") && &termguicolors
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only when an item doesn't have highlighting yet
|
||||
" The default highlighting.
|
||||
hi def link xpm2Type Type
|
||||
hi def link xpm2StorageClass StorageClass
|
||||
hi def link xpm2Todo Todo
|
||||
hi def link xpm2Comment Comment
|
||||
hi def link xpm2PixelString String
|
||||
|
||||
delcommand Hi
|
||||
|
||||
let b:current_syntax = "xpm2"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim: ts=8:sw=2:noet:
|
||||
|
||||
endif
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
let b:current_syntax = "zig"
|
||||
|
||||
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal anytype
|
||||
syn keyword zigStructure struct enum union error
|
||||
syn keyword zigStructure struct enum union error opaque
|
||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async nosuspend await suspend resume
|
||||
syn keyword zigConditional if else switch and or orelse
|
||||
syn keyword zigRepeat while for
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
filetype on
|
||||
|
||||
function! TestExtension(filetype, filename, content)
|
||||
call Log('Detecting ' . a:filetype . ' filetype (' . a:filename . ')...')
|
||||
|
||||
@@ -369,6 +371,7 @@ call TestExtension("mason", "mason2.html", "<%filter></%filter>")
|
||||
call TestExtension("htmldjango", "jinja2.html", "{% for item in navigation %}{% endfor %}")
|
||||
call TestExtension("htmldjango", "jinja3.html", "{% block head %}")
|
||||
call TestExtension("htmldjango", "jinja4.html", "{# some comment #}")
|
||||
call TestExtension("htmldjango", "jinja3.html", "{% load static %}")
|
||||
call TestExtension("xhtml", "xhtml.html", "<DTD XHTML ")
|
||||
|
||||
" many html templates use {{ }}, e.g. Angular, we should not assume django
|
||||
@@ -385,3 +388,8 @@ call TestExtension("xml", "fglrxrc", "")
|
||||
call TestExtension("conf", "foo.conf", "")
|
||||
call TestExtension("conf", "config", "")
|
||||
call TestExtension("conf", "auto.master", "")
|
||||
|
||||
" https://github.com/sheerun/vim-polyglot/issues/579
|
||||
call TestExtension("dart", "reminders.dart", "")
|
||||
|
||||
filetype off
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
function! TestFiletype(filetype)
|
||||
filetype plugin indent on
|
||||
|
||||
func! TestFiletype(filetype)
|
||||
call Log('Loading ' . a:filetype . ' filetype...')
|
||||
|
||||
try
|
||||
enew
|
||||
exec 'set ft=' . a:filetype
|
||||
exec ":bw!"
|
||||
catch
|
||||
echo 'Failed to load ' . a:filetype . ' filetype...'
|
||||
echo v:exception
|
||||
throw v:exception
|
||||
cq!
|
||||
endtry
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
call TestFiletype('8th')
|
||||
call TestFiletype('cfg')
|
||||
call TestFiletype('master')
|
||||
call TestFiletype('conf')
|
||||
call TestFiletype('haproxy')
|
||||
call TestFiletype('a2ps')
|
||||
call TestFiletype('a65')
|
||||
call TestFiletype('aap')
|
||||
@@ -29,6 +30,8 @@ call TestFiletype('asl')
|
||||
call TestFiletype('ada')
|
||||
call TestFiletype('ahdl')
|
||||
call TestFiletype('aidl')
|
||||
call TestFiletype('master')
|
||||
call TestFiletype('conf')
|
||||
call TestFiletype('alsaconf')
|
||||
call TestFiletype('aml')
|
||||
call TestFiletype('ampl')
|
||||
@@ -46,6 +49,7 @@ call TestFiletype('arduino')
|
||||
call TestFiletype('art')
|
||||
call TestFiletype('asciidoc')
|
||||
call TestFiletype('autohotkey')
|
||||
call TestFiletype('make')
|
||||
call TestFiletype('elf')
|
||||
call TestFiletype('automake')
|
||||
call TestFiletype('asn')
|
||||
@@ -59,6 +63,7 @@ call TestFiletype('caddyfile')
|
||||
call TestFiletype('carp')
|
||||
call TestFiletype('clojure')
|
||||
call TestFiletype('cmake')
|
||||
call TestFiletype('markdown')
|
||||
call TestFiletype('coffee')
|
||||
call TestFiletype('litcoffee')
|
||||
call TestFiletype('cryptol')
|
||||
@@ -73,8 +78,9 @@ call TestFiletype('dcov')
|
||||
call TestFiletype('dd')
|
||||
call TestFiletype('ddoc')
|
||||
call TestFiletype('dsdl')
|
||||
call TestFiletype('sed')
|
||||
call TestFiletype('mysql')
|
||||
call TestFiletype('yaml')
|
||||
call TestFiletype('Dockerfile')
|
||||
call TestFiletype('yaml.docker-compose')
|
||||
call TestFiletype('elixir')
|
||||
call TestFiletype('eelixir')
|
||||
@@ -108,11 +114,11 @@ call TestFiletype('grub')
|
||||
call TestFiletype('haml')
|
||||
call TestFiletype('html.mustache')
|
||||
call TestFiletype('html.handlebars')
|
||||
call TestFiletype('haproxy')
|
||||
call TestFiletype('haskell')
|
||||
call TestFiletype('haxe')
|
||||
call TestFiletype('hcl')
|
||||
call TestFiletype('hive')
|
||||
call TestFiletype('html')
|
||||
call TestFiletype('i3config')
|
||||
call TestFiletype('icalendar')
|
||||
call TestFiletype('idris')
|
||||
@@ -139,7 +145,6 @@ call TestFiletype('lua')
|
||||
call TestFiletype('m4')
|
||||
call TestFiletype('mako')
|
||||
call TestFiletype('mma')
|
||||
call TestFiletype('markdown')
|
||||
call TestFiletype('markdown.mdx')
|
||||
call TestFiletype('meson')
|
||||
call TestFiletype('dosini')
|
||||
@@ -199,7 +204,6 @@ call TestFiletype('ruby')
|
||||
call TestFiletype('brewfile')
|
||||
call TestFiletype('rust')
|
||||
call TestFiletype('scala')
|
||||
call TestFiletype('sbt.scala')
|
||||
call TestFiletype('scss')
|
||||
call TestFiletype('sh')
|
||||
call TestFiletype('zsh')
|
||||
@@ -292,6 +296,7 @@ call TestFiletype('coco')
|
||||
call TestFiletype('cf')
|
||||
call TestFiletype('config')
|
||||
call TestFiletype('cuda')
|
||||
call TestFiletype('dockerfile')
|
||||
call TestFiletype('dcd')
|
||||
call TestFiletype('eterm')
|
||||
call TestFiletype('lynx')
|
||||
@@ -360,6 +365,7 @@ call TestFiletype('hastepreproc')
|
||||
call TestFiletype('hercules')
|
||||
call TestFiletype('hex')
|
||||
call TestFiletype('hollywood')
|
||||
call TestFiletype('html')
|
||||
call TestFiletype('tilde')
|
||||
call TestFiletype('htmlm4')
|
||||
call TestFiletype('template')
|
||||
@@ -446,7 +452,6 @@ call TestFiletype('mplayerconf')
|
||||
call TestFiletype('srec')
|
||||
call TestFiletype('mrxvtrc')
|
||||
call TestFiletype('msql')
|
||||
call TestFiletype('mysql')
|
||||
call TestFiletype('muttrc')
|
||||
call TestFiletype('mupad')
|
||||
call TestFiletype('mush')
|
||||
@@ -521,10 +526,10 @@ call TestFiletype('samba')
|
||||
call TestFiletype('sas')
|
||||
call TestFiletype('sass')
|
||||
call TestFiletype('sather')
|
||||
call TestFiletype('sbt')
|
||||
call TestFiletype('scilab')
|
||||
call TestFiletype('sd')
|
||||
call TestFiletype('sdl')
|
||||
call TestFiletype('sed')
|
||||
call TestFiletype('sieve')
|
||||
call TestFiletype('sm')
|
||||
call TestFiletype('services')
|
||||
@@ -632,5 +637,13 @@ call TestFiletype('logcheck')
|
||||
call TestFiletype('svn')
|
||||
call TestFiletype('text')
|
||||
call TestFiletype('pullrequest')
|
||||
call TestFiletype('xf86conf')
|
||||
call TestFiletype('man')
|
||||
call TestFiletype('xpm')
|
||||
call TestFiletype('xpm2')
|
||||
call TestFiletype('context')
|
||||
|
||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
filetype plugin indent off
|
||||
filetype off
|
||||
|
||||
703
tests/native.vim
Normal file
703
tests/native.vim
Normal file
@@ -0,0 +1,703 @@
|
||||
func Test_detection()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
new something.vim
|
||||
call assert_equal('vim', &filetype)
|
||||
|
||||
bwipe!
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_conf_type()
|
||||
filetype on
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
augroup END
|
||||
split Xfile
|
||||
call assert_equal('conf', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_other_type()
|
||||
filetype on
|
||||
augroup filetypedetect
|
||||
au BufNewFile,BufRead * call assert_equal(0, did_filetype())
|
||||
au BufNewFile,BufRead Xfile setf testfile
|
||||
au BufNewFile,BufRead * call assert_equal(1, did_filetype())
|
||||
augroup END
|
||||
call writefile(['# some comment', 'must be conf'], 'Xfile')
|
||||
split Xfile
|
||||
call assert_equal('testfile', &filetype)
|
||||
|
||||
bwipe!
|
||||
call delete('Xfile')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" Filetypes detected just from matching the file name.
|
||||
let s:filename_checks = {
|
||||
\ '8th': ['file.8th'],
|
||||
\ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
|
||||
\ 'a65': ['file.a65'],
|
||||
\ 'aap': ['file.aap'],
|
||||
\ 'abap': ['file.abap'],
|
||||
\ 'abc': ['file.abc'],
|
||||
\ 'abel': ['file.abl'],
|
||||
\ 'acedb': ['file.wrm'],
|
||||
\ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'],
|
||||
\ 'ahdl': ['file.tdf'],
|
||||
\ 'aidl': ['file.aidl'],
|
||||
\ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf', 'any/etc/asound.conf', 'any/usr/share/alsa/alsa.conf'],
|
||||
\ 'aml': ['file.aml'],
|
||||
\ 'ampl': ['file.run'],
|
||||
\ 'ant': ['build.xml'],
|
||||
\ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file'],
|
||||
\ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
|
||||
\ 'applescript': ['file.scpt'],
|
||||
\ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
|
||||
\ 'arch': ['.arch-inventory', '=tagging-method'],
|
||||
\ 'arduino': ['file.ino', 'file.pde'],
|
||||
\ 'art': ['file.art'],
|
||||
\ 'asciidoc': ['file.asciidoc', 'file.adoc'],
|
||||
\ 'asn': ['file.asn', 'file.asn1'],
|
||||
\ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
|
||||
\ 'atlas': ['file.atl', 'file.as'],
|
||||
\ 'autohotkey': ['file.ahk'],
|
||||
\ 'autoit': ['file.au3'],
|
||||
\ 'automake': ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
|
||||
\ 'ave': ['file.ave'],
|
||||
\ 'awk': ['file.awk', 'file.gawk'],
|
||||
\ 'b': ['file.mch', 'file.ref', 'file.imp'],
|
||||
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
|
||||
\ 'bc': ['file.bc'],
|
||||
\ 'bdf': ['file.bdf'],
|
||||
\ 'bib': ['file.bib'],
|
||||
\ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
|
||||
\ 'blank': ['file.bl'],
|
||||
\ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
|
||||
\ 'bst': ['file.bst'],
|
||||
\ 'bzr': ['bzr_log.any', 'bzr_log.file'],
|
||||
\ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
|
||||
\ 'cabal': ['file.cabal'],
|
||||
\ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/.calendar/file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
|
||||
\ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
|
||||
\ 'cdl': ['file.cdl'],
|
||||
\ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao', 'any/etc/cdrdao.conf', 'any/etc/default/cdrdao', 'any/etc/defaults/cdrdao'],
|
||||
\ 'cdrtoc': ['file.toc'],
|
||||
\ 'cf': ['file.cfm', 'file.cfi', 'file.cfc'],
|
||||
\ 'cfengine': ['cfengine.conf'],
|
||||
\ 'cfg': ['file.cfg', 'file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'],
|
||||
\ 'ch': ['file.chf'],
|
||||
\ 'chaiscript': ['file.chai'],
|
||||
\ 'chaskell': ['file.chs'],
|
||||
\ 'chill': ['file..ch'],
|
||||
\ 'chordpro': ['file.chopro', 'file.crd', 'file.cho', 'file.crdpro', 'file.chordpro'],
|
||||
\ 'cl': ['file.eni'],
|
||||
\ 'clean': ['file.dcl', 'file.icl'],
|
||||
\ 'clojure': ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
|
||||
\ 'cmake': ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
|
||||
\ 'cmusrc': ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],
|
||||
\ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
|
||||
\ 'coco': ['file.atg'],
|
||||
\ 'conaryrecipe': ['file.recipe'],
|
||||
\ 'conf': ['auto.master'],
|
||||
\ 'config': ['configure.in', 'configure.ac', 'Pipfile', '/etc/hostname.file'],
|
||||
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi'],
|
||||
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
|
||||
\ 'crm': ['file.crm'],
|
||||
\ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
|
||||
\ 'cs': ['file.cs'],
|
||||
\ 'csc': ['file.csc'],
|
||||
\ 'csdl': ['file.csdl'],
|
||||
\ 'csp': ['file.csp', 'file.fdr'],
|
||||
\ 'css': ['file.css'],
|
||||
\ 'cterm': ['file.con'],
|
||||
\ 'cucumber': ['file.feature'],
|
||||
\ 'cuda': ['file.cu', 'file.cuh'],
|
||||
\ 'cupl': ['file.pld'],
|
||||
\ 'cuplsim': ['file.si'],
|
||||
\ 'cvs': ['cvs123'],
|
||||
\ 'cvsrc': ['.cvsrc'],
|
||||
\ 'cynpp': ['file.cyn'],
|
||||
\ 'dart': ['file.dart', 'file.drt'],
|
||||
\ 'datascript': ['file.ds'],
|
||||
\ 'dcd': ['file.dcd'],
|
||||
\ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'],
|
||||
\ 'debcontrol': ['/debian/control', 'any/debian/control'],
|
||||
\ 'debcopyright': ['/debian/copyright', 'any/debian/copyright'],
|
||||
\ 'debsources': ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list', 'any/etc/apt/sources.list', 'any/etc/apt/sources.list.d/file.list'],
|
||||
\ 'def': ['file.def'],
|
||||
\ 'denyhosts': ['denyhosts.conf'],
|
||||
\ 'desc': ['file.desc'],
|
||||
\ 'desktop': ['file.desktop', '.directory', 'file.directory'],
|
||||
\ 'dictconf': ['dict.conf', '.dictrc'],
|
||||
\ 'dictdconf': ['dictd.conf'],
|
||||
\ 'diff': ['file.diff', 'file.rej'],
|
||||
\ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
|
||||
\ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
|
||||
\ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile'],
|
||||
\ 'dosbatch': ['file.bat', 'file.sys'],
|
||||
\ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/pacman.conf', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file'],
|
||||
\ 'dot': ['file.dot', 'file.gv'],
|
||||
\ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
|
||||
\ 'dsl': ['file.dsl'],
|
||||
\ 'dtd': ['file.dtd'],
|
||||
\ 'dts': ['file.dts', 'file.dtsi'],
|
||||
\ 'dylan': ['file.dylan'],
|
||||
\ 'dylanintr': ['file.intr'],
|
||||
\ 'dylanlid': ['file.lid'],
|
||||
\ 'ecd': ['file.ecd'],
|
||||
\ 'edif': ['file.edf', 'file.edif', 'file.edo'],
|
||||
\ 'elinks': ['elinks.conf'],
|
||||
\ 'elm': ['file.elm'],
|
||||
\ 'elmfilt': ['filter-rules'],
|
||||
\ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
|
||||
\ 'eruby': ['file.erb', 'file.rhtml'],
|
||||
\ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
|
||||
\ 'esqlc': ['file.ec', 'file.EC'],
|
||||
\ 'esterel': ['file.strl'],
|
||||
\ 'eterm': ['anyEterm/file.cfg', 'Eterm/file.cfg', 'some-Eterm/file.cfg'],
|
||||
\ 'exim': ['exim.conf'],
|
||||
\ 'expect': ['file.exp'],
|
||||
\ 'exports': ['exports'],
|
||||
\ 'factor': ['file.factor'],
|
||||
\ 'falcon': ['file.fal'],
|
||||
\ 'fan': ['file.fan', 'file.fwt'],
|
||||
\ 'fetchmail': ['.fetchmailrc'],
|
||||
\ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
|
||||
\ 'focexec': ['file.fex', 'file.focexec'],
|
||||
\ 'forth': ['file.fs', 'file.ft', 'file.fth'],
|
||||
\ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
|
||||
\ 'framescript': ['file.fsl'],
|
||||
\ 'freebasic': ['file.fb', 'file.bi'],
|
||||
\ 'fstab': ['fstab', 'mtab'],
|
||||
\ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
|
||||
\ 'gdb': ['.gdbinit'],
|
||||
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
||||
\ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
|
||||
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG'],
|
||||
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
|
||||
\ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'],
|
||||
\ 'gitrebase': ['git-rebase-todo'],
|
||||
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
|
||||
\ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
|
||||
\ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
|
||||
\ 'gnuplot': ['file.gpi'],
|
||||
\ 'go': ['file.go'],
|
||||
\ 'gp': ['file.gp', '.gprc'],
|
||||
\ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'],
|
||||
\ 'grads': ['file.gs'],
|
||||
\ 'gretl': ['file.gretl'],
|
||||
\ 'groovy': ['file.gradle', 'file.groovy'],
|
||||
\ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
|
||||
\ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
|
||||
\ 'gsp': ['file.gsp'],
|
||||
\ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
|
||||
\ 'haml': ['file.haml'],
|
||||
\ 'hamster': ['file.hsc', 'file.hsm'],
|
||||
\ 'haskell': ['file.hs', 'file.hs-boot'],
|
||||
\ 'haste': ['file.ht'],
|
||||
\ 'hastepreproc': ['file.htpp'],
|
||||
\ 'hb': ['file.hb'],
|
||||
\ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
|
||||
\ 'hex': ['file.hex', 'file.h32'],
|
||||
\ 'hgcommit': ['hg-editor-file.txt'],
|
||||
\ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
|
||||
\ 'hollywood': ['file.hws'],
|
||||
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
||||
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
|
||||
\ 'logcheck': ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file', 'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
|
||||
\ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
|
||||
\ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],
|
||||
\ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'],
|
||||
\ 'opl': ['file.OPL', 'file.OPl', 'file.OpL', 'file.Opl', 'file.oPL', 'file.oPl', 'file.opL', 'file.opl'],
|
||||
\ 'pcmk': ['file.pcmk'],
|
||||
\ 'r': ['file.r'],
|
||||
\ 'rhelp': ['file.rd'],
|
||||
\ 'rmd': ['file.rmd', 'file.smd'],
|
||||
\ 'rnoweb': ['file.rnw', 'file.snw'],
|
||||
\ 'rrst': ['file.rrst', 'file.srst'],
|
||||
\ 'template': ['file.tmpl'],
|
||||
\ 'htmlm4': ['file.html.m4'],
|
||||
\ 'httest': ['file.htt', 'file.htb'],
|
||||
\ 'ibasic': ['file.iba', 'file.ibi'],
|
||||
\ 'icemenu': ['/.icewm/menu', 'any/.icewm/menu'],
|
||||
\ 'icon': ['file.icn'],
|
||||
\ 'indent': ['.indent.pro', 'indentrc'],
|
||||
\ 'inform': ['file.inf', 'file.INF'],
|
||||
\ 'initng': ['/etc/initng/any/file.i', 'file.ii', 'any/etc/initng/any/file.i'],
|
||||
\ 'inittab': ['inittab'],
|
||||
\ 'ipfilter': ['ipf.conf', 'ipf6.conf', 'ipf.rules'],
|
||||
\ 'iss': ['file.iss'],
|
||||
\ 'ist': ['file.ist', 'file.mst'],
|
||||
\ 'j': ['file.ijs'],
|
||||
\ 'jal': ['file.jal', 'file.JAL'],
|
||||
\ 'jam': ['file.jpl', 'file.jpr', 'JAM-file.file', 'JAM.file', 'Prl-file.file', 'Prl.file'],
|
||||
\ 'java': ['file.java', 'file.jav'],
|
||||
\ 'javacc': ['file.jj', 'file.jjt'],
|
||||
\ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
|
||||
\ 'javascriptreact': ['file.jsx'],
|
||||
\ 'jess': ['file.clp'],
|
||||
\ 'jgraph': ['file.jgr'],
|
||||
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
||||
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'],
|
||||
\ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock'],
|
||||
\ 'jsp': ['file.jsp'],
|
||||
\ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
|
||||
\ 'kivy': ['file.kv'],
|
||||
\ 'kix': ['file.kix'],
|
||||
\ 'kotlin': ['file.kt', 'file.ktm', 'file.kts'],
|
||||
\ 'kscript': ['file.ks'],
|
||||
\ 'kwt': ['file.k'],
|
||||
\ 'lace': ['file.ace', 'file.ACE'],
|
||||
\ 'latte': ['file.latte', 'file.lte'],
|
||||
\ 'ld': ['file.ld'],
|
||||
\ 'ldif': ['file.ldif'],
|
||||
\ 'less': ['file.less'],
|
||||
\ 'lex': ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
|
||||
\ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc', 'lftp/rc', 'some-lftp/rc'],
|
||||
\ 'lhaskell': ['file.lhs'],
|
||||
\ 'libao': ['/etc/libao.conf', '/.libao', 'any/.libao', 'any/etc/libao.conf'],
|
||||
\ 'lifelines': ['file.ll'],
|
||||
\ 'lilo': ['lilo.conf', 'lilo.conf-file'],
|
||||
\ 'limits': ['/etc/limits', '/etc/anylimits.conf', '/etc/anylimits.d/file.conf', '/etc/limits.conf', '/etc/limits.d/file.conf', '/etc/some-limits.conf', '/etc/some-limits.d/file.conf', 'any/etc/limits', 'any/etc/limits.conf', 'any/etc/limits.d/file.conf', 'any/etc/some-limits.conf', 'any/etc/some-limits.d/file.conf'],
|
||||
\ 'liquid': ['file.liquid'],
|
||||
\ 'lisp': ['file.lsp', 'file.lisp', 'file.el', 'file.cl', '.emacs', '.sawfishrc', 'sbclrc', '.sbclrc'],
|
||||
\ 'lite': ['file.lite', 'file.lt'],
|
||||
\ 'litestep': ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
|
||||
\ 'loginaccess': ['/etc/login.access', 'any/etc/login.access'],
|
||||
\ 'logindefs': ['/etc/login.defs', 'any/etc/login.defs'],
|
||||
\ 'logtalk': ['file.lgt'],
|
||||
\ 'lotos': ['file.lot', 'file.lotos'],
|
||||
\ 'lout': ['file.lou', 'file.lout'],
|
||||
\ 'lprolog': ['file.sig'],
|
||||
\ 'lsl': ['file.lsl'],
|
||||
\ 'lss': ['file.lss'],
|
||||
\ 'lua': ['file.lua', 'file.rockspec', 'file.nse'],
|
||||
\ 'lynx': ['lynx.cfg'],
|
||||
\ 'm4': ['file.at'],
|
||||
\ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml', 'reportbug-file'],
|
||||
\ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases', 'any/etc/aliases', 'any/etc/mail/aliases'],
|
||||
\ 'mailcap': ['.mailcap', 'mailcap'],
|
||||
\ 'make': ['file.mk', 'file.mak', 'file.dsp', 'makefile', 'Makefile', 'makefile-file', 'Makefile-file', 'some-makefile', 'some-Makefile'],
|
||||
\ 'mallard': ['file.page'],
|
||||
\ 'man': ['file.man'],
|
||||
\ 'manconf': ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
|
||||
\ 'map': ['file.map'],
|
||||
\ 'maple': ['file.mv', 'file.mpl', 'file.mws'],
|
||||
\ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
|
||||
\ 'mason': ['file.mason', 'file.mhtml', 'file.comp'],
|
||||
\ 'master': ['file.mas', 'file.master'],
|
||||
\ 'mel': ['file.mel'],
|
||||
\ 'meson': ['meson.build', 'meson_options.txt'],
|
||||
\ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user',
|
||||
\ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log',
|
||||
\ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err',
|
||||
\ '/log/auth.info', '/log/cron.info', '/log/daemon.info', '/log/debug.info', '/log/kern.info', '/log/lpr.info', '/log/mail.info', '/log/messages.info', '/log/news/news.info', '/log/syslog.info', '/log/user.info',
|
||||
\ '/log/auth.warn', '/log/cron.warn', '/log/daemon.warn', '/log/debug.warn', '/log/kern.warn', '/log/lpr.warn', '/log/mail.warn', '/log/messages.warn', '/log/news/news.warn', '/log/syslog.warn', '/log/user.warn',
|
||||
\ '/log/auth.crit', '/log/cron.crit', '/log/daemon.crit', '/log/debug.crit', '/log/kern.crit', '/log/lpr.crit', '/log/mail.crit', '/log/messages.crit', '/log/news/news.crit', '/log/syslog.crit', '/log/user.crit',
|
||||
\ '/log/auth.notice', '/log/cron.notice', '/log/daemon.notice', '/log/debug.notice', '/log/kern.notice', '/log/lpr.notice', '/log/mail.notice', '/log/messages.notice', '/log/news/news.notice', '/log/syslog.notice', '/log/user.notice'],
|
||||
\ 'mf': ['file.mf'],
|
||||
\ 'mgl': ['file.mgl'],
|
||||
\ 'mgp': ['file.mgp'],
|
||||
\ 'mib': ['file.mib', 'file.my'],
|
||||
\ 'mix': ['file.mix', 'file.mixal'],
|
||||
\ 'mma': ['file.nb'],
|
||||
\ 'mmp': ['file.mmp'],
|
||||
\ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
|
||||
\ 'modula2': ['file.m2', 'file.mi'],
|
||||
\ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
|
||||
\ 'moo': ['file.moo'],
|
||||
\ 'mp': ['file.mp'],
|
||||
\ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'],
|
||||
\ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'],
|
||||
\ 'msidl': ['file.odl', 'file.mof'],
|
||||
\ 'msql': ['file.msql'],
|
||||
\ 'mupad': ['file.mu'],
|
||||
\ 'mush': ['file.mush'],
|
||||
\ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'],
|
||||
\ 'mysql': ['file.mysql'],
|
||||
\ 'n1ql': ['file.n1ql', 'file.nql'],
|
||||
\ 'named': ['namedfile.conf', 'rndcfile.conf', 'named-file.conf', 'named.conf', 'rndc-file.conf', 'rndc-file.key', 'rndc.conf', 'rndc.key'],
|
||||
\ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
|
||||
\ 'ncf': ['file.ncf'],
|
||||
\ 'netrc': ['.netrc'],
|
||||
\ 'ninja': ['file.ninja'],
|
||||
\ 'nqc': ['file.nqc'],
|
||||
\ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
|
||||
\ 'nsis': ['file.nsi', 'file.nsh'],
|
||||
\ 'obj': ['file.obj'],
|
||||
\ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit'],
|
||||
\ 'occam': ['file.occ'],
|
||||
\ 'omnimark': ['file.xom', 'file.xin'],
|
||||
\ 'openroad': ['file.or'],
|
||||
\ 'ora': ['file.ora'],
|
||||
\ 'pamconf': ['/etc/pam.conf', '/etc/pam.d/file', 'any/etc/pam.conf', 'any/etc/pam.d/file'],
|
||||
\ 'pamenv': ['/etc/security/pam_env.conf', '/home/user/.pam_environment', '.pam_environment', 'pam_env.conf'],
|
||||
\ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
|
||||
\ 'pascal': ['file.pas', 'file.pp', 'file.dpr', 'file.lpr'],
|
||||
\ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
|
||||
\ 'pccts': ['file.g'],
|
||||
\ 'pdf': ['file.pdf'],
|
||||
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
|
||||
\ 'raku': ['file.p6', 'file.pm6', 'file.pl6', 'file.raku', 'file.rakumod', 'file.pod6'],
|
||||
\ 'pf': ['pf.conf'],
|
||||
\ 'pfmain': ['main.cf'],
|
||||
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp'],
|
||||
\ 'lpc': ['file.lpc', 'file.ulpc'],
|
||||
\ 'pike': ['file.pike', 'file.pmod'],
|
||||
\ 'cmod': ['file.cmod'],
|
||||
\ 'pilrc': ['file.rcp'],
|
||||
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
||||
\ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
|
||||
\ 'pli': ['file.pli', 'file.pl1'],
|
||||
\ 'plm': ['file.plm', 'file.p36', 'file.pac'],
|
||||
\ 'plp': ['file.plp'],
|
||||
\ 'plsql': ['file.pls', 'file.plsql'],
|
||||
\ 'po': ['file.po', 'file.pot'],
|
||||
\ 'pod': ['file.pod'],
|
||||
\ 'postscr': ['file.ps', 'file.pfa', 'file.afm', 'file.eps', 'file.epsf', 'file.epsi', 'file.ai'],
|
||||
\ 'pov': ['file.pov'],
|
||||
\ 'povini': ['.povrayrc'],
|
||||
\ 'ppd': ['file.ppd'],
|
||||
\ 'ppwiz': ['file.it', 'file.ih'],
|
||||
\ 'privoxy': ['file.action'],
|
||||
\ 'proc': ['file.pc'],
|
||||
\ 'procmail': ['.procmail', '.procmailrc'],
|
||||
\ 'prolog': ['file.pdb'],
|
||||
\ 'promela': ['file.pml'],
|
||||
\ 'proto': ['file.proto'],
|
||||
\ 'protocols': ['/etc/protocols', 'any/etc/protocols'],
|
||||
\ 'psf': ['file.psf'],
|
||||
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
||||
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
|
||||
\ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
|
||||
\ 'radiance': ['file.rad', 'file.mat'],
|
||||
\ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
|
||||
\ 'rc': ['file.rc', 'file.rch'],
|
||||
\ 'rcs': ['file,v'],
|
||||
\ 'readline': ['.inputrc', 'inputrc'],
|
||||
\ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
|
||||
\ 'rego': ['file.rego'],
|
||||
\ 'resolv': ['resolv.conf'],
|
||||
\ 'reva': ['file.frt'],
|
||||
\ 'rexx': ['file.rex', 'file.orx', 'file.rxo', 'file.rxj', 'file.jrexx', 'file.rexxj', 'file.rexx', 'file.testGroup', 'file.testUnit'],
|
||||
\ 'rib': ['file.rib'],
|
||||
\ 'rnc': ['file.rnc'],
|
||||
\ 'rng': ['file.rng'],
|
||||
\ 'robots': ['robots.txt'],
|
||||
\ 'rpcgen': ['file.x'],
|
||||
\ 'rpl': ['file.rpl'],
|
||||
\ 'rst': ['file.rst'],
|
||||
\ 'rtf': ['file.rtf'],
|
||||
\ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file'],
|
||||
\ 'rust': ['file.rs'],
|
||||
\ 'samba': ['smb.conf'],
|
||||
\ 'sas': ['file.sas'],
|
||||
\ 'sass': ['file.sass'],
|
||||
\ 'sather': ['file.sa'],
|
||||
\ 'sbt': ['file.sbt'],
|
||||
\ 'scala': ['file.scala'],
|
||||
\ 'scheme': ['file.scm', 'file.ss', 'file.rkt'],
|
||||
\ 'scilab': ['file.sci', 'file.sce'],
|
||||
\ 'screen': ['.screenrc', 'screenrc'],
|
||||
\ 'scss': ['file.scss'],
|
||||
\ 'sd': ['file.sd'],
|
||||
\ 'sdc': ['file.sdc'],
|
||||
\ 'sdl': ['file.sdl', 'file.pr'],
|
||||
\ 'sed': ['file.sed'],
|
||||
\ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', 'any/etc/sensors.conf', 'any/etc/sensors3.conf'],
|
||||
\ 'services': ['/etc/services', 'any/etc/services'],
|
||||
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
|
||||
\ 'sh': ['/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
|
||||
\ 'sieve': ['file.siv', 'file.sieve'],
|
||||
\ 'simula': ['file.sim'],
|
||||
\ 'sinda': ['file.sin', 'file.s85'],
|
||||
\ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
|
||||
\ 'skill': ['file.il', 'file.ils', 'file.cdf'],
|
||||
\ 'slang': ['file.sl'],
|
||||
\ 'slice': ['file.ice'],
|
||||
\ 'slpconf': ['/etc/slp.conf', 'any/etc/slp.conf'],
|
||||
\ 'slpreg': ['/etc/slp.reg', 'any/etc/slp.reg'],
|
||||
\ 'slpspi': ['/etc/slp.spi', 'any/etc/slp.spi'],
|
||||
\ 'slrnrc': ['.slrnrc'],
|
||||
\ 'slrnsc': ['file.score'],
|
||||
\ 'sm': ['sendmail.cf'],
|
||||
\ 'smarty': ['file.tpl'],
|
||||
\ 'smcl': ['file.hlp', 'file.ihlp', 'file.smcl'],
|
||||
\ 'smith': ['file.smt', 'file.smith'],
|
||||
\ 'sml': ['file.sml'],
|
||||
\ 'snobol4': ['file.sno', 'file.spt'],
|
||||
\ 'spec': ['file.spec'],
|
||||
\ 'spice': ['file.sp', 'file.spice'],
|
||||
\ 'spup': ['file.speedup', 'file.spdata', 'file.spd'],
|
||||
\ 'spyce': ['file.spy', 'file.spi'],
|
||||
\ 'sql': ['file.tyb', 'file.typ', 'file.tyc', 'file.pkb', 'file.pks'],
|
||||
\ 'sqlj': ['file.sqlj'],
|
||||
\ 'sqr': ['file.sqr', 'file.sqi'],
|
||||
\ 'squid': ['squid.conf'],
|
||||
\ 'srec': ['file.s19', 'file.s28', 'file.s37', 'file.mot', 'file.srec'],
|
||||
\ 'sshconfig': ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf', 'any/.ssh/config'],
|
||||
\ 'sshdconfig': ['sshd_config', '/etc/ssh/sshd_config.d/file.conf', 'any/etc/ssh/sshd_config.d/file.conf'],
|
||||
\ 'st': ['file.st'],
|
||||
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
|
||||
\ 'stp': ['file.stp'],
|
||||
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers'],
|
||||
\ 'svg': ['file.svg'],
|
||||
\ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
|
||||
\ 'swift': ['file.swift'],
|
||||
\ 'swiftgyb': ['file.swift.gyb'],
|
||||
\ 'sil': ['file.sil'],
|
||||
\ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],
|
||||
\ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile', '/.config/systemd/user/.#', '/.config/systemd/user/.#-file', '/.config/systemd/user/file.d/.#', '/.config/systemd/user/file.d/.#-file', '/.config/systemd/user/file.d/file.conf', '/etc/systemd/file.conf.d/file.conf', '/etc/systemd/system/.#', '/etc/systemd/system/.#-file', '/etc/systemd/system/file.d/.#', '/etc/systemd/system/file.d/.#-file', '/etc/systemd/system/file.d/file.conf', '/systemd/file.automount', '/systemd/file.dnssd', '/systemd/file.link', '/systemd/file.mount', '/systemd/file.netdev', '/systemd/file.network', '/systemd/file.nspawn', '/systemd/file.path', '/systemd/file.service', '/systemd/file.slice', '/systemd/file.socket', '/systemd/file.swap', '/systemd/file.target', '/systemd/file.timer', 'any/.config/systemd/user/.#', 'any/.config/systemd/user/.#-file', 'any/.config/systemd/user/file.d/.#', 'any/.config/systemd/user/file.d/.#-file', 'any/.config/systemd/user/file.d/file.conf', 'any/etc/systemd/file.conf.d/file.conf', 'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file', 'any/etc/systemd/system/file.d/.#', 'any/etc/systemd/system/file.d/.#-file', 'any/etc/systemd/system/file.d/file.conf'],
|
||||
\ 'systemverilog': ['file.sv', 'file.svh'],
|
||||
\ 'tags': ['tags'],
|
||||
\ 'tak': ['file.tak'],
|
||||
\ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
|
||||
\ 'taskedit': ['file.task'],
|
||||
\ 'tcl': ['file.tcl', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl'],
|
||||
\ 'teraterm': ['file.ttl'],
|
||||
\ 'terminfo': ['file.ti'],
|
||||
\ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
|
||||
\ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
|
||||
\ 'texmf': ['texmf.cnf'],
|
||||
\ 'text': ['file.text', 'README'],
|
||||
\ 'tf': ['.tfrc', 'tfrc'],
|
||||
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
|
||||
\ 'tilde': ['file.t.html'],
|
||||
\ 'tli': ['file.tli'],
|
||||
\ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf'],
|
||||
\ 'tpp': ['file.tpp'],
|
||||
\ 'treetop': ['file.treetop'],
|
||||
\ 'trustees': ['trustees.conf'],
|
||||
\ 'tsalt': ['file.slt'],
|
||||
\ 'tsscl': ['file.tsscl'],
|
||||
\ 'tssgm': ['file.tssgm'],
|
||||
\ 'tssop': ['file.tssop'],
|
||||
\ 'html.twig': ['file.twig'],
|
||||
\ 'typescript': ['file.ts'],
|
||||
\ 'typescriptreact': ['file.tsx'],
|
||||
\ 'uc': ['file.uc'],
|
||||
\ 'udevconf': ['/etc/udev/udev.conf', 'any/etc/udev/udev.conf'],
|
||||
\ 'udevperm': ['/etc/udev/permissions.d/file.permissions', 'any/etc/udev/permissions.d/file.permissions'],
|
||||
\ 'udevrules': ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
|
||||
\ 'uil': ['file.uit', 'file.uil'],
|
||||
\ 'updatedb': ['/etc/updatedb.conf', 'any/etc/updatedb.conf'],
|
||||
\ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override', 'any/.config/upstart/file.conf', 'any/.config/upstart/file.override', 'any/.init/file.conf', 'any/.init/file.override', 'any/etc/init/file.conf', 'any/etc/init/file.override', 'any/usr/share/upstart/file.conf', 'any/usr/share/upstart/file.override'],
|
||||
\ 'upstreamdat': ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
|
||||
\ 'upstreaminstalllog': ['upstreaminstall.log', 'UPSTREAMINSTALL.LOG', 'upstreaminstall.file.log', 'UPSTREAMINSTALL.FILE.LOG', 'file.upstreaminstall.log', 'FILE.UPSTREAMINSTALL.LOG'],
|
||||
\ 'upstreamlog': ['fdrupstream.log', 'upstream.log', 'UPSTREAM.LOG', 'upstream.file.log', 'UPSTREAM.FILE.LOG', 'file.upstream.log', 'FILE.UPSTREAM.LOG', 'UPSTREAM-file.log', 'UPSTREAM-FILE.LOG'],
|
||||
\ 'usserverlog': ['usserver.log', 'USSERVER.LOG', 'usserver.file.log', 'USSERVER.FILE.LOG', 'file.usserver.log', 'FILE.USSERVER.LOG'],
|
||||
\ 'usw2kagtlog': ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
|
||||
\ 'vb': ['file.sba', 'file.vbs', 'file.dsm', 'file.ctl'],
|
||||
\ 'vera': ['file.vr', 'file.vri', 'file.vrh'],
|
||||
\ 'verilog': ['file.v'],
|
||||
\ 'verilogams': ['file.va', 'file.vams'],
|
||||
\ 'vgrindefs': ['vgrindefs'],
|
||||
\ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
|
||||
\ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file'],
|
||||
\ 'viminfo': ['.viminfo', '_viminfo'],
|
||||
\ 'vmasm': ['file.mar'],
|
||||
\ 'voscm': ['file.cm'],
|
||||
\ 'vrml': ['file.wrl'],
|
||||
\ 'vroom': ['file.vroom'],
|
||||
\ 'vue': ['file.vue'],
|
||||
\ 'wast': ['file.wast', 'file.wat'],
|
||||
\ 'webmacro': ['file.wm'],
|
||||
\ 'wget': ['.wgetrc', 'wgetrc'],
|
||||
\ 'winbatch': ['file.wbt'],
|
||||
\ 'wml': ['file.wml'],
|
||||
\ 'wsh': ['file.wsf', 'file.wsc'],
|
||||
\ 'wsml': ['file.wsml'],
|
||||
\ 'wvdial': ['wvdial.conf', '.wvdialrc'],
|
||||
\ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
|
||||
\ 'xhtml': ['file.xhtml', 'file.xht'],
|
||||
\ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
|
||||
\ 'xmath': ['file.msc', 'file.msf'],
|
||||
\ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu'],
|
||||
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
|
||||
\ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
|
||||
\ 'xpm2': ['file.xpm2'],
|
||||
\ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
|
||||
\ 'xs': ['file.xs'],
|
||||
\ 'xsd': ['file.xsd'],
|
||||
\ 'xslt': ['file.xsl', 'file.xslt'],
|
||||
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
|
||||
\ 'yaml': ['file.yaml', 'file.yml'],
|
||||
\ 'raml': ['file.raml'],
|
||||
\ 'z8a': ['file.z8a'],
|
||||
\ 'zimbu': ['file.zu'],
|
||||
\ 'zimbutempl': ['file.zut'],
|
||||
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
|
||||
\
|
||||
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
|
||||
\ 'xpm': ['file.xpm'],
|
||||
\ }
|
||||
|
||||
let s:filename_case_checks = {
|
||||
\ 'modula2': ['file.DEF', 'file.MOD'],
|
||||
\ 'bzl': ['file.BUILD', 'BUILD'],
|
||||
\ }
|
||||
|
||||
func CheckItems(checks)
|
||||
for [ft, names] in items(a:checks)
|
||||
for i in range(0, len(names) - 1)
|
||||
new
|
||||
try
|
||||
exe 'edit ' . fnameescape(names[i])
|
||||
catch
|
||||
call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
|
||||
endtry
|
||||
if &filetype == '' && &readonly
|
||||
" File exists but not able to edit it (permission denied)
|
||||
else
|
||||
call assert_equal(ft, &filetype, 'with file name: ' . names[i])
|
||||
endif
|
||||
bwipe!
|
||||
endfor
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func NewTest_filetype_detection()
|
||||
filetype on
|
||||
call CheckItems(s:filename_checks)
|
||||
if has('fname_case')
|
||||
call CheckItems(s:filename_case_checks)
|
||||
endif
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
" Filetypes detected from the file contents by scripts.vim
|
||||
let s:script_checks = {
|
||||
\ 'virata': [['% Virata'],
|
||||
\ ['', '% Virata'],
|
||||
\ ['', '', '% Virata'],
|
||||
\ ['', '', '', '% Virata'],
|
||||
\ ['', '', '', '', '% Virata']],
|
||||
\ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
|
||||
\ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
|
||||
\ ['__libc_start_main and something']],
|
||||
\ 'clojure': [['#!/path/clojure']],
|
||||
\ 'scala': [['#!/path/scala']],
|
||||
\ 'tcsh': [['#!/path/tcsh']],
|
||||
\ 'zsh': [['#!/path/zsh']],
|
||||
\ 'tcl': [['#!/path/tclsh'],
|
||||
\ ['#!/path/wish'],
|
||||
\ ['#!/path/expectk'],
|
||||
\ ['#!/path/itclsh'],
|
||||
\ ['#!/path/itkwish']],
|
||||
\ 'expect': [['#!/path/expect']],
|
||||
\ 'gnuplot': [['#!/path/gnuplot']],
|
||||
\ 'make': [['#!/path/make']],
|
||||
\ 'pike': [['#!/path/pike'],
|
||||
\ ['#!/path/pike0'],
|
||||
\ ['#!/path/pike9']],
|
||||
\ 'lua': [['#!/path/lua']],
|
||||
\ 'raku': [['#!/path/perl6']],
|
||||
\ 'perl': [['#!/path/perl']],
|
||||
\ 'php': [['#!/path/php']],
|
||||
\ 'python': [['#!/path/python'],
|
||||
\ ['#!/path/python2'],
|
||||
\ ['#!/path/python3']],
|
||||
\ 'groovy': [['#!/path/groovy']],
|
||||
\ 'ruby': [['#!/path/ruby']],
|
||||
\ 'javascript': [['#!/path/node'],
|
||||
\ ['#!/path/js'],
|
||||
\ ['#!/path/nodejs'],
|
||||
\ ['#!/path/rhino']],
|
||||
\ 'bc': [['#!/path/bc']],
|
||||
\ 'sed': [['#!/path/sed']],
|
||||
\ 'ocaml': [['#!/path/ocaml']],
|
||||
\ 'awk': [['#!/path/awk'],
|
||||
\ ['#!/path/gawk']],
|
||||
\ 'wml': [['#!/path/wml']],
|
||||
\ 'scheme': [['#!/path/scheme']],
|
||||
\ 'cfengine': [['#!/path/cfengine']],
|
||||
\ 'erlang': [['#!/path/escript']],
|
||||
\ 'haskell': [['#!/path/haskell']],
|
||||
\ 'cpp': [['// Standard iostream objects -*- C++ -*-'],
|
||||
\ ['// -*- C++ -*-']],
|
||||
\ 'yaml': [['%YAML 1.2']],
|
||||
\ }
|
||||
|
||||
" Various forms of "env" optional arguments.
|
||||
let s:script_env_checks = {
|
||||
\ 'perl': [['#!/usr/bin/env VAR=val perl']],
|
||||
\ 'scala': [['#!/usr/bin/env VAR=val VVAR=vval scala']],
|
||||
\ 'awk': [['#!/usr/bin/env VAR=val -i awk']],
|
||||
\ 'scheme': [['#!/usr/bin/env VAR=val --ignore-environment scheme']],
|
||||
\ 'python': [['#!/usr/bin/env VAR=val -S python -w -T']],
|
||||
\ 'wml': [['#!/usr/bin/env VAR=val --split-string wml']],
|
||||
\ }
|
||||
|
||||
func Run_script_detection(test_dict)
|
||||
filetype on
|
||||
for [ft, files] in items(a:test_dict)
|
||||
for file in files
|
||||
enew
|
||||
silent put =file
|
||||
1delete _
|
||||
filetype detect
|
||||
call assert_equal(ft, &filetype, 'for text: ' . string(file))
|
||||
bwipe!
|
||||
endfor
|
||||
endfor
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
func Test_script_detection()
|
||||
call Run_script_detection(s:script_checks)
|
||||
call Run_script_detection(s:script_env_checks)
|
||||
endfunc
|
||||
|
||||
func Test_setfiletype_completion()
|
||||
call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
|
||||
call assert_equal('"setfiletype java javacc javascript javascriptreact', @:)
|
||||
endfunc
|
||||
|
||||
" Test for ':filetype detect' command for a buffer without a file
|
||||
func Test_emptybuf_ftdetect()
|
||||
new
|
||||
call setline(1, '#!/bin/sh')
|
||||
call assert_equal('', &filetype)
|
||||
filetype detect
|
||||
call assert_equal('sh', &filetype)
|
||||
close!
|
||||
endfunc
|
||||
|
||||
" Test for ':filetype indent on' and ':filetype indent off' commands
|
||||
func Test_filetype_indent_off()
|
||||
new Xtest.vim
|
||||
filetype indent on
|
||||
call assert_equal(1, g:did_indent_on)
|
||||
call assert_equal(['filetype detection:ON plugin:OFF indent:ON'],
|
||||
\ execute('filetype')->split("\n"))
|
||||
filetype indent off
|
||||
call assert_equal(0, exists('g:did_indent_on'))
|
||||
call assert_equal(['filetype detection:ON plugin:OFF indent:OFF'],
|
||||
\ execute('filetype')->split("\n"))
|
||||
close
|
||||
endfunc
|
||||
|
||||
func Test_hook_file()
|
||||
filetype on
|
||||
|
||||
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_equal('dosini', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['not pacman'], 'Xfile.hook')
|
||||
split Xfile.hook
|
||||
call assert_notequal('dosini', &filetype)
|
||||
bwipe!
|
||||
|
||||
call delete('Xfile.hook')
|
||||
filetype off
|
||||
endfunc
|
||||
Reference in New Issue
Block a user