dtd2vim : Script for creation XML data file for Vim7 XML omni-completion from DTDs
script karma |
Rating 20/7,
Downloaded by 3037 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Mikolaj Machowski |
|
script type |
utility |
|
description |
Script for creation XML data file for Vim7 XML omni-completion from DTDs
Requires: perl and perlSGML (tested against 1997Sep18 version)
INSTALLATION:
Copy into your $PATH
USAGE:
dtd2vim <file.dtd> [<dialectname>]
This command will create file <file.vim> (remove .dtd extension and add .vim;
other extensions will remain intact).
<dialectname> (not obligatory) will be part of dictionary name and will be
used as argument for :XMLns command (file name - sans extensions) have to be
the same.
perlSGML and this script doesn't work with multiple files. User has to
prepare single DTD file to parse all data.
In created file global variable is named g:xmldata_<dialectname>. When second
argument wasn't provided 'xxxx' will be used.
After that place file in:
~/.vim/autoload/xml
directory. Of course it can be also global directory or other Vim data
hierarchy of files. Example for DocBook 4.4:
DTD is in file docbook.dtd, call command with
dtd2vim.pl docbook.dtd docbook44
Put file as:
~/.vim/autoload/xml/docbook44.vim
Omni-completion for DocBook 4.4 files will be started with:
:XMLns docbook44
command.
|
|
install details |
Copy in your $PATH |
|
script versions (upload new version)
Click on the package to download.
dtd2vim |
2.0 |
2006-04-25 |
7.0 |
Mikolaj Machowski |
- not all element children were properly recognized
- comment out lines responsible for detection of obligatory attributes, too many false positives; uncomment on your own responsibility |
dtd2vim |
1.1 |
2006-02-18 |
6.0 |
Mikolaj Machowski |
- generate 'info' field for attributes and tags (/> - EMPTY tag, * - required attribute)
- no extension |
dtd2vim.pl |
1.0 |
2006-02-12 |
6.0 |
Mikolaj Machowski |
Initial upload |
ip used for rating: 142.132.191.50
|