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[edit source]

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)

Installation?[edit source]

The installation instructions don't match the newest version. Do we put the "vimball" (whatever that is) in the "ftplugin" directory? Do we need to create an ftplugin directory? I see above that there may be additional installation steps required, turning on some sort of plugin manager for vim?

I'd really like to use the plugin; clear installation notes for someone who doesn't do this sort of thing every day would be super helpful! Thanks ^.^

You edit a "vimball" file in Vim, then source it to install a plugin. This as a rather outdated way of managing plugins but it should still work.
What you can do now (vim 8.0 or higher, I think), is just clone the github repository into ~/.vim/pack/whateverNameYouLike/start (C:\Users\yourUserName\vimfiles\pack\whatevernameYouLike\start on Windows) and restart Vim. This "pack" directory feature makes the Pathogen "plugin manager" mostly obsolete, although if you want to install a 3rd-party plugin manager some out there also offer things like auto-update and the like. But for simple plugin installation you don't need a plugin manager.
--Fritzophrenic (talk) 20:01, February 6, 2019 (UTC)

Comments[edit source]

Community content is available under CC-BY-SA unless otherwise noted.