aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-04-27 00:16:43 +0800
committerjdhao <jdhao@hotmail.com>2019-04-27 00:16:43 +0800
commitdeb3266920148cb9c0715e5d7225d3df6a9f318e (patch)
tree3673a815ce597e51feff7493849fc9122136834f
parentfcbbe908f6060037b65737cb1398c1c0dceaa43f (diff)
Add Ultisnips snippets
-rw-r--r--my_snippets/markdown.snippets17
-rw-r--r--my_snippets/python.snippets14
-rw-r--r--my_snippets/tex.snippets3
3 files changed, 34 insertions, 0 deletions
diff --git a/my_snippets/markdown.snippets b/my_snippets/markdown.snippets
new file mode 100644
index 0000000..8a2aa4f
--- /dev/null
+++ b/my_snippets/markdown.snippets
@@ -0,0 +1,17 @@
+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: [$3]
+categories: [$4]
+---
+$0
+endsnippet
+
+snippet more "HTML more tag"
+<!--more-->
+endsnippet
diff --git a/my_snippets/python.snippets b/my_snippets/python.snippets
new file mode 100644
index 0000000..e6ecb78
--- /dev/null
+++ b/my_snippets/python.snippets
@@ -0,0 +1,14 @@
+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
diff --git a/my_snippets/tex.snippets b/my_snippets/tex.snippets
new file mode 100644
index 0000000..7b08644
--- /dev/null
+++ b/my_snippets/tex.snippets
@@ -0,0 +1,3 @@
+snippet frac "Math fractions"
+\frac{${1:NUM}}{${2:DEN}} $0
+endsnippet \ No newline at end of file