So: I notice that there isn't a Velocity (VTL) bundle available, and it's listed as something people are interested in. I also can't see one in the Subversion repository.
As a result: I'm interested in one, and I'm working on one. So far (after 1-2 hours work) it covers syntax highlighting for keywords in Velocity lines, as well as single-line comments; there's also some basic snippets for commonly used methods (set, cparse, parse, if, foreach). It also inherits all the HTML highlighting/functionality, obviously.
If anyone else is interested in this bundle, I'd be very grateful for feature requests and suggestions on what syntax highlighting should cover. I'd also be interested to know what it *shouldn't* do.
At some point I'll see if I can get an SVN login and put it into the repository.
Anyhow, thought this might be of some interest.
t.
On Jul 14, 2006, at 5:44 AM, Tom Armitage wrote:
It also inherits all the HTML highlighting/functionality, obviously.
I think it's great that you're implementing this bundle! I recently did some work with Velocity, but it wasn't for generating HTML. I'm not sure how one would go about implementing a bundle that reuses the same grammar in multiple scopes, but that might be worth looking into here. Perhaps a Velocity-HTML language and a Velocity-Plain Text language?
Personally, I'd much prefer to use XSL-T for generating HTML than using Velocity, but sometimes it's a necessary evil...
-- Brian Lalor blalor@bravo5.org
Hmn. Good point - I'm really not used to Velocity at all; I'm a Rails and PHP developer at heart. New job meant a move to Java, and we use Velocity to template sites.
To be specific, my current bundle is called HTML(Velocity). The best example perhaps for doing what you suggest is the HTML(Rails) bundle: it essentially describes the Rails template delineators, and then says "when you're in scope html.text.rails, inherit all your highlighting from the ruby bundle".
So it'd definitely be possible.
Right now, my main use case is HTML(Velocity), so I'm going to stick to that, and then see if it can be abstracted out. Velocity seem to be really rather limited in functionality, so it's more a case of getting the scoping and highlighting right, rather than coping with endless method names. And no, I have no plans to autocomplete methods on objects (yet).
Advice from other bundle developers would definitely be welcome, incidentally; I've never really done this before, but it doesn't appear to be so hard...
t.
On 14/07/06, Brian Lalor blalor@bravo5.org wrote:
On Jul 14, 2006, at 5:44 AM, Tom Armitage wrote:
It also inherits all the HTML highlighting/functionality, obviously.
I think it's great that you're implementing this bundle! I recently did some work with Velocity, but it wasn't for generating HTML. I'm not sure how one would go about implementing a bundle that reuses the same grammar in multiple scopes, but that might be worth looking into here. Perhaps a Velocity-HTML language and a Velocity-Plain Text language?
Personally, I'd much prefer to use XSL-T for generating HTML than using Velocity, but sometimes it's a necessary evil...
-- Brian Lalor blalor@bravo5.org
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate