Autocomplete in Textmate

a 夏天 提交于 2019-12-21 21:15:12

问题


Sometimes I watch screen casts where someone is using text mate.

I'm a rails developer, so these are rails screen casts.

They'll type something like:

def

for example

and "end" will automatically appear underneath.

I do have the bundle for Rails enabled - why doesn't this happen for me?

Thanks!


回答1:


The file you're editing needs the right extension (.rb in your case) to make Textmate understand the right bundle to use.

What do you see down at the bottom of your TM window? (After Line# and Column#)?

Is that "Plain Text"?

If you see something different from Ruby or Ruby on Rails click on the little up/down arrows on the right of It to open the dropdown list of bundles and select: Ruby or Ruby on Rails.

This way, when you hit TAB after writing "def" It will auto-complete the method creation for you.

You can also check Bundles > Bundle editor > Edit snippets... (then choose Ruby) to see if you have the snippet "def" configured to being fired when you hit TAB (see under Declaration > Methods).




回答2:


For any late-comers like me, make sure you use the Ruby on Rails bundle for .rb files, and the HTML(Rails) bundle for template files (.erb).



来源:https://stackoverflow.com/questions/2924383/autocomplete-in-textmate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!