Ⅰ. 插件描述
Autocomplete Swift in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'keith/sourcekittendaemon-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'keith/sourcekittendaemon-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'keith/sourcekittendaemon-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/keith/sourcekittendaemon.vim
Ⅳ. 文档说明
# SourceKittenDaemon.vim
This plugin provides vim integration with SourceKittenDaemon.
This means you can have autocomplete for Swift projects in vim.
This plugin uses the normal 'omnifunc' infrastructure. By default
completion is mapped to <C-x><C-o>. See :help 'omnifunc' for more
information.
Limitations
- SourceKittenDaemon doesn't yet provide support for
xcworkspaces - This plugin doesn't do anything about completion tokens (meaning you
can't do<TAB>to jump between args as you do in Xcode) - Currently completion only seems to work after dots
- Currently you cannot configure the port used with SourceKittenDaemon,
use the default 8081.
Installation
Install and setup SourceKittenDaemon.
If you don't have a preferred plugin installation method, check out
vim-plug.
NOTE: This plugin doesn't provide Swift runtime files. If you'd like
those checkout swift.vim