www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Simple GEdit .lang & github color scheme

reply "F i L" <witte2008 gmail.com> writes:
After being annoyed with GEdit's presentation of D code, I
decided to do something about it. This isn't any big
"Announcement" or anything, just thought I'd share.

I made a color-scheme based on the colors from Github cause
they're pretty and D loves github :). And I modified the the
'lang.d' gtk-sourceview file in the following ways:

-  property/ system/etc are properly highlighted
- I included common types like 'string', 'size_t', 'c_long', &
even core.simd's vector types like 'float4'.
- Since D follows camelCaseSyntax consistently and the community
seems to largely follow it as well, I made all words starting
with a capital letter (PascalCase) colored as types. This is nice
because user-types blend in nicely with built-in ones
(int/float/etc) and helps you pick out where the code is dealing
with a Type rather than a local.


Screenshot: http://reign-studios.com/screenshots/DlangGedit.png
Download:
http://reign-studios.com/d-downloads/gtksourceview-3.0.tar.gz
Sep 08 2012
next sibling parent reply "angel" <andrey.gelman gmail.com> writes:
Both your links are seemingly dead.
Sep 10 2012
parent reply "F i L" <witte2008 gmail.com> writes:
On Monday, 10 September 2012 at 19:32:42 UTC, angel wrote:
 Both your links are seemingly dead.
Odd, they work for me :-/
Sep 10 2012
parent "Maxim Fomin" <maxim maxim-fomin.ru> writes:
On Tuesday, 11 September 2012 at 00:51:34 UTC, F i L wrote:
 On Monday, 10 September 2012 at 19:32:42 UTC, angel wrote:
 Both your links are seemingly dead.
Odd, they work for me :-/
Now they do, but yesterday didn't.
Sep 10 2012
prev sibling next sibling parent "F i L" <witte2008 gmail.com> writes:
Little update:

- float numbers without '.f' (eg, 1f, 234f, etc) are colored like 
numbers
- Capatalized identifiers with preceding underscores are still 
colored like types (except for __FILE__, __LINE__, etc)

Same Download link as above:
http://reign-studios.com/d-downloads/gtksourceview-3.0.tar.gz
Sep 11 2012
prev sibling parent reply deadalnix <deadalnix gmail.com> writes:
Le 09/09/2012 08:17, F i L a écrit :
 After being annoyed with GEdit's presentation of D code, I
 decided to do something about it. This isn't any big
 "Announcement" or anything, just thought I'd share.

 I made a color-scheme based on the colors from Github cause
 they're pretty and D loves github :). And I modified the the
 'lang.d' gtk-sourceview file in the following ways:

 -  property/ system/etc are properly highlighted
 - I included common types like 'string', 'size_t', 'c_long', &
 even core.simd's vector types like 'float4'.
 - Since D follows camelCaseSyntax consistently and the community
 seems to largely follow it as well, I made all words starting
 with a capital letter (PascalCase) colored as types. This is nice
 because user-types blend in nicely with built-in ones
 (int/float/etc) and helps you pick out where the code is dealing
 with a Type rather than a local.


 Screenshot: http://reign-studios.com/screenshots/DlangGedit.png
 Download:
 http://reign-studios.com/d-downloads/gtksourceview-3.0.tar.gz
Sound nice. How can I use that on my computer ? What do I do with the files ?
Sep 22 2012
parent reply "F i L" <witte2008 gmail.com> writes:
deadalnix wrote:
 Sound nice. How can I use that on my computer ? What do I do 
 with the files ?
You need to move the files into their 'gtksourceview-3.0' folders. On Linux (and other OS's should be similar), do: 1. find or create the following user directories: ~/.local/share/gtksourceview-3.0/styles ~/.local/share/gtksourceview-3.0/language-specs 2. Move the downloaded files into their respective folders, 'D.lang' to 'language-specs' and 'github.xml' to 'styles'. (Note, the download already contains this hierarchy) Alternatively (although I don't recommend it), you can move the files to: /usr/share/gtksourceview-3.0/... (overwriting the existing D.lang file) which will change it for all users. Hope that helps. Let me know if you have any problems, or find any highlighting bugs. Thanks.
Sep 22 2012
parent reply deadalnix <deadalnix gmail.com> writes:
Le 23/09/2012 07:40, F i L a écrit :
 deadalnix wrote:
 Sound nice. How can I use that on my computer ? What do I do with the
 files ?
