Is it possible to change the color of interpolated string expressions?

Interpolated string expressions in C # can be great. But the default color (black) prevents the brain from scanning text easily. The default line color is red. This makes the brain more confused than it should be, making this function less efficient than it should be - at least for me.

Example of interpolated string expressions in a code generator application

Can I change the color of interpolated string expressions in Visual Studio? I would be happy if I could set it to dark red. Thus, it is not confusing, but still easily noticeable.

Through Tools-> Options-> Fonts and Colors, you can define the colors of strings and shorthand lines, but not for interpolated string expressions.

Edit: Jeff Mercado's comment made me realize that the color of all code components must be defined for interpolated string expressions. This can be avoided if it is possible to define a hue (i.e., not a color) for the interpolated string expressions.

Edit: Added generator code snippet to show an example to a sea of ​​tokens where eyes are lost and it is not easy to identify the generated lines from the actual code: enter image description here

+3


source to share


2 answers


It's a good offer. The best ways to turn a sentence into a function in Visual Studio are:

  • Send-a-Smile, if the offer is on it. It could, it can, but one-off offers still run into problems. Several similar suggestions will be noticed.

  • Custom Voice - This will require reasonable community support to gain attention.

  • Connect is not the best route for suggestions; it is targeted for error and is filtered significantly before decision makers can see it.

  • Reply to blog posts on blogs.

An excellent hint suggestion explains what you want and why you want. If you have ideas for implementation, it doesn't hurt to separate them from the proposal itself. The solution you propose may have been discussed and rejected, but focusing on the problem itself is still productive.



Include your email address; follow-up discussions can help clarify your intentions. Some good sentences are lost due to a typo or incompatible vocabulary. The function may already exist but be undiscovered; in this case, you need to fix another problem. Your follow-up feedback on why this solution is not adequate can be very helpful.

If you have walked this road in the past and have not been satisfied, try again. Things are changing; I see user feedback is taken very seriously by Visual Studio.

0


source


I played around with colors in Tools -> Options -> Environment -> Fonts and Colors and found that the inner color of the interpolated string (like "name" in "{name)") is bound to the "Id" element and the color of the brackets is bound to the “Punctuation.” No, it doesn't seem like you can change the color of interpolated strings without making the rest of your code downright intimidating.



0


source







All Articles