vim-xctool


Ⅰ. 插件描述

Build Cocoa projects with xctool in Vim

Ⅱ. 基本信息

创建日期:  2013-08-27
使用用户:  2
Github星:  14
插件作者:  Tom Brow

Ⅲ. 安装方法

使用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

  1. Install [xctool] into your path.

    brew install xctool

  2. 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

  3. Optional: Add the following to your .vimrc to 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.

  1. Navigate to the project root and check that you can run xctool successfully.

    xctool \
    -project MyProject.xcodeproj \
    -scheme MyProject

    If this is an iOS project, don't forget `-sdk iphonesimulator`.
       
  2. Once you have arguments that work, put them into a file called .xctool-args with 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.

添加新评论