The below is very much a first draft, but it kinda works…
Type propx and TAB to kick start and it appears like this: / abbrev : Type two letters /
Overtype the word abbrev with letters, such as le for left, wi width, pa padding, etc. Typing: po ab le 4px pa 5px4 ff Arial p yields this:
/* po ab le 4px pa 5px4 ff Arial p : PAdding POsition */;
position: absolute;
left: 4px;
padding: 5px px px px;
font-family: Arial
Notice the ‘p’ after the word ‘Arial’, which displays the help text ‘PAdding POsition’ to indicate the available abbreviations.
Typing a number 4 after px, pt, %, etc., repeats it four times.
It’s not perfect - I still end up with a spurious semi-colon at the end of the line; I need to type ’ ;’ (space semi-colon) if I want to terminate the last (empty) property with a semi-colon; and I can’t (currently) use quotation marks around fonts. But otherwise it’s perfect
I would be pleased if someone might have a look and pass comments. Regards, Andy.
PS I wonder if there is a limit to the size of a Snippet?
<snippet>
<content><![CDATA[${2:/* ${1:abbrev} : ${1/(abbrev)|.*(?:\b| )((a)|(b)|(c)|(d)|(f)|(h)|(l)|(m)|(p)|(r)|(s)|(t)|(v)|(w)|(z)).?$|.*/?1:Type two letters:?3:ABsolute:?4:BOttom BorderWidth:?5:CLIp COlor CUrsor CLear:?6:DIsplay:?7:Font-Family FIxed FLoat FOnt:?8:HEight:?9:LEft:?10:MArgin:?11:PAdding POsition:?12:RElative RIght:?13:STatic:?14:TOp:?15:VIsibility:?16:WIdth:?17:Z-Index/i} */}${1/\\|abbrev|(?:\b| )([abcdfhlmpr]{1}|(AB)|(BO)|(BW)|(CLI)|(CO)|(CU)|(CL)|(DI)|(FF)|(FI)|(FL)|(FO)|(HE)|(LE)|(MA)|(PA)|(PO)|(RE)|(RI)|(ST)|(TO)|(VI)|(WI)|(ZI)|([0-9]*)(cm|em|ex|in|mm|pt|pc|px|\%)4)(?: |$)|( {2,}|\t)/?2:absolute:?3:;\nbottom\: :?4:;\nborder-width\: :?5:;\nclip\: :?6:;\ncolor\: :?7:;\ncursor\: :?8:;\nclear\: :?9:;\ndisplay\: :?10:;\nfont-family\: :?11:fixed:?12:;\nfloat\: :?13:;\nfont\: :?14:;\nheight\: :?15:;\nleft\: :?16:;\nmargin\: :?17:;\npadding\: :?18:;\nposition\: :?19:relative:?20:;\nright\: :?21:static:?22:;\ntop\: :?23:;\nvisibility\: :?24:;\nwidth\: :?25:;\nz-index\: :?26:$26$27 $27 $27 $27/gi}
]]></content>
<tabTrigger>propx</tabTrigger>
<scope>source.css meta.property-list.css</scope>
<description>po to, etc</description>
</snippet>