Skip to content

Instantly share code, notes, and snippets.

@tacaswell
Created October 5, 2013 19:22
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 tacaswell/6845075 to your computer and use it in GitHub Desktop.
Save tacaswell/6845075 to your computer and use it in GitHub Desktop.
useful elisp
(defun tac-python-header ()
(interactive "*")
(occur "^\\s-*\\(\\(class\\)\\|\\(def\\)\\)\\|\\(@\\)")
)
(define-skeleton py-np-def
"Skeleton for function definition that includes numppydoc style "
"Name: "
"def " str "(" ("Parameter, %s: " (unless (equal ?\( (char-before)) ", ")
str) "):" \n
"\"\"\""\n
"" - \n
"Parameters"\n
"----------"\n
""\n
"Returns"\n
"-------"\n
"\"\"\"" \n ; Fixme: extra space inserted -- why?).
> _ \n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment