Friday, February 5, 2016

Re: Pathogen doesn't seem to work

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.

>
> --
> --
> 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.

--
--
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:

Post a Comment