vundle/doc/vundle.txt
Lucas Hoffmann f77d85cc28 docs: explain directory argument to :Bundle
Add some documentation to explain the directory argument (optional second
argument) to the Bundle command.  Maybe fixes #295
2014-02-23 03:12:14 +01:00

249 lines
7.8 KiB
Plaintext

*vundle.txt* Vundle, a plug-in manager for Vim. *vundle*
VUNDLE MANUAL
Vundle is short for Vim bundle and is a Vim plug-in manager.
1. Why Vundle |vundle-why-vundle|
2. Quick start |vundle-quickstart|
3. Scripts |vundle-scripts|
3.1. Configure scripts |vundle-scripts-configure|
3.2. Installing scripts |vundle-scripts-install|
3.3. Updating scripts |vundle-scripts-update|
3.4. Searching scripts |vundle-scripts-search|
3.5. Listing scripts |vundle-scripts-list|
3.6. Cleanup |vundle-scripts-cleanup|
4. Interactive mode |vundle-interactive|
5. Key mappings |vundle-keymappings|
6. Options |vundle-options|
=============================================================================
1. WHY VUNDLE ~
*vundle-why-vundle*
Vundle allows you to:
- keep track and configure your scripts right in `.vimrc`
- install configured scripts (aka bundle)
- update configured scripts
- search [all available vim scripts] by name
- clean up from unused scripts
Also Vundle:
- manages runtime path of your installed scripts
- regenerates helptags automatically
Vundle takes advantage of [vim-scripts.org](http://vim-scripts.org)
in order to install/search [all available vim scripts]
=============================================================================
2. QUICK START ~
*vundle-quickstart*
1) Setup Vundle: >
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
2) Configure bundles:
Sample `.vimrc`: >
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'}
" vim-scripts repos
Bundle 'L9'
Bundle 'FuzzyFinder'
Bundle 'rails.vim'
" non github repos
Bundle 'git://git.wincent.com/command-t.git'
" git repos on your local machine (ie. when working on your own plugin)
Bundle 'file:///Users/gmarik/path/to/plugin'
" ...
filetype plugin indent on " required!
" or
" filetype plugin on " to not use the indentation settings set
" by plugins
3) Install configured bundles:
Launch `vim`, run >
:BundleInstall
Installing requires [Git] and triggers
[Git clone](http://gitref.org/creating/#clone) for each configured repo to
`~/.vim/bundle/`.
=============================================================================
3. SCRIPTS ~
*vundle-scripts*
3.1 CONFIGURE SCRIPTS ~
*vundle-scripts-configure* *Bundle*
Before installing scripts they need to be configured. It's done using `Bundle`
command in `.vimrc`: >
Bundle 'git_repo_uri' " 'git_repo_uri' should be a valid uri to git
" repository
or >
Bundle 'script_name' " 'script-name' should be an official script
" name (see |vundle-scripts-search|)
Vundle loves Github, that's why short URIs can be used with commands: >
Bundle 'tpope/vim-fugitive'
equals full uri >
Bundle 'http://github.com/tpope/vim-fugitive.git'
Note that Vundle defaults to http:// protocol for the short URIs.
There can also be a second argument after URI. It has to be a dictionary with
a key called 'rtp'. The value for that key is a directory inside the
repository (relative path from the root of the repository) where the vim
plugin resides. For example: >
Bundle 'any_valid_uri', {'rtp': 'some/subdir/'}
This can be used with git repositories that put the vim plugin inside a
subdirectory.
3.2 INSTALL SCRIPTS ~
*vundle-scripts-install* *BundleInstall*
run >
:BundleInstall
installs configured scripts. Newly installed scripts will be automatically
enabled. Except special cases requiring compilation or pre-configuration.
BundleInstall allows to install scripts by name:>
:BundleInstall unite.vim
installs and activates unite.vim. You can use Tab to auto-complete known
script names. Note that the installation just described isn't permanent. To
finish, you must put `Bundle 'unite.vim` at the appropriate line in your
`.vimrc` to tell Vundle to load the plugin at startup.
3.3 UPDATE SCRIPTS ~
*vundle-scripts-update* *BundleInstall!*
run >
:BundleInstall! " NOTE: bang(!)
installs or updates configured scripts.
press u after updates complete to see the changelog of all updated bundles.
3.4 SEARCHING ~
*vundle-scripts-search* *BundleSearch*
run >
:BundleSearch foo
lists bundles matching 'foo' in new a new split window, ie:
>
Bundle 'VimFootnotes'
Bundle 'foo.vim'
>
and >
:BundleSearch! foo
refreshes script list before performing actual search.
If command is run without argument: >
:BundleSearch!
it will display all known scripts
Searching requires [`curl`](http://curl.haxx.se/)
3.5 LISTING BUNDLES ~
*vundle-scripts-list* *BundleList*
To quickly pull list of installed bundles use >
:BundleList
3.6 CLEANING UP ~
*vundle-scripts-cleanup* *BundleClean*
run >
:BundleClean
confirms removal of unused script-dirs from `.vim/bundle/`.
*BundleClean!*
>
:BundleClean!
removes unused dirs with no questions.
=============================================================================
4. INTERACTIVE MODE ~
*vundle-interactive*
Vundle provides a simple interactive mode to help you explore new scripts
easily. Interactive mode is available as result of any commands that displays
a list of bundles. For instance, running: >
:BundleSearch! unite
triggers search for scripts matching 'unite' and yields a split window with
content: >
"Keymap: i - Install bundle; c - Cleanup; r - Refine list; R - Reload list
"Search results for: unite
Bundle 'unite.vim'
Bundle 'unite-yarm'
Bundle 'unite-gem'
Bundle 'unite-locate'
Bundle 'unite-font'
Bundle 'unite-colorscheme'
As the first line (starting with `"Keymap:`) shows, certain actions may be
applied to selected bundles. Move the cursor over the line `Bundle
'unite.vim'` and press i key (install, see |vundle-keymappings| for more
details). After unite.vim is installed - `:Unite file` command should be
available to prove 'unite.vim' availability.
Note that the interactive installation doesn't update your .vimrc
configuration.
=============================================================================
5. KEY MAPPINGS ~
*vundle-keymappings*
KEY | DESCRIPTION
----|-------------------------- >
i | run :BundleInstall with name taken from line cursor is positioned on
I | same as i, but runs :BundleInstall! to update bundle
D | delete selected bundle( be careful not to remove local modifications)
c | run :BundleClean
s | run :BundleSearch
R | fetch fresh script list from server
.
=============================================================================
6. OPTIONS ~
*vundle-options*
let g:vundle_default_git_proto = 'git'
makes Vundle use `git` instead default `https` when building absolute repo URIs
vim:tw=78:ts=8:ft=help:norl: