WolfgangMehner / vim-plugins

Vim plug-ins which offer support for various programming languages.
414 stars 96 forks source link

Perl-support: Crashes at startup giving the following error in gvim #34

Closed dileepkr closed 8 years ago

dileepkr commented 8 years ago

The Perl support crashes in my vim giving below error, I have tried installing the way metioned in the website as well as using Vundle for Vim. The error is:

_Error detected while processing ~/.vim/bundle/perl-support/ftplugin/perl.vim: line 37: E117: Unknown function: Perl_SetMapLeader line 52: E117: Unknown function: PerlResetMapLeader

Am I doing anything wrong during installation?

Thanks, Dileep.

WolfgangMehner commented 8 years ago

Do you see the "Perl" menu (in gVim)? What is the output of this command, on the Vim command-line:

:call Perl_Settings(2)

Is there a file ~/.vim/bundle/perl-support/plugin/perl-support.vim ?

dileepkr commented 8 years ago

I do not see the Perl menu when I open a .pl file, when I open .pl I get the above mentioned error.

when I did :call Perl_Settings(2) I got the below message E117: Unknown function: Perl_Settings

I do see the perl-support.vim at ~/.vim/bundle/perl-support/plugin/perl-support.vim

I am using vim 7.4 to do all of the above.

WolfgangMehner commented 8 years ago

So Perl-Support is there but is not loaded properly, which is a bit puzzling. Could you please run to following command:

:scriptnames

It lists all plug-ins which were loaded by Vim. Does the list contain .../plugin/perl-support.vim ?

Also, please run this, it might help me understand what is going on:

:echo g:Perl_PluginVersion
dileepkr commented 8 years ago

:scriptnames just shows following ones for perl support. ~/.vim/plugged/perl-support/ftdetect/template.vim ~/.vim/plugged/perl-support/ftplugin/perl.vim

:echo g:Perl_PluginVersion gave: E121: Undefined variable: g:Perl_PluginVersion E15: Invalid expression: g:Perl_PluginVersion

Thanks for the replies :)

dileepkr commented 8 years ago

sorry, I do see these also (after doing :PlugUpdate everytime I open gvim): 68: ~/.vim/plugged/perl-support/plugin/perl-support.vim 69: ~/.vim/plugged/perl-support/autoload/mmtemplates/config.vim 70: ~/.vim/plugged/perl-support/autoload/mmtoolbox/tools.vim 71: ~/.vim/plugged/perl-support/autoload/mmtoolbox/make.vim

dileepkr commented 8 years ago

oh this problem seems wierd.. I used vim plug to install perl-support again and when I open a perl script in gvim the problem exists, but

  1. I run :PlugUpdate - updates all plugins
  2. do a vsp on a perl script, then PERL support comes back and WORKS .

But when I open *.pl directly from terminal in gvim perl, I still get the same error.

dileepkr commented 8 years ago

Finally found a solution for the issue.

I had to keep my vim plug plugins in .vimrc instead of .gvimrc . Once I did that the issue got solved.

Thank you for the help.

WolfgangMehner commented 8 years ago

Nice to hear that. Happy Vim'ing.