overleaf/services/web/public/js/ace/snippets/velocity.js

37 lines
766 B
JavaScript
Raw Normal View History

2014-07-16 06:07:18 -04:00
ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) {
2014-02-12 05:23:40 -05:00
"use strict";
2014-07-09 12:59:04 -04:00
exports.snippetText = "# macro\n\
snippet #macro\n\
#macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\
${3:## macro code}\n\
#end\n\
# foreach\n\
snippet #foreach\n\
#foreach ( ${1:\\$item} in ${2:\\$collection} )\n\
${3:## foreach code}\n\
#end\n\
# if\n\
snippet #if\n\
#if ( ${1:true} )\n\
${0}\n\
#end\n\
# if ... else\n\
snippet #ife\n\
#if ( ${1:true} )\n\
${2}\n\
#else\n\
${0}\n\
#end\n\
#import\n\
snippet #import\n\
#import ( \"${1:path/to/velocity/format}\" )\n\
# set\n\
snippet #set\n\
#set ( $${1:var} = ${0} )\n\
";
2014-02-12 05:23:40 -05:00
exports.scope = "velocity";
2014-07-09 12:59:04 -04:00
exports.includeScopes = ["html", "javascript", "css"];
2014-02-12 05:23:40 -05:00
});