mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(runtime/genvimvim): omit s[ubstitute] from vimCommand #18480
It's special cased by the vimSubst syntax group, and isn't present in Vim's vimCommand group. For example, this fixes `call s:Foo()` highlighting `:` as Error in Nvim, as the `s` is parsed as vimCommand rather than as vimUserFunc since `contains=vimCommand` was added to vimUserFunc (and vimFunc) in a rt update. Interestingly, `g:`, `l:`, etc. have the same issues due to :global, :list, etc. Vim also has that problem, so it should ideally be fixed upstream. We could also omit g[lobal] from vimCommand and rely on vimGlobal instead, but it doesn't work in some cases, like when there's a `:` before the command. Also, Vim matches only `g` in vimCommand for some reason, which doesn't produce any highlight for `:global/foo/bar` (with Nvim you at least get some highlights on the `global` bit despite the leading `:`). Also, remove special handling of :py3 in syntax/vim.vim, as the generator seems to have no problems finding it.
This commit is contained in:
@@ -120,9 +120,6 @@ else
|
||||
com! -nargs=* VimFoldt <args>
|
||||
endif
|
||||
|
||||
" commands not picked up by the generator (due to non-standard format) {{{2
|
||||
syn keyword vimCommand contained py3
|
||||
|
||||
" Deprecated variable options {{{2
|
||||
if exists("g:vim_minlines")
|
||||
let g:vimsyn_minlines= g:vim_minlines
|
||||
|
||||
Reference in New Issue
Block a user