ultisnips-swift


Ⅰ. 插件描述

A small collection of Swift language snippets for vim+UltiSnips.

Ⅱ. 基本信息

创建日期:  2016-03-14
使用用户:  1
Github星:  1
插件作者:  Colin Drake

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'cfdrake/ultisnips-swift'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'cfdrake/ultisnips-swift'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'cfdrake/ultisnips-swift'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/cfdrake/ultisnips-swift

Ⅳ. 文档说明

# UltiSnips Snippets for Swift

A small collection of Swift vim snippets using UltiSnips.

Example Usage

While editing a Swift file, typing ibo then pressing tab will transform
into the following:

@IBOutlet weak var __: __?

Where __ are blanks replaced by user input.

Please consult the documentation of UltiSnips for further usage.

Installation

Using Vundle:

Plug "cfdrake/ultisnips-swift"

Reference

ultisnips-swift defines the following snippets:

imp            Import
let            Let
var            Variable
ovar        Optional Variable
ivar        Implicitly-Unwrapped Variable
sint        String Interpolation
forin        For-In Loop
while        While Loop
repeat        Repeat-While Loop
if            If
switch        Switch
switch        et "Switch-Let
br            Break
cont        Continue
ret            Return
guard        Guard
guardl        Guard-Let
guarda        Guard-As?
func        Function
func1        1-Argument Function
func2        2-Argument Function
clo            Closure
enum        Enumeration
ienum        Int Enumeration
senum        String Enumeration
class        Class
nsclass        NSObject Subclass
struct        Struct
lazy        Lazy Variable
computed    Computed Variable
mutating    Mutating Function
subs        Subscript Definition
subc        Subclass
over        Override
init        init()
inits        init() with call to super
deinit        deinit()
do            do-try-catch
ext            Extension
proto        Protocol
ibo            @IBOutlet
iba            @IBAction

License

Licensed under The MIT License. Please see LICENSE.md.

添加新评论