view runtime/syntax/slrnsc.vim @ 33430:18f4a04384f3 v9.0.1973

patch 9.0.1973: Clean up cmdline option completion code Commit: https://github.com/vim/vim/commit/6d113472601fa6f3a444a95ef7b11d4309215117 Author: Yee Cheng Chin <ychin.git@gmail.com> Date: Mon Oct 2 21:38:39 2023 +0200 patch 9.0.1973: Clean up cmdline option completion code Problem: Clean up cmdline option completion code Solution: Fix various minor problems - Fix manual array size calculations to just use `ARRAY_LENGTH()`. - Fix unintentional typo in comments due to copy-paste error. - Fix assert_equal() usages to pass the expected value to first parameter instead of 2nd one to avoid confusion. - Fix signed vs unsigned warnings - Correct misplaced comments about set_op_T and set_prefix_T and fix a typo in another comment closes: #13249 closes: #13237 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Oct 2023 21:45:07 +0200
parents 46763b01cd9a
children
line wrap: on
line source

" Vim syntax file
" Language:	Slrn score file (based on slrn 0.9.8.0)
" Maintainer:	Preben 'Peppe' Guldberg <peppe@wielders.org>
" Last Change:	8 Oct 2004

" quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" characters in newsgroup names
setlocal isk=@,48-57,.,-,_,+

syn match slrnscComment		"%.*$"
syn match slrnscSectionCom	".].*"lc=2

syn match slrnscGroup		contained "\(\k\|\*\)\+"
syn match slrnscNumber		contained "\d\+"
syn match slrnscDate		contained "\(\d\{1,2}[-/]\)\{2}\d\{4}"
syn match slrnscDelim		contained ":"
syn match slrnscComma		contained ","
syn match slrnscOper		contained "\~"
syn match slrnscEsc		contained "\\[ecC<>.]"
syn match slrnscEsc		contained "[?^]"
syn match slrnscEsc		contained "[^\\]$\s*$"lc=1

syn keyword slrnscInclude	contained include
syn match slrnscIncludeLine	"^\s*Include\s\+\S.*$"

syn region slrnscSection	matchgroup=slrnscSectionStd start="^\s*\[" end='\]' contains=slrnscGroup,slrnscComma,slrnscSectionCom
syn region slrnscSection	matchgroup=slrnscSectionNot start="^\s*\[\~" end='\]' contains=slrnscGroup,slrnscCommas,slrnscSectionCom

syn keyword slrnscItem		contained Age Bytes Date Expires From Has-Body Lines Message-Id Newsgroup References Subject Xref

syn match slrnscScoreItem	contained "%.*$"						skipempty nextgroup=slrnscScoreItem contains=slrnscComment
syn match slrnscScoreItem	contained "^\s*Expires:\s*\(\d\{1,2}[-/]\)\{2}\d\{4}\s*$"	skipempty nextgroup=slrnscScoreItem contains=slrnscItem,slrnscDelim,slrnscDate
syn match slrnscScoreItem	contained "^\s*\~\=\(Age\|Bytes\|Has-Body\|Lines\):\s*\d\+\s*$"	skipempty nextgroup=slrnscScoreItem contains=slrnscOper,slrnscItem,slrnscDelim,slrnscNumber
syn match slrnscScoreItemFill	contained ".*$"							skipempty nextgroup=slrnscScoreItem contains=slrnscEsc
syn match slrnscScoreItem	contained "^\s*\~\=\(Date\|From\|Message-Id\|Newsgroup\|References\|Subject\|Xref\):"	nextgroup=slrnscScoreItemFill contains=slrnscOper,slrnscItem,slrnscDelim
syn region slrnscScoreItem	contained matchgroup=Special start="^\s*\~\={::\=" end="^\s*}" skipempty nextgroup=slrnscScoreItem contains=slrnscScoreItem

syn keyword slrnscScore		contained Score
syn match slrnscScoreIdent	contained "%.*"
syn match slrnScoreLine		"^\s*Score::\=\s\+=\=[-+]\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent

" Define the default highlighting.
" Only when an item doesn't have highlighting yet

hi def link slrnscComment		Comment
hi def link slrnscSectionCom	slrnscComment
hi def link slrnscGroup		String
hi def link slrnscNumber		Number
hi def link slrnscDate		Special
hi def link slrnscDelim		Delimiter
hi def link slrnscComma		SpecialChar
hi def link slrnscOper		SpecialChar
hi def link slrnscEsc		String
hi def link slrnscSectionStd	Type
hi def link slrnscSectionNot	Delimiter
hi def link slrnscItem		Statement
hi def link slrnscScore		Keyword
hi def link slrnscScoreIdent	Identifier
hi def link slrnscInclude		Keyword


let b:current_syntax = "slrnsc"

"EOF	vim: ts=8 noet tw=200 sw=8 sts=0