Mikolaj Machowski wrote:
Dnia wtorek, 18 lipca 2006 06:23, David Purton napisaƂ:
Hi all,

I gather that the vim7 xml omnicomplete needs a data file to work -
which is fair enough, since you can get all the attributes as well this
way.

But, how can I get a generic xml omnifunction system where vim will just
close the last open tag for me.

eg, at present, for html, I have vim set up to close the current tag as
soon as I type '</'

Ugh. Forgot about that. Current implementation requires all that xml
stuff to close tags. Normally if you have data file you can do::

    inoremap </ </<c-x><c-o>

and it will close your tag. I've made corrections and sent it to Bram.
In few days it should be available on vim ftp in runtime package.

I will also make it available as:

http://skawina.eu.org/mikolaj/xmlcomplete.vim

m.




IMHO, inoremapping </ to </<C-X><C-O> might be included as a vim-online tip but definitely not as part of the standard XML/HTML filetype plugins. Include it at the appropriate place under ~/.vim/after/ if you want to; I hope Bram will have the sense _not_ no make it part of the standard $VIMRUNTIME distribution.

Remember also that if you include that mapping, you won't see the < of an _opening_ tag until after you've typed the ! of a <!-- comment or the first letter of the tag name.


Best regards,
Tony.

Reply via email to