annotate runtime/syntax/gedcom.vim @ 4916:ba328b4a990e v7.3.1203

updated for version 7.3.1203 Problem: Matches from matchadd() might be highlighted incorrectly when they are at a fixed position and inserting lines. (John Szakmeister) Solution: Redraw all lines below a change if there are highlighted matches. (idea by Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Sat, 15 Jun 2013 23:00:30 +0200
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Gedcom
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Paul Johnson (pjcj@transeda.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Version 1.059 - 23rd December 1999
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax keyword gedcom_record ABBR ADDR ADOP ADR1 ADR2 AFN AGE AGNC ALIA ANCE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syntax keyword gedcom_record ANCI ANUL ASSO AUTH BAPL BAPM BARM BASM BIRT BLES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syntax keyword gedcom_record BLOB BURI CALN CAST CAUS CENS CHAN CHAR CHIL CHR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syntax keyword gedcom_record CHRA CITY CONC CONF CONL CONT COPR CORP CREM CTRY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syntax keyword gedcom_record DATA DEAT DESC DESI DEST DIV DIVF DSCR EDUC EMIG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syntax keyword gedcom_record ENDL ENGA EVEN FAM FAMC FAMF FAMS FCOM FILE FORM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syntax keyword gedcom_record GEDC GIVN GRAD HEAD HUSB IDNO IMMI INDI LANG MARB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syntax keyword gedcom_record MARC MARL MARR MARS MEDI NATI NATU NCHI NICK NMR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syntax keyword gedcom_record NOTE NPFX NSFX OBJE OCCU ORDI ORDN PAGE PEDI PHON
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syntax keyword gedcom_record PLAC POST PROB PROP PUBL QUAY REFN RELA RELI REPO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syntax keyword gedcom_record RESI RESN RETI RFN RIN ROLE SEX SLGC SLGS SOUR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syntax keyword gedcom_record SPFX SSN STAE STAT SUBM SUBN SURN TEMP TEXT TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syntax keyword gedcom_record TITL TRLR TYPE VERS WIFE WILL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syntax keyword gedcom_record DATE nextgroup=gedcom_date
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syntax keyword gedcom_record NAME nextgroup=gedcom_name
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syntax case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syntax region gedcom_id start="@" end="@" oneline contains=gedcom_ii, gedcom_in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syntax match gedcom_ii "\I\+" contained nextgroup=gedcom_in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syntax match gedcom_in "\d\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syntax region gedcom_name start="" end="$" skipwhite oneline contains=gedcom_cname, gedcom_surname contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syntax match gedcom_cname "\i\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syntax match gedcom_surname "/\(\i\|\s\)*/" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\)\s\+\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syntax match gedcom_date ".*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if version >= 508 || !exists("did_gedcom_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let did_gedcom_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink gedcom_record Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink gedcom_id Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink gedcom_ii PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink gedcom_in Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink gedcom_name PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink gedcom_cname Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink gedcom_surname Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink gedcom_date Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 let b:current_syntax = "gedcom"