HtmlHelper


Ⅰ. 插件描述

Html macros and mappings

Ⅱ. 基本信息

创建日期:  2009-06-07
使用用户:  1
Github星:  1
插件作者:  Dimitar Dimitrov

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

" Html macros and mappings for:
" ------------------------------------------
"
"    *  Closing        an opening tag
"    *  Wrapping     text with tags
"    *  Increasing    the weight of header tags (<h1>...)
"    *  Formatting    text inside a pair of tags
"    *  Rearranging  <tag> content </tag> vertically
"    *  Stripping       outer tags
"    *  'Spacing'       vertically the content of a pair of tags
"
" 1. Close an opening tag
" -----------------------
"
"     >> : <tag> newline </tag> (write quickly a second > after the first one)
"     >/ : <tag>         </tag>
"     <? : <?php             ?>
"
" 2. Wrapping:
" ------------
"
"         +-----------+-------------------+
"         | paragraph | WORD or selection |
" +-------+-----------+-------------------+
" | <ul>  |    @u     |        u         |
" | <ol>  |    @o     |        o         |
" | <p>   |    @p     |        p         |
" | <div> |    @d     |        d         |
" +-------+-----------+-------------------+
"
" Note: u and o work on fully selected lines only
"
" Note: mnemo for paragraphs and lines: wrap @ll
"
" Note: You can use a count with the mappings
"
"              +------+-------------------+
"              | line | WORD or selection |
" +------------+------+-------------------+
" | <td>       |  @t  |        t         |
" |         |  @a  |        a         |
" | <span>     |  @s  |        s         |
" | <h1>       |  @h  |        h         |
" | <li>       |  @l  |        l         |
" | <!-- -->   |  @c  |        c         |
" |        |  @e  |        e         |
" |    |  @b  |        b         |
" +------------+------+-------------------+
"
" 3. Insert an image
" ------------------
"
"     @i ()
"
" 4. Set the class of a tag
" -------------------------
"
"     :Class ul         -> <ul>                 (default)
"     :Class ul bg_blue -> <ul class='bg_blue'>
"
" Note: Try using :C or :Cl or... instead of :Class. Depending on the
"       installed plugins, a shorter or longer abbreviation might work.
"
" Shortcuts: (:C shortcut)
"     d,   s,    u,  o,  h,  l,  t,  i,   e,  b
"     div, span, ul, ol, h1, li, td, img, em, strong
"
" Note: If you don't want to write a tag manually, you can use <tab>
"       after :Class to autocomplete your tag.
"       (put a space after :Class before hitting <tab>)
"
" 5. <hn -> <hn+1 (Use after a @h or h)
" --------------------------------------
"
"     @j (mnemo: j is just besides h on the keyboard)
"
" 6. gq inside a pair of tags
" ---------------------------
"
"     @g for standard tags
"     g for <!-- --> or <?php ?>
"
" 7. Rearrange <tag> content </tag> vertically
" --------------------------------------------
"
"     @r for standard tags
"     r for <!-- --> or <?php ?>
"
" 8. Strip outer tags
" -------------------
"
"     @x for standard tags
"     x for <!-- --> or <?php ?>
"
" 9. 'Space' vertically the content of a pair of tags
" ---------------------------------------------------
"
"     @m for standard tags        (mnemo:
)
"     m for <!-- --> or <?php ?>
"
" A detailed help is in the comments of the file itself!

添加新评论