diff options
author | Josh Rahm <rahm@google.com> | 2022-07-18 19:37:18 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2022-07-18 19:37:18 +0000 |
commit | 308e1940dcd64aa6c344c403d4f9e0dda58d9c5c (patch) | |
tree | 35fe43e01755e0f312650667004487a44d6b7941 /scripts/genvimvim.lua | |
parent | 96a00c7c588b2f38a2424aeeb4ea3581d370bf2d (diff) | |
parent | e8c94697bcbe23a5c7b07c292b90a6b70aadfa87 (diff) | |
download | rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.gz rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.bz2 rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.zip |
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'scripts/genvimvim.lua')
-rw-r--r-- | scripts/genvimvim.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/genvimvim.lua b/scripts/genvimvim.lua index ff60b6cce7..868084a583 100644 --- a/scripts/genvimvim.lua +++ b/scripts/genvimvim.lua @@ -44,12 +44,14 @@ local function cmd_kw(prev_cmd, cmd) end -- Exclude these from the vimCommand keyword list, they are handled specially --- in syntax/vim.vim (vimAugroupKey, vimAutoCmd). #9327 -local function is_autocmd_cmd(cmd) +-- in syntax/vim.vim (vimAugroupKey, vimAutoCmd, vimGlobal, vimSubst). #9327 +local function is_special_cased_cmd(cmd) return (cmd == 'augroup' or cmd == 'autocmd' or cmd == 'doautocmd' - or cmd == 'doautoall') + or cmd == 'doautoall' + or cmd == 'global' + or cmd == 'substitute') end local vimcmd_start = 'syn keyword vimCommand contained ' @@ -60,7 +62,7 @@ for _, cmd_desc in ipairs(ex_cmds.cmds) do w('\n' .. vimcmd_start) end local cmd = cmd_desc.command - if cmd:match('%w') and cmd ~= 'z' and not is_autocmd_cmd(cmd) then + if cmd:match('%w') and cmd ~= 'z' and not is_special_cased_cmd(cmd) then w(' ' .. cmd_kw(prev_cmd, cmd)) end prev_cmd = cmd |