Skip to content

Instantly share code, notes, and snippets.

@d1i1m1o1n
Last active March 3, 2016 12:36
Show Gist options
  • Save d1i1m1o1n/26fdb3a26d9e05a83724 to your computer and use it in GitHub Desktop.
Save d1i1m1o1n/26fdb3a26d9e05a83724 to your computer and use it in GitHub Desktop.
PHP pre snippets from atom editor
# 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.php':
'html_comment_print_r':
'prefix': 'html_comment_print_r'
'body': '<!-- <?print_r(\$${1:foo});?> -->'
'html_tag_pre_print_r':
'prefix': 'html_tag_pre_print_r'
'body': '<pre style="display:${1:none};"><?print_r(\$${2:foo});?></pre>'
'echo_html_comment_print_r':
'prefix': 'echo_html_comment_print_r'
'body': 'echo "<!-- "; print_r(\$${1:foo}); echo " -->";'
'echo_html_tag_pre_print_r':
'prefix': 'echo_html_tag_pre_print_r'
'body': 'echo "<pre style=\'display:${1:none};\'>"; print_r(\$${2:foo}); echo "</pre>";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment