Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # pugjs snippets for atom ide, copy this and paste it in your snippets.cson
- '.source.pug':
- 'style CSS pug':
- 'prefix':'pugcss'
- 'body':
- """
- link(rel='stylesheet', href='$1')
- $2
- """
- 'script JS pug':
- 'prefix':'pugjs'
- 'body':
- """
- script(type='text/javascript', src='$1')
- $2
- """
- 'table pug':
- 'prefix':'pugtable'
- 'body':
- """
- table
- thead
- tr $1
- td $2
- tbody
- tr $3
- td $4
- """
- 'for pug':
- 'prefix':'pugfor'
- 'body':
- """
- - for (var ${1:i} = ${2:0}; ${3:i} < ${4:5}; ${5:i}++)
- ${6://-content}
- """
- 'each pug':
- 'prefix':'pugeach'
- 'body':
- """
- each ${1:item} in ${2:itens}
- ${3://-content}
- """
- 'mixin pug':
- 'prefix':'pugmixin'
- 'body':
- """
- mixin ${1:item}
- ${2:p= item}
- +${3:item}
- +${4:item}
- """
- 'mixin-block pug':
- 'prefix':'pugmixinblock'
- 'body':
- """
- mixin ${1:item}(${2:x})
- h1= ${3:x}
- if block
- block
- else
- ${4:else content}
- +${5:item}('Hello world')
- +${6:item}('Hello world')
- p Awesome item content
- """
- 'mixin-attr pug':
- 'prefix':'pugmixinattr'
- 'body':
- """
- mixin ${1:link}(${2:href}, ${3:name})
- a(class!=attributes.class href=${4:href} name!=${5:name})= ${6:name}
- +${7:link}('/foo', 'foo')(class="btn")
- """
- 'mixin-args pug':
- 'prefix':'pugmixinargs'
- 'body':
- """
- mixin ${1:list}(${2:id}, ...items)
- ul(id=${3:id})
- each item in items
- li= ${4:item}
- +${5:list}('list_id', 1, 2, 3, 4)
- """
- 'case pug':
- 'prefix':'pugcase'
- 'body':
- """
- case ${1:item}
- when ${2:1}
- ${3://-content}
- when ${4:2}
- ${5:- break}
- when ${6:3}
- when ${7:4}
- ${8://-content for 3 & 4}
- default
- ${9://-default}
- """
- 'if pug':
- 'prefix':'pugif'
- 'body':
- """
- if ${1:true}
- ${2://-content for true}
- else
- ${3://-content for false}
- """
- 'if pug complete':
- 'prefix':'pugifc'
- 'body':
- """
- if ${1:true}
- ${2://-content for true}
- else ${3:otherTrue}
- ${4://-content for other true}
- else
- ${5://-content for false}
- """
- 'var use pug':
- 'prefix':'pugvar'
- 'body':
- """
- - var ${1:msg} = ${2://-content for msg};
- p This is \#{${3:msg}${4:.toUpperCase()}}
- """
- 'while pug':
- 'prefix':'pugwhile'
- 'body':
- """
- - var ${1:item} = ${2:1};
- ul
- while ${3:item} < ${4:3}
- li= ${5:item}++
- """
- 'piped-text pug':
- 'prefix':'pugpiped'
- 'body':
- """
- p
- | ${1:this text},
- | ${2:is in one line.}
- """
Add Comment
Please, Sign In to add comment