Skip to content

Commit

Permalink
runtime(vim): Improve Vim9 and legacy-script comment highlighting (#1…
Browse files Browse the repository at this point in the history
…3104)

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 #13047, #11307 and #9587.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
dkearns committed Apr 10, 2024
1 parent 1817ccd commit 04e5363
Show file tree
Hide file tree
Showing 30 changed files with 622 additions and 91 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -222,6 +222,7 @@ runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/unison.vim @chuwy
runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/vim.vim @dkearns
runtime/ftplugin/wast.vim @rhysd
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
Expand Down
8 changes: 4 additions & 4 deletions runtime/ftplugin/vim.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: Vim
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Language: Vim
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Apr 08
" Former Maintainer: Bram Moolenaar <Bram@vim.org>

" Only do this when not done yet for this buffer
Expand Down 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
Expand Up @@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi (h_east)
" URL: https://github.com/vim-jp/syntax-vim-ex
" Last Change: 2024 Apr 07
" Version: 2.1.0
" Version: 2.1.1

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
122 changes: 86 additions & 36 deletions runtime/syntax/generator/vim.vim.base
Expand Up @@ -19,6 +19,8 @@ endif
let s:keepcpo= &cpo
set cpo&vim

let s:vim9script = "\n" .. getline(1, 32)->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 +158,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 +210,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 @@ -299,15 +301,21 @@ syn match vimUserType contained "\<\u\w*\>"

syn cluster vimType contains=vimType,vimCompoundType,vimUserType

" Keymaps: (Vim Project Addition) {{{2
" Keymaps: {{{2
" =======

" TODO: handle Vim9 script comments when something like #13104 is merged
syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment
syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,@vimKeymapLineComment
syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation
syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation
syn match vimKeymapTailComment "\S.*" contained
syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle

" TODO: remove when :" comment is matched in parts as "ex-colon comment" --djk
if s:vim9script
syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
else
syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle
endif
syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment

syn region vimKeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart

Expand All @@ -323,9 +331,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 +356,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=@vimDefBodyList

" 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
syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'

if s:vim9script
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
" 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
" 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 +480,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 +512,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=@vimDefBodyList

" Echo And Execute: -- prefer strings! {{{2
" ================
Expand Down Expand Up @@ -624,7 +655,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 +744,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 +800,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:vim9script
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 +823,17 @@ 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

" Vim9 Script Regions: {{{2
" ==================

if s:vim9script
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
endif

" Embedded Scripts: {{{2
" ================
" perl,ruby : Benoit Cerrina
Expand Down Expand Up @@ -994,6 +1041,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 +1061,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 Expand Up @@ -1070,6 +1119,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHLGroup vimGroup
hi def link vimInsert vimString
hi def link vimIskSep Delimiter
hi def link vim9KeymapLineComment vimKeymapLineComment
hi def link vimKeymapLineComment vimComment
hi def link vimKeymapTailComment vimComment
hi def link vimLet vimCommand
Expand Down Expand Up @@ -1192,5 +1242,5 @@ delc VimFoldP
delc VimFoldr
delc VimFoldt
let &cpo = s:keepcpo
unlet s:keepcpo
unlet s:keepcpo s:vim9script
" vim:ts=18 fdm=marker ft=vim
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim9_keymap_00.dump
@@ -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| |K|e|y|m|a|p| |f|i|l|e| |f|o|r| |s|y|n|t|a|x| |t|e|s|t|i|n|g| +0#0000000&@38
@75
|s+0#af5f00255&|c|r|i|p|t|e|n|c|o|d|i|n|g| +0#0000000&|u|t|f|-+0#af5f00255&|8+0#e000002&| +0#0000000&@54
@75
|l+0#af5f00255&|e|t| +0#0000000&|b+0#00e0e07&|:|k|e|y|m|a|p|_|n|a|m|e| +0#0000000&|=+0#af5f00255&| +0#0000000&|"+0#e000002&|s|y|n|t|a|x|-|t|e|s|t|"| +0#0000000&@41
@75
|l+0#af5f00255&|o|a|d|k|e|y|m|a|p| +0#0000000&@64
@75
|#+0#0000e05&| |L|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@60
@75
@2|#+0#0000e05&| |A|n|o|t|h|e|r| |l|i|n|e| |c|o|m@1|e|n|t| +0#0000000&@50
@75
|a| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| +0#0000000&@54
|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| +0#0000000&@33
@75
|#+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| +0#0000000&@56
|<+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| +0#0000000&@2
@57|1|,|1| @10|T|o|p|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim9_keymap_01.dump
@@ -0,0 +1,20 @@
| +0&#ffffff0@74
|a| |A| @3|B+0#0000e05&|a|s|i|c| |m|a|p@1|i|n|g| +0#0000000&@54
|'|a| |á| @2|M+0#0000e05&|o|r|e| |t|h|a|n| |o|n|e| |c|h|a|r| |i|n| |f|i|r|s|t| |c|o|l|u|m|n| +0#0000000&@33
@75
|#+0#0000e05&| |S|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| +0#0000000&@56
><+0#e000e06&|c|h|a|r|-|6|2|>| +0#0000000&@5|B| @14|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |-| |d|e|c|i|m|a|l| +0#0000000&@2
|c| @13|<+0#e000e06&|c|h|a|r|-|0|1|0|3|>| +0#0000000&@4|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |R|H|S| |-| |o|c|t|a|l| +0#0000000&@4
|<+0#e000e06&|c|h|a|r|-|0|x|0@1|6|4|>| +0#0000000&@1|<+0#e000e06&|c|h|a|r|-|0|x|0@1|4@1|>| +0#0000000&@2|S+0#0000e05&|p|e|c|i|a|l| |n|o|t|a|t|i|o|n| |a|l@1|o|w|e|d| |i|n| |L|H|S| |a|n|d| |R|H|S| |-| |h|e
|x|a|d|e|c|i|m|a|l| +0#0000000&@65
@75
|#+0#0000e05&| |V|i|m|-|s|c|r|i|p|t| |c|o|m@1|e|n|t| |c|h|a|r|a|c|t|e|r|s| +0#0000000&@43
|\|#| |<+0#e000e06&|c|h|a|r|-|0|x|0@1|a|3|>| +0#0000000&@14|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
|n|t| +0#0000000&@72
|"| |“| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |l|e|g|a|c|y|-|s|c|r|i|p|t| |c|o|m
@1|e|n|t| +0#0000000&@70
|:| |#| @27|L+0#0000e05&|i|n|e| |s|h|o|u|l|d| |n|o|t| |m|a|t|c|h| |a|s| |a| |V|i|m|9|-|s|c|r|i|p|t| |c|o|m@1|e
|n|t| +0#0000000&@72
|~+0#4040ff13&| @73
|~| @73
| +0#0000000&@56|1|9|,|1| @9|B|o|t|

0 comments on commit 04e5363

Please sign in to comment.