Ⅰ. 插件描述
A ruby script to create, install, and list the contents of vimballsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tomtom/vimball-rb'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tomtom/vimball-rb'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tomtom/vimball-rb'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tomtom/vimball.rb
Ⅳ. 文档说明
vimball.rb
The vimball.rb ruby script that allows user to create, install, and list
the contents of
vimballs.
Configuration
Configuration is done via yaml files:
VIMFILES/vimballs/config_${hostname}.yml- or
VIMFILES/vimballs/config.yml
Example configuration file:
---
vimfiles: /home/foo/.vim/
installdir: /home/foo/.vim/
compress: false
helptags: gvim --cmd "helptags %s|quit"
username: foo
password: bar
history_fmt: Please see http://github.com/foo/%s_vim/commits/master/
ignore_git_messages_rx: ^- (readme|docs|misc|meta|etc|minor)$
roots:
- /home/foo/.vim/bundle
Examples
Create a vimball:
vimball.rb vba myplugin.recipe
Create vimballs if a file has changed:
vimball.rb -u vba myplugin.recipe
Create a vimball and upload it to vim.org with
vimscriptuploader.rb:
rm myplugin.yml || echo ignore error
if vimball.rb -u --save-yaml -- vba myplugin.recipe | grep "vimball: Save as"; then
vimscriptdef.rb --recipe myplugin.recipe
vimscriptuploader.rb --user foo --password bar myplugin.yml
fi
Install a vimball:
vimball.rb install myplugin.vba
Install a vimball as a "bundle" (i.e. in its own directory under ~/.vim/bundle):
vimball.rb --repo install myplugin.vba
Dependencies
- ruby 1.8
<!-- 2010-11-01; @Last Change: 2010-11-01. -->
<!--
vi: ft=markdown:tw=72:ts=4
-->