VelocityTemplateLanguage.xml is a file type configuration for IntelliJ 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


<?xml version="1.0" encoding="UTF-8"?>
<filetype binary="false" description="Velocity Template Language" name="Velocity Template Language">
      <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" />
    <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" />
      <keyword name="in" />
    <keywords3 />
    <keywords4 />
  • No labels