Van's House

I'm a developer at C++ Shanghai team. I'm interested in everything related to C++

Enable syntax highlighting for TR1 headers in VS2008 SP1

Unfortunately, VS2008 SP1 doesn't recognize C++ tr1 headers. That means there are no syntax highlighting and no intellisense for these files.

This is a bug, but you can fix it by yourself. The trick is in the registry. VS maintains a list of extensionless files, and will treat them as cpp files.

It is under: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\Extensionless Files\{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}

Just add tr1 headers into it and you'll now get full support of new tr1 features. Here is the reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\Extensionless Files\{B2F072B0-ABC1-11D0-9D62-00C04FD9DFD9}]
"array"=""
"random"=""
"regex"=""
"tuple"=""
"type_traits"=""
"unordered_map"=""
"unordered_set"=""
"xawrap"=""
"xawrap0"=""
"xawrap1"=""
"xawrap2"=""
"xfwrap"=""
"xfwrap1"=""
"xrefwrap"=""
"xtr1common"=""
"xxbind0"=""
"xxbind1"=""
"xxcallfun"=""
"xxcallobj"=""
"xxcallpmf"=""
"xxcallwrap"=""
"xxfunction"=""
'xxmem_fn"=""
"xxpmfcaller"=""
"xxrefwrap"=""
"xxresult"=""
"xxtuple0"=""
"xxtuple1"=""
"xxtype_traits"=""

Published Saturday, December 13, 2008 3:39 AM by xiangfan
Filed under:

Attachment(s): tr1.reg

Comments

 

Jochen Kalmbach???s Blog » Blog Archive » Syntax highlighting f??r TR1-header!? said:

December 13, 2008 2:43 AM
 

int19h said:

Some other editors (e.g. the Colorer plugin for Far file manager) try to guess the content of the extensionless file by scanning the first few lines for common signs. For example, for C/C++, it looks for #define or an #include. This is a handy feature - any chance of seeing that in VS sometime?

December 14, 2008 8:49 AM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker