On 19/02/09 16:09, Keith Christian wrote:
> Running VIM 7.2 with Cygwin and GVIM 7.2 on native Windows.
>
> I realize there are a lot of plug-ins for HTML tag insertion or
> completion available, but I'm wondering whether this feature exists in
> the native VIM install?
>
> It seems that a few versions ago, we'd use Ctrl-V to highlight a
> section and then press a key combination to surround the highlighted
> region with a pair of tags, e.g.<h1>hello, world</h1>  or similar.
>
> If HTML tag completion isn't in the default install, which of the
> plugins on vim.org are most people using?
>
> Thanks in advance.
>
> ==========Keith

The default HTML ftplugin has some completion with omni-completion, 
triggered by Ctrl-X Ctrl-O in Insert mode. For instance it will complete 
</ by closing the latest tag. There are other completions at other 
places, e.g. after <p and a space I see the following completions:
        class=          CDATA
        dir=            String
        id=             ID
        lang=           LangCode
        onclick=        Script
        ondblclick=     Script
        onkeydown=      Script
        onkeypress=     Script
        onkeyup=        Script
        onmousedown=    Script
        onmousemove=    Script
        onmouseout=     Script
        onmouseover=    Script
        onmouseup=      Script
        style=          StyleSheet
        title=          Text

In Vim as distributed (with no optional plugin) there is no mapping to 
insert both an opening tag and thez corresponding tag at the same time: 
the HTML plugin assumes that you will type straight forward, but it 
includes some completions for that purpose.

You may or may not be interested in the closetag.vim custom plugin, 
which closes the latest open tag if you hit Ctrl-_ -- it is available in 
the "scripts" section of www.vim.org


Best regards,
Tony.
-- 
A parent can be arrested if his child cannot hold back a burp during a 
church
service.
                [real standing law in Nebraska, United States of America]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to