This commit is contained in:
Nick White
2024-12-08 15:50:58 -08:00
committed by GitHub
207 changed files with 3998 additions and 2769 deletions

View File

@@ -9,7 +9,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. > 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 **won't affect your startup time**, as scripts are loaded only on demand\*.
- It **installs and updates 120+ times faster** than the <!--Package Count-->598<!--/Package Count--> packages it consists of. - It **installs and updates 120+ times faster** than the <!--Package Count-->599<!--/Package Count--> packages it consists of.
- It is also more secure (scripts loaded for every filetype are generated by vim-polyglot) - It is also more secure (scripts loaded for every filetype are generated by vim-polyglot)
- Best syntax and indentation support (no other features). Hand-selected language packs. - Best syntax and indentation support (no other features). Hand-selected language packs.
- Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled) - Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled)
@@ -56,7 +56,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [bicep](https://github.com/carlsmedstad/vim-bicep) (Syntax highlighting for bicep files) - [bicep](https://github.com/carlsmedstad/vim-bicep) (Syntax highlighting for bicep files)
- [blade](https://github.com/jwalton512/vim-blade) (Blade syntax highlighting for blade and blade.php files) - [blade](https://github.com/jwalton512/vim-blade) (Blade syntax highlighting for blade and blade.php files)
- [brewfile](https://github.com/bfontaine/Brewfile.vim) - [brewfile](https://github.com/bfontaine/Brewfile.vim)
- [c/c++](https://github.com/vim-jp/vim-cpp) (C++ and C syntax highlighting for cpp, c++, cc, cp, cxx and 18 more files) - [c/c++](https://github.com/vim-jp/vim-cpp) (C++ and C syntax highlighting for cpp, c++, cc, cp, cppm and 20 more files)
- [caddyfile](https://github.com/isobit/vim-caddyfile) - [caddyfile](https://github.com/isobit/vim-caddyfile)
- [carp](https://github.com/hellerve/carp-vim) (Syntax highlighting for carp files) - [carp](https://github.com/hellerve/carp-vim) (Syntax highlighting for carp files)
- [cjsx](https://github.com/mtscout6/vim-cjsx) - [cjsx](https://github.com/mtscout6/vim-cjsx)
@@ -78,7 +78,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [elm](https://github.com/andys8/vim-elm-syntax) (Elm syntax highlighting for elm 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) - [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) - [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) - [erlang](https://github.com/vim-erlang/vim-erlang-runtime) (Erlang syntax highlighting for erl, app, app.src, es, escript, hrl, xrl, yrl and yaws files)
- [fennel](https://github.com/bakpakin/fennel.vim) (Syntax highlighting for fnl 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) - [ferm](https://github.com/vim-scripts/ferm.vim) (Syntax highlighting for ferm files)
- [fish](https://github.com/blankname/vim-fish) (fish syntax highlighting for fish files) - [fish](https://github.com/blankname/vim-fish) (fish syntax highlighting for fish files)
@@ -86,8 +86,8 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [fsharp](https://github.com/ionide/Ionide-vim) (F# syntax highlighting for fs, fsi and fsx files) - [fsharp](https://github.com/ionide/Ionide-vim) (F# syntax highlighting for fs, fsi and fsx files)
- [git](https://github.com/tpope/vim-git) (Git Config syntax highlighting for gitconfig files) - [git](https://github.com/tpope/vim-git) (Git Config syntax highlighting for gitconfig files)
- [gitignore](https://github.com/SirJson/fzf-gitignore) - [gitignore](https://github.com/SirJson/fzf-gitignore)
- [gleam](https://github.com/gleam-lang/gleam.vim) (Syntax highlighting for gleam files) - [gleam](https://github.com/gleam-lang/gleam.vim/tree/main) (Syntax highlighting for gleam files)
- [glsl](https://github.com/tikhomirov/vim-glsl) (GLSL syntax highlighting for glsl, fp, frag, frg, fs and 18 more files) - [glsl](https://github.com/tikhomirov/vim-glsl) (GLSL syntax highlighting for glsl, fp, frag, frg, fs and 19 more files)
- [gmpl](https://github.com/maelvalais/gmpl.vim) (Syntax highlighting for mod 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) - [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) - [go](https://github.com/fatih/vim-go) (Go syntax highlighting for go and tmpl files)
@@ -112,13 +112,13 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (Syntax highlighting for jenkinsfile and Jenkinsfile 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) - [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) - [json5](https://github.com/GutenYe/json5.vim) (JSON5 syntax highlighting for json5 files)
- [json](https://github.com/elzr/vim-json) (JSON syntax highlighting for json, 4DForm, 4DProject, avsc, geojson and 15 more files) - [json](https://github.com/elzr/vim-json) (JSON syntax highlighting for json, 4DForm, 4DProject, avsc, geojson and 16 more files)
- [jsonc](https://github.com/neoclide/jsonc.vim) (Syntax highlighting for cjson and jsonc files) - [jsonc](https://github.com/neoclide/jsonc.vim) (Syntax highlighting for cjson and jsonc files)
- [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files) - [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files)
- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect, ejs.t and jst files) - [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect, ejs.t and jst files)
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files) - [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files)
- [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files) - [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files)
- [just](https://github.com/NoahTheDuke/vim-just) (Syntax highlighting for just files) - [just](https://github.com/NoahTheDuke/vim-just/tree/main) (Syntax highlighting for just files)
- [kotlin](https://github.com/udalov/kotlin-vim) (Kotlin syntax highlighting for kt, ktm and kts 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) - [ledger](https://github.com/ledger/vim-ledger) (Syntax highlighting for ldg, ledger and journal files)
- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond/tree/main) (LilyPond syntax highlighting for ly and ily files) - [lilypond](https://github.com/anowlcalledjosh/vim-lilypond/tree/main) (LilyPond syntax highlighting for ly and ily files)
@@ -150,15 +150,16 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [pgsql](https://github.com/lifepillar/pgsql.vim) (PLpgSQL syntax highlighting for pgsql 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) - [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) - [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) - [pony](https://github.com/dleonard0/pony-vim-syntax) (Pony syntax highlighting for pony files)
- [powershell](https://github.com/PProvost/vim-ps1) (PowerShell syntax highlighting for ps1, psd1, psm1, pssc and ps1xml files) - [powershell](https://github.com/PProvost/vim-ps1) (PowerShell syntax highlighting for ps1, psd1, psm1, pssc and ps1xml files)
- [prisma](https://github.com/prisma/vim-prisma) (Prisma syntax highlighting for prisma files)
- [protobuf](https://github.com/uarun/vim-protobuf) (Protocol Buffer syntax highlighting for proto 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) - [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) - [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) - [purescript](https://github.com/purescript-contrib/purescript-vim) (PureScript syntax highlighting for purs files)
- [python-compiler](https://github.com/aliev/vim-compiler-python) - [python-compiler](https://github.com/aliev/vim-compiler-python)
- [python-indent](https://github.com/Vimjas/vim-python-pep8-indent) - [python-indent](https://github.com/Vimjas/vim-python-pep8-indent)
- [python](https://github.com/vim-python/python-syntax) (Python syntax highlighting for py, cgi, fcgi, gyp, gypi and 14 more files) - [python](https://github.com/vim-python/python-syntax) (Python syntax highlighting for py, cgi, fcgi, gyp, gypi and 13 more files)
- [qmake](https://github.com/artoj/qmake-syntax-vim) (QMake syntax highlighting for pro and pri 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) - [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) - [r-lang](https://github.com/vim-scripts/R.vim) (R syntax highlighting for r, rsx, s, S and rd files)
@@ -204,11 +205,11 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [velocity](https://github.com/lepture/vim-velocity) (Syntax highlighting for vm 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) - [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) - [xdc](https://github.com/amal-khailtash/vim-xdc-syntax) (Syntax highlighting for xdc files)
- [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axaml and 97 more files) - [xml](https://github.com/amadeus/vim-xml) (XML syntax highlighting for xml, adml, admx, ant, axaml and 100 more files)
- [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files) - [xsl](https://github.com/vim-scripts/XSLT-syntax) (XSLT syntax highlighting for xslt and xsl files)
- [yard](https://github.com/noprompt/vim-yardoc) - [yard](https://github.com/noprompt/vim-yardoc)
- [zephir](https://github.com/xwsoul/vim-zephir) (Zephir syntax highlighting for zep files) - [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) - [zig](https://github.com/ziglang/zig.vim) (Zig syntax highlighting for zir, zig, zig.zon and zir files)
- [zinit](https://github.com/zdharma-continuum/zinit-vim-syntax/tree/main) - [zinit](https://github.com/zdharma-continuum/zinit-vim-syntax/tree/main)
<!--/Language Packs--> <!--/Language Packs-->

View File

@@ -1,11 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'just', 'after/ftplugin/just.vim')
finish
endif
" Vim ftplugin file
" Language: Justfile
" Maintainer: Noah Bogart <noah.bogart@hey.com>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2021 May 19
setlocal iskeyword+=-

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/javas
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/php.v
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/indent/types
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -8,7 +8,7 @@ endif
" Original Author: Mikhail Wolfson <mywolfson@gmail.com> " Original Author: Mikhail Wolfson <mywolfson@gmail.com>
" Maintainer: bfrg <https://github.com/bfrg> " Maintainer: bfrg <https://github.com/bfrg>
" Website: https://github.com/bfrg/vim-cpp-modern " Website: https://github.com/bfrg/vim-cpp-modern
" Last Change: Jul 24, 2021 " Last Change: Jul 9, 2024
" "
" This syntax file is based on: " This syntax file is based on:
" https://github.com/octol/vim-cpp-enhanced-highlight " https://github.com/octol/vim-cpp-enhanced-highlight
@@ -21,8 +21,10 @@ syn keyword cTodo contained BUG NOTE
" Highlight function names " Highlight function names
if get(g:, 'cpp_function_highlight', 1) if get(g:, 'cpp_function_highlight', 1)
syn match cUserFunction "\<\h\w*\>\(\s\|\n\)*("me=e-1 contains=cParen,cCppParen syn match cUserFunction "\<\h\w*\ze\_s\{-}(\%(\*\h\w*)\_s\{-}(\)\@!"
syn match cUserFunctionPointer "\%((\s*\*\s*\)\@6<=\h\w*\ze\s*)\_s\{-}(.*)"
hi def link cUserFunction Function hi def link cUserFunction Function
hi def link cUserFunctionPointer Function
endif endif

View File

@@ -8,7 +8,7 @@ endif
" Original Author: Jon Haggblad <https://github.com/octol> " Original Author: Jon Haggblad <https://github.com/octol>
" Maintainer: bfrg <https://github.com/bfrg> " Maintainer: bfrg <https://github.com/bfrg>
" Website: https://github.com/bfrg/vim-cpp-modern " Website: https://github.com/bfrg/vim-cpp-modern
" Last Change: Sep 15, 2022 " Last Change: Oct 13, 2023
" "
" This syntax file is based on: " This syntax file is based on:
" https://github.com/octol/vim-cpp-enhanced-highlight " https://github.com/octol/vim-cpp-enhanced-highlight
@@ -177,9 +177,9 @@ endif
" C++23 extensions {{{1 " C++23 extensions {{{1
if !exists('cpp_no_cpp23') if !exists('cpp_no_cpp23')
syntax keyword cppSTLtype basic_stacktrace stacktrace_entry is_scoped_enum syntax keyword cppSTLtype basic_stacktrace stacktrace_entry is_scoped_enum mdspan extents default_accessor layout_left layout_right layout_stride flat_set flat_map flat_multiset flat_multimap is_implicit_lifetime reference_constructs_from_temporary reference_converts_from_temporary
syntax keyword cppSTLtypedef stacktrace syntax keyword cppSTLtypedef stacktrace dextents
syntax keyword cppSTLbool is_scoped_enum_v syntax keyword cppSTLbool is_implicit_lifetime_v is_scoped_enum_v reference_constructs_from_temporary_v reference_converts_from_temporary_v
syntax keyword cppSTLfunction invoke_r syntax keyword cppSTLfunction invoke_r
syntax keyword cppSTLtype expected unexpected unexpect_t bad_expected_access syntax keyword cppSTLtype expected unexpected unexpect_t bad_expected_access
syntax keyword cppSTLvariable unexpect syntax keyword cppSTLvariable unexpect

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/javas
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/php/g
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/reaso
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/rescr
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'after/syntax/types
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -1,24 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'autoload/coc/source/requirements.vim')
finish
endif
""
" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source
function! coc#source#requirements#init() abort
return {
\ 'shortcut': 'pip',
\ 'priority': 9,
\ 'filetypes': ['requirements'],
\ }
endfunction
""
" https://github.com/neoclide/coc.nvim/wiki/Create-custom-source
"
" Completion pip option and PYPI package names.
" Note: completion PYPI package names need install pip-cache from PYPI,
" and run `pip-cache update` first to generate cache.
function! coc#source#requirements#complete(opt, cb) abort
call a:cb(g:requirements#items)
endfunction
" vim: et sw=4 ts=4 sts=4:

View File

@@ -224,11 +224,11 @@ endfu
fu! csv#RemoveAutoHighlight() "{{{3 fu! csv#RemoveAutoHighlight() "{{{3
exe "aug CSV_HI".bufnr('') exe "aug CSV_HI".bufnr('')
exe "au! CursorMoved <buffer=".bufnr('').">" exe "au! "
aug end aug end
exe "aug! CSV_HI".bufnr('') exe "aug! CSV_HI".bufnr('')
" Remove any existing highlighting " Remove any existing highlighting
HiColumn! call csv#HiCol('', 1)
endfu endfu
fu! csv#DoAutoCommands() "{{{3 fu! csv#DoAutoCommands() "{{{3
@@ -246,9 +246,8 @@ fu! csv#DoAutoCommands() "{{{3
endif endif
" undo autocommand: " undo autocommand:
let b:undo_ftplugin .= '| exe "sil! au! CSV_HI'.bufnr('').' CursorMoved <buffer> "' let b:undo_ftplugin .= '| exe "sil! au! CSV_HI'.bufnr('').' CursorMoved <buffer> "'
let b:undo_ftplugin .= '| exe "sil! aug! CSV_HI'.bufnr('').'"' let b:undo_ftplugin .= '| call csv#RemoveAutoHighlight()'
let b:undo_ftplugin = 'exe "sil! HiColumn!" |' . b:undo_ftplugin let b:undo_ftplugin = 'exe "sil! HiColumn!" |' . b:undo_ftplugin
if has("gui_running") && !exists("#CSV_Menu#FileType") if has("gui_running") && !exists("#CSV_Menu#FileType")
augroup CSV_Menu augroup CSV_Menu
au! au!
@@ -443,10 +442,14 @@ fu! csv#HiCol(colnr, bang) "{{{3
if exists("s:matchid") if exists("s:matchid")
" ignore errors, that come from already deleted matches " ignore errors, that come from already deleted matches
sil! call matchdelete(s:matchid) sil! call matchdelete(s:matchid)
if a:bang
unlet! s:matchid
return
endif
endif endif
" Additionally, filter all matches, that could have been used earlier " Additionally, filter all matches, that could have been used earlier
let matchlist=getmatches() let matchlist=getmatches()
call filter(matchlist, 'v:val["group"] !~ s:hiGroup') call filter(matchlist, 'v:val["group"] !~? s:hiGroup')
call setmatches(matchlist) call setmatches(matchlist)
if a:bang if a:bang
return return
@@ -455,6 +458,10 @@ fu! csv#HiCol(colnr, bang) "{{{3
elseif !a:bang elseif !a:bang
exe ":2match " . s:hiGroup . ' /' . pat . '/' exe ":2match " . s:hiGroup . ' /' . pat . '/'
endif endif
" Remove Highlighting once switching away from the buffer
exe "aug CSV_HI".bufnr('')
exe "au BufWinLeave <buffer=".bufnr('')."> call csv#RemoveAutoHighlight()"
aug end
endfu endfu
fu! csv#GetDelimiter(first, last, ...) "{{{3 fu! csv#GetDelimiter(first, last, ...) "{{{3
" This depends on the locale. Hopefully it works " This depends on the locale. Hopefully it works
@@ -482,12 +489,16 @@ fu! csv#GetDelimiter(first, last, ...) "{{{3
" :silent :s does not work with lazyredraw " :silent :s does not work with lazyredraw
let _lz = &lz let _lz = &lz
set nolz set nolz
" substitute without output when cmdheight=0
let _cmdheight = &cmdheight
set cmdheight=1
for i in values(Delim) for i in values(Delim)
redir => temp[i] redir => temp[i]
" use very non-magic " use very non-magic
exe ":silent! :". first. ",". last. 's/\V' . i . "/&/nge" exe ":silent! :". first. ",". last. 's/\V' . i . "/&/nge"
redir END redir END
endfor endfor
let &cmdheight = _cmdheight
let &lz = _lz let &lz = _lz
let Delim = map(temp, 'matchstr(substitute(v:val, "\n", "", ""), "^\\s*\\d\\+")') let Delim = map(temp, 'matchstr(substitute(v:val, "\n", "", ""), "^\\s*\\d\\+")')
let Delim = filter(temp, 'v:val=~''\d''') let Delim = filter(temp, 'v:val=~''\d''')
@@ -779,7 +790,11 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3
" does not work with fixed width columns " does not work with fixed width columns
" row for the row for which to calculate the width " row for the row for which to calculate the width
let b:col_width=[] let b:col_width=[]
let vts_save=""
if has( 'vartabs' ) && b:delimiter == "\t" if has( 'vartabs' ) && b:delimiter == "\t"
if &l:vts
let vts_save=&vts
endif
setlocal vts= setlocal vts=
endif endif
try try
@@ -800,6 +815,9 @@ fu! csv#CalculateColumnWidth(row, silent) "{{{3
" delete buffer content in variable b:csv_list, " delete buffer content in variable b:csv_list,
" this was only necessary for calculating the max width " this was only necessary for calculating the max width
unlet! b:csv_list s:columnize_count s:decimal_column unlet! b:csv_list s:columnize_count s:decimal_column
if vts_save
let &l:vts=vts_save
endif
endfu endfu
fu! csv#Columnize(field) "{{{3 fu! csv#Columnize(field) "{{{3
" Internal function, not called from external, " Internal function, not called from external,
@@ -867,7 +885,7 @@ fu! csv#Columnize(field) "{{{3
if get(s:decimal_column, colnr, 0) == 0 if get(s:decimal_column, colnr, 0) == 0
call csv#CheckHeaderLine() call csv#CheckHeaderLine()
call csv#NumberFormat() call csv#NumberFormat()
let data = csv#CopyCol('', colnr+1, '')[s:csv_fold_headerline : -1] let data = csv#CopyCol('', colnr+1, '', 0)[s:csv_fold_headerline : -1]
let pat1 = escape(s:nr_format[1], '.').'\zs[^'.s:nr_format[1].']*\ze'. let pat1 = escape(s:nr_format[1], '.').'\zs[^'.s:nr_format[1].']*\ze'.
\ (has_delimiter ? b:delimiter : '').'$' \ (has_delimiter ? b:delimiter : '').'$'
let pat2 = '\d\+\ze\%(\%('.escape(s:nr_format[1], '.'). '\d\+\)\|'. let pat2 = '\d\+\ze\%(\%('.escape(s:nr_format[1], '.'). '\d\+\)\|'.
@@ -1001,9 +1019,9 @@ fu! csv#SplitHeaderLine(lines, bang, hor) "{{{3
setl scrollopt=ver scrollbind cursorbind setl scrollopt=ver scrollbind cursorbind
noa 0 noa 0
if a:lines[-1:] is? '!' if a:lines[-1:] is? '!'
let a=csv#CopyCol('',a:lines,'') let a=csv#CopyCol('',a:lines,'', 0)
else else
let a=csv#CopyCol('',1, a:lines-1) let a=csv#CopyCol('',1, a:lines-1, 0)
endif endif
" Does it make sense to use the preview window? " Does it make sense to use the preview window?
"vert sil! pedit |wincmd w | enew! "vert sil! pedit |wincmd w | enew!
@@ -1240,7 +1258,7 @@ fu! csv#Sort(bang, line1, line2, colnr) range "{{{3
\' r'. flag. ' /' . pat . '/' \' r'. flag. ' /' . pat . '/'
call winrestview(wsv) call winrestview(wsv)
endfun endfun
fu! csv#CopyCol(reg, col, cnt) "{{{3 fu! csv#CopyCol(reg, col, cnt, bang) "{{{3
" Return Specified Column into register reg " Return Specified Column into register reg
let col = a:col == "0" ? csv#WColumn() : a:col+0 let col = a:col == "0" ? csv#WColumn() : a:col+0
let mcol = csv#MaxColumns() let mcol = csv#MaxColumns()
@@ -1254,11 +1272,18 @@ fu! csv#CopyCol(reg, col, cnt) "{{{3
let cnt_cols = col + a:cnt - 1 let cnt_cols = col + a:cnt - 1
endif endif
let a = [] let a = []
let first = 1
call csv#CheckHeaderLine()
if a:bang && first <= s:csv_fold_headerline
" don't take the header line into consideration
let first = s:csv_fold_headerline + 1
endif
" Don't get lines, that are currently filtered away " Don't get lines, that are currently filtered away
if !exists("b:csv_filter") || empty(b:csv_filter) if !exists("b:csv_filter") || empty(b:csv_filter)
let a=getline(1, '$') let a=getline(first, '$')
else else
for line in range(1, line('$')) for line in range(first, line('$'))
if foldlevel(line) if foldlevel(line)
continue continue
else else
@@ -1686,7 +1711,7 @@ fu! csv#DoForEachColumn(start, stop, bang) range "{{{3
endif endif
for item in range(a:start, a:stop, 1) for item in range(a:start, a:stop, 1)
if foldlevel(line) if foldlevel(item)
" Filter out folded lines (from dynamic filter) " Filter out folded lines (from dynamic filter)
continue continue
endif endif
@@ -1719,7 +1744,7 @@ fu! csv#DoForEachColumn(start, stop, bang) range "{{{3
endfor endfor
endif endif
for j in range(1, columns, 1) for j in range(1, columns, 1)
let t=substitute(t, '%s', fields[j-1], '') let t=substitute(t, '%s', get(fields, j-1, ''), '')
endfor endfor
call add(result, t) call add(result, t)
endfor endfor
@@ -1738,7 +1763,7 @@ fu! csv#PrepareDoForEachColumn(start, stop, bang) range"{{{3
let post = exists("g:csv_post_convert") ? g:csv_post_convert : '' let post = exists("g:csv_post_convert") ? g:csv_post_convert : ''
let g:csv_post_convert=input('Post convert text: ', post) let g:csv_post_convert=input('Post convert text: ', post)
let convert = exists("g:csv_convert") ? g:csv_convert : '' let convert = exists("g:csv_convert") ? g:csv_convert : ''
let g:csv_convert=input("Converted text, use %s for column input:\n", convert) let g:csv_convert=input("How to convert data (use %s for column input):\n", convert)
call csv#DoForEachColumn(a:start, a:stop, a:bang) call csv#DoForEachColumn(a:start, a:stop, a:bang)
endfun endfun
fu! csv#EscapeValue(val) "{{{3 fu! csv#EscapeValue(val) "{{{3
@@ -1986,7 +2011,7 @@ fu! csv#AnalyzeColumn(...) "{{{3
" Initialize csv#fold_headerline " Initialize csv#fold_headerline
call csv#CheckHeaderLine() call csv#CheckHeaderLine()
let data = csv#CopyCol('', colnr, '')[s:csv_fold_headerline : -1] let data = csv#CopyCol('', colnr, '', 0)[s:csv_fold_headerline : -1]
let qty = len(data) let qty = len(data)
let res = {} let res = {}
for item in data for item in data
@@ -2259,100 +2284,45 @@ fu! csv#CSVMappings() "{{{3
endif endif
endfu endfu
fu! csv#CommandDefinitions() "{{{3 fu! csv#CommandDefinitions() "{{{3
call csv#LocalCmd("WhatColumn", ':echo csv#WColumn(<bang>0)', call csv#LocalCmd("AddColumn", ':call csv#AddColumn(<line1>,<line2>,<f-args>)', '-range=% -nargs=* -complete=custom,csv#SortComplete')
\ '-bang') call csv#LocalCmd("Analyze", ':call csv#AnalyzeColumn(<f-args>)', '-nargs=*' )
call csv#LocalCmd("NrColumns", ':call csv#NrColumns(<q-bang>)', '-bang') call csv#LocalCmd("ArrangeColumn", ':call csv#ArrangeCol(<line1>, <line2>, <bang>0, -1, <q-args>)', '-range -bang -bar -nargs=?')
call csv#LocalCmd("HiColumn", ':call csv#HiCol(<q-args>,<bang>0)', call csv#LocalCmd("AvgCol", ':echo csv#EvalColumn(<q-args>, "csv#AvgColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
\ '-bang -nargs=?')
call csv#LocalCmd("SearchInColumn",
\ ':call csv#SearchColumn(<q-args>)', '-nargs=*')
call csv#LocalCmd("DeleteColumn", ':call csv#DeleteColumn(<q-args>)',
\ '-nargs=? -complete=custom,csv#SortComplete')
call csv#LocalCmd("ArrangeColumn",
\ ':call csv#ArrangeCol(<line1>, <line2>, <bang>0, -1, <q-args>)',
\ '-range -bang -bar -nargs=?')
call csv#LocalCmd("SmplVarCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#SmplVarianceColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("PopVarCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#PopVarianceColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("SmplStdCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#SmplStdDevColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("PopStdCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#PopStdDevColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("UnArrangeColumn",
\':call csv#PrepUnArrangeCol(<line1>, <line2>)',
\ '-bar -range')
call csv#LocalCmd("CSVInit", ':call csv#Init(<line1>,<line2>,<bang>0)',
\ '-bang -range=%')
call csv#LocalCmd('Header',
\ ':call csv#SplitHeaderLine(<q-args>,<bang>0,1)',
\ '-nargs=? -bang')
call csv#LocalCmd('VHeader',
\ ':call csv#SplitHeaderLine(<q-args>,<bang>0,0)',
\ '-nargs=? -bang')
call csv#LocalCmd("HeaderToggle",
\ ':call csv#SplitHeaderToggle(1)', '')
call csv#LocalCmd("VHeaderToggle",
\ ':call csv#SplitHeaderToggle(0)', '')
call csv#LocalCmd("Sort",
\ ':call csv#Sort(<bang>0, <line1>,<line2>,<q-args>)',
\ '-nargs=* -bang -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("Column",
\ ':call csv#CopyCol(empty(<q-reg>)?''"'':<q-reg>,<q-count>,<q-args>)',
\ '-count -register -nargs=?')
call csv#LocalCmd("MoveColumn",
\ ':call csv#MoveColumn(<line1>,<line2>,<f-args>)',
\ '-range=% -nargs=* -complete=custom,csv#SortComplete')
call csv#LocalCmd("SumCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#SumColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("MaxCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#MaxColumn", <line1>,<line2>, 1)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("MinCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#MaxColumn", <line1>,<line2>, 0)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("CountCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#CountColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("AvgCol",
\ ':echo csv#EvalColumn(<q-args>, "csv#AvgColumn", <line1>,<line2>)',
\ '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd('SumRow', ':call csv#SumCSVRow(<q-count>, <q-args>)',
\ '-nargs=? -range')
call csv#LocalCmd("ConvertData",
\ ':call csv#PrepareDoForEachColumn(<line1>,<line2>,<bang>0)',
\ '-bang -nargs=? -range=%')
call csv#LocalCmd("Filters", ':call csv#OutputFilters(<bang>0)',
\ '-nargs=0 -bang')
call csv#LocalCmd("Analyze", ':call csv#AnalyzeColumn(<f-args>)',
\ '-nargs=*' )
call csv#LocalCmd("VertFold", ':call csv#Vertfold(<bang>0,<q-args>)',
\ '-bang -nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("CSVFixed", ':call csv#InitCSVFixedWidth()', '') call csv#LocalCmd("CSVFixed", ':call csv#InitCSVFixedWidth()', '')
call csv#LocalCmd("NewRecord", ':call csv#NewRecord(<line1>, call csv#LocalCmd("CSVInit", ':call csv#Init(<line1>,<line2>,<bang>0)', '-bang -range=%')
\ <line2>, <q-args>)', '-nargs=? -range') call csv#LocalCmd("Column", ':call csv#CopyCol(empty(<q-reg>)?''"'':<q-reg>,<q-count>,<q-args>, <bang>0)', '-bang -count -register -nargs=?')
call csv#LocalCmd("NewDelimiter", ':call csv#NewDelimiter(<q-args>, 1, line(''$''))', call csv#LocalCmd("ConvertData", ':call csv#PrepareDoForEachColumn(<line1>,<line2>,<bang>0)', '-bang -nargs=0 -range=%')
\ '-nargs=1') call csv#LocalCmd("CountCol", ':echo csv#EvalColumn(<q-args>, "csv#CountColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("Duplicates", ':call csv#CheckDuplicates(<q-args>)', call csv#LocalCmd("DeleteColumn", ':call csv#DeleteColumn(<q-args>)', '-nargs=? -complete=custom,csv#SortComplete')
\ '-nargs=? -complete=custom,csv#CompleteColumnNr') call csv#LocalCmd("DupColumn", ':call csv#DupColumn(<line1>,<line2>,<f-args>)', '-range=% -nargs=* -complete=custom,csv#SortComplete')
call csv#LocalCmd('Transpose', ':call csv#Transpose(<line1>, <line2>)', call csv#LocalCmd("Duplicates", ':call csv#CheckDuplicates(<q-args>)', '-nargs=? -complete=custom,csv#CompleteColumnNr')
\ '-range=%') call csv#LocalCmd("Filters", ':call csv#OutputFilters(<bang>0)', '-nargs=0 -bang')
call csv#LocalCmd('CSVTabularize', ':call csv#Tabularize(<bang>0,<line1>,<line2>)', call csv#LocalCmd("HeaderToggle", ':call csv#SplitHeaderToggle(1)', '')
\ '-bang -range=%') call csv#LocalCmd("HiColumn", ':call csv#HiCol(<q-args>,<bang>0)', '-bang -nargs=?')
call csv#LocalCmd("AddColumn", call csv#LocalCmd("MaxCol", ':echo csv#EvalColumn(<q-args>, "csv#MaxColumn", <line1>,<line2>, 1)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
\ ':call csv#AddColumn(<line1>,<line2>,<f-args>)', call csv#LocalCmd("MinCol", ':echo csv#EvalColumn(<q-args>, "csv#MaxColumn", <line1>,<line2>, 0)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
\ '-range=% -nargs=* -complete=custom,csv#SortComplete') call csv#LocalCmd("MoveColumn", ':call csv#MoveColumn(<line1>,<line2>,<f-args>)', '-range=% -nargs=* -complete=custom,csv#SortComplete')
call csv#LocalCmd("DupColumn", call csv#LocalCmd("NewDelimiter", ':call csv#NewDelimiter(<q-args>, 1, line(''$''))', '-nargs=1')
\ ':call csv#DupColumn(<line1>,<line2>,<f-args>)', call csv#LocalCmd("NewRecord", ':call csv#NewRecord(<line1>, <line2>, <q-args>)', '-nargs=? -range')
\ '-range=% -nargs=* -complete=custom,csv#SortComplete') call csv#LocalCmd("NrColumns", ':call csv#NrColumns(<q-bang>)', '-bang')
call csv#LocalCmd('Substitute', ':call csv#SubstituteInColumn(<q-args>,<line1>,<line2>)', call csv#LocalCmd("PopStdCol", ':echo csv#EvalColumn(<q-args>, "csv#PopStdDevColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
\ '-nargs=1 -range=%') call csv#LocalCmd("PopVarCol", ':echo csv#EvalColumn(<q-args>, "csv#PopVarianceColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("SearchInColumn", ':call csv#SearchColumn(<q-args>)', '-nargs=*')
call csv#LocalCmd("SmplStdCol", ':echo csv#EvalColumn(<q-args>, "csv#SmplStdDevColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("SmplVarCol", ':echo csv#EvalColumn(<q-args>, "csv#SmplVarianceColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("Sort", ':call csv#Sort(<bang>0, <line1>,<line2>,<q-args>)', '-nargs=* -bang -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("SumCol", ':echo csv#EvalColumn(<q-args>, "csv#SumColumn", <line1>,<line2>)', '-nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("UnArrangeColumn", ':call csv#PrepUnArrangeCol(<line1>, <line2>)', '-bar -range')
call csv#LocalCmd("VHeaderToggle", ':call csv#SplitHeaderToggle(0)', '')
call csv#LocalCmd("VertFold", ':call csv#Vertfold(<bang>0,<q-args>)', '-bang -nargs=? -range=% -complete=custom,csv#SortComplete')
call csv#LocalCmd("WhatColumn", ':echo csv#WColumn(<bang>0)', '-bang')
call csv#LocalCmd('CSVTabularize', ':call csv#Tabularize(<bang>0,<line1>,<line2>)', '-bang -range=%')
call csv#LocalCmd('ColumnWidth', ':call csv#ColumnWidth()', '') call csv#LocalCmd('ColumnWidth', ':call csv#ColumnWidth()', '')
call csv#LocalCmd('Header', ':call csv#SplitHeaderLine(<q-args>,<bang>0,1)', '-nargs=? -bang')
call csv#LocalCmd('Substitute', ':call csv#SubstituteInColumn(<q-args>,<line1>,<line2>)', '-nargs=1 -range=%')
call csv#LocalCmd('SumRow', ':call csv#SumCSVRow(<q-count>, <q-args>)', '-nargs=? -range')
call csv#LocalCmd('Transpose', ':call csv#Transpose(<line1>, <line2>)', '-range=%')
call csv#LocalCmd('VHeader', ':call csv#SplitHeaderLine(<q-args>,<bang>0,0)', '-nargs=? -bang')
endfu endfu
fu! csv#ColumnWidth() fu! csv#ColumnWidth()
let w=CSVWidth() let w=CSVWidth()
@@ -2636,21 +2606,21 @@ fu! csv#Tabularize(bang, first, last) "{{{3
endif endif
let _c = winsaveview() let _c = winsaveview()
" Table delimiter definition "{{{4 " Table delimiter definition "{{{4
if !exists("s:td") let use_unicode = &enc =~# 'utf-8' && get(g:, 'csv_table_use_ascii', 0) == 0
let s:td = { let s:td = {
\ 'hbar': (&enc =~# 'utf-8' ? '─' : '-'), \ 'hbar': (use_unicode ? '─' : '-'),
\ 'vbar': (&enc =~# 'utf-8' ? '│' : '|'), \ 'vbar': (use_unicode ? '│' : '|'),
\ 'scol': (&enc =~# 'utf-8' ? '├' : '|'), \ 'scol': (use_unicode ? '├' : '|'),
\ 'ecol': (&enc =~# 'utf-8' ? '┤' : '|'), \ 'ecol': (use_unicode ? '┤' : '|'),
\ 'ltop': (&enc =~# 'utf-8' ? '┌' : '+'), \ 'ltop': (use_unicode ? '┌' : '+'),
\ 'rtop': (&enc =~# 'utf-8' ? '┐' : '+'), \ 'rtop': (use_unicode ? '┐' : '+'),
\ 'lbot': (&enc =~# 'utf-8' ? '└' : '+'), \ 'lbot': (use_unicode ? '└' : '+'),
\ 'rbot': (&enc =~# 'utf-8' ? '┘' : '+'), \ 'rbot': (use_unicode ? '┘' : '+'),
\ 'cros': (&enc =~# 'utf-8' ? '┼' : '+'), \ 'cros': (use_unicode ? '┼' : '+'),
\ 'dhor': (&enc =~# 'utf-8' ? '┬' : '-'), \ 'dhor': (use_unicode ? '┬' : '-'),
\ 'uhor': (&enc =~# 'utf-8' ? '┴' : '-') \ 'uhor': (use_unicode ? '┴' : '-')
\ } \ }
endif "}}}4 "}}}4
if match(getline(a:first), '^'.s:td.ltop) > -1 if match(getline(a:first), '^'.s:td.ltop) > -1
" Already tabularized, done " Already tabularized, done
call csv#Warn("Looks already Tabularized, aborting!") call csv#Warn("Looks already Tabularized, aborting!")
@@ -2994,7 +2964,7 @@ fu! csv#EvalColumn(nr, func, first, last, ...) range "{{{3
let stop += s:csv_fold_headerline let stop += s:csv_fold_headerline
endif endif
let column = csv#CopyCol('', col, '')[start : stop] let column = csv#CopyCol('', col, '', 0)[start : stop]
let column = csv#GetCells(column) let column = csv#GetCells(column)
" Delete empty values " Delete empty values
" Leave this up to the function that does something " Leave this up to the function that does something
@@ -3113,7 +3083,7 @@ fu! CSVField(x, y, ...) "{{{3
let orig = !empty(a:0) let orig = !empty(a:0)
let y = (y < 0 ? 0 : y) let y = (y < 0 ? 0 : y)
let x = (x > (csv#MaxColumns()) ? (csv#MaxColumns()) : x) let x = (x > (csv#MaxColumns()) ? (csv#MaxColumns()) : x)
let col = csv#CopyCol('',x,'') let col = csv#CopyCol('',x,'',0)
if !orig if !orig
" remove leading and trainling whitespace and the delimiter " remove leading and trainling whitespace and the delimiter
return matchstr(col[y], '^\s*\zs.\{-}\ze\s*'.b:delimiter.'\?$') return matchstr(col[y], '^\s*\zs.\{-}\ze\s*'.b:delimiter.'\?$')

View File

@@ -72,7 +72,7 @@ endfunction
function! s:in_embedded_view() function! s:in_embedded_view()
let groups = map(synstack(line('.'), col('.')), "synIDattr(v:val, 'name')") let groups = map(synstack(line('.'), col('.')), "synIDattr(v:val, 'name')")
for group in ['elixirPhoenixESigil', 'elixirLiveViewSigil', 'elixirSurfaceSigil'] for group in ['elixirPhoenixESigil', 'elixirLiveViewSigil', 'elixirSurfaceSigil', 'elixirHeexSigil']
if index(groups, group) >= 0 if index(groups, group) >= 0
return 1 return 1
endif endif
@@ -383,7 +383,7 @@ endfunction
" function, etc... so we need to first figure out what the innermost structure " function, etc... so we need to first figure out what the innermost structure
" is then forward execution to the proper handler " is then forward execution to the proper handler
function! elixir#indent#handle_inside_block(context) function! elixir#indent#handle_inside_block(context)
let start_pattern = '\C\%(\<with\>\|\<if\>\|\<case\>\|\<cond\>\|\<try\>\|\<receive\>\|\<fn\>\|{\|\[\|(\)' let start_pattern = '\C\%(\<with\>\|\<if\>\|\<case\>\|\<cond\>\|\<try\>\|\<receive\>\|\<fn\>\|\<quote\>\|{\|\[\|(\)'
let end_pattern = '\C\%(\<end\>\|\]\|}\|)\)' let end_pattern = '\C\%(\<end\>\|\]\|}\|)\)'
" hack - handle do: better " hack - handle do: better
let block_info = searchpairpos(start_pattern, '', end_pattern, 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip() || getline(line('.')) =~ 'do:'", max([0, a:context.lnum - g:elixir_indent_max_lookbehind])) let block_info = searchpairpos(start_pattern, '', end_pattern, 'bnW', "line('.') == " . line('.') . " || elixir#indent#searchpair_back_skip() || getline(line('.')) =~ 'do:'", max([0, a:context.lnum - g:elixir_indent_max_lookbehind]))
@@ -398,6 +398,7 @@ function! elixir#indent#handle_inside_block(context)
let never_match = '' let never_match = ''
let config = { let config = {
\'f': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match}, \'f': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match},
\'q': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match},
\'c': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match}, \'c': {'aligned_clauses': s:keyword('end'), 'pattern_match_clauses': never_match},
\'t': {'aligned_clauses': s:keyword('end\|catch\|rescue\|after\|else'), 'pattern_match_clauses': s:keyword('catch\|rescue\|else')}, \'t': {'aligned_clauses': s:keyword('end\|catch\|rescue\|after\|else'), 'pattern_match_clauses': s:keyword('catch\|rescue\|else')},
\'r': {'aligned_clauses': s:keyword('end\|after'), 'pattern_match_clauses': s:keyword('after')}, \'r': {'aligned_clauses': s:keyword('end\|after'), 'pattern_match_clauses': s:keyword('after')},

View File

@@ -153,5 +153,5 @@ function! fish#Complete(findstart, base)
endfunction endfunction
function! fish#errorformat() function! fish#errorformat()
return '%Afish: %m,%-G%*\\ ^,%-Z%f (line %l):%s' return '%E%f (line %l):%m,%C%p^%.%#,%-C%.%#'
endfunction endfunction

View File

@@ -167,7 +167,10 @@ let s:config_keys_camel =
\ {'key': 'ExcludeProjectDirectories', 'default': []}, \ {'key': 'ExcludeProjectDirectories', 'default': []},
\ {'key': 'keywordsAutocomplete', 'default': 1}, \ {'key': 'keywordsAutocomplete', 'default': 1},
\ {'key': 'ExternalAutocomplete', 'default': 0}, \ {'key': 'ExternalAutocomplete', 'default': 0},
\ {'key': 'FullNameExternalAutocomplete', 'default': 0},
\ {'key': 'Linter', 'default': 1}, \ {'key': 'Linter', 'default': 1},
\ {'key': 'LinterConfig'},
\ {'key': 'IndentationSize', 'default': 4},
\ {'key': 'UnionCaseStubGeneration', 'default': 1}, \ {'key': 'UnionCaseStubGeneration', 'default': 1},
\ {'key': 'UnionCaseStubGenerationBody'}, \ {'key': 'UnionCaseStubGenerationBody'},
\ {'key': 'RecordStubGeneration', 'default': 1}, \ {'key': 'RecordStubGeneration', 'default': 1},
@@ -175,18 +178,39 @@ let s:config_keys_camel =
\ {'key': 'InterfaceStubGeneration', 'default': 1}, \ {'key': 'InterfaceStubGeneration', 'default': 1},
\ {'key': 'InterfaceStubGenerationObjectIdentifier', 'default': 'this'}, \ {'key': 'InterfaceStubGenerationObjectIdentifier', 'default': 'this'},
\ {'key': 'InterfaceStubGenerationMethodBody'}, \ {'key': 'InterfaceStubGenerationMethodBody'},
\ {'key': 'AddPrivateAccessModifier', 'default': 0},
\ {'key': 'UnusedOpensAnalyzer', 'default': 1}, \ {'key': 'UnusedOpensAnalyzer', 'default': 1},
\ {'key': 'UnusedOpensAnalyzerExclusions', 'default': []},
\ {'key': 'UnusedDeclarationsAnalyzer', 'default': 1}, \ {'key': 'UnusedDeclarationsAnalyzer', 'default': 1},
\ {'key': 'UnusedDeclarationsAnalyzerExclusions', 'default': []},
\ {'key': 'SimplifyNameAnalyzer', 'default': 0}, \ {'key': 'SimplifyNameAnalyzer', 'default': 0},
\ {'key': 'SimplifyNameAnalyzerExclusions', 'default': []},
\ {'key': 'UnnecessaryParenthesesAnalyzer', 'default': 0},
\ {'key': 'ResolveNamespaces', 'default': 1}, \ {'key': 'ResolveNamespaces', 'default': 1},
\ {'key': 'EnableReferenceCodeLens', 'default': 1}, \ {'key': 'EnableReferenceCodeLens', 'default': 1},
\ {'key': 'EnableAnalyzers', 'default': 0}, \ {'key': 'EnableAnalyzers', 'default': 0},
\ {'key': 'AnalyzersPath'}, \ {'key': 'AnalyzersPath'},
\ {'key': 'ExcludeAnalyzers'},
\ {'key': 'IncludeAnalyzers'},
\ {'key': 'DisableInMemoryProjectReferences', 'default': 0}, \ {'key': 'DisableInMemoryProjectReferences', 'default': 0},
\ {'key': 'LineLens', 'default': {'enabled': 'never', 'prefix': ''}}, \ {'key': 'LineLens', 'default': {'enabled': 'never', 'prefix': ''}},
\ {'key': 'UseSdkScripts', 'default': 1}, \ {'key': 'UseSdkScripts', 'default': 1},
\ {'key': 'dotNetRoot'}, \ {'key': 'dotNetRoot'},
\ {'key': 'fsiExtraParameters', 'default': []}, \ {'key': 'fsiExtraParameters'},
\ {'key': 'fsiExtraInteractiveParameters', 'default': ['--readline-']},
\ {'key': 'fsiExtraSharedParameters', 'default': []},
\ {'key': 'fsiCompilerToolLocations', 'default': []},
\ {'key': 'TooltipMode', 'default': 'full'},
\ {'key': 'GenerateBinlog', 'default': 0},
\ {'key': 'AbstractClassStubGeneration', 'default': 1},
\ {'key': 'AbstractClassStubGenerationObjectIdentifier', 'default': 'this'},
\ {'key': 'AbstractClassStubGenerationMethodBody', 'default': 'failwith "Not Implemented"'},
"\ {'key': 'CodeLenses', TODO},
"\ {'key': 'PipelineHints', TODO}
"\ {'key': 'InlayHints', TODO}
"\ {'key': 'Fsac', TODO}
"\ {'key': 'Notifications', TODO}
"\ {'key': 'Debug', TODO}
\ ] \ ]
let s:config_keys = [] let s:config_keys = []
@@ -238,7 +262,7 @@ function! fsharp#loadConfig()
endif endif
if !exists('g:fsharp#fsautocomplete_command') if !exists('g:fsharp#fsautocomplete_command')
let g:fsharp#fsautocomplete_command = ['fsautocomplete', '--background-service-enabled'] let g:fsharp#fsautocomplete_command = ['fsautocomplete']
endif endif
if !exists('g:fsharp#use_recommended_server_config') if !exists('g:fsharp#use_recommended_server_config')
let g:fsharp#use_recommended_server_config = 1 let g:fsharp#use_recommended_server_config = 1
@@ -411,6 +435,10 @@ endfunction
let s:workspace = [] let s:workspace = []
function! fsharp#getLoadedProjects()
return copy(s:workspace)
endfunction
function! fsharp#handle_notifyWorkspace(payload) abort function! fsharp#handle_notifyWorkspace(payload) abort
let content = json_decode(a:payload.content) let content = json_decode(a:payload.content)
if content.Kind == 'projectLoading' if content.Kind == 'projectLoading'
@@ -532,7 +560,16 @@ endfunction
function! s:get_fsi_command() function! s:get_fsi_command()
let cmd = g:fsharp#fsi_command let cmd = g:fsharp#fsi_command
for prm in g:fsharp#fsi_extra_parameters if exists("g:fsharp#fsi_extra_parameters")
echom "[Ionide-vim]: `g:fsharp#fsi_extra_parameters` is being deprecated. Migrate to `g:fsharp#fsi_extra_interactive_parameters` and `g:fsharp_extra_shared_parameters`."
for prm in g:fsharp#fsi_extra_parameters
let cmd = cmd . " " . prm
endfor
endif
for prm in g:fsharp#fsi_extra_interactive_parameters
let cmd = cmd . " " . prm
endfor
for prm in g:fsharp#fsi_extra_shared_parameters
let cmd = cmd . " " . prm let cmd = cmd . " " . prm
endfor endfor
return cmd return cmd
@@ -584,7 +621,7 @@ function! fsharp#openFsi(returnFocus)
if a:returnFocus | call s:win_gotoid_safe(current_win) | endif if a:returnFocus | call s:win_gotoid_safe(current_win) | endif
return s:fsi_buffer return s:fsi_buffer
else else
echom "[FSAC] Your (neo)vim does not support terminal". echom "[FSAC] Your (neo)vim does not support terminal."
return 0 return 0
endif endif
endif endif

View File

@@ -141,32 +141,6 @@ function! go#config#ListAutoclose() abort
return get(g:, 'go_list_autoclose', 1) return get(g:, 'go_list_autoclose', 1)
endfunction endfunction
function! go#config#InfoMode() abort
return get(g:, 'go_info_mode', 'gopls')
endfunction
function! go#config#GuruScope() abort
let scope = get(g:, 'go_guru_scope', [])
if !empty(scope)
" strip trailing slashes for each path in scope. bug:
" https://github.com/golang/go/issues/14584
let scopes = go#util#StripTrailingSlash(scope)
endif
return scope
endfunction
function! go#config#SetGuruScope(scope) abort
if empty(a:scope)
if exists('g:go_guru_scope')
unlet g:go_guru_scope
endif
else
let g:go_guru_scope = a:scope
endif
endfunction
function! go#config#EchoCommandInfo() abort function! go#config#EchoCommandInfo() abort
return get(g:, 'go_echo_command_info', 1) return get(g:, 'go_echo_command_info', 1)
endfunction endfunction
@@ -204,6 +178,10 @@ function! go#config#Debug() abort
return get(g:, 'go_debug', []) return get(g:, 'go_debug', [])
endfunction endfunction
function! go#config#DebugLogDelay() abort
return get(g:, 'go_debug_log_delay', 10)
endfunction
function! go#config#DebugWindows() abort function! go#config#DebugWindows() abort
return get(g:, 'go_debug_windows', { return get(g:, 'go_debug_windows', {
\ 'vars': 'leftabove 30vnew', \ 'vars': 'leftabove 30vnew',

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'autoload/graphql.v
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to
@@ -25,6 +25,12 @@ endif
" Language: GraphQL " Language: GraphQL
" Maintainer: Jon Parise <jon@indelible.org> " Maintainer: Jon Parise <jon@indelible.org>
" Look up the named variable in buffer scope and then in global scope.
" Returns default if the named variable can't be found in either.
function! graphql#var(name, default) abort
return get(b:, a:name, get(g:, a:name, a:default))
endfunction
function! graphql#has_syntax_group(group) abort function! graphql#has_syntax_group(group) abort
try try
silent execute 'silent highlight ' . a:group silent execute 'silent highlight ' . a:group
@@ -35,5 +41,5 @@ function! graphql#has_syntax_group(group) abort
endfunction endfunction
function! graphql#javascript_tags() abort function! graphql#javascript_tags() abort
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL']) return graphql#var('graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
endfunction endfunction

View File

@@ -109,9 +109,11 @@ function! jsonnet#Format()
call setfperm(expand('%'), l:originalFPerm) call setfperm(expand('%'), l:originalFPerm)
endif endif
" the file has been changed outside of vim, enable reedit " the file has been changed outside of vim, enable reedit
mkview
silent edit! silent edit!
let &fileformat = l:originalFileFormat let &fileformat = l:originalFileFormat
let &syntax = &syntax let &syntax = &syntax
silent loadview
elseif g:jsonnet_fmt_fail_silently == 0 elseif g:jsonnet_fmt_fail_silently == 0
" FixMe: We could leverage the errors coming from the `jsonnetfmt` and " FixMe: We could leverage the errors coming from the `jsonnetfmt` and
" give immediate feedback to the user at every save time. " give immediate feedback to the user at every save time.
@@ -126,4 +128,63 @@ function! jsonnet#Format()
call winrestview(l:curw) call winrestview(l:curw)
endfunction endfunction
function! jsonnet#GetVisualSelection()
" Source: https://stackoverflow.com/a/6271254
" Why is this not a built-in Vim script function?!
let [line_start, column_start] = getpos("'<")[1:2]
let [line_end, column_end] = getpos("'>")[1:2]
let lines = getline(line_start, line_end)
if len(lines) == 0
return ''
endif
let lines[-1] = lines[-1][: column_end - (&selection == 'inclusive' ? 1 : 2)]
let lines[0] = lines[0][column_start - 1:]
return join(lines, "\n")
endfun
" Format calls `jsonnetfmt ... ` on a Visual selection
function! jsonnet#FormatVisual()
" Get current visual selection
let l:selection = jsonnet#GetVisualSelection()
" Get the command first so we can test it
let l:binName = g:jsonnet_fmt_command
" Check if the user has installed command binary.
let l:binPath = jsonnet#CheckBinPath(l:binName)
if empty(l:binPath)
return
endif
" Populate the final command.
let l:command = l:binPath
let l:command = l:command . ' -e '
let l:command = l:command . g:jsonnet_fmt_options
" Execute the compiled jsonnetfmt command and save the return value
let l:out = jsonnet#System(l:command . " \"" . l:selection . "\"")
let l:errorCode = v:shell_error
" Save register contents
let reg = '"'
let save_cb = &cb
let regInfo = getreginfo(reg)
try
" Set register to formatted output
call setreg(reg,l:out)
" Paste formatted output
silent exe 'norm! gv'.(reg == '"' ? '' : '"' . reg).'p`['
finally
" Restore register contents
let &cb = save_cb
call setreg(reg, regInfo)
endtry
endfunction
" Evaluate jsonnet into vsplit
function! jsonnet#Eval()
let output = system(g:jsonnet_command . ' ' . shellescape(expand('%')))
vnew
setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile ft=jsonnet
put! = output
endfunction

View File

@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'julia', 'autoload/julia_latex
endif endif
" This file is autogenerated from the script 'generate_latex_symbols_table.jl' " This file is autogenerated from the script 'generate_latex_symbols_table.jl'
" The symbols are based on Julia version 1.9.0-DEV.16 " The symbols are based on Julia version 1.12.0-DEV.387
scriptencoding utf-8 scriptencoding utf-8
@@ -17,6 +17,7 @@ function! julia_latex_symbols#get_dict()
\ '\copyright': '©', \ '\copyright': '©',
\ '\:copyright:': '©', \ '\:copyright:': '©',
\ '\ordfeminine': 'ª', \ '\ordfeminine': 'ª',
\ '\guillemotleft': '«',
\ '\neg': '¬', \ '\neg': '¬',
\ '\circledR': '®', \ '\circledR': '®',
\ '\:registered:': '®', \ '\:registered:': '®',
@@ -29,6 +30,7 @@ function! julia_latex_symbols#get_dict()
\ '\cdotp': '·', \ '\cdotp': '·',
\ '\^1': '¹', \ '\^1': '¹',
\ '\ordmasculine': 'º', \ '\ordmasculine': 'º',
\ '\guillemotright': '»',
\ '\1/4': '¼', \ '\1/4': '¼',
\ '\1/2': '½', \ '\1/2': '½',
\ '\3/4': '¾', \ '\3/4': '¾',
@@ -160,10 +162,10 @@ function! julia_latex_symbols#get_dict()
\ '\Iota': 'Ι', \ '\Iota': 'Ι',
\ '\Kappa': 'Κ', \ '\Kappa': 'Κ',
\ '\Lambda': 'Λ', \ '\Lambda': 'Λ',
\ '\upMu': 'Μ', \ '\Mu': 'Μ',
\ '\upNu': 'Ν', \ '\Nu': 'Ν',
\ '\Xi': 'Ξ', \ '\Xi': 'Ξ',
\ '\upOmicron': 'Ο', \ '\Omicron': 'Ο',
\ '\Pi': 'Π', \ '\Pi': 'Π',
\ '\Rho': 'Ρ', \ '\Rho': 'Ρ',
\ '\Sigma': 'Σ', \ '\Sigma': 'Σ',
@@ -177,7 +179,6 @@ function! julia_latex_symbols#get_dict()
\ '\beta': 'β', \ '\beta': 'β',
\ '\gamma': 'γ', \ '\gamma': 'γ',
\ '\delta': 'δ', \ '\delta': 'δ',
\ '\upepsilon': 'ε',
\ '\varepsilon': 'ε', \ '\varepsilon': 'ε',
\ '\zeta': 'ζ', \ '\zeta': 'ζ',
\ '\eta': 'η', \ '\eta': 'η',
@@ -188,7 +189,7 @@ function! julia_latex_symbols#get_dict()
\ '\mu': 'μ', \ '\mu': 'μ',
\ '\nu': 'ν', \ '\nu': 'ν',
\ '\xi': 'ξ', \ '\xi': 'ξ',
\ '\upomicron': 'ο', \ '\omicron': 'ο',
\ '\pi': 'π', \ '\pi': 'π',
\ '\rho': 'ρ', \ '\rho': 'ρ',
\ '\varsigma': 'ς', \ '\varsigma': 'ς',
@@ -199,20 +200,20 @@ function! julia_latex_symbols#get_dict()
\ '\chi': 'χ', \ '\chi': 'χ',
\ '\psi': 'ψ', \ '\psi': 'ψ',
\ '\omega': 'ω', \ '\omega': 'ω',
\ '\upvarbeta': 'ϐ', \ '\varbeta': 'ϐ',
\ '\vartheta': 'ϑ', \ '\vartheta': 'ϑ',
\ '\phi': 'ϕ', \ '\phi': 'ϕ',
\ '\varpi': 'ϖ', \ '\varpi': 'ϖ',
\ '\upoldKoppa': 'Ϙ', \ '\oldKoppa': 'Ϙ',
\ '\upoldkoppa': 'ϙ', \ '\oldkoppa': 'ϙ',
\ '\Stigma': 'Ϛ', \ '\Stigma': 'Ϛ',
\ '\upstigma': 'ϛ', \ '\stigma': 'ϛ',
\ '\Digamma': 'Ϝ', \ '\Digamma': 'Ϝ',
\ '\digamma': 'ϝ', \ '\digamma': 'ϝ',
\ '\Koppa': 'Ϟ', \ '\Koppa': 'Ϟ',
\ '\upkoppa': 'ϟ', \ '\koppa': 'ϟ',
\ '\Sampi': 'Ϡ', \ '\Sampi': 'Ϡ',
\ '\upsampi': 'ϡ', \ '\sampi': 'ϡ',
\ '\varkappa': 'ϰ', \ '\varkappa': 'ϰ',
\ '\varrho': 'ϱ', \ '\varrho': 'ϱ',
\ '\varTheta': 'ϴ', \ '\varTheta': 'ϴ',
@@ -659,6 +660,7 @@ function! julia_latex_symbols#get_dict()
\ '\measeq': '≞', \ '\measeq': '≞',
\ '\questeq': '≟', \ '\questeq': '≟',
\ '\ne': '≠', \ '\ne': '≠',
\ '\neq': '≠',
\ '\equiv': '≡', \ '\equiv': '≡',
\ '\nequiv': '≢', \ '\nequiv': '≢',
\ '\Equiv': '≣', \ '\Equiv': '≣',
@@ -804,7 +806,7 @@ function! julia_latex_symbols#get_dict()
\ '\nsqsubseteq': '⋢', \ '\nsqsubseteq': '⋢',
\ '\nsqsupseteq': '⋣', \ '\nsqsupseteq': '⋣',
\ '\sqsubsetneq': '⋤', \ '\sqsubsetneq': '⋤',
\ '\sqspne': '⋥', \ '\sqsupsetneq': '⋥',
\ '\lnsim': '⋦', \ '\lnsim': '⋦',
\ '\gnsim': '⋧', \ '\gnsim': '⋧',
\ '\precnsim': '⋨', \ '\precnsim': '⋨',
@@ -1151,6 +1153,7 @@ function! julia_latex_symbols#get_dict()
\ '\threedangle': '⟀', \ '\threedangle': '⟀',
\ '\whiteinwhitetriangle': '⟁', \ '\whiteinwhitetriangle': '⟁',
\ '\perp': '⟂', \ '\perp': '⟂',
\ '\veedot': '⟇',
\ '\bsolhsub': '⟈', \ '\bsolhsub': '⟈',
\ '\suphsol': '⟉', \ '\suphsol': '⟉',
\ '\wedgedot': '⟑', \ '\wedgedot': '⟑',
@@ -1273,6 +1276,8 @@ function! julia_latex_symbols#get_dict()
\ '\UpEquilibrium': '⥮', \ '\UpEquilibrium': '⥮',
\ '\ReverseUpEquilibrium': '⥯', \ '\ReverseUpEquilibrium': '⥯',
\ '\RoundImplies': '⥰', \ '\RoundImplies': '⥰',
\ '\leftarrowless': '⥷',
\ '\leftarrowsubset': '⥺',
\ '\Vvert': '⦀', \ '\Vvert': '⦀',
\ '\Elroang': '⦆', \ '\Elroang': '⦆',
\ '\ddfnc': '⦙', \ '\ddfnc': '⦙',
@@ -3386,6 +3391,10 @@ function! julia_latex_symbols#get_dict()
\ '\:hindu_temple:': '🛕', \ '\:hindu_temple:': '🛕',
\ '\:hut:': '🛖', \ '\:hut:': '🛖',
\ '\:elevator:': '🛗', \ '\:elevator:': '🛗',
\ '\:wireless:': '🛜',
\ '\:playground_slide:': '🛝',
\ '\:wheel:': '🛞',
\ '\:ring_buoy:': '🛟',
\ '\:airplane_departure:': '🛫', \ '\:airplane_departure:': '🛫',
\ '\:airplane_arriving:': '🛬', \ '\:airplane_arriving:': '🛬',
\ '\:scooter:': '🛴', \ '\:scooter:': '🛴',
@@ -3409,6 +3418,7 @@ function! julia_latex_symbols#get_dict()
\ '\:large_green_square:': '🟩', \ '\:large_green_square:': '🟩',
\ '\:large_purple_square:': '🟪', \ '\:large_purple_square:': '🟪',
\ '\:large_brown_square:': '🟫', \ '\:large_brown_square:': '🟫',
\ '\:heavy_equals_sign:': '🟰',
\ '\:pinched_fingers:': '🤌', \ '\:pinched_fingers:': '🤌',
\ '\:white_heart:': '🤍', \ '\:white_heart:': '🤍',
\ '\:brown_heart:': '🤎', \ '\:brown_heart:': '🤎',
@@ -3516,6 +3526,7 @@ function! julia_latex_symbols#get_dict()
\ '\:cold_face:': '🥶', \ '\:cold_face:': '🥶',
\ '\:ninja:': '🥷', \ '\:ninja:': '🥷',
\ '\:disguised_face:': '🥸', \ '\:disguised_face:': '🥸',
\ '\:face_holding_back_tears:': '🥹',
\ '\:pleading_face:': '🥺', \ '\:pleading_face:': '🥺',
\ '\:sari:': '🥻', \ '\:sari:': '🥻',
\ '\:lab_coat:': '🥼', \ '\:lab_coat:': '🥼',
@@ -3594,6 +3605,7 @@ function! julia_latex_symbols#get_dict()
\ '\:mate_drink:': '🧉', \ '\:mate_drink:': '🧉',
\ '\:ice_cube:': '🧊', \ '\:ice_cube:': '🧊',
\ '\:bubble_tea:': '🧋', \ '\:bubble_tea:': '🧋',
\ '\:troll:': '🧌',
\ '\:standing_person:': '🧍', \ '\:standing_person:': '🧍',
\ '\:kneeling_person:': '🧎', \ '\:kneeling_person:': '🧎',
\ '\:deaf_person:': '🧏', \ '\:deaf_person:': '🧏',
@@ -3650,9 +3662,14 @@ function! julia_latex_symbols#get_dict()
\ '\:briefs:': '🩲', \ '\:briefs:': '🩲',
\ '\:shorts:': '🩳', \ '\:shorts:': '🩳',
\ '\:thong_sandal:': '🩴', \ '\:thong_sandal:': '🩴',
\ '\:light_blue_heart:': '🩵',
\ '\:grey_heart:': '🩶',
\ '\:pink_heart:': '🩷',
\ '\:drop_of_blood:': '🩸', \ '\:drop_of_blood:': '🩸',
\ '\:adhesive_bandage:': '🩹', \ '\:adhesive_bandage:': '🩹',
\ '\:stethoscope:': '🩺', \ '\:stethoscope:': '🩺',
\ '\:x-ray:': '🩻',
\ '\:crutch:': '🩼',
\ '\:yo-yo:': '🪀', \ '\:yo-yo:': '🪀',
\ '\:kite:': '🪁', \ '\:kite:': '🪁',
\ '\:parachute:': '🪂', \ '\:parachute:': '🪂',
@@ -3660,6 +3677,8 @@ function! julia_latex_symbols#get_dict()
\ '\:magic_wand:': '🪄', \ '\:magic_wand:': '🪄',
\ '\:pinata:': '🪅', \ '\:pinata:': '🪅',
\ '\:nesting_dolls:': '🪆', \ '\:nesting_dolls:': '🪆',
\ '\:maracas:': '🪇',
\ '\:flute:': '🪈',
\ '\:ringed_planet:': '🪐', \ '\:ringed_planet:': '🪐',
\ '\:chair:': '🪑', \ '\:chair:': '🪑',
\ '\:razor:': '🪒', \ '\:razor:': '🪒',
@@ -3685,6 +3704,13 @@ function! julia_latex_symbols#get_dict()
\ '\:headstone:': '🪦', \ '\:headstone:': '🪦',
\ '\:placard:': '🪧', \ '\:placard:': '🪧',
\ '\:rock:': '🪨', \ '\:rock:': '🪨',
\ '\:mirror_ball:': '🪩',
\ '\:identification_card:': '🪪',
\ '\:low_battery:': '🪫',
\ '\:hamsa:': '🪬',
\ '\:folding_hand_fan:': '🪭',
\ '\:hair_pick:': '🪮',
\ '\:khanda:': '🪯',
\ '\:fly:': '🪰', \ '\:fly:': '🪰',
\ '\:worm:': '🪱', \ '\:worm:': '🪱',
\ '\:beetle:': '🪲', \ '\:beetle:': '🪲',
@@ -3692,14 +3718,50 @@ function! julia_latex_symbols#get_dict()
\ '\:potted_plant:': '🪴', \ '\:potted_plant:': '🪴',
\ '\:wood:': '🪵', \ '\:wood:': '🪵',
\ '\:feather:': '🪶', \ '\:feather:': '🪶',
\ '\:lotus:': '🪷',
\ '\:coral:': '🪸',
\ '\:empty_nest:': '🪹',
\ '\:nest_with_eggs:': '🪺',
\ '\:hyacinth:': '🪻',
\ '\:jellyfish:': '🪼',
\ '\:wing:': '🪽',
\ '\:goose:': '🪿',
\ '\:anatomical_heart:': '🫀', \ '\:anatomical_heart:': '🫀',
\ '\:lungs:': '🫁', \ '\:lungs:': '🫁',
\ '\:people_hugging:': '🫂', \ '\:people_hugging:': '🫂',
\ '\:pregnant_man:': '🫃',
\ '\:pregnant_person:': '🫄',
\ '\:person_with_crown:': '🫅',
\ '\:moose:': '🫎',
\ '\:donkey:': '🫏',
\ '\:blueberries:': '🫐', \ '\:blueberries:': '🫐',
\ '\:bell_pepper:': '🫑', \ '\:bell_pepper:': '🫑',
\ '\:olive:': '🫒', \ '\:olive:': '🫒',
\ '\:flatbread:': '🫓', \ '\:flatbread:': '🫓',
\ '\:tamale:': '🫔', \ '\:tamale:': '🫔',
\ '\:fondue:': '🫕', \ '\:fondue:': '🫕',
\ '\:teapot:': '🫖'} \ '\:teapot:': '🫖',
\ '\:pouring_liquid:': '🫗',
\ '\:beans:': '🫘',
\ '\:jar:': '🫙',
\ '\:ginger_root:': '🫚',
\ '\:pea_pod:': '🫛',
\ '\:melting_face:': '🫠',
\ '\:saluting_face:': '🫡',
\ '\:face_with_open_eyes_and_hand_over_mouth:': '🫢',
\ '\:face_with_peeking_eye:': '🫣',
\ '\:face_with_diagonal_mouth:': '🫤',
\ '\:dotted_line_face:': '🫥',
\ '\:biting_lip:': '🫦',
\ '\:bubbles:': '🫧',
\ '\:shaking_face:': '🫨',
\ '\:hand_with_index_finger_and_thumb_crossed:': '🫰',
\ '\:rightwards_hand:': '🫱',
\ '\:leftwards_hand:': '🫲',
\ '\:palm_down_hand:': '🫳',
\ '\:palm_up_hand:': '🫴',
\ '\:index_pointing_at_the_viewer:': '🫵',
\ '\:heart_hands:': '🫶',
\ '\:leftwards_pushing_hand:': '🫷',
\ '\:rightwards_pushing_hand:': '🫸'}
endfunction endfunction

View File

@@ -3,6 +3,11 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'ledger', 'autoload/ledger.vim
endif endif
scriptencoding utf-8 scriptencoding utf-8
if !exists ('b:is_hledger')
let b:is_hledger = g:ledger_is_hledger
endif
" vim:ts=2:sw=2:sts=2:foldmethod=marker " vim:ts=2:sw=2:sts=2:foldmethod=marker
function! ledger#transaction_state_toggle(lnum, ...) abort function! ledger#transaction_state_toggle(lnum, ...) abort
if a:0 == 1 if a:0 == 1
@@ -509,7 +514,10 @@ function! ledger#align_commodity() abort
endif endif
if pos < 0 if pos < 0
" Find the position after the first digits " Find the position after the first digits
let pos = matchend(rhs, '\m\d[^[:space:]]*') let pos = matchend(rhs, '\m\d[^[:space:]]*') - 1
if pos >= 0
let pos = strchars(rhs[:pos])
endif
endif endif
" Go to the column that allows us to align the decimal separator at g:ledger_align_at: " Go to the column that allows us to align the decimal separator at g:ledger_align_at:
if pos >= 0 if pos >= 0
@@ -643,7 +651,7 @@ endf
" Build a ledger command to process the given file. " Build a ledger command to process the given file.
function! s:ledger_cmd(file, args) abort function! s:ledger_cmd(file, args) abort
let l:options = g:ledger_extra_options let l:options = g:ledger_extra_options
if len(g:ledger_date_format) > 0 && !g:ledger_is_hledger if len(g:ledger_date_format) > 0 && !b:is_hledger
let l:options = join([l:options, '--date-format', g:ledger_date_format, let l:options = join([l:options, '--date-format', g:ledger_date_format,
\ '--input-date-format', g:ledger_date_format]) \ '--input-date-format', g:ledger_date_format])
endif endif
@@ -670,7 +678,7 @@ endf
" Use current line as input to ledger entry and replace with output. If there " Use current line as input to ledger entry and replace with output. If there
" are errors, they are echoed instead. " are errors, they are echoed instead.
function! ledger#entry() abort function! ledger#entry() abort
let l:output = systemlist(s:ledger_cmd(g:ledger_main, join(['entry', getline('.')]))) let l:output = split(system(s:ledger_cmd(g:ledger_main, join(['entry', getline('.')]))), '\n')
" Filter out warnings " Filter out warnings
let l:output = filter(l:output, "v:val !~? '^Warning: '") let l:output = filter(l:output, "v:val !~? '^Warning: '")
" Errors may occur " Errors may occur
@@ -694,7 +702,7 @@ endfunc
" Returns: " Returns:
" Ledger's output as a String. " Ledger's output as a String.
function! ledger#report(file, args) abort function! ledger#report(file, args) abort
let l:output = systemlist(s:ledger_cmd(a:file, a:args)) let l:output = split(system(s:ledger_cmd(a:file, a:args)), '\n')
if v:shell_error " If there are errors, show them in a quickfix/location list. if v:shell_error " If there are errors, show them in a quickfix/location list.
call s:quickfix_populate(l:output) call s:quickfix_populate(l:output)
call s:quickfix_toggle('Errors', 'Unable to parse errors') call s:quickfix_toggle('Errors', 'Unable to parse errors')
@@ -741,7 +749,7 @@ function! ledger#register(file, args) abort
\ "--prepend-format='%(filename):%(beg_line) '", \ "--prepend-format='%(filename):%(beg_line) '",
\ a:args \ a:args
\ ])) \ ]))
call s:quickfix_populate(systemlist(l:cmd)) call s:quickfix_populate(split(system(l:cmd), '\n'))
call s:quickfix_toggle('Register report') call s:quickfix_toggle('Register report')
endf endf
@@ -760,7 +768,7 @@ function! ledger#reconcile(file, account, target_amount) abort
\ shellescape(a:account) \ shellescape(a:account)
\ ])) \ ]))
let l:file = expand(a:file) " Needed for #show_balance() later let l:file = expand(a:file) " Needed for #show_balance() later
call s:quickfix_populate(systemlist(l:cmd)) call s:quickfix_populate(split(system(l:cmd), '\n'))
if s:quickfix_toggle('Reconcile ' . a:account, 'Nothing to reconcile') if s:quickfix_toggle('Reconcile ' . a:account, 'Nothing to reconcile')
let g:ledger_target_amount = a:target_amount let g:ledger_target_amount = a:target_amount
" Show updated account balance upon saving, as long as the quickfix window is open " Show updated account balance upon saving, as long as the quickfix window is open
@@ -804,7 +812,7 @@ function! ledger#show_balance(file, ...) abort
\ "--format='%(scrub(get_at(display_total, 0)))|%(scrub(get_at(display_total, 1)))|%(quantity(scrub(get_at(display_total, 1))))'", \ "--format='%(scrub(get_at(display_total, 0)))|%(scrub(get_at(display_total, 1)))|%(quantity(scrub(get_at(display_total, 1))))'",
\ (empty(g:ledger_default_commodity) ? '' : '-X ' . shellescape(g:ledger_default_commodity)) \ (empty(g:ledger_default_commodity) ? '' : '-X ' . shellescape(g:ledger_default_commodity))
\ ])) \ ]))
let l:output = systemlist(l:cmd) let l:output = split(system(l:cmd), '\n')
" Errors may occur, for example, when the account has multiple commodities " Errors may occur, for example, when the account has multiple commodities
" and g:ledger_default_commodity is empty. " and g:ledger_default_commodity is empty.
if v:shell_error if v:shell_error

View File

@@ -0,0 +1,18 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'pony', 'autoload/neomake/makers/ft/pony.vim')
finish
endif
function! neomake#makers#ft#pony#EnabledMakers()
return ['ponyc']
endfunction
function! neomake#makers#ft#pony#ponyc()
" This is currently a hack. Ponyc itself uses the project directory as
" the target to build. Using %:p:h like this fetches the parent
" directory of the current file which might cause supurious errors on
" package imports if the current file is nested under a sub-directory.
return {
\ 'args': ['--pass=expr', '%:p:h'],
\ 'errorformat': '%f:%l:%c: %m'
\ }
endfunction

27
autoload/nix.vim Normal file
View File

@@ -0,0 +1,27 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'nix', 'autoload/nix.vim')
finish
endif
function! nix#find_drv_position()
let line = search("description")
if line == 0
let line = search("name")
endif
if line == 0
echo "error: could not find derivation"
return
endif
return expand("%") . ":" . line
endfunction
function! nix#edit(attr)
let output = system("nix-instantiate --eval ./. -A " . a:attr . ".meta.position")
if match(output, "^error:") == -1
let position = split(split(output, '"')[0], ":")
execute "edit " . position[0]
execute position[1]
" Update default command to nix-build.
let b:dispatch = 'nix-build --no-out-link -A ' . a:attr
endif
endfunction

View File

@@ -1771,11 +1771,11 @@ endif
if !has_key(g:polyglot_is_disabled, 'prolog') if !has_key(g:polyglot_is_disabled, 'prolog')
au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
au BufNewFile,BufRead *.pdb,*.pro,*.prolog,*.yap setf prolog au BufNewFile,BufRead *.pdb,*.plt,*.pro,*.prolog,*.yap setf prolog
endif endif
if !has_key(g:polyglot_is_disabled, 'bzl') if !has_key(g:polyglot_is_disabled, 'bzl')
au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,*.star,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE setf bzl au BufNewFile,BufRead *.BUILD,*.bazel,*.bzl,*.star,BUCK,BUILD,BUILD.bazel,MODULE.bazel,Tiltfile,WORKSPACE,WORKSPACE.bazel setf bzl
endif endif
if !has_key(g:polyglot_is_disabled, 'odin') if !has_key(g:polyglot_is_disabled, 'odin')
@@ -1783,7 +1783,7 @@ if !has_key(g:polyglot_is_disabled, 'odin')
endif endif
if !has_key(g:polyglot_is_disabled, 'dosini') if !has_key(g:polyglot_is_disabled, 'dosini')
au BufNewFile,BufRead *.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*.url,*/etc/pacman.conf,*/etc/yum.conf,{.,}coveragerc,{.,}editorconfig,{.,}flake8,{.,}npmrc,{.,}pylintrc,buildozer.spec,pylintrc setf dosini au BufNewFile,BufRead *.cnf,*.dof,*.ini,*.lektorproject,*.prefs,*.pro,*.properties,*.url,*/etc/pacman.conf,*/etc/yum.conf,{.,}coveragerc,{.,}editorconfig,{.,}flake8,{.,}npmrc,{.,}pylintrc,HOSTS,buildozer.spec,hosts,pylintrc,vlcrc setf dosini
au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini') au BufNewFile,BufRead php.ini-* call s:StarSetf('dosini')
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini') au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
endif endif
@@ -1794,7 +1794,7 @@ endif
if !has_key(g:polyglot_is_disabled, 'visual-basic') if !has_key(g:polyglot_is_disabled, 'visual-basic')
au! BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas() au! BufNewFile,BufRead,BufWritePost *.bas call polyglot#detect#Bas()
au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.frx,*.sba,*.vba,*.vbs setf vb au BufNewFile,BufRead *.cls,*.ctl,*.dsm,*.frm,*.sba,*.vba,*.vbs setf vb
endif endif
if !has_key(g:polyglot_is_disabled, 'basic') if !has_key(g:polyglot_is_disabled, 'basic')
@@ -1807,7 +1807,7 @@ endif
if !has_key(g:polyglot_is_disabled, 'zig') if !has_key(g:polyglot_is_disabled, 'zig')
au BufNewFile,BufRead *.zir setf zir au BufNewFile,BufRead *.zir setf zir
au BufNewFile,BufRead *.zig,*.zir setf zig au BufNewFile,BufRead *.zig,*.zig.zon,*.zir setf zig
endif endif
if !has_key(g:polyglot_is_disabled, 'zephir') if !has_key(g:polyglot_is_disabled, 'zephir')
@@ -1891,7 +1891,7 @@ if !has_key(g:polyglot_is_disabled, 'tptp')
endif endif
if !has_key(g:polyglot_is_disabled, 'toml') if !has_key(g:polyglot_is_disabled, 'toml')
au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock setf toml au BufNewFile,BufRead *.toml,*/.cargo/config,*/.cargo/credentials,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,pdm.lock,poetry.lock setf toml
endif endif
if !has_key(g:polyglot_is_disabled, 'tmux') if !has_key(g:polyglot_is_disabled, 'tmux')
@@ -1957,7 +1957,7 @@ if !has_key(g:polyglot_is_disabled, 'slim')
endif endif
if !has_key(g:polyglot_is_disabled, 'sh') if !has_key(g:polyglot_is_disabled, 'sh')
au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*.zsh-theme,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}env,{.,}env.example,{.,}flaskenv,{.,}kshrc,{.,}login,{.,}profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile setf sh au BufNewFile,BufRead *.bash,*.bats,*.cgi,*.command,*.fcgi,*.ksh,*.sh,*.sh.in,*.tmux,*.tool,*.trigger,*.zsh-theme,*/etc/udev/cdsymlinks.conf,{.,}bash_aliases,{.,}bash_functions,{.,}bash_history,{.,}bash_logout,{.,}bash_profile,{.,}bashrc,{.,}cshrc,{.,}envrc,{.,}flaskenv,{.,}kshrc,{.,}login,{.,}profile,{.,}tmux.conf,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile,tmux.conf setf sh
au BufNewFile,BufRead *.zsh,*/etc/zprofile,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh au BufNewFile,BufRead *.zsh,*/etc/zprofile,{.,}zfbfmarks,{.,}zlogin,{.,}zlogout,{.,}zprofile,{.,}zshenv,{.,}zshrc setf zsh
au BufNewFile,BufRead .zsh* call s:StarSetf('zsh') au BufNewFile,BufRead .zsh* call s:StarSetf('zsh')
au BufNewFile,BufRead .zlog* call s:StarSetf('zsh') au BufNewFile,BufRead .zlog* call s:StarSetf('zsh')
@@ -2033,7 +2033,7 @@ if !has_key(g:polyglot_is_disabled, 'requirements')
endif endif
if !has_key(g:polyglot_is_disabled, 'python') if !has_key(g:polyglot_is_disabled, 'python')
au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,Snakefile,wscript setf python au BufNewFile,BufRead *.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.ptl,*.py,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.spec,*.tac,*.wsgi,*.xpy,{.,}gclient,{.,}pythonrc,{.,}pythonstartup,DEPS,SConscript,SConstruct,wscript setf python
endif endif
if !has_key(g:polyglot_is_disabled, 'purescript') if !has_key(g:polyglot_is_disabled, 'purescript')
@@ -2053,6 +2053,10 @@ if !has_key(g:polyglot_is_disabled, 'protobuf')
au BufNewFile,BufRead *.proto setf proto au BufNewFile,BufRead *.proto setf proto
endif endif
if !has_key(g:polyglot_is_disabled, 'prisma')
au BufNewFile,BufRead *.prisma setf prisma
endif
if !has_key(g:polyglot_is_disabled, 'powershell') if !has_key(g:polyglot_is_disabled, 'powershell')
au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1 au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
au BufNewFile,BufRead *.ps1xml setf ps1xml au BufNewFile,BufRead *.ps1xml setf ps1xml
@@ -2216,7 +2220,7 @@ if !has_key(g:polyglot_is_disabled, 'perl')
au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T() au! BufNewFile,BufRead,BufWritePost *.t call polyglot#detect#T()
au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm() au! BufNewFile,BufRead,BufWritePost *.pm call polyglot#detect#Pm()
au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl() au! BufNewFile,BufRead,BufWritePost *.pl call polyglot#detect#Pl()
au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc setf perl au BufNewFile,BufRead *.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.psgi,{.,}gitolite.rc,{.,}latexmkrc,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,latexmkrc setf perl
au BufNewFile,BufRead *.pod setf pod au BufNewFile,BufRead *.pod setf pod
au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason au BufNewFile,BufRead *.comp,*.mason,*.mhtml setf mason
au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2() au! BufNewFile,BufRead,BufWritePost *.tt2 call polyglot#detect#Tt2()
@@ -2233,7 +2237,7 @@ if !has_key(g:polyglot_is_disabled, 'jsonnet')
endif endif
if !has_key(g:polyglot_is_disabled, 'json') if !has_key(g:polyglot_is_disabled, 'json')
au BufNewFile,BufRead *.4DForm,*.4DProject,*.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}arcconfig,{.,}auto-changelog,{.,}c8rc,{.,}htmlhintrc,{.,}imgbotconfig,{.,}nycrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,Pipfile.lock,composer.lock,mcmod.info setf json au BufNewFile,BufRead *.4DForm,*.4DProject,*.JSON-tmLanguage,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.json,*.jsonl,*.jsonp,*.mcmeta,*.sarif,*.template,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,{.,}all-contributorsrc,{.,}arcconfig,{.,}auto-changelog,{.,}c8rc,{.,}htmlhintrc,{.,}imgbotconfig,{.,}nycrc,{.,}tern-config,{.,}tern-project,{.,}watchmanconfig,MODULE.bazel.lock,Pipfile.lock,composer.lock,deno.lock,flake.lock,mcmod.info setf json
endif endif
if !has_key(g:polyglot_is_disabled, 'json5') if !has_key(g:polyglot_is_disabled, 'json5')
@@ -2347,7 +2351,7 @@ endif
if !has_key(g:polyglot_is_disabled, 'glsl') if !has_key(g:polyglot_is_disabled, 'glsl')
au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs() au! BufNewFile,BufRead,BufWritePost *.fs call polyglot#detect#Fs()
au! BufNewFile,BufRead,BufWritePost *.frag call polyglot#detect#Frag() au! BufNewFile,BufRead,BufWritePost *.frag call polyglot#detect#Frag()
au BufNewFile,BufRead *.comp,*.fp,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader setf glsl au BufNewFile,BufRead *.comp,*.fp,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vs,*.vsh,*.vshader setf glsl
endif endif
if !has_key(g:polyglot_is_disabled, 'git') if !has_key(g:polyglot_is_disabled, 'git')
@@ -2538,7 +2542,7 @@ endif
if !has_key(g:polyglot_is_disabled, 'c/c++') if !has_key(g:polyglot_is_disabled, 'c/c++')
au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H() au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.moc,*.tcc,*.tlh,*.tpp setf cpp au BufNewFile,BufRead *.c++,*.cc,*.cp,*.cpp,*.cppm,*.cxx,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.moc,*.tcc,*.tlh,*.tpp,*.txx setf cpp
au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H() au! BufNewFile,BufRead,BufWritePost *.h call polyglot#detect#H()
au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c au BufNewFile,BufRead *.c,*.cats,*.idc,*.qc,*enlightenment/*.cfg setf c
endif endif
@@ -2579,7 +2583,7 @@ if !has_key(g:polyglot_is_disabled, 'ant')
endif endif
if !has_key(g:polyglot_is_disabled, 'xml') if !has_key(g:polyglot_is_disabled, 'xml')
au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mojo,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.sw,*.targets,*.tml,*.tpm,*.typ,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config setf xml
endif endif
if !has_key(g:polyglot_is_disabled, 'csv') if !has_key(g:polyglot_is_disabled, 'csv')

View File

@@ -499,6 +499,9 @@ let s:interpreters = {
\ 'python': 'python', \ 'python': 'python',
\ 'python2': 'python', \ 'python2': 'python',
\ 'python3': 'python', \ 'python3': 'python',
\ 'py': 'python',
\ 'pypy': 'python',
\ 'pypy3': 'python',
\ 'qmake': 'qmake', \ 'qmake': 'qmake',
\ 'Rscript': 'r', \ 'Rscript': 'r',
\ 'racket': 'racket', \ 'racket': 'racket',
@@ -510,6 +513,7 @@ let s:interpreters = {
\ 'rake': 'ruby', \ 'rake': 'ruby',
\ 'jruby': 'ruby', \ 'jruby': 'ruby',
\ 'rbx': 'ruby', \ 'rbx': 'ruby',
\ 'rust-script': 'rust',
\ 'scala': 'scala', \ 'scala': 'scala',
\ 'ash': 'sh', \ 'ash': 'sh',
\ 'bash': 'sh', \ 'bash': 'sh',
@@ -531,6 +535,7 @@ let s:interpreters = {
\ 'z3': 'smt2', \ 'z3': 'smt2',
\ 'deno': 'typescript', \ 'deno': 'typescript',
\ 'ts-node': 'typescript', \ 'ts-node': 'typescript',
\ 'tsx': 'typescript',
\ 'zsh': 'zsh', \ 'zsh': 'zsh',
\ } \ }
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE " DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE

View File

@@ -55,7 +55,7 @@ let s:globs = {
\ 'brewfile': 'Brewfile', \ 'brewfile': 'Brewfile',
\ 'bsdl': '*.bsdl,*bsd', \ 'bsdl': '*.bsdl,*bsd',
\ 'bst': '*.bst', \ 'bst': '*.bst',
\ 'bzl': '*.bzl,*.star,*.bazel,*.BUILD,BUCK,BUILD,BUILD.bazel,Tiltfile,WORKSPACE', \ 'bzl': '*.bzl,*.star,*.bazel,*.BUILD,BUCK,BUILD,BUILD.bazel,MODULE.bazel,Tiltfile,WORKSPACE,WORKSPACE.bazel',
\ 'bzr': 'bzr_log.*', \ 'bzr': 'bzr_log.*',
\ 'c': '*.c,*.cats,*.h,*.idc,*.qc', \ 'c': '*.c,*.cats,*.h,*.idc,*.qc',
\ 'cabal': '*.cabal', \ 'cabal': '*.cabal',
@@ -86,7 +86,7 @@ let s:globs = {
\ 'conf': '*.conf,auto.master,config', \ 'conf': '*.conf,auto.master,config',
\ 'config': 'configure.in,configure.ac,Pipfile', \ 'config': 'configure.in,configure.ac,Pipfile',
\ 'context': '*.mkii,*.mkiv,*.mkvi', \ 'context': '*.mkii,*.mkiv,*.mkvi',
\ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.tcc,*.tpp,*.moc,*.tlh', \ 'cpp': '*.cpp,*.c++,*.cc,*.cp,*.cppm,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.ixx,*.tcc,*.tpp,*.txx,*.moc,*.tlh',
\ 'cql': '*.cql', \ 'cql': '*.cql',
\ 'crm': '*.crm', \ 'crm': '*.crm',
\ 'crontab': 'crontab,crontab.*', \ 'crontab': 'crontab,crontab.*',
@@ -130,7 +130,7 @@ let s:globs = {
\ 'dnsmasq': '', \ 'dnsmasq': '',
\ 'dockerfile': '*.Dockerfile,*.dock,Containerfile,Dockerfile,dockerfile,Dockerfile*', \ 'dockerfile': '*.Dockerfile,*.dock,Containerfile,Dockerfile,dockerfile,Dockerfile*',
\ 'dosbatch': '*.bat,*.sys', \ 'dosbatch': '*.bat,*.sys',
\ 'dosini': '*.wrap,*.ini,*.dof,*.lektorproject,*.prefs,*.pro,*.properties,*.url,.coveragerc,.flake8,.pylintrc,buildozer.spec,pylintrc,.editorconfig,.npmrc,php.ini-*', \ 'dosini': '*.wrap,*.ini,*.cnf,*.dof,*.lektorproject,*.prefs,*.pro,*.properties,*.url,.coveragerc,.flake8,.pylintrc,HOSTS,buildozer.spec,hosts,pylintrc,vlcrc,.editorconfig,.npmrc,php.ini-*',
\ 'dot': '*.dot,*.gv', \ 'dot': '*.dot,*.gv',
\ 'dracula': '*.drac,*.drc,*lvs,*lpe,drac.*', \ 'dracula': '*.drac,*.drc,*lvs,*lpe,drac.*',
\ 'dsdl': '*.sdl', \ 'dsdl': '*.sdl',
@@ -153,7 +153,7 @@ let s:globs = {
\ 'embeddedpuppet': '*.epp', \ 'embeddedpuppet': '*.epp',
\ 'ember-script': '*.em,*.emberscript', \ 'ember-script': '*.em,*.emberscript',
\ 'emblem': '*.emblem,*.em', \ 'emblem': '*.emblem,*.em',
\ 'erlang': '*.erl,*.app.src,*.es,*.escript,*.hrl,*.xrl,*.yrl,*.app,*.yaws,Emakefile,rebar.config,rebar.config.lock,rebar.lock', \ 'erlang': '*.erl,*.app,*.app.src,*.es,*.escript,*.hrl,*.xrl,*.yrl,*.yaws,Emakefile,rebar.config,rebar.config.lock,rebar.lock',
\ 'eruby': '*.erb,*.erb.deface,*.rhtml', \ 'eruby': '*.erb,*.erb.deface,*.rhtml',
\ 'esmtprc': '*esmtprc', \ 'esmtprc': '*esmtprc',
\ 'esqlc': '*.ec,*.EC', \ 'esqlc': '*.ec,*.EC',
@@ -190,7 +190,7 @@ let s:globs = {
\ 'gitsendemail': '.gitsendemail.*', \ 'gitsendemail': '.gitsendemail.*',
\ 'gkrellmrc': 'gkrellmrc,gkrellmrc_?', \ 'gkrellmrc': 'gkrellmrc,gkrellmrc_?',
\ 'gleam': '*.gleam', \ 'gleam': '*.gleam',
\ 'glsl': '*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader,*.comp', \ 'glsl': '*.glsl,*.fp,*.frag,*.frg,*.fs,*.fsh,*.fshader,*.geo,*.geom,*.glslf,*.glslv,*.gs,*.gshader,*.rchit,*.rmiss,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vs,*.vsh,*.vshader,*.comp',
\ 'gmpl': '*.mod', \ 'gmpl': '*.mod',
\ 'gnash': 'gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc', \ 'gnash': 'gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc',
\ 'gnuplot': '*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,*.gpi', \ 'gnuplot': '*.gp,*.gnu,*.gnuplot,*.p,*.plot,*.plt,*.gpi',
@@ -262,7 +262,7 @@ let s:globs = {
\ 'jovial': '*.jov,*.j73,*.jovial', \ 'jovial': '*.jov,*.j73,*.jovial',
\ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*', \ 'jproperties': '*.properties,*.properties_??,*.properties_??_??,*.properties_??_??_*',
\ 'jq': '*.jq,.jqrc,.jqrc*', \ 'jq': '*.jq,.jqrc,.jqrc*',
\ 'json': '*.json,*.4DForm,*.4DProject,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.auto-changelog,.c8rc,.htmlhintrc,.imgbotconfig,.nycrc,.tern-config,.tern-project,.watchmanconfig,Pipfile.lock,composer.lock,mcmod.info', \ 'json': '*.json,*.4DForm,*.4DProject,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.sarif,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.all-contributorsrc,.arcconfig,.auto-changelog,.c8rc,.htmlhintrc,.imgbotconfig,.nycrc,.tern-config,.tern-project,.watchmanconfig,MODULE.bazel.lock,Pipfile.lock,composer.lock,deno.lock,flake.lock,mcmod.info',
\ 'json5': '*.json5', \ 'json5': '*.json5',
\ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json', \ 'jsonc': '*.cjson,*.jsonc,coc-settings.json,.eslintrc.json,.babelrc,.jshintrc,.jslintrc,.mocharc.json,coffeelint.json,tsconfig.json,jsconfig.json',
\ 'jsonnet': '*.jsonnet,*.libsonnet', \ 'jsonnet': '*.jsonnet,*.libsonnet',
@@ -393,7 +393,7 @@ let s:globs = {
\ 'passwd': '', \ 'passwd': '',
\ 'pccts': '*.g', \ 'pccts': '*.g',
\ 'pdf': '*.pdf', \ 'pdf': '*.pdf',
\ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,Makefile.PL,Rexfile,ack,cpanfile,example.gitolite.rc,.gitolite.rc', \ 'perl': '*.pl,*.al,*.cgi,*.fcgi,*.perl,*.ph,*.plx,*.pm,*.psgi,*.t,.latexmkrc,Makefile.PL,Rexfile,ack,cpanfile,latexmkrc,example.gitolite.rc,.gitolite.rc',
\ 'pest': '*.pest', \ 'pest': '*.pest',
\ 'pf': 'pf.conf', \ 'pf': 'pf.conf',
\ 'pfmain': 'main.cf', \ 'pfmain': 'main.cf',
@@ -415,9 +415,10 @@ let s:globs = {
\ 'povini': '.povrayrc', \ 'povini': '.povrayrc',
\ 'ppd': '*.ppd', \ 'ppd': '*.ppd',
\ 'ppwiz': '*.it,*.ih', \ 'ppwiz': '*.it,*.ih',
\ 'prisma': '*.prisma',
\ 'privoxy': '*.action', \ 'privoxy': '*.action',
\ 'procmail': '.procmail,.procmailrc', \ 'procmail': '.procmail,.procmailrc',
\ 'prolog': '*.pl,*.pro,*.prolog,*.yap,*.pdb', \ 'prolog': '*.pl,*.plt,*.pro,*.prolog,*.yap,*.pdb',
\ 'promela': '*.pml', \ 'promela': '*.pml',
\ 'proto': '*.proto', \ 'proto': '*.proto',
\ 'protocols': '', \ 'protocols': '',
@@ -428,7 +429,7 @@ let s:globs = {
\ 'puppet': '*.pp,Modulefile', \ 'puppet': '*.pp,Modulefile',
\ 'purescript': '*.purs', \ 'purescript': '*.purs',
\ 'pyrex': '*.pyx,*.pxd', \ 'pyrex': '*.pyx,*.pxd',
\ 'python': '*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,*.ptl,.gclient,DEPS,SConscript,SConstruct,Snakefile,wscript,.pythonrc,.pythonstartup', \ 'python': '*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.spec,*.tac,*.wsgi,*.xpy,*.ptl,.gclient,DEPS,SConscript,SConstruct,wscript,.pythonrc,.pythonstartup',
\ 'qmake': '*.pro,*.pri', \ 'qmake': '*.pro,*.pri',
\ 'qml': '*.qml,*.qbs', \ 'qml': '*.qml,*.qbs',
\ 'quake': '', \ 'quake': '',
@@ -482,7 +483,7 @@ let s:globs = {
\ 'services': '', \ 'services': '',
\ 'setserial': '', \ 'setserial': '',
\ 'sexplib': '*.sexp', \ 'sexplib': '*.sexp',
\ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,*.zsh-theme,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.kshrc,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile', \ 'sh': '*.sh,*.bash,*.bats,*.cgi,*.command,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,*.trigger,*.zsh-theme,.bash_aliases,.bash_functions,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.envrc,.flaskenv,.kshrc,.login,.profile,.tmux.conf,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,kshrc,login,man,profile,tmux.conf',
\ 'sieve': '*.siv,*.sieve', \ 'sieve': '*.siv,*.sieve',
\ 'sil': '*.sil', \ 'sil': '*.sil',
\ 'simula': '*.sim', \ 'simula': '*.sim',
@@ -554,7 +555,7 @@ let s:globs = {
\ 'tilde': '*.t.html', \ 'tilde': '*.t.html',
\ 'tli': '*.tli', \ 'tli': '*.tli',
\ 'tmux': '.tmux*.conf', \ 'tmux': '.tmux*.conf',
\ 'toml': '*.toml,Cargo.lock,Gopkg.lock,Pipfile,poetry.lock', \ 'toml': '*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,pdm.lock,poetry.lock',
\ 'tpp': '*.tpp', \ 'tpp': '*.tpp',
\ 'tptp': '*.p,*.tptp,*.ax', \ 'tptp': '*.p,*.tptp,*.ax',
\ 'trasys': '*.inp', \ 'trasys': '*.inp',
@@ -582,7 +583,7 @@ let s:globs = {
\ 'usserverlog': '*.usserver.log\c,usserver.log\c,usserver.*.log\c', \ 'usserverlog': '*.usserver.log\c,usserver.log\c,usserver.*.log\c',
\ 'usw2kagtlog': '*.usw2kagt.log\c,usw2kagt.log\c,usw2kagt.*.log\c', \ 'usw2kagtlog': '*.usw2kagt.log\c,usw2kagt.log\c,usw2kagt.*.log\c',
\ 'vala': '*.vala,*.vapi,*.valadoc', \ 'vala': '*.vala,*.vapi,*.valadoc',
\ 'vb': '*.bas,*.cls,*.frm,*.frx,*.vba,*.vbs,*.dsm,*.ctl,*.sba', \ 'vb': '*.bas,*.cls,*.frm,*.vba,*.vbs,*.dsm,*.ctl,*.sba',
\ 'vbnet': '*.vb,*.vbhtml', \ 'vbnet': '*.vb,*.vbhtml',
\ 'vcl': '*.vcl', \ 'vcl': '*.vcl',
\ 'velocity': '*.vm', \ 'velocity': '*.vm',
@@ -613,7 +614,7 @@ let s:globs = {
\ 'xhtml': '*.xhtml,*.xht', \ 'xhtml': '*.xhtml,*.xht',
\ 'xinetd': '', \ 'xinetd': '',
\ 'xmath': '*.msc,*.msf', \ 'xmath': '*.msc,*.msf',
\ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc', \ 'xml': '*.xml,*.adml,*.admx,*.ant,*.axaml,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.hzp,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mod,*.mojo,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.psc1,*.pt,*.qhelp,*.rdf,*.res,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.sw,*.targets,*.tml,*.typ,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xmp,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,*.tpm,*.csproj.user,*.wpl,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,*fglrxrc',
\ 'xml.twig': '*.xml.twig', \ 'xml.twig': '*.xml.twig',
\ 'xmodmap': '*Xmodmap,*xmodmap*', \ 'xmodmap': '*Xmodmap,*xmodmap*',
\ 'xpm': '*.xpm,*.pm', \ 'xpm': '*.xpm,*.pm',
@@ -629,7 +630,7 @@ let s:globs = {
\ 'yaml.docker-compose': 'docker-compose*.yaml,docker-compose*.yml', \ 'yaml.docker-compose': 'docker-compose*.yaml,docker-compose*.yml',
\ 'z8a': '*.z8a', \ 'z8a': '*.z8a',
\ 'zephir': '*.zep', \ 'zephir': '*.zep',
\ 'zig': '*.zig,*.zir', \ 'zig': '*.zig,*.zig.zon,*.zir',
\ 'zimbu': '*.zu', \ 'zimbu': '*.zu',
\ 'zir': '*.zir', \ 'zir': '*.zir',
\ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,.zlog*,.zcompdump*,.zfbfmarks,.zsh*', \ 'zsh': '*.zsh,.zshrc,.zshenv,.zlogin,.zprofile,.zlogout,.zlog*,.zcompdump*,.zfbfmarks,.zsh*',

View File

@@ -1,536 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'pony', 'autoload/pony.vim')
finish
endif
" Vim plugin file
" Language: Pony
" Maintainer: Jak Wings
" TODO: Make sure echomsg is off for release.
let s:cpo_save = &cpo
set cpo&vim
"let s:skip = '<SID>InCommentOrLiteral(line("."), col("."))'
let s:skip2 = '<SID>InLiteral(line("."), col(".")) || <SID>InComment(line("."), col(".")) == 1'
let s:skip3 = '!<SID>InKeyword(line("."), col("."))'
let s:skip4 = '!<SID>InBracket(line("."), col("."))'
let s:cfstart = '\v<%(ifdef|if|match|while|for|repeat|try|with|recover|object|lambda|iftype)>'
let s:cfmiddle = '\v<%(then|elseif|else|until|do|in|elseiftype)>|\|'
let s:cfend = '\v<end>'
let s:bstartp = '\v<%(ifdef|if|then|elseif|else|(match)|while|for|in|do|try|with|recover|repeat|until|(object)|lambda|iftype|elseiftype)>'
function! pony#Indent()
if v:lnum <= 1
return 0
endif
call cursor(v:lnum, 1)
let l:pnzpos = searchpos('.', 'cbnW')
if l:pnzpos == [0, 0]
return 0
endif
if s:InComment2(l:pnzpos) > 1
"echomsg 'Comment' (l:pnzpos[0] . '-' . v:lnum) -1
return cindent(v:lnum)
endif
if s:InLiteral2(l:pnzpos)
"echomsg 'String' (l:pnzpos[0] . '-' . v:lnum) -1
return -1
endif
unlet! l:pnzpos
" NOTE: Lines started in comments and strings are checked already.
let l:pnblnum = s:PrevNonblank(v:lnum - 1)
if l:pnblnum < 1
return 0
endif
let l:pnbline = getline(l:pnblnum)
let l:pnbindent = indent(l:pnblnum)
let l:line = getline(v:lnum)
let l:indent = l:pnbindent
let l:shiftwidth = shiftwidth()
" FIXME?
let l:continuing = 0
" If the previous line ends with a unary or binary operator,
if s:IsContinued(l:pnblnum)
let l:contlnum = l:pnblnum
let l:ppcontinued = 0
let l:ppnblnum = s:PrevNonblank(l:pnblnum - 1)
while s:IsContinued(l:ppnblnum)
let l:ppcontinued += 1
let l:contlnum = l:ppnblnum
let l:ppnblnum = s:PrevNonblank(l:ppnblnum - 1)
endwhile
"echomsg 'Continued1' l:pnblnum l:contlnum
" If the previous line is also continuing another line,
if l:ppcontinued
let l:continuing = 1
if getline(l:contlnum) =~# '\v^\s*%(actor|class|struct|primitive|trait|type|interface)>'
" reset the indent level.
"echomsg 'Continuing0' (l:contlnum . '-' . v:lnum) (l:shiftwidth * 2)
let l:indent = l:shiftwidth * 2
else
" keep using the previous indent.
"echomsg 'Continuing1' (l:pnblnum . '-' . v:lnum) l:pnbindent
let l:indent = l:pnbindent
endif
" if the previous line is part of the definition of a class,
elseif l:pnbline =~# '\v^\s*%(actor|class|struct|primitive|trait|type|interface)>'
" reset the indent level.
"echomsg 'Continuing2' (l:pnblnum . '-' . v:lnum) (l:shiftwidth * 2)
let l:continuing = 1
let l:indent = l:shiftwidth * 2
" if the previous line is part of the definition of a method,
elseif l:pnbline =~# '\v^\s*%(fun|new|be)>'
" reset the indent level.
"echomsg 'Continuing3' (l:pnblnum . '-' . v:lnum) (l:pnbindent + l:shiftwidth)
let l:continuing = 1
let l:indent = l:pnbindent + l:shiftwidth
" if the previous line is the start of a definition body,
elseif l:pnbline =~# '=>\s*$'
" indent this line.
"echomsg 'Continuing4' (l:pnblnum . '-' . v:lnum) (l:pnbindent + l:shiftwidth)
let l:continuing = 1
let l:indent = l:pnbindent + l:shiftwidth
else
" indent this line twice as far.
"echomsg 'Continuing5' (l:pnblnum . '-' . v:lnum) (l:pnbindent + l:shiftwidth * 2)
let l:continuing = 1
let l:indent = l:pnbindent + l:shiftwidth * 2
endif
unlet! l:contlnum l:ppnblnum l:ppcontinued
endif
" If this line starts a document string,
if !l:continuing && l:line =~# '^\s*"""'
let l:ppnblnum = s:PrevNonblank(l:pnblnum - 1)
if s:IsContinued(l:ppnblnum)
let l:contlnum = l:ppnblnum
while s:IsContinued(l:ppnblnum)
let l:contlnum = l:ppnblnum
let l:ppnblnum = s:PrevNonblank(l:ppnblnum - 1)
endwhile
if getline(l:contlnum) =~# '\v^\s*%(actor|class|struct|primitive|trait|type|interface)>'
" reset the indent level.
"echomsg 'DocString' (l:contlnum . '-' . v:lnum) l:shiftwidth
return l:shiftwidth
endif
endif
unlet! l:contlnum l:ppnblnum
endif
" If the previous line contains an unmatched opening bracket
if !l:continuing && l:pnbline =~# '[{[(]'
" if the line ends with an opening bracket,
if l:pnbline =~# '[{[(]\s*$' && !s:InCommentOrLiteral(l:pnblnum, col([l:pnblnum, '$']) - 1)
" indent this line.
let l:indent += l:shiftwidth
else
" find the unmatched opening bracket,
let l:start = [0, 0]
let l:end = col([l:pnblnum, '$']) - 1
call cursor(l:pnblnum, l:end)
while l:end > 0
let l:start = s:OuterPos(l:start, searchpairpos('(', '', ')', 'bnW', s:skip4, l:pnblnum))
let l:start = s:OuterPos(l:start, searchpairpos('\[', '', '\]', 'bnW', s:skip4, l:pnblnum))
let l:start = s:OuterPos(l:start, searchpairpos('{', '', '}', 'bnW', s:skip4, l:pnblnum))
if l:start == [0, 0]
break
endif
" find the matched closing bracket on the same line,
call cursor(l:start[0], l:start[1])
let l:c = s:CharAtCursor(l:start[0], l:start[1])
if searchpair(escape(l:c, '['), '', escape(tr(l:c, '([{', ')]}'), ']'),
\ 'znW', s:skip4, l:pnblnum) < 1
" the unmatched opening bracket is found,
break
endif
let l:end = l:start[1]
let l:start = [0, 0]
endwhile
if l:start != [0, 0]
" indent this line.
"echomsg 'Open bracket' (l:pnblnum . '-' . v:lnum) (l:indent + l:shiftwidth)
let l:indent += l:shiftwidth
endif
endif
unlet! l:start l:end l:c
endif
" If there is a matched closing bracket on the previous line,
" NOTE:
" >|[
" | (1 -
" | 1) * 2]
" | command
" ^
if !l:continuing
call cursor(l:pnblnum, 1)
" find the last closing bracket,
let l:end = [0, 0]
let l:end = s:OuterPos(l:end, searchpairpos('(', '', ')', 'zncr', s:skip4, l:pnblnum))
let l:end = s:OuterPos(l:end, searchpairpos('\[', '', '\]', 'zncr', s:skip4, l:pnblnum))
let l:end = s:OuterPos(l:end, searchpairpos('{', '', '}', 'zncr', s:skip4, l:pnblnum))
if l:end != [0, 0]
" find the matched opening bracket on another line,
let l:c = s:CharAtCursor(l:end[0], l:end[1])
let l:start = searchpairpos(escape(tr(l:c, ')]}', '([{'), '['), '', escape(l:c, ']'), 'nbW', s:skip4)
if l:start[0] != l:end[0]
" and then this line has the same indent as the line the matched bracket stays.
"echomsg 'Matched bracket' (l:start[0] . '-' . v:lnum) indent(l:start[0])
let l:indent = indent(l:start[0])
endif
endif
unlet! l:start l:end l:c
endif
" If there is a matched closing bracket on this line,
" NOTE:
" |[
" >| (1 -
" | 1) * 2
" |]
" ^ ^
if l:line =~# '^\s*[)\]}]'
" find the first closing bracket,
call cursor(v:lnum, 1)
let l:end = [0, 0]
let l:end = s:InnerPos(l:end, searchpairpos('(', '', ')', 'zncW', s:skip4, v:lnum))
let l:end = s:InnerPos(l:end, searchpairpos('\[', '', '\]', 'zncW', s:skip4, v:lnum))
let l:end = s:InnerPos(l:end, searchpairpos('{', '', '}', 'zncW', s:skip4, v:lnum))
if l:end != [0, 0]
" find the matched opening bracket on another line,
let l:c = s:CharAtCursor(l:end[0], l:end[1])
let l:start = searchpairpos(escape(tr(l:c, ')]}', '([{'), '['), '', escape(l:c, ']'), 'nbW', s:skip4)
if l:start[0] != l:end[0]
" and then this line has the same indent as the line the matched bracket stays.
"echomsg 'Closing Bracket' (l:start[0] . '-' . v:lnum) indent(l:start[0])
let l:indent = indent(l:start[0])
endif
endif
unlet! l:start l:end l:c
endif
" If this line starts the definition of a method, closure or match case,
if l:line =~# '^\s*=>'
" find the start of the definition,
call cursor(v:lnum, 1)
let l:start = searchpairpos('\v<%(new|be|fun|lambda)>|\|', '', '=>\zs', 'bnW', s:skip3)
if l:start != [0, 0]
" then this line has the same indent as the start.
"echomsg 'Method body' (l:start[0] . '-' . v:lnum) indent(l:start[0])
return indent(l:start[0])
endif
unlet! l:start
endif
" If this line starts a class definition or starts an alias,
if l:line =~# '\v^\s*%(actor|class|struct|primitive|trait|interface|use|type)>'
" reset the indent level.
return 0
endif
" If this line starts a method definition,
if l:line =~# '\v^\s*%(new|be|fun)>'
call cursor(v:lnum, 1)
let l:start = searchpairpos(s:cfstart, s:cfmiddle, s:cfend, 'bW', s:skip3)
if l:start != [0, 0]
let l:start = searchpos(s:bstartp, 'zcnpW', l:start[0])
" see if it is in an object block,
if l:start[2] == 3
"echomsg 'Method in object' (l:start[0] . '-' . v:lnum) (l:shiftwidth + indent(l:start[0]))
return l:shiftwidth + indent(l:start[0])
endif
endif
return l:shiftwidth
endif
" If this line starts a match case,
call cursor(v:lnum, 1)
if l:line =~# '^\s*|' && s:InKeyword(searchpos('|', 'znW', v:lnum))
" find the start or the previous case of the match block,
let l:start = searchpairpos(s:cfstart, s:cfmiddle, s:cfend, 'bnW', s:skip3)
if l:start != [0, 0]
" then this line has the same indent as the start.
"echomsg 'Match case' (l:start[0] . '-' . v:lnum) indent(l:start[0])
return indent(l:start[0])
endif
unlet! l:start
endif
" If this line ends (part of) a control flow,
if l:line =~# '\v^\s*%(end|elseif|else|then|in|do|until|elseiftype)>'
" find the start or middle of the control block,
call cursor(v:lnum, 1)
let l:start = searchpairpos(s:cfstart, s:cfmiddle, s:cfend, 'bnW', s:skip3)
if l:start != [0, 0]
" then this line has the same indent as the start.
"echomsg 'Block end' (l:start[0] . '-' . v:lnum) indent(l:start[0])
return indent(l:start[0])
endif
unlet! l:start
endif
" If the previous line starts a class definition,
if l:pnbline =~# '\v^\s*%(actor|class|struct|primitive|trait|type|interface)>'
" reset the indent level.
if s:IsContinued(l:pnblnum)
return l:shiftwidth * 2
else
return l:shiftwidth
endif
endif
" If the previous line starts a method definition,
if l:pnbline =~# '\v^\s*%(new|be|fun)>'
return l:pnbindent + l:shiftwidth
endif
" If the previous line starts (part of) a control flow,
call cursor(l:pnblnum, 1)
while 1
" find the start of the control block,
let l:start = searchpos(s:bstartp, 'zcepW', l:pnblnum)
if l:start[2] == 0
break
endif
if !s:InKeyword(l:start[0:1])
call cursor(l:pnblnum, l:start[1] + 3)
continue
endif
let l:index = l:start[2]
" find the end of the control block on the same line,
let l:end = searchpair(s:cfstart, '', s:cfend, 'znW', s:skip3, l:pnblnum)
" if the control block is not ended,
if l:end < 1
" if this line is a case for a match,
if l:index == 2 && l:line =~# '^\s*|'
" then this line has the same indent as the start of the match block.
return l:pnbindent
else
" then indent this line.
"echomsg 'Block start' (l:pnblnum . '-' . v:lnum) (l:pnbindent + l:shiftwidth)
return l:pnbindent + l:shiftwidth
endif
endif
endwhile
unlet! l:start l:end l:index
return l:indent
endfunction
function! s:PrevNonblank(lnum)
let l:lnum = prevnonblank(a:lnum)
while l:lnum > 0 && (s:InComment2(l:lnum, 1) || s:InLiteral2(l:lnum, 1))
let l:lnum = prevnonblank(l:lnum - 1)
endwhile
return l:lnum
endfunction
" NOTE:
" v
" |1 /* comment */
" |2
function! s:IsContinued(lnum)
let l:lnum = s:PrevNonblank(a:lnum)
if l:lnum < 1
return 0
endif
let l:line = getline(l:lnum)
let l:width = strwidth(substitute(l:line, '\s*$', '', ''))
" FIXME?
" | 1 + //
" | //
" | 2
return !s:InCommentOrLiteral(a:lnum, l:width)
\ && (l:line =~# '\v<%(and|or|xor|is|isnt|as|not|consume|addressof|digestof)\s*$'
\ || l:line =~# '\v%([=\-.]\>|[<!=>]\=\~?|\<\<\~?|\>\>\~?|\<:|[+\-*/%<>]\~?|[.,|:@~])\s*$'
\ )
endfunction
function! s:InCommentOrLiteral(...)
return call('s:InComment', a:000) || call('s:InLiteral', a:000)
endfunction
function! s:InKeyword(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
for id in s:Or(synstack(l:lnum, l:col), [])
if synIDattr(id, 'name') =~# '^ponyKw'
return 1
endif
endfor
return 0
endfunction
function! s:InBracket(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
for id in s:Or(synstack(l:lnum, l:col), [])
if synIDattr(id, 'name') ==# 'ponyBracket'
return 1
endif
endfor
return 0
endfunction
function! s:InComment(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
let l:stack = synstack(l:lnum, l:col)
let l:i = len(l:stack)
while l:i > 0
let l:sname = synIDattr(l:stack[l:i - 1], 'name')
if l:sname =~# '^ponyNestedCommentX\?$'
return 1 + l:i - (l:sname =~# 'X$')
elseif l:sname =~# '^ponyCommentX\?$'
return 1
endif
let l:i -= 1
endwhile
return 0
endfunction
function! s:InLiteral(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
let l:stack = synstack(l:lnum, l:col)
let l:i = len(l:stack)
while l:i > 0
let l:sname = synIDattr(l:stack[l:i - 1], 'name')
if l:sname =~# '^ponyDocumentStringX\?$'
return 3
elseif l:sname =~# '^ponyStringX\?$'
return 2
elseif l:sname =~# '^ponyCharacterX\?$'
return 1
endif
let l:i -= 1
endwhile
return 0
endfunction
" NOTE:
" |// //inside
" ^^^^^^^^^^
" |/* /*inside*/ */
" ^^^^^^^^^^^^^^
function! s:InComment2(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
let l:stack = synstack(l:lnum, l:col)
let l:i = len(l:stack)
while l:i > 0
let l:sname = synIDattr(l:stack[l:i - 1], 'name')
if l:sname ==# 'ponyNestedComment'
return 1 + l:i
elseif l:sname ==# 'ponyComment'
return 1
elseif l:sname =~# '\v^pony%(Nested)?CommentX$'
return 0
endif
let l:i -= 1
endwhile
return 0
endfunction
" NOTE:
" |"inside"
" ^^^^^^
" |"""inside"""""
" ^^^^^^^^^^^^
function! s:InLiteral2(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
let l:stack = synstack(l:lnum, l:col)
let l:i = len(l:stack)
while l:i > 0
let l:sname = synIDattr(l:stack[l:i - 1], 'name')
if l:sname ==# 'ponyDocumentString'
return 3
elseif l:sname ==# 'ponyString'
return 2
elseif l:sname ==# 'ponyCharacter'
return 1
elseif l:sname =~# '\v^pony%(DocumentString|String|Character)X$'
return 0
endif
let l:i -= 1
endwhile
return 0
endfunction
function! s:CharAtCursor(...)
let [l:lnum, l:col] = (type(a:1) == type([]) ? a:1 : a:000)
return matchstr(getline(l:lnum), '\%' . l:col . 'c.')
endfunction
function! s:Or(x, y)
return !empty(a:x) ? a:x : a:y
endfunction
function! s:InnerPos(x, y)
if a:x == [0, 0]
return a:y
elseif a:y == [0, 0]
return a:x
else
return a:x[1] < a:y[1] ? a:x : a:y
end
endfunction
function! s:OuterPos(x, y)
if a:x == [0, 0]
return a:y
elseif a:y == [0, 0]
return a:x
else
return a:x[1] > a:y[1] ? a:x : a:y
end
endfunction
function! pony#ClearTrailingSpace(all, alt, ...)
let l:force = (a:0 > 0 ? a:1 : 0)
if !l:force && (&readonly || !&modifiable || !&modified)
return
endif
if a:all
for lnum in range(1, line('$'))
let l:line = getline(lnum)
let l:end = col([lnum, '$']) - 1
if l:end > 0 && l:line =~# '\s$' && !s:InLiteral(lnum, l:end)
if a:alt
call setline(lnum, substitute(l:line, '\S\@<=\s\s*$', '', ''))
else
call setline(lnum, substitute(l:line, '\s\+$', '', ''))
endif
endif
endfor
else
let l:lnum = line('.')
let l:end = col('$') - 1
let l:line = getline(l:lnum)
if l:line =~# '\s$' && !s:InLiteral(l:lnum, l:end)
if a:alt
call setline(l:lnum, substitute(l:line, '\s\+$', '', ''))
else
call setline(l:lnum, substitute(l:line, '\S\@<=\s\s*$', '', ''))
endif
endif
endif
endfunction
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -3,46 +3,31 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'autoload/requ
endif endif
"" ""
" @section Introduction, intro " Refer https://github.com/vim/vim/blob/75e27d78f5370e7d2e0898326d9b080937e7b090/runtime/scripts.vim#L33-L71
" @library "
" <doc/@plugin(name).txt> is generated by <https://github.com/google/vimdoc>. " When a file's shebang is "pip install -r" or "pip-compile",
" See <README.md> for more information about installation and screenshots. " set its filetype to |requirements|.
function! requirements#shebang() abort
let s:line1 = getline(1)
"" if s:line1 =~# "^#!"
" Update cache. if s:line1 =~# '^#!\s*\S*\<env\s'
function! requirements#update_cache() abort let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g')
let s:items = [] let s:line1 = substitute(s:line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
let l:pip_items = split(system('COMP_WORDS="pip install -" COMP_CWORD=2 PIP_AUTO_COMPLETE=1 pip')) let s:line1 = substitute(s:line1, '\<env\s\+', '', '')
let l:pypi_items = split(system('pip-cache pkgnames')) endif
for l:item in l:pip_items if s:line1 =~# '^#!\s*\a:[/\\]'
let s:items += [{'word': l:item, 'menu': 'pip'}] let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '')
endfor elseif s:line1 =~# '^#!.*\<env\>'
for l:item in l:pypi_items let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '')
let s:items += [{'word': l:item, 'menu': 'pypi'}] elseif s:line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)'
endfor let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '')
call writefile([json_encode(s:items)], s:cache) else
let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '')
endif
if s:name =~# '^pip'
set ft=requirements
endif
endif
endfunction endfunction
if exists('*stdpath')
let s:cache_dir_home = stdpath('cache')
else
let s:cache_dir_home = $HOME . '/.cache/nvim'
endif
let s:cache_dir = s:cache_dir_home . '/requirements.vim'
call mkdir(s:cache_dir, 'p')
""
" Completion cache path.
call g:requirements#utils#plugin.Flag('g:requirements#cache',
\ s:cache_dir . '/requirements.json'
\ )
let s:cache = g:requirements#cache
try
let s:items = json_decode(readfile(s:cache)[0])
catch /\v^Vim%(\(\a+\))?:E(684|484|491):/
call requirements#update_cache()
let s:items = json_decode(readfile(s:cache)[0])
endtry
""
" Completion cache contents. For program.
call g:requirements#utils#plugin.Flag('g:requirements#items', s:items)
" vim: et sw=4 ts=4 sts=4: " vim: et sw=4 ts=4 sts=4:

View File

@@ -1,15 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'autoload/requirements/utils.vim')
finish
endif
""
" @section Configuration, config
function! s:Flag(name, default) abort
let l:scope = get(split(a:name, ':'), 0, 'g:')
let l:name = get(split(a:name, ':'), -1)
let {l:scope}:{l:name} = get({l:scope}:, l:name, a:default)
endfunction
let g:requirements#utils#plugin = {'Flag': funcref('s:Flag')}
" vim: et sw=4 ts=4 sts=4:

View File

@@ -6,7 +6,6 @@ endif
" Language: Ruby " Language: Ruby
" Maintainer: Mark Guzman <segfault@hasno.info> " Maintainer: Mark Guzman <segfault@hasno.info>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" ---------------------------------------------------------------------------- " ----------------------------------------------------------------------------
" "
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
@@ -493,7 +492,7 @@ class VimRubyCompletion
trail = "%s%s" % [ dir, sub ] trail = "%s%s" % [ dir, sub ]
tcfg = "%sconfig" % trail tcfg = "%sconfig" % trail
if File.exists?( tcfg ) if File.exist?( tcfg )
rails_base = trail rails_base = trail
break break
end end
@@ -506,7 +505,7 @@ class VimRubyCompletion
bootfile = rails_base + "config/boot.rb" bootfile = rails_base + "config/boot.rb"
envfile = rails_base + "config/environment.rb" envfile = rails_base + "config/environment.rb"
if File.exists?( bootfile ) && File.exists?( envfile ) if File.exist?( bootfile ) && File.exist?( envfile )
begin begin
require bootfile require bootfile
require envfile require envfile

View File

@@ -3,14 +3,17 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'smt2', 'autoload/smt2/formatt
endif endif
" Formatting requires a rather recent Vim version " Formatting requires a rather recent Vim version
if !((v:version > 802) || (v:version == 802 && has("patch2725"))) if (v:version < 802) || (v:version == 802 && !has("patch2725"))
const s:errmsg_oldvim = "Vim >= 8.2.2725 required for auto-formatting" const s:errmsg_oldvim = "Vim >= 8.2.2725 required for auto-formatting"
"Dummies "Dummies
function! smt2#formatter#FormatCurrentParagraph() function! smt2#formatter#FormatCurrentParagraph()
echoerr s:errmsg_oldvim echoerr s:errmsg_oldvim
endfunction endfunction
function! smt2#formatter#FormatAllParagraphs() function! smt2#formatter#FormatOutermostSExpr()
echoerr s:errmsg_oldvim
endfunction
function! smt2#formatter#FormatFile()
echoerr s:errmsg_oldvim echoerr s:errmsg_oldvim
endfunction endfunction
@@ -88,55 +91,75 @@ def Format(ast: dict<any>, indent = 0): string
call formatted->add(child->Format()) call formatted->add(child->Format())
endfor endfor
return formatted->join("\n") return formatted->join("\n")
elseif ast.kind ==# 'File'
var formatted = []
for child in ast.value
call formatted->add(child->Format())
endfor
return formatted->join("\n\n")
endif endif
throw 'Cannot format AST node: ' .. string(ast) throw 'Cannot format AST node: ' .. string(ast)
return '' # Unreachable return '' # Unreachable
enddef enddef
# ------------------------------------------------------------------------------
# Auxiliary
# ------------------------------------------------------------------------------
def FormatInCurrentBuffer(ast: dict<any>)
const cursor = getpos('.')
# Format lines and potential surrounding text on them
const formatted_lines = split(Format(ast), '\n')
const ast_coords = ast.CalcCoords()
const ws_mask = " \n\r\t"
const first_line_part_to_keep = getline(ast_coords[0].line)
->strcharpart(0, ast_coords[0].col - 2)
->trim(ws_mask, 2)
const last_line_part_to_keep = getline(ast_coords[1].line)
->strcharpart(ast_coords[1].col - 1)
->trim(ws_mask, 1)
# If section of AST has trailing whitespace until the file end, remove it
cursor(ast_coords[1].line, ast_coords[1].col)
if search('\m\C\S', 'W') == 0
deletebufline('%', ast_coords[1].line + 1, line('$'))
endif
# Replace section of AST by formatted lines (w/o killing surrounding text)
deletebufline('%', ast_coords[0].line, ast_coords[1].line)
if !empty(last_line_part_to_keep)
last_line_part_to_keep->append(ast_coords[0].line - 1)
endif
formatted_lines->append(ast_coords[0].line - 1)
if !empty(first_line_part_to_keep)
first_line_part_to_keep->append(ast_coords[0].line - 1)
endif
# If section of AST has leading whitespace until the file start, remove it
cursor(ast_coords[0].line, ast_coords[0].col)
if search('\m\C\S', 'bW') == 0
deletebufline('%', 1, ast_coords[0].line - 1)
endif
# Restore cursor position
call setpos('.', cursor)
enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Public functions # Public functions
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
def smt2#formatter#FormatCurrentParagraph() def smt2#formatter#FormatCurrentParagraph()
const cursor = getpos('.')
const ast = smt2#parser#ParseCurrentParagraph() const ast = smt2#parser#ParseCurrentParagraph()
FormatInCurrentBuffer(ast)
# Identify on which end of the buffer we are (to fix newlines later)
silent! normal! {
const is_first_paragraph = line('.') == 1
silent! normal! }
const is_last_paragraph = line('.') == line('$')
# Replace paragraph by formatted lines
const lines = split(Format(ast), '\n')
silent! normal! {d}
if is_last_paragraph && !is_first_paragraph
call append('.', [''] + lines)
else
call append('.', lines + [''])
endif
# Remove potentially introduced first empty line
if is_first_paragraph | silent! :1delete | endif
# Restore cursor position
call setpos('.', cursor)
enddef enddef
def smt2#formatter#FormatAllParagraphs() def smt2#formatter#FormatOutermostSExpr()
const cursor = getpos('.') const ast = smt2#parser#ParseOutermostSExpr()
const asts = smt2#parser#ParseAllParagraphs() FormatInCurrentBuffer(ast)
enddef
# Clear buffer & insert formatted paragraphs
silent! :1,$delete def smt2#formatter#FormatFile()
for ast in asts const ast = smt2#parser#ParseFile()
const lines = split(Format(ast), '\n') + [''] FormatInCurrentBuffer(ast)
call append('$', lines)
endfor
# Remove first & trailing empty lines
silent! :1delete
silent! :$delete
# Restore cursor position
call setpos('.', cursor)
enddef enddef

View File

@@ -11,17 +11,37 @@ set maxfuncdepth=100000000 # SMT files tend to be highly nested
# TODO: Change Ast.kind type from string to enum/number? # TODO: Change Ast.kind type from string to enum/number?
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# AST nodes -- essentially named token wrappers # AST nodes
# #
# Note: pos_from, pos_to and contains_comment were only introduced to allow for # Note: pos_from, pos_to and contains_comment allow for a fast FitsOneLine(ast)
# a fast FitsOneLine(ast) function in the formatter. # function in the formatter.
# Here, pos_from and pos_to refer to indices of characters -- not tokens # Here, pos_from and pos_to refer to indices of characters -- not tokens.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
def Ast(kind: string, value: any, pos_from: number, pos_to: number, contains_comment: bool): dict<any> def Ast(kind: string, value: any, pos_from: number, pos_to: number, contains_comment: bool, scanner: dict<any>): dict<any>
return {kind: kind, value: value, pos_from: pos_from, pos_to: pos_to, contains_comment: contains_comment} # User-facing functionality wants start/end line and column -- not positions
def CalcCoords(): list<dict<number>>
const from = scanner.calcCoord(pos_from)
# If expression ends at end of line, pos_to will be in next line.
# That's undesired. Stay in the actual last line.
var to = scanner.calcCoord(pos_to - 1)
to.col += 1
return [from, to]
enddef
return {kind: kind, value: value, pos_from: pos_from, pos_to: pos_to, contains_comment: contains_comment, CalcCoords: CalcCoords}
enddef enddef
def ParagraphAst(exprs: list<dict<any>>, pos_from: number, pos_to: number): dict<any> def FileAst(paragraphs: list<dict<any>>, pos_from: number, pos_to: number, scanner: dict<any>): dict<any>
var contains_comment = false
for paragraph in paragraphs
if paragraph.contains_comment
contains_comment = true
break
endif
endfor
return Ast('File', paragraphs, pos_from, pos_to, contains_comment, scanner)
enddef
def ParagraphAst(exprs: list<dict<any>>, pos_from: number, pos_to: number, scanner: dict<any>): dict<any>
var contains_comment = false var contains_comment = false
for expr in exprs for expr in exprs
if expr.contains_comment if expr.contains_comment
@@ -29,10 +49,10 @@ def ParagraphAst(exprs: list<dict<any>>, pos_from: number, pos_to: number): dict
break break
endif endif
endfor endfor
return Ast('Paragraph', exprs, pos_from, pos_to, contains_comment) return Ast('Paragraph', exprs, pos_from, pos_to, contains_comment, scanner)
enddef enddef
def SExprAst(exprs: list<dict<any>>, pos_from: number, pos_to: number): dict<any> def SExprAst(exprs: list<dict<any>>, pos_from: number, pos_to: number, scanner: dict<any>): dict<any>
var contains_comment = false var contains_comment = false
for expr in exprs for expr in exprs
if expr.contains_comment if expr.contains_comment
@@ -40,15 +60,22 @@ def SExprAst(exprs: list<dict<any>>, pos_from: number, pos_to: number): dict<any
break break
endif endif
endfor endfor
return Ast('SExpr', exprs, pos_from, pos_to, contains_comment) return Ast('SExpr', exprs, pos_from, pos_to, contains_comment, scanner)
enddef enddef
def AtomAst(token: dict<any>): dict<any> def AtomAst(token: dict<any>, scanner: dict<any>): dict<any>
return Ast('Atom', token, token.pos, token.pos + len(token.lexeme), token.kind == 8) return Ast('Atom', token, token.pos, token.pos + len(token.lexeme), token.kind == 8, scanner)
enddef enddef
def PrintAst(ast: dict<any>, indent = 0) def PrintAst(ast: dict<any>, indent = 0)
echo repeat(' ', indent * 2) .. '[' .. ast.kind .. '] ' const coords = ast.CalcCoords()
echo printf("[%5d-%-5d) [%4d:%-3d-%4d:%-3d) %s[%s] ",
ast.pos_from, ast.pos_to,
coords[0].line, coords[0].col,
coords[1].line, coords[1].col,
repeat(' ', indent * 2),
ast.kind)
if ast.kind ==# 'Atom' if ast.kind ==# 'Atom'
echon ast.value.lexeme echon ast.value.lexeme
@@ -60,13 +87,18 @@ def PrintAst(ast: dict<any>, indent = 0)
for v in ast.value for v in ast.value
call PrintAst(v, indent + 1) call PrintAst(v, indent + 1)
endfor endfor
elseif ast.kind ==# 'File'
for v in ast.value
call PrintAst(v, indent + 1)
endfor
endif endif
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Grammar # Grammar
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Paragraph ::= Expr+ # File ::= Paragraph+
# Paragraph ::= Expr+ EndOfParagraph
# Expr ::= SExpr | Atom # Expr ::= SExpr | Atom
# SExpr ::= '(' Expr* ')' # SExpr ::= '(' Expr* ')'
@@ -77,14 +109,16 @@ def AtStartOfLParen(scanner: dict<any>): bool
return scanner.cur_token.kind == 0 # token_lparen return scanner.cur_token.kind == 0 # token_lparen
enddef enddef
def ParseLParen(scanner: dict<any>) # consumes token; no return def ParseLParen(scanner: dict<any>): dict<any>
if debug if debug
scanner->smt2#scanner#Enforce(scanner->AtStartOfLParen(), scanner->smt2#scanner#Enforce(scanner->AtStartOfLParen(),
"ParseLParen called but not at start of LParen", "ParseLParen called but not at start of LParen",
scanner.cur_token.pos) scanner.cur_token.pos)
endif endif
const token = scanner.cur_token
scanner->smt2#scanner#NextToken() scanner->smt2#scanner#NextToken()
return token
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -94,14 +128,16 @@ def AtStartOfRParen(scanner: dict<any>): bool
return scanner.cur_token.kind == 1 # token_rparen return scanner.cur_token.kind == 1 # token_rparen
enddef enddef
def ParseRParen(scanner: dict<any>) # consumes token; no return def ParseRParen(scanner: dict<any>): dict<any>
if debug if debug
scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(), scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(),
"ParseRParen called but not at start of RParen", "ParseRParen called but not at start of RParen",
scanner.cur_token.pos) scanner.cur_token.pos)
endif endif
const token = scanner.cur_token
scanner->smt2#scanner#NextToken() scanner->smt2#scanner#NextToken()
return token
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -118,7 +154,7 @@ def ParseAtom(scanner: dict<any>): dict<any>
scanner.cur_token.pos) scanner.cur_token.pos)
endif endif
const ast = AtomAst(scanner.cur_token) const ast = AtomAst(scanner.cur_token, scanner)
scanner->smt2#scanner#NextToken() scanner->smt2#scanner#NextToken()
return ast return ast
enddef enddef
@@ -129,6 +165,7 @@ enddef
def AtStartOfExpr(scanner: dict<any>): bool def AtStartOfExpr(scanner: dict<any>): bool
return scanner->AtStartOfSExpr() || scanner->AtStartOfAtom() return scanner->AtStartOfSExpr() || scanner->AtStartOfAtom()
enddef enddef
def ParseExpr(scanner: dict<any>): dict<any> def ParseExpr(scanner: dict<any>): dict<any>
if debug if debug
scanner->smt2#scanner#Enforce(scanner->AtStartOfExpr(), scanner->smt2#scanner#Enforce(scanner->AtStartOfExpr(),
@@ -146,6 +183,7 @@ enddef
# SExpr # SExpr
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
const AtStartOfSExpr = funcref(AtStartOfLParen) const AtStartOfSExpr = funcref(AtStartOfLParen)
def ParseSExpr(scanner: dict<any>): dict<any> def ParseSExpr(scanner: dict<any>): dict<any>
const pos_from = scanner.cur_token.pos const pos_from = scanner.cur_token.pos
@@ -165,10 +203,10 @@ def ParseSExpr(scanner: dict<any>): dict<any>
scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(), scanner->smt2#scanner#Enforce(scanner->AtStartOfRParen(),
printf("Expected RParen but got %s", scanner.cur_token.kind->smt2#scanner#TokenKind2Str()), printf("Expected RParen but got %s", scanner.cur_token.kind->smt2#scanner#TokenKind2Str()),
scanner.cur_token.pos) scanner.cur_token.pos)
scanner->ParseRParen() const end_token = scanner->ParseRParen()
const pos_to = scanner.cur_token.pos const pos_to = end_token.pos + 1
return SExprAst(exprs, pos_from, pos_to) return SExprAst(exprs, pos_from, pos_to, scanner)
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -187,41 +225,132 @@ def ParseParagraph(scanner: dict<any>): dict<any>
exprs->add(scanner->ParseExpr()) exprs->add(scanner->ParseExpr())
endwhile endwhile
const pos_to = scanner.cur_token.pos const pos_to = exprs[-1].pos_to
return ParagraphAst(exprs, pos_from, pos_to) return ParagraphAst(exprs, pos_from, pos_to, scanner)
enddef
# ------------------------------------------------------------------------------
# File
# ------------------------------------------------------------------------------
def ParseFile(scanner: dict<any>): dict<any>
const pos_from = scanner.cur_token.pos
var paragraphs = []
while scanner.cur_token.kind != 9 # token_eof
const ast = scanner->ParseParagraph()
paragraphs->add(ast)
endwhile
const pos_to = empty(paragraphs) ? pos_from : paragraphs[-1].pos_to
return FileAst(paragraphs, pos_from, pos_to, scanner)
enddef
# ------------------------------------------------------------------------------
# Auxiliary
#
# TODO: MoveTo* functions rely on local search instead of proper (but slow)
# scanning of the whole file and may be incorrect in corner cases.
# Consider tweaking.
# ------------------------------------------------------------------------------
# Returns true if successful, i.e. on move to '(' of outermost SExpr
def MoveToOutermostSExpr(): bool
var cur_pos = getpos('.')
while true
silent! normal! [(
const new_pos = getpos('.')
if cur_pos == new_pos
break
else
cur_pos = new_pos
endif
endwhile
const cur_char = getline('.')[charcol('.') - 1]
return cur_char == '('
enddef
def CursorInSExpr(): bool
const cursor = getpos('.')
silent! normal! [(
const res = cursor != getpos('.')
call setpos('.', cursor)
return res
enddef
def MoveToStartOfCurrentParagraph()
# Empty (or whitespace) lines outside of S-expressions separate paragraphs.
# Nothing to do if cursor is already at such a line.
if !(getline('.')->trim()->empty() && !CursorInSExpr())
# Move backwards until an empty line that is not in an SExpr is found,
# or -- if there is none -- to the first line of the file
while true
const empty_line = search('\m\C^\s*$', 'b', 1)
if !CursorInSExpr()
break
elseif empty_line == 0
cursor(1, 1)
break
endif
endwhile
endif
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Public functions # Public functions
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
def smt2#parser#ParseCurrentParagraph(): dict<any> def smt2#parser#ParseCurrentParagraph(): dict<any>
# source = [start of current paragraph, EOF]
# Note: This is needed since `silent! normal! {y}` may not yank full paragraphs
# in the context of multiline expressions
const cursor = getpos('.') const cursor = getpos('.')
silent! normal! { MoveToStartOfCurrentParagraph()
const line_offset = line('.') const from = getpos('.')
const source = join(getline('.', '$'), "\n")
call setpos('.', cursor) call setpos('.', cursor)
var scanner = smt2#scanner#Scanner(source, line_offset) # source = [paragraph of outermost SExpr, EOF]
# Note: This is needed since `silent! normal! {` is not guaranteed to jump
# to the start of the paragraph, e.g. if newlines occur in between.
const lines_to_format = getline(from[1], '$')
const source = join(lines_to_format, "\n")
var scanner = smt2#scanner#Scanner(source, from[1], from[2])
const ast = scanner->ParseParagraph() const ast = scanner->ParseParagraph()
if debug | ast->PrintAst() | endif if debug | ast->PrintAst() | endif
return ast return ast
enddef enddef
def smt2#parser#ParseAllParagraphs(): list<dict<any>> def smt2#parser#ParseOutermostSExpr(): dict<any>
# source = current buffer const cursor = getpos('.')
const source = join(getline(1, '$'), "\n") if ! MoveToOutermostSExpr()
throw "Cursor is not in an S-expression!"
endif
const from = getpos('.')
call setpos('.', cursor)
var scanner = smt2#scanner#Scanner(source) # source = [start of outermost SExpr, EOF]
var asts = [] # Note: This is needed since `silent! normal! %` is not guaranteed to jump
while scanner.cur_token.kind != 9 # token_eof # to the matching ')', e.g. if an unmatched '(' occurs in a comment.
const ast = scanner->ParseParagraph() const lines_to_format = getline(from[1], '$')
asts->add(ast) const source = join(lines_to_format, "\n")
if debug | ast->PrintAst() | endif var scanner = smt2#scanner#Scanner(source, from[1], from[2])
endwhile const ast = scanner->ParseSExpr()
return asts
if debug | ast->PrintAst() | endif
return ast
enddef
def smt2#parser#ParseFile(): dict<any>
const cursor = getpos('.')
cursor(1, 1)
const first_non_empty_line = search('.')
call setpos('.', cursor)
# source = [first non-empty line, EOF]
const source = join(getline(first_non_empty_line, '$'), "\n")
var scanner = smt2#scanner#Scanner(source, first_non_empty_line)
const ast = scanner->ParseFile()
if debug | ast->PrintAst() | endif
return ast
enddef enddef

View File

@@ -56,7 +56,7 @@ enddef
def PrettyPrint(scanner: dict<any>, token: dict<any>) def PrettyPrint(scanner: dict<any>, token: dict<any>)
const coord = scanner->Pos2Coord(token.pos) const coord = scanner->Pos2Coord(token.pos)
echo printf("%4d:%-3d (%5d) %8s %s", coord.line, coord.col, token.pos, token.kind->smt2#scanner#TokenKind2Str(), token.lexeme) echo printf("%5d %4d:%-3d %8s %s", token.pos, coord.line, coord.col, token.kind->smt2#scanner#TokenKind2Str(), token.lexeme)
enddef enddef
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -72,12 +72,14 @@ enddef
# TODO: Enforce restriction to ASCII? We should if we use the lookup table below # TODO: Enforce restriction to ASCII? We should if we use the lookup table below
# TODO: Do not take a string but a character stream (or just buffer and pos)? # TODO: Do not take a string but a character stream (or just buffer and pos)?
def smt2#scanner#Scanner(source: string, line_offset = 1): dict<any> def smt2#scanner#Scanner(source: string, start_line = 1, start_col = 1): dict<any>
var scanner = { var scanner = {
chars: source->trim(" \t\n\r", 2)->split('\zs'), chars: source->trim(" \n\r\t", 2)->split('\zs'),
line_offset: line_offset, # start line of source string in buffer line_offset: start_line, # start line of source string in buffer
pos: 0, # pos in source string -- not column in line pos: start_col - 1, # pos in source string -- not column in line
at_new_paragraph: false} at_new_paragraph: false,
}
scanner.calcCoord = (pos: number): dict<number> => Pos2Coord(scanner, pos)
if scanner.chars->empty() if scanner.chars->empty()
scanner.at_eof = true scanner.at_eof = true

View File

@@ -9,6 +9,11 @@ set cpoptions&vim
let $TF_CLI_ARGS_fmt='' let $TF_CLI_ARGS_fmt=''
function! terraform#fmt() abort function! terraform#fmt() abort
silent execute 'w !'.g:terraform_binary_path.' fmt -check -'
if v:shell_error == 0
return
endif
" Save the view. " Save the view.
let curw = winsaveview() let curw = winsaveview()

View File

@@ -1,118 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'unison', 'autoload/unison.vim')
finish
endif
" Unison functionality for Vim, including type/term omnicompletion.
"
" Maintainer: Unison Computing
" Original Author: Cody Allen (ceedubs)
if exists('g:autoloaded_unison')
finish
endif
let g:autoloaded_unison = 1
let s:required_config_value = "!REQUIRED!"
" adapted from https://github.com/rust-lang/rust.vim/blob/4aa69b84c8a58fcec6b6dad6fe244b916b1cf830/autoload/rust.vim#L9-L18
function! s:config(name, default) abort
let name = 'unison_' . a:name
" Local buffer variable with same name takes predeence over global
if has_key(b:, name)
return get(b:, name)
elseif has_key(g:, name)
return get(g:, name)
elseif a:default == s:required_config_value
throw 'Missing required configuration value: ' . name
else
return a:default
endif
endfunction
function! s:curl_path() abort
return s:config('curl_path', "curl")
endfunction
function! s:jq_path() abort
return s:config('jq_path', "jq")
endfunction
function! unison#SetBufferDefaults() abort
if s:config('set_buffer_defaults', 1)
" Since Unison completion is fuzzy and not prefix-based, 'longest' doesn't
" work well, and 'noinsert' behaves a little better.
setlocal completeopt=menuone,noinsert,preview
setlocal omnifunc=unison#Complete
endif
endfunction
" Unison completion satisfying the standard vim completion signature, such
" that it can be assigned to omnifunc.
" vim will first call this to find the base input that should be completed,
" and then will call it again with the base input.
function! unison#Complete(findstart, base) abort
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
" Examples of where we want to count the start of a word:
"
" foo List.fold<cursor>
" ^
"
" {Abor<cursor>
" ^
"
" (List.fol<cursor>
" ^
while start > 0 && line[start - 1] !~ '\v\s|[!(){}\[\]]'
let start -= 1
endwhile
return start
else
return unison#CompleteForBase(a:base)
endif
endfunction
" Return an array of completion items for the provided base input. For example
" base could be 'List.foldL', in which case the top result would probably be
" 'List.foldLeft'.
function! unison#CompleteForBase(base) abort
let resultLimit = s:config('complete_result_limit', 20)
let apiHost = s:config('api_host', 'localhost')
let apiPort = s:config('api_port', s:required_config_value)
let apiToken = s:config('api_token', s:required_config_value)
let apiUri = 'http://' . apiHost . ':' . apiPort . '/' . apiToken . '/api/find'
let curlCommand = s:curl_path() . " -Gfs
\ --data-urlencode 'limit=" . resultLimit . "'
\ --data-urlencode 'query=" . a:base . "' "
\ . apiUri
let jqFilter = '
\ def prettyTermType: .termType|[(.[] | .segment)]|add;
\ def prettyTypeDef: if .tag == "BuiltinObject" then "builtin type " else "" end + (.contents|[(.[] | .segment)]|add);
\ def termToMatch: {
\ word: .bestFoundTermName,
\ info: (.namedTerm.termName + " : " + (.namedTerm|prettyTermType)),
\ menu: .namedTerm|prettyTermType
\ };
\ def typeToMatch: {
\ word: .bestFoundTypeName,
\ info: (.namedType.typeName + " : " + (.typeDef|prettyTypeDef)),
\ menu: .typeDef|prettyTypeDef
\ };
\ .[][1]|(
\ (select(.tag == "FoundTermResult")|.contents|termToMatch),
\ (select(.tag == "FoundTypeResult")|.contents|typeToMatch)
\ )'
let command = curlCommand . " | " . s:jq_path() . " -c '" . jqFilter . "'"
let lines = system(command)
let resultObjects = split(lines, "\n")
call map(resultObjects, {_, val -> json_decode(val)})
return resultObjects
endfunction
" vim: set et sw=2 sts=2 ts=2:

View File

@@ -128,6 +128,7 @@ let attributes_value = {
\ 'http-equiv': ['Text', ''], \ 'http-equiv': ['Text', ''],
\ 'icon': ['URL', ''], \ 'icon': ['URL', ''],
\ 'id': ['Text', ''], \ 'id': ['Text', ''],
\ 'inert': ['Bool', ''],
\ 'ismap': ['Bool', ''], \ 'ismap': ['Bool', ''],
\ 'keytype': ['Text', ''], \ 'keytype': ['Text', ''],
\ 'label': ['Text', ''], \ 'label': ['Text', ''],
@@ -194,7 +195,7 @@ let attributes_value = {
\ } \ }
if g:html5_event_handler_attributes_complete == 1 if g:html5_event_handler_attributes_complete == 1
let event_handler_attributes = {'onabort': [], 'onblur': [], 'oncanplay': [], 'oncanplaythrough': [], 'onchange': [], 'onclick': [], 'oncontextmenu': [], 'ondblclick': [], 'ondrag': [], 'ondragend': [], 'ondragenter': [], 'ondragleave': [], 'ondragover': [], 'ondragstart': [], 'ondrop': [], 'ondurationchange': [], 'onemptied': [], 'onended': [], 'onerror': [], 'onfocus': [], 'onformchange': [], 'onforminput': [], 'oninput': [], 'oninvalid': [], 'onkeydown': [], 'onkeypress': [], 'onkeyup': [], 'onload': [], 'onloadeddata': [], 'onloadedmetadata': [], 'onloadstart': [], 'onmousedown': [], 'onmousemove': [], 'onmouseout': [], 'onmouseover': [], 'onmouseup': [], 'onmousewheel': [], 'onpause': [], 'onplay': [], 'onplaying': [], 'onprogress': [], 'onratechange': [], 'onreadystatechange': [], 'onscroll': [], 'onseeked': [], 'onseeking': [], 'onselect': [], 'onshow': [], 'onstalled': [], 'onsubmit': [], 'onsuspend': [], 'ontimeupdate': [], 'onvolumechange': [], 'onwaiting': [], 'onselectstart': [], 'onselectchange': []} let event_handler_attributes = {'onabort': [], 'onblur': [], 'oncancel': [], 'oncanplay': [], 'oncanplaythrough': [], 'onchange': [], 'onclick': [], 'oncontextmenu': [], 'ondblclick': [], 'ondrag': [], 'ondragend': [], 'ondragenter': [], 'ondragleave': [], 'ondragover': [], 'ondragstart': [], 'ondrop': [], 'ondurationchange': [], 'onemptied': [], 'onended': [], 'onerror': [], 'onfocus': [], 'onformchange': [], 'onforminput': [], 'oninput': [], 'oninvalid': [], 'onkeydown': [], 'onkeypress': [], 'onkeyup': [], 'onload': [], 'onloadeddata': [], 'onloadedmetadata': [], 'onloadstart': [], 'onmousedown': [], 'onmousemove': [], 'onmouseout': [], 'onmouseover': [], 'onmouseup': [], 'onmousewheel': [], 'onpause': [], 'onplay': [], 'onplaying': [], 'onprogress': [], 'onratechange': [], 'onreadystatechange': [], 'onscroll': [], 'onseeked': [], 'onseeking': [], 'onselect': [], 'onshow': [], 'onstalled': [], 'onsubmit': [], 'onsuspend': [], 'ontimeupdate': [], 'onvolumechange': [], 'onwaiting': [], 'onselectstart': [], 'onselectchange': []}
let global_attributes = extend(global_attributes, event_handler_attributes) let global_attributes = extend(global_attributes, event_handler_attributes)
let body_attributes = {'onafterprint': [], 'onbeforeprint': [], 'onbeforeunload': [], 'onblur': [], 'onerror': [], 'onfocus': [], 'onhashchange': [], 'onload': [], 'onmessage': [], 'onoffline': [], 'ononline': [], 'onpopstate': [], 'onredo': [], 'onresize': [], 'onstorage': [], 'onundo': [], 'onunload': []} let body_attributes = {'onafterprint': [], 'onbeforeprint': [], 'onbeforeunload': [], 'onblur': [], 'onerror': [], 'onfocus': [], 'onhashchange': [], 'onload': [], 'onmessage': [], 'onoffline': [], 'ononline': [], 'onpopstate': [], 'onredo': [], 'onresize': [], 'onstorage': [], 'onundo': [], 'onunload': []}
@@ -205,6 +206,7 @@ if g:html5_event_handler_attributes_complete == 1
\ 'onbeforeprint': ['Script', ''], \ 'onbeforeprint': ['Script', ''],
\ 'onbeforeunload': ['Script', ''], \ 'onbeforeunload': ['Script', ''],
\ 'onblur': ['Script', ''], \ 'onblur': ['Script', ''],
\ 'oncancel': ['Script', ''],
\ 'oncanplay': ['Script', ''], \ 'oncanplay': ['Script', ''],
\ 'oncanplaythrough': ['Script', ''], \ 'oncanplaythrough': ['Script', ''],
\ 'onchange': ['Script', ''], \ 'onchange': ['Script', ''],

View File

@@ -6,7 +6,6 @@ endif
" Language: eRuby " Language: eRuby
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler") if exists("current_compiler")
finish finish

29
compiler/jq.vim Normal file
View File

@@ -0,0 +1,29 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'jq', 'compiler/jq.vim')
finish
endif
" Vim compiler file
" Compiler: jq
" Maintainer: Vito <vito.blog@gmail.com>
" Last Change: 2024 Apr 17
" Upstream: https://github.com/vito-c/jq.vim
if exists('b:current_compiler')
finish
endif
let b:current_compiler = 'jq'
let s:save_cpoptions = &cpoptions
set cpoptions&vim
if has('unix')
CompilerSet makeprg=jq\ -f\ %:S\ /dev/null
else
CompilerSet makeprg=jq\ -f\ %:S\ nul
endif
CompilerSet errorformat=%E%m\ at\ \\<%o\\>\\,\ line\ %l:,
\%Z,
\%-G%.%#
let &cpoptions = s:save_cpoptions
unlet s:save_cpoptions

View File

@@ -23,7 +23,11 @@ if !exists('g:ledger_main')
let g:ledger_main = '%' let g:ledger_main = '%'
endif endif
if !g:ledger_is_hledger if !exists ('b:is_hledger')
let b:is_hledger = g:ledger_is_hledger
endif
if !b:is_hledger
" Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."): " Capture Ledger errors (%-C ignores all lines between "While parsing..." and "Error:..."):
CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%# CompilerSet errorformat=%EWhile\ parsing\ file\ \"%f\"\\,\ line\ %l:,%ZError:\ %m,%-C%.%#
" Capture Ledger warnings: " Capture Ledger warnings:
@@ -32,5 +36,8 @@ if !g:ledger_is_hledger
CompilerSet errorformat+=%-G%.%# CompilerSet errorformat+=%-G%.%#
exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main)) exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ source\ ' . shellescape(expand(g:ledger_main))
else else
exe 'CompilerSet makeprg=('.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ print\ '.substitute(g:ledger_extra_options, ' ', '\\ ', 'g').'\ >\ /dev/null)' exe 'CompilerSet makeprg='.substitute(g:ledger_bin, ' ', '\\ ', 'g').'\ -f\ ' . substitute(shellescape(expand(g:ledger_main)), ' ', '\\ ', 'g') . '\ check\ '. substitute(g:ledger_extra_options, ' ', '\\ ', 'g')
CompilerSet errorformat=hledger:\ %trror:\ %f:%l:%c:
CompilerSet errorformat+=hledger:\ %trror:\ %f:%l:
CompilerSet errorformat+=hledger:\ %trror:\ %f:%l-%.%#:
endif endif

View File

@@ -7,7 +7,7 @@ endif
" Maintainer: Heikki Junes <hjunes@cc.hut.fi> " Maintainer: Heikki Junes <hjunes@cc.hut.fi>
" License: This file is part of LilyPond, the GNU music typesetter. " License: This file is part of LilyPond, the GNU music typesetter.
" "
" Copyright (C) 2004, 2007 Heikki Junes <hjunes@cc.hut.fi> " Copyright (C) 2004--2022 Heikki Junes <hjunes@cc.hut.fi>
" "
" LilyPond is free software: you can redistribute it and/or modify " LilyPond is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by " it under the terms of the GNU General Public License as published by

View File

@@ -7,6 +7,7 @@ endif
" Maintainer: Markus Mottl <markus.mottl@gmail.com> " Maintainer: Markus Mottl <markus.mottl@gmail.com>
" URL: https://github.com/ocaml/vim-ocaml " URL: https://github.com/ocaml/vim-ocaml
" Last Change: " Last Change:
" 2023 Nov 24 - Improved error format (Samuel Hym)
" 2021 Nov 03 - Improved error format (Jules Aguillon) " 2021 Nov 03 - Improved error format (Jules Aguillon)
" 2020 Mar 28 - Improved error format (Thomas Leonard) " 2020 Mar 28 - Improved error format (Thomas Leonard)
" 2017 Nov 26 - Improved error format (Markus Mottl) " 2017 Nov 26 - Improved error format (Markus Mottl)
@@ -15,17 +16,6 @@ endif
" Marc Weber's comments: " Marc Weber's comments:
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt, " Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
" ocamake and whatnot. So which one to use? " ocamake and whatnot. So which one to use?
"
" This error format was moved from ftplugin/ocaml.vim to this file,
" because ftplugin is the wrong file to set an error format
" and the error format itself is annoying because it joins many lines in this
" error case:
"
" Error: The implementation foo.ml does not match the interface foo.cmi:
" Modules do not match case.
"
" So having it here makes people opt-in
if exists("current_compiler") if exists("current_compiler")
finish finish
@@ -35,19 +25,37 @@ let current_compiler = "ocaml"
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
CompilerSet errorformat = " Patch 8.2.4329 introduces %e and %k as end line and end column positions
\%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:, if has('patch-8.2.4329')
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#, CompilerSet errorformat =
\%EFile\ \"%f\"\\,\ lines\ %l-%e\\,\ characters\ %c-%k:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%k:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%k\ %.%#,
else
CompilerSet errorformat =
\%EFile\ \"%f\"\\,\ lines\ %l-%*\\d\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
endif
CompilerSet errorformat +=
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m, \%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
\%EFile\ \"%f\"\\,\ line\ %l:, \%EFile\ \"%f\"\\,\ line\ %l:,
\%+EReference\ to\ unbound\ regexp\ name\ %m, \%+EReference\ to\ unbound\ regexp\ name\ %m,
\%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m, \%Eocamlyacc:\ e\ -\ line\ %l\ of\ \"%f\"\\,\ %m,
\%Wocamlyacc:\ w\ -\ %m, \%Wocamlyacc:\ w\ -\ %m,
\%-Zmake%.%#, \%-Zmake%.%#
\%C%*\\d\ \|%.%#,
\%C%p^%#, if get(g:, "ocaml_compiler_compact_messages", v:true)
\%C%m, CompilerSet errorformat +=
\%C%*\\d\ \|%.%#,
\%C%p^%#,
\%C%m
endif
CompilerSet errorformat +=
\%Z,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f', \%D%*\\a:\ Entering\ directory\ `%f',
@@ -58,8 +66,12 @@ CompilerSet errorformat =
\%X%*\\a:\ Leaving\ directory\ '%f', \%X%*\\a:\ Leaving\ directory\ '%f',
\%DEntering\ directory\ '%f', \%DEntering\ directory\ '%f',
\%XLeaving\ directory\ '%f', \%XLeaving\ directory\ '%f',
\%DMaking\ %*\\a\ in\ %f, \%DMaking\ %*\\a\ in\ %f
\%+G%m
if get(g:, "ocaml_compiler_compact_messages", v:true)
CompilerSet errorformat +=
\%+G%m
endif
let &cpo = s:cpo_save let &cpo = s:cpo_save

View File

@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'compiler/pip_
endif endif
" the Requirements File Format syntax support for Vim " the Requirements File Format syntax support for Vim
" Version: 1.7.1 " Version: 1.8.0
" Author: raimon <raimon49@hotmail.com> " Author: raimon <raimon49@hotmail.com>
" License: MIT LICENSE " License: MIT LICENSE
" The MIT License (MIT) " The MIT License (MIT)

View File

@@ -6,7 +6,6 @@ endif
" Language: Rake " Language: Rake
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler") if exists("current_compiler")
finish finish

View File

@@ -6,7 +6,6 @@ endif
" Language: RSpec " Language: RSpec
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler") if exists("current_compiler")
finish finish

View File

@@ -7,7 +7,6 @@ endif
" Function: Syntax check and/or error reporting " Function: Syntax check and/or error reporting
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler") if exists("current_compiler")
finish finish

View File

@@ -6,7 +6,6 @@ endif
" Language: Test::Unit - Ruby Unit Testing Framework " Language: Test::Unit - Ruby Unit Testing Framework
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("current_compiler") if exists("current_compiler")
finish finish

View File

@@ -22,4 +22,4 @@ endif
let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %' let &l:makeprg = g:typescript_compiler_binary . ' ' . g:typescript_compiler_options . ' $* %'
CompilerSet errorformat=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m CompilerSet errorformat+=%+A\ %#%f\ %#(%l\\\,%c):\ %m,%C%m

View File

@@ -62,7 +62,7 @@ if exists('g:loaded_matchit') && !exists('b:match_words')
let b:match_ignorecase = 0 let b:match_ignorecase = 0
let b:match_words = let b:match_words =
\ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|struct\|lib\|macro\|ifdef\|def\|begin\|enum\|annotation\)\>=\@!' . \ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|struct\|lib\|macro\|ifdef\|\%(abstract\s\+\)\@<!def\|begin\|enum\|annotation\)\>=\@!' .
\ ':' . \ ':' .
\ '\<\%(else\|elsif\|ensure\|when\|in\|rescue\|break\|next\)\>' . \ '\<\%(else\|elsif\|ensure\|when\|in\|rescue\|break\|next\)\>' .
\ ':' . \ ':' .

View File

@@ -11,37 +11,4 @@ setlocal commentstring=--\ %s
set smarttab set smarttab
if exists('g:dhall_use_ctags')
if g:dhall_use_ctags == 1
autocmd BufWritePost *.dhall silent !ctags -R .
endif
endif
function! StripTrailingWhitespace()
let myline=line('.')
let mycolumn = col('.')
exec 'silent %s/ *$//'
call cursor(myline, mycolumn)
endfunction
if exists('g:dhall_strip_whitespace')
if g:dhall_strip_whitespace == 1
au BufWritePre *.dhall silent! call StripTrailingWhitespace()
endif
endif
function! DhallFormat()
let cursor = getpos('.')
exec 'normal! gg'
exec 'silent !dhall format ' . expand('%')
exec 'e'
call setpos('.', cursor)
endfunction
if exists('g:dhall_format')
if g:dhall_format == 1
au BufWritePost *.dhall call DhallFormat()
endif
endif
au BufNewFile,BufRead *.dhall setl shiftwidth=2 au BufNewFile,BufRead *.dhall setl shiftwidth=2

View File

@@ -6,7 +6,6 @@ endif
" Language: eRuby " Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" Only do this when not done yet for this buffer " Only do this when not done yet for this buffer
if exists("b:did_ftplugin") if exists("b:did_ftplugin")

19
ftplugin/git.vim Normal file
View File

@@ -0,0 +1,19 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'git', 'ftplugin/git.vim')
finish
endif
" Vim filetype plugin
" Language: generic git output
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2023 Mar 26
" Only do this when not done yet for this buffer
if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1
setlocal nomodeline
let b:undo_ftplugin = "setl modeline<"

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'ftplugin/graphql.v
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to

View File

@@ -31,7 +31,7 @@ if get(g:, 'hcl_fold_sections', 0)
endif endif
" Set the commentstring " Set the commentstring
setlocal commentstring=#%s setlocal commentstring=#\ %s
let b:undo_ftplugin .= ' commentstring<' let b:undo_ftplugin .= ' commentstring<'
if get(g:, 'hcl_align', 0) && exists(':Tabularize') if get(g:, 'hcl_align', 0) && exists(':Tabularize')

View File

@@ -25,77 +25,5 @@ endif
" Prefer Vim help instead of manpages. " Prefer Vim help instead of manpages.
setlocal keywordprg=:help setlocal keywordprg=:help
if !exists('g:no_plugin_maps')
function! s:show_toc() abort
let bufname = bufname('%')
let info = getloclist(0, {'winid': 1})
if !empty(info) && getwinvar(info.winid, 'qf_toc') ==# bufname
lopen
return
endif
let toc = []
let lnum = 2
let last_line = line('$') - 1
let last_added = 0
let has_section = 0
let has_sub_section = 0
while lnum && lnum <= last_line
let level = 0
let add_text = ''
let text = getline(lnum)
if text =~# '^=\+$' && lnum + 1 < last_line
" A de-facto section heading. Other headings are inferred.
let has_section = 1
let has_sub_section = 0
let lnum = nextnonblank(lnum + 1)
let text = getline(lnum)
let add_text = text
while add_text =~# '\*[^*]\+\*\s*$'
let add_text = matchstr(add_text, '.*\ze\*[^*]\+\*\s*$')
endwhile
elseif text =~# '^[A-Z0-9][-A-ZA-Z0-9 .][-A-Z0-9 .():]*\%([ \t]\+\*.\+\*\)\?$'
" Any line that's yelling is important.
let has_sub_section = 1
let level = has_section
let add_text = matchstr(text, '.\{-}\ze\s*\%([ \t]\+\*.\+\*\)\?$')
elseif text =~# '\~$'
\ && matchstr(text, '^\s*\zs.\{-}\ze\s*\~$') !~# '\t\|\s\{2,}'
\ && getline(lnum - 1) =~# '^\s*<\?$\|^\s*\*.*\*$'
\ && getline(lnum + 1) =~# '^\s*>\?$\|^\s*\*.*\*$'
" These lines could be headers or code examples. We only want the
" ones that have subsequent lines at the same indent or more.
let l = nextnonblank(lnum + 1)
if getline(l) =~# '\*[^*]\+\*$'
" Ignore tag lines
let l = nextnonblank(l + 1)
endif
if indent(lnum) <= indent(l)
let level = has_section + has_sub_section
let add_text = matchstr(text, '\S.*')
endif
endif
let add_text = substitute(add_text, '\s\+$', '', 'g')
if !empty(add_text) && last_added != lnum
let last_added = lnum
call add(toc, {'bufnr': bufnr('%'), 'lnum': lnum,
\ 'text': repeat(' ', level) . add_text})
endif
let lnum = nextnonblank(lnum + 1)
endwhile
call setloclist(0, toc, ' ')
call setloclist(0, [], 'a', {'title': 'Help TOC'})
lopen
let w:qf_toc = bufname
endfunction
nnoremap <silent><buffer> gO :call <sid>show_toc()<cr>
endif
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save

View File

@@ -2,4 +2,19 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'jq', 'ftplugin/jq.vim')
finish finish
endif endif
" Vim compiler file
" Language: jq
" Maintainer: Vito <vito.blog@gmail.com>
" Last Change: 2024 Apr 17
" Upstream: https://github.com/vito-c/jq.vim
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = 'setl inc< commentstring<'
setlocal include=^\\s*\\%(import\\\|include\\)
setlocal commentstring=#%s setlocal commentstring=#%s
compiler jq

View File

@@ -8,6 +8,9 @@ endif
" -- fmt " -- fmt
command! -nargs=0 JsonnetFmt call jsonnet#Format() command! -nargs=0 JsonnetFmt call jsonnet#Format()
" -- eval
command! -nargs=0 JsonnetEval call jsonnet#Eval()
setlocal commentstring=//\ %s setlocal commentstring=//\ %s

View File

@@ -26,15 +26,15 @@ setlocal fo-=t fo+=croql
let b:julia_vim_loaded = 1 let b:julia_vim_loaded = 1
let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<" let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<"
\ . " expandtab< shiftwidth<" \ . " define< fo< cinoptions< completefunc<"
\ . " define< fo< indentexpr< indentkeys< cinoptions< completefunc<"
\ . " | unlet! b:commentary_format" \ . " | unlet! b:commentary_format"
\ . " | unlet! b:smartcomment_force_linemode" \ . " | unlet! b:smartcomment_force_linemode"
\ . " | unlet! b:julia_vim_loaded" \ . " | unlet! b:julia_vim_loaded"
if !exists("g:julia_set_indentation") || g:julia_set_indentation != 0 if !exists("g:julia_set_indentation") || g:julia_set_indentation != 0
" As suggested by Style Guide. " As suggested by Style Guide.
setlocal expandtab shiftwidth=4 setlocal expandtab shiftwidth=4
let b:undo_ftplugin .= " | setlocal expandtab< shiftwidth<"
endif endif
" MatchIt plugin support " MatchIt plugin support
@@ -109,7 +109,7 @@ let b:smartcomment_force_linemode = 1 " for carlobaldassi/vim-smartcomment
if has("gui_win32") if has("gui_win32")
let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n" let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n"
let b:undo_ftplugin = b:undo_ftplugin . " | unlet! b:browsefilter" let b:undo_ftplugin .= " | unlet! b:browsefilter"
endif endif
" Lookup documents " Lookup documents

21
ftplugin/just.vim Normal file
View File

@@ -0,0 +1,21 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'just', 'ftplugin/just.vim')
finish
endif
" Vim ftplugin file
" Language: Justfile
" Maintainer: Noah Bogart <noah.bogart@hey.com>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2023 Jul 08
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal iskeyword+=-
setlocal comments=n:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"

View File

@@ -7,8 +7,7 @@ endif
" Maintainer: Heikki Junes <hjunes@cc.hut.fi> " Maintainer: Heikki Junes <hjunes@cc.hut.fi>
" License: This file is part of LilyPond, the GNU music typesetter. " License: This file is part of LilyPond, the GNU music typesetter.
" "
" Copyright (C) 1998, 2002, 2004, 2010, 2016 " Copyright (C) 1998--2022 Han-Wen Nienhuys <hanwen@xs4all.nl>
" Han-Wen Nienhuys <hanwen@xs4all.nl>
" "
" LilyPond is free software: you can redistribute it and/or modify " LilyPond is free software: you can redistribute it and/or modify
" it under the terms of the GNU General Public License as published by " it under the terms of the GNU General Public License as published by
@@ -36,6 +35,9 @@ endif
" Don't load another plugin for this buffer " Don't load another plugin for this buffer
let b:did_ftplugin = 1 let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal autoindent setlocal autoindent
setlocal shiftwidth=2 setlocal shiftwidth=2
" "
@@ -77,3 +79,17 @@ setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond
setlocal complete-=k complete+=k setlocal complete-=k complete+=k
" "
setlocal showmatch setlocal showmatch
let b:undo_ftplugin = "setlocal autoindent< cpoptions< complete< dictionary< showmatch< shiftwidth< wildcharm< wildmenu<" .
\ " | silent! execute 'unmap <buffer> <F4>'" .
\ " | silent! execute 'unmap <buffer> <F5>'" .
\ " | silent! execute 'unmap <buffer> <F6>'" .
\ " | silent! execute 'unmap <buffer> <F7>'" .
\ " | silent! execute 'unmap <buffer> <F8>'" .
\ " | silent! execute 'unmap <buffer> <F9>'" .
\ " | silent! execute 'unmap <buffer> <F10>'" .
\ " | silent! execute 'unmap <buffer> <F12>'" .
\ " | silent! execute 'unmap <buffer> <S-F12>'"
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@@ -4,7 +4,7 @@ endif
"TODO print messages when on visual mode. I only see VISUAL, not the messages. "TODO print messages when on visual mode. I only see VISUAL, not the messages.
" Function interface phylosophy: " Function interface philosophy:
" "
" - functions take arbitrary line numbers as parameters. " - functions take arbitrary line numbers as parameters.
" Current cursor line is only a suitable default parameter. " Current cursor line is only a suitable default parameter.
@@ -60,7 +60,7 @@ let s:levelRegexpDict = {
\ 6: '\v^######[^#]@=' \ 6: '\v^######[^#]@='
\ } \ }
" Maches any header level of any type. " Matches any header level of any type.
" "
" This could be deduced from `s:levelRegexpDict`, but it is more " This could be deduced from `s:levelRegexpDict`, but it is more
" efficient to have a single regexp for this. " efficient to have a single regexp for this.
@@ -498,7 +498,9 @@ endfunction
function! s:SetexToAtx(line1, line2) function! s:SetexToAtx(line1, line2)
let l:originalNumLines = line('$') let l:originalNumLines = line('$')
execute 'silent! ' . a:line1 . ',' . a:line2 . 'substitute/\v(.*\S.*)\n\=+$/# \1/' execute 'silent! ' . a:line1 . ',' . a:line2 . 'substitute/\v(.*\S.*)\n\=+$/# \1/'
execute 'silent! ' . a:line1 . ',' . a:line2 . 'substitute/\v(.*\S.*)\n-+$/## \1/'
let l:changed = l:originalNumLines - line('$')
execute 'silent! ' . a:line1 . ',' . (a:line2 - l:changed) . 'substitute/\v(.*\S.*)\n-+$/## \1'
return l:originalNumLines - line('$') return l:originalNumLines - line('$')
endfunction endfunction
@@ -540,6 +542,19 @@ endfunction
" "
function! s:TableFormat() function! s:TableFormat()
let l:pos = getpos('.') let l:pos = getpos('.')
if get(g:, 'vim_markdown_borderless_table', 0)
" add `|` to the beginning of the line if it isn't present
normal! {
call search('|')
execute 'silent .,''}s/\v^(\s{0,})\|?([^\|])/\1|\2/e'
" add `|` to the end of the line if it isn't present
normal! {
call search('|')
execute 'silent .,''}s/\v([^\|])\|?(\s{0,})$/\1|\2/e'
endif
normal! { normal! {
" Search instead of `normal! j` because of the table at beginning of file edge case. " Search instead of `normal! j` because of the table at beginning of file edge case.
call search('|') call search('|')
@@ -550,7 +565,7 @@ function! s:TableFormat()
let l:flags = (&gdefault ? '' : 'g') let l:flags = (&gdefault ? '' : 'g')
execute 's/\(:\@<!-:\@!\|[^|:-]\)//e' . l:flags execute 's/\(:\@<!-:\@!\|[^|:-]\)//e' . l:flags
execute 's/--/-/e' . l:flags execute 's/--/-/e' . l:flags
Tabularize /| Tabularize /\(\\\)\@<!|
" Move colons for alignment to left or right side of the cell. " Move colons for alignment to left or right side of the cell.
execute 's/:\( \+\)|/\1:|/e' . l:flags execute 's/:\( \+\)|/\1:|/e' . l:flags
execute 's/|\( \+\):/|:\1/e' . l:flags execute 's/|\( \+\):/|:\1/e' . l:flags
@@ -658,7 +673,12 @@ endfunction
function! s:OpenUrlUnderCursor() function! s:OpenUrlUnderCursor()
let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.')) let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.'))
if l:url !=# '' if l:url !=# ''
call s:VersionAwareNetrwBrowseX(l:url) if l:url =~? 'http[s]\?:\/\/[[:alnum:]%\/_#.-]*'
"Do nothing
else
let l:url = expand(expand('%:h').'/'.l:url)
endif
call s:VersionAwareNetrwBrowseX(l:url)
else else
echomsg 'The cursor is not on a link.' echomsg 'The cursor is not on a link.'
endif endif
@@ -716,7 +736,7 @@ if !exists('*s:EditUrlUnderCursor')
execute l:editmethod l:url execute l:editmethod l:url
endif endif
if l:anchor !=# '' if l:anchor !=# ''
silent! execute '/'.l:anchor call search(l:anchor, 's')
endif endif
else else
execute l:editmethod . ' <cfile>' execute l:editmethod . ' <cfile>'
@@ -762,7 +782,7 @@ endif
command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(<line1>, <line2>) command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(<line1>, <line2>)
command! -buffer -range=% HeaderIncrease call s:HeaderDecrease(<line1>, <line2>, 1) command! -buffer -range=% HeaderIncrease call s:HeaderDecrease(<line1>, <line2>, 1)
command! -buffer -range=% SetexToAtx call s:SetexToAtx(<line1>, <line2>) command! -buffer -range=% SetexToAtx call s:SetexToAtx(<line1>, <line2>)
command! -buffer TableFormat call s:TableFormat() command! -buffer -range TableFormat call s:TableFormat()
command! -buffer Toc call s:Toc() command! -buffer Toc call s:Toc()
command! -buffer Toch call s:Toc('horizontal') command! -buffer Toch call s:Toc('horizontal')
command! -buffer Tocv call s:Toc('vertical') command! -buffer Tocv call s:Toc('vertical')
@@ -858,19 +878,23 @@ function! s:SyntaxInclude(filetype)
return grouplistname return grouplistname
endfunction endfunction
function! s:IsHighlightSourcesEnabledForBuffer()
" Enable for markdown buffers, and for liquid buffers with markdown format
return &filetype =~# 'markdown' || get(b:, 'liquid_subtype', '') =~# 'markdown'
endfunction
function! s:MarkdownRefreshSyntax(force) function! s:MarkdownRefreshSyntax(force)
" Use != to compare &syntax's value to use the same logic run on " Use != to compare &syntax's value to use the same logic run on
" $VIMRUNTIME/syntax/synload.vim. " $VIMRUNTIME/syntax/synload.vim.
" "
" vint: next-line -ProhibitEqualTildeOperator " vint: next-line -ProhibitEqualTildeOperator
if &filetype =~# 'markdown' && line('$') > 1 && &syntax != 'OFF' if s:IsHighlightSourcesEnabledForBuffer() && line('$') > 1 && &syntax != 'OFF'
call s:MarkdownHighlightSources(a:force) call s:MarkdownHighlightSources(a:force)
endif endif
endfunction endfunction
function! s:MarkdownClearSyntaxVariables() function! s:MarkdownClearSyntaxVariables()
if &filetype =~# 'markdown' if s:IsHighlightSourcesEnabledForBuffer()
unlet! b:mkd_included_filetypes unlet! b:mkd_included_filetypes
endif endif
endfunction endfunction

View File

@@ -23,3 +23,4 @@ if get(g:, 'nix_recommended_style', 1)
\ softtabstop=2 \ softtabstop=2
\ expandtab \ expandtab
endif endif
let b:match_words = '\<if\>:\<then\>:\<else\>,\<let\>:\<in\>'

View File

@@ -125,21 +125,13 @@ if !exists("g:did_ocaml_switch")
nnoremap <Plug>OCamlSwitchEdit :<C-u>call OCaml_switch(0)<CR> nnoremap <Plug>OCamlSwitchEdit :<C-u>call OCaml_switch(0)<CR>
nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR> nnoremap <Plug>OCamlSwitchNewWin :<C-u>call OCaml_switch(1)<CR>
fun OCaml_switch(newwin) fun OCaml_switch(newwin)
let open_command = a:newwin == 1 ? "new" : "arge"
if (match(bufname(""), "\\.mli$") >= 0) if (match(bufname(""), "\\.mli$") >= 0)
let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", "")) let fname = s:Fnameescape(substitute(bufname(""), "\\.mli$", ".ml", ""))
if (a:newwin == 1)
exec "new " . fname
else
exec "arge " . fname
endif
elseif (match(bufname(""), "\\.ml$") >= 0) elseif (match(bufname(""), "\\.ml$") >= 0)
let fname = s:Fnameescape(bufname("")) . "i" let fname = s:Fnameescape(bufname("")) . "i"
if (a:newwin == 1)
exec "new " . fname
else
exec "arge " . fname
endif
endif endif
exec open_command " " . fname
endfun endfun
endif endif
@@ -653,6 +645,11 @@ endfunction
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR> nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`< xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
" Make sure the environment is consistent
if !exists('g:opam_current_compiler') && exists('g:opam_init_env') && g:opam_init_env != 0
call opam#eval_env()
endif
let &cpoptions=s:cposet let &cpoptions=s:cposet
unlet s:cposet unlet s:cposet

View File

@@ -2,4 +2,66 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'octave', 'ftplugin/octave.vim
finish finish
endif endif
" Vim filetype plugin file
" Language: GNU Octave
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2021 Sep 02
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let s:cpo_save = &cpo
set cpo&vim
" TODO: update Matlab ftplugin and source it as the base file?
setlocal comments=s:%{,m:\ ,e:%},s:#{,m:\ ,e:#},:%,:#
setlocal commentstring=%\ %s setlocal commentstring=%\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal keywordprg=info\ octave\ --vi-keys\ --index-search
if exists("loaded_matchit") && !exists("b:match_words")
let b:match_words = '\<unwind_protect\>:\<unwind_protect_cleanup\>:\<end_unwind_protect\>'
if exists("octave_use_matlab_end")
let b:match_words .= ',' ..
\ '\<\%(classdef\|enumeration\|events\|for\|function\|if\|methods\|parfor\|properties\|switch\|while\|try\)\>' ..
\ ':' ..
\ '\<\%(elseif\|else\|case\|otherwise\|break\|continue\|catch\)\>' ..
\ ':' ..
\ '\<end\>'
else
let b:match_words .= ',' ..
\ '\<classdef\>:\<endclassdef\>,' ..
\ '\<enumeration\>:\<endenumeration\>,' ..
\ '\<events\>:\<endevents\>,' ..
\ '\<do\>:\<\%(break\|continue\)\>:\<until\>' ..
\ '\<for\>:\<\%(break\|continue\)\>:\<endfor\>,' ..
\ '\<function\>:\<return\>:\<endfunction\>,' ..
\ '\<if\>:\<\%(elseif\|else\)\>:\<endif\>,' ..
\ '\<methods\>:\<endmethods\>,' ..
\ '\<parfor\>:\<endparfor\>,' ..
\ '\<properties\>:\<endproperties\>,' ..
\ '\<switch\>:\<\%(case\|otherwise\)\>:\<endswitch\>,' ..
\ '\<while\>:\<\%(break\|continue\)\>:\<endwhile\>,' ..
\ '\<try\>:\<catch\>:\<end_try_catch\>'
endif
" only match in statement position
let s:statement_start = escape('\%(\%(^\|;\)\s*\)\@<=', '\')
let b:match_words = substitute(b:match_words, '\\<', s:statement_start, 'g')
endif
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "GNU Octave Source Files (*.m)\t*.m\n" ..
\ "All Files (*.*)\t*.*\n"
endif
let b:undo_ftplugin = "setl com< cms< fo< kp< " ..
\ "| unlet! b:browsefilter b:match_words"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: nowrap sw=2 sts=2 ts=8 noet:

View File

@@ -33,6 +33,7 @@ endif
if get(g:, 'plantuml_set_makeprg', 1) if get(g:, 'plantuml_set_makeprg', 1)
let &l:makeprg=g:plantuml_executable_script . ' %' let &l:makeprg=g:plantuml_executable_script . ' %'
let &l:errorformat='Error\ line %l in file: %f,%Z%m'
endif endif
setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql

View File

@@ -1,44 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'pony', 'ftplugin/pony.vim')
finish
endif
" Vim filetype plugin file
" Language: Pony
" Maintainer: Jak Wings
if exists('b:did_ftplugin')
finish
endif
let s:cpo_save = &cpo
set cpo&vim
setlocal comments=://,nsr:/*,mb:*,ex:*/
setlocal commentstring=/*%s*/
setlocal formatoptions-=t fo+=c fo+=r fo+=o fo+=q fo+=l fo+=j
"setlocal path=
"setlocal includeexpr=
setlocal include=\\v^\\s*use\\_s+%(\\i+\\_s*\\=\\_s*)?"\\zs[^"]*\\ze"
setlocal define=\\v^\\s*%(actor\|class\|struct\|primitive\|trait\|interface\|type\|new\|be\|fun\|let\|var\|embed\|use\|for\\_s+%(\\i+\\_s*,\\_s*)*\|with\\_s+%(\\i+\\_s*,\\_s*)*)\|(<\\i+\\_s*:\\_s*\\i+)@=
setlocal isident=@,48-57,_,39
setlocal iskeyword=@,48-57,_,39
setlocal suffixesadd=.pony
setlocal matchpairs=(:),{:},[:]
let b:match_ignorecase = 0
let b:match_skip = 's:Comment\|String\|Character\|CaseGuard'
let b:match_words = '\v<%(ifdef|if|match|while|for|repeat|try|with|recover|object|lambda|iftype)>\m:\v<%(then|elseif|else|until|do|in|elseiftype)>|\|\m:\<end\>,(:),\[:\],{:}'
" TODO: for more concise behavior
"let b:match_words = 'pony#GetMatchWords()'
source $VIMRUNTIME/macros/matchit.vim
let b:undo_ftplugin = 'set comments< commentstring< formatoptions< path< include< includeexpr< define< isident< iskeyword< suffixesadd< matchpairs<'
\ . ' | unlet! b:match_ignorecase b:match_skip b:match_words'
let &cpo = s:cpo_save
unlet s:cpo_save
let b:did_ftplugin = 1

11
ftplugin/prisma.vim Normal file
View File

@@ -0,0 +1,11 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'prisma', 'ftplugin/prisma.vim')
finish
endif
if (exists('b:did_ftplugin'))
finish
endif
let b:did_ftplugin = 1
setlocal iskeyword+=@-@
setlocal comments=://
setlocal commentstring=//\ %s

View File

@@ -21,6 +21,9 @@ setlocal formatoptions+=tcqroj
" Enable autocompletion of hyphenated PowerShell commands, " Enable autocompletion of hyphenated PowerShell commands,
" e.g. Get-Content or Get-ADUser " e.g. Get-Content or Get-ADUser
setlocal iskeyword+=- setlocal iskeyword+=-
" Make string literal related text objects work properly when string
" contains escaped quote characters
setlocal quoteescape=`
" Change the browse dialog on Win32 to show mainly PowerShell-related files " Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32") if has("gui_win32")
@@ -45,16 +48,16 @@ if exists('s:pwsh_cmd')
if !has('gui_running') && executable('less') && if !has('gui_running') && executable('less') &&
\ !(exists('$ConEmuBuild') && &term =~? '^xterm') \ !(exists('$ConEmuBuild') && &term =~? '^xterm')
" For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048 " For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048
command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw! command! -buffer -nargs=1 Ps1KeywordPrg silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw!
elseif has('terminal') elseif has('terminal')
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '') command! -buffer -nargs=1 Ps1KeywordPrg silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
else else
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>') command! -buffer -nargs=1 Ps1KeywordPrg echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
endif endif
setlocal keywordprg=:Ps1KeywordPrg
endif endif
setlocal keywordprg=:GetHelp
" Undo the stuff we changed " Undo the stuff we changed
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" . let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg< quoteescape<" .
\ " | sil! delc -buffer Ps1KeywordPrg" .
\ " | unlet! b:browsefilter" \ " | unlet! b:browsefilter"

View File

@@ -71,6 +71,11 @@ endif
"setl commentstring=;;%s "setl commentstring=;;%s
setl commentstring=#\|\ %s\ \|# setl commentstring=#\|\ %s\ \|#
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Racket Source Files (*.rkt *.rktl)\t*.rkt;*.rktl\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Undo our settings when the filetype changes away from Racket " Undo our settings when the filetype changes away from Racket
" (this should be amended if settings/mappings are added above!) " (this should be amended if settings/mappings are added above!)
let b:undo_ftplugin = let b:undo_ftplugin =
@@ -78,3 +83,4 @@ let b:undo_ftplugin =
\. "| setl makeprg< commentstring<" \. "| setl makeprg< commentstring<"
\. "| nunmap <buffer> K" \. "| nunmap <buffer> K"
\. "| vunmap <buffer> K" \. "| vunmap <buffer> K"
\. "| unlet! b:browsefilter"

View File

@@ -3,7 +3,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'requirements', 'ftplugin/requ
endif endif
" the Requirements File Format syntax support for Vim " the Requirements File Format syntax support for Vim
" Version: 1.7.1 " Version: 1.8.0
" Author: raimon <raimon49@hotmail.com> " Author: raimon <raimon49@hotmail.com>
" License: MIT LICENSE " License: MIT LICENSE
" The MIT License (MIT) " The MIT License (MIT)

View File

@@ -6,7 +6,6 @@ endif
" Language: Ruby " Language: Ruby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if (exists("b:did_ftplugin")) if (exists("b:did_ftplugin"))
finish finish
@@ -63,24 +62,38 @@ if !exists('g:ruby_version_paths')
let g:ruby_version_paths = {} let g:ruby_version_paths = {}
endif endif
let s:path_split = has('win32') ? ';' : ':'
function! s:query_path(root) abort function! s:query_path(root) abort
let code = "print $:.join %q{,}" " Disabled by default for security reasons.
if &shell =~# 'sh' && empty(&shellxquote) if !get(g:, 'ruby_exec', get(g:, 'plugin_exec', 0)) || empty(a:root)
let prefix = 'env PATH='.shellescape($PATH).' ' return map(split($RUBYLIB, s:path_split), 'v:val ==# "." ? "" : v:val')
else
let prefix = ''
endif endif
let code = "print $:.join %q{,}"
if &shellxquote == "'" if &shellxquote == "'"
let path_check = prefix.'ruby --disable-gems -e "' . code . '"' let args = ' --disable-gems -e "' . code . '"'
else else
let path_check = prefix."ruby --disable-gems -e '" . code . "'" let args = " --disable-gems -e '" . code . "'"
endif endif
let cd = haslocaldir() ? 'lcd' : 'cd' let cd = haslocaldir() ? 'lcd' : exists(':tcd') && haslocaldir(-1) ? 'tcd' : 'cd'
let cwd = fnameescape(getcwd()) let cwd = fnameescape(getcwd())
try try
exe cd fnameescape(a:root) exe cd fnameescape(a:root)
let path = split(system(path_check),',') for dir in split($PATH, s:path_split)
if dir !=# '.' && executable(dir . '/ruby') == 1
let exepath = dir . '/ruby'
break
endif
endfor
if exists('l:exepath')
let path = split(system(exepath . args),',')
if v:shell_error
let path = []
endif
else
let path = []
endif
exe cd cwd exe cd cwd
return path return path
finally finally
@@ -121,10 +134,8 @@ else
if !exists('g:ruby_default_path') if !exists('g:ruby_default_path')
if has("ruby") && has("win32") if has("ruby") && has("win32")
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) ) ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
elseif executable('ruby') && !empty($HOME)
let g:ruby_default_path = s:query_path($HOME)
else else
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val') let g:ruby_default_path = s:query_path($HOME)
endif endif
endif endif
let s:ruby_paths = g:ruby_default_path let s:ruby_paths = g:ruby_default_path

View File

@@ -5,11 +5,36 @@ endif
setlocal iskeyword+=-,:,#,',$ setlocal iskeyword+=-,:,#,',$
setlocal commentstring=;%s setlocal commentstring=;%s
" ------------------------------------------------------------------------------
" Mappings for solver functionality " Mappings for solver functionality
nnoremap <silent> <buffer> <localleader>r :call smt2#solver#Run()<cr> " ------------------------------------------------------------------------------
nnoremap <silent> <buffer> <localleader>R :call smt2#solver#RunAndShowResult()<cr> nnoremap <silent> <buffer> <Plug>Smt2Run :call smt2#solver#Run()<cr>
nnoremap <silent> <buffer> <localleader>v :call smt2#solver#PrintVersion()<cr> if !hasmapto('<Plug>Smt2Run', 'n')
nmap <silent> <localleader>r <Plug>Smt2Run
endif
nnoremap <silent> <buffer> <Plug>Smt2RunAndShowResult :call smt2#solver#RunAndShowResult()<cr>
if !hasmapto('<Plug>Smt2RunAndShowResult', 'n')
nmap <silent> <localleader>R <Plug>Smt2RunAndShowResult
endif
nnoremap <silent> <Plug>Smt2PrintVersion :call smt2#solver#PrintVersion()<CR>
if !hasmapto('<Plug>Smt2PrintVersion', 'n')
nmap <silent> <localleader>v <Plug>Smt2PrintVersion
endif
" ------------------------------------------------------------------------------
" Mappings for formatting functionality " Mappings for formatting functionality
nnoremap <silent> <buffer> <localleader>f :call smt2#formatter#FormatCurrentParagraph()<cr> " ------------------------------------------------------------------------------
nnoremap <silent> <buffer> <localleader>F :call smt2#formatter#FormatAllParagraphs()<cr> nnoremap <silent> <buffer> <Plug>Smt2FormatCurrentParagraph :call smt2#formatter#FormatCurrentParagraph()<cr>
if !hasmapto('<Plug>Smt2FormatCurrentParagraph', 'n') && (mapcheck('<localleader>f', 'n') == '')
nmap <silent> <localleader>f <Plug>Smt2FormatCurrentParagraph
endif
" Alternative function to put on <localleader>f
nnoremap <silent> <buffer> <Plug>Smt2FormatOutermostSExpr :call smt2#formatter#FormatOutermostSExpr()<cr>
nnoremap <silent> <buffer> <Plug>Smt2FormalFile :call smt2#formatter#FormatFile()<cr>
if !hasmapto('<Plug>Smt2FormalFile', 'n')
nmap <silent> <localleader>F <Plug>Smt2FormalFile
endif

View File

@@ -52,6 +52,7 @@ if get(g:, 'terraform_fmt_on_save', 0)
autocmd! autocmd!
autocmd BufWritePre *.tf call terraform#fmt() autocmd BufWritePre *.tf call terraform#fmt()
autocmd BufWritePre *.tfvars call terraform#fmt() autocmd BufWritePre *.tfvars call terraform#fmt()
autocmd BufWritePre *.tftest.hcl call terraform#fmt()
augroup END augroup END
endif endif

View File

@@ -19,8 +19,11 @@ setlocal commentstring=//\ %s
" " and insert the comment leader when hitting <CR> or using "o". " " and insert the comment leader when hitting <CR> or using "o".
setlocal formatoptions-=t formatoptions+=croql setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = 'setl fo< cms<'
if !&l:formatexpr && !&l:formatprg if !&l:formatexpr && !&l:formatprg
setlocal formatexpr=Fixedgq(v:lnum,v:count) setlocal formatexpr=Fixedgq(v:lnum,v:count)
let b:undo_ftplugin .= ' fex<'
endif endif
" setlocal foldmethod=syntax " setlocal foldmethod=syntax
@@ -29,64 +32,64 @@ let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save
function! Fixedgq(lnum, count) function! Fixedgq(lnum, count)
let l:tw = &tw ? &tw : 80 let l:tw = &tw ? &tw : 80
let l:count = a:count let l:count = a:count
let l:first_char = indent(a:lnum) + 1 let l:first_char = indent(a:lnum) + 1
if mode() == 'i' " gq was not pressed, but tw was set if mode() == 'i' " gq was not pressed, but tw was set
return 1 return 1
endif endif
" This gq is only meant to do code with strings, not comments " This gq is only meant to do code with strings, not comments
if yats#IsLineComment(a:lnum, l:first_char) || yats#IsInMultilineComment(a:lnum, l:first_char) if yats#IsLineComment(a:lnum, l:first_char) || yats#IsInMultilineComment(a:lnum, l:first_char)
return 1 return 1
endif endif
if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq if len(getline(a:lnum)) < l:tw && l:count == 1 " No need for gq
return 1 return 1
endif endif
" Put all the lines on one line and do normal splitting after that " Put all the lines on one line and do normal splitting after that
if l:count > 1 if l:count > 1
while l:count > 1 while l:count > 1
let l:count -= 1 let l:count -= 1
normal! J normal! J
endwhile endwhile
endif endif
let l:winview = winsaveview() let l:winview = winsaveview()
call cursor(a:lnum, l:tw + 1)
let orig_breakpoint = searchpairpos(' ', '', '\.', 'bcW', '', a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos(' ', '', '\.', 'bcW', s:skip_expr, a:lnum)
" No need for special treatment, normal gq handles edgecases better
if breakpoint[1] == orig_breakpoint[1]
call winrestview(l:winview)
return 1
endif
" Try breaking after string
if breakpoint[1] <= indent(a:lnum)
call cursor(a:lnum, l:tw + 1) call cursor(a:lnum, l:tw + 1)
let orig_breakpoint = searchpairpos(' ', '', '\.', 'bcW', '', a:lnum) let breakpoint = searchpairpos('\.', '', ' ', 'cW', s:skip_expr, a:lnum)
call cursor(a:lnum, l:tw + 1) endif
let breakpoint = searchpairpos(' ', '', '\.', 'bcW', s:skip_expr, a:lnum)
" No need for special treatment, normal gq handles edgecases better
if breakpoint[1] == orig_breakpoint[1]
call winrestview(l:winview)
return 1
endif
" Try breaking after string
if breakpoint[1] <= indent(a:lnum)
call cursor(a:lnum, l:tw + 1)
let breakpoint = searchpairpos('\.', '', ' ', 'cW', s:skip_expr, a:lnum)
endif
if breakpoint[1] != 0 if breakpoint[1] != 0
call feedkeys("r\<CR>") call feedkeys("r\<CR>")
else else
let l:count = l:count - 1 let l:count = l:count - 1
endif endif
" run gq on new lines " run gq on new lines
if l:count == 1 if l:count == 1
call feedkeys("gqq") call feedkeys("gqq")
endif endif
return 0 return 0
endfunction endfunction
function! TsIncludeExpr(file) function! TsIncludeExpr(file)
@@ -98,10 +101,12 @@ function! TsIncludeExpr(file)
endif endif
endfunction endfunction
set path+=./node_modules/**,node_modules/** setlocal path+=./node_modules/**,node_modules/**
set include=import\_s.\\zs[^'\"]*\\ze setlocal include=import\_s.\\zs[^'\"]*\\ze
set includeexpr=TsIncludeExpr(v:fname) setlocal includeexpr=TsIncludeExpr(v:fname)
set suffixesadd+=.ts setlocal suffixesadd+=.ts
let b:undo_ftplugin .= ' pa< inc< inex< fex<'
" "
" TagBar " TagBar

View File

@@ -2,6 +2,14 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'typescript', 'ftplugin/typesc
finish finish
endif endif
" Comment formatting
setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd+=.tsx
let b:undo_ftplugin = 'setl fo< cms< sua<'
" modified from mxw/vim-jsx from html.vim " modified from mxw/vim-jsx from html.vim
if exists("loaded_matchit") && !exists('b:tsx_match_words') if exists("loaded_matchit") && !exists('b:tsx_match_words')
let b:match_ignorecase = 0 let b:match_ignorecase = 0
@@ -10,10 +18,6 @@ if exists("loaded_matchit") && !exists('b:tsx_match_words')
let b:match_words = exists('b:match_words') let b:match_words = exists('b:match_words')
\ ? b:match_words . ',' . b:tsx_match_words \ ? b:match_words . ',' . b:tsx_match_words
\ : b:tsx_match_words \ : b:tsx_match_words
let b:undo_ftplugin .= ' | unlet! b:match_words b:match_ignorecase b:tsx_match_words'
endif endif
" Comment formatting
setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal formatoptions-=t formatoptions+=croql
set suffixesadd+=.tsx

View File

@@ -8,4 +8,9 @@ if exists("b:did_ftplugin")
endif endif
let b:did_ftplugin = 1 let b:did_ftplugin = 1
call unison#SetBufferDefaults() setlocal commentstring=--\ %s
setlocal iskeyword+=!,'
" setlocal tabstop=2
" setlocal softtabstop=2
" setlocal shiftwidth=2
" setlocal completefunc=syntaxcomplete#Complete

View File

@@ -28,7 +28,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd=.zig,.zir setlocal suffixesadd=.zig,.zir
if has('comments') if has('comments')
setlocal comments=:///,://!,://,:\\\\ setlocal comments=:///,://!,://
setlocal commentstring=//\ %s setlocal commentstring=//\ %s
endif endif

View File

@@ -23,57 +23,80 @@ if exists("*GetCucumberIndent")
finish finish
endif endif
function! s:syn(lnum) let s:headings = {
return synIDattr(synID(a:lnum,1+indent(a:lnum),1),'name') \ 'Feature': 'feature',
\ 'Rule': 'rule',
\ 'Background': 'bg_or_scenario',
\ 'Scenario': 'bg_or_scenario',
\ 'ScenarioOutline': 'bg_or_scenario',
\ 'Examples': 'examples',
\ 'Scenarios': 'examples'}
function! s:Line(lnum) abort
if getline(a:lnum) =~# ':'
let group = matchstr(synIDattr(synID(a:lnum,1+indent(a:lnum), 1), 'name'), '^cucumber\zs.*')
if !has_key(s:headings, group)
let group = substitute(matchstr(getline(a:lnum), '^\s*\zs\%([^:]\+\)\ze:\S\@!'), '\s\+', '', 'g')
endif
else
let group = ''
endif
let char = matchstr(getline(a:lnum), '^\s*\zs[[:punct:]]')
return {
\ 'lnum': a:lnum,
\ 'indent': indent(a:lnum),
\ 'heading': get(s:headings, group, ''),
\ 'tag': char ==# '@',
\ 'table': char ==# '|',
\ 'comment': char ==# '#',
\ }
endfunction endfunction
function! GetCucumberIndent() function! GetCucumberIndent(...) abort
let line = getline(prevnonblank(v:lnum-1)) let lnum = a:0 ? a:1 : v:lnum
let cline = getline(v:lnum) let sw = shiftwidth()
let nline = getline(nextnonblank(v:lnum+1)) let prev = s:Line(prevnonblank(lnum-1))
let sw = exists('*shiftwidth') ? shiftwidth() : shiftwidth() let curr = s:Line(lnum)
let syn = s:syn(prevnonblank(v:lnum-1)) let next = s:Line(nextnonblank(lnum+1))
let csyn = s:syn(v:lnum) if curr.heading ==# 'feature'
let nsyn = s:syn(nextnonblank(v:lnum+1))
if csyn ==# 'cucumberFeature' || cline =~# '^\s*Feature:'
" feature heading " feature heading
return 0 return 0
elseif csyn ==# 'cucumberExamples' || cline =~# '^\s*\%(Examples\|Scenarios\):' elseif curr.heading ==# 'examples'
" examples heading " examples heading
return 2 * sw return 2 * sw
elseif csyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || cline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' elseif curr.heading ==# 'bg_or_scenario'
" background, scenario or outline heading " background, scenario or outline heading
return sw return sw
elseif syn ==# 'cucumberFeature' || line =~# '^\s*Feature:' elseif prev.heading ==# 'feature'
" line after feature heading " line after feature heading
return sw return sw
elseif syn ==# 'cucumberExamples' || line =~# '^\s*\%(Examples\|Scenarios\):' elseif prev.heading ==# 'examples'
" line after examples heading " line after examples heading
return 3 * sw return 3 * sw
elseif syn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || line =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):' elseif prev.heading ==# 'bg_or_scenario'
" line after background, scenario or outline heading " line after background, scenario or outline heading
return 2 * sw return 2 * sw
elseif cline =~# '^\s*[@#]' && (nsyn == 'cucumberFeature' || nline =~# '^\s*Feature:' || indent(prevnonblank(v:lnum-1)) <= 0) elseif (curr.tag || curr.comment) && (next.heading ==# 'feature' || prev.indent <= 0)
" tag or comment before a feature heading " tag or comment before a feature heading
return 0 return 0
elseif cline =~# '^\s*@' elseif curr.tag
" other tags " other tags
return sw return sw
elseif cline =~# '^\s*[#|]' && line =~# '^\s*|' elseif (curr.table || curr.comment) && prev.table
" mid-table " mid-table
" preserve indent " preserve indent
return indent(prevnonblank(v:lnum-1)) return prev.indent
elseif cline =~# '^\s*|' && line =~# '^\s*[^|]' elseif curr.table && !prev.table
" first line of a table, relative indent " first line of a table, relative indent
return indent(prevnonblank(v:lnum-1)) + sw return prev.indent + sw
elseif cline =~# '^\s*[^|]' && line =~# '^\s*|' elseif !curr.table && prev.table
" line after a table, relative unindent " line after a table, relative unindent
return indent(prevnonblank(v:lnum-1)) - sw return prev.indent - sw
elseif cline =~# '^\s*#' && getline(v:lnum-1) =~ '^\s*$' && (nsyn =~# '^cucumber\%(Background\|Scenario\|ScenarioOutline\)$' || nline =~# '^\s*\%(Background\|Scenario\|Scenario Outline\):') elseif curr.comment && getline(v:lnum-1) =~# '^\s*$' && next.heading ==# 'bg_or_scenario'
" comments on scenarios " comments on scenarios
return sw return sw
endif endif
return indent(prevnonblank(v:lnum-1)) return prev.indent < 0 ? 0 : prev.indent
endfunction endfunction
" vim:set sts=2 sw=2: " vim:set sts=2 sw=2:

View File

@@ -6,7 +6,6 @@ endif
" Language: eRuby " Language: eRuby
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
if exists("b:did_indent") if exists("b:did_indent")
finish finish

View File

@@ -189,6 +189,13 @@ function! GetFsharpIndent()
endif endif
" Don't change indent after lines begins with '//':
if lline =~ '^\s*//'
let i = indent(v:lnum)
return i == 0 ? ind : i
endif
" Add a 'shiftwidth' after lines ending with: " Add a 'shiftwidth' after lines ending with:
if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$' if lline =~ '\(:\|=\|->\|<-\|(\|\[\|{\|{<\|\[|\|\[<\|\<\(begin\|do\|else\|fun\|function\|functor\|if\|initializer\|object\|private\|sig\|struct\|then\|try\)\|\<object\s*(.*)\)\s*$'
let ind = ind + &sw let ind = ind + &sw

View File

@@ -2,7 +2,7 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'graphql', 'indent/graphql.vim
finish finish
endif endif
" Copyright (c) 2016-2021 Jon Parise <jon@indelible.org> " Copyright (c) Jon Parise <jon@indelible.org>
" "
" Permission is hereby granted, free of charge, to any person obtaining a copy " Permission is hereby granted, free of charge, to any person obtaining a copy
" of this software and associated documentation files (the "Software"), to " of this software and associated documentation files (the "Software"), to
@@ -64,11 +64,11 @@ function GetGraphQLIndent()
return 0 return 0
endif endif
" If the previous line isn't GraphQL, don't change this line's indentation. " If the previous line isn't GraphQL, assume we're part of a template
" Assume we've been manually indented as part of a template string. " string and indent this new line within it.
let l:stack = map(synstack(l:prevlnum, 1), "synIDattr(v:val, 'name')") let l:stack = map(synstack(l:prevlnum, 1), "synIDattr(v:val, 'name')")
if get(l:stack, -1) !~# '^graphql' if get(l:stack, -1) !~# '^graphql'
return -1 return indent(l:prevlnum) + shiftwidth()
endif endif
let l:line = getline(v:lnum) let l:line = getline(v:lnum)

View File

@@ -18,7 +18,7 @@ setlocal indentkeys-=0{
setlocal indentkeys-=0} setlocal indentkeys-=0}
setlocal nosmartindent setlocal nosmartindent
let b:undo_indent = "setl ai< inde< indk< si<" let b:undo_indent = "setlocal autoindent< indentexpr< indentkeys< smartindent<"
" Only define the function once. " Only define the function once.
if exists("*GetJuliaIndent") if exists("*GetJuliaIndent")
@@ -294,7 +294,7 @@ function IsInContinuationImportLine(lnum)
if len(stack) == 0 if len(stack) == 0
return 0 return 0
endif endif
return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\)\>', indent(a:lnum)) == -1 return JuliaMatch(a:lnum, getline(a:lnum), '\<\%(import\|using\|export\|public\)\>', indent(a:lnum)) == -1
endfunction endfunction
function IsFunctionArgPar(lnum, c) function IsFunctionArgPar(lnum, c)
@@ -444,10 +444,10 @@ function GetJuliaIndent()
" Decrease indentation for each closed block in the current line " Decrease indentation for each closed block in the current line
let ind -= shiftwidth() * num_closed_blocks let ind -= shiftwidth() * num_closed_blocks
" Additional special case: multiline import/using/export statements " Additional special case: multiline import/using/export/public statements
let prevline = getline(lnum) let prevline = getline(lnum)
" Are we in a multiline import/using/export statement, right below the " Are we in a multiline import/using/export/public statement, right below the
" opening line? " opening line?
if IsInContinuationImportLine(v:lnum) && !IsInContinuationImportLine(lnum) if IsInContinuationImportLine(v:lnum) && !IsInContinuationImportLine(lnum)
if get(g:, 'julia_indent_align_import', 1) if get(g:, 'julia_indent_align_import', 1)
@@ -461,9 +461,9 @@ function GetJuliaIndent()
return cind + 2 return cind + 2
endif endif
else else
" if the opening line is not a naked import/using/export statement, use " if the opening line is not a naked import/using/export/public statement, use
" it as reference " it as reference
let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\>', indent(lnum), lim) let iind = JuliaMatch(lnum, prevline, '\<import\|using\|export\|public\>', indent(lnum), lim)
if iind >= 0 if iind >= 0
" assuming whitespace after using... so no `using(XYZ)` please! " assuming whitespace after using... so no `using(XYZ)` please!
let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6, -1, 'basic') let nonwhiteind = JuliaMatch(lnum, prevline, '\S', iind+6, -1, 'basic')
@@ -475,7 +475,7 @@ function GetJuliaIndent()
endif endif
let ind += shiftwidth() let ind += shiftwidth()
" Or did we just close a multiline import/using/export statement? " Or did we just close a multiline import/using/export/public statement?
elseif !IsInContinuationImportLine(v:lnum) && IsInContinuationImportLine(lnum) elseif !IsInContinuationImportLine(v:lnum) && IsInContinuationImportLine(lnum)
" find the starting line of the statement " find the starting line of the statement
let ilnum = 0 let ilnum = 0

55
indent/just.vim Normal file
View File

@@ -0,0 +1,55 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'just', 'indent/just.vim')
finish
endif
" Vim indent file
" Language: Justfile
" Maintainer: Noah Bogart <noah.bogart@hey.com>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2024 Jan 25
" Only load this indent file when no other was loaded yet.
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetJustfileIndent()
setlocal indentkeys=0},0),!^F,o,O,0=''',0=\"\"\"
let b:undo_indent = "setlocal indentexpr< indentkeys<"
if exists("*GetJustfileIndent")
finish
endif
function GetJustfileIndent()
if v:lnum < 2
return 0
endif
let prev_line = getline(v:lnum - 1)
let last_indent = indent(v:lnum - 1)
if getline(v:lnum) =~ "\\v^\\s+%([})]|'''$|\"\"\"$)"
return last_indent - shiftwidth()
elseif prev_line =~ '\V#'
return last_indent
elseif prev_line =~ "\\v%([:{(]|^.*\\S.*%([^']'''|[^\"]\"\"\"))\\s*$"
return last_indent + shiftwidth()
elseif prev_line =~ '\\$'
if v:lnum == 2 || getline(v:lnum - 2) !~ '\\$'
if prev_line =~ '\v:\=@!'
return last_indent + shiftwidth() + shiftwidth()
else
return last_indent + shiftwidth()
endif
endif
elseif v:lnum > 2 && getline(v:lnum - 2) =~ '\\$'
return last_indent - shiftwidth()
elseif prev_line =~ '\v:\s*%(\h|\()' && prev_line !~ '\V:='
return last_indent + shiftwidth()
endif
return last_indent
endfunction

View File

@@ -31,7 +31,7 @@ function GetLedgerIndent(...)
if line =~# '^\s\+\S' if line =~# '^\s\+\S'
" Lines that already are indented (→postings, sub-directives) keep their indentation. " Lines that already are indented (→postings, sub-directives) keep their indentation.
return &shiftwidth return shiftwidth()
elseif line =~# '^\s*$' elseif line =~# '^\s*$'
" Current line is empty, try to guess its type based on the previous line. " Current line is empty, try to guess its type based on the previous line.
if prev =~# '^\([[:digit:]~=]\|\s\+\S\)' if prev =~# '^\([[:digit:]~=]\|\s\+\S\)'
@@ -40,7 +40,7 @@ function GetLedgerIndent(...)
" indented you will have to indent the first line following a " indented you will have to indent the first line following a
" pre-declaration manually. This makes it easier to type long lists of " pre-declaration manually. This makes it easier to type long lists of
" 'account' pre-declarations without sub-directives, for example. " 'account' pre-declarations without sub-directives, for example.
return &shiftwidth return shiftwidth()
else else
return 0 return 0
endif endif

View File

@@ -35,6 +35,8 @@ let b:did_indent = 1
setlocal indentexpr=GetLilyPondIndent() setlocal indentexpr=GetLilyPondIndent()
setlocal indentkeys=o,O,},>>,!^F setlocal indentkeys=o,O,},>>,!^F
let b:undo_indent = "setlocal indentexpr< indentkeys<"
" Only define the function once. " Only define the function once.
if exists("*GetLilyPondIndent") if exists("*GetLilyPondIndent")
finish finish

View File

@@ -2,16 +2,76 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'nginx', 'indent/nginx.vim')
finish finish
endif endif
if exists("b:did_indent") " Only load this indent file when no other was loaded.
finish if exists('b:did_indent')
finish
endif endif
let b:did_indent = 1 let b:did_indent = 1
setlocal indentexpr= setlocal indentexpr=GetNginxIndent()
" cindent actually works for nginx' simple file structure setlocal indentkeys=0{,0},0#,!^F,o,O
setlocal cindent
" Just make sure that the comments are not reset as defs would be.
setlocal cinkeys-=0#
let b:undo_indent = "setl cin< cink< inde<" let b:undo_indent = 'setl inde< indk<'
" Only define the function once.
if exists('*GetNginxIndent')
finish
endif
function GetNginxIndent() abort
let plnum = s:PrevNotAsBlank(v:lnum - 1)
" Hit the start of the file, use zero indent.
if plnum == 0
return 0
endif
let ind = indent(plnum)
" Add a 'shiftwidth' after '{'
if s:AsEndWith(getline(plnum), '{')
let ind = ind + shiftwidth()
end
" Subtract a 'shiftwidth' on '}'
" This is the part that requires 'indentkeys'.
if getline(v:lnum) =~ '^\s*}'
let ind = ind - shiftwidth()
endif
let pplnum = s:PrevNotAsBlank(plnum - 1)
if s:IsLineContinuation(plnum)
if !s:IsLineContinuation(pplnum)
let ind = ind + shiftwidth()
end
else
if s:IsLineContinuation(pplnum)
let ind = ind - shiftwidth()
end
endif
return ind
endfunction
" Find the first line at or above {lnum} that is non-blank and not a comment.
function s:PrevNotAsBlank(lnum) abort
let lnum = prevnonblank(a:lnum)
while lnum > 0
if getline(lnum) !~ '^\s*#'
break
endif
let lnum = prevnonblank(lnum - 1)
endwhile
return lnum
endfunction
" Check whether {line} ends with {pat}, ignoring trailing comments.
function s:AsEndWith(line, pat) abort
return a:line =~ a:pat . '\m\s*\%(#.*\)\?$'
endfunction
function s:IsLineContinuation(lnum) abort
return a:lnum > 0 && !s:AsEndWith(getline(a:lnum), '[;{}]')
endfunction

View File

@@ -1,41 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'pony', 'indent/pony.vim')
finish
endif
" Vim indent file
" Language: Pony
" Maintainer: Jak Wings
if exists('b:did_indent')
finish
endif
let s:cpo_save = &cpo
set cpo&vim
setlocal nolisp
setlocal nocindent
setlocal nosmartindent
setlocal autoindent
setlocal indentexpr=pony#Indent()
setlocal indentkeys=!^F,o,O,0\|,0(,0),0[,0],0{,0},0==>,0=\"\"\",0=end,0=then,0=else,0=in,0=do,0=until,0=actor,0=class,0=struct,0=primitive,0=trait,0=interface,0=new,0=be,0=fun,0=type,0=use
setlocal cinkeys=!^F,o,O,0\|,0(,0),0[,0],0{,0},0==>,0=\"\"\",0=end,0=then,0=else,0=in,0=do,0=until,0=actor,0=class,0=struct,0=primitive,0=trait,0=interface,0=new,0=be,0=fun,0=type,0=use
setlocal cinwords=ifdef,if,match,while,for,repeat,try,with,recover,object,lambda,then,elseif,else,until,do,actor,class,struct,primitive,trait,interface,new,be,fun,iftype,elseiftype
augroup pony
autocmd! * <buffer>
autocmd CursorHold <buffer> call pony#ClearTrailingSpace(1, 1)
"autocmd InsertEnter <buffer> call pony#ClearTrailingSpace(0, 0)
autocmd InsertLeave <buffer> call pony#ClearTrailingSpace(0, 1)
autocmd BufWritePre <buffer> call pony#ClearTrailingSpace(1, 0, 1)
augroup END
let b:undo_indent = 'set lisp< cindent< autoindent< smartindent< indentexpr< indentkeys< cinkeys< cinwords<'
\ . ' | execute("autocmd! pony * <buffer>")'
let &cpo = s:cpo_save
unlet s:cpo_save
let b:did_indent = 1

View File

@@ -7,7 +7,6 @@ endif
" Maintainer: Andrew Radev <andrey.radev@gmail.com> " Maintainer: Andrew Radev <andrey.radev@gmail.com>
" Previous Maintainer: Nikolai Weibull <now at bitwi.se> " Previous Maintainer: Nikolai Weibull <now at bitwi.se>
" URL: https://github.com/vim-ruby/vim-ruby " URL: https://github.com/vim-ruby/vim-ruby
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
" 0. Initialization {{{1 " 0. Initialization {{{1
" ================= " =================

View File

@@ -119,7 +119,14 @@ function! GetSvelteIndent()
let cursyns = s:SynsSOL(v:lnum) let cursyns = s:SynsSOL(v:lnum)
let cursyn = get(cursyns, 0, '') let cursyn = get(cursyns, 0, '')
if s:SynHTML(cursyn) && !s:IsMultipleLineSvelteExpression(curline, cursyns) if s:IsMultipleLineTemplateString(curline, cursyns)
call s:Log('current line is multiline template string expression')
if !s:IsMultipleLineTemplateString(prevline, prevsyns)
let ind = indent(v:lnum - 1) + &sw
else
let ind = indent(v:lnum - 1)
endif
elseif s:SynHTML(cursyn) && !s:IsMultipleLineSvelteExpression(curline, cursyns)
call s:Log('syntax: html') call s:Log('syntax: html')
let ind = XmlIndentGet(v:lnum, 0) let ind = XmlIndentGet(v:lnum, 0)
if prevline =~? s:empty_tag if prevline =~? s:empty_tag
@@ -247,6 +254,20 @@ function! s:IsMultipleLineSvelteExpression(curline, syns)
return 0 return 0
endfunction endfunction
function! s:IsMultipleLineTemplateString(curline, syns)
if a:curline =~ '^\s*{.*}\s*$'
return 0
endif
for syn in a:syns
if syn ==? 'javaScriptTemplateString'
return 1
endif
endfor
return 0
endfunction
function! s:SynBlockBody(syn) function! s:SynBlockBody(syn)
return a:syn ==? 'svelteBlockBody' return a:syn ==? 'svelteBlockBody'
endfunction endfunction

View File

@@ -1029,9 +1029,6 @@ ignored_dirs:
filetypes: filetypes:
- name: markdown - name: markdown
linguist: Markdown linguist: Markdown
ignored_extensions:
# Handled by mdx extension
- mdx
ignored_warnings: ignored_warnings:
- '*.{md,mdx,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx}' - '*.{md,mdx,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,idea,cast,rc2,rc4,rc5,desx}'
--- ---
@@ -1237,7 +1234,7 @@ filetypes:
- pu - pu
--- ---
name: pony name: pony
remote: jakwings/vim-pony remote: dleonard0/pony-vim-syntax
filetypes: filetypes:
- name: pony - name: pony
linguist: Pony linguist: Pony
@@ -1253,6 +1250,12 @@ filetypes:
extensions: extensions:
- ps1xml - ps1xml
--- ---
name: prisma
remote: prisma/vim-prisma
filetypes:
- name: prisma
linguist: Prisma
---
name: protobuf name: protobuf
remote: uarun/vim-protobuf remote: uarun/vim-protobuf
filetypes: filetypes:
@@ -5475,7 +5478,7 @@ filetypes:
description: 'JSON with comments (https://komkom.github.io/)' description: 'JSON with comments (https://komkom.github.io/)'
--- ---
name: gleam name: gleam
remote: gleam-lang/gleam.vim remote: gleam-lang/gleam.vim@main
filetypes: filetypes:
- name: gleam - name: gleam
extensions: extensions:
@@ -5498,7 +5501,7 @@ filetypes:
description: Sway Configuration description: Sway Configuration
--- ---
name: just name: just
remote: NoahTheDuke/vim-just remote: NoahTheDuke/vim-just@main
filetypes: filetypes:
- name: just - name: just
patterns: patterns:

View File

@@ -5,7 +5,7 @@ endif
" Vim syntax file " Vim syntax file
" Language: Ansible YAML/Jinja templates " Language: Ansible YAML/Jinja templates
" Maintainer: Dave Honneffer <pearofducks@gmail.com> " Maintainer: Dave Honneffer <pearofducks@gmail.com>
" Last Change: 2018.02.08 " Last Change: 2023.10.29
if !exists("main_syntax") if !exists("main_syntax")
let main_syntax = 'yaml' let main_syntax = 'yaml'
@@ -103,6 +103,13 @@ if exists("g:ansible_extra_keywords_highlight")
endif endif
endif endif
execute 'syn keyword ansible_fqcn_keywords ansible builtin ansible.builtin. containedin='.s:yamlKey.' contained'
if exists("g:ansible_fqcn_highlight")
execute 'highlight link ansible_fqcn_keywords '.g:ansible_fqcn_highlight
else
highlight default link ansible_fqcn_keywords Statement
endif
execute 'syn keyword ansible_normal_keywords execute 'syn keyword ansible_normal_keywords
\ include include_role include_tasks include_vars import_role import_playbook import_tasks \ include include_role include_tasks include_vars import_role import_playbook import_tasks
\ when changed_when failed_when block rescue always notify listen register \ when changed_when failed_when block rescue always notify listen register

View File

@@ -31,9 +31,16 @@ syn match bicepResourceName /\h\w*/ nextgroup=bicepResourceString skipwhite
syn region bicepResourceString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=bicepStringInterp nextgroup=bicepExisting skipwhite syn region bicepResourceString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=bicepStringInterp nextgroup=bicepExisting skipwhite
syn keyword bicepExisting existing contained syn keyword bicepExisting existing contained
syn keyword bicepStatement module nextgroup=bicepModuleName skipwhite
syn match bicepModuleName /\h\w*/ nextgroup=bicepModuleString skipwhite contained
syn region bicepModuleString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=bicepStringInterp skipwhite
syn match bicepDecoratorName /@\s*\h\%(\w\|\.\)*/ contains=bicepDecorator syn match bicepDecoratorName /@\s*\h\%(\w\|\.\)*/ contains=bicepDecorator
syn match bicepDecorator /@/ contained syn match bicepDecorator /@/ contained
syn match bicepPreProc /#[-_a-zA-Z0-9]\+/ nextgroup=bicepPreProcArg skipwhite
syn match bicepPreProcArg /\w\+/ skipwhite contained nextgroup=bicepPreProcArg
syn region bicepComment start="/\*" end="\*/" contains=bicepTodo,@Spell syn region bicepComment start="/\*" end="\*/" contains=bicepTodo,@Spell
syn region bicepComment start="//" end="$" contains=bicepTodo,@Spell syn region bicepComment start="//" end="$" contains=bicepTodo,@Spell
syn keyword bicepTodo TODO FIXME XXX BUG contained syn keyword bicepTodo TODO FIXME XXX BUG contained
@@ -56,10 +63,14 @@ syn match bicepBraces /[{}\[\]]/
hi def link bicepDataType Type hi def link bicepDataType Type
hi def link bicepStatement Statement hi def link bicepStatement Statement
hi def link bicepResourceString String hi def link bicepResourceString String
hi def link bicepModuleString String
hi def link bicepExisting Label hi def link bicepExisting Label
hi def link bicepDecorator Define hi def link bicepDecorator Define
hi def link bicepPreProc PreProc
hi def link bicepPreProcArg Comment
hi def link bicepComment Comment hi def link bicepComment Comment
hi def link bicepTodo Todo hi def link bicepTodo Todo

View File

@@ -66,13 +66,16 @@ endif
unlet! s:key unlet! s:key
delfunction s:syntax_keyword delfunction s:syntax_keyword
syntax match clojureKeywordNs contained "\v[^ \n\r\t()\[\]{}";@^`~\\\/'#]+\ze\/"
syntax match clojureKeywordNsSeparator contained "/"
syntax match clojureKeywordNsColon contained "\v<:{1,2}"
" Keywords are symbols: " Keywords are symbols:
" static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)"); " static Pattern symbolPat = Pattern.compile("[:]?([\\D&&[^/]].*/)?([\\D&&[^/]][^/]*)");
" But they: " But they:
" * Must not end in a : or / " * Must not end in a : or /
" * Must not have two adjacent colons except at the beginning " * Must not have two adjacent colons except at the beginning
" * Must not contain any reader metacharacters except for ' and # " * Must not contain any reader metacharacters except for ' and #
syntax match clojureKeyword "\v<:{1,2}([^ \n\r\t()\[\]{}";@^`~\\/]+/)*[^ \n\r\t()\[\]{}";@^`~\\/]+:@1<!>" syntax match clojureKeyword "\v<:{1,2}([^ \n\r\t()\[\]{}";@^`~\\/]*/)*[^ \n\r\t()\[\]{}";@^`~\\/]*:@1<!>" contains=clojureKeywordNs,clojureKeywordNsSeparator,clojureKeywordNsColon
syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained syntax match clojureStringEscape "\v\\%([\\btnfr"]|u\x{4}|[0-3]\o{2}|\o{1,2})" contained
@@ -80,7 +83,9 @@ syntax region clojureString matchgroup=clojureStringDelimiter start=/"/ skip=/\\
syntax match clojureCharacter "\v\\%(o%([0-3]\o{2}|\o{1,2})|u\x{4}|newline|tab|space|return|backspace|formfeed|.)" syntax match clojureCharacter "\v\\%(o%([0-3]\o{2}|\o{1,2})|u\x{4}|newline|tab|space|return|backspace|formfeed|.)"
syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@1<!" syntax match clojureSymbolNs contained "\v[^ \n\r\t()\[\]{}";@^`~\\\/'#]+\ze\/"
syntax match clojureSymbolNsSeparator contained "/"
syntax match clojureSymbol "\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@1<!" contains=clojureSymbolNs,clojureSymbolNsSeparator
" NB. Correct matching of radix literals was removed for better performance. " NB. Correct matching of radix literals was removed for better performance.
syntax match clojureNumber "\v<[-+]?%(%([2-9]|[12]\d|3[0-6])[rR][[:alnum:]]+|%(0\o*|0x\x+|[1-9]\d*)N?|%(0|[1-9]\d*|%(0|[1-9]\d*)\.\d*)%(M|[eE][-+]?\d+)?|%(0|[1-9]\d*)/%(0|[1-9]\d*))>" syntax match clojureNumber "\v<[-+]?%(%([2-9]|[12]\d|3[0-6])[rR][[:alnum:]]+|%(0\o*|0x\x+|[1-9]\d*)N?|%(0|[1-9]\d*|%(0|[1-9]\d*)\.\d*)%(M|[eE][-+]?\d+)?|%(0|[1-9]\d*)/%(0|[1-9]\d*))>"
@@ -166,12 +171,17 @@ syntax sync fromstart
highlight default link clojureConstant Constant highlight default link clojureConstant Constant
highlight default link clojureBoolean Boolean highlight default link clojureBoolean Boolean
highlight default link clojureCharacter Character highlight default link clojureCharacter Character
highlight default link clojureKeyword Keyword
highlight default link clojureNumber Number highlight default link clojureNumber Number
highlight default link clojureString String highlight default link clojureString String
highlight default link clojureStringDelimiter String highlight default link clojureStringDelimiter String
highlight default link clojureStringEscape Character highlight default link clojureStringEscape Character
highlight default link clojureKeyword Keyword
highlight default link clojureKeywordNsColon clojureKeyword
highlight default link clojureKeywordNs clojureKeyword
highlight default link clojureSymbolNs clojureSymbol
highlight default link clojureRegexp Constant highlight default link clojureRegexp Constant
highlight default link clojureRegexpDelimiter Constant highlight default link clojureRegexpDelimiter Constant
highlight default link clojureRegexpEscape Character highlight default link clojureRegexpEscape Character

File diff suppressed because it is too large Load Diff

View File

@@ -3,11 +3,8 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'typescript', 'syntax/common.v
endif endif
" Define the default highlighting. " Define the default highlighting.
" For version 5.8 and later: only when an item doesn't have highlighting yet
let did_typescript_hilink = 1
syntax sync fromstart syntax sync fromstart
command -nargs=+ HiLink hi def link <args>
"Dollar sign is permitted anywhere in an identifier "Dollar sign is permitted anywhere in an identifier
setlocal iskeyword-=$ setlocal iskeyword-=$
@@ -25,15 +22,15 @@ syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=ty
syntax region typescriptBlock matchgroup=typescriptBraces start=/{/ end=/}/ contains=@typescriptStatement,@typescriptComments fold syntax region typescriptBlock matchgroup=typescriptBraces start=/{/ end=/}/ contains=@typescriptStatement,@typescriptComments fold
runtime syntax/basic/identifiers.vim runtime syntax/ts-common/identifiers.vim
runtime syntax/basic/literal.vim runtime syntax/ts-common/literal.vim
runtime syntax/basic/object.vim runtime syntax/ts-common/object.vim
runtime syntax/basic/symbols.vim runtime syntax/ts-common/symbols.vim
" runtime syntax/basic/reserved.vim " runtime syntax/ts-common/reserved.vim
runtime syntax/basic/keyword.vim runtime syntax/ts-common/keyword.vim
runtime syntax/basic/doc.vim runtime syntax/ts-common/doc.vim
runtime syntax/basic/type.vim runtime syntax/ts-common/type.vim
" extension " extension
if get(g:, 'yats_host_keyword', 1) if get(g:, 'yats_host_keyword', 1)
@@ -41,136 +38,133 @@ if get(g:, 'yats_host_keyword', 1)
endif endif
" patch " patch
runtime syntax/basic/patch.vim runtime syntax/ts-common/patch.vim
runtime syntax/basic/members.vim runtime syntax/ts-common/members.vim
runtime syntax/basic/class.vim runtime syntax/ts-common/class.vim
runtime syntax/basic/cluster.vim runtime syntax/ts-common/cluster.vim
runtime syntax/basic/function.vim runtime syntax/ts-common/function.vim
runtime syntax/basic/decorator.vim runtime syntax/ts-common/decorator.vim
if exists("did_typescript_hilink") hi def link typescriptReserved Error
HiLink typescriptReserved Error
HiLink typescriptEndColons Exception hi def link typescriptEndColons Exception
HiLink typescriptSymbols Normal hi def link typescriptSymbols Normal
HiLink typescriptBraces Function hi def link typescriptBraces Function
HiLink typescriptParens Normal hi def link typescriptParens Normal
HiLink typescriptComment Comment hi def link typescriptComment Comment
HiLink typescriptLineComment Comment hi def link typescriptLineComment Comment
HiLink typescriptDocComment Comment hi def link typescriptDocComment Comment
HiLink typescriptCommentTodo Todo hi def link typescriptCommentTodo Todo
HiLink typescriptMagicComment SpecialComment hi def link typescriptMagicComment SpecialComment
HiLink typescriptRef Include hi def link typescriptRef Include
HiLink typescriptDocNotation SpecialComment hi def link typescriptDocNotation SpecialComment
HiLink typescriptDocTags SpecialComment hi def link typescriptDocTags SpecialComment
HiLink typescriptDocNGParam typescriptDocParam hi def link typescriptDocNGParam typescriptDocParam
HiLink typescriptDocParam Function hi def link typescriptDocParam Function
HiLink typescriptDocNumParam Function hi def link typescriptDocNumParam Function
HiLink typescriptDocEventRef Function hi def link typescriptDocEventRef Function
HiLink typescriptDocNamedParamType Type hi def link typescriptDocNamedParamType Type
HiLink typescriptDocParamName Type hi def link typescriptDocParamName Type
HiLink typescriptDocParamType Type hi def link typescriptDocParamType Type
HiLink typescriptString String hi def link typescriptString String
HiLink typescriptSpecial Special hi def link typescriptSpecial Special
HiLink typescriptStringLiteralType String hi def link typescriptStringLiteralType String
HiLink typescriptTemplateLiteralType String hi def link typescriptTemplateLiteralType String
HiLink typescriptStringMember String hi def link typescriptStringMember String
HiLink typescriptTemplate String hi def link typescriptTemplate String
HiLink typescriptEventString String hi def link typescriptEventString String
HiLink typescriptDestructureString String hi def link typescriptDestructureString String
HiLink typescriptASCII Special hi def link typescriptASCII Special
HiLink typescriptTemplateSB Label hi def link typescriptTemplateSB Label
HiLink typescriptRegexpString String hi def link typescriptRegexpString String
HiLink typescriptGlobal Constant hi def link typescriptGlobal Constant
HiLink typescriptTestGlobal Function hi def link typescriptTestGlobal Function
HiLink typescriptPrototype Type hi def link typescriptPrototype Type
HiLink typescriptConditional Conditional hi def link typescriptConditional Conditional
HiLink typescriptConditionalElse Conditional hi def link typescriptConditionalElse Conditional
HiLink typescriptCase Conditional hi def link typescriptCase Conditional
HiLink typescriptDefault typescriptCase hi def link typescriptDefault typescriptCase
HiLink typescriptBranch Conditional hi def link typescriptBranch Conditional
HiLink typescriptIdentifier Structure hi def link typescriptIdentifier Structure
HiLink typescriptVariable Identifier hi def link typescriptVariable Identifier
HiLink typescriptDestructureVariable PreProc hi def link typescriptUsing Identifier
HiLink typescriptEnumKeyword Identifier hi def link typescriptDestructureVariable PreProc
HiLink typescriptRepeat Repeat hi def link typescriptEnumKeyword Identifier
HiLink typescriptForOperator Repeat hi def link typescriptRepeat Repeat
HiLink typescriptStatementKeyword Statement hi def link typescriptForOperator Repeat
HiLink typescriptMessage Keyword hi def link typescriptStatementKeyword Statement
HiLink typescriptOperator Identifier hi def link typescriptMessage Keyword
HiLink typescriptKeywordOp Identifier hi def link typescriptOperator Identifier
HiLink typescriptCastKeyword Special hi def link typescriptKeywordOp Identifier
HiLink typescriptType Type hi def link typescriptCastKeyword Special
HiLink typescriptNull Boolean hi def link typescriptType Type
HiLink typescriptNumber Number hi def link typescriptNull Boolean
HiLink typescriptBoolean Boolean hi def link typescriptNumber Number
HiLink typescriptObjectLabel typescriptLabel hi def link typescriptBoolean Boolean
HiLink typescriptDestructureLabel Function hi def link typescriptObjectLabel typescriptLabel
HiLink typescriptLabel Label hi def link typescriptDestructureLabel Function
HiLink typescriptTupleLable Label hi def link typescriptLabel Label
HiLink typescriptStringProperty String hi def link typescriptTupleLable Label
HiLink typescriptImport Special hi def link typescriptStringProperty String
HiLink typescriptImportType Special hi def link typescriptImport Special
HiLink typescriptAmbientDeclaration Special hi def link typescriptImportType Special
HiLink typescriptExport Special hi def link typescriptAmbientDeclaration Special
HiLink typescriptExportType Special hi def link typescriptExport Special
HiLink typescriptModule Special hi def link typescriptExportType Special
HiLink typescriptTry Special hi def link typescriptModule Special
HiLink typescriptExceptions Special hi def link typescriptTry Special
hi def link typescriptExceptions Special
HiLink typescriptMember Function hi def link typescriptMember Function
HiLink typescriptMethodAccessor Operator hi def link typescriptMethodAccessor Operator
HiLink typescriptAsyncFuncKeyword Keyword hi def link typescriptAsyncFuncKeyword Keyword
HiLink typescriptObjectAsyncKeyword Keyword hi def link typescriptObjectAsyncKeyword Keyword
HiLink typescriptAsyncFor Keyword hi def link typescriptAsyncFor Keyword
HiLink typescriptFuncKeyword Keyword hi def link typescriptFuncKeyword Keyword
HiLink typescriptAsyncFunc Keyword hi def link typescriptAsyncFunc Keyword
HiLink typescriptArrowFunc Type hi def link typescriptArrowFunc Type
HiLink typescriptFuncName Function hi def link typescriptFuncName Function
HiLink typescriptFuncArg PreProc hi def link typescriptFuncCallArg PreProc
HiLink typescriptArrowFuncArg PreProc hi def link typescriptArrowFuncArg PreProc
HiLink typescriptFuncComma Operator hi def link typescriptFuncComma Operator
HiLink typescriptClassKeyword Keyword hi def link typescriptClassKeyword Keyword
HiLink typescriptClassExtends Keyword hi def link typescriptClassExtends Keyword
" HiLink typescriptClassName Function " hi def link typescriptClassName Function
HiLink typescriptAbstract Special hi def link typescriptAbstract Special
" HiLink typescriptClassHeritage Function " hi def link typescriptClassHeritage Function
" HiLink typescriptInterfaceHeritage Function " hi def link typescriptInterfaceHeritage Function
HiLink typescriptClassStatic StorageClass hi def link typescriptClassStatic StorageClass
HiLink typescriptReadonlyModifier Keyword hi def link typescriptReadonlyModifier Keyword
HiLink typescriptInterfaceKeyword Keyword hi def link typescriptInterfaceKeyword Keyword
HiLink typescriptInterfaceExtends Keyword hi def link typescriptInterfaceExtends Keyword
HiLink typescriptInterfaceName Function hi def link typescriptInterfaceName Function
HiLink shellbang Comment hi def link shellbang Comment
HiLink typescriptTypeParameter Identifier hi def link typescriptTypeParameter Identifier
HiLink typescriptConstraint Keyword hi def link typescriptConstraint Keyword
HiLink typescriptPredefinedType Type hi def link typescriptPredefinedType Type
HiLink typescriptReadonlyArrayKeyword Keyword hi def link typescriptReadonlyArrayKeyword Keyword
HiLink typescriptUnion Operator hi def link typescriptUnion Operator
HiLink typescriptFuncTypeArrow Function hi def link typescriptFuncTypeArrow Function
HiLink typescriptConstructorType Function hi def link typescriptConstructorType Function
HiLink typescriptTypeQuery Keyword hi def link typescriptTypeQuery Keyword
HiLink typescriptAccessibilityModifier Keyword hi def link typescriptAccessibilityModifier Keyword
HiLink typescriptOptionalMark PreProc hi def link typescriptAutoAccessor Keyword
HiLink typescriptFuncType Special hi def link typescriptOptionalMark PreProc
HiLink typescriptMappedIn Special hi def link typescriptFuncType Special
HiLink typescriptCall PreProc hi def link typescriptMappedIn Special
HiLink typescriptParamImpl PreProc hi def link typescriptCall PreProc
HiLink typescriptConstructSignature Identifier hi def link typescriptParamImpl PreProc
HiLink typescriptAliasDeclaration Identifier hi def link typescriptConstructSignature Identifier
HiLink typescriptAliasKeyword Keyword hi def link typescriptAliasDeclaration Identifier
HiLink typescriptUserDefinedType Keyword hi def link typescriptAliasKeyword Keyword
HiLink typescriptTypeReference Identifier hi def link typescriptUserDefinedType Keyword
HiLink typescriptConstructor Keyword hi def link typescriptTypeReference Identifier
HiLink typescriptDecorator Special hi def link typescriptConstructor Keyword
HiLink typescriptAssertType Keyword hi def link typescriptDecorator Special
hi def link typescriptAssertType Keyword
highlight link typeScript NONE hi def link typeScript NONE
delcommand HiLink
unlet did_typescript_hilink
endif

View File

@@ -84,7 +84,7 @@ endif
" Operators " Operators
if exists('g:crystal_operators') if exists('g:crystal_operators')
syn match crystalOperator "[~!^&|*/%+-]\|<=>\|<=\|\%(<\|\<\%(class\|struct\)\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@1<!>\|\*\*\|\.\.\.\|\.\.\|::" syn match crystalOperator "[~!^&|*/%+-]\|<=>\|<=\|\%(<\|\<\%(class\|struct\)\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@1<!>\|\*\*\|\.\.\.\|\.\.\|::"
syn match crystalOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\|//" syn match crystalOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|\^=\|<<=\|>>=\|&+=\|&-=\|&\*=\|!\~\|!=\|//"
syn region crystalBracketOperator matchgroup=crystalOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[" end="]" contains=TOP syn region crystalBracketOperator matchgroup=crystalOperator start="\%(\w[?!]\=\|[]})]\)\@2<=\[" end="]" contains=TOP
endif endif

View File

@@ -18,60 +18,84 @@ syn case match
syn sync minlines=20 syn sync minlines=20
let g:cucumber_languages = { let g:cucumber_languages = {
\"en": {"and": "And\\>", "background": "Background\\>", "but": "But\\>", "examples": "Scenarios\\>\\|Examples\\>", "feature": "Business Need\\>\\|Feature\\>\\|Ability\\>", "given": "Given\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Template\\>\\|Scenario Outline\\>", "then": "Then\\>", "when": "When\\>"}, \"en": {"and": "And\\>", "background": "Background", "but": "But\\>", "examples": "Scenarios\\|Examples", "feature": "Business Need\\|Feature\\|Ability", "given": "Given\\>", "rule": "Rule", "scenario": "Scenario\\|Example", "scenario_outline": "Scenario Template\\|Scenario Outline", "then": "Then\\>", "when": "When\\>"},
\"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629\\>", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629\\>", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629\\>", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\>", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637\\>", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"}, \"af": {"and": "En\\>", "background": "Agtergrond", "but": "Maar\\>", "examples": "Voorbeelde", "feature": "Besigheid Behoefte\\|Funksie\\|Vermo\\%u00eb", "given": "Gegewe\\>", "rule": "Regel", "scenario": "Voorbeeld\\|Situasie", "scenario_outline": "Situasie Uiteensetting", "then": "Dan\\>", "when": "Wanneer\\>"},
\"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"}, \"am": {"and": "\\%u0535\\%u057e\\>", "background": "\\%u053f\\%u0578\\%u0576\\%u057f\\%u0565\\%u0584\\%u057d\\%u057f", "but": "\\%u0532\\%u0561\\%u0575\\%u0581\\>", "examples": "\\%u0555\\%u0580\\%u056b\\%u0576\\%u0561\\%u056f\\%u0576\\%u0565\\%u0580", "feature": "\\%u0556\\%u0578\\%u0582\\%u0576\\%u056f\\%u0581\\%u056b\\%u0578\\%u0576\\%u0561\\%u056c\\%u0578\\%u0582\\%u0569\\%u0575\\%u0578\\%u0582\\%u0576\\|\\%u0540\\%u0561\\%u057f\\%u056f\\%u0578\\%u0582\\%u0569\\%u0575\\%u0578\\%u0582\\%u0576", "given": "\\%u0534\\%u056b\\%u0581\\%u0578\\%u0582\\%u0584\\>", "rule": "Rule", "scenario": "\\%u0555\\%u0580\\%u056b\\%u0576\\%u0561\\%u056f\\|\\%u054d\\%u0581\\%u0565\\%u0576\\%u0561\\%u0580", "scenario_outline": "\\%u054d\\%u0581\\%u0565\\%u0576\\%u0561\\%u0580\\%u056b \\%u056f\\%u0561\\%u057c\\%u0578\\%u0582\\%u0581\\%u057e\\%u0561\\%u0581\\%u0584\\%u0568", "then": "\\%u0531\\%u057a\\%u0561\\>", "when": "\\%u0535\\%u0569\\%u0565\\>\\|\\%u0535\\%u0580\\%u0562\\>"},
\"bm": {"and": "Dan\\>", "background": "Latar Belakang\\>", "but": "Tetapi\\>", "examples": "Contoh \\>", "feature": "Fungsi\\>", "given": "Bagi\\>", "scenario": "Senario\\>", "scenario_outline": "Menggariskan Senario \\>", "then": "Kemudian\\>", "when": "Apabila\\>"}, \"amh": {"and": "\\%u12a5\\%u1293\\>", "background": "\\%u1245\\%u12f5\\%u1218 \\%u1201\\%u1294\\%u1273\\|\\%u1218\\%u1290\\%u123b \\%u1200\\%u1233\\%u1265\\|\\%u1218\\%u1290\\%u123b", "but": "\\%u130d\\%u1295\\>", "examples": "\\%u121d\\%u1233\\%u120c\\%u12ce\\%u127d\\|\\%u1201\\%u1293\\%u1274\\%u12ce\\%u127d", "feature": "\\%u12e8\\%u121a\\%u1348\\%u1208\\%u1308\\%u12cd \\%u12f5\\%u122d\\%u130a\\%u1275\\|\\%u12e8\\%u1270\\%u1348\\%u1208\\%u1308\\%u12cd \\%u1235\\%u122b\\|\\%u1235\\%u122b", "given": "\\%u12e8\\%u1270\\%u1230\\%u1320\\>", "rule": "\\%u1205\\%u130d", "scenario": "\\%u121d\\%u1233\\%u120c\\|\\%u1201\\%u1293\\%u1274", "scenario_outline": "\\%u1201\\%u1293\\%u1274 \\%u12dd\\%u122d\\%u12dd\\%u122d\\|\\%u1201\\%u1293\\%u1274 \\%u12a0\\%u1265\\%u1290\\%u1275", "then": "\\%u12a8\\%u12da\\%u12eb\\>", "when": "\\%u1218\\%u127c\\>"},
\"ca": {"and": "I\\>", "background": "Antecedents\\>\\|Rerefons\\>", "but": "Per\\%u00f2\\>", "examples": "Exemples\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalitat\\>", "given": "At\\%u00e8s\\>\\|Donada\\>\\|Donat\\>\\|Atesa\\>", "scenario": "Escenari\\>", "scenario_outline": "Esquema de l'escenari\\>", "then": "Aleshores\\>\\|Cal\\>", "when": "Quan\\>"}, \"an": {"and": "Y\\>\\|E\\>", "background": "Antecedents", "but": "Pero\\>", "examples": "Eixemplos", "feature": "Caracteristica", "given": "Dadas\\>\\|Dada\\>\\|Daus\\>\\|Dau\\>", "rule": "Rule", "scenario": "Eixemplo\\|Caso", "scenario_outline": "Esquema del caso", "then": "Antonces\\>\\|Alavez\\>\\|Allora\\>", "when": "Cuan\\>"},
\"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Pozad\\%u00ed\\>\\|Kontext\\>", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady\\>", "feature": "Po\\%u017eadavek\\>", "given": "Za p\\%u0159edpokladu\\>\\|Pokud\\>", "scenario": "Sc\\%u00e9n\\%u00e1\\%u0159\\>", "scenario_outline": "N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e\\>\\|Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\>", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"}, \"ar": {"and": "\\%u0648\\>", "background": "\\%u0627\\%u0644\\%u062e\\%u0644\\%u0641\\%u064a\\%u0629", "but": "\\%u0644\\%u0643\\%u0646\\>", "examples": "\\%u0627\\%u0645\\%u062b\\%u0644\\%u0629", "feature": "\\%u062e\\%u0627\\%u0635\\%u064a\\%u0629", "given": "\\%u0628\\%u0641\\%u0631\\%u0636\\>", "rule": "Rule", "scenario": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648\\|\\%u0645\\%u062b\\%u0627\\%u0644", "scenario_outline": "\\%u0633\\%u064a\\%u0646\\%u0627\\%u0631\\%u064a\\%u0648 \\%u0645\\%u062e\\%u0637\\%u0637", "then": "\\%u0627\\%u0630\\%u0627\\%u064b\\>\\|\\%u062b\\%u0645\\>", "when": "\\%u0639\\%u0646\\%u062f\\%u0645\\%u0627\\>\\|\\%u0645\\%u062a\\%u0649\\>"},
\"cy-GB": {"and": "A\\>", "background": "Cefndir\\>", "but": "Ond\\>", "examples": "Enghreifftiau\\>", "feature": "Arwedd\\>", "given": "Anrhegedig a\\>", "scenario": "Scenario\\>", "scenario_outline": "Scenario Amlinellol\\>", "then": "Yna\\>", "when": "Pryd\\>"}, \"ast": {"and": "Ya\\>\\|Y\\>", "background": "Antecedentes", "but": "Peru\\>", "examples": "Exemplos", "feature": "Carauter\\%u00edstica", "given": "Dada\\>\\|Daos\\>\\|Daes\\>\\|D\\%u00e1u\\>", "rule": "Rule", "scenario": "Exemplo\\|Casu", "scenario_outline": "Esbozu del casu", "then": "Ent\\%u00f3s\\>", "when": "Cuando\\>"},
\"da": {"and": "Og\\>", "background": "Baggrund\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskab\\>", "given": "Givet\\>", "scenario": "Scenarie\\>", "scenario_outline": "Abstrakt Scenario\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"}, \"az": {"and": "H\\%u0259m\\>\\|V\\%u0259\\>", "background": "Kontekst\\|Ke\\%u00e7mi\\%u015f", "but": "Ancaq\\>\\|Amma\\>", "examples": "N\\%u00fcmun\\%u0259l\\%u0259r", "feature": "\\%u00d6z\\%u0259llik", "given": "Tutaq ki\\>\\|Verilir\\>", "rule": "Rule", "scenario": "Ssenari\\|N\\%u00fcmun\\%u0259", "scenario_outline": "Ssenarinin strukturu", "then": "O halda\\>", "when": "N\\%u0259 vaxt ki\\>\\|\\%u018fg\\%u0259r\\>"},
\"de": {"and": "Und\\>", "background": "Grundlage\\>", "but": "Aber\\>", "examples": "Beispiele\\>", "feature": "Funktionalit\\%u00e4t\\>", "given": "Gegeben sei\\>\\|Angenommen\\>", "scenario": "Szenario\\>", "scenario_outline": "Szenariogrundriss\\>", "then": "Dann\\>", "when": "Wenn\\>"}, \"bg": {"and": "\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u0438\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>", "rule": "\\%u041f\\%u0440\\%u0430\\%u0432\\%u0438\\%u043b\\%u043e", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440", "scenario_outline": "\\%u0420\\%u0430\\%u043c\\%u043a\\%u0430 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "then": "\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\%u0442\\%u043e\\>"},
\"el": {"and": "\\%u039a\\%u03b1\\%u03b9\\>", "background": "\\%u03a5\\%u03c0\\%u03cc\\%u03b2\\%u03b1\\%u03b8\\%u03c1\\%u03bf\\>", "but": "\\%u0391\\%u03bb\\%u03bb\\%u03ac\\>", "examples": "\\%u03a0\\%u03b1\\%u03c1\\%u03b1\\%u03b4\\%u03b5\\%u03af\\%u03b3\\%u03bc\\%u03b1\\%u03c4\\%u03b1\\>\\|\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03b1\\>", "feature": "\\%u0394\\%u03c5\\%u03bd\\%u03b1\\%u03c4\\%u03cc\\%u03c4\\%u03b7\\%u03c4\\%u03b1\\>\\|\\%u039b\\%u03b5\\%u03b9\\%u03c4\\%u03bf\\%u03c5\\%u03c1\\%u03b3\\%u03af\\%u03b1\\>", "given": "\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5 \\%u03cc\\%u03c4\\%u03b9\\>\\|\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5\\>", "scenario": "\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03bf\\>", "scenario_outline": "\\%u03a0\\%u03b5\\%u03c1\\%u03b9\\%u03b3\\%u03c1\\%u03b1\\%u03c6\\%u03ae \\%u03a3\\%u03b5\\%u03bd\\%u03b1\\%u03c1\\%u03af\\%u03bf\\%u03c5\\>", "then": "\\%u03a4\\%u03cc\\%u03c4\\%u03b5\\>", "when": "\\%u038c\\%u03c4\\%u03b1\\%u03bd\\>"}, \"bm": {"and": "Dan\\>", "background": "Latar Belakang", "but": "Tetapi\\>\\|Tapi\\>", "examples": "Contoh", "feature": "Fungsi", "given": "Diberi\\>\\|Bagi\\>", "rule": "Rule", "scenario": "Senario\\|Situasi\\|Keadaan", "scenario_outline": "Garis Panduan Senario\\|Kerangka Senario\\|Kerangka Situasi\\|Kerangka Keadaan", "then": "Kemudian\\>\\|Maka\\>", "when": "Apabila\\>"},
\"en-Scouse": {"and": "An\\>", "background": "Dis is what went down\\>", "but": "Buh\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Youse know when youse got\\>\\|Givun\\>", "scenario": "The thing of it is\\>", "scenario_outline": "Wharrimean is\\>", "then": "Den youse gotta\\>\\|Dun\\>", "when": "Youse know like when\\>\\|Wun\\>"}, \"bs": {"and": "I\\>\\|A\\>", "background": "Pozadina", "but": "Ali\\>", "examples": "Primjeri", "feature": "Karakteristika", "given": "Dato\\>", "rule": "Rule", "scenario": "Scenariju\\|Scenario\\|Primjer", "scenario_outline": "Scenario-outline\\|Scenariju-obris", "then": "Zatim\\>", "when": "Kada\\>"},
\"en-au": {"and": "Too right\\>", "background": "First off\\>", "but": "Yeah nah\\>", "examples": "You'll wanna\\>", "feature": "Pretty much\\>", "given": "Y'know\\>", "scenario": "Awww, look mate\\>", "scenario_outline": "Reckon it's like\\>", "then": "But at the end of the day I reckon\\>", "when": "It's just unbelievable\\>"}, \"ca": {"and": "I\\>", "background": "Antecedents\\|Rerefons", "but": "Per\\%u00f2\\>", "examples": "Exemples", "feature": "Caracter\\%u00edstica\\|Funcionalitat", "given": "Donada\\>\\|Donat\\>\\|Atesa\\>\\|At\\%u00e8s\\>", "rule": "Rule", "scenario": "Escenari\\|Exemple", "scenario_outline": "Esquema de l'escenari", "then": "Aleshores\\>\\|Cal\\>", "when": "Quan\\>"},
\"en-lol": {"and": "AN\\>", "background": "B4\\>", "but": "BUT\\>", "examples": "EXAMPLZ\\>", "feature": "OH HAI\\>", "given": "I CAN HAZ\\>", "scenario": "MISHUN\\>", "scenario_outline": "MISHUN SRSLY\\>", "then": "DEN\\>", "when": "WEN\\>"}, \"cs": {"and": "A tak\\%u00e9\\>\\|A\\>", "background": "Kontext\\|Pozad\\%u00ed", "but": "Ale\\>", "examples": "P\\%u0159\\%u00edklady", "feature": "Po\\%u017eadavek", "given": "Za p\\%u0159edpokladu\\>\\|Pokud\\>", "rule": "Pravidlo", "scenario": "P\\%u0159\\%u00edklad\\|Sc\\%u00e9n\\%u00e1\\%u0159", "scenario_outline": "Osnova sc\\%u00e9n\\%u00e1\\%u0159e\\|N\\%u00e1\\%u010drt Sc\\%u00e9n\\%u00e1\\%u0159e", "then": "Pak\\>", "when": "Kdy\\%u017e\\>"},
\"en-old": {"and": "Ond\\>\\|7\\>", "background": "\\%u00c6r\\>\\|Aer\\>", "but": "Ac\\>", "examples": "Se \\%u00f0e\\>\\|Se \\%u00fee\\>\\|Se the\\>", "feature": "Hw\\%u00e6t\\>\\|Hwaet\\>", "given": "\\%u00d0urh\\>\\|\\%u00deurh\\>\\|Thurh\\>", "scenario": "Swa\\>", "scenario_outline": "Swa hw\\%u00e6r swa\\>\\|Swa hwaer swa\\>", "then": "\\%u00d0a \\%u00f0e\\>\\|\\%u00dea \\%u00fee\\>\\|\\%u00dea\\>\\|\\%u00d0a\\>\\|Tha the\\>\\|Tha\\>", "when": "\\%u00d0a\\>\\|\\%u00dea\\>\\|Tha\\>"}, \"cy-GB": {"and": "A\\>", "background": "Cefndir", "but": "Ond\\>", "examples": "Enghreifftiau", "feature": "Arwedd", "given": "Anrhegedig a\\>", "rule": "Rule", "scenario": "Enghraifft\\|Scenario", "scenario_outline": "Scenario Amlinellol", "then": "Yna\\>", "when": "Pryd\\>"},
\"en-pirate": {"and": "Aye\\>", "background": "Yo-ho-ho\\>", "but": "Avast!\\>", "examples": "Dead men tell no tales\\>", "feature": "Ahoy matey!\\>", "given": "Gangway!\\>", "scenario": "Heave to\\>", "scenario_outline": "Shiver me timbers\\>", "then": "Let go and haul\\>", "when": "Blimey!\\>"}, \"da": {"and": "Og\\>", "background": "Baggrund", "but": "Men\\>", "examples": "Eksempler", "feature": "Egenskab", "given": "Givet\\>", "rule": "Rule", "scenario": "Eksempel\\|Scenarie", "scenario_outline": "Abstrakt Scenario", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
\"en-tx": {"and": "And y'all\\>", "background": "Background\\>", "but": "But y'all\\>", "examples": "Examples\\>", "feature": "Feature\\>", "given": "Given y'all\\>", "scenario": "Scenario\\>", "scenario_outline": "All y'all\\>", "then": "Then y'all\\>", "when": "When y'all\\>"}, \"de": {"and": "Und\\>", "background": "Voraussetzungen\\|Vorbedingungen\\|Hintergrund\\|Grundlage", "but": "Aber\\>", "examples": "Beispiele", "feature": "Funktionalit\\%u00e4t\\|Funktion", "given": "Gegeben seien\\>\\|Gegeben sei\\>\\|Angenommen\\>", "rule": "Regel\\|Rule", "scenario": "Beispiel\\|Szenario", "scenario_outline": "Szenariogrundriss\\|Szenarien", "then": "Dann\\>", "when": "Wenn\\>"},
\"eo": {"and": "Kaj\\>", "background": "Fono\\>", "but": "Sed\\>", "examples": "Ekzemploj\\>", "feature": "Trajto\\>", "given": "Donita\\%u0135o\\>", "scenario": "Scenaro\\>", "scenario_outline": "Konturo de la scenaro\\>", "then": "Do\\>", "when": "Se\\>"}, \"el": {"and": "\\%u039a\\%u03b1\\%u03b9\\>", "background": "\\%u03a5\\%u03c0\\%u03cc\\%u03b2\\%u03b1\\%u03b8\\%u03c1\\%u03bf", "but": "\\%u0391\\%u03bb\\%u03bb\\%u03ac\\>", "examples": "\\%u03a0\\%u03b1\\%u03c1\\%u03b1\\%u03b4\\%u03b5\\%u03af\\%u03b3\\%u03bc\\%u03b1\\%u03c4\\%u03b1\\|\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03b1", "feature": "\\%u0394\\%u03c5\\%u03bd\\%u03b1\\%u03c4\\%u03cc\\%u03c4\\%u03b7\\%u03c4\\%u03b1\\|\\%u039b\\%u03b5\\%u03b9\\%u03c4\\%u03bf\\%u03c5\\%u03c1\\%u03b3\\%u03af\\%u03b1", "given": "\\%u0394\\%u03b5\\%u03b4\\%u03bf\\%u03bc\\%u03ad\\%u03bd\\%u03bf\\%u03c5\\>", "rule": "Rule", "scenario": "\\%u03a0\\%u03b1\\%u03c1\\%u03ac\\%u03b4\\%u03b5\\%u03b9\\%u03b3\\%u03bc\\%u03b1\\|\\%u03a3\\%u03b5\\%u03bd\\%u03ac\\%u03c1\\%u03b9\\%u03bf", "scenario_outline": "\\%u03a0\\%u03b5\\%u03c1\\%u03af\\%u03b3\\%u03c1\\%u03b1\\%u03bc\\%u03bc\\%u03b1 \\%u03a3\\%u03b5\\%u03bd\\%u03b1\\%u03c1\\%u03af\\%u03bf\\%u03c5\\|\\%u03a0\\%u03b5\\%u03c1\\%u03b9\\%u03b3\\%u03c1\\%u03b1\\%u03c6\\%u03ae \\%u03a3\\%u03b5\\%u03bd\\%u03b1\\%u03c1\\%u03af\\%u03bf\\%u03c5", "then": "\\%u03a4\\%u03cc\\%u03c4\\%u03b5\\>", "when": "\\%u038c\\%u03c4\\%u03b1\\%u03bd\\>"},
\"es": {"and": "Y\\>", "background": "Antecedentes\\>", "but": "Pero\\>", "examples": "Ejemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esquema del escenario\\>", "then": "Entonces\\>", "when": "Cuando\\>"}, \"em": {"and": "\\%u1f602", "background": "\\%u1f4a4", "but": "\\%u1f614", "examples": "\\%u1f4d3", "feature": "\\%u1f4da", "given": "\\%u1f610", "rule": "Rule", "scenario": "\\%u1f952\\|\\%u1f4d5", "scenario_outline": "\\%u1f4d6", "then": "\\%u1f64f", "when": "\\%u1f3ac"},
\"et": {"and": "Ja\\>", "background": "Taust\\>", "but": "Kuid\\>", "examples": "Juhtumid\\>", "feature": "Omadus\\>", "given": "Eeldades\\>", "scenario": "Stsenaarium\\>", "scenario_outline": "Raamstsenaarium\\>", "then": "Siis\\>", "when": "Kui\\>"}, \"en-Scouse": {"and": "An\\>", "background": "Dis is what went down", "but": "Buh\\>", "examples": "Examples", "feature": "Feature", "given": "Youse know when youse got\\>\\|Givun\\>", "rule": "Rule", "scenario": "The thing of it is", "scenario_outline": "Wharrimean is", "then": "Den youse gotta\\>\\|Dun\\>", "when": "Youse know like when\\>\\|Wun\\>"},
\"fa": {"and": "\\%u0648\\>", "background": "\\%u0632\\%u0645\\%u06cc\\%u0646\\%u0647\\>", "but": "\\%u0627\\%u0645\\%u0627\\>", "examples": "\\%u0646\\%u0645\\%u0648\\%u0646\\%u0647 \\%u0647\\%u0627\\>", "feature": "\\%u0648\\%u0650\\%u06cc\\%u0698\\%u06af\\%u06cc\\>", "given": "\\%u0628\\%u0627 \\%u0641\\%u0631\\%u0636\\>", "scenario": "\\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "scenario_outline": "\\%u0627\\%u0644\\%u06af\\%u0648\\%u06cc \\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\>", "then": "\\%u0622\\%u0646\\%u06af\\%u0627\\%u0647\\>", "when": "\\%u0647\\%u0646\\%u06af\\%u0627\\%u0645\\%u06cc\\>"}, \"en-au": {"and": "Too right\\>", "background": "First off", "but": "Yeah nah\\>", "examples": "You'll wanna", "feature": "Pretty much", "given": "Y'know\\>", "rule": "Rule", "scenario": "Awww, look mate", "scenario_outline": "Reckon it's like", "then": "But at the end of the day I reckon\\>", "when": "It's just unbelievable\\>"},
\"fi": {"and": "Ja\\>", "background": "Tausta\\>", "but": "Mutta\\>", "examples": "Tapaukset\\>", "feature": "Ominaisuus\\>", "given": "Oletetaan\\>", "scenario": "Tapaus\\>", "scenario_outline": "Tapausaihio\\>", "then": "Niin\\>", "when": "Kun\\>"}, \"en-lol": {"and": "AN\\>", "background": "B4", "but": "BUT\\>", "examples": "EXAMPLZ", "feature": "OH HAI", "given": "I CAN HAZ\\>", "rule": "Rule", "scenario": "MISHUN", "scenario_outline": "MISHUN SRSLY", "then": "DEN\\>", "when": "WEN\\>"},
\"fr": {"and": "Et\\>", "background": "Contexte\\>", "but": "Mais\\>", "examples": "Exemples\\>", "feature": "Fonctionnalit\\%u00e9\\>", "given": "\\%u00c9tant donn\\%u00e9es\\>\\|\\%u00c9tant donn\\%u00e9s\\>\\|\\%u00c9tant donn\\%u00e9e\\>\\|\\%u00c9tant donn\\%u00e9\\>\\|Etant donn\\%u00e9es\\>\\|Etant donn\\%u00e9s\\>\\|Etant donn\\%u00e9e\\>\\|Etant donn\\%u00e9\\>\\|Soit\\>", "scenario": "Sc\\%u00e9nario\\>", "scenario_outline": "Plan du sc\\%u00e9nario\\>\\|Plan du Sc\\%u00e9nario\\>", "then": "Alors\\>", "when": "Lorsqu'\\|Lorsque\\>\\|Quand\\>"}, \"en-old": {"and": "Ond\\>\\|7\\>", "background": "Aer\\|\\%u00c6r", "but": "Ac\\>", "examples": "Se the\\|Se \\%u00fee\\|Se \\%u00f0e", "feature": "Hwaet\\|Hw\\%u00e6t", "given": "Thurh\\>\\|\\%u00deurh\\>\\|\\%u00d0urh\\>", "rule": "Rule", "scenario": "Swa", "scenario_outline": "Swa hwaer swa\\|Swa hw\\%u00e6r swa", "then": "Tha the\\>\\|\\%u00dea \\%u00fee\\>\\|\\%u00d0a \\%u00f0e\\>\\|Tha\\>\\|\\%u00dea\\>\\|\\%u00d0a\\>", "when": "B\\%u00e6\\%u00fesealfa\\>\\|B\\%u00e6\\%u00fesealfe\\>\\|B\\%u00e6\\%u00fesealf\\>\\|Ciric\\%u00e6we\\>\\|Ciric\\%u00e6wa\\>\\|Ciric\\%u00e6w\\>"},
\"gl": {"and": "E\\>", "background": "Contexto\\>", "but": "Mais\\>\\|Pero\\>", "examples": "Exemplos\\>", "feature": "Caracter\\%u00edstica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Escenario\\>", "scenario_outline": "Esbozo do escenario\\>", "then": "Ent\\%u00f3n\\>\\|Logo\\>", "when": "Cando\\>"}, \"en-pirate": {"and": "Aye\\>", "background": "Yo-ho-ho", "but": "Avast!\\>", "examples": "Dead men tell no tales", "feature": "Ahoy matey!", "given": "Gangway!\\>", "rule": "Rule", "scenario": "Heave to", "scenario_outline": "Shiver me timbers", "then": "Let go and haul\\>", "when": "Blimey!\\>"},
\"he": {"and": "\\%u05d5\\%u05d2\\%u05dd\\>", "background": "\\%u05e8\\%u05e7\\%u05e2\\>", "but": "\\%u05d0\\%u05d1\\%u05dc\\>", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea\\>", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4\\>", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df\\>", "scenario": "\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9\\>", "then": "\\%u05d0\\%u05d6\\%u05d9\\>\\|\\%u05d0\\%u05d6\\>", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8\\>"}, \"en-tx": {"and": "Come hell or high water\\>", "background": "Lemme tell y'all a story", "but": "Well now hold on, I'll you what\\>", "examples": "Now that's a story longer than a cattle drive in July", "feature": "This ain\\%u2019t my first rodeo\\|All gussied up", "given": "All git out\\>\\|Fixin' to\\>", "rule": "Rule\\>", "scenario": "All hat and no cattle", "scenario_outline": "Busy as a hound in flea season\\|Serious as a snake bite", "then": "There\\%u2019s no tree but bears some fruit\\>", "when": "Quick out of the chute\\>"},
\"hi": {"and": "\\%u0924\\%u0925\\%u093e\\>\\|\\%u0914\\%u0930\\>", "background": "\\%u092a\\%u0943\\%u0937\\%u094d\\%u0920\\%u092d\\%u0942\\%u092e\\%u093f\\>", "but": "\\%u092a\\%u0930\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923\\>", "feature": "\\%u0930\\%u0942\\%u092a \\%u0932\\%u0947\\%u0916\\>", "given": "\\%u091a\\%u0942\\%u0902\\%u0915\\%u093f\\>\\|\\%u092f\\%u0926\\%u093f\\>\\|\\%u0905\\%u0917\\%u0930\\>", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f\\>", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e\\>", "then": "\\%u0924\\%u092c\\>", "when": "\\%u091c\\%u092c\\>"}, \"eo": {"and": "Kaj\\>", "background": "Fono", "but": "Sed\\>", "examples": "Ekzemploj", "feature": "Trajto", "given": "Donita\\%u0135o\\>\\|Komence\\>", "rule": "Rule", "scenario": "Ekzemplo\\|Scenaro\\|Kazo", "scenario_outline": "Konturo de la scenaro\\|Kazo-skizo\\|Skizo", "then": "Do\\>", "when": "Se\\>"},
\"hr": {"and": "I\\>", "background": "Pozadina\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primjeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadano\\>\\|Zadani\\>\\|Zadan\\>", "scenario": "Scenarij\\>", "scenario_outline": "Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"}, \"es": {"and": "Y\\>\\|E\\>", "background": "Antecedentes", "but": "Pero\\>", "examples": "Ejemplos", "feature": "Necesidad del negocio\\|Caracter\\%u00edstica\\|Requisito", "given": "Dados\\>\\|Dadas\\>\\|Dado\\>\\|Dada\\>", "rule": "Regla de negocio\\|Regla", "scenario": "Escenario\\|Ejemplo", "scenario_outline": "Esquema del escenario", "then": "Entonces\\>", "when": "Cuando\\>"},
\"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r\\>", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k\\>", "feature": "Jellemz\\%u0151\\>", "given": "Amennyiben\\>\\|Adott\\>", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\>", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat\\>", "then": "Akkor\\>", "when": "Amikor\\>\\|Majd\\>\\|Ha\\>"}, \"et": {"and": "Ja\\>", "background": "Taust", "but": "Kuid\\>", "examples": "Juhtumid", "feature": "Omadus", "given": "Eeldades\\>", "rule": "Reegel", "scenario": "Stsenaarium\\|Juhtum", "scenario_outline": "Raamstsenaarium\\|Raamjuhtum", "then": "Siis\\>", "when": "Kui\\>"},
\"id": {"and": "Dan\\>", "background": "Dasar\\>", "but": "Tapi\\>", "examples": "Contoh\\>", "feature": "Fitur\\>", "given": "Dengan\\>", "scenario": "Skenario\\>", "scenario_outline": "Skenario konsep\\>", "then": "Maka\\>", "when": "Ketika\\>"}, \"fa": {"and": "\\%u0648\\>", "background": "\\%u0632\\%u0645\\%u06cc\\%u0646\\%u0647", "but": "\\%u0627\\%u0645\\%u0627\\>", "examples": "\\%u0646\\%u0645\\%u0648\\%u0646\\%u0647 \\%u0647\\%u0627", "feature": "\\%u0648\\%u0650\\%u06cc\\%u0698\\%u06af\\%u06cc", "given": "\\%u0628\\%u0627 \\%u0641\\%u0631\\%u0636\\>", "rule": "Rule", "scenario": "\\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648\\|\\%u0645\\%u062b\\%u0627\\%u0644", "scenario_outline": "\\%u0627\\%u0644\\%u06af\\%u0648\\%u06cc \\%u0633\\%u0646\\%u0627\\%u0631\\%u06cc\\%u0648", "then": "\\%u0622\\%u0646\\%u06af\\%u0627\\%u0647\\>", "when": "\\%u0647\\%u0646\\%u06af\\%u0627\\%u0645\\%u06cc\\>"},
\"is": {"and": "Og\\>", "background": "Bakgrunnur\\>", "but": "En\\>", "examples": "Atbur\\%u00f0ar\\%u00e1sir\\>\\|D\\%u00e6mi\\>", "feature": "Eiginleiki\\>", "given": "Ef\\>", "scenario": "Atbur\\%u00f0ar\\%u00e1s\\>", "scenario_outline": "L\\%u00fdsing Atbur\\%u00f0ar\\%u00e1sar\\>\\|L\\%u00fdsing D\\%u00e6ma\\>", "then": "\\%u00de\\%u00e1\\>", "when": "\\%u00deegar\\>"}, \"fi": {"and": "Ja\\>", "background": "Tausta", "but": "Mutta\\>", "examples": "Tapaukset", "feature": "Ominaisuus", "given": "Oletetaan\\>", "rule": "Rule", "scenario": "Tapaus", "scenario_outline": "Tapausaihio", "then": "Niin\\>", "when": "Kun\\>"},
\"it": {"and": "E\\>", "background": "Contesto\\>", "but": "Ma\\>", "examples": "Esempi\\>", "feature": "Funzionalit\\%u00e0\\>", "given": "Dato\\>\\|Data\\>\\|Dati\\>\\|Date\\>", "scenario": "Scenario\\>", "scenario_outline": "Schema dello scenario\\>", "then": "Allora\\>", "when": "Quando\\>"}, \"fr": {"and": "Et que\\>\\|Et qu'\\|Et\\>", "background": "Contexte", "but": "Mais que\\>\\|Mais qu'\\|Mais\\>", "examples": "Exemples", "feature": "Fonctionnalit\\%u00e9", "given": "Etant donn\\%u00e9 que\\>\\|\\%u00c9tant donn\\%u00e9 que\\>\\|Etant donn\\%u00e9 qu'\\|\\%u00c9tant donn\\%u00e9 qu'\\|Etant donn\\%u00e9es\\>\\|\\%u00c9tant donn\\%u00e9es\\>\\|Etant donn\\%u00e9e\\>\\|Etant donn\\%u00e9s\\>\\|\\%u00c9tant donn\\%u00e9e\\>\\|\\%u00c9tant donn\\%u00e9s\\>\\|Sachant que\\>\\|Etant donn\\%u00e9\\>\\|\\%u00c9tant donn\\%u00e9\\>\\|Sachant qu'\\|Sachant\\>\\|Soit\\>", "rule": "R\\%u00e8gle", "scenario": "Sc\\%u00e9nario\\|Exemple", "scenario_outline": "Plan du sc\\%u00e9nario\\|Plan du Sc\\%u00e9nario", "then": "Alors\\>\\|Donc\\>", "when": "Lorsque\\>\\|Lorsqu'\\|Quand\\>"},
\"ja": {"and": "\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\>\\|\\%u4f8b\\>", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\>\\|\\%u6a5f\\%u80fd\\>", "given": "\\%u524d\\%u63d0", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\>", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\>\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\>", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"}, \"ga": {"and": "Agus", "background": "C\\%u00falra", "but": "Ach", "examples": "Sampla\\%u00ed", "feature": "Gn\\%u00e9", "given": "Cuir i gc\\%u00e1s nach\\|Cuir i gc\\%u00e1s gur\\|Cuir i gc\\%u00e1s n\\%u00e1r\\|Cuir i gc\\%u00e1s go", "rule": "Rule", "scenario": "Sampla\\|C\\%u00e1s", "scenario_outline": "C\\%u00e1s Achomair", "then": "Ansin", "when": "Nuair nach\\|Nuair n\\%u00e1r\\|Nuair ba\\|Nuair a"},
\"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd\\>", "but": "\\%ud558\\%uc9c0\\%ub9cc\\|\\%ub2e8", "examples": "\\%uc608\\>", "feature": "\\%uae30\\%ub2a5\\>", "given": "\\%uc870\\%uac74\\|\\%uba3c\\%uc800", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624\\>", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694\\>", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c\\|\\%ub9cc\\%uc57d"}, \"gj": {"and": "\\%u0a85\\%u0aa8\\%u0ac7\\>", "background": "\\%u0aac\\%u0ac7\\%u0a95\\%u0a97\\%u0acd\\%u0ab0\\%u0abe\\%u0a89\\%u0aa8\\%u0acd\\%u0aa1", "but": "\\%u0aaa\\%u0aa3\\>", "examples": "\\%u0a89\\%u0aa6\\%u0abe\\%u0ab9\\%u0ab0\\%u0aa3\\%u0acb", "feature": "\\%u0ab5\\%u0acd\\%u0aaf\\%u0abe\\%u0aaa\\%u0abe\\%u0ab0 \\%u0a9c\\%u0ab0\\%u0ac2\\%u0ab0\\|\\%u0a95\\%u0acd\\%u0ab7\\%u0aae\\%u0aa4\\%u0abe\\|\\%u0ab2\\%u0a95\\%u0acd\\%u0ab7\\%u0aa3", "given": "\\%u0a86\\%u0aaa\\%u0ac7\\%u0ab2 \\%u0a9b\\%u0ac7\\>", "rule": "Rule", "scenario": "\\%u0a89\\%u0aa6\\%u0abe\\%u0ab9\\%u0ab0\\%u0aa3\\|\\%u0ab8\\%u0acd\\%u0aa5\\%u0abf\\%u0aa4\\%u0abf", "scenario_outline": "\\%u0aaa\\%u0ab0\\%u0abf\\%u0aa6\\%u0acd\\%u0aa6\\%u0ab6\\%u0acd\\%u0aaf \\%u0ab0\\%u0ac2\\%u0aaa\\%u0ab0\\%u0ac7\\%u0a96\\%u0abe\\|\\%u0aaa\\%u0ab0\\%u0abf\\%u0aa6\\%u0acd\\%u0aa6\\%u0ab6\\%u0acd\\%u0aaf \\%u0aa2\\%u0abe\\%u0a82\\%u0a9a\\%u0acb", "then": "\\%u0aaa\\%u0a9b\\%u0ac0\\>", "when": "\\%u0a95\\%u0acd\\%u0aaf\\%u0abe\\%u0ab0\\%u0ac7\\>"},
\"lt": {"and": "Ir\\>", "background": "Kontekstas\\>", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\>\\|Scenarijai\\>\\|Variantai\\>", "feature": "Savyb\\%u0117\\>", "given": "Duota\\>", "scenario": "Scenarijus\\>", "scenario_outline": "Scenarijaus \\%u0161ablonas\\>", "then": "Tada\\>", "when": "Kai\\>"}, \"gl": {"and": "E\\>", "background": "Contexto", "but": "Mais\\>\\|Pero\\>", "examples": "Exemplos", "feature": "Caracter\\%u00edstica", "given": "Dados\\>\\|Dadas\\>\\|Dado\\>\\|Dada\\>", "rule": "Rule", "scenario": "Escenario\\|Exemplo", "scenario_outline": "Esbozo do escenario", "then": "Ent\\%u00f3n\\>\\|Logo\\>", "when": "Cando\\>"},
\"lu": {"and": "an\\>\\|a\\>", "background": "Hannergrond\\>", "but": "m\\%u00e4\\>\\|awer\\>", "examples": "Beispiller\\>", "feature": "Funktionalit\\%u00e9it\\>", "given": "ugeholl\\>", "scenario": "Szenario\\>", "scenario_outline": "Plang vum Szenario\\>", "then": "dann\\>", "when": "wann\\>"}, \"he": {"and": "\\%u05d5\\%u05d2\\%u05dd\\>", "background": "\\%u05e8\\%u05e7\\%u05e2", "but": "\\%u05d0\\%u05d1\\%u05dc\\>", "examples": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\%u05d5\\%u05ea", "feature": "\\%u05ea\\%u05db\\%u05d5\\%u05e0\\%u05d4", "given": "\\%u05d1\\%u05d4\\%u05d9\\%u05e0\\%u05ea\\%u05df\\>", "rule": "\\%u05db\\%u05dc\\%u05dc", "scenario": "\\%u05d3\\%u05d5\\%u05d2\\%u05de\\%u05d0\\|\\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9", "scenario_outline": "\\%u05ea\\%u05d1\\%u05e0\\%u05d9\\%u05ea \\%u05ea\\%u05e8\\%u05d7\\%u05d9\\%u05e9", "then": "\\%u05d0\\%u05d6\\%u05d9\\>\\|\\%u05d0\\%u05d6\\>", "when": "\\%u05db\\%u05d0\\%u05e9\\%u05e8\\>"},
\"lv": {"and": "Un\\>", "background": "Situ\\%u0101cija\\>\\|Konteksts\\>", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\>\\|Paraugs\\>", "feature": "Funkcionalit\\%u0101te\\>\\|F\\%u012b\\%u010da\\>", "given": "Kad\\>", "scenario": "Scen\\%u0101rijs\\>", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga\\>", "then": "Tad\\>", "when": "Ja\\>"}, \"hi": {"and": "\\%u0924\\%u0925\\%u093e\\>\\|\\%u0914\\%u0930\\>", "background": "\\%u092a\\%u0943\\%u0937\\%u094d\\%u0920\\%u092d\\%u0942\\%u092e\\%u093f", "but": "\\%u092a\\%u0930\\%u0928\\%u094d\\%u0924\\%u0941\\>\\|\\%u0915\\%u093f\\%u0928\\%u094d\\%u0924\\%u0941\\>\\|\\%u092a\\%u0930\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923", "feature": "\\%u0930\\%u0942\\%u092a \\%u0932\\%u0947\\%u0916", "given": "\\%u091a\\%u0942\\%u0902\\%u0915\\%u093f\\>\\|\\%u0905\\%u0917\\%u0930\\>\\|\\%u092f\\%u0926\\%u093f\\>", "rule": "\\%u0928\\%u093f\\%u092f\\%u092e", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e", "then": "\\%u0924\\%u0926\\%u093e\\>\\|\\%u0924\\%u092c\\>", "when": "\\%u0915\\%u0926\\%u093e\\>\\|\\%u091c\\%u092c\\>"},
\"nl": {"and": "En\\>", "background": "Achtergrond\\>", "but": "Maar\\>", "examples": "Voorbeelden\\>", "feature": "Functionaliteit\\>", "given": "Gegeven\\>\\|Stel\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstract Scenario\\>", "then": "Dan\\>", "when": "Als\\>"}, \"hr": {"and": "I\\>", "background": "Pozadina", "but": "Ali\\>", "examples": "Scenariji\\|Primjeri", "feature": "Mogu\\%u0107nost\\|Mogucnost\\|Osobina", "given": "Ukoliko\\>\\|Zadani\\>\\|Zadano\\>\\|Zadan\\>", "rule": "Rule", "scenario": "Scenarij\\|Primjer", "scenario_outline": "Koncept\\|Skica", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
\"no": {"and": "Og\\>", "background": "Bakgrunn\\>", "but": "Men\\>", "examples": "Eksempler\\>", "feature": "Egenskap\\>", "given": "Gitt\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomal\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"}, \"ht": {"and": "Epi\\>\\|Ak\\>\\|E\\>", "background": "Kont\\%u00e8ks\\|Istorik", "but": "Men\\>", "examples": "Egzanp", "feature": "Karakteristik\\|Fonksyonalite\\|Mak", "given": "Sipoze ke\\>\\|Sipoze Ke\\>\\|Sipoze\\>", "rule": "Rule", "scenario": "Senaryo", "scenario_outline": "Senaryo deskripsyon\\|Senaryo Deskripsyon\\|Dyagram senaryo\\|Dyagram Senaryo\\|Plan senaryo\\|Plan Senaryo", "then": "L\\%u00e8 sa a\\>\\|Le sa a\\>", "when": "L\\%u00e8\\>\\|Le\\>"},
\"pl": {"and": "Oraz\\>\\|I\\>", "background": "Za\\%u0142o\\%u017cenia\\>", "but": "Ale\\>", "examples": "Przyk\\%u0142ady\\>", "feature": "W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\>\\|Potrzeba biznesowa\\>\\|Funkcja\\>\\|Aspekt\\>", "given": "Zak\\%u0142adaj\\%u0105c\\>\\|Maj\\%u0105c\\>", "scenario": "Scenariusz\\>", "scenario_outline": "Szablon scenariusza\\>", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>\\|Je\\%u015bli\\>\\|Kiedy\\>\\|Gdy\\>"}, \"hu": {"and": "\\%u00c9s\\>", "background": "H\\%u00e1tt\\%u00e9r", "but": "De\\>", "examples": "P\\%u00e9ld\\%u00e1k", "feature": "Jellemz\\%u0151", "given": "Amennyiben\\>\\|Adott\\>", "rule": "Szab\\%u00e1ly", "scenario": "Forgat\\%u00f3k\\%u00f6nyv\\|P\\%u00e9lda", "scenario_outline": "Forgat\\%u00f3k\\%u00f6nyv v\\%u00e1zlat", "then": "Akkor\\>", "when": "Amikor\\>\\|Majd\\>\\|Ha\\>"},
\"pt": {"and": "E\\>", "background": "Cen\\%u00e1rio de Fundo\\>\\|Cenario de Fundo\\>\\|Contexto\\>\\|Fundo\\>", "but": "Mas\\>", "examples": "Cen\\%u00e1rios\\>\\|Exemplos\\>\\|Cenarios\\>", "feature": "Caracter\\%u00edstica\\>\\|Funcionalidade\\>\\|Caracteristica\\>", "given": "Dadas\\>\\|Dados\\>\\|Dada\\>\\|Dado\\>", "scenario": "Cen\\%u00e1rio\\>\\|Cenario\\>", "scenario_outline": "Delinea\\%u00e7\\%u00e3o do Cen\\%u00e1rio\\>\\|Esquema do Cen\\%u00e1rio\\>\\|Delineacao do Cenario\\>\\|Esquema do Cenario\\>", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"}, \"id": {"and": "Dan\\>", "background": "Latar Belakang\\|Dasar", "but": "Tetapi\\>\\|Tapi\\>", "examples": "Contoh\\|Misal", "feature": "Fitur", "given": "Diasumsikan\\>\\|Diketahui\\>\\|Dengan\\>\\|Bila\\>\\|Jika\\>", "rule": "Aturan\\|Rule", "scenario": "Skenario", "scenario_outline": "Garis-Besar Skenario\\|Skenario konsep", "then": "Kemudian\\>\\|Maka\\>", "when": "Ketika\\>"},
\"ro": {"and": "\\%u015ei\\>\\|\\%u0218i\\>\\|Si\\>", "background": "Context\\>", "but": "Dar\\>", "examples": "Exemple\\>", "feature": "Func\\%u0163ionalitate\\>\\|Func\\%u021bionalitate\\>\\|Functionalitate\\>", "given": "Da\\%u0163i fiind\\>\\|Da\\%u021bi fiind\\>\\|Dati fiind\\>\\|Date fiind\\>\\|Dat fiind\\>", "scenario": "Scenariu\\>", "scenario_outline": "Structur\\%u0103 scenariu\\>\\|Structura scenariu\\>", "then": "Atunci\\>", "when": "C\\%u00e2nd\\>\\|Cand\\>"}, \"is": {"and": "Og\\>", "background": "Bakgrunnur", "but": "En\\>", "examples": "Atbur\\%u00f0ar\\%u00e1sir\\|D\\%u00e6mi", "feature": "Eiginleiki", "given": "Ef\\>", "rule": "Rule", "scenario": "Atbur\\%u00f0ar\\%u00e1s", "scenario_outline": "L\\%u00fdsing Atbur\\%u00f0ar\\%u00e1sar\\|L\\%u00fdsing D\\%u00e6ma", "then": "\\%u00de\\%u00e1\\>", "when": "\\%u00deegar\\>"},
\"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0422\\%u0430\\%u043a\\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\>\\|\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>", "but": "\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u044b\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>\\|\\%u0421\\%u0432\\%u043e\\%u0439\\%u0441\\%u0442\\%u0432\\%u043e\\>\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u044f\\>", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>\\|\\%u041f\\%u0443\\%u0441\\%u0442\\%u044c\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\>", "then": "\\%u0422\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0415\\%u0441\\%u043b\\%u0438\\>"}, \"it": {"and": "E\\>", "background": "Contesto", "but": "Ma\\>", "examples": "Esempi", "feature": "Esigenza di Business\\|Funzionalit\\%u00e0\\|Abilit\\%u00e0", "given": "Dato\\>\\|Data\\>\\|Dati\\>\\|Date\\>", "rule": "Regola", "scenario": "Scenario\\|Esempio", "scenario_outline": "Schema dello scenario", "then": "Allora\\>", "when": "Quando\\>"},
\"sk": {"and": "A z\\%u00e1rove\\%u0148\\>\\|A taktie\\%u017e\\>\\|A tie\\%u017e\\>\\|A\\>", "background": "Pozadie\\>", "but": "Ale\\>", "examples": "Pr\\%u00edklady\\>", "feature": "Po\\%u017eiadavka\\>\\|Vlastnos\\%u0165\\>\\|Funkcia\\>", "given": "Za predpokladu\\>\\|Pokia\\%u013e\\>", "scenario": "Scen\\%u00e1r\\>", "scenario_outline": "N\\%u00e1\\%u010drt Scen\\%u00e1ru\\>\\|N\\%u00e1\\%u010drt Scen\\%u00e1ra\\>\\|Osnova Scen\\%u00e1ra\\>", "then": "Potom\\>\\|Tak\\>", "when": "Ke\\%u010f\\>\\|Ak\\>"}, \"ja": {"and": "\\%u4e14\\%u3064\\|\\%u304b\\%u3064", "background": "\\%u80cc\\%u666f", "but": "\\%u3057\\%u304b\\%u3057\\|\\%u305f\\%u3060\\%u3057\\|\\%u7136\\%u3057\\|\\%u4f46\\%u3057", "examples": "\\%u30b5\\%u30f3\\%u30d7\\%u30eb\\|\\%u4f8b", "feature": "\\%u30d5\\%u30a3\\%u30fc\\%u30c1\\%u30e3\\|\\%u6a5f\\%u80fd", "given": "\\%u524d\\%u63d0", "rule": "\\%u30eb\\%u30fc\\%u30eb", "scenario": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa", "scenario_outline": "\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30a2\\%u30a6\\%u30c8\\%u30e9\\%u30a4\\%u30f3\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\%u30fc\\%u30c8\\|\\%u30b7\\%u30ca\\%u30ea\\%u30aa\\%u30c6\\%u30f3\\%u30d7\\%u30ec\\|\\%u30c6\\%u30f3\\%u30d7\\%u30ec", "then": "\\%u306a\\%u3089\\%u3070", "when": "\\%u3082\\%u3057"},
\"sr-Cyrl": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\>\\|\\%u041f\\%u043e\\%u0437\\%u0430\\%u0434\\%u0438\\%u043d\\%u0430\\>\\|\\%u041e\\%u0441\\%u043d\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0438\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0438\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041c\\%u043e\\%u0433\\%u0443\\%u045b\\%u043d\\%u043e\\%u0441\\%u0442\\>\\|\\%u041e\\%u0441\\%u043e\\%u0431\\%u0438\\%u043d\\%u0430\\>", "given": "\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u043e\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0435\\>\\|\\%u0417\\%u0430\\%u0434\\%u0430\\%u0442\\%u0438\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\>\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\>\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430\\>", "then": "\\%u041e\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u041a\\%u0430\\%u0434\\%u0430\\>\\|\\%u041a\\%u0430\\%u0434\\>"}, \"jv": {"and": "Lan\\>", "background": "Dasar", "but": "Ananging\\>\\|Nanging\\>\\|Tapi\\>", "examples": "Contone\\|Conto", "feature": "Fitur", "given": "Nalikaning\\>\\|Nalika\\>", "rule": "Rule", "scenario": "Skenario", "scenario_outline": "Konsep skenario", "then": "Banjur\\>\\|Njuk\\>", "when": "Manawa\\>\\|Menawa\\>"},
\"sr-Latn": {"and": "I\\>", "background": "Kontekst\\>\\|Pozadina\\>\\|Osnova\\>", "but": "Ali\\>", "examples": "Scenariji\\>\\|Primeri\\>", "feature": "Mogu\\%u0107nost\\>\\|Funkcionalnost\\>\\|Mogucnost\\>\\|Osobina\\>", "given": "Zadato\\>\\|Zadate\\>\\|Zatati\\>", "scenario": "Scenario\\>\\|Primer\\>", "scenario_outline": "Struktura scenarija\\>\\|Koncept\\>\\|Skica\\>", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"}, \"ka": {"and": "\\%u10d0\\%u10e1\\%u10d4\\%u10d5\\%u10d4\\>\\|\\%u10d3\\%u10d0\\>", "background": "\\%u10d9\\%u10dd\\%u10dc\\%u10e2\\%u10d4\\%u10e5\\%u10e1\\%u10e2\\%u10d8", "but": "\\%u10db\\%u10d0\\%u10d2\\%u10e0\\%u10d0\\%u10db\\>\\|\\%u10d7\\%u10e3\\%u10db\\%u10ea\\%u10d0\\>", "examples": "\\%u10db\\%u10d0\\%u10d2\\%u10d0\\%u10da\\%u10d8\\%u10d7\\%u10d4\\%u10d1\\%u10d8", "feature": "\\%u10db\\%u10dd\\%u10d7\\%u10ee\\%u10dd\\%u10d5\\%u10dc\\%u10d0\\|\\%u10d7\\%u10d5\\%u10d8\\%u10e1\\%u10d4\\%u10d1\\%u10d0", "given": "\\%u10db\\%u10dd\\%u10ea\\%u10d4\\%u10db\\%u10e3\\%u10da\\%u10d8\\%u10d0\\>\\|\\%u10db\\%u10dd\\%u10ea\\%u10d4\\%u10db\\%u10e3\\%u10da\\%u10d8\\>\\|\\%u10d5\\%u10d7\\%u10e5\\%u10d5\\%u10d0\\%u10d7\\>", "rule": "\\%u10ec\\%u10d4\\%u10e1\\%u10d8", "scenario": "\\%u10db\\%u10d0\\%u10d2\\%u10d0\\%u10da\\%u10d8\\%u10d7\\%u10d0\\%u10d3\\|\\%u10db\\%u10d0\\%u10d2\\%u10d0\\%u10da\\%u10d8\\%u10d7\\%u10d8\\|\\%u10e1\\%u10ea\\%u10d4\\%u10dc\\%u10d0\\%u10e0\\%u10d8\\|\\%u10db\\%u10d0\\%u10d2", "scenario_outline": "\\%u10e1\\%u10ea\\%u10d4\\%u10dc\\%u10d0\\%u10e0\\%u10d8\\%u10e1 \\%u10e8\\%u10d0\\%u10d1\\%u10da\\%u10dd\\%u10dc\\%u10d8\\|\\%u10e1\\%u10ea\\%u10d4\\%u10dc\\%u10d0\\%u10e0\\%u10d8\\%u10e1 \\%u10dc\\%u10d8\\%u10db\\%u10e3\\%u10e8\\%u10d8\\|\\%u10e8\\%u10d0\\%u10d1\\%u10da\\%u10dd\\%u10dc\\%u10d8\\|\\%u10dc\\%u10d8\\%u10db\\%u10e3\\%u10e8\\%u10d8", "then": "\\%u10db\\%u10d0\\%u10e8\\%u10d8\\%u10dc\\>", "when": "\\%u10e0\\%u10dd\\%u10d2\\%u10dd\\%u10e0\\%u10ea \\%u10d9\\%u10d8\\>\\|\\%u10e0\\%u10dd\\%u10d3\\%u10d4\\%u10e1\\%u10d0\\%u10ea\\>\\|\\%u10e0\\%u10dd\\%u10ea\\%u10d0\\>\\|\\%u10d7\\%u10e3\\>"},
\"sv": {"and": "Och\\>", "background": "Bakgrund\\>", "but": "Men\\>", "examples": "Exempel\\>", "feature": "Egenskap\\>", "given": "Givet\\>", "scenario": "Scenario\\>", "scenario_outline": "Abstrakt Scenario\\>\\|Scenariomall\\>", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"}, \"kn": {"and": "\\%u0cae\\%u0ca4\\%u0ccd\\%u0ca4\\%u0cc1\\>", "background": "\\%u0cb9\\%u0cbf\\%u0ca8\\%u0ccd\\%u0ca8\\%u0cc6\\%u0cb2\\%u0cc6", "but": "\\%u0c86\\%u0ca6\\%u0cb0\\%u0cc6\\>", "examples": "\\%u0c89\\%u0ca6\\%u0cbe\\%u0cb9\\%u0cb0\\%u0ca3\\%u0cc6\\%u0c97\\%u0cb3\\%u0cc1", "feature": "\\%u0cb9\\%u0cc6\\%u0c9a\\%u0ccd\\%u0c9a\\%u0cb3", "given": "\\%u0ca8\\%u0cbf\\%u0cd5\\%u0ca1\\%u0cbf\\%u0ca6\\>", "rule": "Rule", "scenario": "\\%u0c95\\%u0ca5\\%u0cbe\\%u0cb8\\%u0cbe\\%u0cb0\\%u0cbe\\%u0c82\\%u0cb6\\|\\%u0c89\\%u0ca6\\%u0cbe\\%u0cb9\\%u0cb0\\%u0ca3\\%u0cc6", "scenario_outline": "\\%u0cb5\\%u0cbf\\%u0cb5\\%u0cb0\\%u0ca3\\%u0cc6", "then": "\\%u0ca8\\%u0c82\\%u0ca4\\%u0cb0\\>", "when": "\\%u0cb8\\%u0ccd\\%u0ca5\\%u0cbf\\%u0ca4\\%u0cbf\\%u0caf\\%u0ca8\\%u0ccd\\%u0ca8\\%u0cc1\\>"},
\"th": {"and": "\\%u0e41\\%u0e25\\%u0e30\\>", "background": "\\%u0e41\\%u0e19\\%u0e27\\%u0e04\\%u0e34\\%u0e14\\>", "but": "\\%u0e41\\%u0e15\\%u0e48\\>", "examples": "\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e15\\%u0e31\\%u0e27\\%u0e2d\\%u0e22\\%u0e48\\%u0e32\\%u0e07\\>", "feature": "\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e15\\%u0e49\\%u0e2d\\%u0e07\\%u0e01\\%u0e32\\%u0e23\\%u0e17\\%u0e32\\%u0e07\\%u0e18\\%u0e38\\%u0e23\\%u0e01\\%u0e34\\%u0e08\\>\\|\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e2a\\%u0e32\\%u0e21\\%u0e32\\%u0e23\\%u0e16\\>\\|\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2b\\%u0e25\\%u0e31\\%u0e01\\>", "given": "\\%u0e01\\%u0e33\\%u0e2b\\%u0e19\\%u0e14\\%u0e43\\%u0e2b\\%u0e49\\>", "scenario": "\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "scenario_outline": "\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2a\\%u0e23\\%u0e49\\%u0e32\\%u0e07\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>\\|\\%u0e2a\\%u0e23\\%u0e38\\%u0e1b\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\>", "then": "\\%u0e14\\%u0e31\\%u0e07\\%u0e19\\%u0e31\\%u0e49\\%u0e19\\>", "when": "\\%u0e40\\%u0e21\\%u0e37\\%u0e48\\%u0e2d\\>"}, \"ko": {"and": "\\%uadf8\\%ub9ac\\%uace0", "background": "\\%ubc30\\%uacbd", "but": "\\%ud558\\%uc9c0\\%ub9cc\\|\\%ub2e8", "examples": "\\%uc608", "feature": "\\%uae30\\%ub2a5", "given": "\\%uc870\\%uac74\\|\\%uba3c\\%uc800", "rule": "Rule", "scenario": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624", "scenario_outline": "\\%uc2dc\\%ub098\\%ub9ac\\%uc624 \\%uac1c\\%uc694", "then": "\\%uadf8\\%ub7ec\\%uba74", "when": "\\%ub9cc\\%uc77c\\|\\%ub9cc\\%uc57d"},
\"tl": {"and": "\\%u0c2e\\%u0c30\\%u0c3f\\%u0c2f\\%u0c41\\>", "background": "\\%u0c28\\%u0c47\\%u0c2a\\%u0c25\\%u0c4d\\%u0c2f\\%u0c02\\>", "but": "\\%u0c15\\%u0c3e\\%u0c28\\%u0c3f\\>", "examples": "\\%u0c09\\%u0c26\\%u0c3e\\%u0c39\\%u0c30\\%u0c23\\%u0c32\\%u0c41\\>", "feature": "\\%u0c17\\%u0c41\\%u0c23\\%u0c2e\\%u0c41\\>", "given": "\\%u0c1a\\%u0c46\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c2c\\%u0c21\\%u0c3f\\%u0c28\\%u0c26\\%u0c3f\\>", "scenario": "\\%u0c38\\%u0c28\\%u0c4d\\%u0c28\\%u0c3f\\%u0c35\\%u0c47\\%u0c36\\%u0c02\\>", "scenario_outline": "\\%u0c15\\%u0c25\\%u0c28\\%u0c02\\>", "then": "\\%u0c05\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c41\\%u0c21\\%u0c41\\>", "when": "\\%u0c08 \\%u0c2a\\%u0c30\\%u0c3f\\%u0c38\\%u0c4d\\%u0c25\\%u0c3f\\%u0c24\\%u0c3f\\%u0c32\\%u0c4b\\>"}, \"lt": {"and": "Ir\\>", "background": "Kontekstas", "but": "Bet\\>", "examples": "Pavyzd\\%u017eiai\\|Scenarijai\\|Variantai", "feature": "Savyb\\%u0117", "given": "Duota\\>", "rule": "Rule", "scenario": "Scenarijus\\|Pavyzdys", "scenario_outline": "Scenarijaus \\%u0161ablonas", "then": "Tada\\>", "when": "Kai\\>"},
\"tr": {"and": "Ve\\>", "background": "Ge\\%u00e7mi\\%u015f\\>", "but": "Fakat\\>\\|Ama\\>", "examples": "\\%u00d6rnekler\\>", "feature": "\\%u00d6zellik\\>", "given": "Diyelim ki\\>", "scenario": "Senaryo\\>", "scenario_outline": "Senaryo tasla\\%u011f\\%u0131\\>", "then": "O zaman\\>", "when": "E\\%u011fer ki\\>"}, \"lu": {"and": "an\\>\\|a\\>", "background": "Hannergrond", "but": "awer\\>\\|m\\%u00e4\\>", "examples": "Beispiller", "feature": "Funktionalit\\%u00e9it", "given": "ugeholl\\>", "rule": "Rule", "scenario": "Beispill\\|Szenario", "scenario_outline": "Plang vum Szenario", "then": "dann\\>", "when": "wann\\>"},
\"tt": {"and": "\\%u04ba\\%u04d9\\%u043c\\>\\|\\%u0412\\%u04d9\\>", "background": "\\%u041a\\%u0435\\%u0440\\%u0435\\%u0448\\>", "but": "\\%u041b\\%u04d9\\%u043a\\%u0438\\%u043d\\>\\|\\%u04d8\\%u043c\\%u043c\\%u0430\\>", "examples": "\\%u04ae\\%u0440\\%u043d\\%u04d9\\%u043a\\%u043b\\%u04d9\\%u0440\\>\\|\\%u041c\\%u0438\\%u0441\\%u0430\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u04ae\\%u0437\\%u0435\\%u043d\\%u0447\\%u04d9\\%u043b\\%u0435\\%u043a\\%u043b\\%u0435\\%u043b\\%u0435\\%u043a\\>\\|\\%u041c\\%u04e9\\%u043c\\%u043a\\%u0438\\%u043d\\%u043b\\%u0435\\%u043a\\>", "given": "\\%u04d8\\%u0439\\%u0442\\%u0438\\%u043a\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\%u043d\\%u044b\\%u04a3 \\%u0442\\%u04e9\\%u0437\\%u0435\\%u043b\\%u0435\\%u0448\\%u0435\\>", "then": "\\%u041d\\%u04d9\\%u0442\\%u0438\\%u0497\\%u04d9\\%u0434\\%u04d9\\>", "when": "\\%u04d8\\%u0433\\%u04d9\\%u0440\\>"}, \"lv": {"and": "Un\\>", "background": "Konteksts\\|Situ\\%u0101cija", "but": "Bet\\>", "examples": "Piem\\%u0113ri\\|Paraugs", "feature": "Funkcionalit\\%u0101te\\|F\\%u012b\\%u010da", "given": "Kad\\>", "rule": "Rule", "scenario": "Scen\\%u0101rijs\\|Piem\\%u0113rs", "scenario_outline": "Scen\\%u0101rijs p\\%u0113c parauga", "then": "Tad\\>", "when": "Ja\\>"},
\"uk": {"and": "\\%u0410 \\%u0442\\%u0430\\%u043a\\%u043e\\%u0436\\>\\|\\%u0422\\%u0430\\>\\|\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430\\>", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e\\>", "then": "\\%u0422\\%u043e\\%u0434\\%u0456\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>\\|\\%u041a\\%u043e\\%u043b\\%u0438\\>"}, \"mk-Cyrl": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\|\\%u0421\\%u043e\\%u0434\\%u0440\\%u0436\\%u0438\\%u043d\\%u0430", "but": "\\%u041d\\%u043e\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\|\\%u0411\\%u0438\\%u0437\\%u043d\\%u0438\\%u0441 \\%u043f\\%u043e\\%u0442\\%u0440\\%u0435\\%u0431\\%u0430\\|\\%u041c\\%u043e\\%u0436\\%u043d\\%u043e\\%u0441\\%u0442", "given": "\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u043e\\>\\|\\%u0414\\%u0430\\%u0434\\%u0435\\%u043d\\%u0430\\>", "rule": "Rule", "scenario": "\\%u041d\\%u0430 \\%u043f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\|\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440", "scenario_outline": "\\%u041f\\%u0440\\%u0435\\%u0433\\%u043b\\%u0435\\%u0434 \\%u043d\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430", "then": "\\%u0422\\%u043e\\%u0433\\%u0430\\%u0448\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0430\\>"},
\"uz": {"and": "\\%u0412\\%u0430\\>", "background": "\\%u0422\\%u0430\\%u0440\\%u0438\\%u0445\\>", "but": "\\%u041b\\%u0435\\%u043a\\%u0438\\%u043d\\>\\|\\%u0411\\%u0438\\%u0440\\%u043e\\%u043a\\>\\|\\%u0410\\%u043c\\%u043c\\%u043e\\>", "examples": "\\%u041c\\%u0438\\%u0441\\%u043e\\%u043b\\%u043b\\%u0430\\%u0440\\>", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\>", "given": "\\%u0410\\%u0433\\%u0430\\%u0440\\>", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\>", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439 \\%u0441\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430\\%u0441\\%u0438\\>", "then": "\\%u0423\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u0410\\%u0433\\%u0430\\%u0440\\>"}, \"mk-Latn": {"and": "I\\>", "background": "Sodrzhina\\|Kontekst", "but": "No\\>", "examples": "Scenaria\\|Primeri", "feature": "Funkcionalnost\\|Biznis potreba\\|Mozhnost", "given": "Dadeno\\>\\|Dadena\\>", "rule": "Rule", "scenario": "Na primer\\|Scenario", "scenario_outline": "Pregled na scenarija\\|Koncept\\|Skica", "then": "Togash\\>", "when": "Koga\\>"},
\"vi": {"and": "V\\%u00e0\\>", "background": "B\\%u1ed1i c\\%u1ea3nh\\>", "but": "Nh\\%u01b0ng\\>", "examples": "D\\%u1eef li\\%u1ec7u\\>", "feature": "T\\%u00ednh n\\%u0103ng\\>", "given": "Bi\\%u1ebft\\>\\|Cho\\>", "scenario": "T\\%u00ecnh hu\\%u1ed1ng\\>\\|K\\%u1ecbch b\\%u1ea3n\\>", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng\\>\\|Khung k\\%u1ecbch b\\%u1ea3n\\>", "then": "Th\\%u00ec\\>", "when": "Khi\\>"}, \"mn": {"and": "\\%u0422\\%u044d\\%u0433\\%u044d\\%u044d\\%u0434\\>\\|\\%u041c\\%u04e9\\%u043d\\>", "background": "\\%u0410\\%u0433\\%u0443\\%u0443\\%u043b\\%u0433\\%u0430", "but": "\\%u0413\\%u044d\\%u0445\\%u0434\\%u044d\\%u044d\\>\\|\\%u0425\\%u0430\\%u0440\\%u0438\\%u043d\\>", "examples": "\\%u0422\\%u0443\\%u0445\\%u0430\\%u0439\\%u043b\\%u0431\\%u0430\\%u043b", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446", "given": "\\%u04e8\\%u0433\\%u04e9\\%u0433\\%u0434\\%u0441\\%u04e9\\%u043d \\%u043d\\%u044c\\>\\|\\%u0410\\%u043d\\%u0445\\>", "rule": "Rule", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u044b\\%u043d \\%u0442\\%u04e9\\%u043b\\%u04e9\\%u0432\\%u043b\\%u04e9\\%u0433\\%u04e9\\%u04e9", "then": "\\%u04ae\\%u04af\\%u043d\\%u0438\\%u0439 \\%u0434\\%u0430\\%u0440\\%u0430\\%u0430\\>\\|\\%u0422\\%u044d\\%u0433\\%u044d\\%u0445\\%u044d\\%u0434\\>", "when": "\\%u0425\\%u044d\\%u0440\\%u044d\\%u0432\\>"},
\"zh-CN": {"and": "\\%u800c\\%u4e14\\|\\%u5e76\\%u4e14\\|\\%u540c\\%u65f6", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8bbe\\|\\%u5047\\%u5b9a", "scenario": "\\%u573a\\%u666f\\>\\|\\%u5267\\%u672c\\>", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\>\\|\\%u5267\\%u672c\\%u5927\\%u7eb2\\>", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"}, \"mr": {"and": "\\%u0924\\%u0938\\%u0947\\%u091a\\>\\|\\%u0906\\%u0923\\%u093f\\>", "background": "\\%u092a\\%u093e\\%u0930\\%u094d\\%u0936\\%u094d\\%u0935\\%u092d\\%u0942\\%u092e\\%u0940", "but": "\\%u092a\\%u0930\\%u0902\\%u0924\\%u0941\\>\\|\\%u092a\\%u0923\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923", "feature": "\\%u0935\\%u0948\\%u0936\\%u093f\\%u0937\\%u094d\\%u091f\\%u094d\\%u092f\\|\\%u0938\\%u0941\\%u0935\\%u093f\\%u0927\\%u093e", "given": "\\%u0926\\%u093f\\%u0932\\%u0947\\%u0932\\%u094d\\%u092f\\%u093e \\%u092a\\%u094d\\%u0930\\%u092e\\%u093e\\%u0923\\%u0947\\>\\|\\%u091c\\%u0930", "rule": "\\%u0928\\%u093f\\%u092f\\%u092e", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e", "then": "\\%u0924\\%u0947\\%u0935\\%u094d\\%u0939\\%u093e\\>\\|\\%u092e\\%u0917\\>", "when": "\\%u091c\\%u0947\\%u0935\\%u094d\\%u0939\\%u093e\\>"},
\"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14\\|\\%u540c\\%u6642", "background": "\\%u80cc\\%u666f\\>", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50\\>", "feature": "\\%u529f\\%u80fd\\>", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8a2d\\|\\%u5047\\%u5b9a", "scenario": "\\%u5834\\%u666f\\>\\|\\%u5287\\%u672c\\>", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\>\\|\\%u5287\\%u672c\\%u5927\\%u7db1\\>", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}} \"ne": {"and": "\\%u0905\\%u0928\\%u093f\\>\\|\\%u0930\\>", "background": "\\%u092a\\%u0943\\%u0937\\%u094d\\%u0920\\%u092d\\%u0942\\%u092e\\%u0940", "but": "\\%u0924\\%u0930\\>", "examples": "\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923\\%u0939\\%u0930\\%u0941\\|\\%u0909\\%u0926\\%u093e\\%u0939\\%u0930\\%u0923", "feature": "\\%u0935\\%u093f\\%u0936\\%u0947\\%u0937\\%u0924\\%u093e\\|\\%u0938\\%u0941\\%u0935\\%u093f\\%u0927\\%u093e", "given": "\\%u0926\\%u093f\\%u0907\\%u090f\\%u0915\\%u094b\\>\\|\\%u0926\\%u093f\\%u090f\\%u0915\\%u094b\\>\\|\\%u092f\\%u0926\\%u093f\\>", "rule": "\\%u0928\\%u093f\\%u092f\\%u092e", "scenario": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f", "scenario_outline": "\\%u092a\\%u0930\\%u093f\\%u0926\\%u0943\\%u0936\\%u094d\\%u092f \\%u0930\\%u0942\\%u092a\\%u0930\\%u0947\\%u0916\\%u093e", "then": "\\%u0924\\%u094d\\%u092f\\%u0938\\%u092a\\%u091b\\%u093f\\>\\|\\%u0905\\%u0928\\%u0940\\>", "when": "\\%u091c\\%u092c\\>"},
\"nl": {"and": "En\\>", "background": "Achtergrond", "but": "Maar\\>", "examples": "Voorbeelden", "feature": "Functionaliteit", "given": "Gegeven\\>\\|Stel\\>", "rule": "Rule", "scenario": "Voorbeeld\\|Scenario", "scenario_outline": "Abstract Scenario", "then": "Dan\\>", "when": "Wanneer\\>\\|Als\\>"},
\"no": {"and": "Og\\>", "background": "Bakgrunn", "but": "Men\\>", "examples": "Eksempler", "feature": "Egenskap", "given": "Gitt\\>", "rule": "Regel", "scenario": "Eksempel\\|Scenario", "scenario_outline": "Abstrakt Scenario\\|Scenariomal", "then": "S\\%u00e5\\>", "when": "N\\%u00e5r\\>"},
\"pa": {"and": "\\%u0a05\\%u0a24\\%u0a47\\>", "background": "\\%u0a2a\\%u0a3f\\%u0a1b\\%u0a4b\\%u0a15\\%u0a5c", "but": "\\%u0a2a\\%u0a30\\>", "examples": "\\%u0a09\\%u0a26\\%u0a3e\\%u0a39\\%u0a30\\%u0a28\\%u0a3e\\%u0a02", "feature": "\\%u0a28\\%u0a15\\%u0a36 \\%u0a28\\%u0a41\\%u0a39\\%u0a3e\\%u0a30\\|\\%u0a2e\\%u0a41\\%u0a39\\%u0a3e\\%u0a02\\%u0a26\\%u0a30\\%u0a3e\\|\\%u0a16\\%u0a3e\\%u0a38\\%u0a40\\%u0a05\\%u0a24", "given": "\\%u0a1c\\%u0a3f\\%u0a35\\%u0a47\\%u0a02 \\%u0a15\\%u0a3f\\>\\|\\%u0a1c\\%u0a47\\%u0a15\\%u0a30\\>", "rule": "Rule", "scenario": "\\%u0a09\\%u0a26\\%u0a3e\\%u0a39\\%u0a30\\%u0a28\\|\\%u0a2a\\%u0a1f\\%u0a15\\%u0a25\\%u0a3e", "scenario_outline": "\\%u0a2a\\%u0a1f\\%u0a15\\%u0a25\\%u0a3e \\%u0a30\\%u0a42\\%u0a2a \\%u0a30\\%u0a47\\%u0a16\\%u0a3e\\|\\%u0a2a\\%u0a1f\\%u0a15\\%u0a25\\%u0a3e \\%u0a22\\%u0a3e\\%u0a02\\%u0a1a\\%u0a3e", "then": "\\%u0a24\\%u0a26\\>", "when": "\\%u0a1c\\%u0a26\\%u0a4b\\%u0a02\\>"},
\"pl": {"and": "Oraz\\>\\|I\\>", "background": "Za\\%u0142o\\%u017cenia", "but": "Ale\\>", "examples": "Przyk\\%u0142ady", "feature": "Potrzeba biznesowa\\|W\\%u0142a\\%u015bciwo\\%u015b\\%u0107\\|Funkcja\\|Aspekt", "given": "Zak\\%u0142adaj\\%u0105c, \\%u017ce\\>\\|Zak\\%u0142adaj\\%u0105c\\>\\|Maj\\%u0105c\\>", "rule": "Zasada\\|Regu\\%u0142a", "scenario": "Scenariusz\\|Przyk\\%u0142ad", "scenario_outline": "Szablon scenariusza", "then": "Wtedy\\>", "when": "Je\\%u017celi\\>\\|Je\\%u015bli\\>\\|Kiedy\\>\\|Gdy\\>"},
\"pt": {"and": "E\\>", "background": "Cen\\%u00e1rio de Fundo\\|Cenario de Fundo\\|Contexto\\|Fundo", "but": "Mas\\>", "examples": "Exemplos\\|Cen\\%u00e1rios\\|Cenarios", "feature": "Funcionalidade\\|Caracter\\%u00edstica\\|Caracteristica", "given": "Dados\\>\\|Dadas\\>\\|Dado\\>\\|Dada\\>", "rule": "Regra", "scenario": "Exemplo\\|Cen\\%u00e1rio\\|Cenario", "scenario_outline": "Delinea\\%u00e7\\%u00e3o do Cen\\%u00e1rio\\|Delineacao do Cenario\\|Esquema do Cen\\%u00e1rio\\|Esquema do Cenario", "then": "Ent\\%u00e3o\\>\\|Entao\\>", "when": "Quando\\>"},
\"ro": {"and": "Si\\>\\|\\%u0218i\\>\\|\\%u015ei\\>", "background": "Context", "but": "Dar\\>", "examples": "Exemple", "feature": "Functionalitate\\|Func\\%u021bionalitate\\|Func\\%u0163ionalitate", "given": "Date fiind\\>\\|Dati fiind\\>\\|Da\\%u021bi fiind\\>\\|Da\\%u0163i fiind\\>\\|Dat fiind\\>\\|Dat\\%u0103 fiind", "rule": "Rule", "scenario": "Scenariu\\|Exemplu", "scenario_outline": "Structura scenariu\\|Structur\\%u0103 scenariu", "then": "Atunci\\>", "when": "Cand\\>\\|C\\%u00e2nd\\>"},
\"ru": {"and": "\\%u041a \\%u0442\\%u043e\\%u043c\\%u0443 \\%u0436\\%u0435\\>\\|\\%u0422\\%u0430\\%u043a\\%u0436\\%u0435\\>\\|\\%u0418\\>", "background": "\\%u041f\\%u0440\\%u0435\\%u0434\\%u044b\\%u0441\\%u0442\\%u043e\\%u0440\\%u0438\\%u044f\\|\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442", "but": "\\%u0418\\%u043d\\%u0430\\%u0447\\%u0435\\>\\|\\%u041d\\%u043e\\>\\|\\%u0410\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u044b", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u044c\\%u043d\\%u043e\\%u0441\\%u0442\\%u044c\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\|\\%u0421\\%u0432\\%u043e\\%u0439\\%u0441\\%u0442\\%u0432\\%u043e\\|\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u044f\\|\\%u0424\\%u0438\\%u0447\\%u0430", "given": "\\%u0414\\%u043e\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\>\\|\\%u041f\\%u0443\\%u0441\\%u0442\\%u044c\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "rule": "\\%u041f\\%u0440\\%u0430\\%u0432\\%u0438\\%u043b\\%u043e", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f\\|\\%u0428\\%u0430\\%u0431\\%u043b\\%u043e\\%u043d \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u044f", "then": "\\%u0417\\%u0430\\%u0442\\%u0435\\%u043c\\>\\|\\%u0422\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u041a\\%u043e\\%u0433\\%u0434\\%u0430\\>\\|\\%u0415\\%u0441\\%u043b\\%u0438\\>"},
\"sk": {"and": "A taktie\\%u017e\\>\\|A z\\%u00e1rove\\%u0148\\>\\|A tie\\%u017e\\>\\|A\\>", "background": "Pozadie", "but": "Ale\\>", "examples": "Pr\\%u00edklady", "feature": "Po\\%u017eiadavka\\|Vlastnos\\%u0165\\|Funkcia", "given": "Za predpokladu\\>\\|Pokia\\%u013e\\>", "rule": "Rule", "scenario": "Pr\\%u00edklad\\|Scen\\%u00e1r", "scenario_outline": "Osnova Scen\\%u00e1ra\\|N\\%u00e1\\%u010drt Scen\\%u00e1ru\\|N\\%u00e1\\%u010drt Scen\\%u00e1ra", "then": "Potom\\>\\|Tak\\>", "when": "Ke\\%u010f\\>\\|Ak\\>"},
\"sl": {"and": "Ter\\>\\|In\\>", "background": "Kontekst\\|Osnova\\|Ozadje", "but": "Vendar\\>\\|Ampak\\>\\|Toda\\>", "examples": "Scenariji\\|Primeri", "feature": "Funkcionalnost\\|Zna\\%u010dilnost\\|Funkcija\\|Mo\\%u017enosti\\|Moznosti\\|Lastnost", "given": "Privzeto\\>\\|Podano\\>\\|Zaradi\\>\\|Dano\\>", "rule": "Rule", "scenario": "Scenarij\\|Primer", "scenario_outline": "Struktura scenarija\\|Oris scenarija\\|Koncept\\|Osnutek\\|Skica", "then": "Takrat\\>\\|Potem\\>\\|Nato\\>", "when": "Kadar\\>\\|Ko\\>\\|Ce\\>\\|\\%u010ce\\>"},
\"sr-Cyrl": {"and": "\\%u0418\\>", "background": "\\%u041a\\%u043e\\%u043d\\%u0442\\%u0435\\%u043a\\%u0441\\%u0442\\|\\%u041f\\%u043e\\%u0437\\%u0430\\%u0434\\%u0438\\%u043d\\%u0430\\|\\%u041e\\%u0441\\%u043d\\%u043e\\%u0432\\%u0430", "but": "\\%u0410\\%u043b\\%u0438\\>", "examples": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0438\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\%u0438", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b\\%u043d\\%u043e\\%u0441\\%u0442\\|\\%u041c\\%u043e\\%u0433\\%u0443\\%u045b\\%u043d\\%u043e\\%u0441\\%u0442\\|\\%u041e\\%u0441\\%u043e\\%u0431\\%u0438\\%u043d\\%u0430", "given": "\\%u0417\\%u0430 \\%u0434\\%u0430\\%u0442\\%u043e\\>\\|\\%u0417\\%u0430 \\%u0434\\%u0430\\%u0442\\%u0435\\>\\|\\%u0417\\%u0430 \\%u0434\\%u0430\\%u0442\\%u0438\\>", "rule": "\\%u041f\\%u0440\\%u0430\\%u0432\\%u0438\\%u043b\\%u043e", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u043e\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440\\|\\%u041f\\%u0440\\%u0438\\%u043c\\%u0435\\%u0440", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0458\\%u0430\\|\\%u041a\\%u043e\\%u043d\\%u0446\\%u0435\\%u043f\\%u0442\\|\\%u0421\\%u043a\\%u0438\\%u0446\\%u0430", "then": "\\%u041e\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u041a\\%u0430\\%u0434\\%u0430\\>\\|\\%u041a\\%u0430\\%u0434\\>"},
\"sr-Latn": {"and": "I\\>", "background": "Kontekst\\|Pozadina\\|Osnova", "but": "Ali\\>", "examples": "Scenariji\\|Primeri", "feature": "Funkcionalnost\\|Mogu\\%u0107nost\\|Mogucnost\\|Osobina", "given": "Za dato\\>\\|Za date\\>\\|Za dati\\>", "rule": "Pravilo", "scenario": "Scenario\\|Primer", "scenario_outline": "Struktura scenarija\\|Koncept\\|Skica", "then": "Onda\\>", "when": "Kada\\>\\|Kad\\>"},
\"sv": {"and": "Och\\>", "background": "Bakgrund", "but": "Men\\>", "examples": "Exempel", "feature": "Egenskap", "given": "Givet\\>", "rule": "Regel", "scenario": "Scenario", "scenario_outline": "Abstrakt Scenario\\|Scenariomall", "then": "S\\%u00e5\\>", "when": "N\\%u00e4r\\>"},
\"ta": {"and": "\\%u0bae\\%u0bc7\\%u0bb2\\%u0bc1\\%u0bae\\%u0bcd \\>\\|\\%u0bae\\%u0bb1\\%u0bcd\\%u0bb1\\%u0bc1\\%u0bae\\%u0bcd\\>", "background": "\\%u0baa\\%u0bbf\\%u0ba9\\%u0bcd\\%u0ba9\\%u0ba3\\%u0bbf", "but": "\\%u0b86\\%u0ba9\\%u0bbe\\%u0bb2\\%u0bcd \\>", "examples": "\\%u0b8e\\%u0b9f\\%u0bc1\\%u0ba4\\%u0bcd\\%u0ba4\\%u0bc1\\%u0b95\\%u0bcd\\%u0b95\\%u0bbe\\%u0b9f\\%u0bcd\\%u0b9f\\%u0bc1\\%u0b95\\%u0bb3\\%u0bcd\\|\\%u0ba8\\%u0bbf\\%u0bb2\\%u0bc8\\%u0bae\\%u0bc8\\%u0b95\\%u0bb3\\%u0bbf\\%u0bb2\\%u0bcd\\|\\%u0b95\\%u0bbe\\%u0b9f\\%u0bcd\\%u0b9a\\%u0bbf\\%u0b95\\%u0bb3\\%u0bcd", "feature": "\\%u0bb5\\%u0ba3\\%u0bbf\\%u0b95 \\%u0ba4\\%u0bc7\\%u0bb5\\%u0bc8\\|\\%u0b85\\%u0bae\\%u0bcd\\%u0b9a\\%u0bae\\%u0bcd\\|\\%u0ba4\\%u0bbf\\%u0bb1\\%u0ba9\\%u0bcd", "given": "\\%u0b95\\%u0bc6\\%u0bbe\\%u0b9f\\%u0bc1\\%u0b95\\%u0bcd\\%u0b95\\%u0baa\\%u0bcd\\%u0baa\\%u0b9f\\%u0bcd\\%u0b9f\\>", "rule": "Rule", "scenario": "\\%u0b89\\%u0ba4\\%u0bbe\\%u0bb0\\%u0ba3\\%u0bae\\%u0bbe\\%u0b95\\|\\%u0b95\\%u0bbe\\%u0b9f\\%u0bcd\\%u0b9a\\%u0bbf", "scenario_outline": "\\%u0b95\\%u0bbe\\%u0b9f\\%u0bcd\\%u0b9a\\%u0bbf \\%u0bb5\\%u0bbe\\%u0bb0\\%u0bcd\\%u0baa\\%u0bcd\\%u0baa\\%u0bc1\\%u0bb0\\%u0bc1\\|\\%u0b95\\%u0bbe\\%u0b9f\\%u0bcd\\%u0b9a\\%u0bbf \\%u0b9a\\%u0bc1\\%u0bb0\\%u0bc1\\%u0b95\\%u0bcd\\%u0b95\\%u0bae\\%u0bcd", "then": "\\%u0b85\\%u0baa\\%u0bcd\\%u0baa\\%u0bc6\\%u0bbe\\%u0bb4\\%u0bc1\\%u0ba4\\%u0bc1\\>", "when": "\\%u0b8e\\%u0baa\\%u0bcd\\%u0baa\\%u0bc7\\%u0bbe\\%u0ba4\\%u0bc1\\>"},
\"te": {"and": "\\%u0c2e\\%u0c30\\%u0c3f\\%u0c2f\\%u0c41\\>", "background": "\\%u0c28\\%u0c47\\%u0c2a\\%u0c25\\%u0c4d\\%u0c2f\\%u0c02", "but": "\\%u0c15\\%u0c3e\\%u0c28\\%u0c3f\\>", "examples": "\\%u0c09\\%u0c26\\%u0c3e\\%u0c39\\%u0c30\\%u0c23\\%u0c32\\%u0c41", "feature": "\\%u0c17\\%u0c41\\%u0c23\\%u0c2e\\%u0c41", "given": "\\%u0c1a\\%u0c46\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c2c\\%u0c21\\%u0c3f\\%u0c28\\%u0c26\\%u0c3f\\>", "rule": "Rule", "scenario": "\\%u0c38\\%u0c28\\%u0c4d\\%u0c28\\%u0c3f\\%u0c35\\%u0c47\\%u0c36\\%u0c02\\|\\%u0c09\\%u0c26\\%u0c3e\\%u0c39\\%u0c30\\%u0c23", "scenario_outline": "\\%u0c15\\%u0c25\\%u0c28\\%u0c02", "then": "\\%u0c05\\%u0c2a\\%u0c4d\\%u0c2a\\%u0c41\\%u0c21\\%u0c41\\>", "when": "\\%u0c08 \\%u0c2a\\%u0c30\\%u0c3f\\%u0c38\\%u0c4d\\%u0c25\\%u0c3f\\%u0c24\\%u0c3f\\%u0c32\\%u0c4b\\>"},
\"th": {"and": "\\%u0e41\\%u0e25\\%u0e30\\>", "background": "\\%u0e41\\%u0e19\\%u0e27\\%u0e04\\%u0e34\\%u0e14", "but": "\\%u0e41\\%u0e15\\%u0e48\\>", "examples": "\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\|\\%u0e0a\\%u0e38\\%u0e14\\%u0e02\\%u0e2d\\%u0e07\\%u0e15\\%u0e31\\%u0e27\\%u0e2d\\%u0e22\\%u0e48\\%u0e32\\%u0e07", "feature": "\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e15\\%u0e49\\%u0e2d\\%u0e07\\%u0e01\\%u0e32\\%u0e23\\%u0e17\\%u0e32\\%u0e07\\%u0e18\\%u0e38\\%u0e23\\%u0e01\\%u0e34\\%u0e08\\|\\%u0e04\\%u0e27\\%u0e32\\%u0e21\\%u0e2a\\%u0e32\\%u0e21\\%u0e32\\%u0e23\\%u0e16\\|\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2b\\%u0e25\\%u0e31\\%u0e01", "given": "\\%u0e01\\%u0e33\\%u0e2b\\%u0e19\\%u0e14\\%u0e43\\%u0e2b\\%u0e49\\>", "rule": "Rule", "scenario": "\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c", "scenario_outline": "\\%u0e42\\%u0e04\\%u0e23\\%u0e07\\%u0e2a\\%u0e23\\%u0e49\\%u0e32\\%u0e07\\%u0e02\\%u0e2d\\%u0e07\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c\\|\\%u0e2a\\%u0e23\\%u0e38\\%u0e1b\\%u0e40\\%u0e2b\\%u0e15\\%u0e38\\%u0e01\\%u0e32\\%u0e23\\%u0e13\\%u0e4c", "then": "\\%u0e14\\%u0e31\\%u0e07\\%u0e19\\%u0e31\\%u0e49\\%u0e19\\>", "when": "\\%u0e40\\%u0e21\\%u0e37\\%u0e48\\%u0e2d\\>"},
\"tlh": {"and": "latlh\\>\\|'ej\\>", "background": "mo'", "but": "'ach\\>\\|'a\\>", "examples": "ghantoH\\|lutmey", "feature": "poQbogh malja'\\|Qu'meH 'ut\\|perbogh\\|Qap\\|laH", "given": "DaH ghu' bejlu'\\>\\|ghu' noblu'\\>", "rule": "Rule", "scenario": "lut", "scenario_outline": "lut chovnatlh", "then": "vaj\\>", "when": "qaSDI'\\>"},
\"tr": {"and": "Ve\\>", "background": "Ge\\%u00e7mi\\%u015f", "but": "Fakat\\>\\|Ama\\>", "examples": "\\%u00d6rnekler", "feature": "\\%u00d6zellik", "given": "Diyelim ki\\>", "rule": "Kural", "scenario": "Senaryo\\|\\%u00d6rnek", "scenario_outline": "Senaryo tasla\\%u011f\\%u0131", "then": "O zaman\\>", "when": "E\\%u011fer ki\\>"},
\"tt": {"and": "\\%u04ba\\%u04d9\\%u043c\\>\\|\\%u0412\\%u04d9\\>", "background": "\\%u041a\\%u0435\\%u0440\\%u0435\\%u0448", "but": "\\%u041b\\%u04d9\\%u043a\\%u0438\\%u043d\\>\\|\\%u04d8\\%u043c\\%u043c\\%u0430\\>", "examples": "\\%u04ae\\%u0440\\%u043d\\%u04d9\\%u043a\\%u043b\\%u04d9\\%u0440\\|\\%u041c\\%u0438\\%u0441\\%u0430\\%u043b\\%u043b\\%u0430\\%u0440", "feature": "\\%u04ae\\%u0437\\%u0435\\%u043d\\%u0447\\%u04d9\\%u043b\\%u0435\\%u043a\\%u043b\\%u0435\\%u043b\\%u0435\\%u043a\\|\\%u041c\\%u04e9\\%u043c\\%u043a\\%u0438\\%u043d\\%u043b\\%u0435\\%u043a", "given": "\\%u04d8\\%u0439\\%u0442\\%u0438\\%u043a\\>", "rule": "Rule", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439\\%u043d\\%u044b\\%u04a3 \\%u0442\\%u04e9\\%u0437\\%u0435\\%u043b\\%u0435\\%u0448\\%u0435", "then": "\\%u041d\\%u04d9\\%u0442\\%u0438\\%u0497\\%u04d9\\%u0434\\%u04d9\\>", "when": "\\%u04d8\\%u0433\\%u04d9\\%u0440\\>"},
\"uk": {"and": "\\%u0410 \\%u0442\\%u0430\\%u043a\\%u043e\\%u0436\\>\\|\\%u0422\\%u0430\\>\\|\\%u0406\\>", "background": "\\%u041f\\%u0435\\%u0440\\%u0435\\%u0434\\%u0443\\%u043c\\%u043e\\%u0432\\%u0430", "but": "\\%u0410\\%u043b\\%u0435\\>", "examples": "\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434\\%u0438", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0456\\%u043e\\%u043d\\%u0430\\%u043b", "given": "\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e, \\%u0449\\%u043e\\>\\|\\%u041f\\%u0440\\%u0438\\%u043f\\%u0443\\%u0441\\%u0442\\%u0438\\%u043c\\%u043e\\>\\|\\%u041d\\%u0435\\%u0445\\%u0430\\%u0439\\>\\|\\%u0414\\%u0430\\%u043d\\%u043e\\>", "rule": "Rule", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u0439\\|\\%u041f\\%u0440\\%u0438\\%u043a\\%u043b\\%u0430\\%u0434", "scenario_outline": "\\%u0421\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430 \\%u0441\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0456\\%u044e", "then": "\\%u0422\\%u043e\\%u0434\\%u0456\\>\\|\\%u0422\\%u043e\\>", "when": "\\%u042f\\%u043a\\%u0449\\%u043e\\>\\|\\%u041a\\%u043e\\%u043b\\%u0438\\>"},
\"ur": {"and": "\\%u0627\\%u0648\\%u0631\\>", "background": "\\%u067e\\%u0633 \\%u0645\\%u0646\\%u0638\\%u0631", "but": "\\%u0644\\%u06cc\\%u06a9\\%u0646\\>", "examples": "\\%u0645\\%u062b\\%u0627\\%u0644\\%u06cc\\%u06ba", "feature": "\\%u06a9\\%u0627\\%u0631\\%u0648\\%u0628\\%u0627\\%u0631 \\%u06a9\\%u06cc \\%u0636\\%u0631\\%u0648\\%u0631\\%u062a\\|\\%u0635\\%u0644\\%u0627\\%u062d\\%u06cc\\%u062a\\|\\%u062e\\%u0635\\%u0648\\%u0635\\%u06cc\\%u062a", "given": "\\%u0641\\%u0631\\%u0636 \\%u06a9\\%u06cc\\%u0627\\>\\|\\%u0628\\%u0627\\%u0644\\%u0641\\%u0631\\%u0636\\>\\|\\%u0627\\%u06af\\%u0631\\>", "rule": "Rule", "scenario": "\\%u0645\\%u0646\\%u0638\\%u0631\\%u0646\\%u0627\\%u0645\\%u06c1", "scenario_outline": "\\%u0645\\%u0646\\%u0638\\%u0631 \\%u0646\\%u0627\\%u0645\\%u06d2 \\%u06a9\\%u0627 \\%u062e\\%u0627\\%u06a9\\%u06c1", "then": "\\%u067e\\%u06be\\%u0631\\>\\|\\%u062a\\%u0628\\>", "when": "\\%u062c\\%u0628\\>"},
\"uz": {"and": "\\%u0412\\%u0430\\>", "background": "\\%u0422\\%u0430\\%u0440\\%u0438\\%u0445", "but": "\\%u041b\\%u0435\\%u043a\\%u0438\\%u043d\\>\\|\\%u0411\\%u0438\\%u0440\\%u043e\\%u043a\\>\\|\\%u0410\\%u043c\\%u043c\\%u043e\\>", "examples": "\\%u041c\\%u0438\\%u0441\\%u043e\\%u043b\\%u043b\\%u0430\\%u0440", "feature": "\\%u0424\\%u0443\\%u043d\\%u043a\\%u0446\\%u0438\\%u043e\\%u043d\\%u0430\\%u043b", "given": "Belgilangan\\>", "rule": "Rule", "scenario": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439", "scenario_outline": "\\%u0421\\%u0446\\%u0435\\%u043d\\%u0430\\%u0440\\%u0438\\%u0439 \\%u0441\\%u0442\\%u0440\\%u0443\\%u043a\\%u0442\\%u0443\\%u0440\\%u0430\\%u0441\\%u0438", "then": "\\%u0423\\%u043d\\%u0434\\%u0430\\>", "when": "\\%u0410\\%u0433\\%u0430\\%u0440\\>"},
\"vi": {"and": "V\\%u00e0\\>", "background": "B\\%u1ed1i c\\%u1ea3nh", "but": "Nh\\%u01b0ng\\>", "examples": "D\\%u1eef li\\%u1ec7u", "feature": "T\\%u00ednh n\\%u0103ng", "given": "Bi\\%u1ebft\\>\\|Cho\\>", "rule": "Rule", "scenario": "T\\%u00ecnh hu\\%u1ed1ng\\|K\\%u1ecbch b\\%u1ea3n", "scenario_outline": "Khung t\\%u00ecnh hu\\%u1ed1ng\\|Khung k\\%u1ecbch b\\%u1ea3n", "then": "Th\\%u00ec\\>", "when": "Khi\\>"},
\"zh-CN": {"and": "\\%u800c\\%u4e14\\|\\%u5e76\\%u4e14\\|\\%u540c\\%u65f6", "background": "\\%u80cc\\%u666f", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50", "feature": "\\%u529f\\%u80fd", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8bbe\\|\\%u5047\\%u5b9a", "rule": "Rule\\|\\%u89c4\\%u5219", "scenario": "\\%u573a\\%u666f\\|\\%u5267\\%u672c", "scenario_outline": "\\%u573a\\%u666f\\%u5927\\%u7eb2\\|\\%u5267\\%u672c\\%u5927\\%u7eb2", "then": "\\%u90a3\\%u4e48", "when": "\\%u5f53"},
\"zh-TW": {"and": "\\%u800c\\%u4e14\\|\\%u4e26\\%u4e14\\|\\%u540c\\%u6642", "background": "\\%u80cc\\%u666f", "but": "\\%u4f46\\%u662f", "examples": "\\%u4f8b\\%u5b50", "feature": "\\%u529f\\%u80fd", "given": "\\%u5047\\%u5982\\|\\%u5047\\%u8a2d\\|\\%u5047\\%u5b9a", "rule": "Rule", "scenario": "\\%u5834\\%u666f\\|\\%u5287\\%u672c", "scenario_outline": "\\%u5834\\%u666f\\%u5927\\%u7db1\\|\\%u5287\\%u672c\\%u5927\\%u7db1", "then": "\\%u90a3\\%u9ebc", "when": "\\%u7576"}}
function! s:pattern(key) function! s:pattern(key)
let language = matchstr(getline(1),'#\s*language:\s*\zs\S\+') let language = matchstr(getline(1),'#\s*language:\s*\zs\S\+')
@@ -87,16 +111,18 @@ function! s:pattern(key)
endfunction endfunction
function! s:Add(name) function! s:Add(name)
let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","Comment","String","Table"],'"cucumber".a:name.v:val'),",") let next = " skipempty skipwhite nextgroup=".join(map(["Region","AndRegion","ButRegion","StarRegion","Comment","String","Table"],'"cucumber".a:name.v:val'),",")
exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next exe "syn region cucumber".a:name.'Region matchgroup=cucumber'.a:name.' start="\%(^\s*\)\@<=\%('.s:pattern(tolower(a:name)).'\)" end="$"'.next
exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next exe 'syn region cucumber'.a:name.'AndRegion matchgroup=cucumber'.a:name.'And start="\%(^\s*\)\@<='.s:pattern('and').'" end="$" contained'.next
exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next exe 'syn region cucumber'.a:name.'ButRegion matchgroup=cucumber'.a:name.'But start="\%(^\s*\)\@<='.s:pattern('but').'" end="$" contained'.next
exe 'syn region cucumber'.a:name.'StarRegion matchgroup=cucumber'.a:name.'Star start="\%(^\s*\)\@<=\*\S\@!" end="$" contained'.next
exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next exe 'syn match cucumber'.a:name.'Comment "\%(^\s*\)\@<=#.*" contained'.next
exe 'syn region cucumber'.a:name.'String start=+\%(^\s*\)\@<="""+ end=+"""+ contained'.next exe 'syn region cucumber'.a:name.'String start=+\%(^\s*\)\@<="""+ end=+"""+ contained'.next
exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next exe 'syn match cucumber'.a:name.'Table "\%(^\s*\)\@<=|.*" contained contains=cucumberDelimiter'.next
exe 'hi def link cucumber'.a:name.'Comment cucumberComment' exe 'hi def link cucumber'.a:name.'Comment cucumberComment'
exe 'hi def link cucumber'.a:name.'String cucumberString' exe 'hi def link cucumber'.a:name.'String cucumberString'
exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And' exe 'hi def link cucumber'.a:name.'But cucumber'.a:name.'And'
exe 'hi def link cucumber'.a:name.'Star cucumber'.a:name.'And'
exe 'hi def link cucumber'.a:name.'And cucumber'.a:name exe 'hi def link cucumber'.a:name.'And cucumber'.a:name
exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion' exe 'syn cluster cucumberStepRegions add=cucumber'.a:name.'Region,cucumber'.a:name.'AndRegion,cucumber'.a:name.'ButRegion'
endfunction endfunction
@@ -104,12 +130,13 @@ endfunction
syn match cucumberComment "\%(^\s*\)\@<=#.*" syn match cucumberComment "\%(^\s*\)\@<=#.*"
syn match cucumberComment "\%(\%^\s*\)\@<=#.*" contains=cucumberLanguage syn match cucumberComment "\%(\%^\s*\)\@<=#.*" contains=cucumberLanguage
syn match cucumberLanguage "\%(#\s*\)\@<=language:" contained syn match cucumberLanguage "\%(#\s*\)\@<=language:" contained
syn match cucumberUnparsed "\S.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained syn match cucumberUnparsed "\S.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberRule,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained
syn match cucumberUnparsedComment "#.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained syn match cucumberUnparsedComment "#.*" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberTags,cucumberBackground,cucumberRule,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty contained
exe 'syn match cucumberFeature "\%(^\s*\)\@<='.s:pattern('feature').':" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberBackground,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty' exe 'syn match cucumberFeature "\%(^\s*\)\@<='.s:pattern('feature').':" nextgroup=cucumberUnparsedComment,cucumberUnparsed,cucumberBackground,cucumberRule,cucumberScenario,cucumberScenarioOutline,cucumberExamples skipwhite skipempty'
exe 'syn match cucumberBackground "\%(^\s*\)\@<='.s:pattern('background').':"' exe 'syn match cucumberBackground "\%(^\s*\)\@<='.s:pattern('background').':"'
exe 'syn match cucumberScenario "\%(^\s*\)\@<='.s:pattern('scenario').':"' exe 'syn match cucumberScenario "\%(^\s*\)\@<='.s:pattern('scenario').':"'
exe 'syn match cucumberRule "\%(^\s*\)\@<='.s:pattern('rule').':"'
exe 'syn match cucumberScenarioOutline "\%(^\s*\)\@<='.s:pattern('scenario_outline').':"' exe 'syn match cucumberScenarioOutline "\%(^\s*\)\@<='.s:pattern('scenario_outline').':"'
exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgroup=cucumberExampleTable skipempty skipwhite' exe 'syn match cucumberExamples "\%(^\s*\)\@<='.s:pattern('examples').':" nextgroup=cucumberExampleTable skipempty skipwhite'
@@ -127,6 +154,7 @@ hi def link cucumberComment Comment
hi def link cucumberLanguage SpecialComment hi def link cucumberLanguage SpecialComment
hi def link cucumberFeature Macro hi def link cucumberFeature Macro
hi def link cucumberBackground Define hi def link cucumberBackground Define
hi def link cucumberRule Define
hi def link cucumberScenario Define hi def link cucumberScenario Define
hi def link cucumberScenarioOutline Define hi def link cucumberScenarioOutline Define
hi def link cucumberExamples Define hi def link cucumberExamples Define

View File

@@ -23,7 +23,7 @@ syntax sync fromstart
syntax case match syntax case match
" keyword definitions " keyword definitions
syntax keyword dartConditional if else switch syntax keyword dartConditional if else switch when
syntax keyword dartRepeat do while for syntax keyword dartRepeat do while for
syntax keyword dartBoolean true false syntax keyword dartBoolean true false
syntax keyword dartConstant null syntax keyword dartConstant null
@@ -32,7 +32,8 @@ syntax keyword dartOperator new is as in
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:" syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
syntax keyword dartCoreType void var dynamic syntax keyword dartCoreType void var dynamic
syntax keyword dartStatement return syntax keyword dartStatement return
syntax keyword dartStorageClass static abstract final const factory late syntax keyword dartStorageClass static abstract final const factory late base
\ interface sealed macro
syntax keyword dartExceptions throw rethrow try on catch finally syntax keyword dartExceptions throw rethrow try on catch finally
syntax keyword dartAssert assert syntax keyword dartAssert assert
syntax keyword dartClassDecl extends with implements syntax keyword dartClassDecl extends with implements

View File

@@ -8,6 +8,7 @@ endif
" Anton Kochkov <anton.kochkov@gmail.com> " Anton Kochkov <anton.kochkov@gmail.com>
" URL: https://github.com/ocaml/vim-ocaml " URL: https://github.com/ocaml/vim-ocaml
" Last Change: " Last Change:
" 2023 Nov 24 - Add end-of-line strings (Samuel Hym)
" 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes) " 2019 Feb 27 - Add newer keywords to the syntax (Simon Cruanes)
" 2018 May 8 - Check current_syntax (Kawahara Satoru) " 2018 May 8 - Check current_syntax (Kawahara Satoru)
" 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal) " 2018 Mar 29 - Extend jbuild syntax with more keywords (Petter A. Urkedal)
@@ -42,6 +43,8 @@ syn keyword lispFunc ignore-stdout ignore-stderr ignore-outputs
syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to syn keyword lispFunc with-stdout-to with-stderr-to with-outputs-to
syn keyword lispFunc write-file system bash syn keyword lispFunc write-file system bash
syn region lispString start=+"\\[>|]+ end=+$+ contains=@Spell
syn cluster lispBaseListCluster add=duneVar syn cluster lispBaseListCluster add=duneVar
syn match duneVar '\${[@<^]}' containedin=lispSymbol syn match duneVar '\${[@<^]}' containedin=lispSymbol
syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol syn match duneVar '\${\k\+\(:\k\+\)\?}' containedin=lispSymbol

View File

@@ -92,15 +92,15 @@ syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|
syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do\>:\@!" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,@elixirNotTop fold
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment,elixirCharList,elixirCharListDelimiter syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirMap,elixirStruct,elixirTuple,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigil,elixirAnonymousFunction,elixirComment,elixirCharList,elixirCharListDelimiter
syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\+\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\+{" end="}" skip="\\\\\|\\}" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\+<" end=">" skip="\\\\\|\\>" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\+\[" end="\]" skip="\\\\\|\\\]" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\u\+(" end=")" skip="\\\\\|\\)" contains=elixirDelimEscape fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\z(/\|\"\|'\||\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" contains=@elixirStringContained,elixirRegexEscapePunctuation fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l{" end="}" skip="\\\\\|\\}" contains=@elixirStringContained,elixirRegexEscapePunctuation fold
@@ -110,19 +110,47 @@ syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l("
syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\/" end="\/" skip="\\\\\|\\\/" contains=@elixirStringContained,elixirRegexEscapePunctuation fold syn region elixirSigil matchgroup=elixirSigilDelimiter start="\~\l\/" end="\/" skip="\\\\\|\\\/" contains=@elixirStringContained,elixirRegexEscapePunctuation fold
" Sigils surrounded with heredoc " Sigils surrounded with heredoc
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z("""\)+ end=+^\s*\z1+ skip=+\\"+ fold syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\u\+\z("""\)+ end=+^\s*\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\a\z('''\)+ end=+^\s*\z1+ skip=+\\'+ fold syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\u\z('''\)+ end=+^\s*\z1+ skip=+\\'+ fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\l\z("""\)+ end=+^\s*\z1+ skip=+\\"+ fold
syn region elixirSigil matchgroup=elixirSigilDelimiter start=+\~\l\z('''\)+ end=+^\s*\z1+ skip=+\\'+ fold
" LiveView-specific sigils for embedded templates
" LiveView Sigils surrounded with ~L"""
syntax include @HTML syntax/html.vim syntax include @HTML syntax/html.vim
unlet b:current_syntax unlet b:current_syntax
syntax region elixirLiveViewSigil matchgroup=elixirSigilDelimiter keepend start=+\~L\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold syntax region elixirHeexSigil matchgroup=elixirSigilDelimiter keepend start=+\~H\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syntax region elixirSurfaceSigil matchgroup=elixirSigilDelimiter keepend start=+\~H\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syntax region elixirSurfaceSigil matchgroup=elixirSigilDelimiter keepend start=+\~F\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold syntax region elixirSurfaceSigil matchgroup=elixirSigilDelimiter keepend start=+\~F\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syntax region elixirLiveViewSigil matchgroup=elixirSigilDelimiter keepend start=+\~L\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syntax region elixirPhoenixESigil matchgroup=elixirSigilDelimiter keepend start=+\~E\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold syntax region elixirPhoenixESigil matchgroup=elixirSigilDelimiter keepend start=+\~E\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syntax region elixirPhoenixeSigil matchgroup=elixirSigilDelimiter keepend start=+\~e\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold syntax region elixirPhoenixeSigil matchgroup=elixirSigilDelimiter keepend start=+\~e\z("""\)+ end=+^\s*\z1+ skip=+\\"+ contains=@HTML fold
syn cluster elixirTemplateSigils contains=elixirLiveViewSigil,elixirHeexSigil,elixirSurfaceSigil,elixirPhoenixESigil,elixirPhoenixeSigil
syn region heexComponent matchgroup=eelixirDelimiter start="<\.[a-z_]\+" end="%\@<!>" contains=ALLBUT,@elixirNotTop keepend
syn region eelixirExpression matchgroup=eelixirDelimiter start="<%" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region eelixirExpression matchgroup=eelixirDelimiter start="<%=" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region eelixirQuote matchgroup=eelixirDelimiter start="<%%" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region heexComment matchgroup=eelixirDelimiter start="<%!--" end="%\@<!--%>" contains=elixirTodo,eelixirComment,@Spell containedin=@elixirTemplateSigils keepend
syn region heexExpression matchgroup=heexDelimiter start="=\zs{" end="}" contains=ALLBUT,@elixirNotTop containedin=htmlValue keepend
syn region heexExpression matchgroup=heexDelimiter start="=\zs{" end="}" skip="#{[^}]*}" contains=ALLBUT,@elixirNotTop containedin=htmlValue keepend
" missing `keepend` on next line is intentional
syn region heexExpression matchgroup=heexDelimiter start="=\zs{" end="}" skip="%{[^}]*}" contains=ALLBUT,@elixirNotTop containedin=htmlValue
syn match phxArg "\<phx[-.0-9_a-z]*-[-.0-9_a-z]*\>" containedin=htmlTag
syn match heexArg "\<[0-9_a-z]*\>\ze=" containedin=htmlTag
syn match heexSpecialAttribute ":\%(if\|for\|let\)\ze=" containedin=htmlTag
syn match heexComponentName "<\zs\.[A-Z_a-z][A-Z_a-z0-9]\+" containedin=htmlTag
syn match heexEndComponent "<\zs\/\.[A-Z_a-z][A-Z_a-z0-9]\+" containedin=htmlEndTag
hi def link eelixirDelimiter PreProc
hi def link heexDelimiter PreProc
hi def link heexComment Comment
hi def link phxArg htmlArg
hi def link heexArg htmlArg
hi def link heexSpecialAttribute htmlArg
hi def link heexComponentName htmlTagName
hi def link heexEndComponent htmlTagName
" Documentation " Documentation
if exists('g:elixir_use_markdown_for_docs') && g:elixir_use_markdown_for_docs if exists('g:elixir_use_markdown_for_docs') && g:elixir_use_markdown_for_docs
syn include @markdown syntax/markdown.vim syn include @markdown syntax/markdown.vim

Some files were not shown because too many files have changed in this diff Show More