diff options
author | Christian Clason <christian.clason@uni-due.de> | 2021-09-10 08:48:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 08:48:27 +0200 |
commit | 8f0c843c130a2117610e7892a8c1ca0887a54a6f (patch) | |
tree | 9b94e9cabd126de4b036057a4a3256ebff48879d | |
parent | a422f2136a001921fb54e7b83b6d00e6d5f42a4a (diff) | |
download | rneovim-8f0c843c130a2117610e7892a8c1ca0887a54a6f.tar.gz rneovim-8f0c843c130a2117610e7892a8c1ca0887a54a6f.tar.bz2 rneovim-8f0c843c130a2117610e7892a8c1ca0887a54a6f.zip |
vim-patch:4d8f476176ea (#15612)
* vim-patch:4d8f476176ea
Update runtime files
https://github.com/vim/vim/commit/4d8f476176eadfc745bcb8e143460029048f858d
skip nsis/README.txt
skip doc/vim9.txt
skip src/nvim/po/it.po
-rw-r--r-- | runtime/autoload/rubycomplete.vim | 11 | ||||
-rw-r--r-- | runtime/doc/arabic.txt | 7 | ||||
-rw-r--r-- | runtime/doc/change.txt | 10 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 36 | ||||
-rw-r--r-- | runtime/doc/ft_ps1.txt | 2 | ||||
-rw-r--r-- | runtime/doc/ft_raku.txt | 2 | ||||
-rw-r--r-- | runtime/doc/motion.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/rileft.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 6 | ||||
-rw-r--r-- | runtime/ftplugin/eruby.vim | 4 | ||||
-rw-r--r-- | runtime/ftplugin/ruby.vim | 4 | ||||
-rw-r--r-- | runtime/indent/ruby.vim | 1 | ||||
-rw-r--r-- | runtime/syntax/8th.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/help.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/redif.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/ruby.vim | 20 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 15 |
18 files changed, 79 insertions, 57 deletions
diff --git a/runtime/autoload/rubycomplete.vim b/runtime/autoload/rubycomplete.vim index e8a1879668..3677b25aeb 100644 --- a/runtime/autoload/rubycomplete.vim +++ b/runtime/autoload/rubycomplete.vim @@ -3,7 +3,7 @@ " Maintainer: Mark Guzman <segfault@hasno.info> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2019 Feb 25 +" Last Change: 2020 Apr 12 " ---------------------------------------------------------------------------- " " Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com) @@ -501,13 +501,8 @@ class VimRubyCompletion return if rails_base == nil $:.push rails_base unless $:.index( rails_base ) - rails_config = rails_base + "config/" - rails_lib = rails_base + "lib/" - $:.push rails_config unless $:.index( rails_config ) - $:.push rails_lib unless $:.index( rails_lib ) - - bootfile = rails_config + "boot.rb" - envfile = rails_config + "environment.rb" + bootfile = rails_base + "config/boot.rb" + envfile = rails_base + "config/environment.rb" if File.exists?( bootfile ) && File.exists?( envfile ) begin require bootfile diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index df91b8d065..5d3bf7a761 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -171,6 +171,13 @@ o Enable Arabic settings [short-cut] and its support is preferred due to its level of offerings. 'arabic' when 'termbidi' is enabled only sets the keymap. + For vertical window isolation while setting 'termbidi' an LTR + vertical separator like "l" or "𝖨" may be used. It may also be + hidden by changing its color to the foreground color: > + :set fillchars=vert:l + :hi VertSplit ctermbg=White +< Note that this is a workaround, not a proper solution. + If, on the other hand, you'd like to be verbose and explicit and are opting not to use the 'arabic' short-cut command, here's what is needed (i.e. if you use ':set arabic' you can skip this section) - diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index aed3acab67..2b799e3e27 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -747,12 +747,14 @@ For compatibility with Vi these two exceptions are allowed: "\/{string}/" and "\?{string}?" do the same as "//{string}/r". "\&{string}&" does the same as "//{string}/". *pattern-delimiter* *E146* -Instead of the '/' which surrounds the pattern and replacement string, you -can use any other single-byte character, but not an alphanumeric character, -'\', '"' or '|'. This is useful if you want to include a '/' in the search -pattern or replacement string. Example: > +Instead of the '/' which surrounds the pattern and replacement string, you can +use another single-byte character. This is useful if you want to include a +'/' in the search pattern or replacement string. Example: > :s+/+//+ +You can use most characters, but not an alphanumeric character, '\', '"' or +'|'. + For the definition of a pattern, see |pattern|. In Visual block mode, use |/\%V| in the pattern to have the substitute work in the block only. Otherwise it works on whole lines anyway. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 476254d22d..5d889983e3 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4196,11 +4196,15 @@ foldclosed({lnum}) *foldclosed()* The result is a Number. If the line {lnum} is in a closed fold, the result is the number of the first line in that fold. If the line {lnum} is not in a closed fold, -1 is returned. + {lnum} is used like with |getline()|. Thus "." is the current + line, "'m" mark m, etc. foldclosedend({lnum}) *foldclosedend()* The result is a Number. If the line {lnum} is in a closed fold, the result is the number of the last line in that fold. If the line {lnum} is not in a closed fold, -1 is returned. + {lnum} is used like with |getline()|. Thus "." is the current + line, "'m" mark m, etc. foldlevel({lnum}) *foldlevel()* The result is a Number, which is the foldlevel of line {lnum} @@ -4211,6 +4215,8 @@ foldlevel({lnum}) *foldlevel()* returned for lines where folds are still to be updated and the foldlevel is unknown. As a special case the level of the previous line is usually available. + {lnum} is used like with |getline()|. Thus "." is the current + line, "'m" mark m, etc. *foldtext()* foldtext() Returns a String, to be displayed for a closed fold. This is @@ -4877,6 +4883,8 @@ getmatches([{win}]) *getmatches()* |getmatches()| is useful in combination with |setmatches()|, as |setmatches()| can restore a list of matches saved by |getmatches()|. + If {win} is specified, use the window with this number or + window ID instead of the current window. Example: > :echo getmatches() < [{'group': 'MyGroup1', 'pattern': 'TODO', @@ -4945,8 +4953,10 @@ getqflist([{what}]) *getqflist()* valid |TRUE|: recognized error message When there is no error list or it's empty, an empty list is - returned. Quickfix list entries with non-existing buffer - number are returned with "bufnr" set to zero. + returned. Quickfix list entries with a non-existing buffer + number are returned with "bufnr" set to zero (Note: some + functions accept buffer number zero for the alternate buffer, + you may need to explicitly check for zero). Useful application: Find pattern matches in multiple files and do something with them: > @@ -5050,12 +5060,12 @@ getregtype([{regname}]) *getregtype()* <CTRL-V> is one character with value 0x16. If {regname} is not specified, |v:register| is used. -gettabinfo([{arg}]) *gettabinfo()* - If {arg} is not specified, then information about all the tab - pages is returned as a |List|. Each List item is a |Dictionary|. - Otherwise, {arg} specifies the tab page number and information - about that one is returned. If the tab page does not exist an - empty List is returned. +gettabinfo([{tabnr}]) *gettabinfo()* + If {tabnr} is not specified, then information about all the + tab pages is returned as a |List|. Each List item is a + |Dictionary|. Otherwise, {tabnr} specifies the tab page + number and information about that one is returned. If the tab + page does not exist an empty List is returned. Each List item is a |Dictionary| with the following entries: tabnr tab page number. @@ -5099,11 +5109,11 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* To obtain all window-local variables use: > gettabwinvar({tabnr}, {winnr}, '&') -gettagstack([{nr}]) *gettagstack()* - The result is a Dict, which is the tag stack of window {nr}. - {nr} can be the window number or the |window-ID|. - When {nr} is not specified, the current window is used. - When window {nr} doesn't exist, an empty Dict is returned. +gettagstack([{winnr}]) *gettagstack()* + The result is a Dict, which is the tag stack of window {winnr}. + {winnr} can be the window number or the |window-ID|. + When {winnr} is not specified, the current window is used. + When window {winnr} doesn't exist, an empty Dict is returned. The returned dictionary contains the following entries: curidx Current index in the stack. When at diff --git a/runtime/doc/ft_ps1.txt b/runtime/doc/ft_ps1.txt index df1480b929..3eb89a4c24 100644 --- a/runtime/doc/ft_ps1.txt +++ b/runtime/doc/ft_ps1.txt @@ -1,4 +1,4 @@ -*ps1.txt* A Windows PowerShell syntax plugin for Vim +*ft_ps1.txt* A Windows PowerShell syntax plugin for Vim Author: Peter Provost <https://www.github.com/PProvost> License: Apache 2.0 diff --git a/runtime/doc/ft_raku.txt b/runtime/doc/ft_raku.txt index 8439de5727..00b140ee9c 100644 --- a/runtime/doc/ft_raku.txt +++ b/runtime/doc/ft_raku.txt @@ -1,4 +1,4 @@ -*vim-raku.txt* The Raku programming language filetype +*ft_raku.txt* The Raku programming language filetype *vim-raku* diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 1789663abc..c473244827 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -192,9 +192,9 @@ l or *l* *$* *<End>* *<kEnd>* $ or <End> To the end of the line. When a count is given also go [count - 1] lines downward, or as far is possible. - |inclusive| motion. If a count of 2 of larger is + |inclusive| motion. If a count of 2 or larger is given and the cursor is on the last line, that is an - error an the cursor doesn't move. + error and the cursor doesn't move. In Visual mode the cursor goes to just after the last character in the line. When 'virtualedit' is active, "$" may move the cursor diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index d7bd91ad4f..90ba3b86d9 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -4352,19 +4352,21 @@ A jump table for the options with a short description can be found at |Q_op|. - abbreviations are disabled - 'autoindent' is reset - 'expandtab' is reset - - 'formatoptions' is used like it is empty + - 'hkmap' is reset - 'revins' is reset - 'ruler' is reset - 'showmatch' is reset - - 'smartindent' is reset - 'smarttab' is reset - 'softtabstop' is set to 0 - 'textwidth' is set to 0 - 'wrapmargin' is set to 0 + - 'varsofttabstop' is made empty These options keep their value, but their effect is disabled: - 'cindent' + - 'formatoptions' is used like it is empty - 'indentexpr' - 'lisp' + - 'smartindent' NOTE: When you start editing another file while the 'paste' option is on, settings from the modelines or autocommands may change the settings again, causing trouble when pasting text. You might want to diff --git a/runtime/doc/rileft.txt b/runtime/doc/rileft.txt index d45a2dce7e..aa11462595 100644 --- a/runtime/doc/rileft.txt +++ b/runtime/doc/rileft.txt @@ -70,7 +70,7 @@ o Invocations o Typing backwards *ins-reverse* ---------------- - In lieu of using full-fledged the 'rightleft' option, one can opt for + In lieu of using the full-fledged 'rightleft' option, one can opt for reverse insertion. When the 'revins' (reverse insert) option is set, inserting happens backwards. This can be used to type right-to-left text. When inserting characters the cursor is not moved and the text diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 1acf7e6b5e..a8d8d7d9b8 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1384,11 +1384,11 @@ To select syntax highlighting file for Euphoria, as well as for auto-detecting the *.e and *.E file extensions as Euphoria file type, add the following line to your startup file: > - :let filetype_euphoria="euphoria3" + :let filetype_euphoria = "euphoria3" - or +< or > - :let filetype_euphoria="euphoria4" + :let filetype_euphoria = "euphoria4" ERLANG *erlang.vim* *ft-erlang-syntax* diff --git a/runtime/ftplugin/eruby.vim b/runtime/ftplugin/eruby.vim index 3c18bada78..e67b00b278 100644 --- a/runtime/ftplugin/eruby.vim +++ b/runtime/ftplugin/eruby.vim @@ -3,7 +3,7 @@ " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2019 Jan 06 +" Last Change: 2020 Jun 28 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -118,7 +118,7 @@ endif " TODO: comments= setlocal commentstring=<%#%s%> -let b:undo_ftplugin = "setl cms< " +let b:undo_ftplugin = "setl cms< " . \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo diff --git a/runtime/ftplugin/ruby.vim b/runtime/ftplugin/ruby.vim index b4a8eaa0d8..4a476fd8cf 100644 --- a/runtime/ftplugin/ruby.vim +++ b/runtime/ftplugin/ruby.vim @@ -3,7 +3,7 @@ " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2019 Nov 06 +" Last Change: 2020 Feb 13 if (exists("b:did_ftplugin")) finish @@ -112,7 +112,7 @@ else if !exists('g:ruby_default_path') if has("ruby") && has("win32") ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) ) - elseif executable('ruby') + elseif executable('ruby') && !empty($HOME) let g:ruby_default_path = s:query_path($HOME) else let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val') diff --git a/runtime/indent/ruby.vim b/runtime/indent/ruby.vim index 657aa763b1..2a267fdab3 100644 --- a/runtime/indent/ruby.vim +++ b/runtime/indent/ruby.vim @@ -4,6 +4,7 @@ " Previous Maintainer: Nikolai Weibull <now at bitwi.se> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> +" Last Change: 2021 Feb 03 " 0. Initialization {{{1 " ================= diff --git a/runtime/syntax/8th.vim b/runtime/syntax/8th.vim index ddc1084c9f..d543489b72 100644 --- a/runtime/syntax/8th.vim +++ b/runtime/syntax/8th.vim @@ -293,7 +293,7 @@ syn region eighthComment start="\zs\\" end="$" contains=eighthTodo " Define the default highlighting. if !exists("did_eighth_syntax_inits") let did_eighth_syntax_inits=1 - " The default methods for highlighting. Can be overriden later. + " The default methods for highlighting. Can be overridden later. hi def link eighthTodo Todo hi def link eighthOperators Operator hi def link eighthMath Number diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index d3d8f4f435..01915d23d7 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2020 Jul 28 +" Last Change: 2021 Jun 13 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/redif.vim b/runtime/syntax/redif.vim index 725067fd32..198d5c7530 100644 --- a/runtime/syntax/redif.vim +++ b/runtime/syntax/redif.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: ReDIF " Maintainer: Axel Castellane <axel.castellane@polytechnique.edu> -" Last Change: 2013 April 17 +" Last Change: 2021 Jun 17 " Original Author: Axel Castellane " Source: http://openlib.org/acmes/root/docu/redif_1.html " File Extension: rdf diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index 0de63d0ef3..13d6d9efd8 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -3,7 +3,7 @@ " Maintainer: Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2019 Jul 13 +" Last Change: 2021 Jun 06 " ---------------------------------------------------------------------------- " " Previous Maintainer: Mirko Nasato @@ -66,7 +66,7 @@ endfunction com! -nargs=* SynFold call s:run_syntax_fold(<q-args>) " Not-Top Cluster {{{1 -syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses +syn cluster rubyNotTop contains=@rubyCommentNotTop,@rubyStringNotTop,@rubyRegexpSpecial,@rubyDeclaration,@rubyExceptionHandler,@rubyClassOperator,rubyConditional,rubyModuleName,rubyClassName,rubySymbolDelimiter,rubyParentheses,@Spell " Whitespace Errors {{{1 if exists("ruby_space_errors") @@ -92,7 +92,7 @@ if exists("ruby_operators") || exists("ruby_pseudo_operators") syn match rubyBooleanOperator "\%(\w\|[^\x00-\x7F]\)\@1<!!\|&&\|||" syn match rubyRangeOperator "\.\.\.\=" syn match rubyAssignmentOperator "=>\@!\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|||=\||=\|%=\|+=\|>>=\|<<=\|\^=" - syn match rubyAssignmentOperator "=>\@!" containedin=rubyBlockParameterList " TODO: this is inelegant + syn match rubyAssignmentOperator "=>\@!" contained containedin=rubyBlockParameterList " TODO: this is inelegant syn match rubyEqualityOperator "===\|==\|!=\|!\~\|=\~" syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\%(\w\|[^\x00-\x7F]\)[?!]\=\|[]})]\)\@2<=\[" end="]" contains=ALLBUT,@rubyNotTop @@ -134,10 +134,10 @@ syn match rubyCurlyBraceEscape "\\[{}]" contained display syn match rubyAngleBracketEscape "\\[<>]" contained display syn match rubySquareBracketEscape "\\[[\]]" contained display -syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained -syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained -syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained -syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" end="\]" transparent contained syn cluster rubySingleCharEscape contains=rubyBackslashEscape,rubyQuoteEscape,rubySpaceEscape,rubyParenthesisEscape,rubyCurlyBraceEscape,rubyAngleBracketEscape,rubySquareBracketEscape syn cluster rubyNestedBrackets contains=rubyNested.\+ @@ -193,7 +193,7 @@ SynFold ':' syn region rubySymbol matchgroup=rubySymbolDelimiter start="[]})\"': syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@=" -syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop containedin=rubyBlockParameterList +syn region rubyParentheses start="(" end=")" contains=ALLBUT,@rubyNotTop contained containedin=rubyBlockParameterList syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\_s*\)\@32<=|" end="|" contains=ALLBUT,@rubyNotTop,@rubyProperOperator if exists('ruby_global_variable_error') @@ -332,7 +332,7 @@ SynFold '<<' syn region rubyString start=+\%(\%(class\|::\|\.\@1<!\.\)\_s*\|\%([ syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable nextgroup=rubyAliasDeclaration2 skipwhite syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,@rubyGlobalVariable syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable -syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite skipnl +syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyClassName,rubyScopeOperator nextgroup=rubySuperClassOperator skipwhite syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyModuleName,rubyScopeOperator syn match rubyMethodName "\<\%([_[:alpha:]]\|[^\x00-\x7F]\)\%([_[:alnum:]]\|[^\x00-\x7F]\)*[?!=]\=\%([[:alnum:]_.:?!=]\|[^\x00-\x7F]\)\@!" contained containedin=rubyMethodDeclaration @@ -462,7 +462,7 @@ endif syn match rubyDefinedOperator "\%#=1\<defined?" display " 1.9-style Hash Keys and Keyword Parameters {{{1 -syn match rubySymbol "\%([{(|,]\_s*\)\@<=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 +syn match rubySymbol "\%(\w\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[?!]\=::\@!"he=e-1 contained containedin=rubyBlockParameterList,rubyCurlyBlock syn match rubySymbol "[]})\"':]\@1<!\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="he=e-1 syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 55c47aa34d..7aae7965a9 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -200,7 +200,7 @@ syn keyword vimAugroupKey contained aug[roup] " Operators: {{{2 " ========= -syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue,vim9Comment +syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile @@ -214,12 +214,13 @@ endif " ========= syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand -syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody +syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody + syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList else - syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList + syn region vimFuncBody contained start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList endif syn match vimFuncVar contained "a:\(\K\k*\|\d\+\)" syn match vimFuncSID contained "\c<sid>\|\<s:" @@ -228,6 +229,9 @@ syn match vimFuncBlank contained "\s\+" syn keyword vimPattern contained start skip end +" vimTypes : new for vim9 + syn match vimType ":\s*\zs\<\(bool\|number\|float\|string\|blob\|list<\|dict<\|job\|channel\|func\)\>" + " Special Filenames, Modifiers, Extension Removal: {{{2 " =============================================== syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst @@ -355,7 +359,7 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' " Set command and associated set-options (vimOptions) with comment {{{2 -syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" oneline keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod +syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar syn match vimSetSep contained "[,:]" @@ -390,7 +394,7 @@ syn case match " Maps: {{{2 " ==== syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs -syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs +syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] tno[remap] tm[ap] vm[ap] vmapc[lear] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword nvimMap tn[oremap] tm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs syn keyword vimMap mapc[lear] smapc[lear] syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs @@ -981,6 +985,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimSyntax vimCommand hi def link vimSynType vimSpecial hi def link vimTodo Todo + hi def link vimType Type hi def link vimUnmap vimMap hi def link vimUserAttrbCmpltFunc Special hi def link vimUserAttrbCmplt vimSpecial |