Schema-aware XML editing in Vim

When editing an XML file in IntelliJ IDEA, if the document references a schema, IDEA will fetch the schema and use the information for auto-complete. It knows which tags are valid in which contexts, so when you hit CTRL-space, it suggests only those tags. It also highlights any tags that are invalid according to the schema.

Does anybody know of an extension for Vim that provides similar functionality?


The closest thing that I've seen for Vim is the XML Completion script.

It contains XML definition files for DocBook 4.[234], XSL FO 1.0, XSLT 1.0, Relax NG 1.0, XML Schemas 1.0, SVG 1.1, XHTML 1.1, XInclude 1.0 and OpenOffice 1.0 XML format.

VIM 7+ supports that by default without any plugins, it can load XML definition, there are converters for DTD and SchemaNG:

For example my Vim 7.3 already have definitions for XHTML:

$ rpm -ql vim vim-common | grep xml

Try it, it's worth it. Everything is documented clearly under the link above, I will not copy-paste it here.

Need Your Help

Prevent line break in System.Windows.Forms.Button

.net winforms

is there any way to prevent the WindowsForm button control from performing a line break when the string in its .Text property is too long?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.