Last active
November 4, 2016 22:31
-
-
Save bondydaa/cc4b32a1593339479dca91ba853162fa to your computer and use it in GitHub Desktop.
Atom snippets for PHP coding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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': | |
'var_dump variable into HTML': | |
'prefix': 'debug' | |
'body': """ | |
echo '<pre>'; | |
var_dump($1); | |
echo '</pre>'; | |
echo '<hr>'; | |
""" | |
'Create a comment': | |
'prefix': 'comment' | |
'body': """ | |
/** | |
* $1 | |
*/ | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Things to note:
.source.[language]
key in this fileIE: lines 24 and 33 need to be the same indentation, if line 33 is indented over to the right again it won't render.