POV-Ray : Newsgroups : povray.binaries.utilities : updated syntax highlighting for gedit Server Time: 17 Jan 2019 02:54:19 GMT
  updated syntax highlighting for gedit (Message 1 to 7 of 7)  
From: James Holsenback
Subject: updated syntax highlighting for gedit
Date: 18 Jul 2015 11:21:50
Message: <55aa36ce$1@news.povray.org>
found that i was missing the albedo keyword, also added max_distance 
(uberpov) ... goes in /usr/share/gtksourceview-3.0/language-specs


Post a reply to this message


Attachments:
Download 'povsyntax37.tar.gz' (4 KB)

From: zebulon
Subject: Re: updated syntax highlighting for gedit
Date: 21 Aug 2015 10:40:00
Message: <web.55d6ff2e743848b4883859310@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> found that i was missing the albedo keyword, also added max_distance
> (uberpov) ... goes in /usr/share/gtksourceview-3.0/language-specs

Hi,

This is a very interesting idea... I use Debian, so I would this .lang file too.

But, it's impossible for me to decompress any of the tar.gz you posted. I always
have this errors :

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Could you add a link to pastebin.org, so we could just copy/past this xml file ?

Regards,


Post a reply to this message


Attachments:
Download 'capture-fenêtre sans nom.png' (0 KB)

From: zebulon
Subject: Re: updated syntax highlighting for gedit
Date: 23 Aug 2015 15:30:00
Message: <web.55d9e6c9743848b4883859310@news.povray.org>
"zebulon" <nomail@nomail> wrote:
> James Holsenback <nom### [at] nonecom> wrote:
> > found that i was missing the albedo keyword, also added max_distance
> > (uberpov) ... goes in /usr/share/gtksourceview-3.0/language-specs
>
> Hi,
>
> This is a very interesting idea... I use Debian, so I would this .lang file too.
>
> But, it's impossible for me to decompress any of the tar.gz you posted. I always
> have this errors :
>
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Exiting with failure status due to previous errors
>
> Could you add a link to pastebin.org, so we could just copy/past this xml file ?
>
> Regards,

Hi again,

I think I solved my attachements download problem: instead of just clicking on
the link to download the tar.gz file -- which download an unusable archive only,
I used the link in a wget command line :
$ wget
http://news.povray.org/povray.binaries.utilities/attachment/%3C55aa36ce%241%40news.povray.org%3E/povsyntax37.tar.gz
.... and this tar.gz can be read/open normally (I can even know the real
name/size of the file archived: povray.lang, 17.7KB).

