POV-Ray : Newsgroups : povray.unix : VIM syntax highlighting and .inc files Server Time
28 Jul 2024 18:13:48 EDT (-0400)
  VIM syntax highlighting and .inc files (Message 5 to 14 of 24)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:43:16
Message: <3C054CA3.F1EE1612@ncsl.dcr.state.nc.us>
Also, I believe I remember correctly that gvim (which runs under X)
/does/ treat .inc files like .pov files, so the answer is probably not
too far away...  I'm trying to get myself 'weaned' from dependence on a
GUI, but I'm taking it one step at a time.

--Mark 

"Jon A. Cruz" wrote:
> 
> "Mark M. Wilson" wrote:
> 
> > Does any one who uses vim know how to get it to use the same povray
> > syntax color scheme for .inc files as for .pov files?
> 
> Ummm....
> 
> just switch to emacs and the POV-Ray mode?
> 
> /me ducks
> 
> --
> Jon A. Cruz
> http://www.geocities.com/joncruz/action.html
> A world without string is Chaos. - R. Smuntz


Post a reply to this message

From: Ron Parker
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:43:55
Message: <slrna0aj4d.puv.ron.parker@fwi.com>
On Wed, 28 Nov 2001 15:21:57 -0500, Mark M. Wilson wrote:
> Does any one who uses vim know how to get it to use the same povray
> syntax color scheme for .inc files as for .pov files?  When editing my
> .pov files at a console (Debian Linux, BTW) I get my colors, but when
> editing my own custom .inc files, I just get the usual light grey text
> and black background.  Is there some config file I can edit to get vim
> to recognize that .inc files should be treated the same as .pov?

/usr/share/vim/syntax/syntax.vim should contain lines that look like this:

  " Povray
  au BufNewFile,BufRead *.pov,*.inc             so $VIM/syntax/pov.vim

or at least it does on my system.  But I don't use vim, so I don't know 
whether that works. 

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:46:30
Message: <3C054D65.9A7D05A1@ncsl.dcr.state.nc.us>
Great!  Sounds like the right sort of thing! I'm printing your response
out right now so I can take it home to a real computer.  (I'm on a Win98
box at work now, and should of course actually BE working... ;-) )
Many thanks.
--Mark
--

Ron Parker wrote:
> 
> On Wed, 28 Nov 2001 15:21:57 -0500, Mark M. Wilson wrote:
> > Does any one who uses vim know how to get it to use the same povray
> > syntax color scheme for .inc files as for .pov files?  When editing my
> > .pov files at a console (Debian Linux, BTW) I get my colors, but when
> > editing my own custom .inc files, I just get the usual light grey text
> > and black background.  Is there some config file I can edit to get vim
> > to recognize that .inc files should be treated the same as .pov?
> 
> /usr/share/vim/syntax/syntax.vim should contain lines that look like this:
> 
>   " Povray
>   au BufNewFile,BufRead *.pov,*.inc             so $VIM/syntax/pov.vim
> 
> or at least it does on my system.  But I don't use vim, so I don't know
> whether that works.
> 
> --
> #macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
> R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
> _)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
> rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:53:27
Message: <3C054F06.DBEA75E6@ncsl.dcr.state.nc.us>
Here's a possibly dumb idea -- could I create a symlink from the .inc to
the .pov file and 'fool' vim into treating it accordingly?  I.e., ln -s
ceiling.inc ceiling.pov   ?  
--Mark


Ron Parker wrote:
> 
> On Wed, 28 Nov 2001 15:21:57 -0500, Mark M. Wilson wrote:
> > Does any one who uses vim know how to get it to use the same povray
> > syntax color scheme for .inc files as for .pov files?  When editing my
> > .pov files at a console (Debian Linux, BTW) I get my colors, but when
> > editing my own custom .inc files, I just get the usual light grey text
> > and black background.  Is there some config file I can edit to get vim
> > to recognize that .inc files should be treated the same as .pov?
> 
> /usr/share/vim/syntax/syntax.vim should contain lines that look like this:
> 
>   " Povray
>   au BufNewFile,BufRead *.pov,*.inc             so $VIM/syntax/pov.vim
> 
> or at least it does on my system.  But I don't use vim, so I don't know
> whether that works.
> 
> --
> #macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
> R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
> _)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
> rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Ron Parker
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:54:16
Message: <slrna0ajnr.pvg.ron.parker@fwi.com>
On Wed, 28 Nov 2001 15:54:30 -0500, Mark M. Wilson wrote:
> Here's a possibly dumb idea -- could I create a symlink from the .inc to
> the .pov file and 'fool' vim into treating it accordingly?  I.e., ln -s
> ceiling.inc ceiling.pov   ?  
> --Mark

Sure, but why not just call it ceiling.pov then?  It's not as though the
#include statement will care.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:56:02
Message: <3C054FA1.61DA65C3@ncsl.dcr.state.nc.us>
Oh, I didn't know it wouldn't care.... Well, then! That's a camel of a
different gait! ( a little less bumpy ride)
--Mark

Ron Parker wrote:
> 
> On Wed, 28 Nov 2001 15:54:30 -0500, Mark M. Wilson wrote:
> > Here's a possibly dumb idea -- could I create a symlink from the .inc to
> > the .pov file and 'fool' vim into treating it accordingly?  I.e., ln -s
> > ceiling.inc ceiling.pov   ?
> > --Mark
> 
> Sure, but why not just call it ceiling.pov then?  It's not as though the
> #include statement will care.
> 
> --
> #macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
> R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
> _)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
> rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 16:00:50
Message: <3C0550BF.C9B058CD@ncsl.dcr.state.nc.us>
OK, then my next (stupid) question is (you can tell I haven't read that
section of the manual lately):
when making the include statements, if the .pov file (which used to be
the .inc file) is not in the same dir. as all the other .inc files which
come with POVRay, do I explicitly state the path like so:
#include ~/ceiling.pov  

or had I better move the ceiling.pov file to /usr/share/povray where all
the other stuff is?

--Mark

Ron Parker wrote:
> 
> On Wed, 28 Nov 2001 15:54:30 -0500, Mark M. Wilson wrote:
> > Here's a possibly dumb idea -- could I create a symlink from the .inc to
> > the .pov file and 'fool' vim into treating it accordingly?  I.e., ln -s
> > ceiling.inc ceiling.pov   ?
> > --Mark
> 
> Sure, but why not just call it ceiling.pov then?  It's not as though the
> #include statement will care.
> 
> --
> #macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
> R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
> _)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
> rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Warp
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 16:01:53
Message: <3c0550c1@news.povray.org>
Mark M. Wilson <mmw### [at] ncsldcrstatencus> wrote:
: It's one thing to change horses in mid stream; I'm not particularly fond
: of the idea of trading my horse in for a camel, to boot!

meta-x vi-mode

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 16:03:36
Message: <3C055166.6455B898@ncsl.dcr.state.nc.us>
Er, what the h#$@ does that mean? (I'm a newbie)  --MMW

Warp wrote:
> 
> 
> meta-x vi-mode
> 
> --
> #macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
> rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
> ],13),8)-3,10>#end blob{N(array[6]{11117333955,
> 7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Peter Popov
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 16:12:32
Message: <3kka0u0fejvibfq6rg9qtth8lm8lh8n61l@4ax.com>
On Wed, 28 Nov 2001 15:21:57 -0500, "Mark M. Wilson"
<mmw### [at] ncsldcrstatencus> wrote:

>Does any one who uses vim know how to get it to use the same povray
>syntax color scheme for .inc files as for .pov files?

off the top of my head,

:syn pov


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.