Skip to content

Instantly share code, notes, and snippets.

@shimakyohsuke
Last active August 29, 2015 14:23
Show Gist options
  • Save shimakyohsuke/2d19a04a08b28e2461b9 to your computer and use it in GitHub Desktop.
Save shimakyohsuke/2d19a04a08b28e2461b9 to your computer and use it in GitHub Desktop.
Atom snippets
# JavaScript
'.source.js':
'console.log':
'prefix': 'log'
'body': 'console.log(${1:"crash"});$2'
'function':
'prefix': 'func'
'body': 'function $1($2) {\n $3\n}'
'function literal':
'prefix': 'funcl'
'body': 'var $1 = function($2) {\n $3\n}'
# COMMENT
'.source.js, .source.css, .source.sass, .source.css.sass, .source.stylus':
'!important':
'prefix': '!'
'body': '!important$0'
'comment_1':
'prefix': 'cmt1'
'body': """
/* ${1:crash}
-------------------------------------------------------------- */$2
"""
'comment_2':
'prefix': 'cmt2'
'body': """
/**
* ${1:crash}
*/$2
"""
'comment_3':
'prefix': 'cmt3'
'body': """
/**-------------------------------------------------------------
* ${1:crash}
-------------------------------------------------------------**/$2
"""
# Stylus
'.source.stylus':
'CSS after':
'prefix': ':aft'
'body': """
::after
content ''
$0
"""
'CSS before':
'prefix': ':bef'
'body': """
::before
content ''
$0
"""
'CSS first-child':
'prefix': ':fcd'
'body': """
:first-child
$0
"""
'CSS last-child':
'prefix': ':lcd'
'body': """
:last-child
$0
"""
'CSS nth-child':
'prefix': ':nth'
'body': """
:nth-child($0)
"""
'border-box':
'prefix': 'box'
'body': 'box-sizing border-box$0'
'border-radius':
'prefix': 'bor'
'body': 'border-radius $0'
# jade
'.source.jade':
'jade include':
'prefix': 'inc'
'body': 'include layout/$0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment