# 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.html, .source.js, .source.php, .source.twig': 'Document Ready': 'prefix': 'ready' 'body': """ jQuery(function($) { $(document).ready(function() { $1 }) }) """ '.source.php': 'Var Dump': 'prefix': 'vd' 'body': """ echo '
';
var_dump( $1 );
echo '';
die;
"""
'JSON Dump':
'prefix': 'jd'
'body': """
header('Content-Type: application/json');
echo wp_json_encode($1);
die;
"""
'PHP Console Log':
'prefix': 'cl'
'body': """
echo '';
"""
'.source.scss,.source.css,.source.js,.source.php':
'Comment Block':
'prefix': 'cb'
'body': """
/*
==========================================================================
$1
==========================================================================
*/
"""