vim-es2015-snippets


Ⅰ. 插件描述

:scissors: ES2015 code snippets for vim

Ⅱ. 基本信息

创建日期:  2016-10-10
使用用户:  125
Github星:  34
插件作者:  Emmanuel Pilande

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vim ES2015 Snippets

A Vim snippet library for ES2015. You may also want to check out vim-react-snippets.

Requires UltiSnips.

vim-es2015-snippets

Installation

Using vim-plug:

" ES2015 code snippets
Plug 'epilande/vim-es2015-snippets'

" React code snippets (Optional)
Plug 'epilande/vim-react-snippets'

" Ultisnips
Plug 'SirVer/ultisnips'

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

Usage

In a JavaScript or JSX file, type a trigger name while in Insert mode, then press Ultisnips trigger key. In my case I have it mapped to <C-l>.

In Insert mode

c=><C-l>

Will expand to

const name = (args) => {
  return ;
};

Check out UltiSnips/javascript.snippets to see all snippets.

添加新评论