Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bentayloruk/vim-react-es6-snippets'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bentayloruk/vim-react-es6-snippets'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bentayloruk/vim-react-es6-snippets'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bentayloruk/vim-react-es6-snippets
Ⅳ. 文档说明
Note: I've ported /snippets to es6 class usage. I've not touched /UtiliSnips.
vim-react-es6-snippets
A set of snippets for Vim to work with Facebook's React library.
A direct port of the awesome snippets from
justinj/vim-react-snippets.
Requires vim-snipmate.
Installation
Use your preferred Vim plugin installation method. Vundle or Pathogen should be fine (I use Pathogen).
Usage
Within any Javascript or JSX file, you should be able to do the following:
(in insert mode)
gdp<Tab>expanding to
getDefaultProps() {
return {
};
},And a bunch of others!
Check snippets/javascript.snippets to see the full list.