File tree Expand file tree Collapse file tree 3 files changed +46
-18
lines changed Expand file tree Collapse file tree 3 files changed +46
-18
lines changed Original file line number Diff line number Diff line change 11## vim es6 snippets
22
3- > Write ES6 easy
3+ > Write JavaScript ES6 easily with vim snippets.
44
55## Install
66
7- [ Download zip file ] ( http ://www.vim.org/scripts/script.php?script_id=0 ) :
7+ > You need [ SnipMate ] ( https ://github.com/garbas/vim-snipmate ) installed.
88
9- cd ~ /.vim
10- unzip vim-es6-snippets.zip
9+ To install using [ Vundle] ( https://github.com/gmarik/vundle ) :
10+
11+ " add this line to your .vimrc file
12+ Plugin 'isRuslan/vim-es6-snippets'
1113
1214To install using pathogen.vim:
1315
14- cd ~ /.vim/bundle
15- git clone https://github.com/isRuslan/vim-es6-snippets.git
16+ cd ~/.vim/bundle
17+ git clone https://github.com/isRuslan/vim-es6-snippets.git
1618
17- To install using [ Vundle] ( https://github.com/gmarik/vundle ) :
19+ To manual install [ download] ( http://www.vim.org/scripts/script.php?script_id=0 ) zip file:
20+
21+ cd ~/.vim
22+ unzip vim-es6-snippets.zip
1823
19- " add this line to your .vimrc file
20- Plugin 'isRuslan/vim-es6-snippets'
2124
2225To checkout the source from repository:
2326
24- cd ~ /.vim/bundle
25- git clone https://github.com/isRuslan/vim-es6-snippets.git
27+ cd ~/.vim/bundle
28+ git clone https://github.com/isRuslan/vim-es6-snippets.git
2629
27- ``` vim
28- Bundle 'MarcWeber/vim-addon-mw-utils'
29- Bundle 'tomtom/tlib_vim'
30- Bundle 'garbas/vim-snipmate'
31- Bundle 'isRuslan/vim-es6-snippets'
32- ```
3330
34- ## List
Original file line number Diff line number Diff line change 11# Welcome to the Javascript ES6 snippets!
2+
3+ # Generator function
4+ snippet gfn
5+ function* ${1: name } (${2} ) {
6+ yield ${3} ;
7+ }
8+
9+ # Arrow function
10+ snippet =>
11+ (${1} ) => {
12+ ${2}
13+ }
14+
15+ # Class
16+ snippet class
17+ class ${1: name } {
18+ constructor (${2: arg } ) {
19+ ${3: // init }
20+ }
21+ ${4}
22+ }
23+
24+ # For of loop
25+ snippet forof
26+ for (let ${1: s } of ${2: sequence } ) {
27+ ${3}
28+ }
29+
30+ # Import
31+ snippet im
32+ import ${1: foo } from "${2: bar } "
33+
You can’t perform that action at this time.
0 commit comments