Want pretty syntax highlighting when editing your .cu files in Visual Studio?
Heres how:
---
Visual Studio .Net 2005 / Visual Studio 8:
1. If you don't have a usertype.dat file in your "Microsoft Visual Studio 8/Common7/IDE" folder, then copy the included usertype.dat file there. If you do, append the contents of the included usertype.dat onto the end of the "Microsoft Visual Studio 8/Common7/IDE/usertype.dat"
2. Start Visual Studio 8. Select the menu "Tools->Options...". Open "Text Editor" in the tree view on the left, and click on "File Extension". Type cu in the "Extension" box, and click "Add". Click "OK" on the dialog box.
3. Restart Visual Studio and your shaders should now have syntax highlighting.
ps: 上面的內容來至 C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/doc/syntax_highlighting/visual_studio_8/readme.txt
在添加cu的時候,最好選擇vc++的編輯器做為cu預設編輯器,這樣就可以使用c/C++的規則來編輯cu檔案