Right... it's not exactly the most standardized format out there.
Some parsers support quoted RHS, others don't. It wouldn't shock me
if some support heredocs, but for the ones that do, is "dosini" really
the best filetype name? DOS doesn't support heredocs AFAIR, and .ini
is used on other systems than DOS as an easily-parseable format...
Maybe "dosini.vim" should be moved to "ini.vim", since it is used on
non-dos systems? Is there any precedent for renaming a filetype?
> So, does dosini support heredoc-style assignments? The tip seems to
> imply that *many* but not *all* programs that use .ini files can
> support, so perhaps it would be better as a tip than an official part
> of the syntax file. But I'd like to get input from those that know
> more about this before proceeding.
Well... how much harm is there in including it even if it isn't
supported? It would only affect people who assign a variable a value
matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
would do that unless they knew the file would be parsed by something
supporting heredocs?
~Matt
I agree. It's a mess.
> Some parsers support quoted RHS, others don't. It wouldn't shock me
> if some support heredocs, but for the ones that do, is "dosini" really
> the best filetype name? DOS doesn't support heredocs AFAIR, and .ini
> is used on other systems than DOS as an easily-parseable format...
> Maybe "dosini.vim" should be moved to "ini.vim", since it is used on
> non-dos systems? Is there any precedent for renaming a filetype?
My memory matches yours regarding DOS, etc. I don't know of a precedent,
for a name change but I think such a change would make sense in this
case. It probably shouldn't have, but the .ini format has spread like a
virus to all kinds of areas.
> Well... how much harm is there in including it even if it isn't
> supported? It would only affect people who assign a variable a value
> matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
> would do that unless they knew the file would be parsed by something
> supporting heredocs?
I think so.
Ben.
What about backwards compatibility? With, for instance, users having
~/.vim/after/ftplugin/dosini.vim (and/or syntax/dosini.vim,
indent/dosini.vim) or files with other extensions having ft=dosini in a
Vim modeline?
Or else, keep the existing dosini.vim scripts and define a new "ini"
filetype with different scripts, the detection (and identification of
which is which) being done maybe automatically (by inspecting the file's
contents) or maybe manually (by a global variable -- undefined would
mean keep the current behaviour)?
The new scripts could even source the old ones (and extend them) the way
cpp.vim does with c.vim
>
>> Well... how much harm is there in including it even if it isn't
>> supported? It would only affect people who assign a variable a value
>> matching /<<\(\I\i*\)/ - wouldn't it be safe to assume that no one
>> would do that unless they knew the file would be parsed by something
>> supporting heredocs?
>
> I think so.
>
> Ben.
or those who include that kind of text in a comment?
Best regards,
Tony.
--
The streets are safe in Philadelphia, it's only the people who make
them unsafe.
-- Mayor Frank Rizzo