Commits

ZHUO Qiang  committed d4ec0b0

add python snipper

  • Participants
  • Parent commits e1bfaa6

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 "\\.\\(py\\|pyw\\)$" "h")
 (setq auto-insert-query nil)
 (custom-set-variables
  ;; custom-set-variables was added by Custom.

File snippets/python-mode/.yas-parents

+text-mode

File snippets/python-mode/h

+# -*- mode: snippet -*-
+# name : python header
+# key: h
+# --
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+'''
+'''
+
+import sys
+import os
+
+__auther__ = '`(user-full-name)`'
+__date__ = '`(format-time-string "%Y-%m-%d %H:%M")`'
+
+$0
+
+if __name__ == '__main__':
+   ${1:pass}