Ⅰ. 插件描述
Build Cocoa projects with xctool in VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'brow/vim-xctool'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'brow/vim-xctool'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'brow/vim-xctool'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/brow/vim-xctool
Ⅳ. 文档说明
vim-xctool
[xctool] is the best way to build and test Cocoa projects outside of Xcode. vim-xctool makes xctool the default compiler for Objective-C files in Vim.
Installation
Install [xctool] into your path.
brew install xctool
Install vim-xctool as a Vim plugin. Assuming you're using [pathogen.vim]:
cd ~/.vim/bundle
git clone https://github.com/brow/vim-xctool.git- Optional: Add the following to your
.vimrcto ensure all Objective-C sources are treated as such.au BufNewFile,BufRead .h,.m,*.pch set filetype=objc
Project setup
Perform the following steps for each project you wish to build with xctool.
Navigate to the project root and check that you can run xctool successfully.
xctool \
-project MyProject.xcodeproj \
-scheme MyProjectIf this is an iOS project, don't forget `-sdk iphonesimulator`.- Once you have arguments that work, put them into a file called
.xctool-argswith this format:[
"-project", "MyProject.xcodeproj",
"-scheme", "MyProject",
]
Usage
:make
:make test
:make clean
:make archive
" etc.
See xctool -help for the full list of commands that can be appended to :make.