diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-12-19 22:12:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-12-19 22:12:03 +0100 |
commit | 95a9dd1efc5ae3221865f4970053a5708557e682 (patch) | |
tree | 8350e84d8e57e57c00b3c2c78e08a550c706fab2 /runtime | |
parent | a4ce82fe2e990eb9eaabf6ad400e2a74cce50ce6 (diff) |
Update runtime files.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 2 | ||||
-rw-r--r-- | runtime/doc/map.txt | 11 | ||||
-rw-r--r-- | runtime/doc/options.txt | 12 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 9 | ||||
-rw-r--r-- | runtime/doc/tags | 2 | ||||
-rw-r--r-- | runtime/doc/todo.txt | 13 | ||||
-rw-r--r-- | runtime/makemenu.vim | 1 | ||||
-rw-r--r-- | runtime/syntax/cpp.vim | 20 | ||||
-rw-r--r-- | runtime/syntax/cvs.vim | 3 | ||||
-rw-r--r-- | runtime/syntax/rego.vim | 89 |
10 files changed, 144 insertions, 18 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 070582d358..71ecf22c5b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2019 Dec 06 +*eval.txt* For Vim version 8.2. Last change: 2019 Dec 17 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt index 08861a8b0b..55c9c1256d 100644 --- a/runtime/doc/map.txt +++ b/runtime/doc/map.txt @@ -1,4 +1,4 @@ -*map.txt* For Vim version 8.2. Last change: 2019 Nov 09 +*map.txt* For Vim version 8.2. Last change: 2019 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1044,7 +1044,8 @@ See |:verbose-cmd| for more information. See |:map-<buffer>| for the optional <buffer> argument. *:una* *:unabbreviate* -:una[bbreviate] {lhs} Remove abbreviation for {lhs} from the list. If none +:una[bbreviate] [<buffer>] {lhs} + Remove abbreviation for {lhs} from the list. If none is found, remove abbreviations in which {lhs} matches with the {rhs}. This is done so that you can even remove abbreviations after expansion. To avoid @@ -1059,7 +1060,8 @@ See |:verbose-cmd| for more information. Same as ":ab", but for Command-line mode only. *:cuna* *:cunabbrev* -:cuna[bbrev] {lhs} Same as ":una", but for Command-line mode only. +:cuna[bbrev] [<buffer>] {lhs} + Same as ":una", but for Command-line mode only. *:cnorea* *:cnoreabbrev* :cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs] @@ -1071,7 +1073,8 @@ See |:verbose-cmd| for more information. Same as ":ab", but for Insert mode only. *:iuna* *:iunabbrev* -:iuna[bbrev] {lhs} Same as ":una", but for insert mode only. +:iuna[bbrev] [<buffer>] {lhs} + Same as ":una", but for insert mode only. *:inorea* *:inoreabbrev* :inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs] diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 6aad362a35..8598713bc4 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2019 Dec 17 +*options.txt* For Vim version 8.2. Last change: 2019 Dec 18 VIM REFERENCE MANUAL by Bram Moolenaar @@ -576,9 +576,9 @@ If an error is detected the rest of the line is skipped. If you want to include a ':' in a set command precede it with a '\'. The backslash in front of the ':' will be removed. Example: - /* vi:set dir=c\:\tmp: */ ~ -This sets the 'dir' option to "c:\tmp". Only a single backslash before the -':' is removed. Thus to include "\:" you have to specify "\\:". + /* vi:set fillchars=stl\:^,vert\:\|: */ ~ +This sets the 'fillchars' option to "stl:^,vert:\|". Only a single backslash +before the ':' is removed. Thus to include "\:" you have to specify "\\:". *E992* No other commands than "set" are supported, for security reasons (somebody might create a Trojan horse text file with modelines). And not all options @@ -6462,9 +6462,7 @@ A jump table for the options with a short description can be found at |Q_op|. but the Windows version of Vim can source unix format scripts. *'shell'* *'sh'* *E91* -'shell' 'sh' string (default $SHELL or "sh", - MS-DOS and Win32: "command.com" or - "cmd.exe") +'shell' 'sh' string (default $SHELL or "sh", Win32: "cmd.exe") global Name of the shell to use for ! and :! commands. When changing the value also check these options: 'shelltype', 'shellpipe', 'shellslash' diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 604d7caec6..b1a1d0fe2f 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 07 +*syntax.txt* For Vim version 8.2. Last change: 2019 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2761,6 +2761,13 @@ This will add highlighting for the commands that BASH (version 2.05a and later, and part earlier) adds. +REGO *rego.vim* *ft-rego-syntax* + +Rego is a query language developed by Styra. It is mostly used as a policy +language for kubernetes, but can be applied to almost anything. Files with +the following extensions are recognized as rego files: .rego. + + RESTRUCTURED TEXT *rst.vim* *ft-rst-syntax* Syntax highlighting is enabled for code blocks within the document for a diff --git a/runtime/doc/tags b/runtime/doc/tags index fbf3c05a5e..5b045117a5 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6498,6 +6498,7 @@ ft-quake-syntax syntax.txt /*ft-quake-syntax* ft-r-indent indent.txt /*ft-r-indent* ft-r-syntax syntax.txt /*ft-r-syntax* ft-readline-syntax syntax.txt /*ft-readline-syntax* +ft-rego-syntax syntax.txt /*ft-rego-syntax* ft-rexx-syntax syntax.txt /*ft-rexx-syntax* ft-rmd-plugin filetype.txt /*ft-rmd-plugin* ft-rmd-syntax syntax.txt /*ft-rmd-syntax* @@ -8561,6 +8562,7 @@ register sponsor.txt /*register* register-faq sponsor.txt /*register-faq* register-variable eval.txt /*register-variable* registers change.txt /*registers* +rego.vim syntax.txt /*rego.vim* regular-expression pattern.txt /*regular-expression* reload editing.txt /*reload* reltime() eval.txt /*reltime()* diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index eb93d10507..fe27fff385 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 8.2. Last change: 2019 Dec 11 +*todo.txt* For Vim version 8.2. Last change: 2019 Dec 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -38,7 +38,12 @@ browser use: https://github.com/vim/vim/issues/1234 *known-bugs* -------------------- Known bugs and current work ----------------------- +Include ipv6 syntax changes? (DJ Lucas, #5360) + Popup windows: +- Make it possible to put a terminal window in a popup. Would always grab key + input? Sort-of possible by creating a hidden terminal and opening a popup + with that buffer: #4063. - Use popup (or popup menu) for command line completion - Implement flip option - Make redrawing more efficient and avoid flicker: @@ -87,6 +92,7 @@ Terminal emulator window: - When the job in the terminal doesn't use mouse events, let the scroll wheel scroll the scrollback, like a terminal does at the shell prompt. #2490 And use modeless selection. #2962 +- Use CTRL-W CTRL-K to enter a digraph? #5371 - When Vim runs in the terminal and changes the title, the statusline needs to be redrawn. - GUI: When using ":set go+=!" a system() call causes the hit-enter prompt. @@ -137,6 +143,9 @@ undo result wrong: Masato Nishihata, #4798 Undo puts cursor in wrong line after "cG<Esc>" undo. +:unmap <c-n> gives error but does remove the mapping. (Antony Scriven, 2019 +Dec 19) + Sound: support on Mac? Or does libcanberra work there? Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019 @@ -522,7 +531,7 @@ matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul 19. Should make 'listchars' global-local. Local to window or to buffer? -Probably window. +Probably window. #5206 Add something like 'fillchars' local to window, but allow for specifying a highlight name. Esp. for the statusline. And "extends" and "precedes" are also useful without 'list' set. Also in diff --git a/runtime/makemenu.vim b/runtime/makemenu.vim index 27fa46fe25..6173d8b691 100644 --- a/runtime/makemenu.vim +++ b/runtime/makemenu.vim @@ -481,6 +481,7 @@ SynMenu R.RCS.RCS\ file:rcs SynMenu R.Readline\ config:readline SynMenu R.Rebol:rebol SynMenu R.ReDIF:redif +SynMenu R.Rego:rego SynMenu R.Relax\ NG:rng SynMenu R.Remind:remind SynMenu R.Relax\ NG\ compact:rnc diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim index 9cb0860e84..53b6a513f2 100644 --- a/runtime/syntax/cpp.vim +++ b/runtime/syntax/cpp.vim @@ -2,7 +2,7 @@ " Language: C++ " Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) " Previous Maintainer: Ken Shan <ccshan@post.harvard.edu> -" Last Change: 2017 Jun 05 +" Last Change: 2019 Dec 18 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -42,6 +42,8 @@ if !exists("cpp_no_cpp11") syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell + syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1 + syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$" endif " C++ 14 extensions @@ -53,6 +55,21 @@ if !exists("cpp_no_cpp14") syn case match endif +" C++ 20 extensions +if !exists("cpp_no_cpp20") + syn keyword cppStatement co_await co_return co_yield requires + syn keyword cppStorageClass consteval constinit + syn keyword cppStructure concept + syn keyword cppType char8_t + syn keyword cppModule import module export +endif + +" C++ 17 extensions +if !exists("cpp_no_cpp17") + syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1 + syn match cppCast "\<reinterpret_pointer_cast\s*$" +endif + " The minimum and maximum operators in GNU C++ syn match cppMinMax "[<>]?" @@ -71,6 +88,7 @@ hi def link cppConstant Constant hi def link cppRawStringDelimiter Delimiter hi def link cppRawString String hi def link cppNumber Number +hi def link cppModule Include let b:current_syntax = "cpp" diff --git a/runtime/syntax/cvs.vim b/runtime/syntax/cvs.vim index 3eac191637..e1e413fcf9 100644 --- a/runtime/syntax/cvs.vim +++ b/runtime/syntax/cvs.vim @@ -1,7 +1,6 @@ " Vim syntax file " Language: CVS commit file -" Maintainer: Matt Dunford (zoot@zotikos.com) -" URL: http://www.zotikos.com/downloads/cvs.vim +" Maintainer: Matt Dunford (zenmatic@gmail.com) " Last Change: Sat Nov 24 23:25:11 CET 2001 " quit when a syntax file was already loaded diff --git a/runtime/syntax/rego.vim b/runtime/syntax/rego.vim new file mode 100644 index 0000000000..a04fc7007b --- /dev/null +++ b/runtime/syntax/rego.vim @@ -0,0 +1,89 @@ +" Vim syntax file +" Language: rego policy language +" Maintainer: Matt Dunford (zenmatic@gmail.com) +" URL: https://github.com/zenmatic/vim-syntax-rego +" Last Change: 2019 Dec 12 + +" https://www.openpolicyagent.org/docs/latest/policy-language/ + +" quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +syn keyword regoDirective package import allow deny +syn keyword regoKeywords as default else false not null true with some + +syn keyword regoFuncAggregates count sum product max min sort all any +syn match regoFuncArrays "\<array\.\(concat\|slice\)\>" +syn keyword regoFuncSets intersection union + +syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper +syn match regoFuncStrings2 "\<strings\.replace_n\>" +syn match regoFuncStrings3 "\<contains\>" + +syn keyword regoFuncRegex re_match +syn match regoFuncRegex2 "\<regex\.\(split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\)\>" + +syn match regoFuncGlob "\<glob\.\(match\|quote_meta\)\>" +syn match regoFuncUnits "\<units\.parse_bytes\>" +syn keyword regoFuncTypes is_number is_string is_boolean is_array is_set is_object is_null type_name +syn match regoFuncEncoding1 "\<\(base64\|base64url\)\.\(encode\|decode\)\>" +syn match regoFuncEncoding2 "\<urlquery\.\(encode\|decode\|encode_object\)\>" +syn match regoFuncEncoding3 "\<\(json\|yaml\)\.\(marshal\|unmarshal\)\>" +syn match regoFuncTokenSigning "\<io\.jwt\.\(encode_sign_raw\|encode_sign\)\>" +syn match regoFuncTokenVerification "\<io\.jwt\.\(verify_rs256\|verify_ps256\|verify_es256\|verify_hs256\|decode\|decode_verify\)\>" +syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\)\>" +syn match regoFuncCryptography "\<crypto\.x509\.parse_certificates\>" +syn keyword regoFuncGraphs walk +syn match regoFuncHttp "\<http\.send\>" +syn match regoFuncNet "\<net\.\(cidr_contains\|cidr_intersects\)\>" +syn match regoFuncRego "\<rego\.parse_module\>" +syn match regoFuncOpa "\<opa\.runtime\>" +syn keyword regoFuncDebugging trace + +hi def link regoDirective Statement +hi def link regoKeywords Statement +hi def link regoFuncAggregates Statement +hi def link regoFuncArrays Statement +hi def link regoFuncSets Statement +hi def link regoFuncStrings Statement +hi def link regoFuncStrings2 Statement +hi def link regoFuncStrings3 Statement +hi def link regoFuncRegex Statement +hi def link regoFuncRegex2 Statement +hi def link regoFuncGlob Statement +hi def link regoFuncUnits Statement +hi def link regoFuncTypes Statement +hi def link regoFuncEncoding1 Statement +hi def link regoFuncEncoding2 Statement +hi def link regoFuncEncoding3 Statement +hi def link regoFuncTokenSigning Statement +hi def link regoFuncTokenVerification Statement +hi def link regoFuncTime Statement +hi def link regoFuncCryptography Statement +hi def link regoFuncGraphs Statement +hi def link regoFuncHttp Statement +hi def link regoFuncNet Statement +hi def link regoFuncRego Statement +hi def link regoFuncOpa Statement +hi def link regoFuncDebugging Statement + +" https://www.openpolicyagent.org/docs/latest/policy-language/#strings +syn region regoString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region regoRawString start=+`+ end=+`+ + +hi def link regoString String +hi def link regoRawString String + +" Comments; their contents +syn keyword regoTodo contained TODO FIXME XXX BUG +syn cluster regoCommentGroup contains=regoTodo +syn region regoComment start="#" end="$" contains=@regoCommentGroup,@Spell + +hi def link regoComment Comment +hi def link regoTodo Todo + +let b:current_syntax = 'rego' |