annotate runtime/syntax/vdf.vim @ 34817:e7137eab4b6f

runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants Commit: https://github.com/vim/vim/commit/a2385c23349935d4bd6780a538f3a8f46a29d952 Author: jiangyinzuo <jiangyinzuo@foxmail.com> Date: Mon Apr 8 22:48:43 2024 +0200 runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants closes: https://github.com/vim/vim/issues/14406 Signed-off-by: jiangyinzuo <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 08 Apr 2024 23:00:02 +0200
parents 0827d3d6d8c0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30324
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: Valve Data Format
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: ObserverOfTime <chronobserver@disroot.org>
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Filenames: *.vdf
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: 2022 Sep 15
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists('b:current_syntax')
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpoptions
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpoptions&vim
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 " Comment
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 syn keyword vdfTodo contained TODO FIXME XXX
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn match vdfComment +//.*+ contains=vdfTodo
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 " Macro
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 syn match vdfMacro /^\s*#.*/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 " Tag
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn region vdfTag start=/"/ skip=/\\"/ end=/"/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 \ nextgroup=vdfValue skipwhite oneline
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 " Section
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 syn region vdfSection matchgroup=vdfBrace
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ start=/{/ end=/}/ transparent fold
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ contains=vdfTag,vdfSection,vdfComment,vdfConditional
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 " Conditional
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn match vdfConditional /\[\$\w\{1,1021}\]/ nextgroup=vdfTag
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 " Value
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn region vdfValue start=/"/ skip=/\\"/ end=/"/
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 \ oneline contained contains=vdfVariable,vdfNumber,vdfEscape
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 syn region vdfVariable start=/%/ skip=/\\%/ end=/%/ oneline contained
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn match vdfEscape /\\[nt\\"]/ contained
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 syn match vdfNumber /"-\?\d\+"/ contained
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 hi def link vdfBrace Delimiter
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 hi def link vdfComment Comment
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 hi def link vdfConditional Constant
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 hi def link vdfEscape SpecialChar
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 hi def link vdfMacro Macro
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 hi def link vdfNumber Number
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 hi def link vdfTag Keyword
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 hi def link vdfTodo Todo
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 hi def link vdfValue String
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 hi def link vdfVariable Identifier
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 let b:current_syntax = 'vdf'
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 let &cpoptions = s:cpo_save
0827d3d6d8c0 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 unlet s:cpo_save