velocity.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ace.define("ace/snippets/velocity",[], 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. });
  35. (function() {
  36. ace.require(["ace/snippets/velocity"], function(m) {
  37. if (typeof module == "object" && typeof exports == "object" && module) {
  38. module.exports = m;
  39. }
  40. });
  41. })();