ragtag.vim


Ⅰ. 插件描述

ragtag.vim: ghetto HTML/XML mappings (formerly allml.vim)

Ⅱ. 基本信息

创建日期:  2007-05-12
使用用户:  1380
Github星:  306
插件作者:  Tim Pope

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# ragtag.vim

A set of mappings for HTML, XML, PHP, ASP, eRuby, JSP, and more (formerly allml)

This plugin started out as a set of personal mappings, but there was enough enjoyment among those I shared it with for me to clean it up and release it.

Features

A huge variety of filetypes are supported: html, xhtml, wml, xml, xslt, xsd, jsp, php, aspperl, aspvbs, cf, mason, htmldjango, and eruby. (Let me know if I missed any). Some features take note of the filetype and adapt to it.

Maps for editing tags are provided. This includes a couple of "make last word into a tag pair" maps, a doctype map (inserts <?xml ...?> in XML), a "close last tag" map, and a few extra goodies.

For templating languages (ASP, PHP, etc.), there are maps for inserting template code. The maps are dependent on the filetype: in ASP, you get <% %> and <%= %>, in PHP, <?php ?> and <?php print ?>, etc. If said template language has a comment syntax, there is a map for it, otherwise, that map points to <!-- -->.

Maps for XML/HTML escaping and URL encoding have been moved to unimpaired.vim.

Enhances surround.vim.

Self-Promotion

Like ragtag.vim? Follow the repository on
GitHub and vote for it on
vim.org. And if
you're feeling especially charitable, follow tpope on
Twitter and
GitHub.

License

Copyright (c) Tim Pope. Distributed under the same terms as Vim itself.
See :help license.

添加新评论