让RadRails可以提示语法

TextMeta有强大的代码片段功能,这里提供一个templates包下载:http://dl.javaeye.com/topics/download/a31526c3-ee02-4417-b56f-95ec68639412

1。把templates包解压缩(最好放到RadRails安装目录下),有两个xml文件:ruby-rr-templates.xml和rhtml-rr-templates.xml

2。安装:
   1. Open RadRails
   2. Go to Windows > Preferences > Ruby > Editor > Templates, to see the list of included templates
   3. Click on any template, and press Ctrl-A to select them all.
   4. Click on Remove, to delete them all
   5. Click Import…, select the file ruby-rr-templates.xml
   6. Change to Rails > Editiors > RHTML Editor > RHTML Templates
   7. Remove all the current templates
   8. Click Import…, select the file rhtml-rr-templates.xml
   9. Press Ok to close the dialog and you’re done


然后测试:
打开一个rb文件,输入:
bt   ,然后按Ctrl + Space(你也可以自己去首选项里修改Ruby content Assist的快捷键,改成Tab键更爽),就会变成belongs_to :object

打开一个rhtml文件:
按tab键(也可以设置其他键),输入forin,你就可以选择了,自己去试吧
  转自:http://ruby-lang.org.cn/forums/viewthread.php?tid=716&extra=page%3D1


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值