From 897eee81de8b3f6adf0165f50e95600a7b89c20c Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Wed, 4 Feb 2015 21:41:42 +0100 Subject: Standalone lisp and snippet repo --- .emacs.d/mysnippets/text-mode/python-mode/__ | 3 -- .emacs.d/mysnippets/text-mode/python-mode/class | 54 ----------------------- .emacs.d/mysnippets/text-mode/python-mode/def | 35 --------------- .emacs.d/mysnippets/text-mode/python-mode/defm | 33 -------------- .emacs.d/mysnippets/text-mode/python-mode/for | 4 -- .emacs.d/mysnippets/text-mode/python-mode/ifmain | 4 -- .emacs.d/mysnippets/text-mode/python-mode/mprop | 23 ---------- .emacs.d/mysnippets/text-mode/python-mode/mpropg | 11 ----- .emacs.d/mysnippets/text-mode/python-mode/mpropsg | 17 ------- .emacs.d/mysnippets/text-mode/python-mode/prop | 15 ------- .emacs.d/mysnippets/text-mode/python-mode/propg | 9 ---- .emacs.d/mysnippets/text-mode/python-mode/propsg | 12 ----- .emacs.d/mysnippets/text-mode/python-mode/pscript | 12 ----- .emacs.d/mysnippets/text-mode/python-mode/while | 4 -- 14 files changed, 236 deletions(-) delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/__ delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/class delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/def delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/defm delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/for delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/ifmain delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mprop delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mpropg delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/mpropsg delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/prop delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/propg delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/propsg delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/pscript delete mode 100644 .emacs.d/mysnippets/text-mode/python-mode/while (limited to '.emacs.d/mysnippets/text-mode/python-mode') diff --git a/.emacs.d/mysnippets/text-mode/python-mode/__ b/.emacs.d/mysnippets/text-mode/python-mode/__ deleted file mode 100644 index a67dc49..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/__ +++ /dev/null @@ -1,3 +0,0 @@ -#name : __...__ -# -- -__${init}__ \ No newline at end of file diff --git a/.emacs.d/mysnippets/text-mode/python-mode/class b/.emacs.d/mysnippets/text-mode/python-mode/class deleted file mode 100644 index 72f339b..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/class +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- -# name: class -# contributor: Orestis Markou -# contributor: Nishio Hirokazu -# contributor: Yasser González Fernández -# -- -class ${1:ClassName}(${2:object}): - """$3 - """ - - def __init__(self, $4): - """$5 - ${4:$ - (let* ((indent - (concat "\n" (make-string (current-column) 32))) - (args - (mapconcat - '(lambda (x) - (if (not (string= (nth 0 x) "")) - (concat "- " (char-to-string 96) (nth 0 x) - (char-to-string 96) ":"))) - (mapcar - '(lambda (x) - (mapcar - (lambda (x) - (replace-regexp-in-string "[[:blank:]]*$" "" - (replace-regexp-in-string "^[[:blank:]]*" "" x))) x)) - (mapcar '(lambda (x) (split-string x "=")) - (split-string text ","))) - indent))) - (if (string= args "") - (make-string 3 34) - (mapconcat - 'identity - (list "" "Arguments:" args (make-string 3 34)) - indent))) - } - ${4:$ - (mapconcat - '(lambda (x) - (if (not (string= (nth 0 x) "")) - (concat "self._" (nth 0 x) " = " (nth 0 x)))) - (mapcar - '(lambda (x) - (mapcar - '(lambda (x) - (replace-regexp-in-string "[[:blank:]]*$" "" - (replace-regexp-in-string "^[[:blank:]]*" "" x))) - x)) - (mapcar '(lambda (x) (split-string x "=")) - (split-string text ","))) - (concat "\n" (make-string (current-column) 32))) - } - $0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/def b/.emacs.d/mysnippets/text-mode/python-mode/def deleted file mode 100644 index f82f791..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/def +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# name: def -# contributor: Orestis Markou -# contributor: Yasser González Fernández -# -- -def ${1:name}($2): - """$3 - ${2:$ - (let* - ((indent - (concat "\n" (make-string (current-column) 32))) - (args - (mapconcat - '(lambda (x) - (if (not (string= (nth 0 x) "")) - (concat "- " (char-to-string 96) (nth 0 x) - (char-to-string 96) ":"))) - (mapcar - '(lambda (x) - (mapcar - '(lambda (x) - (replace-regexp-in-string "[[:blank:]]*$" "" - (replace-regexp-in-string "^[[:blank:]]*" "" x))) - x)) - (mapcar '(lambda (x) (split-string x "=")) - (split-string text ","))) - indent))) - (if (string= args "") - (make-string 3 34) - (mapconcat - 'identity - (list "" "Arguments:" args (make-string 3 34)) - indent))) - } - $0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/defm b/.emacs.d/mysnippets/text-mode/python-mode/defm deleted file mode 100644 index dc25827..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/defm +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -# name: defm -# contributor: Yasser Gonz¨¢lez Fern¨¢ndez -# -- -def ${1:name}(self, $2): - """$3 - ${2:$ - (let* ((indent - (concat "\n" (make-string (current-column) 32))) - (args - (mapconcat - '(lambda (x) - (if (not (string= (nth 0 x) "")) - (concat "- " (char-to-string 96) (nth 0 x) - (char-to-string 96) ":"))) - (mapcar - '(lambda (x) - (mapcar - '(lambda (x) - (replace-regexp-in-string "[[:blank:]]*$" "" - (replace-regexp-in-string "^[[:blank:]]*" "" x))) - x)) - (mapcar '(lambda (x) (split-string x "=")) - (split-string text ","))) - indent))) - (if (string= args "") - (make-string 3 34) - (mapconcat - 'identity - (list "" "Arguments:" args (make-string 3 34)) - indent))) - } - $0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/for b/.emacs.d/mysnippets/text-mode/python-mode/for deleted file mode 100644 index 84f3ddd..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/for +++ /dev/null @@ -1,4 +0,0 @@ -#name : for ... in ... : ... -# -- -for ${var} in ${collection}: - $0 \ No newline at end of file diff --git a/.emacs.d/mysnippets/text-mode/python-mode/ifmain b/.emacs.d/mysnippets/text-mode/python-mode/ifmain deleted file mode 100644 index 6224923..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/ifmain +++ /dev/null @@ -1,4 +0,0 @@ -#name : if __name__ == '__main__': ... -# -- -if __name__ == '__main__': - $0 \ No newline at end of file diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mprop b/.emacs.d/mysnippets/text-mode/python-mode/mprop deleted file mode 100644 index 8a17317..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/mprop +++ /dev/null @@ -1,23 +0,0 @@ -#contributor : Simeon Simeonov -#name : @property foo ... getter & setter & deleter -#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil)) -# -- -@property -def ${1:foo}(self): - """ - """ - return self._$1 - -@$1.setter -def $1(self, value): - """ - """ - self._$1 = value - -@$1.deleter -def $1(self): - """ - """ - pass - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropg b/.emacs.d/mysnippets/text-mode/python-mode/mpropg deleted file mode 100644 index eb60b49..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/mpropg +++ /dev/null @@ -1,11 +0,0 @@ -#contributor : Simeon Simeonov -#name : @property foo ... getter -#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil)) -# -- -@property -def ${1:foo}(self): - """ - """ - return self._$1 - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/mpropsg b/.emacs.d/mysnippets/text-mode/python-mode/mpropsg deleted file mode 100644 index 0665f5e..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/mpropsg +++ /dev/null @@ -1,17 +0,0 @@ -#contributor : Simeon Simeonov -#name : @property foo ... getter & setter -#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil)) -# -- -@property -def ${1:foo}(self): - """ - """ - return self._$1 - -@$1.setter -def $1(self, value): - """ - """ - self._$1 = value - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/prop b/.emacs.d/mysnippets/text-mode/python-mode/prop deleted file mode 100644 index 107730a..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/prop +++ /dev/null @@ -1,15 +0,0 @@ -# contributor: Mads D. Kristensen -# name: prop -# -- -def ${1:foo}(): - doc = """${2:Doc string}""" - def fget(self): - return self._$1 - def fset(self, value): - self._$1 = value - def fdel(self): - del self._$1 - return locals() -$1 = property(**$1()) - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/propg b/.emacs.d/mysnippets/text-mode/python-mode/propg deleted file mode 100644 index 7e994b6..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/propg +++ /dev/null @@ -1,9 +0,0 @@ -#contributor : Julio Carlos Menendez -#name : _get_foo ... foo=property(...) -# -- -def _get_${1:foo}(self): - return self._$1 - -$1 = property(_get_$1) - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/propsg b/.emacs.d/mysnippets/text-mode/python-mode/propsg deleted file mode 100644 index e09d82a..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/propsg +++ /dev/null @@ -1,12 +0,0 @@ -#contributor : Julio Carlos Menendez -#name : _get_foo ... _set_foo ... foo=property(...) -# -- -def _set_${1:foo}(self, value): - self._$1 = value - -def _get_$1(self): - return self._$1 - -$1 = property(_get_$1, _set_$1) - -$0 diff --git a/.emacs.d/mysnippets/text-mode/python-mode/pscript b/.emacs.d/mysnippets/text-mode/python-mode/pscript deleted file mode 100644 index 8fdb376..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/pscript +++ /dev/null @@ -1,12 +0,0 @@ -#contributor : Simeon Simeonov -#name : script setup -#expand-env: ((yas/indent-line 'fixed) (yas/wrap-around-region 'nil)) -# -- -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -def main(): - $0 - -if __name__ == '__main__': - main() diff --git a/.emacs.d/mysnippets/text-mode/python-mode/while b/.emacs.d/mysnippets/text-mode/python-mode/while deleted file mode 100644 index 704dd7c..0000000 --- a/.emacs.d/mysnippets/text-mode/python-mode/while +++ /dev/null @@ -1,4 +0,0 @@ -#name : while ... : ... -# -- -while ${condition}: - $0 \ No newline at end of file -- cgit v1.3