Skip to content

Instantly share code, notes, and snippets.

@jdhao
Last active September 16, 2019 02:04
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 jdhao/14efde95923a9520dc3b47fe77c4b8c5 to your computer and use it in GitHub Desktop.
Save jdhao/14efde95923a9520dc3b47fe77c4b8c5 to your computer and use it in GitHub Desktop.
My snippet files for Ultisnips: https://github.com/SirVer/ultisnips
snippet kbd "HTML kbd tag"
<kbd>${1:KEY}</kbd>$0
endsnippet
snippet head "Markdown header" b
---
title: "$1"
date: `!v strftime("%Y-%m-%d %H:%M:%S%z")`
tags: [$2]
categories: [$3]
---
$0
endsnippet
snippet more "HTML more tag"
<!--more-->
endsnippet
snippet img "aligned image using HTML tag"
<p align="center">
<img src="${1:URL}">
</p>
$0
endsnippet
snippet head "Python source file header" b
"""
Description: $1
Author: Jie-dong Hao
Date: `!v strftime("%Y-%m-%d %H:%M:%S%z")`
Update: `!v strftime("%Y-%m-%d %H:%M:%S%z")`
"""
$0
endsnippet
snippet print "Print value of some variable"
print("$1".format($2))
$0
endsnippet
snippet impa "import FOO as BAR" b
import ${1:FOO} as ${2:BAR}
endsnippet
snippet frac "Math fractions"
\frac{${1:NUM}}{${2:DEN}} $0
endsnippet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment