Skip to content

Commit

Permalink
runtime(vim): Improve Vim9 and legacy-script comment highlighting
Browse files Browse the repository at this point in the history
This is a first-pass attempt to limit matching of Vim9 and legacy-script
comments to the appropriate syntactic contexts.

Vim9-script comments are highlighted at top level in a Vim9-script file,
in all :def functions, and in all :autocmd and :commmand command blocks.
Legacy-script comments are highlighted at top level in a legacy script
file, in all :func functions and in the Vim9-script preamble before the
:vim9script marker command.

Fixes vim#13047, vim#11307 and vim#9587.
  • Loading branch information
dkearns committed Apr 8, 2024
1 parent 3c4d2e7 commit 0eb9d10
Show file tree
Hide file tree
Showing 25 changed files with 501 additions and 73 deletions.
2 changes: 1 addition & 1 deletion runtime/ftplugin/vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ setlocal isk+=#
setlocal keywordprg=:help

" Comments starts with # in Vim9 script. We have to guess which one to use.
if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>'
setlocal commentstring=#%s
else
setlocal commentstring=\"%s
Expand Down
3 changes: 2 additions & 1 deletion runtime/syntax/generator/gen_syntax_vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi (h_east)
" URL: https://github.com/vim-jp/syntax-vim-ex
" Last Change: 2024 Mar 28
" Version: 2.0.7
" Version: 2.0.8

let s:keepcpo= &cpo
set cpo&vim
Expand Down Expand Up @@ -286,6 +286,7 @@ function! s:get_vim_command_type(cmd_name)
\ 'append', 'insert',
\ 'Next', 'Print', 'X',
\ 'new', 'popup',
\ 'vim9script',
\ ]
" Required for original behavior
" \ 'global', 'vglobal'
Expand Down
104 changes: 73 additions & 31 deletions runtime/syntax/generator/vim.vim.base
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ endif
let s:keepcpo= &cpo
set cpo&vim

" TODO: pinched from ftplugin/vim.vim for now
let s:isVim9Script = "\n" .. getline(1, 100)->join("\n") =~# '\n\s*vim9\%[script]\>'

" vimTodo: contains common special-notices for comments {{{2
" Use the vimCommentGroup cluster to add your own.
syn keyword vimTodo contained COMBAK FIXME TODO XXX
Expand Down Expand Up @@ -156,13 +159,13 @@ endif
" Numbers {{{2
" =======
syn case ignore
syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment
syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,@vimComment
syn case match

" All vimCommands are contained by vimIsCommand. {{{2
Expand Down Expand Up @@ -208,7 +211,7 @@ syn keyword vimFTOption contained detect indent off on plugin

" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
Expand Down Expand Up @@ -323,9 +326,10 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained

" User-Specified Commands: {{{2
" =======================
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,@vimComment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
syn match vimUserCmdName contained "\<\u\w*\>" nextgroup=vimUserCmdBlock skipwhite
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter,vimCmdBlock,vimUserCmdName
syn match vimUserAttrbError contained "-\a\+\ze\s"
syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
Expand All @@ -347,20 +351,41 @@ syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*
syn case match
syn match vimUserAttrbCmplt contained "custom,\u\w*"

syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimFuncBodyList,vim9Comment,vim9LineComment

" Lower Priority Comments: after some vim commands... {{{2
" =======================
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Vim9 comments - TODO: might be highlighted while they don't work
syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
" Vim9 comment inside expression
syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
if s:isVim9Script
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString contained
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString contained
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' contained
" Vim9 comments - TODO: might be highlighted while they don't work
syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
" Vim9 comment inside expression
" syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
" syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
" syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString

syn cluster vimComment contains=vim9Comment
else
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Vim9 comments - TODO: might be highlighted while they don't work
syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString contained
syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString contained
" Vim9 comment inside expression
syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString contained
syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString contained
syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString contained

syn cluster vimComment contains=vimComment
endif

" Environment Variables: {{{2
" =====================
Expand Down Expand Up @@ -450,7 +475,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="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" 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,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 "[,:]"
Expand Down Expand Up @@ -482,9 +507,10 @@ syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
" =======
syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod
syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vimAutoCmdBlock
syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock
syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimFuncBodyList,vim9Comment,vim9LineComment

" Echo And Execute: -- prefer strings! {{{2
" ================
Expand Down Expand Up @@ -624,7 +650,7 @@ if has("conceal")
syn match vimSynCcharValue contained "\S"
endif

syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,@vimComment
syn cluster vimFuncBodyList add=vimSyntax

" Syntax: case {{{2
Expand Down Expand Up @@ -713,7 +739,7 @@ syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotatio

