diff options
author | Tom Willemse | 2017-01-08 13:33:08 +0100 |
---|---|---|
committer | Tom Willemse | 2017-01-08 13:33:08 +0100 |
commit | 0ee856c6f35f9eda412534f9e2a7b5e4954e6af6 (patch) | |
tree | 4710d1224c8a8781d3462d0dbc364209f38bef10 /emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el | |
parent | 562791b0ae258ba68851a025f954614fed1f0dd1 (diff) | |
parent | a6a88fd424ea806ce89ce6b2aa1e0d6664b918de (diff) | |
download | new-dotfiles-0ee856c6f35f9eda412534f9e2a7b5e4954e6af6.tar.gz new-dotfiles-0ee856c6f35f9eda412534f9e2a7b5e4954e6af6.zip |
Merge remote-tracking branch 'origin/index' into index
Diffstat (limited to 'emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el')
-rw-r--r-- | emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el b/emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el new file mode 100644 index 0000000..fee2e88 --- /dev/null +++ b/emacs/.emacs.d/snippets/python-mode/.yas-compiled-snippets.el @@ -0,0 +1,15 @@ +;;; Compiled snippets and support files for `python-mode' +;;; Snippet definitions: +;;; +(yas-define-snippets 'python-mode + '(("url" "url(r'^$1', $2, name='$3')," "url" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/url" nil nil) + ("defm" "@method_decorator(permission_required('$1',\n raise_exception=True))\ndef dispatch(self, *args, **kwargs):\n '''Make sure the user has the $1 permission.'''\n return super(${3:`(progn (re-search-backward \"^[ \\t]*class \\\\(.+\\\\)(\") (match-string 1)))`}, self).dispatch(*args, **kwargs)" "Permission guard" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/permission_guard" nil nil) + ("defm" "def $1(self$2):\n '''$3'''\n $0" "method" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/method" nil nil) + ("from" "from ${1:module} import ${2:class_or_module}\n" "from ... import ..." nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/import_from" nil nil) + ("formvalid" "def form_valid(self, form):\n rv = super(`(let ((name (python-info-current-defun))) (substring name 0 (cl-position ?. name)))`, self).form_valid(form)\n $0\n return rv" "form_valid with return" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/form_valid_with_return" nil nil) + ("defm" "@record_activity(model=${1:`(progn (re-search-backward \"^[ \\t]*model = \\\\([a-zA-Z_].*\\\\)$\") (match-string 1))`})\ndef form_valid(self, form):\n '''Make sure any changes to the $1 model get logged.'''\n return super(${2:`(progn (re-search-backward \"^[ \\t]*class \\\\(.+\\\\)(\") (match-string 1)))`}, self).form_valid(form)" "Record form" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/form_valid" nil nil) + ("form" "class ${1:Model}Form(forms.ModelForm):\n '''Form for the $1 model.'''\n\n class Meta:\n model = $1" "Model Form" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/form" nil nil) + ("defm" "def ${1:name}(self, *args, **kwargs):\n '''$2'''\n return super(${3:`(progn (re-search-backward \"^[ \\t]*class \\\\(.+\\\\)(\") (match-string 1)))`}, self).$1(*args, **kwargs)" "Empty Defmethod" nil nil nil "/home/chelys/projects/dotfiles/emacs/.emacs.d/snippets/python-mode/defm_empty" nil nil))) + + +;;; Do not edit! File generated at Tue Nov 22 15:37:52 2016 |