vim-react-proptypes-snippets


Ⅰ. 插件描述

Vim React PropTypes Snippets

Ⅱ. 基本信息

创建日期:  2016-09-04
使用用户:  1
Github星:  9
插件作者:  Gilad Peleg

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# vim-react-proptypes-snippets

A set of snippets for Vim to work with Facebook's React PropTypes.

demo gif

Installation

Use your preferred Vim plugin installation method.

Example using NeoBundle:

" vim-react-snippets:
NeoBundle "pgilad/vim-react-proptypes-snippets"

" Ultisnips
NeoBundle "SirVer/ultisnips"

" Other sets of snippets (optional):
NeoBundle "honza/vim-snippets"

Usage

Within any Javascript or JSX file, you should be able to do the following:

(in insert mode)

ptfr<Tab>

Expanding to

PropTypes.func.isRequired,

And a bunch of others!
Check UltiSnips/javascript.snippets to see the full list.

License

MIT © Gilad Peleg

添加新评论