Closed (fixed)
Project:
Vim Plugin For Drupal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2012 at 07:24 UTC
Updated:
12 Nov 2012 at 03:10 UTC
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
| Comment | File | Size | Author |
|---|---|---|---|
| t-func-tab-stop.patch | 422 bytes | bxtaylor |
Comments
Comment #1
bxtaylor commentedchanging status
Comment #2
benjifisherThanks 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.
Comment #3
bxtaylor commentedHmm 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.