Skip to content

Instantly share code, notes, and snippets.

@GBarthos
Last active February 2, 2017 23:18
Show Gist options
  • Save GBarthos/4ca13878616b2fbe2f03a160b44959db to your computer and use it in GitHub Desktop.
Save GBarthos/4ca13878616b2fbe2f03a160b44959db to your computer and use it in GitHub Desktop.
Atom embedded snippets configuration
# 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.js':
'Todo comment':
'prefix': '//:'
'body': '// TODO $1'
'Todo remove comment':
'prefix': '//:rm'
'body': '// TODO #remove'
'Todo complete comment':
'prefix': '//:cp'
'body': '// TODO #complete'
'Todo fix comment':
'prefix': '//:fix'
'body': '// TODO #fix'
'console log':
'prefix': 'log'
'body': 'console.log($1); // TODO #remove'
'console debug':
'prefix': 'debug'
'body': 'console.debug($1); // TODO #remove'
'.source.jsx':
'Todo comment':
'prefix': '//:'
'body': '// TODO $1'
'Todo remove comment':
'prefix': '//:rm'
'body': '// TODO #remove'
'Todo complete comment':
'prefix': '//:cp'
'body': '// TODO #complete'
'Todo fix comment':
'prefix': '//:fix'
'body': '// TODO #fix'
'console log':
'prefix': 'log'
'body': 'console.log($1); // TODO #remove'
'console debug':
'prefix': 'debug'
'body': 'console.debug($1); // TODO #remove'
@GBarthos
Copy link
Author

This is a snippet configuration file for atom editor.

This adds snippets for js and jsx files, to quickly add console logs and todo comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment