DTD2VIM(1)
π DTD2VIM(1) π
okay bestie, sit down, hydrate, because we're about to talk about dtd2vim β the little icon that makes Vim's XML completion go absolutely feral. it's a section 1 manual page, so it's a command-line girly. let's get into it π
β¨ NAME β¨
dtd2vim β creates XML data file for Vim7 omni completion from DTDs
like. it literally builds the XML data file that Vim7's omni completion eats for breakfast. no cap.
π SYNOPSIS π
dtd2vim {filename.dtd} [dialectname]
so you hand it a .dtd file, and optionally a dialect name. that's the whole vibe. π¦
πΈ DESCRIPTION πΈ
okay so first things first: this manual page documents the dtd2vim program briefly (yes, that's basically the original's own energy, she's humble). if you want the whole story, the HTML documentation lives at:
/usr/share/doc/vim-scripts/html/dtd2vim.html
β¨ now the lore β¨
Starting from version 7, Vim supports context aware completion of XML files (and others, she's versatile). and specifically β when the file you're editing is an XML file, the completion can be driven by the grammar extracted from a Document Type Definition (DTD). it's giving "your editor actually knows what you mean" energy. π₯
for this feature to work, you (yes, you, bestie) should put an XML data file corresponding to the desired DTD in an autoload/xml directory contained in a directory belonging to Vim's 'runtimepath'. for example:
~/.vim/autoload/xml/
got it? autoload/xml, inside something on your 'runtimepath'. don't skip that part, it's literally the whole trick. π
and dtd2vim is the program that creates XML data files from DTDs. give it a DTD file.dtd as input and it will create a file.vim XML data file. slay. π
dialectname will be part of dictionary name and will be used as argument for the :XMLns command. so if you're naming your dialect, that name is doing double duty β dictionary name and :XMLns argument. main character responsibilities. π
π OPTIONS π
- None. β that's it. that's the list. zero flags, zero options, she simply does not have them and we respect that. π
π SEE ALSO π
vim(1).- In the Vim online help:
:help compl-omni,:help ft-xml-omni,:help :XMLns. dtd2vimis fully documented in/usr/share/doc/vim-scripts/html/dtd2vim.html.
π«Ά AUTHOR π«Ά
This manual page was written by Stefano Zacchiroli <zack@debian.org> for the Debian system (but may be used by others). π
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. (yes, "any later version" β that's the wording, keep it.)
On Debian systems, the complete text of the GNU General Public License can be found in:
/usr/share/common-licenses/GPL
π AUTHOR π (again, she's listed twice, and honestly? iconic)
Stefano Zacchiroli Author.
π COPYRIGHT π
Copyright Β© 2007 Stefano Zacchiroli
and that's the whole page bestie!! this one came from [FIXME: source] and is dated 05 Feb 2007 β so like, vintage, but the info still eats. π go forth and complete your XML like the icon you are. mwah. π§β¨
π¦ where this page comes from
- debian trixie: vim-scripts 20210124.4
- ubuntu jammy: vim-scripts 20210124.2
- ubuntu noble: vim-scripts 20210124.2
- ubuntu questing: vim-scripts 20210124.5
- ubuntu resolute: vim-scripts 20210124.5+nmu1
- ubuntu stonking: vim-scripts 20210124.5+nmu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms