blob: d825a178ae092aaa3567645c3b063e0bccf55065 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar7fc904b2006-04-13 20:37:35 +00002" 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000013
14" For version 5.x: Clear all syntax items
15" For version 6.x: Quit when a syntax file was already loaded
16
17if version < 600
18 syntax clear
19elseif exists("b:current_syntax")
20 finish
21endif
22
Bram Moolenaar7fc904b2006-04-13 20:37:35 +000023" A bunch of useful lifelines keywords 3.0.50
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
Bram Moolenaar7fc904b2006-04-13 20:37:35 +000025syn keyword lifelinesStatement set
26syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild
27syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose
28syn keyword lifelinesUser choosefam
29syn keyword lifelinesProc proc func return call
30syn keyword lifelinesInclude include
31syn keyword lifelinesDef global
Bram Moolenaar071d4272004-06-13 20:20:40 +000032syn keyword lifelinesConditional if else elsif switch
Bram Moolenaar7fc904b2006-04-13 20:37:35 +000033syn keyword lifelinesRepeat continue break while
34syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr
35syn keyword lifelinesArithm add sub mul div mod exp neg incr decr
36syn keyword lifelinesArithm cos sin tan arccos arcsin arctan
37syn keyword lifelinesArithm deg2dms dms2deg spdist
38syn keyword lifelinesIndi name fullname surname givens trimname birth
39syn keyword lifelinesIndi death burial
40syn keyword lifelinesIndi father mother nextsib prevsib sex male female
41syn keyword lifelinesIndi pn nspouses nfamilies parents title key
42syn keyword lifelinesIndi soundex inode root indi firstindi nextindi
43syn keyword lifelinesIndi previndi spouses families forindi indiset
44syn keyword lifelinesIndi addtoset deletefromset union intersect
45syn keyword lifelinesIndi difference parentset childset spouseset siblingset
46syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset
47syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset
48syn keyword lifelinesIndi forindiset lastindi writeindi
49syn keyword lifelinesIndi inset
50syn keyword lifelinesFam marriage husband wife nchildren firstchild
51syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam
52syn keyword lifelinesFam prevfam children forfam writefam
53syn keyword lifelinesFam fathers mothers Parents
54syn keyword lifelinesList list empty length enqueue dequeue requeue
55syn keyword lifelinesList push pop setel getel forlist inlist dup clear
56syn keyword lifelinesTable table insert lookup
57syn keyword lifelinesGedcom xref tag value parent child sibling savenode
58syn keyword lifelinesGedcom fornodes traverse createnode addnode
59syn keyword lifelinesGedcom detachnode foreven fornotes forothr forsour
60syn keyword lifelinesGedcom reference dereference getrecord
61syn keyword lifelinesFunct date place year long short gettoday dayformat
62syn keyword lifelinesFunct monthformat dateformat extractdate eraformat
63syn keyword lifelinesFunct complexdate complexformat complexpic datepic
64syn keyword lifelinesFunct extractnames extractplaces extracttokens lower
65syn keyword lifelinesFunct yearformat
66syn keyword lifelinesFunct upper capitalize trim rjustify
67syn keyword lifelinesFunct concat strconcat strlen substring index
68syn keyword lifelinesFunct titlecase gettext
69syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint
70syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl
71syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock test
72syn keyword lifelinesFunct database version system stddate program
73syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug
74syn keyword lifelinesFunct f float int free getcol getproperty heapused
75syn keyword lifelinesFunct sort rsort
76syn keyword lifelinesFunct deleteel
77syn keyword lifelinesFunct bytecode convertcode setlocale
78
79" option to highlight error obsolete statements
80" please read ll-reportmanual
81
82if 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
87else
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
92endif
93if exists("lifelines_deprecated_level2")
94 syn keyword lifelinesError baptism
95else
96 syn keyword lifelinesIndi baptism
97endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000098
99syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial
100
Bram Moolenaar7fc904b2006-04-13 20:37:35 +0000101syn match lifelinesSpecial "\\\(\\\|\(n\|t\)\)" contained
Bram Moolenaar071d4272004-06-13 20:20:40 +0000102
Bram Moolenaar7fc904b2006-04-13 20:37:35 +0000103syn region lifelinesComment start="/\*" end="\*/"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000104
Bram Moolenaar7fc904b2006-04-13 20:37:35 +0000105" integers
106syn match lifelinesNumber "-\=\<\d\+\>"
107"floats, with dot
108syn match lifelinesNumber "-\=\<\d\+\.\d*\>"
109"floats, starting with a dot
110syn match lifelinesNumber "-\=\.\d\+\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000111
112"catch errors caused by wrong parenthesis
113"adapted from original c.vim written by Bram Moolenaar
114
115syn cluster lifelinesParenGroup contains=lifelinesParenError
116syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup
117syn match lifelinesParenError ")"
118syn 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
124if 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
Bram Moolenaar7fc904b2006-04-13 20:37:35 +0000133 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
Bram Moolenaar071d4272004-06-13 20:20:40 +0000151 HiLink lifelinesParenError Error
152 HiLink lifelinesErrInParen Error
Bram Moolenaar7fc904b2006-04-13 20:37:35 +0000153 HiLink lifelinesError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000154
155 delcommand HiLink
156endif
157
158let b:current_syntax = "lifelines"
159
160" vim: ts=8