POV-Ray : Newsgroups : povray.unix : VIM syntax highlighting and .inc files Server Time
28 Jul 2024 18:22:11 EDT (-0400)
  VIM syntax highlighting and .inc files (Message 21 to 24 of 24)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Steve
Subject: Re: VIM syntax highlighting and .inc files
Date: 28 Nov 2001 18:46:49
Message: <slrna0atoo.890.steve@zero-pps.localdomain>
Make a copy of filetype.vim before you go making the
changes, it might come in handy if you mess up while
editing. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 11:44pm  up 51 days, 15:29,  1 user,  load average: 1.00, 1.00, 1.02


Post a reply to this message

From: Mark M  Wilson
Subject: Re: VIM syntax highlighting and .inc files
Date: 29 Nov 2001 22:57:52
Message: <3c0703c0@news.povray.org>
Thanks!  I did something like what you suggested, and added the line:
set ft=inc 
right under the previous line, where it said set ft=pov
and that seems to have done the trick just fine.

--Mark


Post a reply to this message

From: Anthony Thyssen
Subject: Re: VIM syntax highlighting and .inc files
Date: 9 Jul 2002 10:27:35
Message: <3D2AF312.CFDEFDF8@cit.gu.edu.au>
Adrien Beau 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?  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?
> 
> This perhaps depends of the version of Vim you are using.
> Use :version to see which one you have. My answer should
> work at least for Vim 5.8 and 6.0.
> 
> So, is there any config file you can edit?
> 
> Yes, there is, and the file is $VIMRUNTIME/filetype.vim
> (that is, e.g, /usr/local/share/vim/vim58/filetype.vim).
> 
> Searching for the word "pov" in that file (with "/pov")
> leads us to these lines:
> 
> " Povray
> au BufNewFile,BufRead *.pov                     set ft=pov
> ...
> " Povray or IA64
> au BufNewFile,BufRead *.inc                     set ft=pov
> 
> Brutal but efficient. Hope this helps.
> 

Applogies for replying 6 months later to this problem, but as a fairly
heavy
user of vi and vim, and no one coming up with the better solutions, I
had to
say something..

First DO NOT EDIT "filetype.vim", you are asking for trouble with
upgrades.

Instead add that line to your ".vimrc" file in your home directory.

If you have other types of ".inc" files you can also add to your  povray
scene files the comment
   // vim:set syntax=pov:

This line must be either within the first five lines of either the top
or
the bottom of your ".inc" file.  I use this a alot on "unusal" files,
and work very well in telling vim just what syntax highlighing it should
use, in unusal cases.

  Anthony Thyssen ( System Programmer )   
http://www.sct.gu.edu.au/~anthony/

-----------------------------------------------------------------------------
    The Number of the Editor --  Vi Vi Vi

-----------------------------------------------------------------------------
     PGP Public Key available -- finger -l ant### [at] lyrchcitgueduau


Post a reply to this message

From: Florian Pesth
Subject: Re: VIM syntax highlighting and .inc files
Date: 9 Jul 2002 10:55:19
Message: <3d2af957$1@news.povray.org>
Oh I missed that thread! I have asked a similar question in reply to a
thread in povray.programming, but got no answer. BTW is it possible with
emacs to export the syntax highlighting into an HTML file? IMO this is the
main argument vor using vim instead of emacs. (I have also Windows versions
of both editors installed. Works well! So this is not a "unix" specific
topic.)
Regards,
Florian


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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