vundle/doc/vundle.txt

239 lines
7.3 KiB
Plaintext
Raw Normal View History

*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 ~
2011-02-18 22:35:47 -05:00
*vundle-why-vundle*
Vundle allows to:
2011-02-11 00:21:22 -05:00
- keep track and configure your scripts right in `.vimrc`
- install configured scripts (aka bundle)
2011-02-18 22:35:47 -05:00
- update configured scripts
2011-02-11 00:21:22 -05:00
- search [all available vim scripts] by name
2011-02-18 22:35:47 -05:00
- clean up from unused scripts
2011-02-11 00:21:22 -05:00
Also Vundle:
2011-05-23 16:46:27 -04:00
2011-02-11 00:21:22 -05:00
- manages runtime path of your installed scripts
2011-03-20 00:40:18 -04:00
- regenerates helptags automatically
2011-02-11 00:21:22 -05:00
Vundle takes advantage of [vim-scripts.org](http://vim-scripts.org)
2011-02-11 00:21:22 -05:00
in order to install/search [all available vim scripts]
=============================================================================
2. QUICK START ~
2011-02-18 22:35:47 -05:00
*vundle-quickstart*
1) Setup Vundle: >
2011-02-11 00:21:22 -05:00
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
2011-02-11 00:21:22 -05:00
2011-02-18 22:35:47 -05:00
2) Configure bundles:
2011-04-24 23:31:51 -04:00
Sample `.vimrc`: >
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/vundle.git/
2011-04-24 23:31:51 -04:00
call vundle#rc()
2011-05-16 20:44:47 -04:00
" let Vundle manage Vundle
Bundle 'gmarik/vundle'
2011-04-24 23:31:51 -04:00
" My Bundles here:
"
" original repos on github
Bundle 'tpope/vim-fugitive'
Bundle 'Lokaltog/vim-easymotion'
2011-04-24 23:31:51 -04:00
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'
2011-04-24 23:31:51 -04:00
" ...
filetype plugin indent on " required!
" or
" filetype plugin on " to not use the indentation settings set
" by plugins
2011-02-18 22:35:47 -05:00
3) Install configured bundles:
Launch `vim`, run >
2011-02-11 00:21:22 -05:00
2011-03-20 00:27:03 -04:00
:BundleInstall
2011-02-11 00:21:22 -05:00
Installing requires [Git] and triggers
[Git clone](http://gitref.org/creating/#clone) for each configured repo to
`~/.vim/bundle/`.
2011-02-11 00:21:22 -05:00
=============================================================================
3. SCRIPTS ~
2011-02-18 22:35:47 -05:00
*vundle-scripts*
3.1 CONFIGURE SCRIPTS ~
2011-02-19 12:21:22 -05:00
*vundle-scripts-configure* *Bundle*
2011-02-18 22:35:47 -05:00
Before installing scripts they need to be configured. It's done using `Bundle`
command in `.vimrc`: >
2011-02-11 00:21:22 -05:00
Bundle 'git_repo_uri' " 'git_repo_uri' should be a valid uri to git
" repository
2011-02-18 22:35:47 -05:00
or >
Bundle 'script_name' " 'script-name' should be an official script
" name (see |vundle-scripts-search|)
2011-02-11 00:21:22 -05:00
2011-03-20 02:15:40 -04:00
Vundle loves Github, that's why short uris can be used with commands: >
2011-03-19 20:24:26 -04:00
2011-03-20 00:27:03 -04:00
Bundle 'tpope/vim-fugitive'
2011-03-19 20:24:26 -04:00
equals full uri >
2011-03-20 00:27:03 -04:00
Bundle 'http://github.com/tpope/vim-fugitive.git'
2011-03-19 20:24:26 -04:00
Note that Vundle defaults to http:// protocol for the short URIs.
2011-03-20 02:15:40 -04:00
2011-03-19 20:24:26 -04:00
3.2 INSTALL SCRIPTS ~
2011-02-19 12:21:22 -05:00
*vundle-scripts-install* *BundleInstall*
2011-02-18 22:35:47 -05:00
run >
:BundleInstall
2011-02-11 00:21:22 -05:00
2011-02-18 22:35:47 -05:00
installs configured scripts. Newly installed scripts will be automatically
2011-03-20 00:40:18 -04:00
enabled. Except special cases requiring compilation or pre-configuration.
2011-02-11 00:21:22 -05:00
2011-03-19 20:24:26 -04:00
BundleInstall allows to install scripts by name:>
2011-05-14 03:37:16 -04:00
:BundleInstall unite.vim
2011-03-19 20:24:26 -04:00
installs and activates unite.vim. You can use Tab to auto-complete known
script names. Note that the installation, as just described, doesn't
automatically configure scripts; you have to configure them manually.
2011-03-19 20:24:26 -04:00
3.3 UPDATE SCRIPTS ~
2011-02-19 12:21:22 -05:00
*vundle-scripts-update* *BundleInstall!*
2011-02-18 22:35:47 -05:00
run >
2011-03-20 00:40:18 -04:00
:BundleInstall! " NOTE: bang(!)
2011-02-11 00:21:22 -05:00
2011-02-18 22:35:47 -05:00
installs or updates configured scripts.
press u after updates complete to see the changelog of all updated bundles.
2011-02-18 22:35:47 -05:00
3.4 SEARCHING ~
2011-02-19 12:21:22 -05:00
*vundle-scripts-search* *BundleSearch*
2011-02-18 22:35:47 -05:00
run >
2011-08-25 22:28:30 -04:00
:BundleSearch foo
2011-02-11 00:21:22 -05:00
2011-03-19 21:17:51 -04:00
lists bundles matching 'foo' in new a new split window, ie:
2011-02-18 22:35:47 -05:00
>
2011-02-11 00:21:22 -05:00
Bundle "VimFootnotes"
Bundle "foo.vim"
2011-02-18 22:35:47 -05:00
>
2011-03-19 20:24:26 -04:00
and >
2011-08-25 22:28:30 -04:00
:BundleSearch! foo
2011-02-11 00:21:22 -05:00
refreshes script list before performing actual search.
2011-03-19 21:54:43 -04:00
If command is run without argument: >
2011-08-25 22:28:30 -04:00
:BundleSearch!
2011-03-19 21:54:43 -04:00
it will display all known scripts
2011-03-19 20:24:26 -04:00
2011-02-11 00:21:22 -05:00
Searching requires [`curl`](http://curl.haxx.se/)
3.5 LISTING BUNDLES ~
2011-08-23 17:42:12 -04:00
*vundle-scripts-list* *BundleList*
2011-12-20 03:21:17 -05:00
To quickly pull list of installed bundles use >
2011-08-23 17:42:12 -04:00
:BundleList
3.6 CLEANING UP ~
2011-02-19 12:21:22 -05:00
*vundle-scripts-cleanup* *BundleClean*
2011-02-18 22:35:47 -05:00
run >
2011-03-19 20:24:26 -04:00
2011-02-11 00:21:22 -05:00
:BundleClean
2011-12-20 03:21:17 -05:00
confirms removal of unused script-dirs from `.vim/bundle/`.
2011-03-19 20:24:26 -04:00
2011-03-20 00:27:03 -04:00
*BundleClean!*
>
:BundleClean!
2011-02-11 00:21:22 -05:00
2011-12-20 03:21:17 -05:00
removes unused dirs with no questions.
2011-02-19 12:21:22 -05:00
2011-08-23 17:42:12 -04:00
=============================================================================
4. INTERACTIVE MODE ~
*vundle-interactive*
Vundle provides simple interactive mode to help you explore new scripts
easily. Interactive mode is available as result of any commands that display
list of bundles. For instance, running: >
2011-03-19 20:24:26 -04:00
2011-08-24 17:14:50 -04:00
:BundleSearch! unite
2011-03-19 20:24:26 -04:00
2011-03-20 02:15:40 -04:00
triggers search for scripts matching 'unite' and yields a split window with
2011-03-20 00:27:03 -04:00
content: >
2011-03-19 20:24:26 -04:00
2011-03-20 00:27:03 -04:00
"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'
2011-03-19 20:24:26 -04:00
As the first line(starting with `"Keymap:`) shows, certain actions may be
applied to selected bundles. Move cursor over 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.
2011-08-25 22:23:10 -04:00
Note that the interactive installation doesn't update your .vimrc
configuration.
2011-03-20 00:27:03 -04:00
=============================================================================
5. KEY MAPPINGS ~
*vundle-keymappings*
2011-03-20 00:27:03 -04:00
KEY | DESCRIPTION
----|-------------------------- >
i | run :BundleInstall with name taken from line cursor is positioned on
2011-08-23 17:51:08 -04:00
I | same as i, but runs :BundleInstall! to update bundle
D | delete selected bundle( be careful not to remove local modifications)
2011-08-25 21:13:03 -04:00
c | run :BundleClean
s | run :BundleSearch
2011-03-20 00:27:03 -04:00
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
2011-03-20 00:27:03 -04:00
2011-02-19 12:21:22 -05:00
vim:tw=78:ts=8:ft=help:norl: