7
|
1 " Vim syntax file
|
828
|
2 " Language: LifeLines (v 3.0.50) http://lifelines.sourceforge.net
|
|
3 " Maintainer: Patrick Texier <p.texier@genindre.org>
|
|
4 " Location: http://www.genindre.org/ftp/lifelines/lifelines.vim
|
|
5 " Last Change: 2005 Dec 22.
|
|
6
|
|
7 " option to highlight error obsolete statements
|
|
8 " add the following line to your .vimrc file or here :
|
|
9 " (level2 is for baptism)
|
|
10
|
|
11 " let lifelines_deprecated=1
|
|
12 " let lifelines_deprecated_level2=1
|
7
|
13
|
|
14 " For version 5.x: Clear all syntax items
|
|
15 " For version 6.x: Quit when a syntax file was already loaded
|
|
16
|
|
17 if version < 600
|
|
18 syntax clear
|
|
19 elseif exists("b:current_syntax")
|
|
20 finish
|
|
21 endif
|
|
22
|
828
|
23 " A bunch of useful lifelines keywords 3.0.50
|
7
|
24
|
828
|
25 syn keyword lifelinesStatement set
|
|
26 syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild
|
|
27 syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose
|
|
28 syn keyword lifelinesUser choosefam
|
|
29 syn keyword lifelinesProc proc func return call
|
|
30 syn keyword lifelinesInclude include
|
|
31 syn keyword lifelinesDef global
|
7
|
32 syn keyword lifelinesConditional if else elsif switch
|
828
|
33 syn keyword lifelinesRepeat continue break while
|
|
34 syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr
|
|
35 syn keyword lifelinesArithm add sub mul div mod exp neg incr decr
|
|
36 syn keyword lifelinesArithm cos sin tan arccos arcsin arctan
|
|
37 syn keyword lifelinesArithm deg2dms dms2deg spdist
|
|
38 syn keyword lifelinesIndi name fullname surname givens trimname birth
|
|
39 syn keyword lifelinesIndi death burial
|
|
40 syn keyword lifelinesIndi father mother nextsib prevsib sex male female
|
|
41 syn keyword lifelinesIndi pn nspouses nfamilies parents title key
|
|
42 syn keyword lifelinesIndi soundex inode root indi firstindi nextindi
|
|
43 syn keyword lifelinesIndi previndi spouses families forindi indiset
|
|
44 syn keyword lifelinesIndi addtoset deletefromset union intersect
|
|
45 syn keyword lifelinesIndi difference parentset childset spouseset siblingset
|
|
46 syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset
|
|
47 syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset
|
|
48 syn keyword lifelinesIndi forindiset lastindi writeindi
|
|
49 syn keyword lifelinesIndi inset
|
|
50 syn keyword lifelinesFam marriage husband wife nchildren firstchild
|
|
51 syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam
|
|
52 syn keyword lifelinesFam prevfam children forfam writefam
|
|
53 syn keyword lifelinesFam fathers mothers Parents
|
|
54 syn keyword lifelinesList list empty length enqueue dequeue requeue
|
|
55 syn keyword lifelinesList push pop setel getel forlist inlist dup clear
|
|
56 syn keyword lifelinesTable table insert lookup
|
|
57 syn keyword lifelinesGedcom xref tag value parent child sibling savenode
|
|
58 syn keyword lifelinesGedcom fornodes traverse createnode addnode
|
|
59 syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour
|
|
60 syn keyword lifelinesGedcom reference dereference getrecord
|
|
61 syn keyword lifelinesFunct date place year long short gettoday dayformat
|
|
62 syn keyword lifelinesFunct monthformat dateformat extractdate eraformat
|
|
63 syn keyword lifelinesFunct complexdate complexformat complexpic datepic
|
|
64 syn keyword lifelinesFunct extractnames extractplaces extracttokens lower
|
|
65 syn keyword lifelinesFunct yearformat
|
|
66 syn keyword lifelinesFunct upper capitalize trim rjustify
|
|
67 syn keyword lifelinesFunct concat strconcat strlen substring index
|
|
68 syn keyword lifelinesFunct titlecase gettext
|
|
69 syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint
|
|
70 syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl
|
|
71 syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test
|
|
72 syn keyword lifelinesFunct database version system stddate program
|
|
73 syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug
|
|
74 syn keyword lifelinesFunct f float int free getcol getproperty heapused
|
|
75 syn keyword lifelinesFunct sort rsort
|
|
76 syn keyword lifelinesFunct deleteel
|
|
77 syn keyword lifelinesFunct bytecode convertcode setlocale
|
|
78
|
|
79 " option to highlight error obsolete statements
|
|
80 " please read ll-reportmanual
|
|
81
|
|
82 if exists("lifelines_deprecated")
|
|
83 syn keyword lifelinesError getintmsg getindimsg getstrmsg
|
|
84 syn keyword lifelinesError gengedcom gengedcomstrong gengedcomweak deletenode
|
|
85 syn keyword lifelinesError save strsave
|
|
86 syn keyword lifelinesError lengthset
|
|
87 else
|
|
88 syn keyword lifelinesUser getintmsg getindimsg getstrmsg
|
|
89 syn keyword lifelinesGedcom gengedcom gengedcomstrong gengedcomweak deletenode
|
|
90 syn keyword lifelinesFunct save strsave
|
|
91 syn keyword lifelinesIndi lengthset
|
|
92 endif
|
|
93 if exists("lifelines_deprecated_level2")
|
|
94 syn keyword lifelinesError baptism
|
|
95 else
|
|
96 syn keyword lifelinesIndi baptism
|
|
97 endif
|
7
|
98
|
|
99 syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial
|
|
100
|
828
|
101 syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained
|
|
102
|
|
103 syn region lifelinesComment start="/\*" end="\*/"
|
7
|
104
|
828
|
105 " integers
|
|
106 syn match lifelinesNumber "-\=\<\d\+\>"
|
|
107 "floats, with dot
|
|
108 syn match lifelinesNumber "-\=\<\d\+\.\d*\>"
|
|
109 "floats, starting with a dot
|
|
110 syn match lifelinesNumber "-\=\.\d\+\>"
|
7
|
111
|
|
112 "catch errors caused by wrong parenthesis
|
|
113 "adapted from original c.vim written by Bram Moolenaar
|
|
114
|
|
115 syn cluster lifelinesParenGroup contains=lifelinesParenError
|
|
116 syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup
|
|
117 syn match lifelinesParenError ")"
|
|
118 syn match lifelinesErrInParen contained "[{}]"
|
|
119
|
|
120 " Define the default highlighting.
|
|
121 " For version 5.7 and earlier: only when not done already
|
|
122 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
123
|
|
124 if version >= 508 || !exists("did_lifelines_syn_inits")
|
|
125 if version < 508
|
|
126 let did_lifelines_syn_inits = 1
|
|
127 command -nargs=+ HiLink hi link <args>
|
|
128 else
|
|
129 command -nargs=+ HiLink hi def link <args>
|
|
130 endif
|
|
131
|
|
132 HiLink lifelinesConditional Conditional
|
828
|
133 HiLink lifelinesArithm Operator
|
|
134 HiLink lifelinesLogical Conditional
|
|
135 HiLink lifelinesInclude Include
|
|
136 HiLink lifelinesComment Comment
|
|
137 HiLink lifelinesStatement Statement
|
|
138 HiLink lifelinesUser Statement
|
|
139 HiLink lifelinesFunct Statement
|
|
140 HiLink lifelinesTable Statement
|
|
141 HiLink lifelinesGedcom Statement
|
|
142 HiLink lifelinesList Statement
|
|
143 HiLink lifelinesRepeat Repeat
|
|
144 HiLink lifelinesFam Statement
|
|
145 HiLink lifelinesIndi Statement
|
|
146 HiLink lifelinesProc Statement
|
|
147 HiLink lifelinesDef Statement
|
|
148 HiLink lifelinesString String
|
|
149 HiLink lifelinesSpecial Special
|
|
150 HiLink lifelinesNumber Number
|
7
|
151 HiLink lifelinesParenError Error
|
|
152 HiLink lifelinesErrInParen Error
|
828
|
153 HiLink lifelinesError Error
|
7
|
154
|
|
155 delcommand HiLink
|
|
156 endif
|
|
157
|
|
158 let b:current_syntax = "lifelines"
|
|
159
|
|
160 " vim: ts=8
|