Skip to content

Instantly share code, notes, and snippets.

@Jehong-Ahn
Created September 6, 2016 11:42
Show Gist options
  • Save Jehong-Ahn/59973faaba3647ac41e10260f3f04843 to your computer and use it in GitHub Desktop.
Save Jehong-Ahn/59973faaba3647ac41e10260f3f04843 to your computer and use it in GitHub Desktop.
atom snippet
# 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'
#
# Each scope (e.g. '.source.coffee' above) can only be declared once.
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# https://atom.io/docs/latest/using-atom-basic-customization#cson
'.source.js':
'log':
'prefix': 'log'
'body': 'if (debug) console.log("<$1>", $2);$3'
'clone object':
'prefix': 'clone',
'body': 'JSON.parse(JSON.stringify(${1:object}));$2'
'mocha describe':
'prefix': 'desc'
'body': 'describe("${1:그룹명}", function() {$2});$3'
'mocha it':
'prefix': 'it'
'body': 'it("${1:액션명}", function() {$2});$3'
'nightwatch suite':
'prefix': 'nwsuite'
'body': '"${1:그룹명}": function(browser) {$2},$3'
'casper then':
'prefix': 'then'
'body': 'casper.then(function() {$1});'
'.text.html.basic':
'br for mobile':
'prefix': 'brmobile'
'body': '<br class="visible-xs-inline"/>'
'.source.yaml':
'parameter object':
'prefix': 'param'
'body': """
- name: $1
description: $2
in: formData
type: string
required: false
$3
"""
'path object':
'prefix': 'path'
'body': """
tags:
- $1
summary: $2
security:
- auth101-access-token: []
- env: []
consumes:
- application/x-www-form-urlencoded
produces:
- application/json
parameters:
$3
responses:
200:
description: OK
description: |
$4
$5
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment