Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to setup a color for a specific word in visual studio 9?

I have to use a lot of specific variables at my work (like T_ULONG or T_SWORD) and I'd like them to be displayed as variables (blue color or whatever). It's quite annoying to have whole pieces of code in black and white ... I saw that there were a lot of themes for VS, but these won't solve my problem...

Any clues ? Thanks for reading anyway :)

like image 657
gramm Avatar asked Jul 01 '09 12:07

gramm


People also ask

How do I change the color of text in Visual Studio?

On the menu bar, which is the row of menus such as File and Edit, choose Tools > Options. On the Environment > General options page, change the Color theme selection to Dark, and then choose OK. The color theme for the entire Visual Studio development environment (IDE) changes to Dark.

How do you add a custom color in Visual Studio?

Within the Visual Studio Designer, under the properties window you are able to select the ForeColor , BackColor etc using color picker. When you want to pick a color, a color picker comes up with the tabs 'Custom, Web, System'.

How do I change the color of a variable in VS Code?

Open VS Code editor to change the syntax colors. Go to Settings, which is on the bottom left corner of the VS Code window. In the search field type JSON, and click on the 'Edit in settings. json' option.

Can you customize Visual Studio?

You can personalize Visual Studio in various ways to best support your own development style and requirements. Many of your settings roam with you across Visual Studio instances—see Synchronized settings. This article briefly describes different personalizations and where you can find more information.


1 Answers

Assuming you're talking about C/C++, yes:

Create a file called usertype.dat containing your keywords (one per line) and save it into C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE or equivalent.

In VS, go Tools / Options / Fonts and Colors / Text Editor and in the Display Items list select User Keywords. Set your colours, OK the dialog, and restart VS.

like image 130
RichieHindle Avatar answered Sep 23 '22 10:09

RichieHindle