Drastic proposal: rename eruby to rhtml to make way for an HTML free eruby filetype
dougkearns at gmail.com
Sat Mar 10 00:52:02 EST 2007
On Fri, Mar 09, 2007 at 09:47:38AM -0600, Tim Pope wrote:
> The subject says it all. The most common use of eruby is filling out
> HTML templates, but this is by no means the only use. I think it
> would be a good idea to have an rhtml filetype for html templates, and
> an eruby filetype for everything else. There is precedent for this
> elsewhere: Vim has a django filetype for Django templates and
> apparently will be getting a separate djangohtml filetype.
What is special, other than its current predominance, of rhtml over
other files containing eRuby? Why should rhtml files be given special
treatment and rfoo and rbar files be lumped together in some other
generic eRuby filetype?
> I am well aware that changing filetypes around is not something to be
> taken lightly. I would anticipate phasing this in over a couple of
> *Vim* releases. I have no intention of even starting such a
> transition until Vim 7.1 draws nearer. At this point, I'm looking for
> objections other than "this would be hard to do." If there were
> no technical or backwards compatibility restrictions, and such a
> change could be made with zero side-effects, would anybody disagree
> with such a change?
Allowing other 'host' filetypes to work is actually something on my ever
growing TODO list but I don't actually use eRuby so motivation can be
hard to come by... ;-) I'm glad you're working on it - thanks.
> An alternative to this is to have a new filetype for eruby files
> without HTML. Something like plaineruby or erubytext. This would
> work but it makes me cringe,
> much like the tex filetype being LaTeX
> and the plaintex filetype being TeX. I'd like to make my proposed
> change while Vim support for eruby is still young and evolving.
> Once again, I'm looking for idealistic objections at this point rather
> than practical ones. Does anyone object to the idea of two filetypes,
> or of my suggested naming scheme?
Well, again, it seems to me that there shouldn't really be an
"idealistic" need to make a special case for rhtml files. What am I
The implementation is, as always, a whole other matter...
More information about the vim-ruby-devel