0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

runtime(vim): update vim generator syntax script

* include the base64* functions
* allow to shorten finally

closes: #16346

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
h-east
2024-12-30 15:40:24 +01:00
committed by Christian Brabandt
parent 2bee7e43e1
commit f27e80a6e1
2 changed files with 21 additions and 14 deletions

View File

@@ -134,9 +134,6 @@ function s:parse_vim_command(cmd)
for idx in range(1, strlen(lcmd[key][my]))
let matched = 0
for pre in range(my - 1, 0, -1)
if pre == my
continue
endif
" Avoiding conflicts shortened command and special commands
" - weird abbreviations for delete. (See :help :d)
" - k{char} is used as mark. (See :help :k)
@@ -197,6 +194,16 @@ function s:parse_vim_command(cmd)
let item.syn_str = item.name
call add(a:cmd, copy(item))
" ":fina" means ":finally" in legacy script, for backwards compatibility.
" (From Vim source code find_ex_command() in ex_docmd.c)
call map(a:cmd, {_, v ->
\ v.name ==# 'final' ?
\ extend(copy(v), {'omit_idx': -1, 'syn_str': v.name}) :
\ v.name ==# 'finally' ?
\ extend(copy(v), {'omit_idx': 3, 'syn_str': 'fina[lly]'}) :
\ v
\ })
if empty(a:cmd)
throw 'cmd is empty'
endif