POV-Ray : Newsgroups : povray.unix : VIM syntax highlighting and .inc files Server Time
28 Jul 2024 14:29:07 EDT (-0400)
  VIM syntax highlighting and .inc files (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Mark M  Wilson
Subject: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:20:54
Message: <3C054765.504D6785@ncsl.dcr.state.nc.us>
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?

--Mark M. Wilson


Post a reply to this message

From: Jon A  Cruz
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:33:09
Message: <3C0549EC.5E3C2B8A@geocities.com>
"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: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 15:39:36
Message: <3C054BC6.7887FFF7@ncsl.dcr.state.nc.us>
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!
I'd rather spend my time on my actual project, but thanks.  (It's one of
those suggestions that I know would ideally be better for me in the long
run, but I'm just not at that place right now...)

--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:40:22
Message: <slrna0aito.pu4.ron.parker@fwi.com>
On Wed, 28 Nov 2001 15:40:38 -0500, Mark M. Wilson 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!

Who said anything about Perl?

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

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

Goto Latest 10 Messages Next 10 Messages >>>

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