Jade Snippets for Sublime Text 2
Latest commit 4ea5600 Feb 25, 2015 @P233 Merge pull request #11 from juuuuuu/master
Added If, Each and Case statements
Permalink
Failed to load latest commit information.
README.md Added If, Each and Case statements Feb 20, 2015
a.sublime-snippet Improved a few snippets Dec 7, 2012
action.sublime-snippet improved all files Nov 11, 2012
aria.sublime-snippet Add some snippet Jan 6, 2013
button.sublime-snippet Improved a few snippets Dec 7, 2012
case.sublime-snippet Added If, Each and Case statements Feb 20, 2015
cdata.sublime-snippet Some Addition Jan 22, 2013
class.sublime-snippet improved all files Nov 11, 2012
coffeescript.sublime-snippet Some Addition Jan 22, 2013
content.sublime-snippet improved all files Nov 11, 2012
data.sublime-snippet Add some snippet Jan 6, 2013
each.sublime-snippet Added If, Each and Case statements Feb 20, 2015
extend.sublime-snippet add 'extend' snippet Jan 6, 2013
form.sublime-snippet Add some snippet Jan 6, 2013
href.sublime-snippet improved all files Nov 11, 2012
id.sublime-snippet improved all files Nov 11, 2012
ie.sublime-snippet Improved a few snippets Dec 7, 2012
if.sublime-snippet Added If, Each and Case statements Feb 20, 2015
if_else.sublime-snippet Added If Else conditionnal Feb 17, 2015
img.sublime-snippet removed auto newline Nov 16, 2012
include.sublime-snippet Add 'include' snippet Jan 6, 2013
input.sublime-snippet Improved a few snippets Dec 7, 2012
itemprop.sublime-snippet Add some snippet Jan 6, 2013
itemscope.sublime-snippet Add some snippet Jan 6, 2013
itemtype.sublime-snippet Add some snippet Jan 6, 2013
less.sublime-snippet Some Addition Jan 22, 2013
link.sublime-snippet Add some snippet Jan 6, 2013
markdown.sublime-snippet Some Addition Jan 22, 2013
method.sublime-snippet improved all files Nov 11, 2012
mixin.sublime-snippet Improved a few snippets Dec 7, 2012
name.sublime-snippet improved all files Nov 11, 2012
placeholder.sublime-snippet improved all files Nov 11, 2012
rel.sublime-snippet improved all files Nov 11, 2012
role.sublime-snippet Add some snippet Jan 6, 2013
script.sublime-snippet refactor(script): application/javascript type Oct 28, 2014
src.sublime-snippet improved all files Nov 11, 2012
stylus.sublime-snippet Some Addition Jan 22, 2013
target.sublime-snippet improved all files Nov 11, 2012
template.sublime-snippet update Jquery 1.11.0, update README, update !!!5 to doctype html. Feb 26, 2014
textarea.sublime-snippet Improved a few snippets Dec 7, 2012
tplh5bp.sublime-snippet update Jquery 1.11.0, update README, update !!!5 to doctype html. Feb 26, 2014
type.sublime-snippet improved all files Nov 11, 2012
value.sublime-snippet improved all files Nov 11, 2012

README.md

Jade Snippets for Sublime Text 2

A collection of Jade snippets. All suggestions are welcome.

Installation

Strongly recommend to install this repo through Package Control.

Snippets List

Conditionnals

if =>

if condition
  //- code

if else =>

if condition
  //- code
else
  //- code

each =>

each value in variable
  //- code...

case =>

case condition
  when condition
    //- code
  default
    //- code

Attributes

id => id=""

cla => class=""

hre => href=""

src => src=""

typ => type=""

nam => name=""

rel => rel=""

con => content=""

val => value=""

tar => target=""

act => action=""

met => method=""

pla => placeholder=""

ari => aria-*=""

itemt => itemtype="http://schema.org/*"

items => itemscope=""

itemp => itemprop

rol => role=""

data => data-*=""

Elements

a => a(href="http://", target="_blank")

img => img(src="image/", alt="")

scr => script(type="text/javascript", src="")

lin => link(rel="stylesheet", type="text/css", href="")

Forms

form => form(id="", method="", action="")

inp => input(type="text", placeholder="")

but => button(type="button", placeholder="")

tex => textarea(placeholder="")

pli => p > label(for="") + input(id="", type="")

Jade Specific

exte => extend

inc => include

mix => mixin name(param1, param2)

Filters

st => :stylus

le => :less

md => :markdown

cd => :cdata

co => :coffeescript

Templates

tem =>

doctype html
html
  head(lang="en")
    title ${1:title name}
    meta(http-equiv="content-type", content="text/html; charset=UTF-8")
    meta(name="description", content="")
    meta(name="keywords", content="")
    meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;")
    // if lt IE 9
      script(type="text/javascript", src="js/html5shiv.js")
    link(rel="stylesheet", href="css/style.css", type="text/css")
  body
    header
      h1
    .container

    footer

    script(type="text/javascript", src="js/jquery-1.11.0.min.js")
    // if IE
      script(type="text/javascript", src="js/placeholder.js")

tplh5bp =>

doctype html
//- TODO: Don't forget to set lang !!
html(class="no-js")
  head
    //- TODO: Check if it's the good charset
    meta(charset='utf-8')
    meta(http-equiv='X-UA-Compatible', content='IE=edge')
    title
    meta(name='description', content='')
    meta(name='viewport', content='width=device-width, initial-scale=1')
    //- TODO : Place favicon.ico and apple-touch-icon.png in the root directory
    block css
      link(rel='stylesheet', href='css/normalize.css')
      link(rel='stylesheet', href='css/main.css')
    block top-script
      script(src='js/vendor/modernizr-2.7.1.min.js')
  body
    //-
      Add your site or application content here
    block main
      p Hello world! This is HTML5 Boilerplate.

    block bottom-script
      script(src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js')
      script.
        window.jQuery || document.write('<script src="js/vendor/jquery-1.11.0.min.js"><\/script>')
      script(src='js/plugins.js')
      script(src='js/main.js')
      //- TODO : Google Analytics: change UA-XXXXX-X to be your site\'s ID.
      script.
        (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
        function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
        e=o.createElement(i);r=o.getElementsByTagName(i)[0];
        e.src='//www.google-analytics.com/analytics.js';
        r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
        ga('create','UA-XXXXX-X');ga('send','pageview');

Other

ie => // if lt IE 9

Contributors

rs459