Plugin not loaded.

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Plugin not loaded.

R. shankar
Hi,
I am working under Red Hat Linux.
I see that the plugins are not getting loaded.

While opening any file I get following message -
=========================================================
rgobi@ridhi:/home/rgobi/.vim/plugin> vim project.vim
No Syntax items defined for this buffer
Hit ENTER or type command to continue
=========================================================


I tried to find out why plugins are not getting it loaded.
I hacked the plugin files to put some echo messages as shown below -
=============================
echo "PROJECT GETTING LOADED"
if exists('loaded_project') || &cp
  echo "OOPS it is already loaded"
  finish
endif
echo "PROJECT LOADING FINISHED"
=============================


But when I opened VIM this is what I got.
====================================
rgobi@ridhi:/home/rgobi/.vim/plugin> /tool/gnu/vim/Linux/6.3/bin/vim -u NORC
PROJECT GETTING LOADED
OOPS it is already loaded
Hit ENTER or type command to continue
======================================


This clearly indicates 2 things -
VIM can find the plugin.
But it does not get loaded.
How come when I invoke the vim, already the variable exists and the plugin is not loaded.


Any clues.

Thanks & Regards,
shankar
Reply | Threaded
Open this post in threaded view
|

Re: Plugin not loaded.

A.J.Mechelynck
----- Original Message -----
From: "R. shankar" <[hidden email]>
To: <[hidden email]>
Sent: Monday, August 22, 2005 2:38 PM
Subject: Plugin not loaded.


> Hi,
> I am working under Red Hat Linux.
> I see that the plugins are not getting loaded.
>
> While opening any file I get following message -
> =========================================================
> rgobi@ridhi:/home/rgobi/.vim/plugin> vim project.vim
> No Syntax items defined for this buffer
> Hit ENTER or type command to continue
> =========================================================
>
>
> I tried to find out why plugins are not getting it loaded.
> I hacked the plugin files to put some echo messages as shown below -
> =============================
> echo "PROJECT GETTING LOADED"
> if exists('loaded_project') || &cp
>  echo "OOPS it is already loaded"
>  finish
> endif
> echo "PROJECT LOADING FINISHED"
> =============================
>
>
> But when I opened VIM this is what I got.
> ====================================
> rgobi@ridhi:/home/rgobi/.vim/plugin> /tool/gnu/vim/Linux/6.3/bin/vim -u
> NORC
> PROJECT GETTING LOADED
> OOPS it is already loaded
> Hit ENTER or type command to continue
> ======================================
>
>
> This clearly indicates 2 things -
> VIM can find the plugin.
> But it does not get loaded.
> How come when I invoke the vim, already the variable exists and the plugin
> is not loaded.
>
>
> Any clues.
>
> Thanks & Regards,
> shankar

Are you sure 'compatible' is not set? If you have no ~/.vimrc it will be; in
that case you can unset it by creating a zero-length ~+.vimrc

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Plugin not loaded.

R. shankar
Tony Mechelynck wrote:

>
> ----- Original Message -----
> From: "R. shankar" <[hidden email]>
> To: <[hidden email]>
> Sent: Monday, August 22, 2005 2:38 PM
> Subject: Plugin not loaded.
>
> > Hi,
> > I am working under Red Hat Linux.
> > I see that the plugins are not getting loaded.
> >
> > While opening any file I get following message -
> > =========================================================
> > rgobi@ridhi:/home/rgobi/.vim/plugin> vim project.vim
> > No Syntax items defined for this buffer
> > Hit ENTER or type command to continue
> > =========================================================
> >
> >
> > I tried to find out why plugins are not getting it loaded.
> > I hacked the plugin files to put some echo messages as shown below -
> > =============================
> > echo "PROJECT GETTING LOADED"
> > if exists('loaded_project') || &cp
> >  echo "OOPS it is already loaded"
> >  finish
> > endif
> > echo "PROJECT LOADING FINISHED"
> > =============================
> >
> >
> > But when I opened VIM this is what I got.
> > ====================================
> > rgobi@ridhi:/home/rgobi/.vim/plugin> /tool/gnu/vim/Linux/6.3/bin/vim -u
> > NORC
> > PROJECT GETTING LOADED
> > OOPS it is already loaded
> > Hit ENTER or type command to continue
> > ======================================
> >
> >
> > This clearly indicates 2 things -
> > VIM can find the plugin.
> > But it does not get loaded.
> > How come when I invoke the vim, already the variable exists and the plugin
> > is not loaded.
> >
> >
> > Any clues.
> >
> > Thanks & Regards,
> > shankar
>
> Are you sure 'compatible' is not set? If you have no ~/.vimrc it will be; in
> that case you can unset it by creating a zero-length ~+.vimrc
>


