gvim pathogen issues
Asked Answered
E

3

4

I downloaded pathogen.vim from github and put it in "autoload" directory under ~/.vim. However now when I fire up gvim, and do :helptags, it says "Argument required". The contents of my ~/.vimrc file are:

call pathogen#runtime_append_all_bundles()
call pathogen#helptags()

What am I missing?

Thanks.

Andy

PS: I am doing this so that I can install Nerdtree

--- EDIT 1 ---

Based on what I have seen so far, the pathogen.vim plugin from github did not work for me, so I had to download it from vim.org, and it worked. However now when I do "unzip nerd_tree -d ~/.vim/bundle" and then start up gvim, I can still not find nerdtree.

-----End ---------

Envisage answered 5/5, 2011 at 22:12 Comment(0)
A
5

helptags is a vim command which has nothing to do with pathogen. The helptags command in vim takes a directory as an argument where it will process .txt files and generate the tags file.

To tell if pathogen is loading correctly you should be able to attempt to :call pathogen#helptags(). If running that manually does not fail, then pathogen is loaded (this is actually unnecessary if you are not getting an error when you start vim because your .vimrc is already running these commands).

The next step for you to complete is to read the documentation provided here on how to install a plugin as a bundle. To summarize:

  • Make a directory called ~/.vim/bundle
  • Unzip/clone/copy files from an upstream source into ~/.vim/bundle/plugin-name/. This may contain many files and directories (ftplugin, autoload, doc, etc.).
  • Fire up vim and test that the functionality provided by plugin-name is available. If not, check that you have completed the above steps correctly.

If you're having problems with pathogen, just remember installing a bundle is not all that different than installing a plugin the normal way. The advantage is you get to keep all files and folders related to that specific plugin in their own directory. This allows you to manage each plugin individually and be confident you are only touching files related to that plugin.

Anility answered 5/5, 2011 at 22:32 Comment(9)
@Randy Morris : Thanks for your reply. The link you provided seems to imply that I need to only have $:call pathogen#helptags() in my .vimrc. I did that, and now when I start gvim, I get a bunch of error ("Error detected while processing ~/autoload/pathogen.vim ..... "). Sorry, new to Vim..Envisage
@Envisage The specific errors would be nice. You can get them when they disappear by running :messages.Anility
@Randy Morris: Well actually I had the github and the vim.org versions of pathogen.vim mixed up. When I use the vim.org version, pathogen gets installed correctly, as verified by :call pathogen#helptags() (it shows no output though). But now when I donwload nerdtree and put it under ~/.vim/bundle/, it does not load up !!Envisage
What exactly are you putting in ~/.vim/bundle/?Anility
I unzipped the nerdtree directory and moved it to ~/.vim/bundle. So now I have ~/.vim/bundle/NERD_tree/doc, ~/.vim/bundle/NERD_tree/plugin and ~/.vim/bundle/NERD_tree/nerdtree_pluginEnvisage
How are you determining NERDTree isn't loading? I don't have or use NERDTree so I can't really debug installation problems at the moment.Anility
I did :help NERD_tree.txt. Well actually what I just did is to copy everything under ~/.vim/bundle, instead of under ~/.vim/bundle/NERD_tree. So now m directory structure is ~/.vim/bundle/doc, ~/.vim/bundle/plugin and ~/.vim/bundle/nerdtree_plugin and now nerdtree is loading.Envisage
That's great that it's working but it's not configured right. You had it set up correctly before. I wonder if you should try both pathogen and nerdtree from github as they will likely both be more up to date than vim.org.Anility
Well the github pathogen did not even work for me, as you saw in the original post...Envisage
P
10

According to the pathogen README on github site, you should use :Helptags instead of :helptags. With :Helptags command executed, pathogen should generate all the documentations under directory ~/.vim/bundle now.

Pluvial answered 13/1, 2012 at 3:46 Comment(0)
A
5

helptags is a vim command which has nothing to do with pathogen. The helptags command in vim takes a directory as an argument where it will process .txt files and generate the tags file.

