textmate 捆绑包无法识别差异
所以我试图制定一组正确识别不同文件扩展名的语法。
我的所有文件(js/css/html)都以模板结尾。这与 ruby 如何处理 js.erb、css.erb 等类似。因此,我将文件类型属性修改为 js.template css.template 并将模板本身修改为 html。但这似乎不起作用。即使有更具体的模板,它们也只是默认模板。
但出于某种原因,Textmate 不想识别我的不同文件扩展名。知道为什么会发生这种情况,或者为什么 Ruby 语法似乎可以工作,但我的却不行?
So i'm trying to make a set of grammars recognizing different file extensions properly.
All my files (js/css/html) end with template. This is similiar to how ruby does it with js.erb, css.erb, etc. So I modified the file type attribute to js.template css.template and template itself for html. But it doesn't seem to work. They just default to template even though there are more specific ones.
But for some reason Textmate doesn't want to recognize my different file extensions. Any idea why this would be happening or why the Ruby grammars seem to work but mine don't?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
详细的答案取决于范围,因此取决于您想要的语法突出显示。一般方法如下:
fileTypes = ( 'js', 'htc', 'jsx' );
这样,您将在具有 .template 结尾的文件中使用默认语法突出显示。然而,Ruby on Rails 包对这些语法进行了一些扩展,因此您可能还想扩展这些语法支持的文件类型。
The detailed answer depends on the scope and therefore syntax highlighting you want. The general approach is as follows:
fileTypes = ( 'js', 'htc', 'jsx' );
This way you will have the default syntax highlighting working in your files with .template endings. However, the Ruby on Rails bundle extends those grammars a little, so maybe you want to extend the supported filetypes of these grammars as well.