AutoComplete in Textmate

Sometimes I watch screens when someone uses a text mat.

I am a rails developer, so these are rail screens.

They will print something like:

Protection

eg

and "end" will automatically appear at the bottom.

I have a kit for Rails included - why is it not for me?

Thanks!

+2
source share
2 answers

The file you are editing needs the correct extension ( .rb in your case) so that Textmate understands the correct package to use.

What do you see at the bottom of your TM window? (After row # and column #)?

Is this "Plain Text" ?

If you see something other than Ruby or Ruby on Rails , click on the small up / down arrows to the right of it to open the drop-down list of bundles and select: Ruby or Ruby on Rails .

That way, when you press TAB after writing " def " , it will automatically finish creating the method for you.

You can also check Bundles> Bundle editor> Edit snippets ... (then select Ruby) to find out if you have a β€œdef” fragment that was triggered when you pressed TAB (see Declaration> Methods) .

+15
source

For any later users like me, make sure you use the Ruby on Rails package for .rb files and the HTML package (Rails) for template files (.erb).

+2
source

All Articles