To tell if pathogen is loading correctly you should be able to attempt to :call pathogen#helptags(). If running that manually does not fail, then pathogen is loaded (this is actually unnecessary if you are not getting an error when you start vim because your .vimrc is already running these commands).

The next step for you to complete is to read the documentation provided here on how to install a plugin as a bundle. To summarize:

  • Make a directory called ~/.vim/bundle
  • Unzip/clone/copy files from an upstream source into ~/.vim/bundle/plugin-name/. This may contain many files and directories (ftplugin, autoload, doc, etc.).
  • Fire up vim and test that the functionality provided by plugin-name is available. If not, check that you have completed the above steps correctly.

If you're having problems with pathogen, just remember installing a bundle is not all that different than installing a plugin the normal way. The advantage is you get to keep all files and folders related to that specific plugin in their own directory. This allows you to manage each plugin individually and be confident you are only touching files related to that plugin.

Anility answered 5/5, 2011 at 22:32 Comment(9)
@Randy Morris : Thanks for your reply. The link you provided seems to imply that I need to only have $:call pathogen#helptags() in my .vimrc. I did that, and now when I start gvim, I get a bunch of error ("Error detected while processing ~/autoload/pathogen.vim ..... "). Sorry, new to Vim..Envisage
@Envisage The specific errors would be nice. You can get them when they disappear by running :messages.Anility
@Randy Morris: Well actually I had the github and the vim.org versions of pathogen.vim mixed up. When I use the vim.org version, pathogen gets installed correctly, as verified by :call pathogen#helptags() (it shows no output though). But now when I donwload nerdtree and put it under ~/.vim/bundle/, it does not load up !!Envisage
What exactly are you putting in ~/.vim/bundle/?Anility
I unzipped the nerdtree directory and moved it to ~/.vim/bundle. So now I have ~/.vim/bundle/NERD_tree/doc, ~/.vim/bundle/NERD_tree/plugin and ~/.vim/bundle/NERD_tree/nerdtree_pluginEnvisage
How are you determining NERDTree isn't loading? I don't have or use NERDTree so I can't really debug installation problems at the moment.Anility
I did :help NERD_tree.txt. Well actually what I just did is to copy everything under ~/.vim/bundle, instead of under ~/.vim/bundle/NERD_tree. So now m directory structure is ~/.vim/bundle/doc, ~/.vim/bundle/plugin and ~/.vim/bundle/nerdtree_plugin and now nerdtree is loading.Envisage
That's great that it's working but it's not configured right. You had it set up correctly before. I wonder if you should try both pathogen and nerdtree from github as they will likely both be more up to date than vim.org.Anility
Well the github pathogen did not even work for me, as you saw in the original post...Envisage
M
1

I use pathogen and I find it great, but you don't need pathogen at all to use NERDTree.

Just put the files like this then issue :helptags ~/.vim/doc and it will work:

~/.vim/doc/NERD_tree.txt
~/.vim/nerdtree_plugin/exec_menuitem.vim
~/.vim/nerdtree_plugin/fs_menu.vim
~/.vim/plugin/NERD_tree.vim

My setup with pathogen is very standard:

~/.vim/bundle/NERD_tree/doc/NERD_tree.txt
~/.vim/bundle/NERD_tree/nerdtree_plugin/exec_menuitem.vim
~/.vim/bundle/NERD_tree/nerdtree_plugin/fs_menu.vim
~/.vim/bundle/NERD_tree/nerdtree_plugin/insert_image.vim <-- a custom script not included with the distribution
~/.vim/bundle/NERD_tree/plugin/NERD_tree.vim

and works like a charm.

It it helps, here are the first lines of my ~/.vimrc:

" This must be first, because it changes other options as side effect
set nocompatible

" Use pathogen to easily modify the runtime path to include all plugins under
" the ~/.vim/bundle directory
filetype off                    " force reloading *after* pathogen loaded
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
filetype plugin indent on       " enable detection, plugins and indenting in one step
Menace answered 6/5, 2011 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.