" Highlighting: {{{2
" ============
syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment,vim9Comment
syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror")
syn match vimHiCtermError contained "\D\i*"
endif
Expand Down Expand Up @@ -769,16 +795,21 @@ syn match vimCtrlChar "[- -]"

" Beginners - Patterns that involve ^ {{{2
" =========
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle,vimComment
syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
if s:isVim9Script
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
else
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
endif
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
" Note: Look-behind to work around nextgroup skipnl consuming leading whitespace and preventing a match
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
syn match vimContinue "^\s*\zs\\"
syn match vimContinueComment '^\s*\zs["#]\\ .*' contained
syn cluster vimContinue contains=vimContinue,vimContinueComment
syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained

" Searches And Globals: {{{2
" ====================
Expand All @@ -787,6 +818,15 @@ syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained
syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1
syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst1

" Vim9script regions: {{{2
" ==================

syn cluster vimLegacyTop contains=TOP,vimPreVim9script,vim9Comment,vim9LineComment
syn region vimPreVim9script start="\%^" end="^\ze\s*vim9s\%[cript]\>" contains=@vimLegacyTop,vimComment,vimLineComment

syn keyword vim9ScriptArg noclear
syn keyword vimCommand vim9s[cript] nextgroup=vim9ScriptArg skipwhite

" Embedded Scripts: {{{2
" ================
" perl,ruby : Benoit Cerrina
Expand Down Expand Up @@ -994,6 +1034,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBufnrWarn vimWarn
endif

hi def link vim9ScriptArg Special
hi def link vimAbb vimCommand
hi def link vimAddress vimMark
hi def link vimAugroupBang vimBang
Expand All @@ -1013,6 +1054,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vim9Comment Comment
hi def link vimCommentString vimString
hi def link vimCommentTitle PreProc
hi def link vim9CommentTitle PreProc
hi def link vimCondHL vimCommand
hi def link vimConst vimCommand
hi def link vimContinue Special
Expand Down
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_00.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
>"+0#0000e05#ffffff0| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
@75
|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
| +0#e000e06&@17|\| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
@75
@75
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
@75
|"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |1@1|L|,| |2|0|9|B| @31|1|,|1| @10|A|l@1|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_99.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
|"+0#0000e05#ffffff0| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
@75
|i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51
@2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#0000000&|n|o|f|i|l|e| ||+0#af5f00255&| +0#0000000&|r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1
| +0#e000e06&@17|\| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
@75
@75
|"+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1@1|3|0|7| |a|n|d| |#|1@1|5|6|0| +0#0000000&@48
@75
>"+0#0000e05&| |T|h|i|s| |i|s| |w|h|a|t| |w|e| |c|a|l@1| |"| |b|l|a|h| +0#0000000&@45
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |1@1|L|,| |2|0|9|B| @31|1@1|,|1| @9|A|l@1|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_ex_comment-vim9_00.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
>v+0#af5f00255#ffffff0|i|m|9|s|c|r|i|p|t| +0#0000000&@64
@75
|#+0#0000e05&| |V|i|m| |c|o|m@1|e|n|t|s| +0#0000000&@60
@75
|#+0#0000e05&| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@53
@75
| +0#0000e05&|#| |s|t|r|i|n|g| |o|n|l|y| |r|e|c|o|g|n|i|s|e|d| |w|i|t|h| |l|e|a|d|i|n|g| |c|h|a|r| +0#0000000&@31
@1|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&@57
@75
|f+0#af5f00255&|u|n|c|t|i|o|n|!| +0#0000000&|F|o@1|(+0#e000e06&|)| +0#0000000&@59
| +0#0000e05&@1|"| |L|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@49
@2|#| |4+0#e000002&|2| +0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@58
|e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
@75
|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
@75
@57|1|,|1| @10|T|o|p|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_ex_comment-vim9_01.dump
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
| +0&#ffffff0@74
|d+0#af5f00255&|e|f|!| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@64
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
> @74
|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|-+0#af5f00255&|c+0#e000e06&|o|u|n|t| +0#0000000&|F|o@1|C|o|m@1|a|n|d| |{+0#e000e06&| +0#0000000&@47
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|}+0#e000e06&| +0#0000000&@73
@75
|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|N|e|w|F|i|l|e| +0#0000000&|*| |{+0#e000e06&| +0#0000000&@52
| +0#0000e05&@1|#| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| +0#0000000&@51
@2|"+0#e000002&|u|s|e|l|e|s@1| |s|t|r|i|n|g|"| +0#0000000&|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@46
|}+0#e000e06&| +0#0000000&@73
@75
@75
|#+0#0000e05&| +0#0000000&|I+0#e000e06&|s@1|u|e|:| +0#0000e05&|#|1|3|0|4|7| +0#0000000&@59
@75
@57|1|9|,|0|-|1| @7|5|9|%|

0 comments on commit 0eb9d10

Please sign in to comment.