LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-29-2003, 03:06 PM   #1
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Redhat: vi keyword highlights


Not a problem as such just a query if anyone knows:

I use vi now and again for text editing. I recently installed POVRay on RH8. It's a text file command based raytracing program (anybody use it?). Anyway... I use vi to create some sample scenes and I notice that some POVRAY specific keywords actually highlight in vi as if they are recognised words. How would Redhat or the shell know about that? Is there a central depository for keywords stored somewhere?
 
Old 04-29-2003, 03:40 PM   #2
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
I think what you are probably using is actually Vim, since plain old Vi is not capable (at least, as far as I know) of doing syntax highlighting. Vi is often aliased to Vim, since it's better

As for how it knows... I am constantly amazed at how many language syntaxes Vim knows about. (Yes, I'm very familiar with POVRay by the way - great software!)

I don't know too much about how it works, but if you type:

:help syntax

in Vi/Vim (note the colon before help), it'll give you some info (if the documentation is installed) on how it does syntax highlighting, where the syntax files are stored, how to create your own, etc. Pretty cool stuff!
 
Old 04-29-2003, 03:42 PM   #3
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
p.s. - Your installation may be diffrent, but I just found all the syntax files on my system. They're in:

/usr/share/vim/syntax/

And yes, pov.vim is one of them
 
Old 04-29-2003, 03:54 PM   #4
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
good shot!

A-ha!

Good one wapcaplet. I thought that was pretty cool. Excellent of the POV crowd to do that. Do you use much of POVRay? Just started it again recently. Basic tutorials really.. the chains etc you know. I'm remember a scene taking 12 hours to compile on a 66Mhz 486DX2.
 
Old 04-29-2003, 06:21 PM   #5
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Hell, the first time I saw POVRay on a 486 I was in utter awe of how fast it rendered. I first used it on a 386SX/16. It took about an hour to render a sphere at 160x120

Haven't used it too much recently. I used it a while back to render some LDraw models (virtual LEGO) and some example pics for Wikipedia. Not much time for it lately. I've been more into Blender lately, but there is some stuff that POVRay is much better at.
 
Old 04-29-2003, 09:08 PM   #6
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
It took about an hour to render a sphere at 160x120
Oh yes, forgot to say it's was a 1024x768 scene that was been rendered. A jack-in-the-box on a themepark railway track. That took about 12 hours. Must see if I can hunt down the .pov file. It was a work of art put on a magazine floppy: PC Format.
 
Old 04-29-2003, 09:39 PM   #7
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Quote:
Originally posted by hamster
That took about 12 hours. Must see if I can hunt down the .pov file.
It'd be fun to try rendering it on today's machines. Probably take a couple of minutes
 
Old 04-29-2003, 09:55 PM   #8
chrismiceli
Member
 
Registered: Aug 2002
Posts: 349

Rep: Reputation: 31
to get rid of the highlighting, before you "insert", just type this
/klajdsf;lajfldkjalkjdflkjalkfjdlkajlkdj

stuff is being highlighted because somehow you searched for that word, searching for something similar to what i posted will make vim look for that word. Since I don't think many documents have /akldfjlk;ajfdlkjalkfd in them, i think you should be safe with that.
 
Old 04-30-2003, 06:27 AM   #9
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Quote:
Originally posted by chrismiceli
to get rid of the highlighting, before you "insert", just type this
/klajdsf;lajfldkjalkjdflkjalkfjdlkajlkdj
Actually the highlighting we're talking about is the coloring of keywords and stuff to make it easier to read.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox menubar highlights - blank? haertig Linux - Software 2 11-05-2005 07:53 PM
white highlights in firefox menus synaptical Linux - Software 1 06-14-2005 03:11 PM
java debugger that highlights code as its executed darkRoom Programming 3 09-29-2004 07:52 PM
Highlights on Menus: text = white, background = grey GexNZ Linux - Software 1 07-31-2004 11:41 PM
how to turn OFF syntax highlights when printing? PTBmilo Linux - Software 3 03-18-2003 12:32 AM


All times are GMT -5. The time now is 01:27 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration