Drastic proposal: rename eruby to rhtml to make way for an HTML free eruby filetype

Hugh Sasse hgs at dmu.ac.uk
Wed Mar 21 06:12:20 EDT 2007


On Tue, 20 Mar 2007, Tim Pope wrote:

> On Tue, Mar 13, 2007 at 10:08:38AM +0000, Hugh Sasse wrote:
> > On Mon, 12 Mar 2007, Tim Pope wrote:
> > > Perhaps we should start by making a list of common filetypes combined
> > > with eruby, so we can see what the common cases are.  So far I have
> > > 
> > > HTML
> > > YAML - used with ERB in Rails
> > > C - as mentioned by Hugh Sasse
> >   Java -- See Code Generation In Action, mentioned before.
> > 
> >   There is a school of thought that programmers consider
> >   [0, 1, Many] as the numbers that are important.  Thus I suggest
> >   C + Java  implies C#, C++, ... and any language which doesn't have
> >   it's own templater available.  Things like Perl and Lua may not
> >   need ERB...  Which doesn't mean someone won't use it anyway.
> 
> I certainly agree, glad you're still keeping idealistic.  But when it

Idealistic?  :-)  I'm being cynical -- trying to think of ways 
people will break it before it exists :-)

> comes down to implementation supporting every possible filetype may

No, but allowing people to do their own support is another matter.
Leaving things open, and the idea of plugins...

> not be possible, so I want to get an idea of what to prioritize.  I
> will keep all these "compiled" languages in mind.  As you point out,
> uses of eruby with Perl and Lua are corner cases at best, and not
> worth worrying about so much.
> 
> To all, thanks for the feedback.  I'm going to sit on this a while and
> think things over.  Right now, I'm thinking something vaguely like the
> following:
> 
> An eruby syntax file which highlights the non-Ruby parts as plain text.
> This file can be :source'd and combined with other filetypes in a
> relatively straightforward manner.

With you so far...
> 
> An rhtml syntax file that combines the eruby syntax file and html
> syntax file.  This would serve both as an example of how to combine
> filetypes and also fulfill the most common (according to me) need of
> using html with eruby.

Yes, agree with this too...
> 
> I still haven't decided about ftplugins and indent plugins.  Ideally
> they could parallel the syntax files with combining but I haven't
> looked into how feasible that is.

Maybe we need an enhancement request, but it would be nice if there
were a way to pass "the other text" that we now treat as plain, to 
the 'filetype detect' system of Vim, like we'd pass stuff to a block
in Ruby.  No, I don't know how to do that at present.
> 
> Cheers,
> Tim
        Hugh


More information about the vim-ruby-devel mailing list