More (distinct) syntax highlighting

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Derren
Enthusiast
Enthusiast
Posts: 316
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

More (distinct) syntax highlighting

Post by Derren »

Is it possible to add better control over the highlighting?
I found myself wishing that I could mark the "Debug" keyword for example in a different color so that it stands out more.
A workaround would be to create a macro to substitute the keyword, and add the macro's name to the list of user-defined keywords and then give all of those another color. Not very elegant, though.

The source has to be parsed for keywords (PB and user-defined alike). Adding a control where you could set different styles for different keywords would be really nice.
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: More (distinct) syntax highlighting

Post by NicTheQuick »

Simply add "Debug" to the user defined keywords and change the color for "user defined keywords".

Result:
Image
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: More (distinct) syntax highlighting

Post by skywalk »

Nice. Didn't think you could do that for PB's keywords.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: More (distinct) syntax highlighting

Post by davido »

@NicTheQuick,

Neat! Thanks. :D
DE AA EB
User avatar
Derren
Enthusiast
Enthusiast
Posts: 316
Joined: Sat Jul 23, 2011 1:13 am
Location: Germany

Re: More (distinct) syntax highlighting

Post by Derren »

Okay, that's better than using a macro. Thanks.
A little more control over the highlighting would still be neat, but my immediate needs have been fulfilled :)
Post Reply