velocity.js 766 B

123456789101112131415161718192021222324252627282930313233343536
  1. ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "# macro\n\
  4. snippet #macro\n\
  5. #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\
  6. ${3:## macro code}\n\
  7. #end\n\
  8. # foreach\n\
  9. snippet #foreach\n\
  10. #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\
  11. ${3:## foreach code}\n\
  12. #end\n\
  13. # if\n\
  14. snippet #if\n\
  15. #if ( ${1:true} )\n\
  16. ${0}\n\
  17. #end\n\
  18. # if ... else\n\
  19. snippet #ife\n\
  20. #if ( ${1:true} )\n\
  21. ${2}\n\
  22. #else\n\
  23. ${0}\n\
  24. #end\n\
  25. #import\n\
  26. snippet #import\n\
  27. #import ( \"${1:path/to/velocity/format}\" )\n\
  28. # set\n\
  29. snippet #set\n\
  30. #set ( $${1:var} = ${0} )\n\
  31. ";
  32. exports.scope = "velocity";
  33. exports.includeScopes = ["html", "javascript", "css"];
  34. });