Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'kspi/cargo-relative'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'kspi/cargo-relative'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'kspi/cargo-relative'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/kspi/cargo-relative
Ⅳ. 文档说明
# cargo-relative
A wrapper around Cargo to use it as makeprg in Vim withautochdir set. Only outputs Cargo's stderr and converts paths relative to the
project directory to be relative to the current directory.
To use it as makeprg put the following in ~/.vim/after/ftplugin/rust.vim:
compiler rustc
setlocal makeprg=path/to/repository/cargo-relative\ buildThen calling :make in Rust buffers should execute Cargo and properly populate
the quickfix buffer.