XML display "problem"

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

XML display "problem"

robert h-2
If I open an XML file in Notepad everything is in tags. Good.

If I open the same XML file in Vim I am getting the < to display a
"<" etc.

How do I turn it off...or can I?

Bob

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

Tim Chase
On 11/08/10 10:23, Robert Hicks wrote:
> If I open an XML file in Notepad everything is in tags. Good.
>
> If I open the same XML file in Vim I am getting the&lt; to display a
> "<" etc.
>
> How do I turn it off...or can I?

I've opened a lot of XML files in Vim, and have never experienced
vim mangling my text/tags.  This could be a couple things:

1) Notepad being too smart for its own good (unlikely)

2) you *think* you're opening it in Notepad, but it's some other
tool.  I know on Win32, several XML files are sniffed for content
such as Excel's "XML Document" format, differing from DOCX) and
opened with something other than the default "open this with
Notepad" (or IE, or whatever your file associations specify).  If
you're really opening Notepad and using the File->Open menu to
navigate to the XML file and open it, and you still see kosher
XML, then it's likely good XML data.  Which then indicates
something in Vim...

3) a Vim plugin that you have enabled that escapes HTML entities

To test for #3, I'd try starting vim with

   vim -u NONE my_file.xml

to start a virgin copy of Vim.  If you appropriately see what you
expect (i.e. non-escaped entities), then some plugin/script is
interfering with things.  If you then restart vim normally and
open the file

   vim my_file.xml

and issue

   :scriptnames

and include the output in your reply, it might help track down
the rogue script that's hosing your XML.

Hope this gets you closer to an answer,

-tim



--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

Nikolay Aleksandrovich Pavlov
In reply to this post by robert h-2
Reply to message «XML display "problem"»,
sent 19:23:09 08 November 2010, Monday
by Robert Hicks:

> If I open an XML file in Notepad everything is in tags. Good.
>
> If I open the same XML file in Vim I am getting the &lt; to display a
> "<" etc.
>
> How do I turn it off...or can I?
Do you mean that `<' in tags is displayed as `&lt;' or that `&lt;' is displayed
as `<'? In first case, it should be an issue with plugins, in the second case it
can be a new conceal feature: add
    set conceallevel=0
somewhere into vimrc.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

robert h-2
In reply to this post by Tim Chase
On Nov 8, 11:34 am, Tim Chase <[hidden email]> wrote:

> On 11/08/10 10:23, Robert Hicks wrote:
>
> > If I open an XML file in Notepad everything is in tags. Good.
>
> > If I open the same XML file in Vim I am getting the&lt; to display a
> > "<" etc.
>
> > How do I turn it off...or can I?
>
> I've opened a lot of XML files in Vim, and have never experienced
> vim mangling my text/tags.  This could be a couple things:
>
> 1) Notepad being too smart for its own good (unlikely)
>
> 2) you *think* you're opening it in Notepad, but it's some other
> tool.  I know on Win32, several XML files are sniffed for content
> such as Excel's "XML Document" format, differing from DOCX) and
> opened with something other than the default "open this with
> Notepad" (or IE, or whatever your file associations specify).  If
> you're really opening Notepad and using the File->Open menu to
> navigate to the XML file and open it, and you still see kosher
> XML, then it's likely good XML data.  Which then indicates
> something in Vim...
>
> 3) a Vim plugin that you have enabled that escapes HTML entities
>
> To test for #3, I'd try starting vim with
>
>    vim -u NONE my_file.xml
>

That makes it display fine...

> to start a virgin copy of Vim.  If you appropriately see what you
> expect (i.e. non-escaped entities), then some plugin/script is
> interfering with things.  If you then restart vim normally and
> open the file
>
>    vim my_file.xml
>
> and issue
>
>    :scriptnames
>
> and include the output in your reply, it might help track down
> the rogue script that's hosing your XML.
>

  1: C:\Vim\_vimrc
  2: C:\Vim\vimfiles\vimrc
  3: C:\Vim\vim73\macros\matchit.vim
  4: C:\Vim\vim73\syntax\syntax.vim
  5: C:\Vim\vim73\syntax\synload.vim
  6: C:\Vim\vim73\syntax\syncolor.vim
  7: C:\Vim\vim73\filetype.vim
  8: C:\Vim\vim73\ftplugin.vim
  9: C:\Vim\vim73\indent.vim
 10: C:\Vim\vim73\colors\desert.vim
 11: C:\Vim\vim73\plugin\getscriptPlugin.vim
 12: C:\Vim\vim73\plugin\gzip.vim
 13: C:\Vim\vim73\plugin\matchparen.vim
 14: C:\Vim\vim73\plugin\netrwPlugin.vim
 15: C:\Vim\vim73\plugin\rrhelper.vim
 16: C:\Vim\vim73\plugin\spellfile.vim
 17: C:\Vim\vim73\plugin\tarPlugin.vim
 18: C:\Vim\vim73\plugin\tohtml.vim
 19: C:\Vim\vim73\plugin\vimballPlugin.vim
 20: C:\Vim\vim73\plugin\zipPlugin.vim
 21: C:\Vim\vimfiles\after\plugin\snipMate.vim
 22: C:\Vim\vim73\syntax\xml.vim
 23: C:\Vim\vim73\syntax\dtd.vim
 24: C:\Vim\vim73\ftplugin\xml.vim
 25: C:\Vim\vim73\indent\xml.vim

The only one I see that I added is snipMate.vim....

Bob

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

robert h-2
On Nov 8, 12:49 pm, Robert Hicks <[hidden email]> wrote:
> On Nov 8, 11:34 am, Tim Chase <[hidden email]> wrote:

> The only one I see that I added is snipMate.vim....
>

I took that one out...still displays wierd

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

Nikolay Aleksandrovich Pavlov
Reply to message «Re: XML display "problem"»,
sent 21:00:54 08 November 2010, Monday
by Robert Hicks:

Have you tested ``set cole=0'' from my answer?

Original message:
> On Nov 8, 12:49 pm, Robert Hicks <[hidden email]> wrote:
> > On Nov 8, 11:34 am, Tim Chase <[hidden email]> wrote:
> >
> > The only one I see that I added is snipMate.vim....
>
> I took that one out...still displays wierd

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: XML display "problem"

robert h-2
On Nov 8, 1:17 pm, ZyX <[hidden email]> wrote:
> Reply to message «Re: XML display "problem"»,
> sent 21:00:54 08 November 2010, Monday
> by Robert Hicks:
>
> Have you tested ``set cole=0'' from my answer?
>

Never mind...I was being less than smart with this.  The wraps were
different and I was looking at different but similar portions of the
file. It didn't click until I went to paste into this email.

Dumb dumb dumb...I knew Vim wouldn't fail me like that.

Bob

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php