vim-react-html-snippets


Ⅰ. 插件描述

Vim plugin for html related snippets inside react components.

Ⅱ. 基本信息

创建日期:  2017-07-23
使用用户:  6
Github星:  0
插件作者:  Cristian Oliveira

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/cristianoliveira/vim-react-html-snippets

Ⅳ. 文档说明

# Vim React Html Snippets

A Vim snippet library for html when creating React components.
This plugin only provides the html(jsx) snippets it works well as a complement
of others snippets like:

https://github.com/epilande/vim-react-snippets

Requires UltiSnips.

Installation

Using vim-plug:

" React code snippets
Plug 'cristianoliveira/vim-react-html-snippets'

" Ultisnips
Plug 'SirVer/ultisnips'

" Trigger configuration (Optional)
" let g:UltiSnipsExpandTrigger="<C-l>"

Usage

As any other - you use specific codes for autocompletion. For this library
it is basic the html tag name.

Skeleton

  • <> "- Place a custom tag and cursors"
  • div "- Place a plain div"
  • divc "- Place a div using className"
  • div# "- Place a div with ID & className"
  • div. "- Place a div with className"
  • a "- Place a link and cursor for href"
  • img "- Place a img and cursor for src"
  • li "- Place a list"
  • ol "- Place a ol"
  • dl "- Place a dl"
  • p "- Place a paragraph"
  • select "- Place a Select Box"
  • strong "- Place a <strong>"
  • table "- Place a HTML <table>"
  • span "- Place a <span>"
  • span# "- Place a <span> with ID & className"
  • span. "- Place a <span> with className"

Properties

  • cn "- Place a className"

添加新评论