Sauce


Ⅰ. 插件描述

Multiple source file management for Vim

Ⅱ. 基本信息

创建日期:  2012-03-28
使用用户:  39
Github星:  54
插件作者:  Jon Cairns

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'joonty/sauce'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'joonty/sauce'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'joonty/sauce'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/joonty/vim-sauce

Ⅳ. 文档说明

# Sauce for Vim

Sauce is a manager for multiple vimrc files, which can be used to load different settings for different environments. In short, you can maintain lots of different vim settings files and only load the one(s) you need when you need them.

This can be used as a simple project organiser tool. For instance:

" Load the MyProject sauce
:Sauce MyProject

This "sauce" (read: source) can contain anything that you would put in your vimrc, and can be used to override those settings. In this case, it could be used to CD into the project directory, set spaces instead of tabs, open NERDTree, set configuration options for PHPQA tools, etc.

There's even autocomplete on the sauce names, so you don't need to remember them :)

Quick Guide

Actually, a quick guide is all that's needed. There are just a few handy functions to manage your sauces:

" Load a sauce
:Sauce <name>
" Create a new sauce
:SauceNew <name>
" Edit an existing sauce
:SauceEdit <name>
" Copy an existing sauce as a new sauce
:SauceCopy <name> (will ask for another name)
" Delete an existing sauce (will prompt you to confirm)
:SauceDelete <name>
" Rename an existing sauce (will ask for the new name)
:SauceRename <name>

Installation

Vundle

Installation is easy-peasy if you're using Vundle. Just add this to your .vimrc file:

Bundle 'joonty/vim-sauce.git'

and run vim +BundleInstall +qall from a terminal.

Pathogen

cd ~/.vim/bundle
git clone git://github.com/joonty/vim-sauce.git

If you aren't using vundle, you will have to extract the files in each folder to the correct folder in .vim/.

Configuration

No configuration is necessary, although it's possible to change the default directory where sauces are stored (~/.vimsauce). To do this, add this to your vimrc file:

let g:sauce_path = "/path/to/sauces"

Known Issues

The autocomplete currently won't work with Windows. However, plans are in place to change that.

License

Sauce for Vim is released under the MIT license. See the LICENSE file for more information.

添加新评论