Vim Tips Wiki
Advertisement

Use this page to discuss script 301 xmledit: A filetype plugin to help edit XML, HTML, and SGML documents

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Query

There seems to be a typo in the installation instructions for the XML-plugin. (i.e. '~/.vim/ftplugin/xml.vim) should be i.e. '~/.vim/plugin/xml.vim) . It worked for me anyway.

Incorrect. This is a filetype plugin, so the location listed in the installation instructions is the correct one. Most likely, you are not turning on filetype plugins or filetype detection, and thus the plugin is not loaded unless you enable it globally for all filetypes as you have done. Try putting filetype plugin indent on in your .vimrc instead of moving the plugin. See the notes on the plugin page (recently added?) about how the plugin will not load automatically, you must first edit an XML file or set the filetype to XML manually for the plugin to load. --Fritzophrenic 15:14, February 22, 2010 (UTC)

JC wrote on May 26th 2010:

I cannot get this plugin to work on Vista
I place the xml.vim file in $VIM/vimfiles/ftplugin and add "filetype plugin indent on" (without the quotes in the $VIM/_vimrc
I open an .xml file and I see some DOS windows flash by. I see a directory called Files be created but there are no files in any directories and the lithmus test of using % on a tag does not navigate to the closing tag.

It is quite possible that the script does not properly handle spaces in a file path, I assume your $VIM variable is somewhere in the "Program Files" directory. However, in general scripts should be installed to either $HOME/vimfiles or $VIMRUNTIME/vimfiles. I do not think that installing to $VIM/vimfiles should accomplish anything at all.

Have you tried contacting the script maintainer listed on the script page itself (script#301)? He may not be watching this page yet. --Fritzophrenic 21:08, May 26, 2010 (UTC)

Comments

Advertisement