在 Visual Studio 6 中为新文件类型添加语法着色?

发布于 2024-08-22 20:21:37 字数 306 浏览 1 评论 0原文

是否可以在 Visual Studio (VC++) 6 中更改新文件类型(我们称之为 .XYZ 文件)的语法着色,如果可以,如何更改?

我看到您可以在工具/选项/格式中编辑注释、数字、运算符等的颜色,但它似乎仅适用于已知的文件类型,例如 .C.H< /code>、.CPP.HPP 等。

在这种特殊情况下,XYZ 实际上是 C++,所以我真的只需要能够应用 C++将格式规则设置为 .XYZ

Is it possible to change the syntax coloring for a new file type (let's call it .XYZ files) in Visual Studio (VC++) 6, and if so, how?

I see where you can edit the color for comments, numbers, operators, etc. in Tools/Options/Format, but it seems to apply only to known filetypes like .C, .H, .CPP, .HPP, etc.

In this particular case, XYZ are really C++ under the covers, so i really just need to be able to apply C++ formatting rules to .XYZ.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抚笙 2024-08-29 20:21:37

查看注册表:

HKEY_CURRENT_USER\Software\Microsoft\Devstudio\6.0\Text Editor\Tabs/Language Settings\C/C++]
"FileExtensions"="cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2"

并将您的扩展名添加到末尾。不过先关闭VC6。

Have a look at the registry under:

HKEY_CURRENT_USER\Software\Microsoft\Devstudio\6.0\Text Editor\Tabs/Language Settings\C/C++]
"FileExtensions"="cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2"

and just add your extension to the end. Close VC6 first though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文