HLSL Shader Highlighting

Syntax highlighting, code folding, brace matching, code indenting, and function list

HLSL Shader Highlighting

Postby Mycekralid » Mon Sep 21, 2009 4:09 pm

I wonder why nobodoy else did this before...
I present the brand new "HLSL Shader Highlightning" :):

Replaced by the improved version posted by Mofi, see below.
Mycekralid
Newbie
 
Posts: 2
Joined: Mon Sep 21, 2009 4:02 pm

Re: HLSL Shader Highlighting

Postby Mofi » Tue Sep 22, 2009 12:35 am

HLSL_LANG is an unknown keyword (not listed on syntax highlighting help page) and therefore useless.

There should be no space character between /C1 and the name for color group 1.

The space between /C2 and the name of the color group 2 should be converted to " and it looks like the words in color group 2 are functions.

Color group 3 has no name. What are these words? You should give color group 3 also a name.

Also the words are not perfect sorted which my SortLanguage macro corrected.

My macros TestForDuplicate and TestForInvalid found no errors. That's very good.

I already added the definitions for matching braces. To make this syntax highlighting language perfect it would be good to add also the definitions for auto-indent/unindent and for code folding if that is possible and useful for HLSL Shader files. Is there usage for function strings to find functions or other strings of interest and for being listed in the function list view?

After adding the name for color group 3 and maybe also the definitions

/Indent Strings =
/Unindent Strings =
/Open Fold Strings =
/Close Fold Strings =

and good working and correct defined function strings I recommend to send the wordfile to IDM by email for the extras download page.

Please note: I have deleted with my macro SettingsDelAll all color and font style settings because public wordfiles should not contain these settings. You can use my macro SettingsCopyCur to copy the settings for you from your existing wordfile into the new version.

Edit: Mycekralid sent my version of the wordfile to IDM and therefore it can be downloaded now from the Extras download page. Anybody interested HLSL Shader writter can improve it further like I suggested and send the further improved wordfile to IDM.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4062
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: HLSL Shader Highlighting

Postby Mycekralid » Sun Oct 18, 2009 8:57 am

Hi there,
sorry for being so late.
I just sent idm a message (I didn't know, they'ren't* checking their forums...).
Hope they 'll upload it.

kind regards,
Mycekralid

*hi hi, just a german fooling english grammar
Mycekralid
Newbie
 
Posts: 2
Joined: Mon Sep 21, 2009 4:02 pm


Return to Syntax Highlighting