Cesar Romani wrote:
> Matt Wozniski wrote:
>> Cesar Romani wrote:
>>> Gene Kwiecinski wrote:
>>>>> Without the first line: <?xml version="1.0" encoding="UTF-8"?>
>>>>> works but not with it.
>>>>> If the file has the extension html, it works in all of cases.
>>>> What's *probably* happening is that there's some check on the file
>>>> contents itself, failing a .htm/.html extension, to determine
>>>> whether/not the file's actually html.
>>
>> That's not what's happening; it works for me after doing :set ft=html.
>>
>>>> xml is *not* html.  html is a subset of sgml with the html #.# dtd (eg,
>>>> html3.2, html4.0, etc.).  If you want, you can specify *xhtml*.  But an
>>>> html file inside a xml "wrapper" is just wrong.  Wouldn't surprise me if
>>>> that was coded into the matchit plugin somehow.  "File has a .htm/.html
>>>> extension? Nope. Let's see what's inside... First line has '<html...>'
>>>> anywhere? Nope. Okay, so it ain't html!"
>>> You are right but if I set "set ft=html" or "set ft=xhtml" it should be
>>> forced to be an html file because with the extension .htm/.html, matchit
>>> works fine.
>>
>> So something else must be interfering with you.  If you could
>> reproduce it from "vim -u NONE -N" after only sourcing matchit.vim,
>> I'd be truly surprised.
>
> If I do "vim -u NONE -N test" and source matchit.vim, it doesn't work at
> all, not even with a extension .html

Fair enough, I was forgetting that the html ftplugin would need to be
loaded, too.  It should work after doing this command line (broken
into multiple lines for readability, and to prevent wrapping):

vim -u NONE -N testfile \
-c 'runtime macros/matchit.vim' \
-c 'filetype plugin on' \
-c 'set ft=html'

This time I actually tested, and it works for me.  ;-)

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to