Customize syntax highlighting in visual studio for C#

07
2014-07
  • tbkn23

    I've been unable to find within visual studio 2013, how to change the syntax highlighting color scheme for C# files.

    Namely, I'd want to change the color of variable names, and method names in method declaration lines.

    Any ideas on where I can tweak these colors? I can select light/dark/blue color schemes but not specific syntax colors. In Options / Fonts and Colors there is nothing for C# (only a few options for C++).

    Edit:

    Ok, so I found where you can set the colors, it was in Options / Fonts and Colors after all. There is general settings (keyword, user types, etc), and C++ specific settings, but no C# specific settings. So you just need to set the general settings.

    I still wasn't able to find how to color the method name in method declarations in a different color. When I want to change a method, having the method name declarations in different colors really help me (when using MonoDevelop), and I would really like to set it in visual studio.

    public void MyMethod(int someVariable) { 
        MyMethod(someVariable+1);
    }
    

    I'd like to have different color for "MyMethod" word in the declaration line than the second line (where I recursively call it).

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    Customise the Visual Studio colour scheme per solution
  • Alex Key

    Is it possible to customise Visual Studio's title background colour based on the solution loaded?

    I end up needing to have multiple Visual Studio instances open with very similar content, so I'm ending up losing track of what I'm looking at.


  • Related Answers
  • Per Salmi

    I don't think you can get different color schemes configured automatically and have it switch by what solution you load.

    But you could try the VSCommands extension, they add something called Solution Badges that might make your life a bit easier.

    Get the extension from the gallery at http://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece