summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/gedcom.vim
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:09:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:09:20 +0000
commit029f72b1a93430b24b88eb3a72c6114d9f149737 (patch)
tree765d5c2041967f9c6fef195fe343d9234a030e90 /runtime/syntax/gedcom.vim
parentInitial commit. (diff)
downloadvim-029f72b1a93430b24b88eb3a72c6114d9f149737.tar.xz
vim-029f72b1a93430b24b88eb3a72c6114d9f149737.zip
Adding upstream version 2:9.1.0016.upstream/2%9.1.0016
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/gedcom.vim')
-rw-r--r--runtime/syntax/gedcom.vim53
1 files changed, 53 insertions, 0 deletions
diff --git a/runtime/syntax/gedcom.vim b/runtime/syntax/gedcom.vim
new file mode 100644
index 0000000..cd09e0f
--- /dev/null
+++ b/runtime/syntax/gedcom.vim
@@ -0,0 +1,53 @@
+" Vim syntax file
+" Language: Gedcom
+" Maintainer: Paul Johnson (pjcj@transeda.com)
+" Version 1.059 - 23rd December 1999
+
+" quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+syntax case match
+
+syntax keyword gedcom_record ABBR ADDR ADOP ADR1 ADR2 AFN AGE AGNC ALIA ANCE
+syntax keyword gedcom_record ANCI ANUL ASSO AUTH BAPL BAPM BARM BASM BIRT BLES
+syntax keyword gedcom_record BLOB BURI CALN CAST CAUS CENS CHAN CHAR CHIL CHR
+syntax keyword gedcom_record CHRA CITY CONC CONF CONL CONT COPR CORP CREM CTRY
+syntax keyword gedcom_record DATA DEAT DESC DESI DEST DIV DIVF DSCR EDUC EMIG
+syntax keyword gedcom_record ENDL ENGA EVEN FAM FAMC FAMF FAMS FCOM FILE FORM
+syntax keyword gedcom_record GEDC GIVN GRAD HEAD HUSB IDNO IMMI INDI LANG MARB
+syntax keyword gedcom_record MARC MARL MARR MARS MEDI NATI NATU NCHI NICK NMR
+syntax keyword gedcom_record NOTE NPFX NSFX OBJE OCCU ORDI ORDN PAGE PEDI PHON
+syntax keyword gedcom_record PLAC POST PROB PROP PUBL QUAY REFN RELA RELI REPO
+syntax keyword gedcom_record RESI RESN RETI RFN RIN ROLE SEX SLGC SLGS SOUR
+syntax keyword gedcom_record SPFX SSN STAE STAT SUBM SUBN SURN TEMP TEXT TIME
+syntax keyword gedcom_record TITL TRLR TYPE VERS WIFE WILL
+syntax keyword gedcom_record DATE nextgroup=gedcom_date
+syntax keyword gedcom_record NAME nextgroup=gedcom_name
+
+syntax case ignore
+
+syntax region gedcom_id start="@" end="@" oneline contains=gedcom_ii, gedcom_in
+syntax match gedcom_ii "\I\+" contained nextgroup=gedcom_in
+syntax match gedcom_in "\d\+" contained
+syntax region gedcom_name start="" end="$" skipwhite oneline contains=gedcom_cname, gedcom_surname contained
+syntax match gedcom_cname "\i\+" contained
+syntax match gedcom_surname "/\(\i\|\s\)*/" contained
+syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\)\s\+\d\+"
+syntax match gedcom_date ".*" contained
+
+" Define the default highlighting.
+" Only when an item doesn't have highlighting yet
+
+hi def link gedcom_record Statement
+hi def link gedcom_id Comment
+hi def link gedcom_ii PreProc
+hi def link gedcom_in Type
+hi def link gedcom_name PreProc
+hi def link gedcom_cname Type
+hi def link gedcom_surname Identifier
+hi def link gedcom_date Constant
+
+
+let b:current_syntax = "gedcom"