Color Scheme in VIMRC

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

Color Scheme in VIMRC

R. shankar
Hi All,
  I want my default color scheme to be oceandeep.

  I do it by setting
     "colors oceandeep"
  in my .vimrc (ofcourse without quotes)

  But whenever I open vim, vim takes color scheme keohler by default.
  I do not know from where it picks up.
  What is the order of picking the color schemes.


  The same is the case with syn off.
  I my .vimrc I select "syn off", but whenever I open vim, the syntax colouring is always on.
  I do not where from vim picks the syntax to be on.

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

Re: Color Scheme in VIMRC

A.J.Mechelynck
----- Original Message -----
From: "R. shankar" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, July 20, 2005 6:19 AM
Subject: Color Scheme in VIMRC


> Hi All,
>  I want my default color scheme to be oceandeep.
>
>  I do it by setting
>     "colors oceandeep"
>  in my .vimrc (ofcourse without quotes)
>
>  But whenever I open vim, vim takes color scheme keohler by default.
>  I do not know from where it picks up.
>  What is the order of picking the color schemes.
>
>
>  The same is the case with syn off.
>  I my .vimrc I select "syn off", but whenever I open vim, the syntax
> colouring is always on.
>  I do not where from vim picks the syntax to be on.
>
> Regards,
> shankar

The colorscheme in effect is whichever one was called last.

Look at the output of the ":scriptnames" command: find the keohler color
scheme. The most likely culprits are the few scripts above it in the list,
unless it is called by means of an autocommand (in which case you could try
looking in the output of ":autocmd" for a line mentioning it). To use Vim
search on the outputs of these commands, use the ":redir" command, i.e.,
starting with an empty buffer:

    :let save_more = &more
    :set nomore
    :redir @@
    :scriptnames
    :autocmd
    :redir END
    :let &more = save_more
    :unlet save_more
    P
    gg
    /keohler

(P above is the normal-mode "put before": type it at the keyboard with no
colon and no <Enter>. Similarly for gg.)

see
    :help :scriptnames
    :help :autocmd
    :help :redir
    :help :let-@

HTH,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: Color Scheme in VIMRC

R. shankar
Thanks Tony,
   It worked.
   I had koehler.vim in my plugin directory.
   In the order of files which it was sourcing it sourced .vimrc first and then picked up -
   koehler.vim from the plugin dir.
   This explains the problem. After removing the koehler.vim from the plugin dir,
   I can select from the colorscheme from the .vimrc file.

Thanks,
Shankar


> ----- Original Message -----
> From: "R. shankar" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, July 20, 2005 6:19 AM
> Subject: Color Scheme in VIMRC
>
> > Hi All,
> >  I want my default color scheme to be oceandeep.
> >
> >  I do it by setting
> >     "colors oceandeep"
> >  in my .vimrc (ofcourse without quotes)
> >
> >  But whenever I open vim, vim takes color scheme keohler by default.
> >  I do not know from where it picks up.
> >  What is the order of picking the color schemes.
> >
> >
> >  The same is the case with syn off.
> >  I my .vimrc I select "syn off", but whenever I open vim, the syntax
> > colouring is always on.
> >  I do not where from vim picks the syntax to be on.
> >
> > Regards,
> > shankar
>
> The colorscheme in effect is whichever one was called last.
>
> Look at the output of the ":scriptnames" command: find the keohler color
> scheme. The most likely culprits are the few scripts above it in the list,
> unless it is called by means of an autocommand (in which case you could try
> looking in the output of ":autocmd" for a line mentioning it). To use Vim
> search on the outputs of these commands, use the ":redir" command, i.e.,
> starting with an empty buffer:
>
>     :let save_more = &more
>     :set nomore
>     :redir @@
>     :scriptnames
>     :autocmd
>     :redir END
>     :let &more = save_more
>     :unlet save_more
>     P
>     gg
>     /keohler
>
> (P above is the normal-mode "put before": type it at the keyboard with no
> colon and no <Enter>. Similarly for gg.)
>
> see
>     :help :scriptnames
>     :help :autocmd
>     :help :redir
>     :help :let-@
>
> HTH,
> Tony.

--
R.SHANKAR , MTS, TRANSWITCH
Flat No 2, First Floor, House No. 212A/1 C/o, R.S.Rana,
Baba Ganga Nath Market, Near community Hall,
Munirka Village New Delhi . PIN : 110067
PH(OFFICE): +(91)(11)26165111, Mobile: 9899125114
PH(RES): (91)(11)26161875
Email: [hidden email], [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Color Scheme in VIMRC

A.J.Mechelynck
----- Original Message -----
From: "R. shankar" <[hidden email]>
To: "Tony Mechelynck" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, July 20, 2005 3:16 PM
Subject: Re: Color Scheme in VIMRC


> Thanks Tony,
>   It worked.
>   I had koehler.vim in my plugin directory.
>   In the order of files which it was sourcing it sourced .vimrc first and
> then picked up -
>   koehler.vim from the plugin dir.
>   This explains the problem. After removing the koehler.vim from the
> plugin dir,
>   I can select from the colorscheme from the .vimrc file.
>
> Thanks,
> Shankar

Ah, yes: _everything_ in the plugin directory is always sourced, and that
after the vimrc. Colorschemes should be in the colors/ subdirectory, not the
plugin/ subdirectory, of a directory in 'runtimepath'.

Best regards,
Tony.