On Sun, Sep 6, 2009 at 6:30 AM, Tuomas<[email protected]> wrote: ... > When I am editing XML files, I would like to change the behavior of Xmledit > (<http://www.vim.org/scripts/script.php?script_id=301>) as follows. > > Having typed > `<tag>Some text', I would like to have `</tag>' inserted when I type (in > insert mode) `</'. In other words, > `<tag>Some text</_' becomes > `<tag>Some text</tag>_' (`_' denotes the cursor position). > > Having read the help file (:help xml-plugin.txt), I figure I need to set > xml_tag_completion_map in my _vimrc file to a proper value. However, attempts > such as > let xml_tag_completion_map = "\<\/" > have failed. Could anyone help me with this?
Personally, I use this: I have added the following to my vimrc: " CloseTag options: " http://vim.sourceforge.net/script.php?script_id=13 " closetag.vim " Functions and mappings to close open HTML/XML tags " This uses <C-_> to close an open tag above if filereadable(expand('$VIM/vimfiles/scripts/closetag.vim')) let g:closetag_html_style=1 autocmd Filetype html,xml,xsl,sql,ant,sqlunit,mhtml,php,conf,jsp source $VIM/vimfiles/scripts/closetag.vim endif So you can see which Filetypes I want to be able to use this map. So, when I want to close the last open tag I simply hit: CTRL-SHIFT-_ HTH, Dave --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
