Commits

ZHUO Qiang committed 17bf9c5

add snippets for rst

Comments (0)

Files changed (3)

 (setq auto-insert-alist '()) ; clear build-in insert templates
 (qiang-define-auto-insert "\\.\\(h\\|hpp\\|hxx\\|hmm\\)$" "h")
 (qiang-define-auto-insert "\\.\\(html\\)" "html5")
+(qiang-define-auto-insert "\\.\\(rst\\)" "h")
 (qiang-define-auto-insert "\\.\\(py\\|pyw\\)$" "h")
 (setq auto-insert-query nil)

snippets/rst-mode/.yas-parents

+text-mode

snippets/rst-mode/h

+# -*- mode: snippet -*-
+# name : rst header
+# key: h
+# --
+${1:Title}
+${1:$(make-string (string-width text) ?\#)}
+:date: `(format-time-string "%Y-%m-%d %H:%M")`
+:category: ${2:编程}
+:tags: ${3:c++, programming}
+