Ok... I guess it may sound stupid or lazy, but I'm doing a lot of CSS lately, and that simple fact of having to type "px" right after every single width or height or margin and so on is drivin' me nuts.
I usually 'refine' pixels' values in Firebug so I often have to retype the values in the original document.
Now... It would be great if a string like "125px" would behave like a "120%" one, since double-clicking on "120%" only selects "120". But AFAIK that's not doable.
(Oh, PLEASE, tell me I'm wrong)!
So I've been triyn' to make a "snippet" meant to be triggered under the css scope which would allow me to only type the value and then press "Tab" and let TM add those "px" part.
The "Activation" field, in the Bundle Editor, should look like:
[Tab trigger] \d or [0-9] (regex for "any number")
and the "Scope selector" all or some of the following:
source.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.css
Useless to say, it doesn't work this way. (Hitting "Tab" key only returns a… "Tab" (\t) )
So, back to the topic: is it possible to Tab-trigger a snippet by a regex, or there is something different I can do which I don't know or I just didn't think of?
TIA!
cià
ale