Textmate 与 HTML(rails) 问题
我正在编辑 .html.erb 文件,并在底部选择了 HTML(rails)。当我输入时,如果我得到:
< ?php if (条件): ? >
< ?php endif ? >
有什么想法吗?
干杯
I am editing a .html.erb file with HTML(rails) selected at the bottom. When I type if I get:
< ?php if (condition): ? >
< ?php endif ? >
Any ideas?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不完全理解,但当我输入时:
if
并点击TAB
,我得到的是 PHP:您可以在 IF、TAB 上创建自己的 ERB 代码段:
Don't fully understand but when I type:
if
and hitTAB
, I get PHP instead:You could create your own ERB snippet for example on IF, TAB:
建议:打开捆绑包编辑器并删除不需要的 PHP 捆绑包。这样我就不会再干扰你们的 ERB 模板了。
Suggestion: Open your Bundle Editor and delete the PHP bundle in you don't need it. This way, I won't interfere with your ERB templates again.
您可能对 .erb 文件的手动绑定不正确。要查看您运行
默认值的手动绑定,请阅读 com.macromates.textmate OakLanguageFileBindings
如果您想摆脱所有手动绑定,请退出 TextMate 并运行
默认值删除 com.macromates.textmate OakLanguageFileBindings
更多信息请参见 http://blog.macromates.com/2007/file-type-detection-rspec-rails/
You probably have an incorrect manual binding for .erb files. To see what manual bindings you have run
defaults read com.macromates.textmate OakLanguageFileBindings
If you want to get rid of all your manual bindings, quit TextMate and run
defaults delete com.macromates.textmate OakLanguageFileBindings
More info here http://blog.macromates.com/2007/file-type-detection-rspec-rails/