Skip to content

Instantly share code, notes, and snippets.

@agibsonsw
Created February 13, 2012 13:51
Show Gist options
  • Save agibsonsw/1817089 to your computer and use it in GitHub Desktop.
Save agibsonsw/1817089 to your computer and use it in GitHub Desktop.
CSS fontFamily (abbr)
<snippet>
<content><![CDATA[font-family: ${1/\\|(Ar)|(AB)|(BA)|(BO)|(Ch)|(CN)|(Co)|(CS)|(Gar)|(Gad)|(Gen)|(Geo)|(He)|(Im)|(LC)|(LG)|(LS)|(Mo)|(Sa)|(Se)|(NY)|(Pa)|(PL)|(Ta)|(TN)|(Ti)|(Tr)|(Sy)|(Ve)|(se)|(sa)|(fa)|(mo)|(\,)|_([a-zA-Z0-9\-\ ]+)_/?1:Arial:?2:'Arial Black':?3:'Book Antiqua':?4:'Bookman Old Style':?5:Charcoal:?6:'Courier New':?7:Courier:?8:'Comic Sans MS':?9:Garamond:?10:Gadget:?11:Geneva:?12:Georgia:?13:Helvetica:?14:Impact:?15:'Lucida Console':?16:'Lucida Grande':?17:'Lucida Sans Unicode':?18:Monaco:?19:'MS Sans Serif':?20:'MS Serif':?21:'New York':?22:Palatino:?23:'Palatino Linotype':?24:Tahoma:?25:'Times New Roman':?26:Times:?27:'Trebuchet MS':?28:Symbol:?29:Verdana:?30:serif:?31:sans-serif:?32:fantasy:?33:monospace:?34:, :?35:\x27$35\x27/g};${3:/* ${1:fonts } */}
]]></content>
<tabTrigger>fontFamily</tabTrigger>
<scope>source.css meta.property-list.css</scope>
<description>Use TI for Times etc</description>
</snippet>
@agibsonsw
Copy link
Author

Allows abbreviations when completing the css font-family property. Such as Ar for Arial, AB Arial Black.

You can type your own fonts and use underscores if you require quotes '. If you need to type Ar then separate it with a backslash A\r.

Press TAB when complete and delete the comment. Andy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment