Coming from Eclipse, I'm disappointed with the very limited syntax coloring capabilities offered for C# by Visual Studio (all versions, up to 2010).
In particular, I'm interesting in distinct coloring for methods / fields / locals / static stuff.
I'm aware Visual Assist can enhance the coloring, but I've failed to find any free alternative capable of doing that, so I'm turning to SO (I hope it's programming-related enough). Is there any free (or at least cheaper than Visual Assist) solution capable of enhancing the syntax coloring for C#?
It's not free, but ReSharper does this (and quite a lot more besides):
http://www.jetbrains.com/resharper/features/coding_assistance.html#Syntax_Highlighting
Well, I could understand from the rest of the responses that the answer is a resounding "no, there is no such extension available for free", so I ended up writing one on my own:
(light brown for methods, magenta for variables, otherwise their color would have been black)
It's a bit crude, but it works for me - and it was free :)
EDIT: Anyone interested in doing the same - using the "Editor Classification" template, bundled with the Visual Studio SDK, is a great starting point.
Hmya, watch out: one IDE's flaw is another IDE's feature. Visual Studio's syntax coloring is purely based on lexical analysis. Fast, simple and always accurate, no matter how completely borked the code is while you are editing it. To get the Eclipse-like coloring, the editor needs to be able to parse the code so it can classify identifiers. That's a much harder problem.
More to the point, there are changes in VS2010 that emphasize doing things exactly the opposite way. To get accurate syntax coloring your preferred way, you'd be likely to focus on getting the class "super-structure" done first. Exactly the opposite of what VS2010 is doing. It lets you skip the boring details and type code. And offers refactorings that lets you automatically create the field/property/method declarations from that code.
Microsoft spends a lot of money researching the most effective use of their software. You're liable to cut yourself off from the innovations they came up with if you try too hard getting things back the way you always did it before.
This is a great free option, http://studiostyl.es/
Import the settings via Tools->Import/Export Settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With