From 1382847bc7153fb174f78942672ecf7a0d4f569c Mon Sep 17 00:00:00 2001 From: Simon Podhajsky Date: Wed, 12 Apr 2017 19:37:15 -0400 Subject: [PATCH 01/36] Unset GIT_DIR to unmess git calls. Fix #807. Vundle manipulates plugin folders by `cd`-ing into them and calling git via `call system(cmd)`. This doesn't work if GIT_DIR is set as a global environmental variable (most commonly by a git hook). Since there is no use case in which Vundle should respect GIT_DIR, this PR preemptively precedes all git calls with `unset GIT_DIR; `. This makes the git calls behave as expected without unsetting GIT_DIR in the environment beyond vim. --- autoload/vundle/installer.vim | 10 +++++----- autoload/vundle/scripts.vim | 2 +- test/vimrc | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 614b64bd..3029c927 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -330,7 +330,7 @@ endf " return -- the URL for the origin remote (string) " --------------------------------------------------------------------------- func! s:get_current_origin_url(bundle) abort - let cmd = 'cd '.vundle#installer#shellesc(a:bundle.path()).' && git config --get remote.origin.url' + let cmd = 'unset GIT_DIR; cd '.vundle#installer#shellesc(a:bundle.path()).' && git config --get remote.origin.url' let cmd = vundle#installer#shellesc_cd(cmd) let out = s:strip(s:system(cmd)) return out @@ -344,7 +344,7 @@ endf " return -- A 15 character log sha for the current HEAD " --------------------------------------------------------------------------- func! s:get_current_sha(bundle) - let cmd = 'cd '.vundle#installer#shellesc(a:bundle.path()).' && git rev-parse HEAD' + let cmd = 'unset GIT_DIR; cd '.vundle#installer#shellesc(a:bundle.path()).' && git rev-parse HEAD' let cmd = vundle#installer#shellesc_cd(cmd) let out = s:system(cmd)[0:15] return out @@ -375,7 +375,7 @@ func! s:make_sync_command(bang, bundle) abort call s:log('> Plugin ' . a:bundle.name . ' new URI: ' . a:bundle.uri) " Directory names match but the origin remotes are not the same let cmd_parts = [ - \ 'cd '.vundle#installer#shellesc(a:bundle.path()) , + \ 'unset GIT_DIR; cd '.vundle#installer#shellesc(a:bundle.path()) , \ 'git remote set-url origin ' . vundle#installer#shellesc(a:bundle.uri), \ 'git fetch', \ 'git reset --hard origin/HEAD', @@ -393,7 +393,7 @@ func! s:make_sync_command(bang, bundle) abort endif let cmd_parts = [ - \ 'cd '.vundle#installer#shellesc(a:bundle.path()), + \ 'unset GIT_DIR; cd '.vundle#installer#shellesc(a:bundle.path()), \ 'git pull', \ 'git submodule update --init --recursive', \ ] @@ -402,7 +402,7 @@ func! s:make_sync_command(bang, bundle) abort let initial_sha = s:get_current_sha(a:bundle) else - let cmd = 'git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) + let cmd = 'unset GIT_DIR; git clone --recursive '.vundle#installer#shellesc(a:bundle.uri).' '.vundle#installer#shellesc(a:bundle.path()) let initial_sha = '' endif return [cmd, initial_sha] diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index d7409a10..dc97731b 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -68,7 +68,7 @@ func! s:create_changelog() abort let updated_sha = bundle_data[1] let bundle = bundle_data[2] - let cmd = 'cd '.vundle#installer#shellesc(bundle.path()). + let cmd = 'unset GIT_DIR; cd '.vundle#installer#shellesc(bundle.path()). \ ' && git log --pretty=format:"%s %an, %ar" --graph '. \ initial_sha.'..'.updated_sha diff --git a/test/vimrc b/test/vimrc index d8455a7e..eb09eb92 100644 --- a/test/vimrc +++ b/test/vimrc @@ -75,6 +75,8 @@ set wildignore+=*/.git/* " set wildignore+=doc/* " should not break clone " set wildignore+=*/doc/* +let $GIT_DIR='/tmp' " should not break any git commands + au VimEnter * BundleInstall " e test/files/erlang.erl From 3b55a8584a6f6dcd87bf69f9fe6bcedea847b7f8 Mon Sep 17 00:00:00 2001 From: gmarik Date: Wed, 16 Jul 2014 21:46:17 -0400 Subject: [PATCH 02/36] Clarify Readme. - closes #281 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b8a7fdbc..13d4eb67 100644 --- a/README.md +++ b/README.md @@ -78,10 +78,10 @@ "filetype plugin on " " Brief help - " :PluginList - list configured plugins - " :PluginInstall(!) - install (update) plugins - " :PluginSearch(!) foo - search (or refresh cache first) for foo - " :PluginClean(!) - confirm (or auto-approve) removal of unused plugins + " :PluginList - lists configured plugins + " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate + " :PluginSearch foo - searches for foo; append `!` to refresh local cache + " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal " " see :h vundle for more details or wiki for FAQ " Put your non-Plugin stuff after this line From 6cb5fb75b8a9284a2d05a077ebf8975c75b2acbd Mon Sep 17 00:00:00 2001 From: Devin Weaver Date: Tue, 26 Aug 2014 11:00:55 -0400 Subject: [PATCH 03/36] Update minirc to Plugin namespace --- test/minirc.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/minirc.vim b/test/minirc.vim index 3c24395b..7b48d132 100644 --- a/test/minirc.vim +++ b/test/minirc.vim @@ -2,7 +2,8 @@ set nocompatible syntax on filetype off set rtp+=~/.vim/bundle/Vundle.vim/ -call vundle#rc() -Bundle 'gmarik/Vundle.vim' +call vundle#begin() +Plugin 'gmarik/Vundle.vim' +call vundle#end() filetype plugin indent on From fdc63afba77f4e55108c3a803deebe4d334be995 Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Mon, 8 Sep 2014 15:45:39 +0800 Subject: [PATCH 04/36] Use svg instead of png to get better image quality --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13d4eb67..fcd5f681 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ [Vundle] is undergoing an [interface change], please stay up to date to get latest changes. -[![Gitter-chat](https://badges.gitter.im/gmarik/Vundle.vim.png)](https://gitter.im/gmarik/Vundle.vim) for discussion and support. +[![Gitter-chat](https://badges.gitter.im/gmarik/Vundle.vim.svg)](https://gitter.im/gmarik/Vundle.vim) for discussion and support. ![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) From d822e7b5accd9c2e95fd5513e6d6b74520c70922 Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Fri, 20 Feb 2015 07:01:53 +0100 Subject: [PATCH 05/36] Add explicit note for Fish users to check the FAQ --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fcd5f681..337e0b5e 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ If you are using Windows, go directly to [Windows setup]. If you run into any issues, please consult the [FAQ]. See [Tips] for some advanced configurations. + Using non-POSIX shells, such as the popular Fish shell, requires additional setup. Please check the [FAQ]. + 2. Set up [Vundle]: `$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim` From ec679e491dd641f6e5edb8d8dce775643a2986a1 Mon Sep 17 00:00:00 2001 From: Shahaf Arad Date: Mon, 16 Feb 2015 20:03:37 +0200 Subject: [PATCH 06/36] Allow updating specific plugins. --- autoload/vundle.vim | 6 +++--- autoload/vundle/installer.vim | 18 +++++++++++++++--- autoload/vundle/scripts.vim | 7 ++++++- doc/vundle.txt | 18 ++++++++++++++++-- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 29390483..887ecddf 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -8,8 +8,8 @@ com! -nargs=+ -bar Plugin \ call vundle#config#bundle() -com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginInstall -\ call vundle#installer#new('!' == '', ) +com! -nargs=* -bang -complete=custom,vundle#scripts#complete PluginInstall +\ call vundle#installer#new('!' == '', ) com! -nargs=? -bang -complete=custom,vundle#scripts#complete PluginSearch \ call vundle#scripts#all('!' == '', ) @@ -24,7 +24,7 @@ com! -nargs=0 PluginDocs \ call vundle#installer#helptags(g:bundles) " Aliases -com! PluginUpdate PluginInstall! +com! -nargs=* -complete=custom,vundle#scripts#complete PluginUpdate PluginInstall! " Vundle Aliases com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleInstall PluginInstall diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 3029c927..05f3a168 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -6,9 +6,21 @@ " ... -- any number of bundle specifications (separate arguments) " --------------------------------------------------------------------------- func! vundle#installer#new(bang, ...) abort - let bundles = (a:1 == '') ? - \ g:bundles : - \ map(copy(a:000), 'vundle#config#bundle(v:val, {})') + " No specific plugins are specified. Operate on all plugins. + if a:0 == 0 + let bundles = g:bundles + " Specific plugins are specified for update. Update them. + elseif (a:bang) + let bundles = filter(copy(g:bundles), 'index(a:000, v:val.name) > -1') + " Specific plugins are specified for installation. Install them. + else + let bundles = map(copy(a:000), 'vundle#config#bundle(v:val, {})') + endif + + if empty(bundles) + echoerr 'No bundles were selected for operation' + return + endif let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec')) call vundle#scripts#view('Installer',['" Installing plugins to '.expand(g:bundle_dir, 1)], names + ['Helptags']) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index dc97731b..0ebe3999 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -39,7 +39,12 @@ endf " candidates, see also :h command-completion-custom " --------------------------------------------------------------------------- func! vundle#scripts#complete(a,c,d) - return join(s:load_scripts(0),"\n") + " Return only installed plugins if updating + if match(a:c, '\v^Plugin%(Install!|Update)') == 0 + return join(map(copy(g:bundles), 'v:val.name'), "\n") + else + return join(s:load_scripts(0),"\n") + endif endf diff --git a/doc/vundle.txt b/doc/vundle.txt index 198584bc..9a2670a4 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -244,8 +244,16 @@ PluginInstall allows installation of plugins by name: > :PluginInstall 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 +Installs and activates unite.vim. + +PluginInstall also allows installation of several plugins separated by space. +> + :PluginInstall tpope/vim-surround tpope/vim-fugitive + +Installs both tpope/vim-surround and tpope/vim-fugitive from GitHub. + +You can use Tab to auto-complete known script names. +Note that the installation just described isn't permanent. To finish, you must put `Plugin 'unite.vim'` at the appropriate place in your `.vimrc` to tell Vundle to load the plugin at startup. @@ -263,6 +271,12 @@ Installs or updates the configured plugins. Press 'u' after updates complete to see the change log of all updated bundles. Press 'l' (lowercase 'L') to see the log of commands if any errors occurred. +To update specific plugins, write their names separated by space: +> + :PluginInstall! vim-surround vim-fugitive +or > + :PluginUpdate vim-surround vim-fugitive + 3.5 SEARCHING PLUGINS ~ *vundle-plugins-search* *:PluginSearch* > From 3cf90c528d43ee14b80d8c96b3ac8ba16596bbee Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Mon, 2 Mar 2015 22:02:44 +0100 Subject: [PATCH 07/36] Complete installed plugins also for VundleUpdate --- autoload/vundle.vim | 1 + autoload/vundle/scripts.vim | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 887ecddf..dded571d 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -32,6 +32,7 @@ com! -nargs=? -bang -complete=custom,vundle#scripts#complete VundleSearch Plugi com! -nargs=? -bang VundleClean PluginClean com! -nargs=0 VundleDocs PluginDocs com! VundleUpdate PluginInstall! +com! -nargs=* -complete=custom,vundle#scripts#complete VundleUpdate PluginInstall! " Deprecated Commands com! -nargs=+ Bundle call vundle#config#bundle() diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 0ebe3999..205e44f5 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -36,13 +36,15 @@ endf " " a, c, d -- see :h command-completion-custom " return -- all valid plugin names from vim-scripts.org as completion -" candidates, see also :h command-completion-custom +" candidates, or all installed plugin names when running an 'Update +" variant'. see also :h command-completion-custom " --------------------------------------------------------------------------- func! vundle#scripts#complete(a,c,d) - " Return only installed plugins if updating - if match(a:c, '\v^Plugin%(Install!|Update)') == 0 + if match(a:c, '\v^%(Plugin|Vundle)%(Install!|Update)') == 0 + " Only installed plugins if updating return join(map(copy(g:bundles), 'v:val.name'), "\n") else + " Or all known plugins otherwise return join(s:load_scripts(0),"\n") endif endf From 04828fa64e026dcb2496931414a55875b837da88 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Mon, 28 Apr 2014 12:14:18 +0200 Subject: [PATCH 08/36] Allow multiple calls to VundleChangelog. The command `silent pedit ...` was causing trouble if the user had `set hidden`. Now we `bdelete` the changelog buffer before editing it anew. --- autoload/vundle/scripts.vim | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 205e44f5..a08f6dcd 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -70,6 +70,7 @@ endf " user. " --------------------------------------------------------------------------- func! s:create_changelog() abort + let changelog = ['Updated Plugins:'] for bundle_data in g:updated_bundles let initial_sha = bundle_data[0] let updated_sha = bundle_data[1] @@ -83,18 +84,19 @@ func! s:create_changelog() abort let updates = system(cmd) - call add(g:vundle_changelog, '') - call add(g:vundle_changelog, 'Updated Plugin: '.bundle.name) + call add(changelog, '') + call add(changelog, 'Updated Plugin: '.bundle.name) if bundle.uri =~ "https://github.com" - call add(g:vundle_changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.initial_sha.'...'.updated_sha) + call add(changelog, 'Compare at: '.bundle.uri[0:-5].'/compare/'.initial_sha.'...'.updated_sha) endif for update in split(updates, '\n') let update = substitute(update, '\s\+$', '', '') - call add(g:vundle_changelog, ' '.update) + call add(changelog, ' '.update) endfor endfor + return changelog endf @@ -102,14 +104,15 @@ endf " View the change log after an update or installation. " --------------------------------------------------------------------------- func! s:view_changelog() - call s:create_changelog() - - if !exists('g:vundle_changelog_file') - let g:vundle_changelog_file = tempname() + if !exists('s:changelog_file') + let s:changelog_file = tempname() endif - call writefile(g:vundle_changelog, g:vundle_changelog_file) - execute 'silent pedit ' . g:vundle_changelog_file + if bufloaded(s:changelog_file) + execute 'silent bdelete' s:changelog_file + endif + call writefile(s:create_changelog(), s:changelog_file) + execute 'silent pedit' s:changelog_file wincmd P | wincmd H endf From 41ae35bf5586488339bd1a35388f0a7bfe405e92 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 10:40:30 +0100 Subject: [PATCH 09/36] Remove unneeded variable setting. The variable is script local to autoload/vundle/scripts.vim since #468. --- autoload/vundle.vim | 1 - 1 file changed, 1 deletion(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index dded571d..6a3df331 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -64,7 +64,6 @@ func! vundle#rc(...) abort let g:bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) let g:updated_bundles = [] let g:vundle_log = [] - let g:vundle_changelog = ['Updated Plugins:'] call vundle#config#init() endf From 9543d6387e644ff393664939e997f6cfd694d98b Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 10:50:28 +0100 Subject: [PATCH 10/36] Refactor global variables into script local variables. These variables only occur in one file each. By making them script local variables this is "documented" in the code. At the same time the global namespace is polluted less. Changed: g:bundle_names -> s:bundle_names g:vundle_last_status -> s:last_status g:vundle_log_file -> s:log_file g:vundle_view -> s:view --- autoload/vundle/config.vim | 8 ++++---- autoload/vundle/installer.vim | 6 +++--- autoload/vundle/scripts.vim | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 5ecb30ba..a17eeb12 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -43,7 +43,7 @@ func! vundle#config#init() if !exists('g:bundles') | let g:bundles = [] | endif call s:rtp_rm_a() let g:bundles = [] - let g:bundle_names = {} + let s:bundle_names = {} endf @@ -91,14 +91,14 @@ endf " return -- 0 if the bundle's name has been seen before, 1 otherwise " --------------------------------------------------------------------------- funct! s:check_bundle_name(bundle) - if has_key(g:bundle_names, a:bundle.name) + if has_key(s:bundle_names, a:bundle.name) echoerr 'Vundle error: Name collision for Plugin ' . a:bundle.name_spec . - \ '. Plugin ' . g:bundle_names[a:bundle.name] . + \ '. Plugin ' . s:bundle_names[a:bundle.name] . \ ' previously used the name "' . a:bundle.name . '"' . \ '. Skipping Plugin ' . a:bundle.name_spec . '.' return 0 endif - let g:bundle_names[a:bundle.name] = a:bundle.name_spec + let s:bundle_names[a:bundle.name] = a:bundle.name_spec return 1 endf diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 05f3a168..ee635c9a 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -55,11 +55,11 @@ func! s:process(bang, cmd) exec ':norm '.a:cmd - if 'error' == g:vundle_last_status + if 'error' == s:last_status let msg = 'With errors; press l to view log' endif - if 'updated' == g:vundle_last_status && empty(msg) + if 'updated' == s:last_status && empty(msg) let msg = 'Plugins updated; press u to view changelog' endif @@ -118,7 +118,7 @@ func! vundle#installer#run(func_name, name, ...) abort throw 'whoops, unknown status:'.status endif - let g:vundle_last_status = status + let s:last_status = status return status endf diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index a08f6dcd..b5635bb3 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -54,12 +54,12 @@ endf " View the logfile after an update or installation. " --------------------------------------------------------------------------- func! s:view_log() - if !exists('g:vundle_log_file') - let g:vundle_log_file = tempname() + if !exists('s:log_file') + let s:log_file = tempname() endif - call writefile(g:vundle_log, g:vundle_log_file) - execute 'silent pedit ' . g:vundle_log_file + call writefile(g:vundle_log, s:log_file) + execute 'silent pedit ' . s:log_file wincmd P | wincmd H endf @@ -139,15 +139,15 @@ endf " strings) " --------------------------------------------------------------------------- func! vundle#scripts#view(title, headers, results) - if exists('g:vundle_view') && bufloaded(g:vundle_view) - exec g:vundle_view.'bd!' + if exists('s:view') && bufloaded(s:view) + exec s:view.'bd!' endif exec 'silent pedit [Vundle] '.a:title wincmd P | wincmd H - let g:vundle_view = bufnr('%') + let s:view = bufnr('%') " " make buffer modifiable " to append without errors From c56827d584b28d5990bbe7c03462efb1d424c582 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 10:56:24 +0100 Subject: [PATCH 11/36] Allow multiple calls to VundleLog. If it was loaded, unload the log buffer before editing it. Otherwise the editing command can "hang" if the user has `set hidden`. This problem was originally discovered with the VundleChangelog command and the analogous fix was applied in 7d9b10. See github issue #468 for more. --- autoload/vundle/scripts.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index b5635bb3..69bf34a7 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -58,6 +58,9 @@ func! s:view_log() let s:log_file = tempname() endif + if bufloaded(s:log_file) + execute 'silent bdelete' s:log_file + endif call writefile(g:vundle_log, s:log_file) execute 'silent pedit ' . s:log_file From ed96672ce47bec6b7056ccf1cbfd7b23d6428a86 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 11:10:16 +0100 Subject: [PATCH 12/36] Refactor global variables into autoload variables. All global variables that are not part of the public API (mentioned in the documentation) are turned into autoload variables. This is intended to give all global variables defined by Vundle.vim a common prefix. The variable g:default_git_proto is part of the public API and is therefor not changed. This is the only exception. Changed: g:bundle_dir -> vundle#bundle_dir g:bundles -> vundle#bundles g:updated_bundles -> vundle#updated_bundles g:vundle_lazy_load -> vundle#lazy_load g:vundle_log -> vundle#log Unchanged: g:default_git_proto --- autoload/vundle.vim | 12 ++++++------ autoload/vundle/config.vim | 20 ++++++++++---------- autoload/vundle/installer.vim | 33 +++++++++++++++++---------------- autoload/vundle/scripts.vim | 8 ++++---- 4 files changed, 37 insertions(+), 36 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index 6a3df331..f186236d 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -21,7 +21,7 @@ com! -nargs=? -bang PluginClean \ call vundle#installer#clean('!' == '') com! -nargs=0 PluginDocs -\ call vundle#installer#helptags(g:bundles) +\ call vundle#installer#helptags(g:vundle#bundles) " Aliases com! -nargs=* -complete=custom,vundle#scripts#complete PluginUpdate PluginInstall! @@ -61,22 +61,22 @@ endif " :Plugin command in the vimrc. It is not possible to do this automatically " because when loading the vimrc file no plugins where loaded yet. func! vundle#rc(...) abort - let g:bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) - let g:updated_bundles = [] - let g:vundle_log = [] + let g:vundle#bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) + let g:vundle#updated_bundles = [] + let g:vundle#log = [] call vundle#config#init() endf " Alternative to vundle#rc, offers speed up by modifying rtp only when end() " called later. func! vundle#begin(...) abort - let g:vundle_lazy_load = 1 + let g:vundle#lazy_load = 1 call call('vundle#rc', a:000) endf " Finishes putting plugins on the rtp. func! vundle#end(...) abort - unlet g:vundle_lazy_load + unlet g:vundle#lazy_load call vundle#config#activate_bundles() endf diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index a17eeb12..8467b9f7 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -10,11 +10,11 @@ func! vundle#config#bundle(arg, ...) if !s:check_bundle_name(bundle) return endif - if exists('g:vundle_lazy_load') && g:vundle_lazy_load - call add(g:bundles, bundle) + if exists('g:vundle#lazy_load') && g:vundle#lazy_load + call add(g:vundle#bundles, bundle) else call s:rtp_rm_a() - call add(g:bundles, bundle) + call add(g:vundle#bundles, bundle) call s:rtp_add_a() call s:rtp_add_defaults() endif @@ -40,9 +40,9 @@ endf " once. " --------------------------------------------------------------------------- func! vundle#config#init() - if !exists('g:bundles') | let g:bundles = [] | endif + if !exists('g:vundle#bundles') | let g:vundle#bundles = [] | endif call s:rtp_rm_a() - let g:bundles = [] + let g:vundle#bundles = [] let s:bundle_names = {} endf @@ -55,11 +55,11 @@ endf func! vundle#config#require(bundles) abort for b in a:bundles call s:rtp_add(b.rtpath) - call s:rtp_add(g:bundle_dir) + call s:rtp_add(g:vundle#bundle_dir) " TODO: it has to be relative rtpath, not bundle.name exec 'runtime! '.b.name.'/plugin/*.vim' exec 'runtime! '.b.name.'/after/*.vim' - call s:rtp_rm(g:bundle_dir) + call s:rtp_rm(g:vundle#bundle_dir) endfor call s:rtp_add_defaults() endf @@ -180,7 +180,7 @@ endf " runtimepath. " --------------------------------------------------------------------------- func! s:rtp_rm_a() - let paths = map(copy(g:bundles), 'v:val.rtpath') + let paths = map(copy(g:vundle#bundles), 'v:val.rtpath') let prepends = join(paths, ',') let appends = join(paths, '/after,').'/after' exec 'set rtp-='.fnameescape(prepends) @@ -193,7 +193,7 @@ endf " runtimepath. " --------------------------------------------------------------------------- func! s:rtp_add_a() - let paths = map(copy(g:bundles), 'v:val.rtpath') + let paths = map(copy(g:vundle#bundles), 'v:val.rtpath') let prepends = join(paths, ',') let appends = join(paths, '/after,').'/after' exec 'set rtp^='.fnameescape(prepends) @@ -262,7 +262,7 @@ let s:bundle = {} " return -- the target location to clone this bundle to " --------------------------------------------------------------------------- func! s:bundle.path() - return s:expand_path(g:bundle_dir.'/'.self.name) + return s:expand_path(g:vundle#bundle_dir.'/'.self.name) endf diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index ee635c9a..8b77c907 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -1,6 +1,7 @@ " --------------------------------------------------------------------------- -" Try to clone all new bundles given (or all bundles in g:bundles by default) -" to g:bundle_dir. If a:bang is 1 it will also update all plugins (git pull). +" Try to clone all new bundles given (or all bundles in g:vundle#bundles by +" default) to g:vundle#bundle_dir. If a:bang is 1 it will also update all +" plugins (git pull). " " bang -- 1 or 0 " ... -- any number of bundle specifications (separate arguments) @@ -8,10 +9,10 @@ func! vundle#installer#new(bang, ...) abort " No specific plugins are specified. Operate on all plugins. if a:0 == 0 - let bundles = g:bundles + let bundles = g:vundle#bundles " Specific plugins are specified for update. Update them. elseif (a:bang) - let bundles = filter(copy(g:bundles), 'index(a:000, v:val.name) > -1') + let bundles = filter(copy(g:vundle#bundles), 'index(a:000, v:val.name) > -1') " Specific plugins are specified for installation. Install them. else let bundles = map(copy(a:000), 'vundle#config#bundle(v:val, {})') @@ -23,7 +24,7 @@ func! vundle#installer#new(bang, ...) abort endif let names = vundle#scripts#bundle_names(map(copy(bundles), 'v:val.name_spec')) - call vundle#scripts#view('Installer',['" Installing plugins to '.expand(g:bundle_dir, 1)], names + ['Helptags']) + call vundle#scripts#view('Installer',['" Installing plugins to '.expand(g:vundle#bundle_dir, 1)], names + ['Helptags']) " This calls 'add' as a normal mode command. This is a buffer local mapping " defined in vundle#scripts#view(). The mapping will call a buffer local @@ -163,10 +164,10 @@ endf " return -- the return value from s:sync() " --------------------------------------------------------------------------- func! vundle#installer#install(bang, name) abort - if !isdirectory(g:bundle_dir) | call mkdir(g:bundle_dir, 'p') | endif + if !isdirectory(g:vundle#bundle_dir) | call mkdir(g:vundle#bundle_dir, 'p') | endif let n = substitute(a:name,"['".'"]\+','','g') - let matched = filter(copy(g:bundles), 'v:val.name_spec == n') + let matched = filter(copy(g:vundle#bundles), 'v:val.name_spec == n') if len(matched) > 0 let b = matched[0] @@ -179,12 +180,12 @@ endf " --------------------------------------------------------------------------- -" Call :helptags for all bundles in g:bundles. +" Call :helptags for all bundles in g:vundle#bundles. " " return -- 'error' if an error occurred, else return 'helptags' " --------------------------------------------------------------------------- func! vundle#installer#docs() abort - let error_count = vundle#installer#helptags(g:bundles) + let error_count = vundle#installer#helptags(g:vundle#bundles) if error_count > 0 return 'error' endif @@ -222,10 +223,10 @@ endf " bang -- not used " --------------------------------------------------------------------------- func! vundle#installer#list(bang) abort - let bundles = vundle#scripts#bundle_names(map(copy(g:bundles), 'v:val.name_spec')) + let bundles = vundle#scripts#bundle_names(map(copy(g:vundle#bundles), 'v:val.name_spec')) call vundle#scripts#view('list', ['" My Plugins'], bundles) redraw - echo len(g:bundles).' plugins configured' + echo len(g:vundle#bundles).' plugins configured' endf @@ -237,10 +238,10 @@ endf " should be removed unconditionally " --------------------------------------------------------------------------- func! vundle#installer#clean(bang) abort - let bundle_dirs = map(copy(g:bundles), 'v:val.path()') + let bundle_dirs = map(copy(g:vundle#bundles), 'v:val.path()') let all_dirs = (v:version > 702 || (v:version == 702 && has("patch51"))) - \ ? split(globpath(g:bundle_dir, '*', 1), "\n") - \ : split(globpath(g:bundle_dir, '*'), "\n") + \ ? split(globpath(g:vundle#bundle_dir, '*', 1), "\n") + \ : split(globpath(g:vundle#bundle_dir, '*'), "\n") let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)') if empty(x_dirs) @@ -465,7 +466,7 @@ func! s:sync(bang, bundle) abort return 'todate' endif - call add(g:updated_bundles, [initial_sha, updated_sha, a:bundle]) + call add(g:vundle#updated_bundles, [initial_sha, updated_sha, a:bundle]) return 'updated' endf @@ -527,7 +528,7 @@ func! s:log(str, ...) abort let lines = split(a:str, '\n', 1) let time = strftime(fmt) for line in lines - call add(g:vundle_log, '['. time .'] '. prefix . line) + call add(g:vundle#log, '['. time .'] '. prefix . line) endfor return a:str endf diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 69bf34a7..bf17fdad 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -42,7 +42,7 @@ endf func! vundle#scripts#complete(a,c,d) if match(a:c, '\v^%(Plugin|Vundle)%(Install!|Update)') == 0 " Only installed plugins if updating - return join(map(copy(g:bundles), 'v:val.name'), "\n") + return join(map(copy(g:vundle#bundles), 'v:val.name'), "\n") else " Or all known plugins otherwise return join(s:load_scripts(0),"\n") @@ -61,7 +61,7 @@ func! s:view_log() if bufloaded(s:log_file) execute 'silent bdelete' s:log_file endif - call writefile(g:vundle_log, s:log_file) + call writefile(g:vundle#log, s:log_file) execute 'silent pedit ' . s:log_file wincmd P | wincmd H @@ -74,7 +74,7 @@ endf " --------------------------------------------------------------------------- func! s:create_changelog() abort let changelog = ['Updated Plugins:'] - for bundle_data in g:updated_bundles + for bundle_data in g:vundle#updated_bundles let initial_sha = bundle_data[0] let updated_sha = bundle_data[1] let bundle = bundle_data[2] @@ -258,7 +258,7 @@ endf " specifications) of all plugins from vim-scripts.org " --------------------------------------------------------------------------- func! s:load_scripts(bang) - let f = expand(g:bundle_dir.'/.vundle/script-names.vim-scripts.org.json', 1) + let f = expand(g:vundle#bundle_dir.'/.vundle/script-names.vim-scripts.org.json', 1) if a:bang || !filereadable(f) if 0 != s:fetch_scripts(f) return [] From d75d5a34c5989c05a9ded7279e087718602a68d6 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 3 Mar 2015 11:20:43 +0100 Subject: [PATCH 13/36] Set default values for autoload variables. The setting of the default values for the autoload variables is moved out of any function. One reason being that these settings do not depend on the argument of the function. The second being that Vim will source the autoload script if an undefined autoload variable is referenced and the file is expected to define the variable (see :help autoload). --- autoload/vundle.vim | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/autoload/vundle.vim b/autoload/vundle.vim index f186236d..e458618e 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -61,9 +61,9 @@ endif " :Plugin command in the vimrc. It is not possible to do this automatically " because when loading the vimrc file no plugins where loaded yet. func! vundle#rc(...) abort - let g:vundle#bundle_dir = len(a:000) > 0 ? expand(a:1, 1) : expand('$HOME/.vim/bundle', 1) - let g:vundle#updated_bundles = [] - let g:vundle#log = [] + if a:0 > 0 + let g:vundle#bundle_dir = expand(a:1, 1) + endif call vundle#config#init() endf @@ -80,4 +80,11 @@ func! vundle#end(...) abort call vundle#config#activate_bundles() endf +" Initialize some global variables used by Vundle. +let vundle#bundle_dir = expand('$HOME/.vim/bundle', 1) +let vundle#bundles = [] +let vundle#lazy_load = 0 +let vundle#log = [] +let vundle#updated_bundles = [] + " vim: set expandtab sts=2 ts=2 sw=2 tw=78 norl: From 66d501bc81ae7072bca631c598bbf02d35a35a43 Mon Sep 17 00:00:00 2001 From: Shahaf Arad Date: Fri, 13 Mar 2015 20:00:47 +0200 Subject: [PATCH 14/36] Prevent insecure plugin names. Plugins' names which contain '../', '$HOME', '%:h:h', '..\', etc. can be dangerous. Use a sensible whitelist for plugin names and prevent its expansion. --- autoload/vundle/config.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/config.vim b/autoload/vundle/config.vim index 8467b9f7..0e02b112 100644 --- a/autoload/vundle/config.vim +++ b/autoload/vundle/config.vim @@ -97,6 +97,9 @@ funct! s:check_bundle_name(bundle) \ ' previously used the name "' . a:bundle.name . '"' . \ '. Skipping Plugin ' . a:bundle.name_spec . '.' return 0 + elseif a:bundle.name !~ '\v^[A-Za-z0-9_-]%(\.?[A-Za-z0-9_-])*$' + echoerr 'Invalid plugin name: ' . a:bundle.name + return 0 endif let s:bundle_names[a:bundle.name] = a:bundle.name_spec return 1 @@ -262,7 +265,7 @@ let s:bundle = {} " return -- the target location to clone this bundle to " --------------------------------------------------------------------------- func! s:bundle.path() - return s:expand_path(g:vundle#bundle_dir.'/'.self.name) + return s:expand_path(g:vundle#bundle_dir.'/') . self.name endf From 5865ea73212452b179421d7ba15376deeaef970e Mon Sep 17 00:00:00 2001 From: Daniel Levenson Date: Sun, 26 Jul 2015 14:57:40 -0400 Subject: [PATCH 15/36] Update repository references. Saves a 301 redirect and removes a tad bit of confusion when `git clone`-ing Vundle when installing. --- README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 337e0b5e..defb7520 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## [Help Maintain Vundle](https://github.com/gmarik/Vundle.vim/issues/383) +## [Help Maintain Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) ## About @@ -20,7 +20,7 @@ [Vundle] is undergoing an [interface change], please stay up to date to get latest changes. -[![Gitter-chat](https://badges.gitter.im/gmarik/Vundle.vim.svg)](https://gitter.im/gmarik/Vundle.vim) for discussion and support. +[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) for discussion and support. ![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) @@ -38,7 +38,7 @@ 2. Set up [Vundle]: - `$ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim` + `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` 3. Configure Plugins: @@ -55,7 +55,7 @@ "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required - Plugin 'gmarik/Vundle.vim' + Plugin 'VundleVim/Vundle.vim' " The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end. @@ -97,19 +97,19 @@ ## Docs -See the [`:h vundle`](https://github.com/gmarik/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc for more details. +See the [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc for more details. ## Changelog -See the [changelog](https://github.com/gmarik/Vundle.vim/blob/master/changelog.md). +See the [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). ## People Using Vundle -see [Examples](https://github.com/gmarik/Vundle.vim/wiki/Examples) +see [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) ## Contributors -see [Vundle contributors](https://github.com/gmarik/Vundle.vim/graphs/contributors) +see [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) *Thank you!* @@ -139,10 +139,10 @@ see [Vundle contributors](https://github.com/gmarik/Vundle.vim/graphs/contributo * search by description as well * make it rock! -[Vundle]:http://github.com/gmarik/Vundle.vim -[Windows setup]:https://github.com/gmarik/Vundle.vim/wiki/Vundle-for-Windows -[FAQ]:https://github.com/gmarik/Vundle.vim/wiki -[Tips]:https://github.com/gmarik/Vundle.vim/wiki/Tips-and-Tricks +[Vundle]:http://github.com/VundleVim/Vundle.vim +[Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows +[FAQ]:https://github.com/VundleVim/Vundle.vim/wiki +[Tips]:https://github.com/VundleVim/Vundle.vim/wiki/Tips-and-Tricks [Vim]:http://www.vim.org [Git]:http://git-scm.com [`git clone`]:http://gitref.org/creating/#clone @@ -151,10 +151,10 @@ see [Vundle contributors](https://github.com/gmarik/Vundle.vim/graphs/contributo [help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags [runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27 -[configure]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 -[install]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 -[update]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 -[search]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 -[clean]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 -[interactive mode]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 -[interface change]:https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 +[configure]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 +[install]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 +[update]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 +[search]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 +[clean]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 +[interactive mode]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 +[interface change]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 From d115e046841102afec99b54777c59c60d09cdbec Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Fri, 10 Jul 2015 11:46:08 -0700 Subject: [PATCH 16/36] Vundle log, changelog, and scripts-view are no longer modifiable and the buffers will not persist after they're closed. --- autoload/vundle/scripts.vim | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index bf17fdad..ebd7dbe3 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -63,6 +63,10 @@ func! s:view_log() endif call writefile(g:vundle#log, s:log_file) execute 'silent pedit ' . s:log_file + set bufhidden=wipe + setl buftype=nofile + setl noswapfile + setl ro noma wincmd P | wincmd H endf @@ -116,6 +120,10 @@ func! s:view_changelog() endif call writefile(s:create_changelog(), s:changelog_file) execute 'silent pedit' s:changelog_file + set bufhidden=wipe + setl buftype=nofile + setl noswapfile + setl ro noma wincmd P | wincmd H endf @@ -160,6 +168,7 @@ func! vundle#scripts#view(title, headers, results) setl buftype=nofile setl noswapfile + set bufhidden=wipe setl cursorline setl nonu ro noma From d2cef2ce1fe37ee0af7b4082549c02e34383c844 Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Mon, 28 Sep 2015 15:48:59 -0700 Subject: [PATCH 17/36] Update repository references throughout documentation. Also, fixed an incorrect URL and updated references to ':Bundle' commands to ':Plugin' commands --- CONTRIBUTING.md | 14 +++++++------- autoload/vundle.vim | 4 ++-- doc/vundle.txt | 10 +++++----- test/minirc.vim | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2162ffcb..ec31f8f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,15 +14,15 @@ Issues Before submitting an issue, be sure to check the following places for answers. -1. Vundle docs at [`:h vundle`](https://github.com/gmarik/Vundle.vim/blob/master/doc/vundle.txt). +1. Vundle docs at [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt). -2. The [FAQ](https://github.com/gmarik/Vundle.vim/search). +2. The [FAQ](https://github.com/VundleVim/Vundle.vim/wiki). -3. [Search](https://github.com/gmarik/Vundle.vim/search) the repository for related issues. +3. [Search](https://github.com/VundleVim/Vundle.vim/search) the repository for related issues. ## Try To Eliminate Your Vimrc -In order to make sure it isn't just `.vimrc` replace your own config file with the [minimal vimrc](https://github.com/gmarik/Vundle.vim/blob/master/test/minirc.vim). Clear out bundles and then try to reproduce. +In order to make sure it isn't just `.vimrc` replace your own config file with the [minimal vimrc](https://github.com/VundleVim/Vundle.vim/blob/master/test/minirc.vim). Clear out bundles and then try to reproduce. If the problem stops, likely there is an issue in your user configuration. You can incrementally add back your user changes to the minimal file testing the bug each time. This will allow you to slowly bisect the issue. You may want to test one plugin at a time. @@ -46,7 +46,7 @@ To better respond to issues please follow these general guidelines when explaini I am using Vim on Kubuntu 13.04 64 bit and I get the following error... (add further explanation here) -To reproduce the bug, use the vimrc file below and run `:BundleInstall`... (continue with steps) +To reproduce the bug, use the vimrc file below and run `:PluginInstall`... (continue with steps) Vimrc: ``` @@ -55,8 +55,8 @@ syntax on filetype off set rtp+=~/.vim/bundle/Vundle.vim/ call vundle#rc() -Bundle 'gmarik/Vundle.vim' -Bundle 'relevant/plugin' +Plugin 'VundleVim/Vundle.vim' +Plugin 'relevant/plugin' filetype plugin indent on .... more user configs here... diff --git a/autoload/vundle.vim b/autoload/vundle.vim index e458618e..148ff3ef 100644 --- a/autoload/vundle.vim +++ b/autoload/vundle.vim @@ -1,7 +1,7 @@ " Vundle is a shortcut for Vim Bundle and Is a simple plugin manager for Vim " Author: gmarik -" HomePage: http://github.com/gmarik/Vundle.vim -" Readme: http://github.com/gmarik/Vundle.vim/blob/master/README.md +" HomePage: http://github.com/VundleVim/Vundle.vim +" Readme: http://github.com/VundleVim/Vundle.vim/blob/master/README.md " Version: 0.10.2 " Plugin Commands diff --git a/doc/vundle.txt b/doc/vundle.txt index 9a2670a4..81a5f66f 100644 --- a/doc/vundle.txt +++ b/doc/vundle.txt @@ -54,15 +54,15 @@ more information. *vundle-windows* If you are using Windows, see instructions on the Wiki - https://github.com/gmarik/Vundle.vim/wiki/Vundle-for-Windows. + https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows. *vundle-faq* If you run into any issues, please consult the FAQ at - https://github.com/gmarik/Vundle.vim/wiki + https://github.com/VundleVim/Vundle.vim/wiki 2. Setup Vundle: > - git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim + git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim < 3. Configure bundles: @@ -79,7 +79,7 @@ more information. "call vundle#begin('~/some/path/here') " let Vundle manage Vundle, required - Plugin 'gmarik/Vundle.vim' + Plugin 'VundleVim/Vundle.vim' " The following are examples of different formats supported. " Keep Plugin commands between vundle#begin/end. @@ -208,7 +208,7 @@ GitHub ------ GitHub is used when a user/repo is passed to `Plugin`. > - Plugin 'gmarik/Vundle.vim' => https://github.com/gmarik/Vundle.vim + Plugin 'VundleVim/Vundle.vim' => https://github.com/VundleVim/Vundle.vim Vim Scripts ----------- diff --git a/test/minirc.vim b/test/minirc.vim index 7b48d132..f4ece70e 100644 --- a/test/minirc.vim +++ b/test/minirc.vim @@ -3,7 +3,7 @@ syntax on filetype off set rtp+=~/.vim/bundle/Vundle.vim/ call vundle#begin() -Plugin 'gmarik/Vundle.vim' +Plugin 'VundleVim/Vundle.vim' call vundle#end() filetype plugin indent on From 2803c644078375dd8f2a1628ce8ed4dcccc2a866 Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Thu, 6 Aug 2015 14:53:04 -0400 Subject: [PATCH 18/36] Add 'vundlelog' filetype + settings/highlighting --- autoload/vundle/scripts.vim | 1 + ftplugin/vundlelog.vim | 15 +++++++++++++++ syntax/vundlelog.vim | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 ftplugin/vundlelog.vim create mode 100644 syntax/vundlelog.vim diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index ebd7dbe3..6bae78c3 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -124,6 +124,7 @@ func! s:view_changelog() setl buftype=nofile setl noswapfile setl ro noma + setfiletype vundlelog wincmd P | wincmd H endf diff --git a/ftplugin/vundlelog.vim b/ftplugin/vundlelog.vim new file mode 100644 index 00000000..0f338eb8 --- /dev/null +++ b/ftplugin/vundlelog.vim @@ -0,0 +1,15 @@ +" --------------------------------------------------------------------------- +" Standard ftplugin boilerplate; see ':help ftplugin'. +" --------------------------------------------------------------------------- +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + + +" --------------------------------------------------------------------------- +" Settings for the Vundle update log buffer. +" --------------------------------------------------------------------------- +setlocal textwidth=0 +setlocal nowrap +setlocal noswapfile diff --git a/syntax/vundlelog.vim b/syntax/vundlelog.vim new file mode 100644 index 00000000..64e81e32 --- /dev/null +++ b/syntax/vundlelog.vim @@ -0,0 +1,36 @@ +" --------------------------------------------------------------------------- +" Syntax highlighting for the line which identifies the plugin. +" --------------------------------------------------------------------------- +syntax match VundlePluginName '\v(^Updated Plugin: )@<=.*$' +highlight link VundlePluginName Keyword + +" --------------------------------------------------------------------------- +" Syntax highlighting for the 'compare at' line of each plugin. +" --------------------------------------------------------------------------- +syntax region VundleCompareLine start='\v^Compare at: https:' end='\v\n' + \ contains=VundleCompareUrl +syntax match VundleCompareUrl '\vhttps:\S+' +highlight link VundleCompareLine Comment +highlight link VundleCompareUrl Underlined + +" --------------------------------------------------------------------------- +" Syntax highlighting for individual commits. +" --------------------------------------------------------------------------- +" The main commit line. +" Note that this regex is intimately related to the one for VundleCommitTree, +" and the two should be changed in sync. +syntax match VundleCommitLine '\v(^ [|*]( *[\\|/\*])* )@<=[^*|].*$' + \ contains=VundleCommitMerge,VundleCommitUser,VundleCommitTime +highlight link VundleCommitLine String +" Sub-regions inside the commit message. +syntax match VundleCommitMerge '\v Merge pull request #\d+.*' +syntax match VundleCommitUser '\v( )@<=\S+( \S+)*(, \d+ \w+ ago$)@=' +syntax match VundleCommitTime '\v(, )@<=\d+ \w+ ago$' +highlight link VundleCommitMerge Ignore +highlight link VundleCommitUser Identifier +highlight link VundleCommitTime Comment +" The git history DAG markers are outside of the main commit line region. +" Note that this regex is intimately related to the one for VundleCommitLine, +" and the two should be changed in sync. +syntax match VundleCommitTree '\v(^ )@<=[|*]( *[\\|/\*])*' +highlight link VundleCommitTree Label From 29572e7e8f666fce2e0ba60d2575a1c6648db489 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 26 Oct 2015 16:59:56 +0800 Subject: [PATCH 19/36] readme_zh_ch --- README_ZH_CN.md | 160 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 README_ZH_CN.md diff --git a/README_ZH_CN.md b/README_ZH_CN.md new file mode 100644 index 00000000..ba75a9fd --- /dev/null +++ b/README_ZH_CN.md @@ -0,0 +1,160 @@ +## [Help Maintain Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) + +## 关于 + +[Vundle] 是 _Vim bundle_ 的简称,是一个 [Vim] 插件管理器. + +[Vundle] 允许你做... + +* 同时在`.vimrc`中跟踪和[管理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233)插件 +* [安装](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254)特定格式的插件(a.k.a. scripts/bundle) +* [更新](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265)特定格式插件 +* 通过插件名称[搜索](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 +* [清理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318)未使用的插件 +* 可以通过*单一按键*完成以上操作,详见[interactive mode](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360) + +[Vundle] 自动完成... + +* 管理已安装插件的[runtime path](http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27) +* 安装和更新后,重新生成[帮助标签](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) + +[Vundle] 正在经历一个 [interface change], 请通过以下方式获取最新信息. + +[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) : 讨论和技术支持. + +![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) + +## Quick Start + +1. Introduction: + + Installation requires [Git] and triggers [`git clone`] for each configured repository to `~/.vim/bundle/` by default. + Curl is required for search. + + If you are using Windows, go directly to [Windows setup]. If you run into any issues, please consult the [FAQ]. + See [Tips] for some advanced configurations. + + Using non-POSIX shells, such as the popular Fish shell, requires additional setup. Please check the [FAQ]. + +2. Set up [Vundle]: + + `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` + +3. Configure Plugins: + + Put this at the top of your `.vimrc` to use Vundle. Remove plugins you don't need, they are for illustration purposes. + + ```vim + set nocompatible " be iMproved, required + filetype off " required + + " set the runtime path to include Vundle and initialize + set rtp+=~/.vim/bundle/Vundle.vim + call vundle#begin() + " alternatively, pass a path where Vundle should install plugins + "call vundle#begin('~/some/path/here') + + " let Vundle manage Vundle, required + Plugin 'VundleVim/Vundle.vim' + + " The following are examples of different formats supported. + " Keep Plugin commands between vundle#begin/end. + " plugin on GitHub repo + Plugin 'tpope/vim-fugitive' + " plugin from http://vim-scripts.org/vim/scripts.html + Plugin 'L9' + " Git plugin not hosted on GitHub + Plugin 'git://git.wincent.com/command-t.git' + " git repos on your local machine (i.e. when working on your own plugin) + Plugin 'file:///home/gmarik/path/to/plugin' + " The sparkup vim script is in a subdirectory of this repo called vim. + " Pass the path to set the runtimepath properly. + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + " Avoid a name conflict with L9 + Plugin 'user/L9', {'name': 'newL9'} + + " All of your Plugins must be added before the following line + call vundle#end() " required + filetype plugin indent on " required + " To ignore plugin indent changes, instead use: + "filetype plugin on + " + " Brief help + " :PluginList - lists configured plugins + " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate + " :PluginSearch foo - searches for foo; append `!` to refresh local cache + " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal + " + " see :h vundle for more details or wiki for FAQ + " Put your non-Plugin stuff after this line + ``` + +4. Install Plugins: + + Launch `vim` and run `:PluginInstall` + + To install from command line: `vim +PluginInstall +qall` + +## Docs + +See the [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc for more details. + +## Changelog + +See the [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). + +## People Using Vundle + +see [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) + +## Contributors + +see [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) + +*Thank you!* + +## Inspiration & Ideas + +* [pathogen.vim](http://github.com/tpope/vim-pathogen/) +* [Bundler](https://github.com/bundler/bundler) +* [Scott Bronson](http://github.com/bronson) + +## Also + +* Vundle was developed and tested with [Vim] 7.3 on OS X, Linux and Windows +* Vundle tries to be as [KISS](http://en.wikipedia.org/wiki/KISS_principle) as possible + +## TODO: +[Vundle] is a work in progress, so any ideas and patches are appreciated. + +* ✓ activate newly added bundles on `.vimrc` reload or after `:PluginInstall` +* ✓ use preview window for search results +* ✓ Vim documentation +* ✓ put Vundle in `bundles/` too (will fix Vundle help) +* ✓ tests +* ✓ improve error handling +* allow specifying revision/version? +* handle dependencies +* show description in search results +* search by description as well +* make it rock! + +[Vundle]:http://github.com/VundleVim/Vundle.vim +[Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows +[FAQ]:https://github.com/VundleVim/Vundle.vim/wiki +[Tips]:https://github.com/VundleVim/Vundle.vim/wiki/Tips-and-Tricks +[Vim]:http://www.vim.org +[Git]:http://git-scm.com +[`git clone`]:http://gitref.org/creating/#clone + +[Vim scripts]:http://vim-scripts.org/vim/scripts.html +[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags +[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27 + +[configure]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 +[install]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 +[update]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 +[search]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 +[clean]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 +[interactive mode]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 +[interface change]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 From 87bfb7fab1b71a66815f5e749c9a7df84d6fdb02 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 26 Oct 2015 18:29:07 +0800 Subject: [PATCH 20/36] readme_zh_ch --- README_ZH_CN.md | 118 ++++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/README_ZH_CN.md b/README_ZH_CN.md index ba75a9fd..82808755 100644 --- a/README_ZH_CN.md +++ b/README_ZH_CN.md @@ -1,4 +1,4 @@ -## [Help Maintain Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) +## [帮助维护Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) ## 关于 @@ -20,119 +20,121 @@ [Vundle] 正在经历一个 [interface change], 请通过以下方式获取最新信息. -[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) : 讨论和技术支持. +讨论和技术支持:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) ![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) -## Quick Start +## 快速开始 -1. Introduction: +1. 介绍: - Installation requires [Git] and triggers [`git clone`] for each configured repository to `~/.vim/bundle/` by default. - Curl is required for search. + 安装需要[Git](http://git-scm.com/),触发[`git clone`](http://gitref.org/creating/#clone),默认将每一个指定特定格式插件的仓库复制到`~/.vim/bundle/`. + 搜索需要Curl支持. - If you are using Windows, go directly to [Windows setup]. If you run into any issues, please consult the [FAQ]. - See [Tips] for some advanced configurations. + Windows用户请直接访问[Windows setup]. 如果有任何问题, 请参考 [FAQ]. + 查看 [Tips] 获取相关高级配置. - Using non-POSIX shells, such as the popular Fish shell, requires additional setup. Please check the [FAQ]. + 使用 non-POSIX shells, 比如比较流行对 Fish shell, 需要额外对步骤. 请查看 [FAQ]. -2. Set up [Vundle]: +2. 初始安装 [Vundle]: `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` -3. Configure Plugins: +3. 配置插件 : - Put this at the top of your `.vimrc` to use Vundle. Remove plugins you don't need, they are for illustration purposes. + 请将以下加在 `.vimrc` 方可使用Vundle. 删掉你不需要的插件, 这些只是用做示例. ```vim - set nocompatible " be iMproved, required - filetype off " required + set nocompatible " 去除VI一致性,必须 + filetype off " 必须 - " set the runtime path to include Vundle and initialize + " 设置包括vundle和初始化相关的runtime path set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() - " alternatively, pass a path where Vundle should install plugins + " 另一种选择, 指定一个vundle安装插件的路径 "call vundle#begin('~/some/path/here') - " let Vundle manage Vundle, required + " 让vundle管理插件版本,必须 Plugin 'VundleVim/Vundle.vim' - " The following are examples of different formats supported. - " Keep Plugin commands between vundle#begin/end. - " plugin on GitHub repo + " 以下范例用来支持不同格式的插件安装. + " 请将安装插的命令放在vundle#begin和vundle#end之间. + " Github上的插件 + " 格式为 Plugin '用户名/插件仓库名' Plugin 'tpope/vim-fugitive' - " plugin from http://vim-scripts.org/vim/scripts.html + " 来自 http://vim-scripts.org/vim/scripts.html 的插件 + " Plugin '插件名称' 实际上是 Plugin 'vim-scripts/插件仓库名' 只是此处的用户名可以省略 Plugin 'L9' - " Git plugin not hosted on GitHub + " 由Git支持但不再github上的插件仓库 Plugin 'git clone 后面的地址' Plugin 'git://git.wincent.com/command-t.git' - " git repos on your local machine (i.e. when working on your own plugin) + " 本地的Git仓库(例如自己的插件) Plugin 'file:///+本地插件仓库绝对路径' Plugin 'file:///home/gmarik/path/to/plugin' - " The sparkup vim script is in a subdirectory of this repo called vim. - " Pass the path to set the runtimepath properly. + " 插件在仓库的子目录中. + " 正确指定路径用以设置runtimepath. 以下范例插件在sparkup/vim目录下 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - " Avoid a name conflict with L9 + " 避免插件名冲突,例如L9已存在,则可以指定 Plugin 'user/L9', {'name': 'newL9'} - " All of your Plugins must be added before the following line - call vundle#end() " required - filetype plugin indent on " required - " To ignore plugin indent changes, instead use: + " 你的所有插件需要在下面这行之前 + call vundle#end() " 必须 + filetype plugin indent on " 必须 加载vim自带和插件相应的语法和文件类型相关脚本 + " 忽视插件改变缩进,可以使用以下替代: "filetype plugin on " - " Brief help - " :PluginList - lists configured plugins - " :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate - " :PluginSearch foo - searches for foo; append `!` to refresh local cache - " :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal + " 简要帮助文档 + " :PluginList - 列出所有已配置的插件 + " :PluginInstall - 安装插件,追加 `!` 用以更新或使用 :PluginUpdate + " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地缓存 + " :PluginClean - 清除未使用插件,需要确认; 追加 `!` 自动批准移除未使用插件 " - " see :h vundle for more details or wiki for FAQ - " Put your non-Plugin stuff after this line + " 查阅 :h vundle 获取更多细节和wiki以及FAQ + " 将你自己对非插件片段放在这行之后 ``` -4. Install Plugins: +4. 安装插件: - Launch `vim` and run `:PluginInstall` + 运行 `vim` 再运行 `:PluginInstall` - To install from command line: `vim +PluginInstall +qall` + 通过命令行直接安装 `vim +PluginInstall +qall` ## Docs -See the [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc for more details. +查阅 [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc 以获取更多细节. -## Changelog +## 更新日志 -See the [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). +查阅 [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). -## People Using Vundle +## 在使用此插件的用户的VIMRC -see [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) +查阅 [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) -## Contributors +## 维护者 -see [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) +查阅 [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) -*Thank you!* +*感谢!* -## Inspiration & Ideas +## 灵感 & 思路 * [pathogen.vim](http://github.com/tpope/vim-pathogen/) * [Bundler](https://github.com/bundler/bundler) * [Scott Bronson](http://github.com/bronson) -## Also +## 另外 -* Vundle was developed and tested with [Vim] 7.3 on OS X, Linux and Windows -* Vundle tries to be as [KISS](http://en.wikipedia.org/wiki/KISS_principle) as possible +* Vundle 已测试环境为: [Vim] 7.3 on OS X, Linux and Windows +* Vundle 尝试尽可能保持至简模式 [KISS](http://en.wikipedia.org/wiki/KISS_principle) ## TODO: -[Vundle] is a work in progress, so any ideas and patches are appreciated. +[Vundle] 是一个正在进步对项目, 所以很多设计思路和补丁是需要借鉴的. -* ✓ activate newly added bundles on `.vimrc` reload or after `:PluginInstall` -* ✓ use preview window for search results +* ✓ 在重新载入或者执行`:PluginInstall`之后激活`.vimrc`中新添加的插件 +* ✓ 使用预览窗口显示搜索结果 * ✓ Vim documentation -* ✓ put Vundle in `bundles/` too (will fix Vundle help) -* ✓ tests -* ✓ improve error handling +* ✓ 同时将Vundle 放置在 `bundles/` 中 (将修复 Vundle 帮助) +* ✓ 测试 +* ✓ 提升错误处理能力 * allow specifying revision/version? * handle dependencies * show description in search results From 309995c5ea3299d8ad61262f59107c0cba17bbac Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Tue, 27 Oct 2015 19:29:26 +0800 Subject: [PATCH 21/36] finished readme --- README_ZH_CN.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README_ZH_CN.md b/README_ZH_CN.md index 82808755..61ffb00d 100644 --- a/README_ZH_CN.md +++ b/README_ZH_CN.md @@ -135,11 +135,11 @@ * ✓ 同时将Vundle 放置在 `bundles/` 中 (将修复 Vundle 帮助) * ✓ 测试 * ✓ 提升错误处理能力 -* allow specifying revision/version? -* handle dependencies -* show description in search results -* search by description as well -* make it rock! +* 支持手动指定版本(待考虑) +* 版本依赖 +* 搜索结果中显示描述 +* 同时支持通过描述搜索 +* 使其更加稳定! [Vundle]:http://github.com/VundleVim/Vundle.vim [Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows From 68bd81869d99442bd05ebba7e21d1f8d43d936d3 Mon Sep 17 00:00:00 2001 From: Nate Fischer Date: Mon, 2 Nov 2015 19:08:34 -0800 Subject: [PATCH 22/36] Setting Vundle key mappings to be silent. --- autoload/vundle/scripts.vim | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 6bae78c3..7066a2c9 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -197,25 +197,25 @@ func! vundle#scripts#view(title, headers, results) com! -buffer -nargs=0 VundleChangelog call s:view_changelog() - nnoremap q :silent bd! - nnoremap D :exec 'Delete'.getline('.') + nnoremap q :silent bd! + nnoremap D :exec 'Delete'.getline('.') - nnoremap add :exec 'Install'.getline('.') - nnoremap add! :exec 'Install'.substitute(getline('.'), '^Plugin ', 'Plugin! ', '') + nnoremap add :exec 'Install'.getline('.') + nnoremap add! :exec 'Install'.substitute(getline('.'), '^Plugin ', 'Plugin! ', '') - nnoremap i :exec 'InstallAndRequire'.getline('.') - nnoremap I :exec 'InstallAndRequire'.substitute(getline('.'), '^Plugin ', 'Plugin! ', '') + nnoremap i :exec 'InstallAndRequire'.getline('.') + nnoremap I :exec 'InstallAndRequire'.substitute(getline('.'), '^Plugin ', 'Plugin! ', '') - nnoremap l :VundleLog - nnoremap u :VundleChangelog - nnoremap h :h vundle - nnoremap ? :norm h + nnoremap l :VundleLog + nnoremap u :VundleChangelog + nnoremap h :h vundle + nnoremap ? :h vundle - nnoremap c :PluginClean - nnoremap C :PluginClean! + nnoremap c :PluginClean + nnoremap C :PluginClean! nnoremap s :PluginSearch - nnoremap R :call vundle#scripts#reload() + nnoremap R :call vundle#scripts#reload() " goto first line after headers exec ':'.(len(a:headers) + 1) From 49ae71cd253e197b9cb96a2eea5414e43d7cbd20 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 30 Jan 2016 09:24:05 +0800 Subject: [PATCH 23/36] Update example in readme --- README.md | 5 +++-- README_ZH_CN.md | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index defb7520..27adba2b 100644 --- a/README.md +++ b/README.md @@ -70,8 +70,9 @@ " The sparkup vim script is in a subdirectory of this repo called vim. " Pass the path to set the runtimepath properly. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - " Avoid a name conflict with L9 - Plugin 'user/L9', {'name': 'newL9'} + " Install L9 and avoid a Naming conflict if you've already installed a + " different version somewhere else. + Plugin 'ascenator/L9', {'name': 'newL9'} " All of your Plugins must be added before the following line call vundle#end() " required diff --git a/README_ZH_CN.md b/README_ZH_CN.md index 61ffb00d..c393fbff 100644 --- a/README_ZH_CN.md +++ b/README_ZH_CN.md @@ -72,8 +72,8 @@ " 插件在仓库的子目录中. " 正确指定路径用以设置runtimepath. 以下范例插件在sparkup/vim目录下 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - " 避免插件名冲突,例如L9已存在,则可以指定 - Plugin 'user/L9', {'name': 'newL9'} + " 安装L9,如果已经安装过这个插件,可利用以下格式避免命名冲突 + Plugin 'ascenator/L9', {'name': 'newL9'} " 你的所有插件需要在下面这行之前 call vundle#end() " 必须 From f38d2826fa89402997100932e28e894339436afa Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 21 Feb 2016 20:50:37 +0800 Subject: [PATCH 24/36] A traditional Chinese version of the README This is done based on the simplified Chinese version at commit 232cb92. Traditional Chinese is used by people in Taiwan, Hong Kong and Macao. --- README_ZH_TW.md | 162 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 README_ZH_TW.md diff --git a/README_ZH_TW.md b/README_ZH_TW.md new file mode 100644 index 00000000..3bd85d2d --- /dev/null +++ b/README_ZH_TW.md @@ -0,0 +1,162 @@ +## [幫助維護Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) + +## 關於 + +[Vundle] 是 _Vim bundle_ 的簡稱,是一個 [Vim] 插件管理器. + +[Vundle] 允許你做... + +* 同時在`.vimrc`中跟蹤和[管理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233)插件 +* [安裝](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254)特定格式的插件(a.k.a. scripts/bundle) +* [更新](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265)特定格式插件 +* 通過插件名稱[搜索](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 +* [清理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318)未使用的插件 +* 可以通過*單一按鍵*完成以上操作,詳見[interactive mode](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360) + +[Vundle] 自動完成... + +* 管理已安裝插件的[runtime path](http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27) +* 安裝和更新後,重新生成[幫助標簽](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) + +[Vundle] 正在經歷一個 [interface change], 請通過以下方式獲取最新信息. + +討論和技術支持:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) + +![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) + +## 快速開始 + +1. 介紹: + + 安裝需要[Git](http://git-scm.com/),觸發[`git clone`](http://gitref.org/creating/#clone),默認將每一個指定特定格式插件的倉庫復制到`~/.vim/bundle/`. + 搜索需要Curl支持. + + Windows用戶請直接訪問[Windows setup]. 如果有任何問題, 請參考 [FAQ]. + 查看 [Tips] 獲取相關高級配置. + + 使用 non-POSIX shells, 比如比較流行對 Fish shell, 需要額外對步驟. 請查看 [FAQ]. + +2. 初始安裝 [Vundle]: + + `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` + +3. 配置插件 : + + 請將以下加在 `.vimrc` 方可使用Vundle. 刪掉你不需要的插件, 這些只是用做示例. + + ```vim + set nocompatible " 去除VI一致性,必須 + filetype off " 必須 + + " 設置包括vundle和初始化相關的runtime path + set rtp+=~/.vim/bundle/Vundle.vim + call vundle#begin() + " 另一種選擇, 指定一個vundle安裝插件的路徑 + "call vundle#begin('~/some/path/here') + + " 讓vundle管理插件版本,必須 + Plugin 'VundleVim/Vundle.vim' + + " 以下範例用來支持不同格式的插件安裝. + " 請將安裝插的命令放在vundle#begin和vundle#end之間. + " Github上的插件 + " 格式為 Plugin '用戶名/插件倉庫名' + Plugin 'tpope/vim-fugitive' + " 來自 http://vim-scripts.org/vim/scripts.html 的插件 + " Plugin '插件名稱' 實際上是 Plugin 'vim-scripts/插件倉庫名' 只是此處的用戶名可以省略 + Plugin 'L9' + " 由Git支持但不再github上的插件倉庫 Plugin 'git clone 後面的地址' + Plugin 'git://git.wincent.com/command-t.git' + " 本地的Git倉庫(例如自己的插件) Plugin 'file:///+本地插件倉庫絕對路徑' + Plugin 'file:///home/gmarik/path/to/plugin' + " 插件在倉庫的子目錄中. + " 正確指定路徑用以設置runtimepath. 以下範例插件在sparkup/vim目錄下 + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + " 避免插件名沖突,例如L9已存在,則可以指定 + Plugin 'user/L9', {'name': 'newL9'} + + " 你的所有插件需要在下面這行之前 + call vundle#end() " 必須 + filetype plugin indent on " 必須 加載vim自帶和插件相應的語法和文件類型相關腳本 + " 忽視插件改變縮進,可以使用以下替代: + "filetype plugin on + " + " 簡要幫助文檔 + " :PluginList - 列出所有已配置的插件 + " :PluginInstall - 安裝插件,追加 `!` 用以更新或使用 :PluginUpdate + " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地緩存 + " :PluginClean - 清除未使用插件,需要確認; 追加 `!` 自動批准移除未使用插件 + " + " 查閱 :h vundle 獲取更多細節和wiki以及FAQ + " 將你自己對非插件片段放在這行之後 + ``` + +4. 安裝插件: + + 運行 `vim` 再運行 `:PluginInstall` + + 通過命令行直接安裝 `vim +PluginInstall +qall` + +## Docs + +查閱 [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc 以獲取更多細節. + +## 更新日志 + +查閱 [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). + +## 在使用此插件的用戶的VIMRC + +查閱 [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) + +## 維護者 + +查閱 [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) + +*感謝!* + +## 靈感 & 思路 + +* [pathogen.vim](http://github.com/tpope/vim-pathogen/) +* [Bundler](https://github.com/bundler/bundler) +* [Scott Bronson](http://github.com/bronson) + +## 另外 + +* Vundle 已測試環境為: [Vim] 7.3 on OS X, Linux and Windows +* Vundle 嘗試盡可能保持至簡模式 [KISS](http://en.wikipedia.org/wiki/KISS_principle) + +## TODO: +[Vundle] 是一個正在進步對項目, 所以很多設計思路和補丁是需要借鑒的. + +* ✓ 在重新載入或者執行`:PluginInstall`之後激活`.vimrc`中新添加的插件 +* ✓ 使用預覽窗口顯示搜索結果 +* ✓ Vim documentation +* ✓ 同時將Vundle 放置在 `bundles/` 中 (將修復 Vundle 幫助) +* ✓ 測試 +* ✓ 提升錯誤處理能力 +* 支持手動指定版本(待考慮) +* 版本依賴 +* 搜索結果中顯示描述 +* 同時支持通過描述搜索 +* 使其更加穩定! + +[Vundle]:http://github.com/VundleVim/Vundle.vim +[Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows +[FAQ]:https://github.com/VundleVim/Vundle.vim/wiki +[Tips]:https://github.com/VundleVim/Vundle.vim/wiki/Tips-and-Tricks +[Vim]:http://www.vim.org +[Git]:http://git-scm.com +[`git clone`]:http://gitref.org/creating/#clone + +[Vim scripts]:http://vim-scripts.org/vim/scripts.html +[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags +[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27 + +[configure]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 +[install]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 +[update]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 +[search]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 +[clean]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 +[interactive mode]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 +[interface change]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 From 8ab491cfe85068f97afc2c4459feedf0e52244f6 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 21 Feb 2016 20:54:42 +0800 Subject: [PATCH 25/36] Corrected a missing word --- README_ZH_TW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_ZH_TW.md b/README_ZH_TW.md index 3bd85d2d..6ae18ff6 100644 --- a/README_ZH_TW.md +++ b/README_ZH_TW.md @@ -101,7 +101,7 @@ 查閱 [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc 以獲取更多細節. -## 更新日志 +## 更新日誌 查閱 [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). From 72578905e246988551484a91bc299d3ee0989da7 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Tue, 23 Feb 2016 00:42:51 +0800 Subject: [PATCH 26/36] Removed BOM and CR They are added by Notepad on M$ Windows. --- README_ZH_TW.md | 324 ++++++++++++++++++++++++------------------------ 1 file changed, 162 insertions(+), 162 deletions(-) diff --git a/README_ZH_TW.md b/README_ZH_TW.md index 6ae18ff6..e2e01ff3 100644 --- a/README_ZH_TW.md +++ b/README_ZH_TW.md @@ -1,162 +1,162 @@ -## [幫助維護Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) - -## 關於 - -[Vundle] 是 _Vim bundle_ 的簡稱,是一個 [Vim] 插件管理器. - -[Vundle] 允許你做... - -* 同時在`.vimrc`中跟蹤和[管理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233)插件 -* [安裝](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254)特定格式的插件(a.k.a. scripts/bundle) -* [更新](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265)特定格式插件 -* 通過插件名稱[搜索](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 -* [清理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318)未使用的插件 -* 可以通過*單一按鍵*完成以上操作,詳見[interactive mode](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360) - -[Vundle] 自動完成... - -* 管理已安裝插件的[runtime path](http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27) -* 安裝和更新後,重新生成[幫助標簽](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) - -[Vundle] 正在經歷一個 [interface change], 請通過以下方式獲取最新信息. - -討論和技術支持:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) - -![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) - -## 快速開始 - -1. 介紹: - - 安裝需要[Git](http://git-scm.com/),觸發[`git clone`](http://gitref.org/creating/#clone),默認將每一個指定特定格式插件的倉庫復制到`~/.vim/bundle/`. - 搜索需要Curl支持. - - Windows用戶請直接訪問[Windows setup]. 如果有任何問題, 請參考 [FAQ]. - 查看 [Tips] 獲取相關高級配置. - - 使用 non-POSIX shells, 比如比較流行對 Fish shell, 需要額外對步驟. 請查看 [FAQ]. - -2. 初始安裝 [Vundle]: - - `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` - -3. 配置插件 : - - 請將以下加在 `.vimrc` 方可使用Vundle. 刪掉你不需要的插件, 這些只是用做示例. - - ```vim - set nocompatible " 去除VI一致性,必須 - filetype off " 必須 - - " 設置包括vundle和初始化相關的runtime path - set rtp+=~/.vim/bundle/Vundle.vim - call vundle#begin() - " 另一種選擇, 指定一個vundle安裝插件的路徑 - "call vundle#begin('~/some/path/here') - - " 讓vundle管理插件版本,必須 - Plugin 'VundleVim/Vundle.vim' - - " 以下範例用來支持不同格式的插件安裝. - " 請將安裝插的命令放在vundle#begin和vundle#end之間. - " Github上的插件 - " 格式為 Plugin '用戶名/插件倉庫名' - Plugin 'tpope/vim-fugitive' - " 來自 http://vim-scripts.org/vim/scripts.html 的插件 - " Plugin '插件名稱' 實際上是 Plugin 'vim-scripts/插件倉庫名' 只是此處的用戶名可以省略 - Plugin 'L9' - " 由Git支持但不再github上的插件倉庫 Plugin 'git clone 後面的地址' - Plugin 'git://git.wincent.com/command-t.git' - " 本地的Git倉庫(例如自己的插件) Plugin 'file:///+本地插件倉庫絕對路徑' - Plugin 'file:///home/gmarik/path/to/plugin' - " 插件在倉庫的子目錄中. - " 正確指定路徑用以設置runtimepath. 以下範例插件在sparkup/vim目錄下 - Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - " 避免插件名沖突,例如L9已存在,則可以指定 - Plugin 'user/L9', {'name': 'newL9'} - - " 你的所有插件需要在下面這行之前 - call vundle#end() " 必須 - filetype plugin indent on " 必須 加載vim自帶和插件相應的語法和文件類型相關腳本 - " 忽視插件改變縮進,可以使用以下替代: - "filetype plugin on - " - " 簡要幫助文檔 - " :PluginList - 列出所有已配置的插件 - " :PluginInstall - 安裝插件,追加 `!` 用以更新或使用 :PluginUpdate - " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地緩存 - " :PluginClean - 清除未使用插件,需要確認; 追加 `!` 自動批准移除未使用插件 - " - " 查閱 :h vundle 獲取更多細節和wiki以及FAQ - " 將你自己對非插件片段放在這行之後 - ``` - -4. 安裝插件: - - 運行 `vim` 再運行 `:PluginInstall` - - 通過命令行直接安裝 `vim +PluginInstall +qall` - -## Docs - -查閱 [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc 以獲取更多細節. - -## 更新日誌 - -查閱 [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). - -## 在使用此插件的用戶的VIMRC - -查閱 [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) - -## 維護者 - -查閱 [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) - -*感謝!* - -## 靈感 & 思路 - -* [pathogen.vim](http://github.com/tpope/vim-pathogen/) -* [Bundler](https://github.com/bundler/bundler) -* [Scott Bronson](http://github.com/bronson) - -## 另外 - -* Vundle 已測試環境為: [Vim] 7.3 on OS X, Linux and Windows -* Vundle 嘗試盡可能保持至簡模式 [KISS](http://en.wikipedia.org/wiki/KISS_principle) - -## TODO: -[Vundle] 是一個正在進步對項目, 所以很多設計思路和補丁是需要借鑒的. - -* ✓ 在重新載入或者執行`:PluginInstall`之後激活`.vimrc`中新添加的插件 -* ✓ 使用預覽窗口顯示搜索結果 -* ✓ Vim documentation -* ✓ 同時將Vundle 放置在 `bundles/` 中 (將修復 Vundle 幫助) -* ✓ 測試 -* ✓ 提升錯誤處理能力 -* 支持手動指定版本(待考慮) -* 版本依賴 -* 搜索結果中顯示描述 -* 同時支持通過描述搜索 -* 使其更加穩定! - -[Vundle]:http://github.com/VundleVim/Vundle.vim -[Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows -[FAQ]:https://github.com/VundleVim/Vundle.vim/wiki -[Tips]:https://github.com/VundleVim/Vundle.vim/wiki/Tips-and-Tricks -[Vim]:http://www.vim.org -[Git]:http://git-scm.com -[`git clone`]:http://gitref.org/creating/#clone - -[Vim scripts]:http://vim-scripts.org/vim/scripts.html -[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags -[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27 - -[configure]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 -[install]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 -[update]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 -[search]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 -[clean]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 -[interactive mode]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 -[interface change]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 +## [幫助維護Vundle](https://github.com/VundleVim/Vundle.vim/issues/383) + +## 關於 + +[Vundle] 是 _Vim bundle_ 的簡稱,是一個 [Vim] 插件管理器. + +[Vundle] 允許你做... + +* 同時在`.vimrc`中跟蹤和[管理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233)插件 +* [安裝](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254)特定格式的插件(a.k.a. scripts/bundle) +* [更新](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265)特定格式插件 +* 通過插件名稱[搜索](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 +* [清理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318)未使用的插件 +* 可以通過*單一按鍵*完成以上操作,詳見[interactive mode](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360) + +[Vundle] 自動完成... + +* 管理已安裝插件的[runtime path](http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27) +* 安裝和更新後,重新生成[幫助標簽](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) + +[Vundle] 正在經歷一個 [interface change], 請通過以下方式獲取最新信息. + +討論和技術支持:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) + +![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) + +## 快速開始 + +1. 介紹: + + 安裝需要[Git](http://git-scm.com/),觸發[`git clone`](http://gitref.org/creating/#clone),默認將每一個指定特定格式插件的倉庫復制到`~/.vim/bundle/`. + 搜索需要Curl支持. + + Windows用戶請直接訪問[Windows setup]. 如果有任何問題, 請參考 [FAQ]. + 查看 [Tips] 獲取相關高級配置. + + 使用 non-POSIX shells, 比如比較流行對 Fish shell, 需要額外對步驟. 請查看 [FAQ]. + +2. 初始安裝 [Vundle]: + + `$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` + +3. 配置插件 : + + 請將以下加在 `.vimrc` 方可使用Vundle. 刪掉你不需要的插件, 這些只是用做示例. + + ```vim + set nocompatible " 去除VI一致性,必須 + filetype off " 必須 + + " 設置包括vundle和初始化相關的runtime path + set rtp+=~/.vim/bundle/Vundle.vim + call vundle#begin() + " 另一種選擇, 指定一個vundle安裝插件的路徑 + "call vundle#begin('~/some/path/here') + + " 讓vundle管理插件版本,必須 + Plugin 'VundleVim/Vundle.vim' + + " 以下範例用來支持不同格式的插件安裝. + " 請將安裝插的命令放在vundle#begin和vundle#end之間. + " Github上的插件 + " 格式為 Plugin '用戶名/插件倉庫名' + Plugin 'tpope/vim-fugitive' + " 來自 http://vim-scripts.org/vim/scripts.html 的插件 + " Plugin '插件名稱' 實際上是 Plugin 'vim-scripts/插件倉庫名' 只是此處的用戶名可以省略 + Plugin 'L9' + " 由Git支持但不再github上的插件倉庫 Plugin 'git clone 後面的地址' + Plugin 'git://git.wincent.com/command-t.git' + " 本地的Git倉庫(例如自己的插件) Plugin 'file:///+本地插件倉庫絕對路徑' + Plugin 'file:///home/gmarik/path/to/plugin' + " 插件在倉庫的子目錄中. + " 正確指定路徑用以設置runtimepath. 以下範例插件在sparkup/vim目錄下 + Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} + " 避免插件名沖突,例如L9已存在,則可以指定 + Plugin 'user/L9', {'name': 'newL9'} + + " 你的所有插件需要在下面這行之前 + call vundle#end() " 必須 + filetype plugin indent on " 必須 加載vim自帶和插件相應的語法和文件類型相關腳本 + " 忽視插件改變縮進,可以使用以下替代: + "filetype plugin on + " + " 簡要幫助文檔 + " :PluginList - 列出所有已配置的插件 + " :PluginInstall - 安裝插件,追加 `!` 用以更新或使用 :PluginUpdate + " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地緩存 + " :PluginClean - 清除未使用插件,需要確認; 追加 `!` 自動批准移除未使用插件 + " + " 查閱 :h vundle 獲取更多細節和wiki以及FAQ + " 將你自己對非插件片段放在這行之後 + ``` + +4. 安裝插件: + + 運行 `vim` 再運行 `:PluginInstall` + + 通過命令行直接安裝 `vim +PluginInstall +qall` + +## Docs + +查閱 [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc 以獲取更多細節. + +## 更新日誌 + +查閱 [changelog](https://github.com/VundleVim/Vundle.vim/blob/master/changelog.md). + +## 在使用此插件的用戶的VIMRC + +查閱 [Examples](https://github.com/VundleVim/Vundle.vim/wiki/Examples) + +## 維護者 + +查閱 [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contributors) + +*感謝!* + +## 靈感 & 思路 + +* [pathogen.vim](http://github.com/tpope/vim-pathogen/) +* [Bundler](https://github.com/bundler/bundler) +* [Scott Bronson](http://github.com/bronson) + +## 另外 + +* Vundle 已測試環境為: [Vim] 7.3 on OS X, Linux and Windows +* Vundle 嘗試盡可能保持至簡模式 [KISS](http://en.wikipedia.org/wiki/KISS_principle) + +## TODO: +[Vundle] 是一個正在進步對項目, 所以很多設計思路和補丁是需要借鑒的. + +* ✓ 在重新載入或者執行`:PluginInstall`之後激活`.vimrc`中新添加的插件 +* ✓ 使用預覽窗口顯示搜索結果 +* ✓ Vim documentation +* ✓ 同時將Vundle 放置在 `bundles/` 中 (將修復 Vundle 幫助) +* ✓ 測試 +* ✓ 提升錯誤處理能力 +* 支持手動指定版本(待考慮) +* 版本依賴 +* 搜索結果中顯示描述 +* 同時支持通過描述搜索 +* 使其更加穩定! + +[Vundle]:http://github.com/VundleVim/Vundle.vim +[Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows +[FAQ]:https://github.com/VundleVim/Vundle.vim/wiki +[Tips]:https://github.com/VundleVim/Vundle.vim/wiki/Tips-and-Tricks +[Vim]:http://www.vim.org +[Git]:http://git-scm.com +[`git clone`]:http://gitref.org/creating/#clone + +[Vim scripts]:http://vim-scripts.org/vim/scripts.html +[help tags]:http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags +[runtime path]:http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27 + +[configure]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233 +[install]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254 +[update]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265 +[search]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295 +[clean]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318 +[interactive mode]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360 +[interface change]:https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 From aa7b5008b290bfd215945113d603e65b54f973ef Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Fri, 26 Feb 2016 20:41:02 +0800 Subject: [PATCH 27/36] A change corresponding to 52f3443 A traditional Chinese version of the updated `README_ZH_CN.md`. --- README_ZH_TW.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_ZH_TW.md b/README_ZH_TW.md index e2e01ff3..cdc1b787 100644 --- a/README_ZH_TW.md +++ b/README_ZH_TW.md @@ -72,8 +72,8 @@ " 插件在倉庫的子目錄中. " 正確指定路徑用以設置runtimepath. 以下範例插件在sparkup/vim目錄下 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} - " 避免插件名沖突,例如L9已存在,則可以指定 - Plugin 'user/L9', {'name': 'newL9'} + " 安裝L9,如果已經安裝過這個插件,可利用以下格式避免命名衝突 + Plugin 'ascenator/L9', {'name': 'newL9'} " 你的所有插件需要在下面這行之前 call vundle#end() " 必須 From c3da227e87bd566b8166b197483d7b9c09e14cb1 Mon Sep 17 00:00:00 2001 From: Alan Date: Sun, 31 Jul 2016 13:53:08 +0800 Subject: [PATCH 28/36] Update README_ZH_CN.md Fix typo --- README_ZH_CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_ZH_CN.md b/README_ZH_CN.md index c393fbff..f22c8c80 100644 --- a/README_ZH_CN.md +++ b/README_ZH_CN.md @@ -58,7 +58,7 @@ Plugin 'VundleVim/Vundle.vim' " 以下范例用来支持不同格式的插件安装. - " 请将安装插的命令放在vundle#begin和vundle#end之间. + " 请将安装插件的命令放在vundle#begin和vundle#end之间. " Github上的插件 " 格式为 Plugin '用户名/插件仓库名' Plugin 'tpope/vim-fugitive' From b97af5abd545d6be82a0655c3b0dc32d4935ed13 Mon Sep 17 00:00:00 2001 From: Vincent Tam Date: Sun, 21 Aug 2016 20:42:36 +0800 Subject: [PATCH 29/36] A change corresponding to f4cea90 A traditional Chinese version of the updated `README_ZH_CN.md`. --- README_ZH_TW.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_ZH_TW.md b/README_ZH_TW.md index cdc1b787..5c851a6a 100644 --- a/README_ZH_TW.md +++ b/README_ZH_TW.md @@ -58,7 +58,7 @@ Plugin 'VundleVim/Vundle.vim' " 以下範例用來支持不同格式的插件安裝. - " 請將安裝插的命令放在vundle#begin和vundle#end之間. + " 請將安裝插件的命令放在vundle#begin和vundle#end之間. " Github上的插件 " 格式為 Plugin '用戶名/插件倉庫名' Plugin 'tpope/vim-fugitive' From 469cee1b19c7471b2a00a27aec44edd7cde27b32 Mon Sep 17 00:00:00 2001 From: Caleb Eby Date: Thu, 20 Oct 2016 20:10:49 -0700 Subject: [PATCH 30/36] Use github markdown checkmarks (#749) * Updates readme to use github markdown checkmarks --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 27adba2b..15ad130a 100644 --- a/README.md +++ b/README.md @@ -128,17 +128,17 @@ see [Vundle contributors](https://github.com/VundleVim/Vundle.vim/graphs/contrib ## TODO: [Vundle] is a work in progress, so any ideas and patches are appreciated. -* ✓ activate newly added bundles on `.vimrc` reload or after `:PluginInstall` -* ✓ use preview window for search results -* ✓ Vim documentation -* ✓ put Vundle in `bundles/` too (will fix Vundle help) -* ✓ tests -* ✓ improve error handling -* allow specifying revision/version? -* handle dependencies -* show description in search results -* search by description as well -* make it rock! +* [x] activate newly added bundles on `.vimrc` reload or after `:PluginInstall` +* [x] use preview window for search results +* [x] Vim documentation +* [x] put Vundle in `bundles/` too (will fix Vundle help) +* [x] tests +* [x] improve error handling +* [ ] allow specifying revision/version? +* [ ] handle dependencies +* [ ] show description in search results +* [ ] search by description as well +* [ ] make it rock! [Vundle]:http://github.com/VundleVim/Vundle.vim [Windows setup]:https://github.com/VundleVim/Vundle.vim/wiki/Vundle-for-Windows From e42efc2591f3c02686a04948fe70bf4a3c381a0f Mon Sep 17 00:00:00 2001 From: Rayson Zhu Date: Thu, 8 Dec 2016 14:16:41 +0800 Subject: [PATCH 31/36] refine Chinese (Traditional) translations --- README_ZH_TW.md | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/README_ZH_TW.md b/README_ZH_TW.md index 5c851a6a..1818b337 100644 --- a/README_ZH_TW.md +++ b/README_ZH_TW.md @@ -9,18 +9,18 @@ * 同時在`.vimrc`中跟蹤和[管理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L126-L233)插件 * [安裝](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L234-L254)特定格式的插件(a.k.a. scripts/bundle) * [更新](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L255-L265)特定格式插件 -* 通過插件名稱[搜索](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 +* 通過插件名稱[搜尋](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L266-L295)[Vim scripts](http://vim-scripts.org/vim/scripts.html)中的插件 * [清理](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L303-L318)未使用的插件 * 可以通過*單一按鍵*完成以上操作,詳見[interactive mode](https://github.com/VundleVim/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L319-L360) [Vundle] 自動完成... * 管理已安裝插件的[runtime path](http://vimdoc.sourceforge.net/htmldoc/options.html#%27runtimepath%27) -* 安裝和更新後,重新生成[幫助標簽](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) +* 安裝和更新後,重新生成[幫助標籤](http://vimdoc.sourceforge.net/htmldoc/helphelp.html#:helptags) -[Vundle] 正在經歷一個 [interface change], 請通過以下方式獲取最新信息. +[Vundle] 正在經歷一個 [interface change], 請通過以下方式獲取最新資訊. -討論和技術支持:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) +討論和技術支援:[![Gitter-chat](https://badges.gitter.im/VundleVim/Vundle.vim.svg)](https://gitter.im/VundleVim/Vundle.vim) ![Vundle-installer](http://i.imgur.com/Rueh7Cc.png) @@ -28,13 +28,13 @@ 1. 介紹: - 安裝需要[Git](http://git-scm.com/),觸發[`git clone`](http://gitref.org/creating/#clone),默認將每一個指定特定格式插件的倉庫復制到`~/.vim/bundle/`. - 搜索需要Curl支持. + 安裝需要[Git](http://git-scm.com/),觸發[`git clone`](http://gitref.org/creating/#clone),預設將每一個指定特定格式插件的倉庫複製到`~/.vim/bundle/`. + 搜尋需要Curl支援. - Windows用戶請直接訪問[Windows setup]. 如果有任何問題, 請參考 [FAQ]. - 查看 [Tips] 獲取相關高級配置. + Windows使用者請直接訪問[Windows setup]. 如果有任何問題, 請參考 [FAQ]. + 檢視 [Tips] 獲取相關高級配置. - 使用 non-POSIX shells, 比如比較流行對 Fish shell, 需要額外對步驟. 請查看 [FAQ]. + 使用 non-POSIX shells (比如流行的 Fish shell) 需要額外步驟. 請檢視 [FAQ]. 2. 初始安裝 [Vundle]: @@ -42,60 +42,60 @@ 3. 配置插件 : - 請將以下加在 `.vimrc` 方可使用Vundle. 刪掉你不需要的插件, 這些只是用做示例. + 請將以下內容加在 `.vimrc` 頂部方可使用Vundle. 刪掉你不需要的插件, 以下只是示例. ```vim set nocompatible " 去除VI一致性,必須 filetype off " 必須 - " 設置包括vundle和初始化相關的runtime path + " 設定 runtime path 以包含並初始化 Vundle set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() - " 另一種選擇, 指定一個vundle安裝插件的路徑 + " 另一種選擇, 指定 Vundle 安裝插件的路徑 "call vundle#begin('~/some/path/here') - " 讓vundle管理插件版本,必須 + " 讓 Vundle 管理自身,必須 Plugin 'VundleVim/Vundle.vim' - " 以下範例用來支持不同格式的插件安裝. + " 以下範例用來演示如何安裝不同來源的插件. " 請將安裝插件的命令放在vundle#begin和vundle#end之間. " Github上的插件 - " 格式為 Plugin '用戶名/插件倉庫名' + " 格式為 Plugin '使用者名/插件倉庫名' Plugin 'tpope/vim-fugitive' " 來自 http://vim-scripts.org/vim/scripts.html 的插件 " Plugin '插件名稱' 實際上是 Plugin 'vim-scripts/插件倉庫名' 只是此處的用戶名可以省略 Plugin 'L9' - " 由Git支持但不再github上的插件倉庫 Plugin 'git clone 後面的地址' + " 不由 GitHub 託管的 Git 倉庫 Plugin 'git clone 後面的地址' Plugin 'git://git.wincent.com/command-t.git' - " 本地的Git倉庫(例如自己的插件) Plugin 'file:///+本地插件倉庫絕對路徑' + " 本地的 Git 倉庫(例如自己的插件) Plugin 'file:///+本地插件倉庫絕對路徑' Plugin 'file:///home/gmarik/path/to/plugin' " 插件在倉庫的子目錄中. - " 正確指定路徑用以設置runtimepath. 以下範例插件在sparkup/vim目錄下 + " 指定路徑用以正確設定runtimepath. 以下範例插件在sparkup倉庫的vim目錄下 Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " 安裝L9,如果已經安裝過這個插件,可利用以下格式避免命名衝突 Plugin 'ascenator/L9', {'name': 'newL9'} " 你的所有插件需要在下面這行之前 call vundle#end() " 必須 - filetype plugin indent on " 必須 加載vim自帶和插件相應的語法和文件類型相關腳本 - " 忽視插件改變縮進,可以使用以下替代: + filetype plugin indent on " 必須 + " 要禁止插件改變縮排,可以使用下行替代: "filetype plugin on " " 簡要幫助文檔 " :PluginList - 列出所有已配置的插件 " :PluginInstall - 安裝插件,追加 `!` 用以更新或使用 :PluginUpdate - " :PluginSearch foo - 搜索 foo ; 追加 `!` 清除本地緩存 + " :PluginSearch foo - 搜尋 foo ; 追加 `!` 清除本地快取 " :PluginClean - 清除未使用插件,需要確認; 追加 `!` 自動批准移除未使用插件 " " 查閱 :h vundle 獲取更多細節和wiki以及FAQ - " 將你自己對非插件片段放在這行之後 + " 將与插件無關的設放在這行之後 ``` 4. 安裝插件: 運行 `vim` 再運行 `:PluginInstall` - 通過命令行直接安裝 `vim +PluginInstall +qall` + 通過命令列直接安裝 `vim +PluginInstall +qall` ## Docs @@ -124,21 +124,21 @@ ## 另外 * Vundle 已測試環境為: [Vim] 7.3 on OS X, Linux and Windows -* Vundle 嘗試盡可能保持至簡模式 [KISS](http://en.wikipedia.org/wiki/KISS_principle) +* Vundle 儘可能遵從 [KISS](http://en.wikipedia.org/wiki/KISS_principle) 原則 ## TODO: [Vundle] 是一個正在進步對項目, 所以很多設計思路和補丁是需要借鑒的. * ✓ 在重新載入或者執行`:PluginInstall`之後激活`.vimrc`中新添加的插件 -* ✓ 使用預覽窗口顯示搜索結果 +* ✓ 使用預覽視窗顯示搜尋結果 * ✓ Vim documentation * ✓ 同時將Vundle 放置在 `bundles/` 中 (將修復 Vundle 幫助) * ✓ 測試 * ✓ 提升錯誤處理能力 * 支持手動指定版本(待考慮) * 版本依賴 -* 搜索結果中顯示描述 -* 同時支持通過描述搜索 +* 搜尋結果中顯示描述 +* 同時支援通過描述搜尋 * 使其更加穩定! [Vundle]:http://github.com/VundleVim/Vundle.vim From a2f63d76a9864a7feb3857c8c5bd134bb8594b65 Mon Sep 17 00:00:00 2001 From: Philip Kirkbride Date: Sun, 12 Mar 2017 17:56:27 -0400 Subject: [PATCH 32/36] Remove example script which breaks install According to this discussion https://github.com/VundleVim/Vundle.vim/issues/713 this plugin is simply an example, but the example seems to consistently break the installation process. If this is the case better to remove it. Another example of it causing problems: https://github.com/VundleVim/Vundle.vim/issues/784 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 15ad130a..d0e57cb2 100644 --- a/README.md +++ b/README.md @@ -61,8 +61,6 @@ " Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo Plugin 'tpope/vim-fugitive' - " plugin from http://vim-scripts.org/vim/scripts.html - Plugin 'L9' " Git plugin not hosted on GitHub Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) From af198a4ec8f9e02864108f66927361f35f9dfd4c Mon Sep 17 00:00:00 2001 From: Dorian Date: Thu, 23 Mar 2017 18:50:40 -0700 Subject: [PATCH 33/36] Add note about adding shell=/bin/bash to .vimrc for fish shell users See #690 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d0e57cb2..5431ae8a 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ To install from command line: `vim +PluginInstall +qall` +5. (optional) For those using the fish shell: add `shell=/bin/bash` to your `.vimrc` + ## Docs See the [`:h vundle`](https://github.com/VundleVim/Vundle.vim/blob/master/doc/vundle.txt) Vimdoc for more details. From 8f089eccb33bbb96170e27db9d9c759165ff6ed1 Mon Sep 17 00:00:00 2001 From: Philip Kirkbride Date: Wed, 29 Mar 2017 22:16:45 -0400 Subject: [PATCH 34/36] Comment instead of removing L9 plugin --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5431ae8a..8602e943 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,8 @@ " Keep Plugin commands between vundle#begin/end. " plugin on GitHub repo Plugin 'tpope/vim-fugitive' + " plugin from http://vim-scripts.org/vim/scripts.html + " Plugin 'L9' " Git plugin not hosted on GitHub Plugin 'git://git.wincent.com/command-t.git' " git repos on your local machine (i.e. when working on your own plugin) From cc36ca5b7ce9573908a4f3bbdacfc60dabdca819 Mon Sep 17 00:00:00 2001 From: Philip Kirkbride Date: Thu, 30 Mar 2017 08:55:59 -0400 Subject: [PATCH 35/36] Comment other reference to L9 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8602e943..b5759267 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ Plugin 'rstacruz/sparkup', {'rtp': 'vim/'} " Install L9 and avoid a Naming conflict if you've already installed a " different version somewhere else. - Plugin 'ascenator/L9', {'name': 'newL9'} + " Plugin 'ascenator/L9', {'name': 'newL9'} " All of your Plugins must be added before the following line call vundle#end() " required From 8b71a61aee4fc48c9623969af7a645adced2aa40 Mon Sep 17 00:00:00 2001 From: Gregory Cerna Date: Sun, 2 Apr 2017 12:33:23 -0500 Subject: [PATCH 36/36] accidentally a 'set' in my vimrc shell=/bin/bash needs to start with `set` in order to actually make vim+fish work correctly. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b5759267..54ec1516 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ To install from command line: `vim +PluginInstall +qall` -5. (optional) For those using the fish shell: add `shell=/bin/bash` to your `.vimrc` +5. (optional) For those using the fish shell: add `set shell=/bin/bash` to your `.vimrc` ## Docs