comparison runtime/syntax/gedcom.vim @ 7:3fc0f57ecb91 v7.0001

updated for version 7.0001
author vimboss
date Sun, 13 Jun 2004 20:20:40 +0000
parents
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
6:c2daee826b8f 7:3fc0f57ecb91
1 " Vim syntax file
2 " Language: Gedcom
3 " Maintainer: Paul Johnson (pjcj@transeda.com)
4 " Version 1.059 - 23rd December 1999
5
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
8 if version < 600
9 syntax clear
10 elseif exists("b:current_syntax")
11 finish
12 endif
13
14 syntax case match
15
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
31
32 syntax case ignore
33
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
42
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")
47 if version < 508
48 let did_gedcom_syntax_inits = 1
49 command -nargs=+ HiLink hi link <args>
50 else
51 command -nargs=+ HiLink hi def link <args>
52 endif
53
54 HiLink gedcom_record Statement
55 HiLink gedcom_id Comment
56 HiLink gedcom_ii PreProc
57 HiLink gedcom_in Type
58 HiLink gedcom_name PreProc
59 HiLink gedcom_cname Type
60 HiLink gedcom_surname Identifier
61 HiLink gedcom_date Constant
62
63 delcommand HiLink
64 endif
65
66 let b:current_syntax = "gedcom"