3 " Maintainer: Paul Johnson (pjcj@transeda.com)
4 " Version 1.059 - 23rd December 1999
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
16 syntax keyword gedcom_record ABBR ADDR ADOP ADR1 ADR2 AFN AGE AGNC ALIA ANCE
17 syntax keyword gedcom_record ANCI ANUL ASSO AUTH BAPL BAPM BARM BASM BIRT BLES
18 syntax keyword gedcom_record BLOB BURI CALN CAST CAUS CENS CHAN CHAR CHIL CHR
19 syntax keyword gedcom_record CHRA CITY CONC CONF CONL CONT COPR CORP CREM CTRY
20 syntax keyword gedcom_record DATA DEAT DESC DESI DEST DIV DIVF DSCR EDUC EMIG
21 syntax keyword gedcom_record ENDL ENGA EVEN FAM FAMC FAMF FAMS FCOM FILE FORM
22 syntax keyword gedcom_record GEDC GIVN GRAD HEAD HUSB IDNO IMMI INDI LANG MARB
23 syntax keyword gedcom_record MARC MARL MARR MARS MEDI NATI NATU NCHI NICK NMR
24 syntax keyword gedcom_record NOTE NPFX NSFX OBJE OCCU ORDI ORDN PAGE PEDI PHON
25 syntax keyword gedcom_record PLAC POST PROB PROP PUBL QUAY REFN RELA RELI REPO
26 syntax keyword gedcom_record RESI RESN RETI RFN RIN ROLE SEX SLGC SLGS SOUR
27 syntax keyword gedcom_record SPFX SSN STAE STAT SUBM SUBN SURN TEMP TEXT TIME
28 syntax keyword gedcom_record TITL TRLR TYPE VERS WIFE WILL
29 syntax keyword gedcom_record DATE nextgroup=gedcom_date
30 syntax keyword gedcom_record NAME nextgroup=gedcom_name
34 syntax region gedcom_id start="@" end="@" oneline contains=gedcom_ii, gedcom_in
35 syntax match gedcom_ii "\I\+" contained nextgroup=gedcom_in
36 syntax match gedcom_in "\d\+" contained
37 syntax region gedcom_name start="" end="$" skipwhite oneline contains=gedcom_cname, gedcom_surname contained
38 syntax match gedcom_cname "\i\+" contained
39 syntax match gedcom_surname "/\(\i\|\s\)*/" contained
40 syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\)\s\+\d\+"
41 syntax match gedcom_date ".*" contained
43 " Define the default highlighting.
44 " For version 5.7 and earlier: only when not done already
45 " For version 5.8 and later: only when an item doesn't have highlighting yet
46 if version >= 508 || !exists("did_gedcom_syntax_inits")
48 let did_gedcom_syntax_inits = 1
49 command -nargs=+ HiLink hi link <args>
51 command -nargs=+ HiLink hi def link <args>
54 HiLink gedcom_record Statement
55 HiLink gedcom_id Comment
56 HiLink gedcom_ii PreProc
58 HiLink gedcom_name PreProc
59 HiLink gedcom_cname Type
60 HiLink gedcom_surname Identifier
61 HiLink gedcom_date Constant
66 let b:current_syntax = "gedcom"