Mercurial > vim
annotate runtime/syntax/obj.vim @ 8481:8924d7adbc22 v7.4.1531
commit https://github.com/vim/vim/commit/40e8cb292c36f5057628e570591e8917ac1ca121
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 10 21:10:58 2016 +0100
patch 7.4.1531
Problem: Compiler warning for unitinialized variable. (Dominique Pelle)
Solution: Always give the variable a value.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 10 Mar 2016 21:15:13 +0100 |
parents | a8afba7027ae |
children | 43efa4f5a8ea |
rev | line source |
---|---|
2152 | 1 " Vim syntax file |
2 " Language: 3D wavefront's obj file | |
3 " Maintainer: Vincent Berthoux <twinside@gmail.com> | |
4 " File Types: .obj (used in 3D) | |
2206
a8afba7027ae
Add extra floating point functions.
Bram Moolenaar <bram@vim.org>
parents:
2152
diff
changeset
|
5 " Last Change: 2010 May 18 |
2152 | 6 " |
7 " For version 5.x: Clear all syntax items | |
8 " For version 6.x: Quit when a syntax file was already loaded | |
9 if version < 600 | |
10 syntax clear | |
11 elseif exists("b:current_syntax") | |
12 finish | |
13 endif | |
14 | |
15 syn match objError "^\a\+" | |
16 | |
17 syn match objKeywords "^cstype\s" | |
18 syn match objKeywords "^ctech\s" | |
19 syn match objKeywords "^stech\s" | |
20 syn match objKeywords "^deg\s" | |
21 syn match objKeywords "^curv\(2\?\)\s" | |
22 syn match objKeywords "^parm\s" | |
23 syn match objKeywords "^surf\s" | |
24 syn match objKeywords "^end\s" | |
25 syn match objKeywords "^bzp\s" | |
26 syn match objKeywords "^bsp\s" | |
27 syn match objKeywords "^res\s" | |
28 syn match objKeywords "^cdc\s" | |
29 syn match objKeywords "^con\s" | |
30 | |
31 syn match objKeywords "^shadow_obj\s" | |
32 syn match objKeywords "^trace_obj\s" | |
33 syn match objKeywords "^usemap\s" | |
34 syn match objKeywords "^lod\s" | |
35 syn match objKeywords "^maplib\s" | |
36 syn match objKeywords "^d_interp\s" | |
37 syn match objKeywords "^c_interp\s" | |
38 syn match objKeywords "^bevel\s" | |
39 syn match objKeywords "^mg\s" | |
40 syn match objKeywords "^s\s" | |
41 syn match objKeywords "^con\s" | |
42 syn match objKeywords "^trim\s" | |
43 syn match objKeywords "^hole\s" | |
44 syn match objKeywords "^scrv\s" | |
45 syn match objKeywords "^sp\s" | |
46 syn match objKeywords "^step\s" | |
47 syn match objKeywords "^bmat\s" | |
48 syn match objKeywords "^csh\s" | |
49 syn match objKeywords "^call\s" | |
50 | |
51 syn match objComment "^#.*" | |
52 syn match objVertex "^v\s" | |
53 syn match objFace "^f\s" | |
54 syn match objVertice "^vt\s" | |
55 syn match objNormale "^vn\s" | |
56 syn match objGroup "^g\s.*" | |
57 syn match objMaterial "^usemtl\s.*" | |
58 syn match objInclude "^mtllib\s.*" | |
59 | |
60 syn match objFloat "-\?\d\+\.\d\+\(e\(+\|-\)\d\+\)\?" | |
61 syn match objInt "\d\+" | |
62 syn match objIndex "\d\+\/\d*\/\d*" | |
63 | |
64 " Define the default highlighting. | |
65 " For version 5.7 and earlier: only when not done already | |
66 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
67 if version >= 508 || !exists("did_cabal_syn_inits") | |
68 if version < 508 | |
69 let did_cabal_syn_inits = 1 | |
70 command -nargs=+ HiLink hi link <args> | |
71 else | |
72 command -nargs=+ HiLink hi def link <args> | |
73 endif | |
74 | |
75 HiLink objError Error | |
76 HiLink objComment Comment | |
77 HiLink objInclude PreProc | |
78 HiLink objFloat Float | |
79 HiLink objInt Number | |
80 HiLink objGroup Structure | |
81 HiLink objIndex Constant | |
82 HiLink objMaterial Label | |
83 | |
84 HiLink objVertex Keyword | |
85 HiLink objNormale Keyword | |
86 HiLink objVertice Keyword | |
87 HiLink objFace Keyword | |
88 HiLink objKeywords Keyword | |
89 | |
90 | |
91 delcommand HiLink | |
92 endif | |
93 | |
94 let b:current_syntax = "obj" | |
95 | |
96 " vim: ts=8 |