jenwachter
4/17/2015 - 1:03 PM

Atom Snippets

Atom Snippets

# 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'
#
'.source.php':
 'display errors':
  'prefix': 'phperr'
  'body': 'ini_set("display_errors", true); error_reporting(E_ALL);'
 'print':
  'prefix': 'print'
  'body': 'print_r(${1:"crash"}); die();$2'
 'dump':
  'prefix': 'dump'
  'body': 'var_dump(${1:"crash"}); die();$2'

'.source.js':
  'console.log':
    'prefix': 'log'
    'body': 'console.log(${1:"crash"});$2'
  'prototype':
    'prefix': 'proto'
    'body': '${1:"parent"}.prototype.${2:"function"}.call(this);'
  'backbone.view':
    'prefix': 'bbview'
    'body': """
/* global require: false */
/* global module: false */

var $ = require("../shims/jquery");
var Backbone  = require("../shims/backbone");

/**
 * Views.${1:"ViewName"}
 *
 * ${2:"View description"}
 *
 */

module.exports = Backbone.View.extend({

  initialize: function (options) {



  },

  render: function () {

    return this;

  }

});
"""
'.source.html':
  'console.log':
    'prefix': 'log'
    'body': 'console.log(${1:"crash"});$2'