Hi Tony,
   You have hit the point exactly.
   "set nocomptible" was not in my .vimrc.
   I also noticed that while editing VIM behaved like vi, butI ignored to mention it.

   One problem solved. But there is one problem which has cropped up.
   The VIM does not detect the filetype and set the 'ft' variable is not set.
   Because of this, my filetype based plugins does not get loaded.
 
   Any clues or any experiments.

Regards,
shankar
Reply | Threaded
Open this post in threaded view
|

Re: Plugin not loaded.

Charles E Campbell Jr
Quoting "R. shankar" <[hidden email]>:

>    One problem solved. But there is one problem which has cropped up.
>    The VIM does not detect the filetype and set the 'ft' variable is not set.
>    Because of this, my filetype based plugins does not get loaded.

May I suggest putting at the top of your <.vimrc>:

"  Initialize:
set nocp
if version >= 600
  filetype plugin indent on
endif

Regards,
Chip Campbell

Reply | Threaded
Open this post in threaded view
|

Re: Plugin not loaded.

A.J.Mechelynck
In reply to this post by R. shankar
----- Original Message -----
From: "R. shankar" <[hidden email]>
Cc: <[hidden email]>
Sent: Monday, August 22, 2005 3:56 PM
Subject: Re: Plugin not loaded.
[...]

> Hi Tony,
>   You have hit the point exactly.
>   "set nocomptible" was not in my .vimrc.
>   I also noticed that while editing VIM behaved like vi, butI ignored to
> mention it.
>
>   One problem solved. But there is one problem which has cropped up.
>   The VIM does not detect the filetype and set the 'ft' variable is not
> set.
>   Because of this, my filetype based plugins does not get loaded.
>
>   Any clues or any experiments.
>
> Regards,
> shankar

Add either
    filetype plugin on
or
    source $VIMRUNTIME/vimrc_example.vim
to your vimrc.

I recommend the latter, but the former is enough to detect file type and
load filetype-plugins.


Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Plugin not loaded.

R. shankar
Tony Mechelynck wrote:

>
> ----- Original Message -----
> From: "R. shankar" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Monday, August 22, 2005 3:56 PM
> Subject: Re: Plugin not loaded.
> [...]
>
> > Hi Tony,
> >   You have hit the point exactly.
> >   "set nocomptible" was not in my .vimrc.
> >   I also noticed that while editing VIM behaved like vi, butI ignored to
> > mention it.
> >
> >   One problem solved. But there is one problem which has cropped up.
> >   The VIM does not detect the filetype and set the 'ft' variable is not
> > set.
> >   Because of this, my filetype based plugins does not get loaded.
> >
> >   Any clues or any experiments.
> >
> > Regards,
> > shankar
>
> Add either
>     filetype plugin on
> or
>     source $VIMRUNTIME/vimrc_example.vim
> to your vimrc.
>
> I recommend the latter, but the former is enough to detect file type and
> load filetype-plugins.
>
> Best regards,
> Tony.

Oh, yes. I forgot this.
Thanks to Dr.Chip and Tony for solving the problems.

Regards,
shankar