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