topical media & game development
mobile-query-three-www-vendor-CodeMirror2-mode-velocity-index.htm / htm
<!doctype html>
<html>
<head>
<title>CodeMirror: Velocity mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="velocity.js"></script>
<link rel="stylesheet" href="../../theme/night.css">
<style>.CodeMirror {border: 1px solid black;}</style>
<link rel="stylesheet" href="../../doc/docs.css">
</head>
<body>
<h1>CodeMirror: Velocity mode</h1>
<form><textarea id="code" name="code">
#*
based on PL/SQL mode by Peter Raganitsch, adapted to Velocity by Steve O'Hara ( http://www.pivotal-solutions.co.uk )
August 2011
*#
#*
This is a multiline comment.
This is the second line
*#
#[[ hello steve
This has invalid syntax that would normally need "poor man's escaping" like:
#define()
foo foo )
#evaluate( 'string with VTL #if(true)will be displayed#end' )
define( who #end #set( hello ## displays Hello World!
#foreach( customerList )
customer.Name
#if( {bar})
it's true!
#break
#{else}
it's not!
#stop
#end
#if (velocityCount
#end
#end
color something in color>monkey = monkey.Friend = 'monica' )
Property reference: #set( whitehouse.Leak )
Method reference: #set( spindoctor.weave(monkey.Number = 123 )
Range operator: #set( monkey.Say = ["Not", monkey.Map = {"banana" : "good", "roast beef" : "bad"})
The RHS can also be a simple arithmetic expression, such as:
Addition: #set( foo + 1 )
Subtraction: #set( bar - 1 )
Multiplication: #set( foo * value = bar )
Remainder: #set( foo %
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.