xml validation in vim

Vim is most famous for the steep learning curve, and only a little less famous for how useful it is.  Today, mucking about with xlm files in MacVim I discovered a nice validation trick.

With the bar.xml open, you can easily validate against foo.xsd. First, save your changes and then hit `:` and enter the following (it’s the pipe to the terminal command).

:! xmllint --noout --schema foo.xsd bar.xml
This entry was posted in tech, vim. Bookmark the permalink.

2 Responses to xml validation in vim

  1. Oliver Townshend says:

    excellent tip.

  2. saaadhu says:

    A nice short tip

please comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.