GitHub - mhartington/vim-angular2-snippets: Snippets for Angular2 and Vim! (original) (raw)

Vim and Angular 2 snippets

Port of John Papa's VSCode Snippets

TypeScript Snippets

ng2-component-root // Angular 2 root App component ng2-bootstrap // Angular 2 bootstraping, for main.ts ng2-component // Angular 2 component ng2-pipe // Angular 2 pipe ng2-route-config // Angular 2 @RouteConfig ng2-route-path // Angular 2 routing path ng2-service // Angular 2 service ng2-subscribe // Angular 2 observable subscription

HTML Snippets

ng2-ngClass ng2-ngFor ng2-ngIf ng2-ngModel ng2-routerLink ng2-ngStyle ng2-ngSwitch

Installation

####vundle

Plugin 'mhartington/vim-angular2-snippets'

to .vimrc, and then run :PluginInstall.

####pathogen.vim

cd ~/.vim/bundle
git clone https://github.com/mhartington/vim-angular2-snippets.git

Then reload vim, run :Helptags

####apt-vim

apt-vim install -y https://github.com/mhartington/vim-angular2-snippets.git

For those who need it, a tarball is available fromhere.

Note

Only snipemate format at the moment. Works with NeoSnippets, my preferred snippets plugin. If you're up for adding UltiSnips compatibility, feel free to send a PR.