简体   繁体   中英

Visual Studio C++, how to change the text color for “nullptr”

It's distracting to me to see keywords like class, for, while in bright blue, but also to have nullptr in bright blue. It draws attention to the word "nullptr". Is there any way to override VS's coloring for just this word?

Right now I am using #define null nullptr , which is a workaround at least for my own code.

Visual Studio doesn't allow you override keyword coloring feature. There is no direct way! However, It is possible by writing your own Syntax Colorizing plugin.

Find more information here: Syntax Colorizing (Managed Package Framework)

You can filter nullptr keyword in ScanTokenAndProvideInfoAboutIt () function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM