Skip to content

Instantly share code, notes, and snippets.

@konstantinzolotarev
Last active November 9, 2016 14:00
Show Gist options
  • Save konstantinzolotarev/4d043c14729cf06977e4a825a3000ee3 to your computer and use it in GitHub Desktop.
Save konstantinzolotarev/4d043c14729cf06977e4a825a3000ee3 to your computer and use it in GitHub Desktop.
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.js':
'ngInject':
'prefix': 'ani'
'body': '/*@ngInject*/'
'callback or _.noop':
'prefix': 'ccb'
'body': '${1:cb} = ${1:cb} || _.noop;$2'
'array function':
'prefix': 'aff'
'body': '(${1}) => {$2}'
'anon array function':
'prefix': 'aaff'
'body': '() => {$1}'
'jshintMaxLength':
'prefix': 'jshlen'
'body': '/* jshint maxlen: false */'
'jshintGlobal':
'prefix': 'jshglob'
'body': '/* global: $1 */'
'eslint disablel line':
'prefix': 'esld'
'body': '// eslint-disable-line'
'super console log':
'prefix': 'ccl',
'body': """
console.log('==========================')
console.log($1)
console.log('==========================')$2
"""
'labit':
'prefix': 'labit',
'body': 'lab.it(\'$1\', (done) => {$2});'
'promiseNotImplementedYet':
'prefix': 'pni',
'body': 'return Promise.reject(new Error(\'Not implemented yet !\'))$1'
'new error':
'prefix': 'nerr'
'body': 'new Error(\'$1\')'
'.coffee':
'console.log':
'prefix': 'cl'
'body': 'console.log $1'
'not implemented':
'prefix': 'pni'
'body': 'Promise.reject new Error \'Not implemented yet\''
'ccl':
'prefix': 'ccl'
'body': """
console.log '==========================='
console.log $1
console.log '==========================='$2
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment