Friday, February 5, 2016

Re: Pathogen doesn't seem to work

Hi Hashjie!

On Fr, 05 Feb 2016, Hashjie wrote:

> Op vrijdag 5 februari 2016 12:29:29 UTC+1 schreef ZyX:
> > 2016-02-05 14:24 GMT+03:00 Hashjie <hylke.hellinga@gmail.com>:
> > > Op vrijdag 5 februari 2016 08:14:35 UTC+1 schreef ZyX:
> > >> 2016-02-05 6:00 GMT+03:00 Erik Falor <ewfalor@gmail.com>:
> > >> > On Thu, Feb 04, 2016 at 03:54:40PM -0800, Hashjie wrote:
> > >> >
> > >> >> Whenever I run vim with vim -u NONE
> > >> >
> > >> > That's your problem right there. -u skips many of Vim's regular
> > >> > initializations, including loading [autoloaded] plugins. That is why
> > >> > Vim does not recognize the function pathogen#infect().
> > >>
> > >> This is not correct. `-u NONE` tells Vim to read no initialization
> > >> files, as well as plugins. This will not disable autoloading, so one
> > >> *still* may do `:execute pathogen#infect()` after starting Vim or in
> > >> e.g. --cmd (it *will* work on that early stage because &runtimepath
> > >> would already be initialized to contain ~/.vim and this is *all* one
> > >> needs to make autoloading work). But -u NONE will require to do this
> > >> explicitly (done by OP by using :so) and will also set &loadplugins to
> > >> zero which makes calling pathogen rather pointless.
> > >>
> > >> OP should have different problem, -u NONE is not disabling autoloading
> > >> functionality.
> > >>
> > >> I would ask him to check pathogen.vim contents and whether it can be
> > >> sourced with explicit `:source ~/.vim/autoload/pathogen.vim`.
> > >>
> > >> >
> > >> > You can see which scripts Vim has loaded with :scriptnames
> > >> >
> > >> > These help file entries will explain things further:
> > >> >
> > >> > :help -u
> > >> > :help --noplugins
> > >> >
> > >> > --
> > >> > Erik Falor
> > >> > Registered Linux User #445632 http://unnovative.net
> > >> >
> > >> > --
> > >> > --
> > >> > You received this message from the "vim_use" maillist.
> > >> > Do not top-post! Type your reply below the text you are replying to.
> > >> > For more information, visit http://www.vim.org/maillist.php
> > >> >
> > >> > ---
> > >> > You received this message because you are subscribed to the Google Groups "vim_use" group.
> > >> > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> > >> > For more options, visit https://groups.google.com/d/optout.
> > >
> > > I'm not exactly sure what I have to check in the contents of my pathogen.vim I've used curl -L to download it from github into my autoload directory so I suspect it to be valid. I'll try to find out if anything is wrong with the file.
> > >
> > > I've done a vim -u NONE and after that :source ~/.vim/autoload/pathogen.vim
> > > after that I've typed :scriptnames and the second entry showed me that pathogen.vim was loaded. I ran :execute pathogen#infect() and it didn't show me any errors. However, I still couldn't use NERDTreeFind it said not an editor command. Seems like the errors have dissapeared after sourcing pathogen.vim but it still doesn't seem to recognize any plugins.
> >
> > You should not need to source pathogen.vim. But with -u NONE absense
> > of NERDTreeFind is exactly what you requested: plugins are not loaded.
> >
> > I also do not know pathogen, but if you run `execute
> > pathogen#infect()` *after* Vim was started then plugins *are not
> > loaded by Vim*. VAM in this case sources plugins itself, some other
> > plugin managers do the same thing AFAIK. But at least VAM in your case
> > do not load plugins if &loadplugins is false, and it is false with -u
> > NONE.
> >
>
> Okay, so I've started vim regularly and typed :scriptnames and this is what it showed:
>
> 1: /usr/share/vim/vimrc
> 2: /usr/share/vim/vim74/debian.vim
> 3: /usr/share/vim/vim74/syntax/syntax.vim
> 4: /usr/share/vim/vim74/syntax/synload.vim
> 5: /usr/share/vim/vim74/syntax/syncolor.vim
> 6: /usr/share/vim/vim74/filetype.vim
> 7: ~/.vimrc
> 8: ~/.vim/autoload/pathogen.vim
> 9: /usr/share/vim/vim74/ftoff.vim
> 10: /usr/share/vim/vim74/syntax/nosyntax.vim
> 11: /usr/share/vim/vim74/ftplugin.vim
> 12: /usr/share/vim/vim74/indent.vim
> 13: /usr/share/vim/vim74/plugin/getscriptPlugin.vim
> 14: /usr/share/vim/vim74/plugin/gzip.vim
> 15: /usr/share/vim/vim74/plugin/matchparen.vim
> 16: /usr/share/vim/vim74/plugin/netrwPlugin.vim
> 17: /usr/share/vim/vim74/plugin/rrhelper.vim
> 18: /usr/share/vim/vim74/plugin/spellfile.vim
> 19: /usr/share/vim/vim74/plugin/tarPlugin.vim
> 20: /usr/share/vim/vim74/plugin/tohtml.vim
> 21: /usr/share/vim/vim74/plugin/vimballPlugin.vim
> 22: /usr/share/vim/vim74/plugin/zipPlugin.vim
>
> :echo &loadplugins displayed 1
> I still am unable to use :NERDTreeFind

So it does not show anything below ~/.vim/bundle
That is most certainly wrong. What is your runtimepath setting?
:set rtp?

Best,
Christian

--
Abschied ist die innigste Weise menschlichen Zusammenseins.
-- Hans Kudszus

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: