CommonThread

Tip: TextMate code completion

Posted by anthony crumley, Sat Oct 27 09:05:00 UTC 2007

TextMate has some very basic code completion for HTML, CSS, Ruby, and PHP. The code complete list is displayed when option-escape is pressed.

For HTML files all the tags will be listed when the cursor is not in a tag. When the cursor is in a tag it will show all the valid attributes for the tag.

For CSS files some selector items will be listed when the cursor is not inside the curly brackets. When the cursor is in the curly brackets it will list all the CSS attributes.

Ruby code completion works pretty well in a simple ruby script but does not seem to work inside classes or methods which makes it practically useless. It does take into consideration the variable type when creating options after the dot operator.

I am not a PHP developer but it seems to always show the same long list of functions regardless of the context. One nice thing it does is insert the parameters with their type when a function is selected. The first parameter is highlighted for you to begin typing. Pressing tab will highlight the next parameter.

Filed Under: | Tags:

Comments

Have your say

A name is required. You may use HTML in your comments.




Categories