Skip to content

Instantly share code, notes, and snippets.

@zengyu714
Created August 16, 2018 16:42
Show Gist options
  • Save zengyu714/e8f135ae9ebf403d0ef3af82f8291b0c to your computer and use it in GitHub Desktop.
Save zengyu714/e8f135ae9ebf403d0ef3af82f8291b0c 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
# Markdown
'.text.md':
'math inline':
'prefix': 'math-inline'
'body': '$ $1 $ $2'
'math block':
'prefix': 'math-block'
'body': """
$$
$1
$$
$2
"""
'column vector':
'prefix': 'column-vector'
'body': '\\\\boldsymbol{$1} = \\\\begin{bmatrix}$2 \\\\\\\\ $3 \\\\\\\\ \\\\end{bmatrix}'
'boldsymbol':
'prefix': 'bm'
'body': '\\\\boldsymbol{$1}$2'
'math remove':
'prefix': 'rmath'
'body': '\\\\mathrm{$1}$2'
'amsfont':
'prefix': 'amsfont'
'body': '\\\\mathbb{$1}$2'
'head 2':
'prefix': 'h2'
'body': """
## $1
$2
"""
'head 3':
'prefix': 'h3'
'body': """
### $1
$2
"""
'head 4':
'prefix': 'h4'
'body': """
#### $1
$2
"""
'bold':
'prefix': 'bol'
'body': '**$1**$2'
'italic':
'prefix': 'ita'
'body': '*$1*$2'
'code':
'prefix': 'code'
'body': """
```$1
```
$2
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment