Skip to content

Instantly share code, notes, and snippets.

@caporro
Last active May 7, 2019 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caporro/21440eee75b0ab9848c7e1aaf08d8f9c to your computer and use it in GitHub Desktop.
Save caporro/21440eee75b0ab9848c7e1aaf08d8f9c to your computer and use it in GitHub Desktop.
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'
#
# 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:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
'.text.html.basic':
'snip log laravel':
'prefix': 'log_laravel'
'body': 'Log::info(\'".$${1:manna}."\');$2'
'snip log zend':
'prefix': 'log_zend'
'body': '$applogger->info(\'".$${1:manna}."\');$2'
'snip log in js':
'prefix': 'log_phpJs'
'body': 'echo "<script>$(function(){console.log(\'".$${1:manna}."\')})</script>";$2'
'snip number_format':
'prefix': 'number'
'body': 'number_format(${1:$manna}, 2, ".","");$2'
'.source.js':
'snip console.log':
'prefix': 'log_js'
'body': 'console.log(\'${1:crash}\');$2'
'snip console.error':
'prefix': 'error'
'body': 'console.error("${1:crash}");$2'
'.source.php':
'snip log log_laravel':
'prefix': 'log'
'body': 'Log::info(\'".$${1:manna}."\');$2'
'snip log zend':
'prefix': 'log_zend'
'body': '$applogger->info(\'".$${1:manna}."\');$2'
'snip log in js':
'prefix': 'log_phpJs'
'body': 'echo "<script>$(function(){console.log(\'".$${1:manna}."\')})</script>";$2'
'snip number_format':
'prefix': 'number'
'body': 'number_format(${1:$manna}, 2, ".","");$2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment