I love Visual Studio. When I'm working with Unity I don't think twice before choosing the verbosity of C# (over Javascript) because I can edit my code in VS. The problem is when it comes to edit shaders. VS sucks almost as badly as Notepad.
Then I thought, maybe I could teach ShaderLab to VS. I started reading some articles about implementing "Language Services" on MSDN but then I realized that it wouldn't be that easy. If the editor could highlight keywords and match the curly braces I would be satisfied.
So I turned to Notepad++ and within minutes I came to a good result. I just threw all the keywords I found and changed the colors randomly. Take a look.
I chose to ignore all the Cg code because the languages in Notepad++ can have only 4 types of keywords and I've already used all of them. Besides that, there are better editors for Cg.
To use this "User defined language" in Notepad++, go to View -> User-defined dialogue and import this XML file.
If I missed a keyword or if you have a sugestion, please leave a comment. I hope that it will be useful.

0 comments:
Post a Comment