You need to move the files into their 'gtksourceview-3.0' folders. On Linux (and other OS's should be similar), do: 1. find or create the following user directories: ~/.local/share/gtksourceview-3.0/styles ~/.local/share/gtksourceview-3.0/language-specs 2. Move the downloaded files into their respective folders, 'D.lang' to 'language-specs' and 'github.xml' to 'styles'. (Note, the download already contains this hierarchy) Alternatively (although I don't recommend it), you can move the files to: /usr/share/gtksourceview-3.0/... (overwriting the existing D.lang file) which will change it for all users. Hope that helps. Let me know if you have any problems, or find any highlighting bugs. Thanks.
Great ! That worked perfectly. Thank you very much.
Sep 23 2012
parent reply deadalnix <deadalnix gmail.com> writes:
OK, simple feedback : it doesn't recognize the lazy keyword.

Except for that, it is really good.
Oct 01 2012
parent reply "F i L" <witte2008 gmail.com> writes:
On Monday, 1 October 2012 at 12:44:45 UTC, deadalnix wrote:
 OK, simple feedback : it doesn't recognize the lazy keyword.

 Except for that, it is really good.
Whoops, I added that awhile ago but forgot to re-upload. Here's a updated version with 'ref', 'lazy', and bracket/operator highlighting. http://reign-studios.com/d-downloads/reign.lang.tar.gz I like the bracket/operator highlighting, but if you don't want it just remove these lines: lines 209 - 211: <context id="operators" style-ref="type"> <match extended="true">[\(\)\{\}\[\]&lt;&gt;=\~\.,\/\!\%\^\&amp;\*\+\-\:;]</match> </context> line 274: <context ref="operators"/>
Oct 01 2012
parent reply "F i L" <witte2008 gmail.com> writes:
On Monday, 1 October 2012 at 20:42:54 UTC, F i L wrote:
 On Monday, 1 October 2012 at 12:44:45 UTC, deadalnix wrote:
 OK, simple feedback : it doesn't recognize the lazy keyword.

 Except for that, it is really good.
Whoops, I added that awhile ago but forgot to re-upload. Here's a updated version with 'ref', 'lazy', and bracket/operator highlighting. http://reign-studios.com/d-downloads/reign.lang.tar.gz I like the bracket/operator highlighting, but if you don't want it just remove these lines: lines 209 - 211: <context id="operators" style-ref="type"> <match extended="true">[\(\)\{\}\[\]&lt;&gt;=\~\.,\/\!\%\^\&amp;\*\+\-\:;]</match> </context> line 274: <context ref="operators"/>
Crap... that's the completely wrong language file, sorry... Here's the updated D.lang file: http://reign-studios.com/d-downloads/d.lang.tar.gz The lines to remove to disable operator/bracket highlighting are: 269-271 & 337
Oct 01 2012
parent reply floare <vincentmilotti gmail.com> writes:
Dead link (dlang gedit color highlighting)
 http://reign-studios.com/d-downloads/d.lang.tar.gz
Would you mind uploading on github for instance ?
Aug 24 2016
parent Matthias Klumpp <matthias tenstral.net> writes:
On Wednesday, 24 August 2016 at 14:38:48 UTC, floare wrote:
 Dead link (dlang gedit color highlighting)
 http://reign-studios.com/d-downloads/d.lang.tar.gz
Would you mind uploading on github for instance ?
Also, if someone would simply update this with GNOMEs default color scheme, I could push it upstream so we wouldn't need to use external stuff anymore for proper D support...
Aug 25 2016