Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Support for Velocity (VM)#7531

Closed
AlanCezarAraujo wants to merge 1 commit intoadobe:masterfrom
AlanCezarAraujo:patch-1
Closed

Support for Velocity (VM)#7531
AlanCezarAraujo wants to merge 1 commit intoadobe:masterfrom
AlanCezarAraujo:patch-1

Conversation

@AlanCezarAraujo
Copy link
Copy Markdown

Add support for Velocity files (.vm).

Add support for Velocity files (.vm).
@peterflynn
Copy link
Copy Markdown
Member

I'm not super familiar with Velocity but on Wikipedia it says Velocity templates can be used for HTML, XML, Java source code, SQL source code, etc. Clearly it would be wrong to highlight all those as HTML. Is there any kind of prefix convention to disambiguate? For example, if people commonly write mytemplate.html.vm then we can add just that extension to the list... Or is it very rare to use Velocity to generate anything other than HTML, to the point we could reasonably assume all .vm files are HTML?

@TomMalbran
Copy link
Copy Markdown
Contributor

There is a velocity mode defined for CodeMirror: http://codemirror.net/mode/velocity/index.html

@dangoor
Copy link
Copy Markdown
Contributor

dangoor commented Apr 21, 2014

I put up PR #7588 today which will make it possible in user prefs to map .vm to .html, which I think is a better approach here because Velocity can be used for quite a variety of things. Also worth noting is that there's now a Velocity extension (1.0.1 uploaded on April 17th).

@peterflynn
Copy link
Copy Markdown
Member

@TomMalbran It looks like the CM mode isn't an overlay/mixed mode, so everything other than the template syntax is shown as plain text. In this PR, the user's preference is the exact opposite -- highlight the HTML bits and don't highlight the template syntax.

@dangoor
Copy link
Copy Markdown
Contributor

dangoor commented Apr 24, 2014

Now that #7588 has landed, I think that's the better solution for this... people can configure .vm files to map to HTML if they are using Velocity in that way in a project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants