简体   繁体   English

使代码片段如何在Textmate 2中用于Ruby On Rails?

[英]How do make snippets work for Ruby On Rails in Textmate 2?

On a fresh install of Textmate2, you used to be able to type hm<tab> while editing in a model and it would type out a whole has_many line for you, but now it just types a tab. 在全新安装的Textmate2上,您过去可以在模型中编辑时键入hm<tab> ,它将为您键入整个has_many行,但现在只键入一个制表符。 All of the text-completion seems broken. 所有文本完成似乎都坏了。 The ones from Ruby are still working ( def<tab> creates a method block with the name selected, for instance). Ruby中的代码仍在工作(例如, def<tab>创建一个具有所选名称的方法块)。

I noticed that the "Ruby on Rails" bundle wasn't enabled by default anymore, but I fixed that and the issue remains. 我注意到默认情况下不再启用“ Ruby on Rails”捆绑软件,但是我已修复了该问题,仍然存在。

The snippets still work, but you have to make sure that the language mode is set to "Ruby On Rails" in the bottom status bar, otherwise they won't trigger. 这些代码片段仍然有效,但是您必须确保在底部状态栏中将语言模式设置为“ Ruby On Rails”,否则它们不会触发。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM