Differences between revisions 3 and 4
Revision 3 as of 2005-10-04 04:23:58
Size: 2291
Comment: added instructions from Editor page
Revision 4 as of 2009-09-20 22:06:29
Size: 2291
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

To install, add the velocity.xml to one of your 'mode' directories, and add the following to that directory's catalog file :

<MODE NAME="velocity"  FILE="velocity.xml"
               FILE_NAME_GLOB="*.vw" />

and restart JEdit. If there are any problems with installation, see the JEdit documentation about 'Modes'.

velocity.xml:

<?xml version="1.0"?>

<!DOCTYPE MODE SYSTEM "xmode.dtd">

<MODE>
        <PROPS>
                <PROPERTY NAME="commentStart" VALUE="#*" />
                <PROPERTY NAME="commentEnd" VALUE="*#" />
                <PROPERTY NAME="lineComment" VALUE="##" />
        </PROPS>
        <RULES IGNORE_CASE="TRUE">
                <!-- whitespace: (space and tab) -->
                <WHITESPACE> </WHITESPACE>
                <WHITESPACE>    </WHITESPACE>

                <!-- SGML comment -->
                <SPAN TYPE="COMMENT1">
                        <BEGIN>&lt;!--</BEGIN>
                        <END>--&gt;</END>
                </SPAN>

                <!-- JavaScript -->
                <SPAN TYPE="MARKUP" DELEGATE="javascript::MAIN">
                        <BEGIN>&lt;SCRIPT&gt;</BEGIN>
                        <END>&lt;/SCRIPT&gt;</END>
                </SPAN>

                <!-- stylesheet -->
                <SPAN TYPE="MARKUP" DELEGATE="css::MAIN">
                        <BEGIN>&lt;STYLE&gt;</BEGIN>
                        <END>&lt;/STYLE&gt;</END>
                </SPAN>

                <!-- DTD instructions -->
                <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
                        <BEGIN>&lt;!</BEGIN>
                        <END>&gt;</END>
                </SPAN>


                <KEYWORDS>
                        <KEYWORD1>#set</KEYWORD1>
                        <KEYWORD1>#foreach</KEYWORD1>
                        <KEYWORD1>#end</KEYWORD1>
                        <KEYWORD1>#if</KEYWORD1>
                        <KEYWORD1>#else</KEYWORD1>
                        <KEYWORD1>#elseif</KEYWORD1>
                        <KEYWORD1>#parse</KEYWORD1>
                        <KEYWORD1>#macro</KEYWORD1>
                        <KEYWORD1>#stop</KEYWORD1>
                        <KEYWORD1>#include</KEYWORD1>
                </KEYWORDS>

                <MARK_FOLLOWING TYPE="KEYWORD2">$</MARK_FOLLOWING>

                <!-- markup tags -->
                <SPAN TYPE="MARKUP" DELEGATE="TAGS">
                        <BEGIN>&lt;</BEGIN>
                        <END>&gt;</END>
                </SPAN>

                <!-- SGML entities -->
                <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
                        <BEGIN>&amp;</BEGIN>
                        <END>;</END>
                </SPAN>
        </RULES>

        <RULES SET="TAGS" DEFAULT="MARKUP">
                <!-- whitespace: (space and tab) -->
                <WHITESPACE> </WHITESPACE>
                <WHITESPACE>    </WHITESPACE>

                <SPAN TYPE="LITERAL1">
                        <BEGIN>"</BEGIN>
                        <END>"</END>
                </SPAN>

                <SPAN TYPE="LITERAL1">
                        <BEGIN>'</BEGIN>
                        <END>'</END>
                </SPAN>

                <SEQ TYPE="OPERATOR">=</SEQ>
        </RULES>
</MODE>

JEditTemplate (last edited 2009-09-20 22:06:29 by localhost)