Ⅰ. 插件描述
Angular 2 TypeScript Snippets for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'magarcia/vim-angular2-snippets'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'magarcia/vim-angular2-snippets'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'magarcia/vim-angular2-snippets'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/magarcia/vim-angular2-snippets
Ⅳ. 文档说明
# Angular 2 TypeScript Snippets for Vim
This repository contains Snipmate snippets for Angular 2 for TypeScript and HTML, based on johnpapa/vscode-angular2-snippets.
Installation
Use a package manager that supports github repositories.
Vundle Example:
Add Bundle 'magarcia/vim-angular2-snippets' to your .vimrc
Plug Example:
Add Plug 'magarcia/vim-angular2-snippets' to your .vimrc
Usage
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 subscriptionHTML Snippets
ng2-ngClass
ng2-ngFor
ng2-ngIf
ng2-ngModel
ng2-routerLink
ng2-ngStyle
ng2-ngSwitch 