1

I am connecting to my university's computers. I am trying to customize vim. They put their vim configuration files in the protected /usr/share folder where I have no permissions.

I copied the .vimrc file to my home directory and started changing. This seemed to work :-)

Step 2, I installed pathogen as instructed here: http://mirnazim.org/writings/vim-plugins-i-use/

I added the following lines to .vimrc

execute pathogen#infect('~/.vim/bundle/{}')
call pathogen#helptags()

Unfortunately vim doesn't recognize my plugins (for example TagBar). I tried to play with the argument in infect, change execute to call, and etc.

Nothing helped.

Interestingly enough when I do :scriptnames I see that ~/.vim/autoload/pathogen.vim shows. Files in bundle directory don't show though :-(.

Ideas?

user2002121
  • 75
  • 3
  • 8
  • /users/studs/bsc/2012/[myusername]/.vim, /var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73, /usr/share/vim/vimfiles/after, /var/lib/vim/addons/after, /users/studs/bsc/2012/[myusername]/.vim/after – user2002121 Apr 12 '13 at 12:31
  • Try `call pathogen#infect('bundle')`. – Alexander Shukaev Apr 12 '13 at 12:40
  • it gives me a warning an tells me to use 'bundle\{}'. Anyhows it doesn't work. – user2002121 Apr 12 '13 at 12:48
  • 1
    It seems like Tim has updated the [code](https://github.com/tpope/vim-pathogen/blob/master/autoload/pathogen.vim), see the comment. I think you should try `call pathogen#infect('bundle/{}')` or just `call pathogen#infect()` as this is the default. – Alexander Shukaev Apr 12 '13 at 12:52
  • how can i make my plugin work? maybe without pathogen? – user2002121 Apr 12 '13 at 14:08
  • You can manually inject it into the `rtp`, but I don't recommend doing that. Pathogen should definitely work. Show your `&rtp` after invoking `pathogen#infect('bundle/{}')`. Are you absolutely sure that your plugin resides in `~/.vim/bundle/MyPlugin`? – Alexander Shukaev Apr 12 '13 at 14:10
  • Just install your plugins manually, Pathogen is cool but not required *at all*. – romainl Apr 12 '13 at 14:57

2 Answers2

0

how can i make my plugin work? maybe without pathogen?

some people like it, other not, but I'd advice you to use Vundle instead of pathogen. Here's a nice post about why, but honestly the main reason is that it's just stupid simple to manage plugins using it.

The installation process is very easy:

git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle

and edit .vimrc : filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' " … new bundles here filetype plugin indent on

And for each new plugin I want to install, I do add the following to my .vim rc, where the comment is:

Bundle "user/plugin"

and then you execute :BundleInstall on a new instance.

Elegant and simple, what else do you want?

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83
zmo
  • 24,463
  • 4
  • 54
  • 90
  • 1
    I don't want such an _intrusive_ plugin manager which pulls the most recent bugs from repositories on GitHub. I'd love to manually obtain plugins and use those revisions which I know are stable for sure. – Alexander Shukaev Apr 12 '13 at 16:15
  • 1
    I don't get how that can be a problem, whatever you can do with pathogen you can still do with Vundle. For your use case, you can always install a plugin using Vundle, and then go to the installed directory of your plugin and `git checkout` to a previous tag or commit. The only difference is that you only have to do it to the plugins that are buggy… And BTW, if it does not exists, you can always send a patch to get a bundle at a given revision (e.g. `Bundle "tpope/vim-surround@0b2c9ff9df"`, btw it's the next bullet in [todo list of Vundle](https://github.com/gmarik/vundle#todo)) – zmo Apr 12 '13 at 16:24
  • I could also create a repository with my Vim configuration (which I have anyway) and add all plugins as submodules which would provide me the same functionality in the end. The point is that Vundle is a piece of useless overengineering, but that's just my personal opinion. – Alexander Shukaev Apr 12 '13 at 16:30
  • I agree that some features of Vundle are useless, and that it could be a good idea for it to support git submodules. But it's still neat, working well, and very close to what pathogen does, but with a simple interface, and less overhead to install/uninstall, enable/disable a plugin. – zmo Apr 12 '13 at 19:04
0

I know it is kind of obvious, but your plugins folders actually have files inside?

Some people already missed it: Vim: Pathogen not loading

Community
  • 1
  • 1
mMontu
  • 8,983
  • 4
  • 38
  • 53