Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get syntax highlighting for a .cu file in Visual Studio?

I am studying CUDA based on the Visual Studio 2008. Could you please tell me how to make syntax highlighting appear in a .cu file?

like image 433
ztdep Avatar asked Feb 22 '11 10:02

ztdep


1 Answers

Follow these steps.

  • Copy usertype.dat from Program Files\NVIDIA Corporation\NVIDIA CUDA SDK\doc\syntax_highlighting\visual_studio_8 to Program Files\Microsoft Visual Studio 8\Common7\IDE.
  • Start Visual Studio and go to Tools -> Options -> Text Editor -> File Extension
  • In the extension box type "cu" and select "Microsoft Visual C++" in the drop down.
  • Restart.
like image 170
dogbane Avatar answered Oct 24 '22 14:10

dogbane