VelocityTemplateLanguage.xml is a file type configuration for IntelliJ IDEA (http://www.jetbrains.com/idea/). It will give you syntax highlighting in .vm files.

Contributed by Dennis Lundberg (dennisl AT apache DOT org).

IDEA must be shutdown prior to the next step, or else the template file will be deleted.

Put the text below in a file called VelocityTemplateLanguage.xml
and save that file in IDEA's config/filetypes/ directory. This directory will be under your username home directory, not the IDEA install directory.

  • Windows: <your home directory>\.<product name><version number>\config\filetypes
  • Linux: ~\.<product name><version number>\config\filetypes
  • MacOS: ~/Library/Preferences/<product name><version number>/filetypes

VelocityTemplateLanguage.xml

<?xml version="1.0" encoding="UTF-8"?>
<filetype binary="false" description="Velocity Template Language" name="Velocity Template Language">
  <highlighting>
    <options>
      <option name="LINE_COMMENT" value="##" />
      <option name="COMMENT_START" value="#*" />
      <option name="COMMENT_END" value="*#" />
      <option name="HEX_PREFIX" value="" />
      <option name="NUM_POSTFIXES" value="" />
      <option name="HAS_BRACES" value="false" />
      <option name="HAS_BRACKETS" value="false" />
      <option name="HAS_PARENS" value="true" />
    </options>
    <keywords ignore_case="false">
      <keyword name="#else" />
      <keyword name="#elseif" />
      <keyword name="#end" />
      <keyword name="#foreach" />
      <keyword name="#if" />
      <keyword name="#include" />
      <keyword name="#macro" />
      <keyword name="#parse" />
      <keyword name="#set" />
      <keyword name="#stop" />
    </keywords>
    <keywords2>
      <keyword name="in" />
    </keywords2>
    <keywords3 />
    <keywords4 />
  </highlighting>
</filetype>
  • No labels