c++ – Visual Studio colour setting for std::string


Using Visual Studio 2022 with the “Dark” colour scheme (set at Tools > Options > Environment > General > Color Theme).

I’ve set up various colours in Tools > Options > Environment > Fonts and Colors. These generally work well (see image below):

  • if and for are purple using the C++ Keyword - Control colour setting
  • void and int are blue (unsure which colour setting this uses)
  • 5 is red using the Number colour setting
  • string literals are orange using the String colour setting

Visual Studio colour scheme

Currently Visual Studio uses the Plain Text colour setting for string or std::string (“param2” in my example above, and circled in bright orange).

My question is whether VS can be configured to give std::string a special colour. This should be distinct from Plain Text, and ideally the same as void and int.

Leave a Reply

Your email address will not be published. Required fields are marked *