Svxedit

Vasily Vl. Suhachev v_su at inbox.ru
Mon Aug 8 07:01:46 BST 2005


Hello, David!

You wrote on 26.02.2005, 3:17 about "Svxedit":

DL> One thing I've often thought would be useful to have, however, would be an
DL> archive of syntax-highlighting definition files for editing Survex data in
DL> various different text editors.

DL> So I'd like to hopefully kick-start this process by offering up a syntax
DL> file for gvim. Suggestions and patches are welcome; and indeed if anyone
DL> else has a similar file of their own, post it up too and we'll see if we
DL> can hack together a version combining the best of each.

I am use FAR manager + colorer plugin to edit *.svx files under
Windows

FAR,shareware: http://farmanager.com/
colorer,MPL 1.1: http://colorer.sourceforge.net/

colorer4ever is version 4 of colorer
colorer-take5 is version 5 of colorer, beta at this moment.

This is hrc file for colorer4ever, for colorer-take5 hrc see below

==============[begin of survex.hrc]==============
<?xml version="1.0" encoding="Windows-1251"?>
<!DOCTYPE hrc SYSTEM "../hrc.dtd">
<?xml-stylesheet type="text/xsl" href="../hrc.xsl"?>
<!--
    Survex - Cave surveying software under GPL
    Vasily Vl. Suhachev <v_su at inbox.ru>, Krasnoyarsk
-->

<hrc>

<include name="regions.hrc"/>
<include name="defines.hrc"/>

<scheme name="svxDecNumb">
   <regexp match="/((\-|\+)?\d+(\.\d+)?)/"
           region1="dNumDec" />
</scheme>

<scheme name="survex">

        <inherit scheme="mStdStr"/> 
        <inherit scheme="mDate"/>
        <inherit scheme="mTime"/>
        <inherit scheme="svxDecNumb"/>

        <block start="/(^\s*(\*begin)(\s*[\w\-]+)?)/i" end="/(^\s*(\*end)(\s*[\w\-]+)?)/i"
                scheme="survex"
                region00="dKeyword" region01="dpOpenStruct" region03="dString"
                region10="dKeyword" region11="dpCloseStruct" region13="dString"/>

        <block  start="/\;/" end="/$/" scheme="Comment" region="dComment"/>

        <keywords region="dKeyword" ignorecase="ignorecase" worddiv="/[^\w_]/">
                <word name="*case"/>
                <word name="*copyright"/>
                <word name="*calibrate"/>
                <word name="*data"/>
                <word name="*date"/>
                <word name="*default"/>
                <word name="*entrance"/>
                <word name="*equate"/>
                <word name="*export"/>
                <word name="*fix"/>
                <word name="*flags"/>
                <word name="*include"/>
                <word name="*infer"/>
                <word name="*instrument"/>
                <word name="*prefix"/>
                <word name="*require"/>
                <word name="*sd"/>
                <word name="*set"/>
                <word name="*solve"/>
                <word name="*team"/>
                <word name="*title"/>
                <word name="*truncate"/>
                <word name="*units"/>
        </keywords>     

</scheme>

</hrc>
==============[end of survex.hrc]==============

This version of hrc-file for colorer-take5

==============[begin of survex.hrc]==============
<?xml version="1.0" encoding="Windows-1251"?>
<!DOCTYPE hrc SYSTEM "../hrc.dtd">
<?xml-stylesheet type="text/xsl" href="../hrc.xsl"?>
<!--
    Survex - Cave surveying software under GPL
    Vasily Vl. Suhachev <v_su at inbox.ru>, Krasnoyarsk
-->

<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc">
<type name="survex" access="public">

<import type="def"/>

<scheme name="svxDecNumb">
   <regexp match="/((\-|\+)?\d+(\.\d+)?)/"
           region1="def:NumberDec" />
</scheme>

<scheme name="survex">

        <inherit scheme="StandardString"/> 
        <inherit scheme="Date"/>
        <inherit scheme="Time"/>
        <inherit scheme="svxDecNumb"/>

        <block start="/(^\s*(\*begin)(\s*[\w\-]+)?)/i" end="/(^\s*(\*end)(\s*[\w\-]+)?)/i"
                scheme="survex"
                region00="dKeyword" region01="def:Keyword" region03="def:String"
                region10="dKeyword" region11="def:Keyword" region13="def:String"/>

        <block  start="/\;/" end="/$/" scheme="Comment" region="def:Comment"/>

        <keywords region="def:Keyword" ignorecase="ignorecase" worddiv="/[^\w_]/">
                <word name="*case"/>
                <word name="*copyright"/>
                <word name="*calibrate"/>
                <word name="*data"/>
                <word name="*date"/>
                <word name="*default"/>
                <word name="*entrance"/>
                <word name="*equate"/>
                <word name="*export"/>
                <word name="*fix"/>
                <word name="*flags"/>
                <word name="*include"/>
                <word name="*infer"/>
                <word name="*instrument"/>
                <word name="*prefix"/>
                <word name="*require"/>
                <word name="*sd"/>
                <word name="*set"/>
                <word name="*solve"/>
                <word name="*team"/>
                <word name="*title"/>
                <word name="*truncate"/>
                <word name="*units"/>
        </keywords>     

</scheme>

</type>

</hrc>
==============[end of survex.hrc]==============


Also insert this into file hrc\colorer.hrc :

for colorer4ever
==============[begin]==============
  <type descr="Survex" name="survex" exts="/\.svx$/i" separator="separator">
    <load name="rare/survex.hrc"/>
    <scheme name="survex"/>
  </type>
==============[end]==============

for colorer-take5
==============[begin]==============
  <prototype name="survex" group="rare" description="Survex">
    <location link="rare/survex.hrc"/>
    <filename>/\.svx$/i</filename>
  </prototype>
==============[end]==============


-- WBR, Vasily Vl. Suhachev
08.08.2005




More information about the Survex mailing list