让 Textmate 将 *.php 与 *.css.php 文件分开,如何?
我正在使用动态生成的 CSS 文件。 为了让 Apache 知道,它们必须经过预处理,它们必须以
.php
现在问题是:
Textmate 无法辨别/区分 *.css.php 和 *.php。当我将 .css.php 文件设置为 CSS 标记时,我的其他 .php 文件也设置为 CSS 标记。
例如,.html 文件仍然由捆绑包编辑器中定义的关联 .html-language-preferences 进行标记。
有没有办法不完全重写 PHP MarkUp 定义?
I am working with dynamic generated CSS files.
To let Apache know, they have to be preprocessed, they have to end with
.php
Now here is the Problem:
Textmate won't discern / differ between *.css.php and *.php. When i set the .css.php file to the CSS MarkUp, my other .php files are also set to CSS MarkUp.
.html files for example, are still MarkedUp by the associated .html-language-preferences defined in the bundle editor.
Is there a way to not completely rewrite the PHP MarkUp definition?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您只需要处理几个 .css.php 文件,您只需在窗口底部的语言菜单中选择 CSS。
如果您能够编辑您的 Apache 配置,我建议您添加/编辑此行(从内存中,因此请检查之前的文档):
通过此操作,您可以让 TextMate 正常打开 .css 文件并由 PHP 处理,就好像它们是 .css 文件一样。 php。
If you only have to deal with a few .css.php files you only have to choose CSS in the language menu at the bottom of the window.
If you are able to edit your Apache configuration I'd suggest you add/edit this line (from memory so check the docs before):
With this you can have .css files opened normally by TextMate AND processed by PHP as if they were .php.
我通过以下方式增强了 PHP 语言包:
在模式部分中,但现在 .css.php 文件中的 CSS 代码必须以
/*CSS
开头并以CSS*/ 结尾
。I have enhanced the PHP language bundle by:
in the patterns section, but now the CSS code in the .css.php-files have to start with
/*CSS
and end withCSS*/
.