I'm sorry, this method will work only for unixes system, but I know there exists
wget.exe for windows (so windows users can use this command line in a CMD CLI
window. There exists too a better shell "MSys" which is a portage of many GNU
commands -- plus a rxvt-like console. With it, you can write/use your prefered
sh/bash scripts in windows.


Post a reply to this message


Attachments:
Download 'capture-povsyntax37.tar.gz .jpg' (23 KB)

Preview of image 'capture-povsyntax37.tar.gz .jpg'
capture-povsyntax37.tar.gz .jpg


 

From: zebulon
Subject: Re: updated syntax highlighting for gedit
Date: 24 Aug 2015 09:05:01
Message: <web.55daddc5743848b4883859310@news.povray.org>
"zebulon" <nomail@nomail> wrote:
> "zebulon" <nomail@nomail> wrote:
> > ...
> > Could you add a link to pastebin.org, so we could just copy/past this xml file ?
> > ...

Hi again,

I added a link to pastebin... since I can now read the file, maybe some people
will prefer copy/past the file content.

http://pastebin.com/P23Yk1KL

Cheers,


Post a reply to this message

From: LanuHum
Subject: Re: updated syntax highlighting for gedit
Date: 24 Aug 2015 19:10:01
Message: <web.55db6b92743848b47a3e03fe0@news.povray.org>
I am user of KDE. I established Gedit. At a click to the file: to open in:
Gedit...
The file opens without  syntax highlighting. Further it is necessary to go to
settings and to include  syntax highlighting. And, so every time. It very much
depresses.
Besides, Gedit - text editor. Who uses it? I use Geany. It is IDE. It is direct
access to Povray: I wrote, I pressed the button, I saw...
Gnome3 - very bad DE in Linux for Povray (also and for 3D). Gnome3 - very good
for Tamagoch and Internet bla-bla-bla...
Sorry!


Post a reply to this message


Attachments:
Download 'geany.jpg' (391 KB)

Preview of image 'geany.jpg'
geany.jpg


 

From: zebulon
Subject: Re: updated syntax highlighting for gedit
Date: 29 Aug 2015 10:05:00
Message: <web.55e18338743848b4883859310@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> found that i was missing the albedo keyword, also added max_distance
> (uberpov) ... goes in /usr/share/gtksourceview-3.0/language-specs

Hi James Holsenback,

After downloading and using your file... I noticed a few things :
#ifdef & #ifndef are colored only on '#if' part, because 'if' has been defined
before 'ifdef' 'ifndef' -- I sorted the keywords (longest first / shortest
last):
ifndef
ifdef
if
instead of 'if', 'ifdef', 'indef'. So 'ifdef' and 'ifndef' are full colored now.
I did the same with some other keywords.

I have, too, added all keywords (as constants) & macros (as functions) from the
povray default includes. They were missing, imho.

New pastebin:
"povray 3.7 syntax highlighting for gtk + includes"
http://pastebin.com/7c2Chx24

I changed in your previous title Gedit->gtk, because this syntax hilightining is
not only for Gedit, but works with all text editors using gtk gadgetery and
syntax hilighting. For example, I use Debian, Mate desktop (fork of Gnome2). The
text editor is Pluma (fork of Gedit). I can use this color file too.


Post a reply to this message

From: zebulon
Subject: Re: updated syntax highlighting for gedit
Date: 27 Jul 2016 16:30:00
Message: <web.5798dfcb743848b4883859310@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> I am user of KDE. I established Gedit. At a click to the file: to open in:
> Gedit...
> The file opens without  syntax highlighting. Further it is necessary to go to
> settings and to include  syntax highlighting. And, so every time. It very much
> depresses.
> Besides, Gedit - text editor. Who uses it? I use Geany. It is IDE. It is direct
> access to Povray: I wrote, I pressed the button, I saw...
> Gnome3 - very bad DE in Linux for Povray (also and for 3D). Gnome3 - very good
> for Tamagoch and Internet bla-bla-bla...
> Sorry!

Hi LanuHum,

Sorry for the late reply, but I do not come frequently to check this page. I'm a
very busy man :\

IMPORTANT: This file syntax highlighting works with all text editors using gtk+
(Gedit in Gnome, Kedit in KDE, Pluma in MATE, and so on...)

So the first thing to do is to close all these open programs (Gedit, KEdit,
Pluma, ...), otherwise the syntax coloring will remain invisible in the menu of
your prefered text editor.

Then do the following:

1) from the pastebin.com link given above, save the xml file as "povray.lang" on
your desktop, for example.
NOTE: This pastebin link has infinite lifetime. So you can come back later if
you want, the file will always be there.

2) copy or move (as root) povray.lang in
"/usr/share/gtksourceview-3.0/language-specs/"

That's all, to install the file.
Now, syntax highlighting should appear in the menu of your text editor, here:
"Display / Color Mode / Others / POV-Ray 3.7"

IMPORTANT: colorization files is not automatic. You have to select the
colorization you want on each first opening the file. After this, the file will
always be opened with the syntax highlighting you have chosen for it.
If you reinstall you system or destroy your /home, you will have to do this all
again.

I hope I have helped you enough ;)

The attached snapshot shows povray.lang installed + color syntax in Pluma (MATE
desktop, Debian "stretch")


Post a reply to this message


Attachments:
Download 'capture du 2016-07-27 17-19-20.jpg' (215 KB)

Preview of image 'capture du 2016-07-27 17-19-20.jpg'
capture du 2016-07-27 17-19-20.jpg


 

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