|
3 | 3 | " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> |
4 | 4 | " Doug Kearns <dougkearns@gmail.com> |
5 | 5 | " URL: https://github.com/vim-jp/syntax-vim-ex |
6 | | -" Last Change: 2024 Apr 12 |
| 6 | +" Last Change: 2024 Apr 13 |
7 | 7 | " Former Maintainer: Charles E. Campbell |
8 | 8 |
|
9 | 9 | " DO NOT CHANGE DIRECTLY. |
@@ -191,9 +191,9 @@ syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper, |
191 | 191 | " (buftype != nofile test avoids having append, change, insert show up in the command window) |
192 | 192 | " ======================= |
193 | 193 | if &buftype != 'nofile' |
194 | | - syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" |
195 | | - syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" |
196 | | - syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" |
| 194 | + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$" extend |
| 195 | + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$" extend |
| 196 | + syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$" extend |
197 | 197 | endif |
198 | 198 |
|
199 | 199 | " Behave! {{{2 |
@@ -244,12 +244,14 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") |
244 | 244 | syn match vimOperError ")" |
245 | 245 | endif |
246 | 246 |
|
247 | | -" Functions : Tag is provided for those who wish to highlight tagged functions {{{2 |
| 247 | +" Functions: Tag is provided for those who wish to highlight tagged functions {{{2 |
248 | 248 | " ========= |
249 | 249 | syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag |
250 | 250 | syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag |
251 | | -syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst |
252 | | -syn cluster vimDefBodyList contains=@vimCmdList,vimCmplxRepeat,vim9Comment,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vim9LineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst |
| 251 | + |
| 252 | +syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold |
| 253 | +syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert |
| 254 | +syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment |
253 | 255 |
|
254 | 256 | syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList |
255 | 257 | syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey |
@@ -284,9 +286,9 @@ syn match vimEndfunction "\<endf\%[unction]\>" |
284 | 286 | syn match vimEnddef "\<enddef\>" |
285 | 287 |
|
286 | 288 | if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' |
287 | | - syn region vimFuncFold start="\<fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="\<endf\%[unction]\>" contains=vimFunction fold keepend transparent |
288 | | - syn region vimFuncFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend transparent |
289 | | - syn region vimFuncFold start="\<def\s\+new\i\+(" end="\<enddef\>" contains=vimDef fold keepend transparent |
| 289 | + syn region vimFuncFold start="^\s*:\=\s*fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="^\s*:\=\s*endf\%[unction]\>" contains=vimFunction fold keepend extend transparent |
| 290 | + syn region vimFuncFold start="^\s*:\=\s*def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="^\s*:\=\s*enddef\>" contains=vimDef fold keepend extend transparent |
| 291 | + syn region vimFuncFold start="^\s*:\=\s*def\s\+new\i\+(" end="^\s*:\=\s*enddef\>" contains=vimDef fold keepend extend transparent |
290 | 292 | endif |
291 | 293 |
|
292 | 294 | syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>" |
@@ -502,7 +504,7 @@ syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars |
502 | 504 | syn match vimUnletBang contained "!" skipwhite nextgroup=vimUnletVars |
503 | 505 | syn region vimUnletVars contained start="$\I\|\h" skip="\n\s*\\" end="$" end="|" contains=vimVar,vimEnvvar,vimContinue,vimString,vimNumber |
504 | 506 |
|
505 | | -VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(trim\s\+\%(eval\s\+\)\=\|eval\s\+\%(trim\s\+\)\=\)\=\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' |
| 507 | +VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(trim\s\+\%(eval\s\+\)\=\|eval\s\+\%(trim\s\+\)\=\)\=\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' extend |
506 | 508 | syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc |
507 | 509 |
|
508 | 510 | " For: {{{2 |
|
0 commit comments