Looking through the snippet file for drupal 7 snippets, I noticed that the tab stops for the t() are a bit wonky here.

snippet t
   t('${1:/* Your text */}', array(${1:/* arguments */}), array(${2:/* options */}))

As it is, when using this snippet, the cursor is placed at the end of the line instead of the first placeholder.

The Drupal 6 version of this snippet looks fine as is.

snippet t
   t('${1:/* Your text */}', array(${2:/* arguments */}))

Patch attached

Files: 
CommentFileSizeAuthor
t-func-tab-stop.patch422 bytesbxtaylor

Comments

Status:Active» Needs review

changing status

Status:Needs review» Fixed

Thanks for the patch! Reviewed and committed: 5318740.

I had trouble testing because the snippets included with the SnipMate plugin also define a snippet for t. How did you get around this?

I have not yet decided whether to write a smallish number of snippets by hand or to generate them en masse, perhaps from the tags files. Feel free to contribute further corrections and additions, but be aware that, if performance does not suffer too much, we might end up automating the production of snippets.

Hmm I didn't have any trouble with the conflicting t snippets. In fact, t <tab> only brings up drupal's t function for me.

I am using janus, though, and I just pulled the drupal snippets out of this project and put them into my own folders (which is how I found the typo), so I don't know if that has anything to do with it.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.