A Vim snippet library for ES2015. You may also want to check out vim-react-snippets.
Requires UltiSnips.
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>"
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.