diff --git a/media/survex.lang b/media/survex.lang
new file mode 100644
index 0000000..93987a5
--- /dev/null
+++ b/media/survex.lang
@@ -0,0 +1,498 @@
+
+
+
+
+ text/x-survex
+ *.svx
+ ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [a-zA-Z0-9_\-\.]+
+ [a-zA-Z0-9_\-\.]+
+ [0-9]+(?:\.[0-9]+(?:\.[0-9+])?)?(?:\-[0-9]+(?:\.[0-9]+(?:\.[0-9+])?)?)?
+
+ [-+]?[0-9]+\.[0-9]*|
+ [-+]?[0-9]+|
+ [-+]?[0-9]*\.[0-9]+
+
+
+ (?:[^\s"]+)|
+ (?:"[^"]*")
+
+
+
+ default|
+ normal|
+ diving|
+ cartesian|
+ topofil|
+ cylpolar|
+ nosurvey|
+ passage
+
+
+
+ from|
+ to|
+ tape|
+ compass|
+ clino|
+ backcompass|
+ backclino|
+ station|
+ direction|
+ fromdepth|
+ todepth|
+ depthchange|
+ northing|
+ easting|
+ altitude|
+ newline|
+ left|
+ right|
+ up|
+ down|
+ ignoreall|
+ ignore|
+ length|
+ bearing|
+ gradient|
+ count
+
+
+
+ custom|
+ epsg|
+ esri|
+ eur79z30|
+ ijtsk|
+ ijtsk03|
+ jtsk|
+ jtsk03|
+ long-lat|
+ osgb|
+ s-merc|
+ utm
+
+
+
+
+ tape|
+ length|
+ backtape|
+ backlength|
+ compass|
+ bearing|
+ backcompass|
+ backbearing|
+ clino|
+ gradient|
+ backclino|
+ backgradient|
+ counter|
+ count|
+ depth|
+ declination|
+ dx|
+ easting|
+ dy|
+ northing|
+ dz|
+ altitude|
+ left|
+ right|
+ up|
+ ceiling|
+ down|
+ floor|
+ level|
+ plumb|
+ position
+
+
+
+
+ tape|
+ compass|
+ clino|
+ counter|
+ depth|
+ declination|
+ x|
+ y|
+ z
+
+
+
+ default|
+ yards|
+ feet|
+ metric|
+ meters|
+ metres|
+ degs|
+ degrees|
+ grads|
+ mils|
+ minutes|
+ percentage|
+ percent
+
+
+
+ blank|
+ comment|
+ decimal|
+ eol|
+ keyword|
+ minus|
+ names|
+ omit|
+ plus|
+ root|
+ separator
+
+
+
+ "
+ "
+
+
+
+ (\%{number})
+
+
+
+ (\%{station-name})
+
+
+
+
+
+ ^\s*(\*alias)\s+(station)\s+(\%{station-name})(?:\s+(\%{station-name}))?
+
+
+
+
+
+
+
+
+ ^\s*(\*begin)(?:\s+(\%{survey-name}))?
+
+
+
+
+
+
+
+ ^\s*(\*calibrate)(?:(?:((?:\s+(?:\%{calibrate-quantity}))+)\s+(\%{number})(?:\s+(\%{unit}))?(?:\s+(\%{number}))?)|\s+(default))
+
+
+
+
+
+
+
+
+
+
+
+ ^\s*(\*case)\s+(preserve|toupper|tolower)
+
+
+
+
+
+
+
+ ^\s*(\*copyright)\s+(\%{date})\s+(.+)
+
+
+
+
+
+
+
+ ^\s*(\*cs)(?:\s+(out))?\s+(\%{coordinate-system})
+
+
+
+
+
+
+
+
+ ^\s*(\*data)\s+(\%{data-style})((?:\s+(?:\%{data-instruments}))*)
+
+
+
+
+
+
+
+
+ ^\s*(\*date)\s+(\%{date})
+
+
+
+
+
+
+
+ ^\s*(\*declination)\s+(?:(auto)|(?:(\%{number})\s+(\%{unit})))
+
+
+
+
+
+
+
+
+
+ ^\s*(\*default)\s+(all|calibrate|data|units)
+
+
+
+
+
+
+
+ ^\s*(\*end)(?:\s+(\%{survey-name}))?
+
+
+
+
+
+
+
+ ^\s*(\*entrance)\s+(\%{station-name})
+
+
+
+
+
+
+
+ ^\s*(\*equate)\s+(\%{station-name})((?:\s+(?:\%{station-name}))+)
+
+
+
+
+
+
+
+
+ ^\s*(\*export)((?:\s+(?:\%{station-name}))+)
+
+
+
+
+
+
+
+ ^\s*(\*fix)\s+(\%{station-name})(\s+reference)?
+
+
+
+
+
+
+
+
+ ^\s*(\*flags)((?:(?:\s+not)?\s+(?:duplicate|splay|surface))+)
+
+
+
+
+
+
+
+ ^\s*(\*include)\s+(\%{string})
+
+
+
+
+
+
+
+ ^\s*(\*infer)\s+(plumbs|equates|exports)\s+(on|off)
+
+
+
+
+
+
+
+
+ ^\s*(\*instrument)\s+([a-z]+)\s+(\%{string})
+
+
+
+
+
+
+
+
+ ^\s*(\*prefix)\s+(\%{survey-name})
+
+
+
+
+
+
+
+ ^\s*(\*ref)\s+(\%{string})
+
+
+
+
+
+
+
+ ^\s*(\*require)\s+(\%{string})
+
+
+
+
+
+
+
+ ^\s*(\*sd)((?:\s+(?:\%{quantity}))+)\s+(\%{number})\s+(\%{unit})
+
+
+
+
+
+
+
+
+
+ ^\s*(\*set)\s+(\%{set-item})\s+(.+)
+
+
+
+
+
+
+
+
+ ^\s*(\*solve)
+
+
+
+
+
+
+ ^\s*(\*team)\s+(\%{string})((?:\s+(?:[a-z]+))+)
+
+
+
+
+
+
+
+
+ ^\s*(\*title)\s+(\%{string})
+
+
+
+
+
+
+
+ ^\s*(\*truncate)\s+(?:(\%{number})|(off))
+
+
+
+
+
+
+
+
+ ^\s*(\*units)((?:\s+(?:\%{quantity}))+)(?:\s+(\%{number}))?\s+(\%{unit})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/media/survex.xml b/media/survex.xml
new file mode 100644
index 0000000..492d942
--- /dev/null
+++ b/media/survex.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+ 00; 01 02 03 04
+
+
+
+
+
+
+
+
+ NOT
+
+
+
+
+
+
+ *begin
+
+ *end
+ *begin *end *include *data *calibrate *case *copyright *cs *date *declination *default *entrance *equate *export *fix *flags *infer *instrument *prefix *ref *require *sd *set *solve *team *title *truncate*units
+
+
+
+
+
+
+
+ 00" 01\ 02" 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+