问题
Is there a plugin/download for Velocity syntax in WebStorm?
I came across this post but do not have the dir filetypes
in my path (for Mac). I'd like some syntax highlighting for easier reading if it's available:
回答1:
Velocity support in only available IntellJ IDEA Ultimate. Unfortunately migrating it to WebStorm is not an easy task, as Velocity plugin heavily relies on Java... So currently we have no plans to provide Freemarker/Velocity template engine support in WebStorm. If you miss this feature and purchasing Idea is not an option for you, please feel free to file a request for providing Velocity support to youtrack, https://youtrack.jetbrains.com/issues/WEB Also I can suggest searching for existing textmate bundles for Velocity files on the web, import them and use for the Velocity syntax highlighting - see http://blog.jetbrains.com/phpstorm/2013/05/textmate-bundles-in-phpstorm/ and https://stackoverflow.com/a/16451778/2000323 for more info
回答2:
Since it is not supported in WebStorm yet I would suggest associating .vm files with xhtml.
You can do that by opening the search action
dialog (cmd+shift+a in mac) and searching for associate with file type
. Then choose the xhtml
format.
It will not highlight all the velocity related code correctly but it is the best available solution.
来源:https://stackoverflow.com/questions/37688199/velocity-syntax-highlighting-in-webstorm