You can define Velocity variables in comments, e.g.
#* @vtlvariable name="getterUtil" type="GetterUtil" *#
You can also do this in a special file so that your source code is not polluted with such comments.
To make IDEA aid you in this, put your caret on a usage of a variable in a Velocity template and press Alt+Enter to invoke quick-fix list. Then select "Define variable in comment" action.