htmlcmd.vim


Ⅰ. 插件描述

Rich HTML/XML commands

Ⅱ. 基本信息

创建日期:  2001-08-01
使用用户:  1
Github星:  1
插件作者:  Michael Geddes

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/htmlcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/htmlcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/htmlcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/htmlcmd.vim

Ⅳ. 文档说明

This script handles a number of mundane tasks in HTML / XML.  It allows you to create a default HTML header (Alt+0),  to define headings <h1> .. <h6> (Alt+1.. Alt+6), to toggle bold, italic, underline, paragraphs & kbd commands.  It gives shortcuts for ordered/unordered lists and row definitions.  

The script has commands to insert horizontal rules, line-breaks, and a number of  special symbols (just email me to add your favourite).  

It has imap mappings that give you ampersands (&&), smart-quotes (single - &' and double &"), <, > symbols,   and more.  It allow you to insert these and text descriptors or as numbers (for strict XML)

You can close the next open tag (alt-;) or close all open tags at that point (alt->).  
Not you may need to remap these for other platforms.

If you have defined 'htmlcmd_AUTOCLOSE' then there is some reasonably intrusive code that will close open tags:
try typing this
<p>Testingbold</p>

This should automatically close the

You can also generate a quick Table Of Contents for your document based on <H1>..<H6> headings.  There is a menu item to insert it.. and any options you give
are remembered for when you re-generate the TOC.

GenerateTOC( [<headingtypes>| * ])
:GenTOC [<headingtypes>| * ]

The optional argument is a string of types for each indent level. Eg. " 1ai." would mean level 1 is default (bullet), level 2 is a numbered list, level 3 has letters and level three has roman numerals.
It uses references where it can find them, and generates new ones where it can't.
The arguments supplied are remembered so the TOC can be regenerated without resuplying them.
If * is supplied as an argument, the script prompts for arguments - showing what the current values are.

When used with buffermenu.vim - Menus (for TOC generation) are local to the buffer.

添加新评论