如何让 TextMate 识别 ASP.NET MVC Razor 视图的智能感知?

发布于 2024-11-25 21:00:54 字数 110 浏览 6 评论 0原文

我在 Mac 上使用 TextMate 作为前端设计器,并尝试打开 cshtml (razor) 视图来调整 html,但 html 智能感知不会触发。如何在 cshtml 文件上获取 html 智能感知?

I'm using TextMate on a Mac as a front end designer and trying to open cshtml (razor) views to just tweak html, but the html intellisense does not trigger. How do i get html intellisense on the cshtml files?

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

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

发布评论

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

评论(2

你在我安 2024-12-02 21:00:54

TextMate 没有 HTML 智能感知。它在某些语言上具有特定于语言的选项卡完成和哑属性完成,但没有任何东西可以接近 Visual Studio 的“智能感知”或​​ Eclipse 的“内容辅助”。

如果您想使用其 HTML 相关功能,您只需在窗口底部的“语言”菜单中选择 HTML

也就是说,我刚刚从 随机教程 中保存了一个 .cshtml 示例TextMate 自动将其识别为 HTML,所以我不确定发生了什么。

有几个可用的面向 ASP.NET 的 HTML 包,您尝试过吗?

TextMate doesn't have HTML intellisense. It has language-specific tab completion and dumb attribute completion on some languages but nothing that comes close to Visual Studio's "intellisense" or Eclipse's "content assist".

If you want to use its HTML-related features you only have to select HTML in the "Language" menu at the bottom of the window.

That said, I just saved a sample of .cshtml from a random tutorial and TextMate recognizes it as HTML automatically so I'm not sure what's going on.

There are a couple of ASP.NET oriented HTML bundles available, did you try them ?

狠疯拽 2024-12-02 21:00:54

以下是我在 textmate 中找到的有关关联文件类型的一些信息。希望它能有所帮助。

https://superuser.com/questions/40506/textmate-file-type-association< br>
http://blog.macromates.com/2007/file-type- detector-rspec-rails

最终,您需要告诉 TextMate 将 html 引擎用于任何具有 cshtmlvbhtml 扩展名。

Here's some information I found on associating file types in textmate. Hopefully it will be of assistance.

https://superuser.com/questions/40506/textmate-file-type-association
http://blog.macromates.com/2007/file-type-detection-rspec-rails

Ultimately, you need to tell TextMate to use the html engine with any file that has a cshtml or vbhtml extension.

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