views:

40

answers:

0

I've used Vim's g:xmldata_ to describe xml possible elements to be able to use omni-compete for xml. The problem is not each 'A' node has 'a0', 'a1', 'an'. Sometimes 'A' node has only 'a0'. And the documentation of the a0 and A is different and depends on parent of 'A'.

E
|
|--A
|  \-a0     // documentation of E.A.a0
|  \-a1
|
\--B
   \-A
     \-a0     // documentation of E.B.A.a0

Documentations of A and a0 are different. But user will see the same help-text in the complete preview window.

Here is the test xmldata to play with. Put this

let g:xmldata_test = {
\ 'vimxmlroot': ['E'],
\ 'E': [['A', 'B']],
\ 'B': [['A']],
\ 'A': [['a0', 'a1']],
\ 'vimxmltaginfo': {
\ 'a0': ['', 'documentation that only confuses an user'] }}

in autoload/xml/test.vim
And execute while edit some xml document

:XMLns test

To bring up the complete window just type < and press C-X C-O

Is there any way to tell Vim for which 'a0' I want to set help information?