开发者

XML Schema reading/editing in vim?

开发者 https://www.devze.com 2022-12-13 10:49 出处:网络
As XML Schemas can be tedious to read (yes, just want to read throug开发者_Go百科h the schema) in their normal form, I\'m wondering if anyone knows of an existing plugin for vim which will display the

As XML Schemas can be tedious to read (yes, just want to read throug开发者_Go百科h the schema) in their normal form, I'm wondering if anyone knows of an existing plugin for vim which will display the schema in tree form, as several XML editors do? Selection of a node in this tree to navigate to the relevant section of the schema would be a good plus, but not absolutely necessary.

Thanks for your help!


I realize that you're looking for something different, but check out xml.vim. From the information available on the vimscripts website, it says it's capable of:

  • closing tags while you type
  • optional adding attributes
  • % matches end or begin tag
  • folding tags, comments and Cdata
  • adding start tag, end tags
  • adding tags around a visual block or a tag,
  • joining 2 adjacent same tags
  • deletings tag or tag sections
  • changing a tag

After you having it installed (by placing it in .vim/ftplugin, type :help xml-plugin for more information. You might be able to add a autocmd and fold all tags on buffer entry. That way you can traverse the xml file just as you would with a normal xml editor.


Maybe xmledit and XML folding can improve your experience.

0

精彩评论

暂无评论...
验证码 换一张
取 消