Skip to content

Commit

Permalink
Update runtime files.
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Dec 19, 2019
1 parent a4ce82f commit 95a9dd1
Show file tree
Hide file tree
Showing 12 changed files with 206 additions and 49 deletions.
3 changes: 0 additions & 3 deletions READMEdir/README_extra.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ src/os_mac.* Files for the Mac port.

src/os_mint.8 Files for the Atari Mint port.

src/os_os2* Files for the OS/2 port.
src/tee/* Extra program for OS/2.

src/os_vms* Files for the VMS port.

src/os_w32*
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/eval.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 7 additions & 4 deletions runtime/doc/map.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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]
Expand Down
12 changes: 5 additions & 7 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
9 changes: 8 additions & 1 deletion runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions runtime/doc/tags
Original file line number Diff line number Diff line change
Expand Up @@ -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*
Expand Down Expand Up @@ -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()*
Expand Down
13 changes: 11 additions & 2 deletions runtime/doc/todo.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions runtime/makemenu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 19 additions & 1 deletion runtime/syntax/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
" Language: C++
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
" Previous Maintainer: Ken Shan <[email protected]>
" Last Change: 2017 Jun 05
" Last Change: 2019 Dec 18

" quit when a syntax file was already loaded
if exists("b:current_syntax")
Expand Down Expand Up @@ -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
Expand All @@ -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 "[<>]?"

Expand All @@ -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"

Expand Down
3 changes: 1 addition & 2 deletions runtime/syntax/cvs.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
" Vim syntax file
" Language: CVS commit file
" Maintainer: Matt Dunford ([email protected])
" URL: http://www.zotikos.com/downloads/cvs.vim
" Maintainer: Matt Dunford ([email protected])
" Last Change: Sat Nov 24 23:25:11 CET 2001

" quit when a syntax file was already loaded
Expand Down
89 changes: 89 additions & 0 deletions runtime/syntax/rego.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
" Vim syntax file
" Language: rego policy language
" Maintainer: Matt Dunford ([email protected])
" 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'
Loading

0 comments on commit 95a9dd1

Please sign in to comment.