-
-
Save bronson/1073254 to your computer and use it in GitHub Desktop.
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" enabling this fixes things: | |
"call pathogen#runtime_append_all_bundles() | |
filetype indent plugin on | |
syntax on | |
set laststatus=2 " always display status line even if only one window is visible. | |
Bundle 'https://github.com/gmarik/vundle' | |
Bundle 'https://github.com/tpope/vim-fugitive' | |
" TODO: this prompt seems to cause huge delays with big repos on MacOS X | |
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P |
Since fugitive isn't a autoloadable plugin the error can be only get triggered in case when statusline to be displayed and fugitive not yet loaded.
can you try moving set laststatus=2
below the set statusline
command?
It may trigger statusline to display!
Try that, and let me know...
And since I cannot reproduce it - probably vim dependant...
Good point. On Linux I'm on 7.3.237, on Mac it's MacVim 7.3.57.
Here's :scriptnames:
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim73/debian.vim
3: /usr/share/vim/vim73/syntax/syntax.vim
4: /usr/share/vim/vim73/syntax/synload.vim
5: /usr/share/vim/vim73/syntax/syncolor.vim
6: /usr/share/vim/vim73/filetype.vim
7: /disk/natty/bronson/.vimrc
8: /usr/share/vim/vim73/ftoff.vim
9: /disk/natty/bronson/.vim/bundle/vundle/autoload/vundle.vim
10: /disk/natty/bronson/.vim/bundle/vundle/autoload/vundle/config.vim
11: /usr/share/vim/vim73/ftplugin.vim
12: /usr/share/vim/vim73/indent.vim
13: /usr/share/vim/vim73/syntax/nosyntax.vim
14: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
15: /usr/share/vim/vim73/plugin/gzip.vim
16: /usr/share/vim/vim73/plugin/matchparen.vim
17: /usr/share/vim/vim73/plugin/netrwPlugin.vim
18: /usr/share/vim/vim73/plugin/rrhelper.vim
19: /usr/share/vim/vim73/plugin/spellfile.vim
20: /usr/share/vim/vim73/plugin/tarPlugin.vim
21: /usr/share/vim/vim73/plugin/tohtml.vim
22: /usr/share/vim/vim73/plugin/vimballPlugin.vim
23: /usr/share/vim/vim73/plugin/zipPlugin.vim
try moving set laststatus=2 below the set statusline command?
No difference.
I guess I don't understand the difference between call vundle#rc()
and call pathogen#runtime_append_all_bundles()
.
here's my rtp
:
/Users/gmarik/.vim/bundle/vundle,/Users/gmarik/.vim/bundle/vim-fugitive,/Users/gmarik/.vim,/Applications/MacVim.app/Contents/Resources/
vim/vimfiles,/Applications/MacVim.app/Contents/Resources/vim/runtime,/Applications/MacVim.app/Contents/Resources/vim/vimfiles/after,/Users/gmarik/.vi
m/after,/Users/gmarik/.vim/bundle/vundle/,/Users/gmarik/.vim/bundle/vim-fugitive/after,/Users/gmarik/.vim/bundle/vundle/after
I guess I don't understand the difference between call vundle#rc() and call pathogen#runtime_append_all_bundles()
Vundle is an autoloadable plugin, that means that call vundle#rc()
triggers Vim to find autoload/vundle.vim
and call vundle#rc()
method just to initialize vundle and Bundle*
commands.
In other hand call pathogen#runtime_append_all_bundles()
makes Vim find autoload/pathogen.vim
and call pathogen#runtime_append_all_bundles()
method, which adds all bundle/*
dirs to runtimepath
.
In case of Vundle runtimepath
gets modified by Bundle 'blah'
command, so you can have as many bundles in your bundle/
dir but only those declared with Bundle
command get loaded.
As for the issue:
There may be something prohibiting vundle to parse Bundle 'https://github.com/tpope/vim-fugitive'
correctly, which results in missing fugitive command.
Can't think of anything else ATM..
Also when do you get the error?
One may get that error when trying to install bundles for the first time with Vundle (aka chicken & egg dilemma ).
I'm assuming htat's not the case.
Yep, bundles were all installed by vim-update-bundles beforehand so it's not chicken/egg.
Here's rtp (afaict no real difference from yours): /home/bronson/.vim/bundle/vundle,/home/bronson/.vim/bundle/vimfugitive,/disk/natty/bronson/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/disk/natty/bronson/.vim/after,/disk/natty/bronson/.vim/bundle/vundle/,/home/bronson/.vim/bundle/vim-fugitive/after,/home/bronson/.vim/bundle/vundle/after
Since it's a part of rtp, I guess that's a sign that the Bundle directive is being parsed correctly?
The error gets displayed every time when starting vim:
E117: Unknown function: fugitive#statusline
E15: Invalid expression: fugitive#statusline()
Press ENTER or type command to continue
Then everything works as usual except Fugitive isn't loaded and of course the statusline doesn't include Fugitive status.
OH, I see. Your explanation makes sense now. Vundle is adding .vim/bundle/vimfugitive to the rtp but vim-update-bundles cloned it into 'fugitive'
We're both modifying the repo name, https://github.com/tpope/vim-fugitive: you're calling it vimfugitive, I'm changing it to just plain fugitive.
Pretty obvious in retrospect.
So hm... How do you want to handle repo name munging?
For the record, I just drop leading 'vim-' and trailing '.git':
dirname = url.split('/').last.gsub(/^vim-|\.git$/, '')
ok, that makes sense now.
Yeah, Vundle just strips out .git
ext but leaving the vim-
part.
Not sure how should we handle vim-
. And I agree that it's a useless prefix.
How is it possible that your rtp
has bundle/vimfugitive
without dash in name?
I'm thinking I'll change v-u-b to match vundle. I just added it because I noticed tpope and a few others using it to identify their plugins on github. But it's not necessary and simpler is better.
bundle/vimfugitive must have been a copy/paste error. It's vim-fugitive right now (although I'm using a very different environment).
Pathogen's rtp has 56 entries, Vundle's equivalent has 101. It would be nice if Vundle didn't add paths that don't exist. :)
It would be nice if Vundle didn't add paths that don't exist.
Yeah, good catch! )
Yep, not dropping the vim- fixed it. Things seem to work, thanks!
Still trying to figure out how I feel about basing the rtp on the .vimrc instead of ~/.vim/bundle... Seems like more to go wrong, less flexible, but maybe it's nicer to have removals take place immediately. Can't tell. :)
It works for me ...
could you post your
:scriptnames
output? here's mine: