runtime: Remove wrong syn oneline keyword from a few syntax files

Also:
- drop a few trailing whitespaces
- mark the oneline keyword for :syn keyword as error in the
  Vim syntax script, add tests for it.

closes: #20018

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Eisuke Kawashima
2026-04-20 15:14:31 +00:00
committed by Christian Brabandt
parent b30803b231
commit 1c88aee1fa
24 changed files with 103 additions and 69 deletions
@@ -375,3 +375,15 @@ syntax cluster typstCodeKeywords
syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\=
syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|...\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\)
" :syntax keyword — oneline accepted but meaningless
syntax keyword TestKw foo bar oneline
syntax keyword TestKw2 oneline baz quux
" :syntax match — oneline accepted but meaningless
syntax match TestMatch /\<foo\>/ oneline
syntax match TestMatch2 oneline /\<bar\>/
" :syntax region — oneline is meaningful here
syntax region TestRegion start=/{/ end=/}/ oneline
syntax region TestRegion2 oneline start=/"/ end=/"/
syntax region TestRegion3 start=/\/\*/ end=/\*\// oneline containedin=ALL